This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52458] New: [c++0x] compiler fails on for(:*this) with non-public inheritance with message: Internal compiler error: Error reporting routines re-entered.
- From: "crimaniak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Mar 2012 02:17:16 +0000
- Subject: [Bug c++/52458] New: [c++0x] compiler fails on for(:*this) with non-public inheritance with message: Internal compiler error: Error reporting routines re-entered.
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52458
Bug #: 52458
Summary: [c++0x] compiler fails on for(:*this) with non-public
inheritance with message: Internal compiler error:
Error reporting routines re-entered.
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: crimaniak@gmail.com
Created attachment 26805
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26805
preprocessed code
Command line: c++ -std=c++0x -save-temps bug1.cpp
Code:
#include <vector>
/*#include <iostream>*/
#if false
class V : public std::vector<int>
#else
class V : protected std::vector<int>
#endif
{
public:
void echo(){for(int x:*this) /*std::cout << ' ' << x */ ;};
};
int main()
{
V a;
a.resize(20);
a.echo();
}
Change false to true in #if directive and code will be compiled succesfully.