aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1998-07-23 19:14:18 +0000
committerJim Wilson <wilson@gcc.gnu.org>1998-07-23 12:14:18 -0700
commit28144186b341d4c23ee61518064a59ea7ae965ea (patch)
tree1880f2548ab9da08dd584396d2d12378613e8369
parent136dc16a52166cff22037db7282e7c5e4093450f (diff)
downloadgcc-28144186b341d4c23ee61518064a59ea7ae965ea.zip
gcc-28144186b341d4c23ee61518064a59ea7ae965ea.tar.gz
gcc-28144186b341d4c23ee61518064a59ea7ae965ea.tar.bz2
Fix stabs bug with C array ranges.
* dbxout.c (dbxout_range_type): Only call dbxout_type_index for already defined type. From-SVN: r21355
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dbxout.c14
2 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f3e1fcc..97b5457 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul 23 18:53:20 1998 Jim Wilson <wilson@cygnus.com>
+
+ * dbxout.c (dbxout_range_type): Only call dbxout_type_index for
+ already defined type.
+
Thu Jul 23 13:49:41 1998 Jeffrey A Law (law@cygnus.com)
* expr.c (check_max_integer_computation_mode): Allow conversions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 9cdcef0..5e6f2a9 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)
{