diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr42889.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr42889.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr42889.c b/gcc/testsuite/gcc.dg/pr42889.c new file mode 100644 index 000000000..d3421736d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr42889.c @@ -0,0 +1,13 @@ +/* PR rtl-optimization/42889 */ +/* { dg-do compile } */ +/* { dg-options "-O -fgcse -fcompare-debug" } */ + +extern int A[], B[]; + +int +foo (int x, int c, int i) +{ + if (A[i] && B[i]) + x = x % ((c & 4) ? 8 : 4); + return x; +} |