https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106684

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
Many other compilers give similar error messages as gfortran.

Crayftn:

   data c /t(1, (/0., 1., 2., 3./))/
                ^                    
ftn-360 crayftn: ERROR P, File = pr106684.f90, Line = 12, Column = 17 
  The rank of derived type constructor component number 2 does not match the
declared rank.

Cray Fortran : Version 14.0.0
(20220420160222_c98838affc7b58fed2a72f164d77c35e1bc8772f)
Cray Fortran : Compile time:  0.0412 seconds
Cray Fortran : 14 source lines
Cray Fortran : 1 errors, 0 warnings, 0 other messages, 0 ansi
Cray Fortran : "explain ftn-message number" gives more information about each
message.


NAG:

NAG Fortran Compiler Release 7.0(Yurakucho) Build 7009
Warning: pr106684.f90, line 13: Local variable A is initialised but never used
Warning: pr106684.f90, line 13: Local variable C is initialised but never used
Error: pr106684.f90, line 12: Rank 1 value for rank 2 array A
Errors in declarations, no further processing for P
[NAG Fortran Compiler error termination, 1 error, 2 warnings]


Oracle/Sunstudio:

   data c /t(1, (/0., 1., 2., 3./))/
                ^                    
"pr106684.f90", Line = 12, Column = 17: ERROR: The rank of derived type
constructor component "A" does not match the declared rank.


Nvidia gives a warning, but otherwise swallows the code.


As there is pretty good agreement here, and if you likely want portable code,
I'd recommend to adjust your code as Steve suggested.  Don't rely only on
Intel.

Reply via email to