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

--- Comment #18 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #11)
> As far as I can say, the targets with this problem are: avr, bfin, h8300,
> picochip and sh (for some subtargets of sh).
> 
> On avr, bfin, h8300 and picochip, we're doomed anyway because there is no
> double-sized type at all. On sh, we could use long double math calls.
> 
> I'm making this into an enhancement; it will probably be very painful,
> because most of the front-end assumes FLOAT_TYPE_SIZE == 32 and
> DOUBLE_TYPE_SIZE == 64.

At least for AVR, the situation changed with v10, see
https://gcc.gnu.org/gcc-10/changes.html#avr
https://gcc.gnu.org/install/configure.html#avr

In order to keep v10 compatible with older versions of avr-gcc, double still
defaults to 32 bits, though.  To get 64-bit double, you'll have to configure
using --with-double=64 (or use --with-double=64,32 so you can which to 32-bit
double with -mdouble=32 at compile-time).

The default for this option is --with-double=32,64; hence what's also possible
is to use default configuraton, but provide -mdouble=64 for every translation
unit.

FYI, the 64-bit double support is provided by LibF7, which is a part of
avr-libgcc.  For details and shortcomings, see
https://gcc.gnu.org/wiki/avr-gcc#Libf7
https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgcc/config/avr/libf7

Reply via email to