aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-11-15 11:28:52 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2001-11-15 11:28:52 +0100
commit2b7d71b2b932e9be61b1c1415419e6df630a0165 (patch)
tree5dd2e96887032c78418387f269bc5c8e87b31f65 /gcc/testsuite
parent36a68fe705785961c143e33c0d52aa4d4ef85097 (diff)
downloadgcc-2b7d71b2b932e9be61b1c1415419e6df630a0165.zip
gcc-2b7d71b2b932e9be61b1c1415419e6df630a0165.tar.gz
gcc-2b7d71b2b932e9be61b1c1415419e6df630a0165.tar.bz2
jump.c (squeeze_notes): Return true if no real insns were found.
* jump.c (squeeze_notes): Return true if no real insns were found. * rtl.h (squeeze_notes): Adjust prototype. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): If squeeze_notes finds no real instructions, abort. (merge_blocks_move_successor_nojumps): Likewise. * loop.c (find_and_verify_loops): Likewise. * stmt.c (expand_end_case): Likewise. * ifcvt.c (dead_or_predicable): Return TRUE if squeeze_notes doesn't find any real instructions. * gcc.c-torture/compile/20011114-4.c: New test. From-SVN: r47048
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20011114-4.c38
2 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e544dcc..9c2c4c8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-11-15 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/compile/20011114-4.c: New test.
+
2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/other/init1.C: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20011114-4.c b/gcc/testsuite/gcc.c-torture/compile/20011114-4.c
new file mode 100644
index 0000000..516ef4f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20011114-4.c
@@ -0,0 +1,38 @@
+static inline int foo (long x)
+{
+ register int a = 0;
+ register unsigned b;
+
+ do
+ {
+ b = (x & 0x7f);
+ x = (x >> 7) | ~(-1L >> 7);
+ a += 1;
+ }
+ while ((x != 0 || (b & 0x40) != 0) && (x != -1 || (b & 0x40) == 0));
+ return a;
+}
+
+static inline int bar (unsigned long x)
+{
+ register int a = 0;
+ register unsigned b;
+
+ do
+ {
+ b = (x & 0x7f);
+ x >>= 7;
+ a++;
+ }
+ while (x != 0);
+ return a;
+}
+
+int
+baz (unsigned long x, int y)
+{
+ if (y)
+ return foo ((long) x);
+ else
+ return bar (x);
+}