diff options
-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; +} |