brintos

brintos / llvm-project-archived public Read only

0
0
Text · 673 B · 5e56654 Raw
28 lines · plain
1! Test that the expanded macros have the location information2! RUN: %flang_fc1 -mmlir --mlir-print-debuginfo -emit-fir -o - %s | FileCheck %s3 4#define CMD(fname) fname()5 6subroutine foo()7end subroutine8 9subroutine test()10  ! CHECK: fir.call @_QPfoo() fastmath<contract> : () -> () loc(#[[CALL_LOC:.*]])11  call CMD(foo)12end subroutine13 14#define IVAR i15 16integer function ifoo()17  ifoo = 018end function19 20subroutine test2()21  integer :: i22  ! CHECK: fir.call @_QPifoo(){{.*}} loc(#[[IFOO_CALL_LOC:.*]])23  IVAR = ifoo()24end subroutine25 26! CHECK: #[[CALL_LOC]] = loc("{{.*}}macro-debug-file-loc.f90":11:3)27! CHECK: #[[IFOO_CALL_LOC]] = loc("{{.*}}macro-debug-file-loc.f90":23:3)28