(digest_init): Compare types using comptypes.
authorPer Bothner <bothner@gcc.gnu.org>
Tue, 14 Sep 1993 23:23:18 +0000 (16:23 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Tue, 14 Sep 1993 23:23:18 +0000 (16:23 -0700)
From-SVN: r5321

gcc/c-typeck.c

index 89767c3f4bd1d63b6b7d3b7d739d305192a8a675..7862221b0d000f8336e9e8dfb45b8c5b2830a14b 100644 (file)
@@ -4943,8 +4943,8 @@ digest_init (type, init, require_constant, constructor_constant)
      from an expression of the same type, optionally with braces.  */
 
   if (inside_init && TREE_TYPE (inside_init) != 0
-      && ((TYPE_MAIN_VARIANT (TREE_TYPE (inside_init))
-          == TYPE_MAIN_VARIANT (type))
+      && (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
+                    TYPE_MAIN_VARIANT (type))
          || (code == ARRAY_TYPE
              && comptypes (TREE_TYPE (inside_init), type))
          || (code == POINTER_TYPE