2 ! RUN: bbc -emit-fir %s --math-runtime=precise -o - | FileCheck -check-prefix=CHECK %s
3 ! RUN: bbc -emit-fir %s --math-runtime=precise -debug-only=flang-lower-intrinsic,flang-lower-expr 2>&1 | FileCheck -check-prefix=CHECK-WARN %s
5 ! CHECK-LABEL: func.func @_QPtest
6 ! CHECK: fir.call @atanh({{[^,]*}}){{.*}}: (i32) -> i32
7 ! CHECK-LABEL: func.func @_QPtest2
8 ! CHECK: %[[ADDR:.*]] = fir.address_of(@atanh) : (i32) -> i32
9 ! CHECK: %[[CAST:.*]] = fir.convert %[[ADDR]] : ((i32) -> i32) -> ((f64) -> f64)
10 ! CHECK: fir.call %[[CAST]]({{[^,]*}}){{.*}}: (f64) -> f64
14 integer function atanh(x
) bind(c
)
26 ! CHECK-LABEL: func.func @_QPtest3
27 ! CHECK: fir.call @asinh({{[^,]*}}){{.*}}: (f64) -> f64
28 ! CHECK-LABEL: func.func @_QPtest4
29 ! CHECK: %[[ADDR:.*]] = fir.address_of(@asinh) : (f64) -> f64
30 ! CHECK: %[[CAST:.*]] = fir.convert %[[ADDR]] : ((f64) -> f64) -> ((i32) -> i32)
31 ! CHECK: fir.call %[[CAST]]({{[^,]*}}){{.*}}: (i32) -> i32
38 integer function asinh(x
) bind(c
)
46 ! CHECK-WARN: warning: loc({{.*}}math-name-conflict.f90{{.*}}): function
47 ! CHECK-WARN-SAME: signature mismatch for 'atanh' may lead to undefined behavior.
48 ! CHECK-WARN: warning: loc({{.*}}math-name-conflict.f90{{.*}}): function
49 ! CHECK-WARN-SAME: name 'asinh' conflicts with a runtime function
50 ! CHECK-WARN-SAME: name used by Flang - this may lead to undefined behavior