diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr47140.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr47140.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr47140.c b/gcc/testsuite/gcc.c-torture/compile/pr47140.c new file mode 100644 index 000000000..2adf53c20 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr47140.c @@ -0,0 +1,25 @@ +/* PR tree-optimization/47140 */ + +static inline int +foo (int x, short y) +{ + return y == 0 ? x : x + y; +} + +static inline unsigned short +bar (unsigned short x, unsigned char y) +{ + return x - y; +} + +int w; + +int baz (void); + +int +test (void) +{ + int i; + for (i = 0; i < 50; i++) + w += foo ((unsigned char) (1 + baz ()) >= bar (0, 1), 0); +} |