From: Jakub Jelinek Date: Thu, 5 Apr 2018 18:35:16 +0000 (+0200) Subject: re PR middle-end/85195 (ICE: verify_gimple failed: non-trivial conversion at assignme... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c1da8ea3e05208b006b1fb926a02fed7df05e5f;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be9c255a4b6..c9c538b716b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-05 Jakub Jelinek + + 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 PR target/85193 diff --git a/gcc/match.pd b/gcc/match.pd index 7c4c11c4ef7..02753c0f85c 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 *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 1acfe0c89ea..d6a9738a177 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-04-05 Jakub Jelinek + + PR middle-end/85195 + * gcc.dg/pr85195.c: New test. + 2018-04-05 Paolo Carlini PR c++/80956 diff --git a/gcc/testsuite/gcc.dg/pr85195.c b/gcc/testsuite/gcc.dg/pr85195.c new file mode 100644 index 00000000000..0cc696ba6ee --- /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; +}