Re: [PATCHv2] gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats

Andrew Burgess
2019-05-21T20:10:33Z

* Tom Tromey <tromey@adacore.com> [2019-05-21 13:05:40 -0400]:

> Andrew> Sorry for breaking this.
>
> Thanks! Don't feel too bad, though, I think the occasional bug like
> this is going to creep in.
>
> Andrew> Or maybe we should be even more restrictive, and only use long double
> Andrew> format if its the correct length, like:
>
> This seems to make the most sense to me, but I don't actually know
> Fortran, so I'm just guessing.

Honestly, I don't know the specifics here either. I suspect the real
answer is that different targets and maybe even different Fortran
compilers could use different formats for 16-byte floats.

The intention with my change was to allow each target to find
something suitable (clearly that didn't quite work). I think falling
back to long double means we're no worse off than we were.

If long double turns out to be wrong for other targets they can always
implement gdbarch_floatformat_for_type like i386 does.

Would you like me to push a fix, or do you want to do it?

Thanks,
Andrew