blob: 94360c2e97ee3e8961a8f109001e50462028b634 [file] [log] [blame]
Bill Wendling546f68a2009-12-04 23:29:57 +00001// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | not grep {_ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag}
2// PR4262
3
4// The "basic_string" extern template instantiation declaration is supposed to
5// suppress the implicit instantiation of non-inline member functions. Make sure
6// that we suppress the implicit instantiation of non-inline member functions
7// defined out-of-line. That we aren't instantiating the basic_string
8// constructor when we shouldn't be. Such an instantiation forces the implicit
9// instantiation of _S_construct<const char*>. Since _S_construct is a member
10// template, it's instantiation is *not* suppressed (despite being in
11// basic_string<char>), so we would emit it as a weak definition.
12
13#include <stdexcept>
14
15void dummysymbol() {
16 throw(std::runtime_error("string"));
17}