[Bug fortran/16136] New: Conflicting attributes ALLOCATABLE, DUMMY

lei at il dot ibm dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 22 11:01:00 GMT 2004


subroutine foo(x)
integer, allocatable :: x(:)
end

----------------------

integer, allocatable :: x(:)
                        1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)

----------------------

Combining ALLOCATABLE and DUMMY attributes is okay, IMHO.

The Standard says (12.4.1.2, Actual arguments associated with
dummy data objects): "If a dummy argument is allocatable or a 
pointer, the associated actual argument shall be polymorphic 
[etc etc]".  

IBM xlf compiler accepts this, too.

-- 
           Summary: Conflicting attributes ALLOCATABLE, DUMMY
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lei at il dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16136



More information about the Gcc-bugs mailing list