summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr58246.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr58246.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58246.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr58246.c b/gcc/testsuite/gcc.dg/torture/pr58246.c
new file mode 100644
index 00000000000..5417abf913d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58246.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a, b;
+
+int main ()
+{
+ int t[2] = {1,1};
+
+ for (a = 0; a < 2; a++)
+ {
+ b ^= t[a];
+ t[a] = t[1] = 0;
+ }
+
+ if (b != 1)
+ abort ();
+
+ return 0;
+}