summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/sum_zero_array_1.f90
blob: b864bbf71a0f6a1dd37f3445777c4c88f33e4186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
! { dg-do run }
! PR 30321:  This used to segfault.
program xzero
  implicit none
  integer :: ii(1,0)
  logical :: ll(1,0)
  character (len=80) line
  ll = .true.
  write (unit=line, fmt="(I6)") sum(ii,dim=1)
  if (line /= " ") call abort
  write (unit=line, fmt="(I6)") sum(ii,dim=1,mask=ll)
  if (line /= " ") call abort
end program xzero