diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-12 17:06:38 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-12 17:06:38 +0000 |
commit | 5acc9e335016d4ea5300af2d6884b2d489187654 (patch) | |
tree | 51fd6fe31983c5c9dd226dd15ecbc2b15e406a2e /gcc/cfgexpand.c | |
parent | cd08cb3001d2eec02dd61fd5170fe8c9ec759c6b (diff) | |
download | gcc-5acc9e335016d4ea5300af2d6884b2d489187654.tar.gz |
* cfgexpand.c (expand_debug_expr): Avoid sign-extending SImode to
PSImode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 4f103617977..88e48c2a342 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3154,7 +3154,12 @@ expand_debug_expr (tree exp) && GET_MODE (op0) != VOIDmode && GET_MODE (op1) != VOIDmode && GET_MODE (op0) != GET_MODE (op1)) { - if (GET_MODE_BITSIZE (GET_MODE (op0)) < GET_MODE_BITSIZE (GET_MODE (op1))) + if (GET_MODE_BITSIZE (GET_MODE (op0)) < GET_MODE_BITSIZE (GET_MODE (op1)) + /* If OP0 is a partial mode, then we must truncate, even if it has + the same bitsize as OP1 as GCC's representation of partial modes + is opaque. */ + || (GET_MODE_CLASS (GET_MODE (op0)) == MODE_PARTIAL_INT + && GET_MODE_BITSIZE (GET_MODE (op0)) == GET_MODE_BITSIZE (GET_MODE (op1)))) op1 = simplify_gen_unary (TRUNCATE, GET_MODE (op0), op1, GET_MODE (op1)); else |