From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12520 invoked by alias); 30 Nov 2008 14:51:19 -0000 Received: (qmail 12312 invoked by uid 48); 30 Nov 2008 14:49:57 -0000 Date: Sun, 30 Nov 2008 14:51:00 -0000 Subject: [Bug ada/38330] New: Illegal program not detected, RM 4.3.1(16/2) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ludovic at ludovic-brenta dot org" 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: 2008-11/txt/msg02640.txt.bz2 generic type T1 is tagged private; package pak1 is type T2 is new T1 with record i,j: integer; end record; x1: T2 := T2'(2,3); -- ERROR: x2: T2 := T2'(T1 with 2,3); -- OK end pak1; The declaration of x1 is illegal because the record_aggregate does not include all components of x1, violating 4.3.1(16/2). In this particular case, since the components inherited from T1 are unknown, the only legal kind of aggregate is a record_extension_aggregate, as done for x2. The compiler accepts this illegal program. -- Summary: Illegal program not detected, RM 4.3.1(16/2) Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ludovic at ludovic-brenta dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38330