Re: Error or compiler bug?



mecej4 <mecej4@xxxxxxxxx> wrote:
PGI 7.1x says

$ pgf95 -Mallocatable=03 -c tst.f90

What does -Mallocatable=03 do?

"PGF90-S-0134-Illegal attribute - conflict with
allocatable (tst.f90: 4)"
(snip)

real, optional, allocatable :: val(:)
integer, optional, intent(out) :: stat
if(present(val))then
allocate(val(2))
stat=1
else

It looks legal to me: From F2003 12.4.1.6, regarding
optional arguments that are not present:

"If it is allocatable, it shall not be allocated, deallocated,
or supplied as an actual argument corresponding to an optional
nonallocatable dummy argument."

It might be that this is new in Fortran 2003, though.

-- glen
.



Relevant Pages