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/15842] New: Legal program rejected


with System.Storage_Pools;
with System.Storage_Elements;
package Test_247016 is
   type Storage_Pool_Type
     is new System.Storage_Pools.Root_Storage_Pool with null record;

   procedure Allocate
      (Pool                     : in out Storage_Pool_Type;
       Storage_Address          :    out System.Address;
       Size_In_Storage_Elements : in     System.Storage_Elements.Storage_Count;
       Alignment                : in     System.Storage_Elements.Storage_Count);

   procedure Deallocate
      (Pool                     : in out Storage_Pool_Type;
       Storage_Address          : in     System.Address;
       Size_In_Storage_Elements : in     System.Storage_Elements.Storage_Count;
       Alignment                : in     System.Storage_Elements.Storage_Count);

   function Storage_Size
      (Pool : in Storage_Pool_Type)
         return System.Storage_Elements.Storage_Count;

   x1: Storage_Pool_Type;

   type T1 is access integer;
   for T1'Storage_Pool use System.Storage_Pools.Root_Storage_Pool (x1);

end Test_247016;

The compiler says incorrectly:

test_247016.ads:26:48: incorrect reference to a Storage Pool
gnatmake: "test_247016.ads" compilation error

-- 
           Summary: Legal program rejected
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ludovic dot brenta at insalien dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15842


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