// Excess precision tests. Verify excess precision doesn't affect // actual types. // { dg-do compile { target c++11 } } // { dg-options "-mfpmath=387 -fexcess-precision=standard" } namespace std { template struct integral_constant { static constexpr T value = v; }; typedef integral_constant false_type; typedef integral_constant true_type; template struct is_same : std::false_type {}; template struct is_same : std::true_type {}; } float f; double d; void test_types (void) { #define CHECK_FLOAT(E) static_assert (std::is_same ::value, "") #define CHECK_DOUBLE(E) static_assert (std::is_same ::value, "") CHECK_FLOAT (f + f); CHECK_DOUBLE (d + d); CHECK_FLOAT (f * f / f); CHECK_DOUBLE (d * d / d); CHECK_FLOAT (f ? f - f : f); CHECK_DOUBLE (d ? d - d : d); }