This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/16075] New: Wrong output from legal program, ordered generic parameter association
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2004 12:47:53 -0000
- Subject: [Bug ada/16075] New: Wrong output from legal program, ordered generic parameter association
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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