aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr53495.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr53495.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr53495.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr53495.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr53495.c
new file mode 100644
index 000000000..957013165
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr53495.c
@@ -0,0 +1,41 @@
+/* PR rtl-optimization/53495 */
+
+int a, b, c, d, e, g;
+static char
+fn1 (char p1, int p2)
+{
+ return p1 || p2 < 0 || p2 >= 1 || 1 >> p2 ? p1 : 0;
+}
+
+static long long fn2 (int *, int);
+static int fn3 ();
+void
+fn4 ()
+{
+ fn3 ();
+ fn2 (&a, d);
+}
+
+long long
+fn2 (int *p1, int p2)
+{
+ int f = -1L;
+ for (; c <= 1; c++)
+ {
+ *p1 = 0;
+ *p1 = fn1 (c, p2 ^ f);
+ }
+ a = 0;
+ e = p2;
+ return 0;
+}
+
+int
+fn3 ()
+{
+ b = 3;
+ for (; b; b--)
+ c++;
+ g = 0 >= c;
+ return 0;
+}