xref: /llvm-project/flang/test/Examples/print-fns-interfaces.f90 (revision 1c5d12144058b4cfc3028401e8a16df933ff4dc6)
1! Check the Flang Print Function Names example plugin doesn't count/print Functions/Subroutines in interfaces
2! (It should only count definitions, which will appear elsewhere for interfaced functions/subroutines)
3! This requires that the examples are built (LLVM_BUILD_EXAMPLES=ON) to access flangPrintFunctionNames.so
4
5! REQUIRES: plugins, examples, shell
6
7! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
8
9! CHECK: ==== Functions: 0 ====
10! CHECK-NEXT: ==== Subroutines: 0 ====
11
12program main
13    interface
14        function interface_func()
15        end function
16
17        subroutine interface_subr()
18        end subroutine
19    end interface
20end program main
21