Bug 458297 - Compiler internal error while attempting to do some magic with templates.
Summary: Compiler internal error while attempting to do some magic with templates.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 458981 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-07 15:13 UTC by Victor Bogado
Modified: 2008-08-16 08:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-12 11:51:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
program that generate the bug. (303 bytes, text/x-c++src)
2008-08-07 15:13 UTC, Victor Bogado
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 37093 0 None None None Never

Description Victor Bogado 2008-08-07 15:13:42 UTC
Created attachment 313701 [details]
program that generate the bug. 

Description of problem:
I was trying to adapt the fast delegate described at http://www.codeproject.com/KB/cpp/ImpossiblyFastCppDelegate.aspx to make it more clean to call and I found an internal error. I don't know if the source code that I am trying to compile is valid C++, but I guess that internal error is a bug no matter what so I am filling this bug. 

I simplified a lot the source, to what I guess is the minimum case where the bug still shows. I am attaching the source code. I tried with the two different versions of gcc below : 

- gcc-4.3.0-8.x86_64
- gcc-4.1.2-14.el5.x86_64

with the version (compat-gcc-34-c++-3.4.6-4.x86_64) the compiler gives a more sane error bellow : 

delegate.cpp: In function `void call(C*, void (C::*)()) [with C = teste]':
delegate.cpp:27:   instantiated from here
delegate.cpp:12: error: `m' is not a valid template argument
delegate.cpp:12: error: it must be a pointer-to-member of the form `&X::Y'
delegate.cpp:12: error: no matching function for call to `stub(void*)'

Comment 1 Jakub Jelinek 2008-08-12 11:51:19 UTC
Tracking this upstream.

Comment 2 Jakub Jelinek 2008-08-16 08:44:47 UTC
*** Bug 458981 has been marked as a duplicate of this bug. ***


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