summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/sum_zero_array_1.f90
blob: ec128d5cddfac32e6f63719fe216ca6e1b546208 (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 /= " ") STOP 1
  write (unit=line, fmt="(I6)") sum(ii,dim=1,mask=ll)
  if (line /= " ") STOP 2
end program xzero