c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get the length of an array...
authorMark Mitchell <mmitchell@usa.net>
Thu, 16 Apr 1998 00:12:43 +0000 (00:12 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 16 Apr 1998 00:12:43 +0000 (00:12 +0000)
1998-04-15  Mark Mitchell  <mmitchell@usa.net>
* c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get
the length of an array, not TREE_TYPE.

From-SVN: r19233

gcc/ChangeLog
gcc/c-common.c

index 4f562bb..dc13b03 100644 (file)
@@ -1,3 +1,8 @@
+1998-04-15  Mark Mitchell  <mmitchell@usa.net>
+
+       * c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get
+       the length of an array, not TREE_TYPE.
+
 Wed Apr 15 15:31:34 1998  Jeffrey A Law  (law@cygnus.com)
 
        * flow.c (sbitmap_union_of_successors):  New function.
index 616131d..891386d 100644 (file)
@@ -181,7 +181,7 @@ declare_hidden_char_array (name, value)
      or if we want to give warnings for large objects, make a bigger one.  */
   vlen = strlen (value) + 1;
   type = char_array_type_node;
-  if (TREE_INT_CST_LOW (TYPE_MAX_VALUE (TREE_TYPE (type))) < vlen
+  if (TREE_INT_CST_LOW (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < vlen
       || warn_larger_than)
     type = build_array_type (char_type_node,
                             build_index_type (build_int_2 (vlen, 0)));