annotate flang/test/Examples/print-fns-definitions.f90 @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
1 ! Check the Flang Print Function Names example plugin prints and counts function/subroutine definitions
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
2 ! This includes internal and external Function/Subroutines, but not Statement Functions
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
3 ! This requires that the examples are built (FLANG_BUILD_EXAMPLES=ON) to access flangPrintFunctionNames.so
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
4
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
5 ! REQUIRES: plugins, examples, shell
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
6
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
7 ! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
8
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
9 ! CHECK: Function: external_func1
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
10 ! CHECK-NEXT: Function: external_func2
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
11 ! CHECK-NEXT: Subroutine: external_subr
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
12 ! CHECK-NEXT: Function: internal_func
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
13 ! CHECK-NEXT: Subroutine: internal_subr
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
14 ! CHECK-EMPTY:
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
15 ! CHECK-NEXT: ==== Functions: 3 ====
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
16 ! CHECK-NEXT: ==== Subroutines: 2 ====
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
17
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
18 function external_func1()
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
19 end function
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
20
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
21 function external_func2()
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
22 end function
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
23
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
24 subroutine external_subr
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
25 end subroutine
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
26
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
27 program main
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
28 contains
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
29 function internal_func()
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
30 end function
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
31
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
32 subroutine internal_subr
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
33 end subroutine
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
34 end program main