[Bug fortran/40996] New: [F03] ALLOCATABLE scalars
janus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Aug 7 09:14:00 GMT 2009
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
More information about the Gcc-bugs
mailing list