https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104354

            Bug ID: 104354
           Summary: ICE with Partition_Elaboration_Policy (Sequential)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simon at pushface dot org
  Target Milestone: ---

Created attachment 52333
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52333&action=edit
Demonstrator (needs RTS)

The attached ravenscar-sfp-stm32f4.zip contains a version of the Alire
gnat_arm_elf_11.2.1_9343d45f runtime, edited to build with GCC
12.0.1.

The attached sem_ch8.zip contains demo.ad[bs] and enough RTS code from
Cortex GNAT RTS at https://github.com/simonjwright/cortex-gnat-rts to
allow compiling demo.adb, which uses Ada.Containers.Bounded_Vectors,
to demonstrate the problem.

The command

   $ gprbuild -c -u -f demo.adb --target=arm-eabi
--RTS=/Users/simon/tmp/ravenscar-sfp-stm32f4

(note, the --RTS= switch will have to be changed) results in

   +===========================GNAT BUG DETECTED==============================+
   | 12.0.1 20220128 (experimental) (arm-eabi) Program_Error sem_ch8.adb:5773
explicit raise|
   | Error detected at demo.adb:21:14                                         |
   | Compiling /Users/simon/tmp/bugs/gcc12/sem_ch8/arm-eabi//demo.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.                                       |
   +==========================================================================+

This error does not occur if the line
   pragma Partition_Elaboration_Policy (Sequential);
is removed from demo.ads (the compilation fails because of other missing
components).

Reply via email to