------- Comment #1 from burnus at gcc dot gnu dot org  2007-11-29 15:08 -------
This is an internal compiler error on invalid code.

        REAL ::X(2,2)=0. 
        DATA (( X(I,J), I=1,2), J=1,2) / 4*0. /

You initialize the variable X twice, which is not allowed according to the
Fortran standard (although some compiler accept it using the default options).
You have to use either:

        REAL :: X(2,2) = 0.0
or
        REAL :: X(2,2)
        DATA (( X(I,J), I=1,2), J=1,2) / 4*0. /

Either of the two versions work here with gfortran 4.1.x, 4.2.x and 4.3.0.

The internal compiler error is fixed in gfortran 4.3.0, which shows the
following error message:


aaa.f90:5.17:
        DATA (( X(I,J), I=1,2), J=1,2) / 4*4. /
                1
aaa.f90:3.23:
        REAL ::X(2,2) =0.
                      2
Error: 'x' at (1) already is initialized at (2)

I therefore close this bug.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME


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

Reply via email to