[RFC] [Ping] Comments on gfortran manual

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Dec 10 21:25:00 GMT 2008


On Wed, Dec 10, 2008 at 10:06:25PM +0100, Dominique Dhumieres wrote:
> Daniel,
> 
> Thanks for the work on the manual. I only browse the patch and the texi is not
> very friendly, but all what I have read so far is an improvement. So I think it
> should be commited before 4.4.0 is released.
> 
> One part that could be extended is the one dealing with -fdefault-*-8 in the
> light of the discussion in the thread -fdefault-integer-8 again!-(. 
> In particular the comments from Steve Karg in http://gcc.gnu.org/ml/fortran/2008-12/msg00012.html:
> 
> These options are dangerous ... if the test
> contains an EQUIVALENCE or COMMON with mixed REAL and INTEGER
> variables, you cannot use -fdefault-real-8 without also using
> -fdefault-integer-8.  There is also an issue with the effect of
> these options on ISO C Binding.

I'm not sure about the C binding portion, but I would be very
cautious.  No one has read through the code to know if any
issue exist.

> 
> Also
> 
>  @opindex @code{fdefault-double-8}
>  Set the @code{DOUBLE PRECISION} type to an 8 byte wide type.
> +@c XXX: Isn't this "always" the case?  Does this affect KIND(1.d0)?
> 

  if (gfc_option.flag_default_real && gfc_option.flag_default_double && saw_r8)
    gfc_default_double_kind = 8;
  else if (gfc_option.flag_default_real && saw_r16)
    gfc_default_double_kind = 16;
  else if (saw_r4 && saw_r8)
    gfc_default_double_kind = 8;

On systems with 128-bit reals (ie REAL(16)), -fdefault-real-8 without 
-fdefault-double-8 will promote double precision to REAL(16).  This
is done to maintain the storage association of REAL and DOUBLE PRECISION.

-- 
Steve



More information about the Fortran mailing list