public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/48039] New: Legal program rejected, a formal function is not visible in generic
@ 2011-03-09 9:19 demoonlit at panathenaia dot halfmoon.jp
2014-11-10 13:01 ` [Bug ada/48039] " fxcoudert at gcc dot gnu.org
2015-09-01 23:39 ` demoonlit at panathenaia dot halfmoon.jp
0 siblings, 2 replies; 3+ messages in thread
From: demoonlit at panathenaia dot halfmoon.jp @ 2011-03-09 9:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48039
Summary: Legal program rejected, a formal function is not
visible in generic
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: demoonlit@panathenaia.halfmoon.jp
Created attachment 23589
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23589
minimal bug triggering source code
Name lookup is abnormal in complex generic code with gcc-4.5.1/4.5.2.
-- p.ads
package p is
end p;
-- p-gh.ads
generic
function p.gh return Integer;
-- p-gh.adb
function p.gh return Integer is
begin
return 0;
end p.gh;
-- p-gu.ads
generic
package p.gu is
generic
with function h return Integer is <>;
-- with function fh return Integer is <>; -- ok
function gh return Integer;
end p.gu;
-- p-gu.adb
package body p.gu is
function gh return Integer is
begin
return h; -- error !!
-- return fh; -- ok
end gh;
end p.gu;
-- p-h.ads
with p.gh;
function p.h is new gh;
-- p-u.ads
with p.gu;
package p.u is new gu;
-- p-r.ads
with p.u;
package p.r is
end p.r;
-- p-r-h.ads
with p.h;
function p.r.h is new u.gh (h);
% gnatmake p-r-h.ads
gcc -c p-r-h.ads
p-r-h.ads:4:01: instantiation error at p-gu.adb:6
p-r-h.ads:4:01: "h" is not visible
p-r-h.ads:4:01: instantiation error at p-gu.adb:6
p-r-h.ads:4:01: non-visible declaration at line 4
p-r-h.ads:4:01: instantiation error at p-gu.adb:6
p-r-h.ads:4:01: non-visible declaration at p-h.ads:4
gnatmake: "p-r-h.ads" compilation error
This code will be compiled If we rename formal function h to another name (for
example, fh).
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/48039] Legal program rejected, a formal function is not visible in generic
2011-03-09 9:19 [Bug ada/48039] New: Legal program rejected, a formal function is not visible in generic demoonlit at panathenaia dot halfmoon.jp
@ 2014-11-10 13:01 ` fxcoudert at gcc dot gnu.org
2015-09-01 23:39 ` demoonlit at panathenaia dot halfmoon.jp
1 sibling, 0 replies; 3+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-10 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48039
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|i686-apple-darwin9 |
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-11-10
CC| |fxcoudert at gcc dot gnu.org
Host|i686-apple-darwin9 |
Ever confirmed|0 |1
Known to fail| |5.0
Build|i686-apple-darwin9 |
--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Confirmed with trunk on x86_64-linux.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/48039] Legal program rejected, a formal function is not visible in generic
2011-03-09 9:19 [Bug ada/48039] New: Legal program rejected, a formal function is not visible in generic demoonlit at panathenaia dot halfmoon.jp
2014-11-10 13:01 ` [Bug ada/48039] " fxcoudert at gcc dot gnu.org
@ 2015-09-01 23:39 ` demoonlit at panathenaia dot halfmoon.jp
1 sibling, 0 replies; 3+ messages in thread
From: demoonlit at panathenaia dot halfmoon.jp @ 2015-09-01 23:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48039
yuta tomino <demoonlit at panathenaia dot halfmoon.jp> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.5.2 |6.0
Known to fail| |4.5.2
--- Comment #2 from yuta tomino <demoonlit at panathenaia dot halfmoon.jp> ---
It has appeared on 6.0.0-20150823.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-01 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 9:19 [Bug ada/48039] New: Legal program rejected, a formal function is not visible in generic demoonlit at panathenaia dot halfmoon.jp
2014-11-10 13:01 ` [Bug ada/48039] " fxcoudert at gcc dot gnu.org
2015-09-01 23:39 ` demoonlit at panathenaia dot halfmoon.jp
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).