[Bug middle-end/83858] [8 Regression] error: invalid cast from type 'poly_uint16' to type 'long long int'
danglin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 15 15:39:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83858
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> ---
In varasm.ii, we have
inline __attribute__ ((always_inline)) poly_uint16
GET_MODE_SIZE (machine_mode mode)
{
return mode_to_bytes (mode);
}
template<typename T>
inline __attribute__ ((always_inline)) typename if_poly<typename
T::measurement_type>::type
GET_MODE_SIZE (const T &mode)
{
return mode_to_bytes (mode);
}
template<typename T>
inline __attribute__ ((always_inline)) typename if_nonpoly<typename
T::measurement_type>::type
GET_MODE_SIZE (const T &mode)
{
return mode_to_bytes (mode).coeffs[0];
}
In machmode.h, we have
#if ONLY_FIXED_SIZE_MODES
#define GET_MODE_SIZE(MODE) ((unsigned short) mode_to_bytes (MODE).coeffs[0])
#else
ALWAYS_INLINE poly_uint16
GET_MODE_SIZE (machine_mode mode)
{
return mode_to_bytes (mode);
}
template<typename T>
ALWAYS_INLINE typename if_poly<typename T::measurement_type>::type
GET_MODE_SIZE (const T &mode)
{
return mode_to_bytes (mode);
}
template<typename T>
ALWAYS_INLINE typename if_nonpoly<typename T::measurement_type>::type
GET_MODE_SIZE (const T &mode)
{
return mode_to_bytes (mode).coeffs[0];
}
#endif
and
/* Always treat machine modes as fixed-size while compiling code specific
to targets that have no variable-size modes. */
#if defined (IN_TARGET_CODE) && NUM_POLY_INT_COEFFS == 1
#define ONLY_FIXED_SIZE_MODES 1
#else
#define ONLY_FIXED_SIZE_MODES 0
#endif
NUM_POLY_INT_COEFFS is defined to 1 in insn-modes.h, so IN_TARGET_CODE
must not be defined.
More information about the Gcc-bugs
mailing list