http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56503



kargl at gcc dot gnu.org changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |RESOLVED

                 CC|                            |kargl at gcc dot gnu.org

         Resolution|                            |INVALID



--- Comment #1 from kargl at gcc dot gnu.org 2013-03-01 21:57:07 UTC ---

(In reply to comment #0)

> Hi!

> 

> I compile the little program beneath with 

> 'gfortran -fdefault-integer-8 -fdefault-real-8' command.

> 

> I get:

> 'call t1 ( dble(r4))

>           1

> Error: Type mismatch in argument 'r' at (1); passed REAL(16) to REAL(8) '

> 

> Since r4 is a single precision variable the dble should make a real*8 of it,

> or?



The error message says 'r' not 'r4'.  The 'r' here comes from

the explicit interface for t1, which has a declaration of 

real*8.  So, if you read the documentation that comes with

your compiler, you see that 'r' has been promoted to real*16.





`-fdefault-double-8'

     Set the `DOUBLE PRECISION' type to an 8 byte wide type.  If

     `-fdefault-real-8' is given, `DOUBLE PRECISION' would instead be

     promoted to 16 bytes if possible, and `-fdefault-double-8' can be

     used to prevent this.



You probably meant to use -freal-4-real-8.  I recommend using none 

of these options and actually writing properly ported code.

Reply via email to