aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2003-03-05 00:12:40 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2003-03-05 00:12:40 +0000
commit006c9f4a1aa780a9fe3442685725cea72d30652f (patch)
tree8becb52cea0cae1f64a564acd78e9dbc76b4906a /gcc/expr.c
parent000d38ea95cb73068021fabf8d3325e3a00aec8d (diff)
downloadgcc-006c9f4a1aa780a9fe3442685725cea72d30652f.zip
gcc-006c9f4a1aa780a9fe3442685725cea72d30652f.tar.gz
gcc-006c9f4a1aa780a9fe3442685725cea72d30652f.tar.bz2
* expr.c (convert_modes): Check for legal hard register.
From-SVN: r63813
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c2
1 files changed, 2 insertions, 0 deletions
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)))))))))
{