diff options
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr44858.c')
-rw-r--r-- | SingleSource/Regression/C/gcc-c-torture/execute/pr44858.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr44858.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr44858.c new file mode 100644 index 00000000..45e1758b --- /dev/null +++ b/SingleSource/Regression/C/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; +} |