This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/58857] [OOP] CLASS wrongly rejected in BLOCK DATA


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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I tried compiling the code of comment 0 with different compilers. Result:
* Cray ftn simply compiled it.
* Portland Group's pgf90 rejected it with the bogus:
  PGF90-S-0155-Polymorphic variable must be a pointer, allocatable, or dummy
  object -  zz
* Intel accepted it but warns:
  remark #7784: Symbol in BLOCK DATA program unit is not in a COMMON block.[ZZ]

(I think it would be useful to have a similar warning as ifort, but that's a
different issue.)


>From Fortran 2008 (11.3) for BLOCK DATA:

C1116 (R1120) A block-data specification-part shall contain only definitions of
derived-type definitions and ASYNCHRONOUS, BIND, COMMON, DATA, DIMENSION,
EQUIVALENCE, IMPLICIT, INTRINSIC, PARAMETER, POINTER, SAVE, TARGET, USE,
VOLATILE, and type declaration statements.

C1117 (R1120) A type declaration statement in a block-data specification-part
shall not contain ALLOCATABLE, EXTERNAL, or BIND attribute specifiers.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]