aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
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
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')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20050111-1.c39
-rw-r--r--gcc/testsuite/gcc.dg/20050111-1.c24
3 files changed, 68 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6d60691..2d14c7d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2005-01-14 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/19084
+ PR rtl-optimization/19348
+ * gcc.dg/20050111-1.c: New test.
+ * gcc.c-torture/execute/20050111-1.c: New test.
+
* gcc.dg/i386-asm-4.c: New test.
2005-01-14 Eric Botcazou <ebotcazou@libertysurf.fr>
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050111-1.c b/gcc/testsuite/gcc.c-torture/execute/20050111-1.c
new file mode 100644
index 0000000..d6089f1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20050111-1.c
@@ -0,0 +1,39 @@
+/* PR middle-end/19084, rtl-optimization/19348 */
+
+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;
+}
+
+extern void abort (void);
+
+int
+main (void)
+{
+ if (sizeof (long long) != 8)
+ return 0;
+
+ if (foo (0) != 0)
+ abort ();
+ if (foo (0xffffffffULL) != 0)
+ abort ();
+ if (foo (0x25ff00ff00ULL) != 0x25)
+ abort ();
+ if (bar (0) != 0)
+ abort ();
+ if (bar (0x25) != 0x2500000000ULL)
+ abort ();
+ return 0;
+}
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;
+}