From 06636b3267e8753b7303b68f935a1913d7df8024 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 8 Jan 2014 10:06:09 +0000 Subject: re PR sanitizer/59667 (ubsan: ICE ubsan_type_descriptor) PR sanitizer/59667 * ubsan.c (ubsan_type_descriptor): Call strip_array_types on type2. testsuite/ * c-c++-common/ubsan/pr59667.c: New test. From-SVN: r206423 --- gcc/ubsan.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/ubsan.c') diff --git a/gcc/ubsan.c b/gcc/ubsan.c index 7cc8c18..1841a94 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -311,6 +311,9 @@ ubsan_type_descriptor (tree type, bool want_pointer_type_p) type2 = TYPE_METHOD_BASETYPE (type2); } + /* If an array, get its type. */ + type2 = strip_array_types (type2); + if (TYPE_NAME (type2) != NULL) { if (TREE_CODE (TYPE_NAME (type2)) == IDENTIFIER_NODE) -- cgit v1.1