summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr45570.c
diff options
context:
space:
mode:
authorabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 07:56:47 +0000
committerabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 07:56:47 +0000
commitf1ec9c64a812649f29586e2d481d9bf28caf92c4 (patch)
tree213677380c72865d80aaf935571da2537753eb95 /gcc/testsuite/gcc.dg/pr45570.c
parent0424f393145c966d073c3329a694ba3526c734dc (diff)
downloadgcc-f1ec9c64a812649f29586e2d481d9bf28caf92c4.tar.gz
PR rtl-optimization/45570
* sel-sched-ir.c (cfg_preds_1): When walking out of the region, assert that we are pipelining outer loops. Allow returning zero predecessors. * gcc.dg/pr45570.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165454 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr45570.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr45570.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr45570.c b/gcc/testsuite/gcc.dg/pr45570.c
new file mode 100644
index 00000000000..0b4b3676b9e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr45570.c
@@ -0,0 +1,58 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "O3 -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -ftracer" } */
+void
+parser_get_next_char (char c, int qm, char *p)
+{
+ int quote_mode = 0;
+ for (; *p; p++)
+ {
+ if (qm)
+ {
+ if (quote_mode == 0 && *p == '"' && *(p - 1))
+ {
+ quote_mode = 1;
+ continue;
+ }
+ if (quote_mode && *p == '"' && *(p - 1))
+ quote_mode = 0;
+ }
+ if (quote_mode == 0 && *p == c && *(p - 1))
+ break;
+ }
+}
+
+void
+parser_get_next_parameter (char *p)
+{
+ parser_get_next_char (':', 1, p);
+}
+
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "O3 -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -ftracer" } */
+void
+parser_get_next_char (char c, int qm, char *p)
+{
+ int quote_mode = 0;
+ for (; *p; p++)
+ {
+ if (qm)
+ {
+ if (quote_mode == 0 && *p == '"' && *(p - 1))
+ {
+ quote_mode = 1;
+ continue;
+ }
+ if (quote_mode && *p == '"' && *(p - 1))
+ quote_mode = 0;
+ }
+ if (quote_mode == 0 && *p == c && *(p - 1))
+ break;
+ }
+}
+
+void
+parser_get_next_parameter (char *p)
+{
+ parser_get_next_char (':', 1, p);
+}
+