John Bray schrieb:
> The following code is happy under Nag 90 and Cray f90, but when run with
> Nag f95 V4.0(208) on HP-UX 10 crashes the compiler with
>
> Panic: GenMod_ObsInfo.f90: Cannot find argument
> Internal Error -- please report this bug
> Abort - core dumped
> Warning: f95 GenMod_ObsInfo.f90 compile errors
>
> I know that pointers have changed a bit in F95, so could people confirm
> that this is a valid setup in f95?
>
> Thanks
>
> John
>
> =================================================================================================
>
> MODULE GenMod_ObsInfo
>
> IMPLICIT NONE
>
> CONTAINS
>
> SUBROUTINE Gen_ObsAction( &
> Real1)
>
> IMPLICIT NONE
>
> REAL, POINTER,OPTIONAL :: Real1(:)
>
> DEALLOCATE (Real1)
>
> END SUBROUTINE Gen_ObsAction
>
> END MODULE GenMod_ObsInfo
>
> --
> John Bray, Numerical Weather Prediction Tel: +44 (0) 1344 854035
> Room 337 [log in to unmask]
> The Met. Office http://www.met-office.gov.uk
> London Road, Bracknell, RG12 2SZ, UK http://www.jrbray.org.uk
Of my opinion the problem seems to be in the "optional" argument. If no argument is present, the
pointer-status is undefined...
if ( present(real1) ) deallocate(real1)
Hope that helps
-Dominik-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|