aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr122502.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr122502.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr122502.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr122502.c b/gcc/testsuite/gcc.dg/torture/pr122502.c
new file mode 100644
index 0000000..5e2cb2e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122502.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+short int *ts;
+
+void
+c2 (unsigned long long int s4, int ns)
+{
+ short int *b2 = (short int *)&ns;
+
+ while (ns != 0)
+ {
+ int xn;
+
+ for (xn = 0; xn < 3; ++xn)
+ for (*b2 = 0; *b2 < 2; ++*b2)
+ s4 += xn;
+ if (s4 != 0)
+ b2 = ts;
+ ++ns;
+ }
+}