This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Small debug info tweak
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Apr 2008 20:33:43 +0200
- Subject: [Ada] Small debug info tweak
The purpose of the XVS parallel types is documented in exp_dbug.ads, but turns
out to be somewhat vague. It appears that they are not needed if the type
has a fixed size. Hence the attached patch.
Tested on i586-suse-linux, applied on the mainline.
2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (maybe_pad_type): Only generate the XVS parallel type if
the padded type has a variable size.
--
Eric Botcazou
Index: decl.c
===================================================================
--- decl.c (revision 134433)
+++ decl.c (working copy)
@@ -5683,11 +5683,12 @@ maybe_pad_type (tree type, tree size, un
/* Unless debugging information isn't being written for the input type,
write a record that shows what we are a subtype of and also make a
- variable that indicates our size, if variable. */
+ variable that indicates our size, if still variable. */
if (TYPE_NAME (record)
&& AGGREGATE_TYPE_P (type)
- && (TREE_CODE (TYPE_NAME (type)) != TYPE_DECL
- || !DECL_IGNORED_P (TYPE_NAME (type))))
+ && TREE_CODE (orig_size) != INTEGER_CST
+ && !(TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+ && DECL_IGNORED_P (TYPE_NAME (type))))
{
tree marker = make_node (RECORD_TYPE);
tree name = TYPE_NAME (record);