| 1 |
! { dg-do run } |
| 2 |
module iso_fortran_env |
| 3 |
real :: x |
| 4 |
end module iso_fortran_env |
| 5 |
|
| 6 |
subroutine bar |
| 7 |
use , intrinsic :: iso_fortran_env |
| 8 |
implicit none |
| 9 |
|
| 10 |
if (file_storage_size /= 8) STOP 1 |
| 11 |
if (character_storage_size /= 8) STOP 2 |
| 12 |
if (all (numeric_storage_size /= [ 8, 16, 32, 64, 128])) STOP 3 |
| 13 |
if (input_unit /= 5) STOP 4 |
| 14 |
if (output_unit /= 6) STOP 5 |
| 15 |
if (error_unit /= 0) STOP 6 |
| 16 |
if (iostat_end /= -1) STOP 7 |
| 17 |
if (iostat_eor /= -2) STOP 8 |
| 18 |
end |
| 19 |
|
| 20 |
subroutine bar2 |
| 21 |
use , intrinsic :: iso_fortran_env, only : file_storage_size, & |
| 22 |
character_storage_size, numeric_storage_size, input_unit, output_unit, & |
| 23 |
error_unit, iostat_end, iostat_eor |
| 24 |
implicit none |
| 25 |
|
| 26 |
if (file_storage_size /= 8) STOP 9 |
| 27 |
if (character_storage_size /= 8) STOP 10 |
| 28 |
if (all (numeric_storage_size /= [ 8, 16, 32, 64, 128])) STOP 11 |
| 29 |
if (input_unit /= 5) STOP 12 |
| 30 |
if (output_unit /= 6) STOP 13 |
| 31 |
if (error_unit /= 0) STOP 14 |
| 32 |
if (iostat_end /= -1) STOP 15 |
| 33 |
if (iostat_eor /= -2) STOP 16 |
| 34 |
end |
| 35 |
|
| 36 |
program test |
| 37 |
use , intrinsic :: iso_fortran_env, uu => output_unit |
| 38 |
implicit none |
| 39 |
|
| 40 |
if (input_unit /= 5 .or. uu /= 6) STOP 17 |
| 41 |
call bar |
| 42 |
call bar2 |
| 43 |
end |