From 4d65300e6b4b414751fa23ccc58cee2d6e39ae99 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 20 Oct 1993 03:29:25 +0000 Subject: [PATCH] (digest_init): For arrays, use comptypes to compare types instead of comparing pointers. From-SVN: r5818 --- gcc/c-typeck.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index cea82f3a97b..54cb60ce5d7 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -4463,7 +4463,8 @@ digest_init (type, init, require_constant, constructor_constant) || typ1 == signed_wchar_type_node) && ((inside_init && TREE_CODE (inside_init) == STRING_CST))) { - if (TREE_TYPE (inside_init) == type) + if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)), + TYPE_MAIN_VARIANT (type))) return inside_init; if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (inside_init))) -- 2.30.2