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