Bug 50966

Summary: Address of static member function bug
Product: [Retired] Red Hat Linux Reporter: Thor Nolen <nolen>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: high    
Version: 8.0CC: nolen
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-01 23:32:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
funcptr.cc source none

Description Thor Nolen 2001-08-05 19:04:06 UTC
Description of Problem:
 funcptr.cc - Address of static member function bug.  This problem
showed up when we tried to compile under GCC 2.96-85.  It doesn't
happen under GCC 2.91.66.  The compiler crashes with an internal error
(seg fault) when you try to compile code that takes the address of a
static member function.  The problem is that you can't take the
address of a static template member function.  There is no problem
taking the address of a simple template function that does the exact
same thing.

code attached

Comment 1 Thor Nolen 2001-08-05 19:07:20 UTC
Created attachment 26333 [details]
funcptr.cc source

Comment 2 Jakub Jelinek 2001-08-09 10:26:41 UTC
According to Jason Merrill, it is unclear whether this is valid C++ program
or not (it is currently open core issue 115 in the ISO C++ committee).
I'll see what can be done.
FYI it crashes with g++ 2.95.2, 2.96-RH, 3.0, 3.0.1 and 3.1 CVS.

Comment 3 Alan Cox 2002-12-15 17:24:41 UTC
and 3.2 as of 8.0

x1.C: In member function `void bark::run()':
x1.C:52: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


Comment 4 Richard Henderson 2004-10-01 23:32:23 UTC
Fails through gcc 3.2; fixed for gcc 3.3.