From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8165 invoked by alias); 7 Aug 2009 09:14:37 -0000 Received: (qmail 7987 invoked by uid 48); 7 Aug 2009 09:14:25 -0000 Date: Fri, 07 Aug 2009 09:14:00 -0000 Subject: [Bug fortran/40996] New: [F03] ALLOCATABLE scalars X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janus at gcc dot gnu dot org" 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 X-SW-Source: 2009-08/txt/msg00697.txt.bz2 The ALLOCATABLE attribute was only allowed for arrays in F95, but F03 also allows allocatable scalars (which will be useful for polymorphism). Simple example: real, allocatable :: scalar allocate(scalar) scalar = exp(1.) print *,scalar deallocate(scalar) end With current trunk you get: as.f90:1.27: real, allocatable :: scalar 1 Error: Scalar object 'scalar' at (1) may not be ALLOCATABLE as.f90:2.9: allocate(scalar) 1 Error: Array specification required in ALLOCATE statement at (1) -- Summary: [F03] ALLOCATABLE scalars Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40996