From patchwork Tue Aug 10 13:51:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Ada] Fix bad -gnatdt output for incomplete type Date: Tue, 10 Aug 2010 03:51:10 -0000 From: Arnaud Charlet X-Patchwork-Id: 61382 Message-Id: <20100810135110.GA9350@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Robert Dewar 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