Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gfortran.dg/open_errors_2.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 1830386684a0 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gfortran.dg/open_errors_2.f90 Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,18 @@ +! { dg-do run } +! { dg-shouldfail "runtime error" } +! { dg-output "At line 13.*File already opened" } + +! PR 65563 - this used to segfault for some versions. + variable_1 = 0 + open(345,iostat=ios, form='unformatted') + read(345, err=37, end=37) variable_1 + close(345) + go to 38 +37 continue +38 continue + open(522, file="fort.345", form='unformatted') + write(522) variable_1 + rewind(522) + close(522) +end program +! { dg-final { remote_file build delete "fort.345" } }