From 24c32a7bb67506b67f09c6ce7a8bc17630c51a61 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 23 Jul 1998 18:31:23 -0600 Subject: [PATCH] dbxout.c (dbxout_range_type): Only call dbxout_type_index for already defined type. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit � * dbxout.c (dbxout_range_type): Only call dbxout_type_index for already defined type. From-SVN: r21357 --- gcc/dbxout.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 9cdcef00474c..5e6f2a9d874e 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -954,8 +954,18 @@ dbxout_range_type (type) were defined to be sub-ranges of int. Unfortunately, this does not allow us to distinguish true sub-ranges from integer types. So, instead we define integer (non-sub-range) types as - sub-ranges of themselves. */ - dbxout_type_index (type); + sub-ranges of themselves. This matters for Chill. If this isn't + a subrange type, then we want to define it in terms of itself. + However, in C, this may be an anonymous integer type, and we don't + want to emit debug info referring to it. Just calling + dbxout_type_index won't work anyways, because the type hasn't been + defined yet. We make this work for both cases by checked to see + whether this is a defined type, referring to it if it is, and using + 'int' otherwise. */ + if (TYPE_SYMTAB_ADDRESS (type) != 0) + dbxout_type_index (type); + else + dbxout_type_index (integer_type_node); } if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST) { -- 2.47.2