This is the mail archive of the gcc@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]

Re: Question on VUSE


On Tue, 2004-08-03 at 13:38, Richard Kenner wrote:

> package Tbg0803 is
>    type R is record
>       F1, F2: Integer;
>       Serial_Number: Integer;
>    end record;
>    type A is array (1..10) of R;
>    type Ap is access all A;
> 
>    Unit_Table: Ap;
>    Utn: Integer;
>    T1, T2, T3, T4: Integer;
> 
>    function Sub1 return Integer;
> end Tbg0803;
> package body Tbg0803 is
>    function Sub1 return Integer is
>       Sn: Integer renames Unit_Table (Utn).Serial_Number;
>    begin
>       Sn := Sn + 1;
>       return Sn;
>    end Sub1;
> end Tbg0803;
>
I'm trying to compile this with

$ ./gnat1 -Iada/rts -O2 -fdump-tree-all-vops alias-bug.ada
alias-bug.ada:34:01: end of file expected, file can have only one compilation unit

Should the package body be in another file?


Thanks.  Diego.


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