gcc/testsuite/gfortran.dg/coarray_fail_st.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdump-tree-original -fcoarray=lib" } |
| 3 | ! |
| 4 | program fail_statement |
| 5 | implicit none |
| 6 | |
| 7 | integer :: me,np,stat |
| 8 | |
| 9 | me = this_image() |
| 10 | np = num_images() |
| 11 | stat = 0 |
| 12 | |
| 13 | if(me == 1) fail image |
| 14 | |
| 15 | sync all(stat=stat) |
| 16 | |
| 17 | if(stat /= 0) write(*,*) 'Image failed during sync' |
| 18 | |
| 19 | end program fail_statement |
| 20 | |
| 21 | ! { dg-final { scan-tree-dump-times "_gfortran_caf_fail_image \\\(\\\);" 1 "original" } } |