Files
clang-p2996/flang/test/Driver/compiler-options.f90
Leandro Lupori 9edcf7a28e [flang][driver] Add support for -isysroot in the frontend (#77365)
If DEFAULT_SYSROOT is not specfied when building flang, then the
-isysroot flag is needed to link binaries against system libraries
on Darwin. It's also needed when linking against a non-default
sysroot.
2024-01-11 10:37:58 -03:00

14 lines
664 B
Fortran

! RUN: %flang -S -emit-llvm -flang-deprecated-no-hlfir -o - %s | FileCheck %s
! Test communication of COMPILER_OPTIONS from flang-new to flang-new -fc1.
! CHECK: [[OPTSVAR:@_QQclX[0-9a-f]+]] = {{[a-z]+}} constant [[[OPTSLEN:[0-9]+]] x i8] c"{{.*}}flang-new{{(\.exe)?}} {{.*}}-S -emit-llvm -flang-deprecated-no-hlfir -o - {{.*}}compiler-options.f90"
program main
use ISO_FORTRAN_ENV, only: compiler_options
implicit none
character (len = :), allocatable :: v
! CHECK: call void @llvm.memmove.p0.p0.i64(ptr %{{[0-9]+}}, ptr [[OPTSVAR]], i64 [[OPTSLEN]], i1 false)
v = compiler_options()
print *, v
deallocate(v)
close(1)
end program main