Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang] Extension: getcwd intrinsic for OpenRadioss application #84203

Closed
DavidTruby opened this issue Mar 6, 2024 · 1 comment
Closed

[flang] Extension: getcwd intrinsic for OpenRadioss application #84203

DavidTruby opened this issue Mar 6, 2024 · 1 comment
Assignees
Labels
flang Flang issues not falling into any other category

Comments

@DavidTruby
Copy link
Member

The getcwd intrinsic is an extension provided by some other Fortran compilers (for example gfortran). This extension is used by OpenRadioss.

Arguments:

C	The type shall be CHARACTER and of default kind.
STATUS	(Optional) status flag. Returns 0 on success, a system specific and nonzero error code otherwise.

Example:

PROGRAM test_getcwd
  CHARACTER(len=255) :: cwd
  CALL getcwd(cwd)
  WRITE(*,*) TRIM(cwd)
END PROGRAM
@github-actions github-actions bot added the flang Flang issues not falling into any other category label Mar 6, 2024
@DavidTruby
Copy link
Member Author

This extension seems to be supported by semantics but results in a linker error if used

@kiranchandramohan kiranchandramohan changed the title [flang] Extension: getcwd intrinsic [flang] Extension: getcwd intrinsic for OpenRadioss application Mar 7, 2024
@JumpMasterJJ JumpMasterJJ self-assigned this May 16, 2024
JumpMasterJJ added a commit that referenced this issue Jun 6, 2024
…2746)

This patch add support of intrinsics GNU extension GETCWD
#84203. Some usage info and
example has been added to `flang/docs/Intrinsics.md`. The patch contains
both the lowering and the runtime code and works on both Windows and
Linux.


|   System   |   Implmentation  |
|-----------|--------------------|
| Windows | _getcwd               |
| Linux       |getcwd                  |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

3 participants