Jan van Oosterwijk wrote:
>
> Anthony Stone, and others
>
> At 10:59 17-12-99 +0000, you wrote:
> >I would appreciate advice as to whether I have encountered a bug or am
> >doing something wrong.
> > Don't USE
> >statements in the module header make entities in the USEd module
> >visible to the entire module containing the USE statement?
> >
> >I'm using Solaris 2.7. f90 -V gives
> >f90: WorkShop Compilers 5.0 98/12/21 FORTRAN 90 2.0
>
> I transformed your problem into a program, attached to this mail.
I ran Jan's example program on Sun/Solaris with
f90: WorkShop Compilers 5.0 99/07/22 FORTRAN 90 2.0 Patch 107356-03
(a slightly newer version than Anthony's) and got the erroneous result 0.
Adding a "print *,qsize" statement in Sub1 shows the entire array to be 0.
On Linux NAG, NASoftware, Lahey/Fujitsu, Absoft, PGI and PSR all get the right answer.
It looks like a compiler bug to me.
Anthony, you should send Jan's program to your Sun representative as a bug report.
--
William F. Mitchell
Mathematical and Computational Sciences Division
National Institute of Standards and Technology
[log in to unmask] http://math.nist.gov/~mitchell
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|