// Origin: PR 44641 // { dg-do compile { target c++17_down } } // { dg-options "-gdwarf-2 -O0 -dA" } template struct MisplacedDbg; template struct MisplacedDbg; struct Full; template<> struct MisplacedDbg; struct Arg; typedef MisplacedDbg Typedef1; typedef MisplacedDbg Typedef2; typedef MisplacedDbg Typedef3; template struct Base { int i; virtual ~Base() { } }; template <> struct MisplacedDbg // { dg-function-on-line {_ZN12MisplacedDbgI4FullEC[12]Ev} { xfail powerpc-ibm-aix* } } // { dg-function-on-line {_ZN12MisplacedDbgI4FullED0Ev} { target *-*-* xfail powerpc-ibm-aix* } 22 } : public Base { }; template struct MisplacedDbg // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgEC[12]Ev} { xfail powerpc-ibm-aix* } } // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgED0Ev} { target *-*-* xfail powerpc-ibm-aix* } 29 } : public Base { }; template struct MisplacedDbg // { dg-function-on-line {_ZN12MisplacedDbgI3ArgEC[12]Ev} { xfail powerpc-ibm-aix* } } // { dg-function-on-line {_ZN12MisplacedDbgI3ArgED0Ev} { target *-*-* xfail powerpc-ibm-aix* } 35 } : public Base { }; static MisplacedDbg static_var1; static MisplacedDbg static_var2; static MisplacedDbg static_var3; // This test is skipped in C++20 because we consider the default constructor // MisplacedDbg() constexpr despite the uninitialized member "int i;". So // the calls to // MisplacedDbg::MisplacedDbg() // MisplacedDbg::MisplacedDbg() // MisplacedDbg::MisplacedDbg() // are elided. (This comment is here not to mess up the line numbers.)