aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr47140.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr47140.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr47140.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr47140.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr47140.c
new file mode 100644
index 000000000..2adf53c20
--- /dev/null
+++ b/gcc-4.9/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);
+}