On Tue, 4 Nov 2014, Richard Biener wrote: > c-family/ > * c-common.c (shorten_compare): Do not shorten mixed > DFP and non-DFP compares.
OK. I think it's also wrong for get_narrower to strip conversions between binary and decimal floating point at all, as all such conversions for supported pairs of types can change values. (_Decimal128 can represent all values of __fp16, but no target currently supports both types.) And if flag_signaling_nans (strictly, if HONOR_SNANS (source-mode)), no floating-point conversions should be stripped in get_narrower at all. And even without signaling NaNs, TYPE_PRECISION may not be a reliable indication of whether a conversion is widening - the only issue applying at present might be the corner case that a conversion of a subnormal from __float80 to __float128 is exact but still raises "underflow" if traps on underflow are enabled, but when you have both binary128 and IBM long double supported together then neither has a set of values that is a superset of the other (it seems <https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01086.html> misses get_narrower in the places that need addressing). -- Joseph S. Myers jos...@codesourcery.com