Debian Codegraph @

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

raw
1 // { dg-additional-options "-dA -std=gnu++17 -gdwarf-4 -O1 -fdebug-types-section" }
2 // reject .pseudo label, but "label" is ok.
3 // { dg-final { scan-assembler-not "\[^\"\]_ZN3Foo4mfunEv" } }
4 // undefined ref to _ZN3Foo4mfunEv
5
6 struct Foo {
7 void mfun () {}
8 };
9
10 struct A { static constexpr bool Value = false; };
11
12 template <bool> struct B { typedef int Type; };
13
14 class Arg
15 {
16 template <typename Unused> struct Local : A {};
17
18 public:
19 template <typename Init, typename = typename B<Local<Init>::Value>::Type>
20 Arg (Init) {}
21 };
22
23 class Lambda {
24 static constexpr int Unused = 0;
25
26 public:
27 Lambda (Arg);
28 };
29
30 // Generated ref to Foo::mfun in the type die of an instantiation of this
31 template <void (Foo::*unused)()> struct Callable {};
32
33 class I {
34 I() : lamb ([this] {}) {}
35
36 Lambda lamb;
37
38 Callable<&Foo::mfun> bm;
39 };