public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* ada/7889: Instantiation of Generic Granchild Package fails
@ 2002-09-11 9:16 tim.green
0 siblings, 0 replies; 2+ messages in thread
From: tim.green @ 2002-09-11 9:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 7889
>Category: ada
>Synopsis: Instantiation of Generic Granchild Package fails
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Sep 11 09:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Timothy Green
>Release: gcc version 2.8.1
>Organization:
>Environment:
DOS Window running under Win 2000 Pro
>Description:
GNAT will not allow generic grandchild packages to be instantiated.
The following errors are generated:
> gnatmake Run_Gen
gcc -c run_gen.adb
gen_fullexe_short.ada:68:01: instantiation error at gen_fullexe_short.ada:59
gen_fullexe_short.ada:68:01: "GB" not declared in "P_GAI"
gnatmake: "run_gen.adb" compilation error
>How-To-Repeat:
-- Parent
package P is
type PT is new INTEGER;
PINT : PT;
end P;
-- Generic Child
generic
type PGT is digits <>;
package P.GA is
GAX : PGT;
end P.GA;
-- Generic Grand Child
generic
type T is digits <>;
package P.GA.GB is
type R is record
A : T;
B : T;
end record;
procedure F;
X : R;
end P.GA.GB;
package body P.GA.GB is
procedure F is
begin
X.A := 1.0;
X.B := 2.0;
end F;
end P.GA.GB;
-- Instantiation of Parent.Child
with P.GA;
package P_GAI is new P.GA(Float);
-- Instantiation of Parent.Child.Grand_Child
with P.GA.GB;
with P_GAI;
package P_GAI_GBI is new P_GAI.GB(Float);
-- Code to build simple executable
package P.TSP is
VAR1 : Natural;
end P.TSP;
with P.TSP;
package TSP_P renames P.TSP;
generic package P.GA.TSP is
VAR2 : Natural;
end P.GA.TSP;
generic package P.GA.GB.TSP is
VAR3 : Natural;
X : STANDARD.P.GA.GB.R;
end P.GA.GB.TSP;
with P_GAI;
with P.GA.TSP;
package TSP_P_GAI is new STANDARD.P_GAI.TSP;
with P_GAI_GBI;
with P.GA.GB.TSP;
package TSP_P_GAI_GBI is new STANDARD.P_GAI_GBI.TSP;
-- Main procedure
with TSP_P_GAI_GBI;
procedure run_gen is
A : Natural;
begin
A := 1;
end;
>Fix:
Not Known. Compiles OK with Object Ada and GreenHills compiler.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ada/7889: Instantiation of Generic Granchild Package fails
@ 2003-05-12 23:46 Dara Hazeghi
0 siblings, 0 replies; 2+ messages in thread
From: Dara Hazeghi @ 2003-05-12 23:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR ada/7889; it has been noted by GNATS.
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: tim.green@iplbath.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: ada/7889: Instantiation of Generic Granchild Package fails
Date: Mon, 12 May 2003 16:37:22 -0700
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-
trail&database=gcc&pr=7889
Hello,
you are not running an official version of gcc which came with Ada
(that would be 3.1 or later). Still, I can reproduce the behavior in
your report on gcc 3.2, 3.3 branch and mainline (20030511) on
i686-linux.
Dara
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-12 23:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-11 9:16 ada/7889: Instantiation of Generic Granchild Package fails tim.green
2003-05-12 23:46 Dara Hazeghi
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).