http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54207
Bug #: 54207 Summary: ICE in build_noexcept_spec when bool is #defined/typedef'd Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: andrew...@gmail.com This ICE occurs under unique/odd but reproducible conditions. The key components of the environment for this bug appear to be: 1. 'bool' is typedef'd to a new type which is then #define'd over the existing 'bool' type (this is the case in the common.h head from the ldns package, http://www.nlnetlabs.nl/projects/ldns/). 2. A user-defined class inherits from a templated base class, like std::vector<string>. 3. This same class calls a noexcept method on a vector member (which appears to trigger the build_noexcept_spec function). This bug is reproducible with the following code on gcc-4.7. It compiles without error on gcc-4.6: ---------------------------------------------- typedef bool _Bool; # define bool _Bool #include <vector> #include <iostream> #include <cstring> using namespace std; class Test : public vector<string> { public: Test (Test& that) { arr = std::move(that.arr); } private: std::vector<int*> arr; };