This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/64548] New: Lost visibility of package System after raise


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

            Bug ID: 64548
           Summary: Lost visibility of package System after raise
           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

Created attachment 34410
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34410&action=edit
Reproducer (to be gnatchopped)

In the attached, a raise statement with a string expression causes the compiler
to lose visibility of package System.

In this cut-down reproducer, removing the string expression makes the problem
go away; however this workround doesnât work in the full code.

Same problem in GCC 4.8, 4.9 & GNAT GPL 2013, 2014.

I found the problem while compiling for arm-eabi but this also happens for
x86_64-apple-darwin13 and with the Linux GNAT GPL 2013.

     4.    function Create_Task
     5.      (Code        : Task_Code;
     6.       Name        : String;
     7.       Stack_Depth : Natural;
     8.       Parameters  : System.Address;
     9.       Priority    : System.Any_Priority)
    10.      return Task_Handle is
    11.    begin
    12.       raise Program_Error with "couldn't create task";
    13.
    14.       return Null_Task_Handle;
    15.    end Create_Task;
    16.
    17.    function Get_Application_Parameter return System.Address is
                    1                                3
        >>> not type conformant with declaration at buggy_freertos.ads:19
        >>> return type does not match
        >>> "System" is not visible (more references follow)
        >>> non-visible declaration at system.ads:55

Using -gnatdg shows
      $ada__exceptions__raise_exception (ada__exceptions__null_id,
        "couldn't create task");

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]