diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr83424.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr83424.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr83424.c b/gcc/testsuite/gcc.dg/pr83424.c new file mode 100644 index 000000000000..5a304f502923 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr83424.c @@ -0,0 +1,30 @@ +/* PR rtl-optimization/83424 */ +/* { dg-do run { target int128 } } */ +/* { dg-options "-O -fno-tree-ccp -fno-tree-coalesce-vars" } */ + +typedef unsigned char u8; +typedef unsigned int u32; +typedef unsigned __int128 u128; + +u32 a, c; +u8 b; + +static u128 __attribute__ ((noinline, noclone)) +foo (u128 p) +{ + u8 x = ~b; + p &= c; + x *= -p; + x &= a == 0; + x >>= 1; + return p + x; +} + +int +main (void) +{ + u128 x = foo (0); + if (x != 0) + __builtin_abort (); + return 0; +} |