0

The ifort compiler describes the flag -r8 as:

   -r8    Makes default real and complex variables  8  bytes  long.  REAL
          declarations are treated as DOUBLE PRECISION (REAL(KIND=8)) and
          COMPLEX  declarations  are  treated  as  DOUBLE  COMPLEX  (COM-
          PLEX(KIND=8)).

Does this mean that only the variables that are declared as real are casted into real*8, or that every real (even, say real*4) is casted into real*8?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Gabriel
  • 113
  • 5
  • 1
    It's never even crossed my mind that the compiler might override an explicit kind declaration, even a non-standard one such as `real*4`. But if the thought did cross my mind I'd code up a little test and find out. Why don't you ? It should only take you 5 minutes or so. – High Performance Mark Feb 11 '14 at 21:21
  • 1
    Yep, it took me 5 minutes to test. – High Performance Mark Feb 11 '14 at 21:27

1 Answers1

0

The manual clearly states the flag is about default real and complex variables. Real*4 declarations are often made for a reason and the compiler should not change these when the default kind is changed.