This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/15610] Invalid program not detected, generic formal parameter hides declared item
- From: "ludovic at ludovic-brenta dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2008 13:52:24 -0000
- Subject: [Bug ada/15610] Invalid program not detected, generic formal parameter hides declared item
- References: <bug-15610-286@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from ludovic at ludovic-brenta dot org 2008-01-12 13:52 -------
By adding one line to the test case, we can see the bug reappears:
procedure Test_244942 is
function f1 return integer is begin return 1; end f1;
generic
with function foo return integer;
package pak1 is
type color is (foo);
type color2 is (foo); -- this line was added
end pak1;
package new_pak1 is new pak1(f1);
i: integer := new_pak1.foo; -- ERROR: integer vs. color
begin
null;
end Test_244942;
gnatmake test_244942
gcc-4.1 -c test_244942.adb
gnatbind -x test_244942.ali
gnatlink test_244942.ali
gcc-4.2 -c test_244942.adb
gnatbind -x test_244942.ali
gnatlink test_244942.ali
--
ludovic at ludovic-brenta dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Known to fail| |3.4.0 4.1.2 4.2.2
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15610