Bug 114634 - g++ fails with "Internal compiler error in arg_assoc, at cp/decl2.c:4811"
Summary: g++ fails with "Internal compiler error in arg_assoc, at cp/decl2.c:4811"
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
(Show other bugs)
Version: 9
Hardware: i686 Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-30 14:26 UTC by Kim Karlsson
Modified: 2007-04-18 17:02 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-04 19:29:24 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Kim Karlsson 2004-01-30 14:26:28 UTC
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:

Comment 1 Richard Henderson 2004-10-04 19:29:24 UTC
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)'



Note You need to log in before you can comment on or make changes to this bug.