Skip to content

Commit aba0d3c

Browse files
committed
[flang] Intrinsic module file update
Use symbolic iostat values in iso_fortran_env.f90. Add generic names to the interfaces in __fortran_ieee_exceptions.f90.
1 parent 0b266f2 commit aba0d3c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

flang/module/__fortran_ieee_exceptions.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,30 +53,30 @@
5353
#define PRIVATE_R(G) private :: \
5454
G##_a2, G##_a3, G##_a4, G##_a8, G##_a10, G##_a16
5555

56-
interface
56+
interface ieee_get_flag
5757
elemental subroutine ieee_get_flag(flag, flag_value)
5858
import ieee_flag_type
5959
type(ieee_flag_type), intent(in) :: flag
6060
logical, intent(out) :: flag_value
6161
end subroutine ieee_get_flag
6262
end interface
6363

64-
interface
64+
interface ieee_get_halting_mode
6565
elemental subroutine ieee_get_halting_mode(flag, halting)
6666
import ieee_flag_type
6767
type(ieee_flag_type), intent(in) :: flag
6868
logical, intent(out) :: halting
6969
end subroutine ieee_get_halting_mode
7070
end interface
7171

72-
interface
72+
interface ieee_get_modes
7373
subroutine ieee_get_modes(modes)
7474
import ieee_modes_type
7575
type(ieee_modes_type), intent(out) :: modes
7676
end subroutine ieee_get_modes
7777
end interface
7878

79-
interface
79+
interface ieee_get_status
8080
subroutine ieee_get_status(status)
8181
import ieee_status_type
8282
type(ieee_status_type), intent(out) :: status
@@ -109,14 +109,14 @@ end subroutine ieee_set_halting_mode_l##HKIND;
109109
PRIVATE_L(IEEE_SET_HALTING_MODE)
110110
#undef IEEE_SET_HALTING_MODE_L
111111

112-
interface
112+
interface ieee_set_modes
113113
subroutine ieee_set_modes(modes)
114114
import ieee_modes_type
115115
type(ieee_modes_type), intent(in) :: modes
116116
end subroutine ieee_set_modes
117117
end interface
118118

119-
interface
119+
interface ieee_set_status
120120
subroutine ieee_set_status(status)
121121
import ieee_status_type
122122
type(ieee_status_type), intent(in) :: status
@@ -139,7 +139,7 @@ end function ieee_support_flag
139139
PRIVATE_R(IEEE_SUPPORT_FLAG)
140140
#undef IEEE_SUPPORT_FLAG_R
141141

142-
interface
142+
interface ieee_support_halting
143143
pure logical function ieee_support_halting(flag)
144144
import ieee_flag_type
145145
type(ieee_flag_type), intent(in) :: flag

flang/module/iso_fortran_env.f90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ module iso_fortran_env
130130

131131
integer, parameter :: input_unit = 5, output_unit = 6
132132
integer, parameter :: error_unit = 0
133-
integer, parameter :: iostat_end = -1, iostat_eor = -2
134-
integer, parameter :: iostat_inquire_internal_unit = -1
133+
integer, parameter :: iostat_end = FORTRAN_RUNTIME_IOSTAT_END
134+
integer, parameter :: iostat_eor = FORTRAN_RUNTIME_IOSTAT_EOR
135+
integer, parameter :: iostat_inquire_internal_unit = &
136+
FORTRAN_RUNTIME_IOSTAT_INQUIRE_INTERNAL_UNIT
135137

136138
integer, parameter :: character_storage_size = 8
137139
integer, parameter :: file_storage_size = 8

0 commit comments

Comments
 (0)