[Bug bootstrap/52887] Bootstrap on AIX failure: Undefined symbol: .std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)>::function(std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)> const&)
joerg.richter@pdv-fs.de
gcc-bugzilla@gcc.gnu.org
Fri Sep 14 07:58:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52887
--- Comment #22 from Jörg Richter <joerg.richter@pdv-fs.de> 2012-09-14 07:58:16 UTC ---
I have reduced a real live case. But still using <vector>.
$ cat t.cc
#include <vector>
struct ClassicUpdate
{
ClassicUpdate();
};
typedef std::vector<ClassicUpdate> ClassicUpdates;
struct UpdateData
{
ClassicUpdates classicUpdates;
UpdateData( ClassicUpdates const& classicUpdates )
: classicUpdates( classicUpdates )
{}
};
int main()
{}
$ g++ -std=gnu++0x -o mm t.cc -save-temps
$ grep Construct.*ClassicUpdate *.s
.weak _ZSt10_ConstructI13ClassicUpdateIRKS0_EEvPT_DpOT0_[DS]
...
This should demostrate that GCC compiles a symbol referencing ClassicUpdate
into the executable. When the AIX linker decides to use that symbol you get
an undefined reference error. This is not the case here. But the unreduced
source has the problem.
GCC 4.6.3 doesn't do this. And removing -std=gnu++0x works too.
So it seems this is not regex-related but a deeper bug in GCC 4.7 that emits
functions that are never called.
More information about the Gcc-bugs
mailing list