aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20050111-1.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-01-14 11:50:18 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2005-01-14 11:50:18 +0100
commit08a0c536dffd810a5565d149bfd216df684c788e (patch)
treea1913e93e194d26049b54e754c3bab349f78f636 /gcc/testsuite/gcc.dg/20050111-1.c
parenta0afbdb682e3ae83ae087a69f3a975ad23582069 (diff)
downloadgcc-08a0c536dffd810a5565d149bfd216df684c788e.zip
gcc-08a0c536dffd810a5565d149bfd216df684c788e.tar.gz
gcc-08a0c536dffd810a5565d149bfd216df684c788e.tar.bz2
re PR middle-end/19084 (ICE: internal consistency failure)
PR middle-end/19084 PR rtl-optimization/19348 * recog.c (peephole2_optimize): Do global life update if some peephole decides it doesn't need at least one of its inputs and that change influences liveness at the start of the basic block. * basic-block.h (EXECUTE_IF_AND_COMPL_IN_REG_SET): Needs 2 REGSET arguments instead of 1. * gcc.dg/20050111-1.c: New test. * gcc.c-torture/execute/20050111-1.c: New test. From-SVN: r93639
Diffstat (limited to 'gcc/testsuite/gcc.dg/20050111-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20050111-1.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20050111-1.c b/gcc/testsuite/gcc.dg/20050111-1.c
new file mode 100644
index 0000000..0cc4b7e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20050111-1.c
@@ -0,0 +1,24 @@
+/* PR middle-end/19084, rtl-optimization/19348 */
+/* { dg-do compile } */
+/* The following ensures that this test is compiled with -O2, unless
+ on i?86 or x86_64 with -m32 option. */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -march=i686" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2" { target lp64 } } */
+
+unsigned int
+foo (unsigned long long x)
+{
+ unsigned int u;
+
+ if (x == 0)
+ return 0;
+ u = (unsigned int) (x >> 32);
+ return u;
+}
+
+unsigned long long
+bar (unsigned short x)
+{
+ return (unsigned long long) x << 32;
+}