[Bug fortran/35951] Unexpected erro "Expected another dimension in array declaration"

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Apr 16 05:06:00 GMT 2008



------- Comment #3 from burnus at gcc dot gnu dot org  2008-04-16 05:05 -------
I think this is wrong:
  real :: z(t%n)
  type (tt) :: t

the order has to be reversed. The following is also invalid (with implicit
none):

  real    :: z(m)
  integer :: m

Most compilers support this, however.

I think gfortran behaves OK; though, one could argue that for consistency also
the first has to be supported or that second one should be diagnosed (only with
-std=, there are too many programs with reversed order).

When I have time, I will search for the quote from the standard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35951



More information about the Gcc-bugs mailing list