public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "juriad at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/112946] New: Assignment of string to enumeration or set crashes Date: Sun, 10 Dec 2023 20:09:26 +0000 [thread overview] Message-ID: <bug-112946-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112946 Bug ID: 112946 Summary: Assignment of string to enumeration or set crashes Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: juriad at gmail dot com Target Milestone: --- Created attachment 56846 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56846&action=edit reproducer + gcc crash output + crash report I am playing with Modula-2 (due to Advent of Code). I compiled GCC from master branch (fbfe43daec6443978df65530dc5f7f3f8a4e6f9e). The attached program crashes when compiling (the error differs between strings of length 1 and 2): gm2 -freport-bug -fiso -static-libgm2 -o prg bug.mod The full output is attached as well as the referenced report from /tmp/: cc1gm2: internal compiler error: tree check: expected integer_cst, have string_cst in get_len, at tree.h:6473 The expected behavior would be to show the error as usual with highlighted line and explanation. Apart from this crash, I encountered one more issue which may not be an error (no idea; I have less than 1 day of experience with Modula) but would deserve at least a warning. Arithmetic between set and enumeration does not produce what I would expect. DIRS := Dirs{Left, Right}; DIRS := DIRS + Up; IF NOT (Up IN DIRS) THEN HALT END; On the other hand: DIRS := Dirs{Left, Right} + Up; leads to another crash: cc1gm2: internal compiler error: expecting type of constant to be a set
next reply other threads:[~2023-12-10 20:09 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-10 20:09 juriad at gmail dot com [this message] 2023-12-12 11:23 ` [Bug modula2/112946] " gaius at gcc dot gnu.org 2023-12-15 15:14 ` gaius at gcc dot gnu.org 2023-12-15 15:27 ` cvs-commit at gcc dot gnu.org 2023-12-15 15:28 ` gaius at gcc dot gnu.org 2023-12-15 15:42 ` gaiusmod2 at gmail dot com 2023-12-16 7:27 ` gaius at gcc dot gnu.org 2024-01-10 20:01 ` gaius at gcc dot gnu.org 2024-01-11 0:54 ` cvs-commit at gcc dot gnu.org 2024-01-11 0:56 ` gaius at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-112946-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).