Issue 84204
Summary [flang] Extension: getenv intrinsic
Labels flang
Assignees
Reporter DavidTruby
    The getcwd intrinsic is an extension provided by some other Fortran compilers (for example [gfortran](https://gcc.gnu.org/onlinedocs/gfortran/GETENV.html)). This extension is used by OpenRadioss.


Arguments:
```
NAME	Shall be of type CHARACTER and of default kind.
VALUE	Shall be of type CHARACTER and of default kind.
```
Return value:
    Stores the value of NAME in VALUE. If VALUE is not large enough to hold the data, it is truncated. If NAME is not set, VALUE will be filled with blanks.
Example:
```
PROGRAM test_getenv
  CHARACTER(len=255) :: homedir
  CALL getenv("HOME", homedir)
  WRITE (*,*) TRIM(homedir)
END PROGRAM
```

This extension seems to be supported by semantics but results in a linker error if used.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to