From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27827 invoked by alias); 23 May 2004 09:40:06 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27817 invoked by uid 48); 23 May 2004 09:40:03 -0000 Date: Sun, 23 May 2004 23:40:00 -0000 From: "ludovic dot brenta at insalien dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040523094001.15609.ludovic.brenta@insalien.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug ada/15609] New: Legal program rejected, generic formal parameter conflicts with declaration X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg02542.txt.bz2 List-Id: with text_io; procedure Test_244941 is function f1 return integer is begin return 1; end f1; function f2 return integer is begin return 2; end f2; generic with function foo return integer; package pak1 is function foo return integer renames f2; end pak1; package new_pak1 is new pak1(f1); begin if new_pak1.foo = 2 then text_io.put_line("passed"); else text_io.put_line("failed"); end if; end Test_244941; test_244941.adb:9:16: "foo" conflicts with declaration at line 7 test_244941.adb:9:35: duplicate body for "foo" declared at line 7 test_244941.adb:14:15: ambiguous expression (cannot resolve "Foo") test_244941.adb:14:15: possible interpretation at line 9, instance at line 12 test_244941.adb:14:15: possible interpretation at line 12 gnatmake: "test_244941.adb" compilation error -- Summary: Legal program rejected, generic formal parameter conflicts with declaration 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=15609