1 // Origin: PR 44641 2 // { dg-do compile } 3 // { dg-options "-g -O0 -dA" } 4 5 template <class A> struct MisplacedDbg; 6 template<class T> struct MisplacedDbg<T*>; 7 struct Full; 8 template<> struct MisplacedDbg<Full>; 9 10 struct Arg; 11 typedef MisplacedDbg<Arg> Typedef1; 12 typedef MisplacedDbg<Arg*> Typedef2; 13 typedef MisplacedDbg<Full> Typedef3; 14 15 template<typename T> struct Base { 16 int i; 17 virtual ~Base() { 18 } 19 }; 20 21 template <> 22 struct MisplacedDbg<Full> // { dg-function-on-line {_ZN12MisplacedDbgI4FullEC[12]Ev} } 23 // { dg-function-on-line {_ZN12MisplacedDbgI4FullED0Ev} { target *-*-* } 22 } 24 25 : public Base<int> { 26 }; 27 28 template <class T> 29 struct MisplacedDbg<T*> // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgEC[12]Ev} } 30 // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgED0Ev} { target *-*-* } 29 } 31 : public Base<int> { 32 }; 33 34 template <class A> 35 struct MisplacedDbg // { dg-function-on-line {_ZN12MisplacedDbgI3ArgEC[12]Ev} } 36 // { dg-function-on-line {_ZN12MisplacedDbgI3ArgED0Ev} { target *-*-* } 35 } 37 : public Base<int> { 38 }; 39 40 static MisplacedDbg<Arg> static_var1; 41 static MisplacedDbg<Arg*> static_var2; 42 static MisplacedDbg<Full> static_var3; 43