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



Tobias Burnus <burnus at gcc dot gnu.org> changed:



           What    |Removed                     |Added

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

                 CC|                            |burnus at gcc dot gnu.org



--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-23 
22:33:24 UTC ---

(In reply to comment #1)

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

> assumed-shape



I think that's a bug in NAG - at least, I cannot find anything in the standard

which prohibits explicit-size or assumed-size polymorphic arrays.





> 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



See PR43366. That's a Fortran 2008 feature. Assignment to a polymorphic LHS

variable is allowed, if and only if it is allocatable; it makes use of the

realloc-on-assignment feature.

Reply via email to