re PR fortran/83548 (Compilation Error using logical function in parameter)
[official-gcc.git] / gcc / testsuite / gfortran.dg / error_format_2.f90
blob421da9a0261eba05efafc8489a0b25fc3512387e
1 ! { dg-do run }
2 ! PR68987, this test case failed on a memory double free
3 program foo
4 call s('(foo)')
5 end program
6 subroutine s(fmt)
7 character (*) :: fmt
8 character (1) :: c
9 integer :: i
10 write (c, fmt, iostat=i) 42
11 ! print *, i
12 if (i==0) call abort()
13 write (c, fmt, err=100) 42
14 call abort()
15 100 continue
16 end subroutine