From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7910 invoked by alias); 11 Sep 2002 16:16:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7842 invoked by uid 71); 11 Sep 2002 16:16:01 -0000 Resent-Date: 11 Sep 2002 16:16:01 -0000 Resent-Message-ID: <20020911161601.7839.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, tim.green@iplbath.com Received: (qmail 2393 invoked by uid 61); 11 Sep 2002 16:08:40 -0000 Message-Id: <20020911160840.2392.qmail@sources.redhat.com> Date: Wed, 11 Sep 2002 09:16:00 -0000 From: tim.green@iplbath.com Reply-To: tim.green@iplbath.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: ada/7890: Instantiation of Generic Granchild Package fails X-SW-Source: 2002-09/txt/msg00190.txt.bz2 List-Id: >Number: 7890 >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:01 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: