diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-12-16 18:14:30 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-12-16 18:14:30 +0100 |
commit | 9712cba0068a0afe871a49c455d104efcb8260a0 (patch) | |
tree | de478140bbdd4bf6281015cd3100d7c793239653 /gcc/cfgexpand.c | |
parent | 8f2cbdcac708467b11b9c8d5405a18bd1a8f3ba3 (diff) | |
download | gcc-9712cba0068a0afe871a49c455d104efcb8260a0.zip gcc-9712cba0068a0afe871a49c455d104efcb8260a0.tar.gz gcc-9712cba0068a0afe871a49c455d104efcb8260a0.tar.bz2 |
re PR debug/46893 (ICE: in trunc_int_for_mode, at explow.c:56 with -O -g)
PR debug/46893
* cfgexpand.c (expand_debug_expr): If GET_MODE (op0) is VOIDmode,
use TYPE_MODE (TREE_TYPE (tem)) instead of mode1.
* gcc.dg/pr46893.c: New test.
From-SVN: r167949
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 6cc5d01..a3940d0 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2703,7 +2703,7 @@ expand_debug_expr (tree exp) enum machine_mode opmode = GET_MODE (op0); if (opmode == VOIDmode) - opmode = mode1; + opmode = TYPE_MODE (TREE_TYPE (tem)); /* This condition may hold if we're expanding the address right past the end of an array that turned out not to @@ -2724,7 +2724,8 @@ expand_debug_expr (tree exp) ? SIGN_EXTRACT : ZERO_EXTRACT, mode, GET_MODE (op0) != VOIDmode - ? GET_MODE (op0) : mode1, + ? GET_MODE (op0) + : TYPE_MODE (TREE_TYPE (tem)), op0, GEN_INT (bitsize), GEN_INT (bitpos)); } |