aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2021-09-02 20:59:04 +0000
committerAndrew Pinski <apinski@marvell.com>2021-09-03 16:56:33 +0000
commit6b69bf5729852d0510abbe8e04078ddecef0cf17 (patch)
treea84648eed0cfb2ff2e136e23ffb3acaeee82d834 /gcc
parent98f1dd0212d57659d1234914791f51ca9f3aba89 (diff)
downloadgcc-6b69bf5729852d0510abbe8e04078ddecef0cf17.zip
gcc-6b69bf5729852d0510abbe8e04078ddecef0cf17.tar.gz
gcc-6b69bf5729852d0510abbe8e04078ddecef0cf17.tar.bz2
Fix target/102173 ICE after error recovery
After the recent r12-3278-823685221de986a change, the testcase gcc.target/aarch64/sve/acle/general-c/type_redef_1.c started to ICE as the code was not ready for error_mark_node in the type. This fixes that and the testcase now passes. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (register_vector_type): Handle error_mark_node as the type of the type_decl.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/aarch64/aarch64-sve-builtins.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc
index f71b287..bc92213 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins.cc
@@ -3416,6 +3416,7 @@ register_vector_type (vector_type_index type)
installing an incorrect type. */
if (decl
&& TREE_CODE (decl) == TYPE_DECL
+ && TREE_TYPE (decl) != error_mark_node
&& TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == vectype)
vectype = TREE_TYPE (decl);
acle_vector_types[0][type] = vectype;