[flang-commits] [flang] [flang][runtime] Build ISO_FORTRAN_ENV to export kind arrays as linkable symbols (PR #95388)

Michael Klemm via flang-commits flang-commits at lists.llvm.org
Thu Jun 13 21:23:18 PDT 2024


mjklemm wrote:

> Did you move the definitions because you get an error compiling the full `iso_fortran_env.f90` file? I think we can just wrap the part used during folding in a macro and not include it when we build the object file. 
> 
> 
> 
> This is the part of the module I'm talking about:
> 
> 
> 
> ```
> 
>   intrinsic :: __builtin_numeric_storage_size
> 
>   ! This value depends on any -fdefault-integer-N and -fdefault-real-N
> 
>   ! compiler options that are active when the module file is read.
> 
>   integer, parameter, public :: numeric_storage_size = &
> 
>     __builtin_numeric_storage_size()
> 
> ```

Yes, exactly.  I think we can leave this as is if we feel that moving the compiled part of iso_fortran_env into it's own module file like I did.

Not sure if we would need this for other stuff in the future, but maybe splitting the intrinsic modules into an implementation file and a definitions file might be something to consider going forward.

https://github.com/llvm/llvm-project/pull/95388


More information about the flang-commits mailing list