I found that bug while reducing PR29391, so it might be related (but I doubt
it).

$ cat a6.f90 
  integer,parameter :: i(1,1) = 0

  write(*,*) lbound(any(i==1,2)), ubound(any(i==1,2))
  write(*,*) lbound(count(i==1,2)), ubound(count(i==1,2))
  write(*,*) lbound(matmul(i,i))
end
$ gfortran a6.f90 && ./a.out
Operating system error: Cannot allocate memory
Memory allocation failed

If I remove the line with matmul, I get another error:

$ gfortran a6.f90 && ./a.out
           0           1
           0           1
zsh: segmentation fault  ./a.out


-- 
           Summary: ANY and COUNT used on parameter arrays
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


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

Reply via email to