| 1 |
! { dg-do run } |
| 2 |
! { dg-options "-fcoarray=lib -lcaf_single -fdump-tree-original" } |
| 3 |
! { dg-additional-options "-latomic" { target libatomic_available } } |
| 4 |
|
| 5 |
program test_image_status_1 |
| 6 |
use iso_fortran_env , only : STAT_STOPPED_IMAGE |
| 7 |
implicit none |
| 8 |
|
| 9 |
if (image_status(1) /= 0) error stop "image_status(1) should not fail" |
| 10 |
if (image_status(42) /= STAT_STOPPED_IMAGE) error stop "image_status(42) should report stopped image" |
| 11 |
|
| 12 |
end program test_image_status_1 |
| 13 |
|
| 14 |
! { dg-final { scan-tree-dump-times "_gfortran_caf_image_status \\\(1, .+\\\)" 1 "original" } } |
| 15 |
! { dg-final { scan-tree-dump-times "_gfortran_caf_image_status \\\(42, .+\\\)" 1 "original" } } |
| 16 |
|
| 17 |
|