public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/15609] New: Legal program rejected, generic formal parameter conflicts with declaration
@ 2004-05-23 23:40 ludovic dot brenta at insalien dot org
  2004-05-24  1:17 ` [Bug ada/15609] Valid " pinskia at gcc dot gnu dot org
  2004-07-19 21:48 ` charlet at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: ludovic dot brenta at insalien dot org @ 2004-05-23 23:40 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/15609] Valid program rejected, generic formal parameter conflicts with declaration
  2004-05-23 23:40 [Bug ada/15609] New: Legal program rejected, generic formal parameter conflicts with declaration ludovic dot brenta at insalien dot org
@ 2004-05-24  1:17 ` pinskia at gcc dot gnu dot org
  2004-07-19 21:48 ` charlet at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24  1:17 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
            Summary|Legal program rejected,     |Valid program rejected,
                   |generic formal parameter    |generic formal parameter
                   |conflicts with declaration  |conflicts with declaration


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/15609] Valid program rejected, generic formal parameter conflicts with declaration
  2004-05-23 23:40 [Bug ada/15609] New: Legal program rejected, generic formal parameter conflicts with declaration ludovic dot brenta at insalien dot org
  2004-05-24  1:17 ` [Bug ada/15609] Valid " pinskia at gcc dot gnu dot org
@ 2004-07-19 21:48 ` charlet at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: charlet at gcc dot gnu dot org @ 2004-07-19 21:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From charlet at gcc dot gnu dot org  2004-07-19 21:48 -------
Closing as invalid: GNAT is correct in rejecting this program. The two
foo's are homographs declared in the same declarative region.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-19 21:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-23 23:40 [Bug ada/15609] New: Legal program rejected, generic formal parameter conflicts with declaration ludovic dot brenta at insalien dot org
2004-05-24  1:17 ` [Bug ada/15609] Valid " pinskia at gcc dot gnu dot org
2004-07-19 21:48 ` charlet at gcc dot gnu dot org

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).