Bug 78133 - Internal compiler error in resolve_offset_ref, at cp/init.c:1886
Summary: Internal compiler error in resolve_offset_ref, at cp/init.c:1886
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc3
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-19 11:00 UTC by Karsten Hochkirch
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-02-19 18:51:05 UTC


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

Description Karsten Hochkirch 2002-11-19 11:00:47 UTC
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:
Always

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

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 {

public:
    ClassA(){}
    virtual ~ClassA(){};

    double memberFunction( void ){
				return 1.0;
		}
};

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

class ClassB {
		ClassA* classA;
		constraint_function function;
    public:
    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));

	classB.doSomething();

}

Comment 1 Karsten Hochkirch 2002-11-19 11:02:03 UTC
Created attachment 85545 [details]
cpp test code

Comment 2 Jakub Jelinek 2003-02-19 18:51:05 UTC
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.