aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr121194.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr121194.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr121194.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr121194.c b/gcc/testsuite/gcc.dg/torture/pr121194.c
new file mode 100644
index 0000000..20f5ff7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr121194.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+int a, b, c, d;
+void e() {
+ int *f = &b;
+ for (a = 0; a < 8; a++) {
+ *f = 0;
+ for (c = 0; c < 2; c++)
+ *f = *f == 0;
+ }
+}
+int main() {
+ e();
+ int *g = &b;
+ *g = *g == (d == 0);
+ return 0;
+}