public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14241] New: ICE when returning template class where template argument is a template function
@ 2004-02-22 7:56 Duff at DIKU dot DK
2004-02-23 0:52 ` [Bug c++/14241] " giovannibajo at libero dot it
0 siblings, 1 reply; 2+ messages in thread
From: Duff at DIKU dot DK @ 2004-02-22 7:56 UTC (permalink / raw)
To: gcc-bugs
The following code:
============================
template <typename T> void f () { }
template <void(*F)()> struct B { };
template <typename T> B< f<int> > g (T) { return B< f<int> >(); }
int main (int argc, char const* argv[])
{
g(0);
return 0;
}
============================
If "B< f<int> >" is replaced with a typedef, the program compiles.
The problem exists with both gcc 2.x and 3.x and I have verified it under different distributions of linux
(and therefor gcc) plus Mac OS X (with apple's modified gcc).
The output from the compiler is:
In function `int main(int, const char**)':
internal compiler error: Bus error
(or segmentation fault on other systems)
--
Summary: ICE when returning template class where template
argument is a template function
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Duff at DIKU dot DK
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14241
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/14241] ICE when returning template class where template argument is a template function
2004-02-22 7:56 [Bug c++/14241] New: ICE when returning template class where template argument is a template function Duff at DIKU dot DK
@ 2004-02-23 0:52 ` giovannibajo at libero dot it
0 siblings, 0 replies; 2+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-23 0:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-02-23 00:52 -------
Confirmed, but already fixed in GCC 3.4.0. Not being a regression and most
likely a parser issue, this will not be fixed in 3.3. Thanks for your report.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14241
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-23 0:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-22 7:56 [Bug c++/14241] New: ICE when returning template class where template argument is a template function Duff at DIKU dot DK
2004-02-23 0:52 ` [Bug c++/14241] " giovannibajo at libero dot it
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).