From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 Description of problem: The following code gives the error: src/error.cpp: In function `int main()': src/error.cpp:21: Internal compiler error in arg_assoc, at cp/decl2.c:4811 Granted, the code is broken (missing parenthesises), but it sounds serious that it kills the compiler with internal error. ---- #include <iostream> using namespace std; class A { string d_Name; public: string name() { return( d_Name ); }; void setName( string s ) { d_Name = s; }; }; int main() { A a, b; string s; a.setName( "I'm A" ); b.setName( "I'm B" ); int ia = 0, ib = 1; // next line gives error, using a.name() : b.name() will fix s = ( ia < ib ) ? a.name : b.name; cout << s << endl; } Version-Release number of selected component (if applicable): g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) How reproducible: Always Steps to Reproduce: 1. Just compile with: g++ -Wall -Wno-deprecated 2. 3. Actual Results: I get this: src/error.cpp: In function `int main()': src/error.cpp:22: Internal compiler error in arg_assoc, at cp/decl2.c:4811 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. Expected Results: Anything but an internal error... Additional info:
Fixed in gcc 3.4, which yields z.c:22: error: no match for 'operator=' in 's = ((ia < ib) ? a.A::name : b.A::name)'