aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr118615.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr118615.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr118615.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr118615.c b/gcc/testsuite/gcc.dg/pr118615.c
new file mode 100644
index 0000000..42f0b26
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr118615.c
@@ -0,0 +1,24 @@
+/* PR rtl-optimization/118615 */
+/* { dg-do compile { target scheduling } } */
+/* { dg-options "-O2 -fcompare-debug -fschedule-insns" } */
+
+void foo (void);
+void bar (int);
+void baz (int *);
+int j;
+
+void
+qux (int k, int *m)
+{
+ int n;
+ if (k)
+ {
+ foo ();
+ if (m)
+ {
+ bar (j);
+ baz (m);
+ }
+ }
+ baz (&n);
+}