class(*) allocatable does not compile

class(*) allocatable does not compile

Test case attached. pgfortran 12.2 compiles without problems.

AttachmentSize
Downloadapplication/octet-stream test.f90346 bytes
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Your test case isn't legal Fortran.  It runs afoul of 12.5.2.5 par 2: "The actual argument shall be polymorphic if and only if the associated dummy argument is polymorphic, and either both the actual and dummy arguments shall be unlimited polymorphic, or the declared type of the actual argument shall be the same as the declared type of the dummy argument."

Leave a Comment

Please sign in to add a comment. Not a member? Join today