This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40996] New: [F03] ALLOCATABLE scalars
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2009 09:14:25 -0000
- Subject: [Bug fortran/40996] New: [F03] ALLOCATABLE scalars
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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