From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24425 invoked by alias); 6 Jun 2004 10:23:58 -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 24410 invoked by uid 48); 6 Jun 2004 10:23:58 -0000 Date: Sun, 06 Jun 2004 10:23:00 -0000 From: "ludovic dot brenta at insalien dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040606102357.15847.ludovic.brenta@insalien.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug ada/15847] New: Legal program rejected, RM 3.10.2(32) X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg00675.txt.bz2 List-Id: -- the compiler apparently is complaining that type T1 is declared outside -- of pak2, in violation of the last sentence of RM 3.10.2(32), -- but T1 is declared by the instantiation new_pak4, which _is_ declared -- inside of pak2. procedure Test_247023 is generic package pak4 is type T1 is access procedure; procedure p1 (Proc: T1); end pak4; package body pak4 is procedure p1 (Proc: T1) is begin null; end; end pak4; generic package pak2 is package new_pak4 is new pak4; end pak2; package body pak2 is procedure p3 is begin null; end p3; begin new_pak4.p1 (p3'Access); --OK end pak2; begin null; end Test_247023; The compiler incorrectly reports: test_247023.adb:33:20: access type must not be outside generic body gnatmake: "test_247023.adb" compilation error -- Summary: Legal program rejected, RM 3.10.2(32) 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 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15847