comparison gcc/testsuite/gfortran.dg/open_errors_2.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900 (2017-10-27)
parents
children 1830386684a0
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 ! { dg-do run }
2 ! { dg-shouldfail "runtime error" }
3 ! { dg-output "At line 13.*File already opened" }
4
5 ! PR 65563 - this used to segfault for some versions.
6 variable_1 = 0
7 open(345,iostat=ios, form='unformatted')
8 read(345, err=37, end=37) variable_1
9 close(345)
10 go to 38
11 37 continue
12 38 continue
13 open(522, file="fort.345", form='unformatted')
14 write(522) variable_1
15 rewind(522)
16 close(522)
17 end program
18 ! { dg-final { remote_file build delete "fort.345" } }