From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4330 invoked by alias); 29 Oct 2013 23:06:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4295 invoked by uid 48); 29 Oct 2013 23:06:45 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58857] [OOP] CLASS wrongly rejected in BLOCK DATA Date: Tue, 29 Oct 2013 23:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg02102.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58857 --- Comment #1 from Tobias Burnus --- 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.