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

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> 2011-02-26 11:09:41 
UTC ---
(In reply to comment #2)
> (In reply to comment #1)

It appears to be ANY that is not simplified.

program Cindex
   integer,parameter :: sc(3) =  [10,12,17], nc(2) = [10,17]
   logical, parameter :: buf(3) = [(any(sc(i) ==nc), i = 1, 3)]
   print *, buf
end program Cindex

produces:

pr47850.f90:5:0: internal compiler error: in record_reference, at
cgraphbuild.c:60

and the -fdump-tree-original shows that any has not been simplified.

-std=f95 no longer generates the error that it should:

   logical, parameter :: buf(3) = [(any(sc(i) ==nc), i = 1, 3)]
                                    1
Error: transformational intrinsic 'any' at (1) is not permitted in an
initialization expression

Paul

Reply via email to