public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential)
@ 2022-02-02 20:43 simon at pushface dot org
  2022-02-02 20:47 ` [Bug ada/104354] " simon at pushface dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: simon at pushface dot org @ 2022-02-02 20:43 UTC (permalink / raw)
  To: gcc-bugs

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).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104354] ICE with Partition_Elaboration_Policy (Sequential)
  2022-02-02 20:43 [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential) simon at pushface dot org
@ 2022-02-02 20:47 ` simon at pushface dot org
  2024-01-09 10:57 ` ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: simon at pushface dot org @ 2022-02-02 20:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from simon at pushface dot org ---
Created attachment 52334
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52334&action=edit
GCC 12-compatible RTS

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104354] ICE with Partition_Elaboration_Policy (Sequential)
  2022-02-02 20:43 [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential) simon at pushface dot org
  2022-02-02 20:47 ` [Bug ada/104354] " simon at pushface dot org
@ 2024-01-09 10:57 ` ebotcazou at gcc dot gnu.org
  2024-01-09 11:51 ` simon at pushface dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-01-09 10:57 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org
   Last reconfirmed|                            |2024-01-09
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Does this still happen with newer compilers?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104354] ICE with Partition_Elaboration_Policy (Sequential)
  2022-02-02 20:43 [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential) simon at pushface dot org
  2022-02-02 20:47 ` [Bug ada/104354] " simon at pushface dot org
  2024-01-09 10:57 ` ebotcazou at gcc dot gnu.org
@ 2024-01-09 11:51 ` simon at pushface dot org
  2024-01-09 12:13 ` [Bug ada/104354] [12 regression] internal error " ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: simon at pushface dot org @ 2024-01-09 11:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from simon at pushface dot org ---
It happens in 12.2.0, doesn’t happen in 13.1.0 or 13.2.0.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104354] [12 regression] internal error with Partition_Elaboration_Policy (Sequential)
  2022-02-02 20:43 [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential) simon at pushface dot org
                   ` (2 preceding siblings ...)
  2024-01-09 11:51 ` simon at pushface dot org
@ 2024-01-09 12:13 ` ebotcazou at gcc dot gnu.org
  2024-01-09 12:27 ` cvs-commit at gcc dot gnu.org
  2024-01-09 12:27 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-01-09 12:13 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
   Target Milestone|---                         |12.4
            Summary|ICE with                    |[12 regression] internal
                   |Partition_Elaboration_Polic |error with
                   |y (Sequential)              |Partition_Elaboration_Polic
                   |                            |y (Sequential)

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Indeed, thanks, I can reproduce even without the runtime.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104354] [12 regression] internal error with Partition_Elaboration_Policy (Sequential)
  2022-02-02 20:43 [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential) simon at pushface dot org
                   ` (3 preceding siblings ...)
  2024-01-09 12:13 ` [Bug ada/104354] [12 regression] internal error " ebotcazou at gcc dot gnu.org
@ 2024-01-09 12:27 ` cvs-commit at gcc dot gnu.org
  2024-01-09 12:27 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-09 12:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:5b17c2c6cbc34056ae878beed2351bf77a8f57a0

commit r12-10087-g5b17c2c6cbc34056ae878beed2351bf77a8f57a0
Author: Steve Baird <baird@adacore.com>
Date:   Wed Nov 16 09:28:22 2022 -0800

    Fix nternal compiler error for Sequential Partition_Elaboration_Policy

    In some cases, compilation of a function with a limited class-wide result
    type could fail with an ICE if a Sequential Partition_Elaboration_Policy is
    specified. To prevent this, we really want that specifying a Sequential
    Partition_Elaboration_Policy to have the side effect of imposing a
    No_Task_Hierarchy restriction. But doing that in a straightforward
    way leads to problems with incorrectly accepting violations of H.6(6).
    So a new restriction, No_Task_Hierarchy_Implicit, is introduced.

    gcc/ada/
            PR ada/104354
            * libgnat/s-rident.ads: Define a new restriction,
            No_Task_Hierarchy_Implicit. This is like the No_Task_Hierarchy
            restriction, but with the difference that setting this restriction
            does not mean the H.6(6) post-compilation check is satisified.
            * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): If it is
            known that the function result cannot have tasks, then pass in a
            null literal for the activation chain actual parameter. This
            avoids generating a reference to an entity that
            Build_Activation_Chain_Entity may have chosen not to generate a
            declaration for.
            * gnatbind.adb (List_Applicable_Restrictions): Do not list the
            No_Task_Hierarchy_Implicit restriction.
            * restrict.adb: Special treatment for the
            No_Task_Hierarchy_Implicit restriction in functions
            Get_Restriction_Id and Restriction_Active. The former is needed to
            disallow the (unlikely) case that a user tries to explicitly
            reference the No_Task_Hierarchy_Implicit restriction.
            * sem_prag.adb (Analyze_Pragma): If a Sequential
            Partition_Elaboration_Policy is specified (and the
            No_Task_Hierarchy restriction is not already enabled), then enable
            the No_Task_Hierarchy_Implicit restriction.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104354] [12 regression] internal error with Partition_Elaboration_Policy (Sequential)
  2022-02-02 20:43 [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential) simon at pushface dot org
                   ` (4 preceding siblings ...)
  2024-01-09 12:27 ` cvs-commit at gcc dot gnu.org
@ 2024-01-09 12:27 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-01-09 12:27 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Fixed on the 12 branch too.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-09 12:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-02 20:43 [Bug ada/104354] New: ICE with Partition_Elaboration_Policy (Sequential) simon at pushface dot org
2022-02-02 20:47 ` [Bug ada/104354] " simon at pushface dot org
2024-01-09 10:57 ` ebotcazou at gcc dot gnu.org
2024-01-09 11:51 ` simon at pushface dot org
2024-01-09 12:13 ` [Bug ada/104354] [12 regression] internal error " ebotcazou at gcc dot gnu.org
2024-01-09 12:27 ` cvs-commit at gcc dot gnu.org
2024-01-09 12:27 ` ebotcazou at gcc dot gnu.org

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).