https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 Manuel López-Ibáñez changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-08-22 Ever confirmed|0 |1 --- Comment #16 from Manuel López-Ibáñez --- Note that we still do not warn for my original testcase. >From gcc-bugs-return-459044-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 22 13:20:37 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 7197 invoked by alias); 22 Aug 2014 13:20:36 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 7182 invoked by uid 48); 22 Aug 2014 13:20:33 -0000 From: "demoonlit at panathenaia dot halfmoon.jp" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/62230] New: Legal program rejected, RM 4.3.2(3, 5/3), ancestor_part can not be expression against error message by compiler itself Date: Fri, 22 Aug 2014 13:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: demoonlit at panathenaia dot halfmoon.jp X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg01541.txt.bz2 Content-length: 1324 https://gcc.gnu.org/bugzilla/show_bug.cgi?idb230 Bug ID: 62230 Summary: Legal program rejected, RM 4.3.2(3, 5/3), ancestor_part can not be expression against error message by compiler itself Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: demoonlit at panathenaia dot halfmoon.jp Created attachment 33380 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3380&actioníit minimal bug triggering source code GNAT rejects any expressions implying aggregate for ancestor_part. For example: (Please see the attachment file, also) type T1 is limited new Ada.Finalization.Limited_Controlled with null record; type T2 is new T1 with null record; X : T2 := (T1 with null record); -- OK Z : T2 := (T1'(Ada.Finalization.Limited_Controlled with null record) with null record); -- ERROR GNAT outputs: main.adb:23:09: limited ancestor part must be aggregate or function call It seems for me that aggregate expression is allowed into ancestor_part according to the error message outputted by GNAT itself. But, it is not. And, RM 4.3.2(3, 5/3) allows it explicitly.