aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr87147.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr87147.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr87147.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr87147.c b/gcc/testsuite/gcc.dg/torture/pr87147.c
new file mode 100644
index 00000000000..385cfce7201
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr87147.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+short a;
+long b;
+int c, d, g;
+char e, h;
+long f[] = {0};
+int main()
+{
+ int i = 1;
+ for (; a <= 3; a++) {
+ c = 0;
+ for (; c <= 2; c++) {
+ b = 0;
+ for (; b <= 3; b++) {
+ h = i && f[d];
+ e = g && i;
+ i = 0;
+ }
+ }
+ }
+}