diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/iso_fortran_env_3.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/iso_fortran_env_3.f90 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/iso_fortran_env_3.f90 b/gcc/testsuite/gfortran.dg/iso_fortran_env_3.f90 new file mode 100644 index 000000000..a90315958 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/iso_fortran_env_3.f90 @@ -0,0 +1,29 @@ +! { dg-do run } +subroutine foo1 (x,y) + use iso_fortran_env + integer, intent(out) :: x, y + + x = numeric_storage_size + y = character_storage_size +end + +subroutine foo2 (x,y) + use iso_fortran_env, foo => numeric_storage_size + integer, intent(in) :: x, y + + if (foo /= x .or. character_storage_size /= y) call abort +end + +subroutine foo3 (x,y) + use iso_fortran_env, only : numeric_storage_size, character_storage_size + integer, intent(in) :: x, y + + if (numeric_storage_size /= x .or. character_storage_size /= y) call abort +end + +program test + integer :: x, y + call foo1(x,y) + call foo2(x,y) + call foo3(x,y) +end |