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/38205] New: Tranformational function SUM rejected in initialization expressions


The following program fails with:

Error: transformational intrinsic 'sum' at (1) is not permitted in an
initialization expression

I think it is valid Fortran 2003 per "7.1.7 Initialization expression":

"(5) A reference to a transformational standard intrinsic function other than
NULL, where each argument is an initialization expression"

Note: Fortran 95 7.1.7.1 the program is invalid (only few transformational
functions are allowed).

Found by James Van Buskirk:
http://groups.google.com/group/comp.lang.fortran/msg/2119be02dcf93517

integer, parameter :: a = sum([1,2])
print *, a
end


-- 
           Summary: Tranformational function SUM rejected in initialization
                    expressions
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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