[Bug fortran/16511] Test 19990905-0.f fails with gfortran
toon at moene dot indiv dot nluug dot nl
gcc-bugzilla@gcc.gnu.org
Tue Jul 13 20:37:00 GMT 2004
------- Additional Comments From toon at moene dot indiv dot nluug dot nl 2004-07-13 20:37 -------
Subject: Re: New: Test 19990905-0.f fails with gfortran
billingd at gcc dot gnu dot org wrote:
> g77 test 19990905-0.f fails with gfortran.
>
> The test is
>
> c { dg-do compile }
> * =foo0.f in Burley's g77 test suite.
> subroutine sub(a)
> common /info/ iarray(1000)
> equivalence (m,iarray(100)), (n,iarray(200))
> real a(m,n)
> a(1,1) = a(2,2)
> end
>
> In file /usr/local/src/gcc/gcc/testsuite/gfortran.dg/g77/19990905-0.f:6
>
> real a(m,n)
> 1
> Error: Variable 'm' cannot appear in the expression at (1)
>
> According to Steve Kargl:
>
> Ftnchek says its legal Fortran 77.
That can't be true, because it isn't - my take on it is that ftnchek
simply doesn't recognise the issues.
m is equivalenced to an item in common. That makes `real a(m,n)' a
declaration of an automatic array, which is a Fortran 90 beast (it
didn't exist in Fortran 77)
However, to me it looks like a valid (though complicated) way to define
such a thing.
Hope this helps,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16511
More information about the Gcc-bugs
mailing list