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/40996] New: [F03] ALLOCATABLE scalars


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


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