diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-14 10:50:18 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-14 10:50:18 +0000 |
commit | ab2bed1346a4d59299ad6cf5528d350de7ac9380 (patch) | |
tree | a1913e93e194d26049b54e754c3bab349f78f636 /gcc/testsuite/gcc.c-torture/execute/20050111-1.c | |
parent | e8da44db5031f41a0a693b3b1a9f9e7d86a2a9c5 (diff) | |
download | gcc-ab2bed1346a4d59299ad6cf5528d350de7ac9380.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93639 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20050111-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20050111-1.c | 39 |
1 files changed, 39 insertions, 0 deletions
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 00000000000..d6089f1bd8d --- /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; +} |