re PR rtl-optimization/81020 (wrong code with -O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp)

PR rtl-optimization/81020
	* gcc.dg/pr81020.c: New test.

From-SVN: r255193
This commit is contained in:
Jakub Jelinek 2017-11-28 11:22:31 +01:00 committed by Jakub Jelinek
parent 9e851845f6
commit 3c88da0dd4
2 changed files with 26 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2017-11-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/81020
* gcc.dg/pr81020.c: New test.
PR tree-optimization/80788
* gcc.dg/pr80788.c: New test.

View File

@ -0,0 +1,23 @@
/* PR rtl-optimization/81020 */
/* { dg-do run } */
/* { dg-options "-O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp" } */
unsigned v = 4;
unsigned long long __attribute__((noipa))
foo (unsigned x)
{
unsigned a = v;
a &= 1;
x |= 0 < a;
a >>= 31;
return x + a;
}
int
main ()
{
if (foo (2) != 2)
__builtin_abort ();
return 0;
}