mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:16:37 +00:00

GETUID and GETGID are non-standard intrinsics supported by a number of other Fortran compilers. On supported platforms these intrinsics simply call the POSIX getuid() and getgid() functions and return the result. The only platform we support that does not have these is Windows. Windows does not have the same concept of UIDs and GIDs, so on Windows we issue a warning indicating this and return 1 from both functions. Co-authored-by: Yi Wu <yi.wu2@arm.com>
13 lines
501 B
Fortran
13 lines
501 B
Fortran
! RUN: %if x86_64-registered-target %{ %python %S/test_errors.py %s %flang --target=x86_64-pc-windows-msvc -Werror %}
|
|
! RUN: %if aarch64-registered-target %{ %python %S/test_errors.py %s %flang --target=aarch64-pc-windows-msvc -Werror %}
|
|
|
|
subroutine uid
|
|
!WARNING: User IDs do not exist on Windows. This function will always return 1
|
|
i = getuid()
|
|
end subroutine uid
|
|
|
|
subroutine gid
|
|
!WARNING: Group IDs do not exist on Windows. This function will always return 1
|
|
i = getgid()
|
|
end subroutine gid
|