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



Harald Anlauf <anlauf at gmx dot de> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |anlauf at gmx dot de



--- Comment #1 from Harald Anlauf <anlauf at gmx dot de> 2012-12-23 22:17:25 
UTC ---

The code is rejected by nagfor:



NAG Fortran Compiler Release 5.3.1(907)

Error: pr46991.f90, line 16: CLASS array A must be a pointer, allocatable or

assumed-shape

Errors in declarations, no further processing for SUB1

Error: pr46991.f90, line 34: CLASS array A must be a pointer, allocatable or

assumed-shape



Changing from assumed size to assumed shape, however, make the

code compilable.



The code modified this way still does not compile with current trunk:



         A = [ (REC2(I, I+1), I = 1, 10) ]

         1

Error: Variable must not be polymorphic in intrinsic assignment at (1) - check

that there is a matching specific subroutine for '=' operator



It is funny to see that ifort 13 generates a similar message:



pr46991.f90(38): error #6197: An assignment of different structure types is

invalid.

         A = [ (REC2(I, I+1), I = 1, 10) ]

----------------^

pr46991.f90(38): error #8304: In an intrinsic assignment statement, variable

shall not be polymorphic.   [A]

         A = [ (REC2(I, I+1), I = 1, 10) ]

---------^

Reply via email to