summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr49518.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr49518.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr49518.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr49518.c b/gcc/testsuite/gcc.dg/torture/pr49518.c
new file mode 100644
index 000000000..84a10fbbe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr49518.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+int a, b;
+struct S { unsigned int s, t, u; } c, d = { 0, 1, 0 };
+
+void
+test (unsigned char z)
+{
+ char e[] = {0, 0, 0, 0, 1};
+ for (c.s = 1; c.s; c.s++)
+ {
+ b = e[c.s];
+ if (a)
+ break;
+ b = z >= c.u;
+ if (d.t)
+ break;
+ }
+}