aboutsummaryrefslogtreecommitdiff
path: root/gcc/sdbout.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/sdbout.c')
-rw-r--r--gcc/sdbout.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 8fcb977..acd25a3 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -1281,11 +1281,15 @@ sdbout_parms (tree parms)
the parm with the variable's declared type, and adjust
the address if the least significant bytes (which we are
using) are not the first ones. */
+ scalar_mode from_mode, to_mode;
if (BYTES_BIG_ENDIAN
- && TREE_TYPE (parms) != DECL_ARG_TYPE (parms))
- current_sym_value +=
- (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms)))
- - GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))));
+ && TREE_TYPE (parms) != DECL_ARG_TYPE (parms)
+ && is_a <scalar_mode> (TYPE_MODE (DECL_ARG_TYPE (parms)),
+ &from_mode)
+ && is_a <scalar_mode> (GET_MODE (DECL_RTL (parms)),
+ &to_mode))
+ current_sym_value += (GET_MODE_SIZE (from_mode)
+ - GET_MODE_SIZE (to_mode));
if (MEM_P (DECL_RTL (parms))
&& GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS