diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/pr44858.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr44858.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr44858.c b/gcc/testsuite/gcc.c-torture/execute/pr44858.c new file mode 100644 index 000000000..45e1758b0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr44858.c @@ -0,0 +1,28 @@ +/* PR rtl-optimization/44858 */ + +extern void abort (void); +int a = 3; +int b = 1; + +__attribute__((noinline)) long long +foo (int x, int y) +{ + return x / y; +} + +__attribute__((noinline)) int +bar (void) +{ + int c = 2; + c &= foo (1, b) > b; + b = (a != 0) | c; + return c; +} + +int +main (void) +{ + if (bar () != 0 || b != 1) + abort (); + return 0; +} |