[flang-commits] [PATCH] D129575: [flang] Intrinsic module file update

vdonaldson via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jul 12 09:42:37 PDT 2022


vdonaldson created this revision.
vdonaldson added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
vdonaldson requested review of this revision.

Use symbolic iostat values in iso_fortran_env.f90.
Add generic names to the interfaces in __fortran_ieee_exceptions.f90.


https://reviews.llvm.org/D129575

Files:
  flang/module/__fortran_ieee_exceptions.f90
  flang/module/iso_fortran_env.f90


Index: flang/module/iso_fortran_env.f90
===================================================================
--- flang/module/iso_fortran_env.f90
+++ flang/module/iso_fortran_env.f90
@@ -130,8 +130,10 @@
 
   integer, parameter :: input_unit = 5, output_unit = 6
   integer, parameter :: error_unit = 0
-  integer, parameter :: iostat_end = -1, iostat_eor = -2
-  integer, parameter :: iostat_inquire_internal_unit = -1
+  integer, parameter :: iostat_end = FORTRAN_RUNTIME_IOSTAT_END
+  integer, parameter :: iostat_eor = FORTRAN_RUNTIME_IOSTAT_EOR
+  integer, parameter :: iostat_inquire_internal_unit = &
+                          FORTRAN_RUNTIME_IOSTAT_INQUIRE_INTERNAL_UNIT
 
   integer, parameter :: character_storage_size = 8
   integer, parameter :: file_storage_size = 8
Index: flang/module/__fortran_ieee_exceptions.f90
===================================================================
--- flang/module/__fortran_ieee_exceptions.f90
+++ flang/module/__fortran_ieee_exceptions.f90
@@ -53,7 +53,7 @@
 #define PRIVATE_R(G) private :: \
   G##_a2, G##_a3, G##_a4, G##_a8, G##_a10, G##_a16
 
-  interface
+  interface ieee_get_flag
     elemental subroutine ieee_get_flag(flag, flag_value)
       import ieee_flag_type
       type(ieee_flag_type), intent(in) :: flag
@@ -61,7 +61,7 @@
     end subroutine ieee_get_flag
   end interface
 
-  interface
+  interface ieee_get_halting_mode
     elemental subroutine ieee_get_halting_mode(flag, halting)
       import ieee_flag_type
       type(ieee_flag_type), intent(in) :: flag
@@ -69,14 +69,14 @@
     end subroutine ieee_get_halting_mode
   end interface
 
-  interface
+  interface ieee_get_modes
     subroutine ieee_get_modes(modes)
       import ieee_modes_type
       type(ieee_modes_type), intent(out) :: modes
     end subroutine ieee_get_modes
   end interface
 
-  interface
+  interface ieee_get_status
     subroutine ieee_get_status(status)
       import ieee_status_type
       type(ieee_status_type), intent(out) :: status
@@ -109,14 +109,14 @@
   PRIVATE_L(IEEE_SET_HALTING_MODE)
 #undef IEEE_SET_HALTING_MODE_L
 
-  interface
+  interface ieee_set_modes
     subroutine ieee_set_modes(modes)
       import ieee_modes_type
       type(ieee_modes_type), intent(in) :: modes
     end subroutine ieee_set_modes
   end interface
   
-  interface
+  interface ieee_set_status
     subroutine ieee_set_status(status)
       import ieee_status_type
       type(ieee_status_type), intent(in) :: status
@@ -139,7 +139,7 @@
   PRIVATE_R(IEEE_SUPPORT_FLAG)
 #undef IEEE_SUPPORT_FLAG_R
 
-  interface
+  interface ieee_support_halting
     pure logical function ieee_support_halting(flag)
       import ieee_flag_type
       type(ieee_flag_type), intent(in) :: flag


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129575.443992.patch
Type: text/x-patch
Size: 2726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220712/c5d852bd/attachment.bin>


More information about the flang-commits mailing list