PR c++/24511 - [DR 470] explicit instantiation/extern template unsats
PR c++/24511 - [DR 470] explicit instantiation/extern template unsats // on symbols defined later gcc/testsuite/ChangeLog: * g++.dg/template/explicit9.C: New test. From-SVN: r244337
This commit is contained in:
parent
01bfd25762
commit
3594adc7b0
@ -1,3 +1,8 @@
|
|||||||
|
2017-01-11 Martin Sebor <msebor@redhat.com>
|
||||||
|
|
||||||
|
PR c++/24511
|
||||||
|
* g++.dg/template/explicit9.C: New test.
|
||||||
|
|
||||||
2017-01-11 Nathan Sidwell <nathan@acm.org>
|
2017-01-11 Nathan Sidwell <nathan@acm.org>
|
||||||
|
|
||||||
PR c++/77812
|
PR c++/77812
|
||||||
|
24
gcc/testsuite/g++.dg/template/explicit9.C
Normal file
24
gcc/testsuite/g++.dg/template/explicit9.C
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// PR c++/24511 - [DR 470] explicit instantiation/extern template unsats
|
||||||
|
// on symbols defined later
|
||||||
|
// { dg-do compile }
|
||||||
|
|
||||||
|
template <class T> struct S { T foo (); T bar (); };
|
||||||
|
template <class T> T S<T>::foo () { return T (); }
|
||||||
|
|
||||||
|
#ifndef MAIN
|
||||||
|
|
||||||
|
// This part is being tested by the dg-final directive.
|
||||||
|
template struct S<int>;
|
||||||
|
#else
|
||||||
|
|
||||||
|
// This part is not being tested.
|
||||||
|
extern template struct S<int>;
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
return S<int>().foo () + S<int>().bar ();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template <class T> T S<T>::bar () { return T (); }
|
||||||
|
|
||||||
|
// { dg-final { scan-assembler-not "\\\*UND\\\*\[^\n]*_Z1fIiEvPT_" } }
|
Loading…
Reference in New Issue
Block a user