The following (invalid) source produces an internal error class FooBase { public: virtual bool isFoo() const = 0; }; class Bar { public: void addControl(const FooBase& foo) { mFoos.push_back(foo); } private: std::vector<FooBase> mFoos; }; Attemping to compile on g++4.7.3-r1 produces the following message: Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.gentoo.org/> for instructions. app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5-r3, 3.2.5-r3 dev-util/cmake: 2.8.11.2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6, 1.13.4 sys-devel/binutils: 2.23.1, 2.23.2 sys-devel/gcc: 4.3.6-r1, 4.5.4, 4.6.3, 4.6.4, 4.7.3-r1, 4.8.1-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.15-r3
Please post your `emerge --info =sys-devel/gcc' output in a comment.
(In reply to ewan.willis from comment #0) > The following (invalid) source produces an internal error > > class FooBase > { > public: > virtual bool isFoo() const = 0; > }; > > class Bar > { > public: > void addControl(const FooBase& foo) > { > mFoos.push_back(foo); > } > > private: > std::vector<FooBase> mFoos; > > }; That doesn't even parse. Could you give a complete, valid example, please?
The sys-devel/gcc field from emerge --info is included in my first comment. Appart from lacking '#include <vector>' in the original comment the source there invariably results in the problem described. For clarity: #include <vector> class FooBase { public: virtual bool isFoo() const = 0; }; class Bar { public: void addControl(const FooBase& foo) { mFoos.push_back(foo); } private: std::vector<FooBase> mFoos; }; I hope this helps!
(In reply to Jeroen Roovers from comment #1) > Please post your `emerge --info =sys-devel/gcc' output in a comment.