Debian Codegraph @

gcc/testsuite/g++.dg/debug/dwarf2/inline1.C

raw
1 // This isn't really testing dwarf output, but rather that we can inline f
2 // even though the call precedes the definition.
3
4 // { dg-options "-gdwarf-2 -dA -O" }
5 // { dg-final { scan-assembler "DW_TAG_inlined_subroutine" } }
6
7 template <class T>
8 inline T f(T);
9
10 int main()
11 {
12 f(1);
13 }
14
15 int i;
16
17 template <class T>
18 inline T f(T t) { ++i; return t; }