llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Add GNU extensions to flang library

Open hawkinsp opened this issue 4 years ago • 7 comments

A number of GNU extensions to the Fortran standard library are used in practice by various packages.

So far when building a corpus of opensource Fortran code I've noticed the lack of:

  • etime (example user: LAPACK )
  • rshift (example user: AVL )
  • secnds (example user: AVL )
  • getpid(example user: AIRSS )
  • hostnm (example user: AIRSS )

hawkinsp avatar Nov 01 '22 13:11 hawkinsp

@llvm/issue-subscribers-flang-runtime

llvmbot avatar Nov 01 '22 14:11 llvmbot

@llvm/issue-subscribers-flang-ir

llvmbot avatar Nov 01 '22 14:11 llvmbot

ETIME is tracked here: https://github.com/llvm/llvm-project/issues/84205.

mjklemm avatar Apr 25 '24 06:04 mjklemm

hostnm was also implemented in early 2025.

eugeneepshteyn avatar Jul 08 '25 14:07 eugeneepshteyn

Oh, and getpid is also implemented.

eugeneepshteyn avatar Jul 08 '25 14:07 eugeneepshteyn

secnds() is WIP: https://github.com/llvm/llvm-project/pull/151878

eugeneepshteyn avatar Aug 11 '25 13:08 eugeneepshteyn

And rshift() is supported (it's just an alias to standard intrinsic shifta()). So after secnds() is done, this issue could be closed.

eugeneepshteyn avatar Aug 11 '25 13:08 eugeneepshteyn