OSDN Git Service

(output_init_element): Fix backward test in last change.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Aug 1993 23:39:46 +0000 (23:39 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Aug 1993 23:39:46 +0000 (23:39 +0000)
Use TYPE_MAIN_VARIANT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5093 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index ec9d44e..3fff379 100644 (file)
@@ -5736,7 +5736,8 @@ output_init_element (value, type, field, pending)
 
   if (TREE_CODE (TREE_TYPE (value)) == FUNCTION_TYPE
       || (TREE_CODE (TREE_TYPE (value)) == ARRAY_TYPE
-         && comptypes (TREE_TYPE (value), type)))
+         && !comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (value)),
+                        TYPE_MAIN_VARIANT (type))))
     value = default_conversion (value);
 
   if (value == error_mark_node)