aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/pr57861.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr57861.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/pr57861.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr57861.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr57861.c
new file mode 100644
index 00000000..138eb617
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr57861.c
@@ -0,0 +1,33 @@
+/* PR rtl-optimization/57861 */
+
+extern void abort (void);
+short a = 1, f;
+int b, c, d, *g = &b, h, i, j;
+unsigned int e;
+
+static int
+foo (char p)
+{
+ int k;
+ for (c = 0; c < 2; c++)
+ {
+ i = (j = 0) || p;
+ k = i * p;
+ if (e < k)
+ {
+ short *l = &f;
+ a = d && h;
+ *l = 0;
+ }
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ *g = foo (a);
+ if (a != 0)
+ abort ();
+ return 0;
+}