[Bug ada/64556] New: Aspect Preelaborate is ignored on library-level subprogram

simon at pushface dot org gcc-bugzilla@gcc.gnu.org
Sat Jan 10 20:51:00 GMT 2015


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

            Bug ID: 64556
           Summary: Aspect Preelaborate is ignored on library-level
                    subprogram
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simon at pushface dot org

Attempting to mark a library-level supbprogram as preelaborable via an aspect
doesn’t work; you still need to use the pragma.

This:

with System;
procedure Last_Chance_Handler
  (Message : System.Address; Line : Integer)
with
  Preelaborate,
  Export,
  Convention => C,
  External_Name => "__gnat_last_chance_handler";

results in

arm-eabi-gcc -c -gnatpgn -gnatqQ -nostdinc -ffunction-sections -fdata-sections
-g -O0 -g -O1 -fno-inline -fno-toplevel-reorder a-except.adb
a-except.adb:21:06: warning: cannot depend on "Last_Chance_Handler" (wrong
categorization)
a-except.adb:21:06: warning: preelaborated unit cannot depend on
non-preelaborated unit

Also in gcc version 5.0.0 20141228 (experimental) (GCC)


More information about the Gcc-bugs mailing list