Bug 78133 - Internal compiler error in resolve_offset_ref, at cp/init.c:1886
Internal compiler error in resolve_offset_ref, at cp/init.c:1886
Product: Red Hat Linux
Classification: Retired
Component: gcc3 (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2002-11-19 06:00 EST by Karsten Hochkirch
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-02-19 13:51:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
cpp test code (561 bytes, text/plain)
2002-11-19 06:02 EST, Karsten Hochkirch
no flags Details

  None (edit)
Description Karsten Hochkirch 2002-11-19 06:00:47 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
attached code compiled well under gcc-2.9xx and gives errors on gcc-3

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.g++ -c bug.cpp

Actual Results:  g++ -c bug.cpp
bug.cpp: In function `int main(int, char**)':
bug.cpp:36: Internal compiler error in resolve_offset_ref, at cp/init.c:1886
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

Expected Results:  g++ -c bug.cpp

Additional info:

--- bug.cpp ----

class ClassA {

    virtual ~ClassA(){};

    double memberFunction( void ){
				return 1.0;

typedef double (ClassA::*constraint_function)(void );

class ClassB {
		ClassA* classA;
		constraint_function function;
    ClassB (ClassA* _classA, constraint_function f):
				classA(_classA), function(f){};

	  virtual ~ClassB (){};

		double doSomething(){
				return (((*classA).*function)());


int main(int argc, char **argv){

	ClassB classB(&(ClassA::memberFunction));


Comment 1 Karsten Hochkirch 2002-11-19 06:02:03 EST
Created attachment 85545 [details]
cpp test code
Comment 2 Jakub Jelinek 2003-02-19 13:51:05 EST
This is not valid code, and newer GCCs (such as gcc-3.2.2-{1,2} from rawhide
no longer ICE on it, but issue diagnostics).

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