summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/error_format_2.f90
blob: 19b6298506461e3be7e2c81eab8bff053fc8db6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do run }
! PR68987, this test case failed on a memory double free
program foo
  call s('(foo)')
end program
subroutine s(fmt)
  character (*) :: fmt
  character (1) :: c
  integer :: i
  write (c, fmt, iostat=i) 42
 ! print *, i
  if (i==0) STOP 1
  write (c, fmt, err=100) 42
  STOP 2
100 continue
end subroutine