diff options
author | Richard Guenther <rguenther@suse.de> | 2010-02-04 16:14:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-02-04 16:14:17 +0000 |
commit | b0f19292d253b8e885073eb6c93900834c5d59d5 (patch) | |
tree | 62abbc57a1c4b242541685a0dfbe8d84c3d91f62 | |
parent | f7eb48b53d60654016df906c0793913f40633a81 (diff) | |
download | gcc-b0f19292d253b8e885073eb6c93900834c5d59d5.zip gcc-b0f19292d253b8e885073eb6c93900834c5d59d5.tar.gz gcc-b0f19292d253b8e885073eb6c93900834c5d59d5.tar.bz2 |
re PR rtl-optimization/42952 (possible integer wrong code bug)
2010-02-04 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/42952
* dse.c (const_or_frame_p): Remove MEM handling.
* gcc.dg/torture/pr42952.c: New testcase.
From-SVN: r156494
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/dse.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr42952.c | 19 |
4 files changed, 29 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 072261e..35a10e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-02-04 Richard Guenther <rguenther@suse.de> + + PR rtl-optimization/42952 + * dse.c (const_or_frame_p): Remove MEM handling. + 2010-02-04 Nick Clifton <nickc@redhat.com> * config/mn10300/mn10300.c (TARGET_ASM_OUTPUT_MI_THUNK): Define. @@ -1015,9 +1015,6 @@ const_or_frame_p (rtx x) { switch (GET_CODE (x)) { - case MEM: - return MEM_READONLY_P (x); - case CONST: case CONST_INT: case CONST_DOUBLE: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0e84ff6..4a4273e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-02-04 Richard Guenther <rguenther@suse.de> + + PR rtl-optimization/42952 + * gcc.dg/torture/pr42952.c: New testcase. + 2010-02-03 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/42901 diff --git a/gcc/testsuite/gcc.dg/torture/pr42952.c b/gcc/testsuite/gcc.dg/torture/pr42952.c new file mode 100644 index 0000000..db8782a --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr42952.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-fno-tree-ccp -fno-tree-fre" } */ + +extern void abort (void); + +static int g[1]; + +static int * const p = &g[0]; +static int * const q = &g[0]; + +int main(void) +{ + g[0] = 1; + *p = 0; + *p = *q; + if (g[0] != 0) + abort (); + return 0; +} |