aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr45059.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr45059.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr45059.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr45059.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr45059.c
new file mode 100644
index 000000000..3f13cdbf8
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr45059.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/45059 */
+
+typedef unsigned int T;
+extern void foo (signed char *, int);
+
+static signed char a;
+static T b[1] = { -1 };
+static unsigned char c;
+
+static inline short int
+bar (short v)
+{
+ c |= a < b[0];
+ return 0;
+}
+
+int
+main ()
+{
+ signed char *e = &a;
+ foo (e, bar (bar (c)));
+ return 0;
+}