diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/coarray_image_status_1.f08')
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray_image_status_1.f08 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/coarray_image_status_1.f08 b/gcc/testsuite/gfortran.dg/coarray_image_status_1.f08 new file mode 100644 index 00000000000..1062c60f759 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_image_status_1.f08 @@ -0,0 +1,16 @@ +! { dg-do run } +! { dg-options "-fcoarray=lib -lcaf_single -fdump-tree-original" } + +program test_image_status_1 + use iso_fortran_env , only : STAT_STOPPED_IMAGE + implicit none + + if (image_status(1) /= 0) error stop "image_status(1) should not fail" + if (image_status(42) /= STAT_STOPPED_IMAGE) error stop "image_status(42) should report stopped image" + +end program test_image_status_1 + +! { dg-final { scan-tree-dump-times "_gfortran_caf_image_status \\\(1, .+\\\)" 1 "original" } } +! { dg-final { scan-tree-dump-times "_gfortran_caf_image_status \\\(42, .+\\\)" 1 "original" } } + + |