public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aj at ianozi dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/109798] New: Gnat Bug Detected Date: Wed, 10 May 2023 15:51:56 +0000 [thread overview] Message-ID: <bug-109798-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109798 Bug ID: 109798 Summary: Gnat Bug Detected Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: aj at ianozi dot com CC: dkm at gcc dot gnu.org Target Milestone: --- Steps to reproduce: 1) Create test program called "testing.adb" with the following contents: ``` pragma Ada_2022; procedure Testing is type Test_Enum is (apple, orange, banana); type Test_Type is record The_Type : Test_Enum; The_Value : Integer; end record; type Test_Array is array (Positive range <>) of Test_Type; My_Array : Test_Array (1 .. 6) := ( (apple, 5), (orange, 10), (banana, 1), (orange, 15), (orange, 12), (apple, 5) ); begin for I in My_Array'Range when My_Array (I).The_Type /= orange loop null; end loop; end Testing; ``` 2) Compile with gcc 12.0 or greater (I tested it with both gcc 12.2.0 or MacOS and Debian) The following output occurs and it fails: ``` ⓘ Building testing/testing.gpr... Compile [Ada] testing.adb +===========================GNAT BUG DETECTED==============================+ | 12.1.0 (x86_64-apple-darwin19.6.0) GCC error: | | in gnat_to_gnu_entity, at ada/gcc-interface/decl.cc:472 | | Error detected at testing.adb:13:21 | | Compiling /Users/ianozi/projects/testing/testing/src/testing.adb | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). /Users/ianozi/projects/testing/testing/src/testing.adb testing.adb:10:04: warning: "My_Array" is not modified, could be declared constant [-gnatwk] testing.adb:10:38: warning: array aggregate using () is an obsolescent syntax, use [] instead [-gnatwj] testing.adb:10:39: (style) space not allowed compilation abandoned compilation of testing.adb failed gprbuild: *** compilation phase failed error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/Users/ianozi/projects/testing/testing/testing.gpr"] exited with code 4 error: Compilation failed. ``` I get the same thing on debian, except the gnat bug detected says ``` | 12.2.0 (x86_64-pc-linux-gnu) GCC error: | | in gnat_to_gnu_entity, at ada/gcc-interface/decl.cc:472 | ``` Instead of the apple-darwin stuff. The same thing happens if I remove the "pragma Ada_2022;" from the beginning of the program and just compile it with the gnat2022 switch. Is this happening for anyone else? I apologize if I'm filing this bug wrong, or if it's a duplicate, it's the first time I'm doing this. Kind regards, AJ.
next reply other threads:[~2023-05-10 15:51 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-10 15:51 aj at ianozi dot com [this message] 2023-05-11 7:43 ` [Bug ada/109798] " simon at pushface dot org 2023-05-11 8:50 ` dkm at gcc dot gnu.org 2023-05-11 12:19 ` ebotcazou at gcc dot gnu.org 2023-05-11 12:38 ` aj at ianozi dot com 2023-05-11 12:54 ` ebotcazou at gcc dot gnu.org 2023-05-11 13:50 ` dkm at gcc dot gnu.org 2023-05-11 14:49 ` simon at pushface dot org 2023-05-11 14:59 ` aj at ianozi dot com 2023-05-11 15:07 ` ebotcazou at gcc dot gnu.org 2023-05-11 15:09 ` [Bug ada/109798] internal error on iterator filter with -gnatVa ebotcazou at gcc dot gnu.org 2023-06-15 14:59 ` ebotcazou 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-109798-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).