This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: compilation problem: undefined reference
ppanta wrote:
> reference can be easily workaround ...
> ==================================
> ieeer = ieee_handler( "set", "all", %val(2) )
> 1
> Error: Syntax error in argument list at (1)
> In file AAmainRain.F:136
> ieeer = ieee_handler( "set", "inexact", %val(1) )
> 1
> Error: Syntax error in argument list at (1)
> ==================================
>
Using %VAL() one passes the argument as value and not as reference;
while %VAL() is not part of the Fortran standards, several compilers
support it. gfortran supports it since 4.2.x which probably means that
you use an older version of gfortran.
(The standard (Fortran 2003) way of call-by-value is to use the VALUE
attribute, which is supported since GCC/gfortran 4.3.)
For %VAL, see:
http://gcc.gnu.org/onlinedocs/gfortran/Argument-list-functions.html
For 4.2.x and 4.3.x binaries see:
http://gcc.gnu.org/wiki/GFortranBinaries
Tobias