===================================================================
@@ -651,7 +651,7 @@ extern machine_mode bitwise_mode_for_mod
/* Return a mode that is suitable for representing a vector,
or BLKmode on failure. */
-extern machine_mode mode_for_vector (machine_mode, unsigned);
+extern machine_mode mode_for_vector (scalar_mode, unsigned);
/* A class for iterating through possible bitfield modes. */
class bit_field_mode_iterator
===================================================================
@@ -478,7 +478,7 @@ bitwise_type_for_mode (machine_mode mode
is no suitable mode. */
machine_mode
-mode_for_vector (machine_mode innermode, unsigned nunits)
+mode_for_vector (scalar_mode innermode, unsigned nunits)
{
machine_mode mode;
===================================================================
@@ -787,6 +787,7 @@ promote_mode (const_tree type ATTRIBUTE_
#ifdef PROMOTE_MODE
enum tree_code code;
int unsignedp;
+ scalar_mode smode;
#endif
/* For libcalls this is invoked without TYPE from the backends
@@ -806,9 +807,11 @@ promote_mode (const_tree type ATTRIBUTE_
{
case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE:
case REAL_TYPE: case OFFSET_TYPE: case FIXED_POINT_TYPE:
- PROMOTE_MODE (mode, unsignedp, type);
+ /* Values of these types always have scalar mode. */
+ smode = as_a <scalar_mode> (mode);
+ PROMOTE_MODE (smode, unsignedp, type);
*punsignedp = unsignedp;
- return mode;
+ return smode;
#ifdef POINTERS_EXTEND_UNSIGNED
case REFERENCE_TYPE:
===================================================================
@@ -1279,11 +1279,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