diff options
author | Daniel Jacobowitz <dan@codesourcery.com> | 2005-11-11 23:23:15 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@gcc.gnu.org> | 2005-11-11 23:23:15 +0000 |
commit | 6c14b137a907a5eda102567d6fac239aec447c8c (patch) | |
tree | f2c1d5283c34ae068914def3e26a1ccec575de71 /gcc/testsuite | |
parent | 44087d555cb9baf64a5a7dde3f46653a971b8e89 (diff) | |
download | gcc-6c14b137a907a5eda102567d6fac239aec447c8c.zip gcc-6c14b137a907a5eda102567d6fac239aec447c8c.tar.gz gcc-6c14b137a907a5eda102567d6fac239aec447c8c.tar.bz2 |
gcc/
* tree-ssa-dse.c (struct address_walk_data, memory_ssa_name_same)
(memory_address_same): New.
(dse_optimize_stmt): Call memory_address_same.
gcc/testsuite/
* gcc.c-torture/execute/20051110-1.c,
gcc.c-torture/execute/20051110-2.c: New tests.
From-SVN: r106807
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20051110-1.c | 31 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20051110-2.c | 39 |
3 files changed, 75 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71698c4..aebb7a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-11-11 Daniel Jacobowitz <dan@codesourcery.com> + + * gcc.c-torture/execute/20051110-1.c, + gcc.c-torture/execute/20051110-2.c: New tests. + 2005-11-12 Hans-Peter Nilsson <hp@axis.com> PR middle-end/24750 diff --git a/gcc/testsuite/gcc.c-torture/execute/20051110-1.c b/gcc/testsuite/gcc.c-torture/execute/20051110-1.c new file mode 100644 index 0000000..9fa3df8 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20051110-1.c @@ -0,0 +1,31 @@ +void add_unwind_adjustsp (long); +void abort (void); + +unsigned char bytes[5]; + +void +add_unwind_adjustsp (long offset) +{ + int n; + unsigned long o; + + o = (long) ((offset - 0x204) >> 2); + + n = 0; + while (o) + { + bytes[n] = o & 0x7f; + o >>= 7; + if (o) + bytes[n] |= 0x80; + n++; + } +} + +int main(void) +{ + add_unwind_adjustsp (4132); + if (bytes[0] != 0x88 || bytes[1] != 0x07) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20051110-2.c b/gcc/testsuite/gcc.c-torture/execute/20051110-2.c new file mode 100644 index 0000000..57bfeeb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20051110-2.c @@ -0,0 +1,39 @@ +void add_unwind_adjustsp (long); +void abort (void); + +unsigned char bytes[5]; + +int flag; + +void +add_unwind_adjustsp (long offset) +{ + int n; + unsigned long o; + + o = (long) ((offset - 0x204) >> 2); + + n = 0; + do + { +a: + bytes[n] = o & 0x7f; + o >>= 7; + if (o) + { + bytes[n] |= 0x80; + if (flag) + goto a; + } + n++; + } + while (o); +} + +int main(void) +{ + add_unwind_adjustsp (4132); + if (bytes[0] != 0x88 || bytes[1] != 0x07) + abort (); + return 0; +} |