From gfortran manual:

-fdefault-real-8

Set the default real type to an 8 byte wide type. This option also affects the kind of non-double real constants like 1.0. This option promotes the default width of â€śDOUBLE PRECISIONâ€ť and double real constants like â€ś1.d0â€ť to 16 bytes if possible. If â€ś-fdefault-double-8â€ť is given along with â€śfdefault-real-8â€ť, â€śDOUBLE PRECISIONâ€ť and double real constants are not promoted. Unlike -freal-4-real-8, â€śfdefault-real-8â€ť does not promote variables with explicit kind declarations.

The `REAL`

function seems to output KIND=8 result as well.

Well, this is not quite true. Youâ€™d need it to call an external subprogram which expects double precision argument if the actual parameter is not a double. Unless you mean using `REAL(x,KIND=KIND(1d0))`

instead of `DBLE(x)`