From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28837 invoked by alias); 6 Oct 2011 11:00:15 -0000 Received: (qmail 28823 invoked by uid 22791); 6 Oct 2011 11:00:14 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Oct 2011 10:59:59 +0000 From: "bat at m4tp dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/22164] GNAT rejects matching parameter in generic instantiation as non-matching Date: Thu, 06 Oct 2011 11:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: bat at m4tp dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.4.0 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00312.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22164 baptiste fouques changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bat at m4tp dot org --- Comment #6 from baptiste fouques 2011-10-06 10:58:56 UTC --- seems still present in gcc 4.5.3 it passes OK in most situations, but fails with 2005 extension and match checks. should be re-opened --- generic type Data is range <>; -- would pass with "Type Data is private" or anything even less constraint type Table is array (Positive range <>) of access Data; package Test is end Test; --- with Test; package Test_2 is type My_Data is range 0 .. 16#ff#; type Data_Table is array (Positive range <>) of access My_Data; package Instance is new Test ( Data => My_Data, Table => Data_Table ); end Test_2; --- gcc -c -gnatc -g -gnatq -gnatQ test_2.ads test_2.ads:11:16: component subtype of actual does not match that of formal "Table" test_2.ads:11:16: instantiation abandoned