From patchwork Tue Aug 10 13:51:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 61382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id DE937B70A6 for ; Tue, 10 Aug 2010 23:51:23 +1000 (EST) Received: (qmail 16611 invoked by alias); 10 Aug 2010 13:51:19 -0000 Received: (qmail 16602 invoked by uid 22791); 10 Aug 2010 13:51:18 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, TW_TD, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Aug 2010 13:51:13 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 0121ECB026E; Tue, 10 Aug 2010 15:51:11 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lxO9XAxnPd+R; Tue, 10 Aug 2010 15:51:10 +0200 (CEST) Received: from saumur.act-europe.fr (saumur.act-europe.fr [10.10.0.183]) by mel.act-europe.fr (Postfix) with ESMTP id E3DC5CB01D6; Tue, 10 Aug 2010 15:51:10 +0200 (CEST) Received: by saumur.act-europe.fr (Postfix, from userid 525) id D2901D9B31; Tue, 10 Aug 2010 15:51:10 +0200 (CEST) Date: Tue, 10 Aug 2010 15:51:10 +0200 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Robert Dewar Subject: [Ada] Fix bad -gnatdt output for incomplete type Message-ID: <20100810135110.GA9350@adacore.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.9i X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The field Primitive_Operations can appear in an incomplete type, in which case it is always Empty. This patch affects only comments and -gnatdt debugging output, so there is no functional effect and no test is required. Tested on x86_64-pc-linux-gnu, committed on trunk 2010-08-10 Robert Dewar * einfo.adb, einfo.ads: Fix bad -gnatdt output for incomplete type. Index: einfo.adb =================================================================== --- einfo.adb (revision 163054) +++ einfo.adb (working copy) @@ -7475,6 +7475,7 @@ package body Einfo is Write_Str ("Storage_Size_Variable"); when Class_Wide_Kind | + Incomplete_Kind | E_Record_Type | E_Record_Subtype | Private_Kind => Index: einfo.ads =================================================================== --- einfo.ads (revision 163054) +++ einfo.ads (working copy) @@ -3188,7 +3188,8 @@ package Einfo is -- is an error to reference the primitive operations field of a type -- that is not tagged). In order to fulfill the C++ ABI, entities of -- primitives that come from source must be stored in this list following --- their order of occurrence in the sources. +-- their order of occurrence in the sources. Also present in incomplete +-- types, but in this case the list is always empty. -- Prival (Node17) -- Present in private components of protected types. Refers to the entity