aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/expr.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7b0adc1..07a7c49 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-04 Steve Ellcey <sje@cup.hp.com>
+
+ * expr.c (convert_modes): Check for legal hard register.
+
2003-03-04 Tom Tromey <tromey@redhat.com>
* doc/sourcebuild.texi (Front End Directory): Document tags.
diff --git a/gcc/expr.c b/gcc/expr.c
index 39940cb..c0119af 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1406,6 +1406,8 @@ convert_modes (mode, oldmode, x, unsignedp)
&& ((GET_CODE (x) == MEM && ! MEM_VOLATILE_P (x)
&& direct_load[(int) mode])
|| (GET_CODE (x) == REG
+ && (! HARD_REGISTER_P (x)
+ || HARD_REGNO_MODE_OK (REGNO (x), mode))
&& TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (GET_MODE (x)))))))))
{