------- Comment #8 from pinskia at gcc dot gnu dot org  2006-04-04 23:40 -------
From
http://www.sesp.cse.clrc.ac.uk/Publications/felib90_design/design/node6.html
Because of the nature and implementation of optional arguments in Fortran 90/95
the head of most routines has a group of code dealing with optional arguments.
For an optional argument arg1 it takes the form

! Dummy argument
INTEGER, OPTIONAL :: arg1
.......
! Local variables
INTEGER :: larg1
.......
IF (PRESENT(arg1))THEN
larg1 = arg1
ELSE
larg1 = default_arg1
ENDIF

where larg1 is the local variable associated with arg1. It should be note that
arg1 cannot be referenced if it is not present. It may only be reference
through the PRESENT intrinsic. 

So this would be undefined code.


-- 


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

Reply via email to