Bug 50966 - Address of static member function bug
Summary: Address of static member function bug
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 8.0
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-05 19:04 UTC by Thor Nolen
Modified: 2007-03-27 03:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-01 23:32:23 UTC
Embargoed:


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

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.


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