summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr19340.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-08 06:21:51 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-08 06:21:51 +0000
commit8b3fa39e88cb353a5725a4c4d4de5f8a655b1ac1 (patch)
tree166d9955cced43acc0779bd5bba06c8452409cf5 /gcc/testsuite/gcc.dg/pr19340.c
parent842ccd8d89e2698b48c2920ad71faf02804b9b20 (diff)
downloadgcc-8b3fa39e88cb353a5725a4c4d4de5f8a655b1ac1.tar.gz
PR target/19340
* reg-stack.c (reg_to_stack): Update register liveness also for flag_sched2_use_traces. testsuite/ PR target/19340 * gcc.dg/pr19340.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr19340.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr19340.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr19340.c b/gcc/testsuite/gcc.dg/pr19340.c
new file mode 100644
index 00000000000..cac4b0933ee
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr19340.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fschedule-insns2 -fsched2-use-traces" } */
+
+extern double f (double x);
+
+double g (int a)
+{
+ int b, c, d, e = 0;
+ double h;
+
+ for (d = 0; d < a; d++)
+ for (c = 0; c < a; c++)
+ b = 1;
+
+ h = (double) e / (double) a;
+
+ if (h)
+ {
+ h = 1.0 / h;
+ h = f (h);
+ }
+ else
+ h = 1.0;
+
+ return h;
+}