aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-12-04 12:18:21 +0100
committerJakub Jelinek <jakub@redhat.com>2020-12-04 12:18:21 +0100
commit704ccefb576dcf30b27a4b9bdacb6e15902f5307 (patch)
tree38b2ffbf0c0075b1911f10d2bb8b7f965adbbf60 /gcc/testsuite
parent65312dfc64744405326a9f4c243f1b4c8f21de1b (diff)
downloadgcc-704ccefb576dcf30b27a4b9bdacb6e15902f5307.zip
gcc-704ccefb576dcf30b27a4b9bdacb6e15902f5307.tar.gz
gcc-704ccefb576dcf30b27a4b9bdacb6e15902f5307.tar.bz2
debug: Fix another vector DECL_MODE ICE [PR98100]
The PR88587 fix changes DECL_MODE of vars with vector type during inlining/cloning when the vars are copied, so that their DECL_MODE matches their TYPE_MODE in the new function. Unfortunately, the following testcase still ICEs, the var isn't really used in the new function and so it isn't copied, but becomes just a nonlocalized var. So we can't adjust its DECL_MODE because it appears in multiple functions and needs different modes in between them. The following patch changes the DEBUG_INSN creation to use TYPE_MODE instead of DECL_MODE for vars with vector types. 2020-12-04 Jakub Jelinek <jakub@redhat.com> PR target/98100 * cfgexpand.c (expand_gimple_basic_block): For vars with vector type, use TYPE_MODE rather than DECL_MODE. * gcc.target/i386/pr98100.c: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98100.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr98100.c b/gcc/testsuite/gcc.target/i386/pr98100.c
new file mode 100644
index 0000000..4deda1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98100.c
@@ -0,0 +1,9 @@
+/* PR target/98100 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-avx -fvar-tracking-assignments -g0" } */
+
+__attribute__((target_clones("default","avx2"))) void
+foo ()
+{
+ __attribute__((__vector_size__(8 * sizeof(int)))) int b = {};
+}