summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-04 11:44:41 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-04 11:44:41 +0000
commit3cfaee7a73b078a34156033bd974f3aab02cc0f2 (patch)
tree287c5b2cb3bf4278623bdb6568ad1d8e4d862b07 /gcc
parent3bdb7a0a0d3e79e1cfd553aee988e42b43531464 (diff)
downloadgcc-3cfaee7a73b078a34156033bd974f3aab02cc0f2.tar.gz
* cse.c (equiv_constant): Fix pasto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cse.c2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/union-4.c23
4 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a887db195e1..49d2b33fdb0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * cse.c (equiv_constant): Fix pasto.
+
2008-12-04 Nick Clifton <nickc@redhat.com>
* config/stormy16/stormy16.md: Remove extraneous spaces and
diff --git a/gcc/cse.c b/gcc/cse.c
index e6ff6308c2a..f52f0a9c93d 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3651,7 +3651,7 @@ equiv_constant (rtx x)
if (REG_P (SUBREG_REG (x))
&& (new_rtx = equiv_constant (SUBREG_REG (x))) != 0)
- return simplify_subreg (GET_MODE (x), SUBREG_REG (x),
+ return simplify_subreg (GET_MODE (x), new_rtx,
GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
return 0;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 37ba7905cc6..e54d5eabefe 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/union-4.c: New test.
+
2008-12-03 H.J. Lu <hongjiu.lu@intel.com>
* g++.old-deja/g++.eh/badalloc1.C: Add the missing "}".
diff --git a/gcc/testsuite/gcc.dg/union-4.c b/gcc/testsuite/gcc.dg/union-4.c
new file mode 100644
index 00000000000..df9f36da09b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/union-4.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-rtl-cse1" } */
+
+extern void abort(void);
+
+typedef unsigned int uint32;
+typedef unsigned long long uint64;
+
+typedef union {
+ uint32 i32;
+ uint64 i64;
+} u64;
+
+void foo(void)
+{
+ u64 data;
+ data.i64 = 1;
+ if (data.i32 != 1)
+ abort ();
+}
+
+/* { dg-final { scan-rtl-dump-not "abort" "cse1" { target i?86-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "cse1" } } */