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/15593] New: Legal program runs incorrectly (generic package elaboration)


(doesn't print "Hello world")

package pak1 is
    generic
    package pak2 is
    end pak2;
    procedure p2;
end pak1;

with text_io;
package body pak1 is

    procedure p2 is
       package new_pak2 is new pak2;
    begin
       null;
    end p2;

    package body pak2 is
    begin
       text_io.put_line("Hello world");
    end pak2;

end pak1;


with pak1;
procedure test5 is
begin
   pak1.p2;
end;

$ gnatchop -w p; gnatmake test5
splitting p into:
   pak1.ads
   pak1.adb
   test5.adb
gcc -c test5.adb
gcc -c pak1.adb
gnatbind -x test5.ali
gnatlink test5.ali

Compilation finished at Wed Apr 14 19:08:35

$ ./test5
$

-- 
           Summary: Legal program runs incorrectly (generic package
                    elaboration)
           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
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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