public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/16075] New: Wrong output from legal program, ordered generic parameter association
@ 2004-06-19 12:47 ludovic dot brenta at insalien dot org
  2004-06-19 16:40 ` [Bug ada/16075] " pinskia at gcc dot gnu dot org
  2004-10-29 17:20 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 6+ messages in thread
From: ludovic dot brenta at insalien dot org @ 2004-06-19 12:47 UTC (permalink / raw)
  To: gcc-bugs

with text_io;
procedure Test_247569 is
   generic
   package pak1 is
      type T1 is null record;
   end pak1;

   generic
      with package A is new pak1(<>);
      with package B is new pak1(<>);
   package pak2 is
      procedure p1(x: B.T1);
      procedure p1(x: A.T1);
   end pak2;

   package body pak2 is

      procedure p1(x: B.T1) is
      begin
         text_io.put_line("failed: wrong p1 called");
      end p1;

      procedure p1(x: A.T1) is
      begin
         text_io.put_line("passed");
      end p1;

      x: A.T1;
   begin
      p1(x);
   end pak2;

   package new_pak1 is new pak1;
   package new_pak2 is new pak2(new_pak1, new_pak1);

begin
   null;
end Test_247569;


Instead of printing "passed", the program prints: "failed: wrong p1 called".

-- 
           Summary: Wrong output from legal program, ordered generic
                    parameter association
           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=16075


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-16075-286@http.gcc.gnu.org/bugzilla/>]
[parent not found: <bug-16075-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-02-27 14:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-19 12:47 [Bug ada/16075] New: Wrong output from legal program, ordered generic parameter association ludovic dot brenta at insalien dot org
2004-06-19 16:40 ` [Bug ada/16075] " pinskia at gcc dot gnu dot org
2004-10-29 17:20 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16075-286@http.gcc.gnu.org/bugzilla/>
2007-12-13 14:17 ` sam at gcc dot gnu dot org
     [not found] <bug-16075-4@http.gcc.gnu.org/bugzilla/>
2011-08-31 10:37 ` nicolas.boulenguez at free dot fr
2014-02-27 14:38 ` nicolas.boulenguez at free dot fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).