summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr100810.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr100810.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr100810.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr100810.c b/gcc/testsuite/gcc.dg/torture/pr100810.c
new file mode 100644
index 00000000000..63566f530f7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr100810.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+
+int a, b = 1, c = 1, e, f = 1, g, h, j;
+volatile int d;
+static void k()
+{
+ int i;
+ h = b;
+ if (c && a >= 0) {
+ while (a) {
+ i++;
+ h--;
+ }
+ if (g)
+ for (h = 0; h < 2; h++)
+ ;
+ if (!b)
+ i &&d;
+ }
+}
+static void l()
+{
+ for (; j < 1; j++)
+ if (!e && c && f)
+ k();
+}
+int main()
+{
+ if (f)
+ l();
+ if (h != 1)
+ __builtin_abort();
+ return 0;
+}