Bug 50966 - Address of static member function bug
Address of static member function bug
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-08-05 15:04 EDT by Thor Nolen
Modified: 2007-03-26 23:47 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-01 19:32:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
funcptr.cc source (1.20 KB, text/plain)
2001-08-05 15:07 EDT, Thor Nolen
no flags Details

  None (edit)
Description Thor Nolen 2001-08-05 15:04:06 EDT
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 15:07:20 EDT
Created attachment 26333 [details]
funcptr.cc source
Comment 2 Jakub Jelinek 2001-08-09 06:26:41 EDT
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 12:24:41 EST
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 19:32:23 EDT
Fails through gcc 3.2; fixed for gcc 3.3.

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