diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-04-05 20:35:16 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-04-05 20:35:16 +0200 |
commit | 4c1da8ea3e05208b006b1fb926a02fed7df05e5f (patch) | |
tree | 7f3b51a1d5a4bdc0f107dde56957182a8fc16cb9 | |
parent | 520a02b6fa643372b076ebaa6a6a10dc3cc7cb46 (diff) | |
download | gcc-4c1da8ea3e05208b006b1fb926a02fed7df05e5f.zip gcc-4c1da8ea3e05208b006b1fb926a02fed7df05e5f.tar.gz gcc-4c1da8ea3e05208b006b1fb926a02fed7df05e5f.tar.bz2 |
re PR middle-end/85195 (ICE: verify_gimple failed: non-trivial conversion at assignment with -O -fno-tree-ccp --param=sccvn-max-scc-size=10)
PR middle-end/85195
* match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
CONSTRUCTOR_ELT (ctor, ...)->value.
* gcc.dg/pr85195.c: New test.
From-SVN: r259149
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/match.pd | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr85195.c | 19 |
4 files changed, 32 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be9c255..c9c538b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-05 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/85195 + * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around + CONSTRUCTOR_ELT (ctor, ...)->value. + 2018-04-05 Uros Bizjak <ubizjak@gmail.com> PR target/85193 diff --git a/gcc/match.pd b/gcc/match.pd index 7c4c11c..02753c0 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -4650,7 +4650,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) { build_constructor (type, NULL); } (if (count == 1) (if (elt < CONSTRUCTOR_NELTS (ctor)) - { CONSTRUCTOR_ELT (ctor, elt)->value; } + (view_convert { CONSTRUCTOR_ELT (ctor, elt)->value; }) { build_zero_cst (type); }) { vec<constructor_elt, va_gc> *vals; @@ -4668,7 +4668,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (if (CONSTRUCTOR_NELTS (ctor) <= idx / const_k) { build_zero_cst (type); }) (if (n == const_k) - { CONSTRUCTOR_ELT (ctor, idx / const_k)->value; }) + (view_convert { CONSTRUCTOR_ELT (ctor, idx / const_k)->value; })) (BIT_FIELD_REF { CONSTRUCTOR_ELT (ctor, idx / const_k)->value; } @1 { bitsize_int ((idx % const_k) * width); }))))))))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1acfe0c..d6a9738 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-04-05 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/85195 + * gcc.dg/pr85195.c: New test. + 2018-04-05 Paolo Carlini <paolo.carlini@oracle.com> PR c++/80956 diff --git a/gcc/testsuite/gcc.dg/pr85195.c b/gcc/testsuite/gcc.dg/pr85195.c new file mode 100644 index 0000000..0cc696b --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr85195.c @@ -0,0 +1,19 @@ +/* PR middle-end/85195 */ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-Wno-psabi -O -fno-tree-ccp --param=sccvn-max-scc-size=10" } */ + +typedef __int128 V __attribute__ ((vector_size (16))); + +extern int bar (V); + +V v; +int i; + +V +foo (void) +{ + do + v *= bar (v & i); + while ((V){}[0]); + return v; +} |