aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-02-04 16:14:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-02-04 16:14:17 +0000
commitb0f19292d253b8e885073eb6c93900834c5d59d5 (patch)
tree62abbc57a1c4b242541685a0dfbe8d84c3d91f62 /gcc
parentf7eb48b53d60654016df906c0793913f40633a81 (diff)
downloadgcc-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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dse.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr42952.c19
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.
diff --git a/gcc/dse.c b/gcc/dse.c
index e72b998..239d0fb 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -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;
+}