brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 0e20f63 Raw
51 lines · plain
1! REQUIRES: asserts2! RUN: bbc -emit-fir %s --math-runtime=precise -o - | FileCheck -check-prefix=CHECK %s3! RUN: bbc -emit-fir %s --math-runtime=precise -debug-only=flang-lower-intrinsic,flang-lower-expr 2>&1 | FileCheck -check-prefix=CHECK-WARN %s4 5! CHECK-LABEL: func.func @_QPtest6! CHECK: fir.call @atanh({{[^,]*}}){{.*}}: (i32) -> i327! CHECK-LABEL: func.func @_QPtest28! CHECK: %[[ADDR:.*]] = fir.address_of(@atanh) : (i32) -> i329! CHECK: %[[CAST:.*]] = fir.convert %[[ADDR]] : ((i32) -> i32) -> ((f64) -> f64)10! CHECK: fir.call %[[CAST]]({{[^,]*}}){{.*}}: (f64) -> f6411 12subroutine test(x)13  interface14     integer function atanh(x) bind(c)15       integer,Value :: x16     end function atanh17  end interface18  integer :: x19  print *,atanh(x)20end subroutine test21subroutine test2(x)22  real(8) :: x23  print *,atanh(x)24end subroutine test225 26! CHECK-LABEL: func.func @_QPtest327! CHECK: fir.call @asinh({{[^,]*}}){{.*}}: (f64) -> f6428! CHECK-LABEL: func.func @_QPtest429! CHECK: %[[ADDR:.*]] = fir.address_of(@asinh) : (f64) -> f6430! CHECK: %[[CAST:.*]] = fir.convert %[[ADDR]] : ((f64) -> f64) -> ((i32) -> i32)31! CHECK: fir.call %[[CAST]]({{[^,]*}}){{.*}}: (i32) -> i3232subroutine test3(x)33  real(8) :: x34  print *,asinh(x)35end subroutine test336subroutine test4(x)37  interface38     integer function asinh(x) bind(c)39       integer,Value :: x40     end function asinh41  end interface42  integer :: x43  print *,asinh(x)44end subroutine test445 46! CHECK-WARN:      warning: loc({{.*}}math-name-conflict.f90{{.*}}): function47! CHECK-WARN-SAME: signature mismatch for 'atanh' may lead to undefined behavior.48! CHECK-WARN:      warning: loc({{.*}}math-name-conflict.f90{{.*}}): function49! CHECK-WARN-SAME: name 'asinh' conflicts with a runtime function50! CHECK-WARN-SAME: name used by Flang - this may lead to undefined behavior51