aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr119594.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr119594.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr119594.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr119594.c b/gcc/testsuite/gcc.dg/pr119594.c
new file mode 100644
index 0000000..5d1cb37
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr119594.c
@@ -0,0 +1,32 @@
+/* PR rtl-optimization/119594 */
+/* { dg-do run } */
+/* { dg-options "-Os -fno-dce -fno-tree-dce -fno-tree-dse" } */
+
+int a, b;
+static unsigned c = -1;
+
+void
+foo (int e)
+{
+ a = a ^ e;
+}
+
+void
+bar (long e)
+{
+ foo (e >> 1);
+}
+
+int
+main ()
+{
+ int g[2];
+ for (int h = 0; h < 2; h++)
+ g[h] = -1;
+ for (; b; b++)
+ ;
+ g[1] = 0;
+ bar (c);
+ if (!a)
+ __builtin_abort ();
+}