From: Jakub Jelinek Date: Thu, 4 Jan 2018 11:44:07 +0000 (+0100) Subject: re PR debug/83666 (ICE: SIGFPE with -O2 -g --param=sccvn-max-scc-size=10) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c54af0682ce0881ecde74a3b7502287a53ced378;p=gcc.git re PR debug/83666 (ICE: SIGFPE with -O2 -g --param=sccvn-max-scc-size=10) PR debug/83666 * cfgexpand.c (expand_dbeug_expr) : Punt if mode is BLKmode and bitpos not zero or mode change is needed. * gcc.dg/pr83666.c: New test. From-SVN: r256232 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 15172f1045d..d932f05d8be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-04 Jakub Jelinek + + PR debug/83666 + * cfgexpand.c (expand_dbeug_expr) : Punt if mode + is BLKmode and bitpos not zero or mode change is needed. + 2018-01-04 Richard Sandiford PR target/83675 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index f278eb26606..72fd8fd5a76 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -4560,7 +4560,7 @@ expand_debug_expr (tree exp) if (maybe_lt (bitpos, 0)) return NULL; - if (GET_MODE (op0) == BLKmode) + if (GET_MODE (op0) == BLKmode || mode == BLKmode) return NULL; poly_int64 bytepos; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3a93d177db6..5a6d4023b21 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-04 Jakub Jelinek + + PR debug/83666 + * gcc.dg/pr83666.c: New test. + 2018-01-04 Uros Bizjak PR target/83628 diff --git a/gcc/testsuite/gcc.dg/pr83666.c b/gcc/testsuite/gcc.dg/pr83666.c new file mode 100644 index 00000000000..f12f13d9833 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr83666.c @@ -0,0 +1,28 @@ +/* PR debug/83666 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -g --param=sccvn-max-scc-size=10 -Wno-psabi" } */ + +typedef int __attribute__ ((vector_size (64))) V; + +int c, d; +short e; +V g; + +V +bar (void) +{ + g[1] = d; + do + { + e += c; + g = g > 0; + } + while (g[1]); + return g; +} + +void +foo (void) +{ + int x = bar ()[3]; +}