https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110145

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've tried
struct S {
  double value;
  constexpr S(double value) : value (value) {}
};

inline constexpr S s[] = { 1e126 };

int
main ()
{
  __builtin_printf ("%.32La %.32La\n", (long double) s[0].value, (long
double)(double)s[0].value);
  __builtin_printf ("%.32La %.32La\n", 1e126L, (long double)(double)1e126L);
  __builtin_printf ("%.32La\n", (long double) 1e126);
}
and that prints
0xb.d176620a502000000000000000000000p+415
0xb.d176620a502000000000000000000000p+415
0xb.d176620a501fc0000000000000000000p+415
0xb.d176620a502000000000000000000000p+415
0xb.d176620a501fc0000000000000000000p+415
with -m32 -fexcess-precision=standard, which matches my expectations.

Reply via email to