undefined variable problem



I am a bit confused... I have a module with the following
variable:

integer(kind=i4b), dimension(:,:,:), allocatable, private :: a

Within that module, I have a subroutine that tries to access this
variable using a simple print statement:

print *, a

I am quite sure the variable a is allocated, because if i check
it right before the print statement with the ALLOCATED intrinsic,
it appears to be allocated.

However, when i compile and run my code with the NAGWare f95
compiler Release 5.1(282) on Linux, i get the following error:

Reference to undefined variable A
Program terminated by fatal error

With gfortran and g95 i don't get this error.

I have no clue what is going wrong here... what
are the things I should look for? I refuse to believe that this
is a compiler bug... i guess it is more likely that the problem
is at my side, but i cannot think of what could be wrong...

Thanks,
Bart

--
"Share what you know. Learn what you don't."
.



Relevant Pages

  • Re: Weird problem on Lahey lf95 v6.2b
    ... > I've encountered using the Lahey F95 compiler for Linux. ... > Here, ais a double precision array, and ba default real array; ... > print statement, but in the second and third has been truncated down to ... I think this is non standard conforming and ...
    (comp.lang.fortran)
  • Re: undefined variable problem
    ... Bart Vandewoestyne wrote: ... I have a subroutine that tries to access this ... it right before the print statement with the ALLOCATED intrinsic, ... compiler Release 5.1on Linux, ...
    (comp.lang.fortran)
  • Re: undefined variable problem
    ... On 30 mrt, 11:59, Bart Vandewoestyne ... I have a subroutine that tries to access this ... it right before the print statement with the ALLOCATED intrinsic, ... compiler Release 5.1on Linux, ...
    (comp.lang.fortran)
  • Re: unexpected error
    ... If you get an exception during the evaluation of the value you are going ... it will never be assigned which is what the compiler is ... print statement) into the try-block after the assignment. ...
    (comp.lang.java.programmer)
  • Re: DPROD issues
    ... a switch like that typically ... makes a compiler nonstandard in that mode. ... treatment of specific intrinsics is one ... subroutine sub1a ...
    (comp.lang.fortran)