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

           Summary: [4.3/4.4/4.5/4.6 Regression] Segfault with SUM of
                    zero-sized array
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bur...@gcc.gnu.org


Reported on IRC. The following program segfaults with gfortran 4.3 to 4.6 but
works with gfortran 4.1:

program p
  real(8) :: empty(0, 3), square(0)
  square = sum(empty * empty, 2)
  print *, "square=", square
end

Reply via email to