This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51884] New: ICE with c++11 thread and templates
- From: "bluescarni at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Jan 2012 16:56:48 +0000
- Subject: [Bug c++/51884] New: ICE with c++11 thread and templates
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51884
Bug #: 51884
Summary: ICE with c++11 thread and templates
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: bluescarni@gmail.com
Created attachment 26354
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26354
Code snippet demonstrating the issue.
The attached minimal code snippet causes an ICE on g++-4.5.3, g++-4.6.2 and
g++-4.7.0-alpha20111231. The compilation command is:
g++ -std=c++0x bug.cpp
The output on 4.5:
In file included from bug.cpp:1:0:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/thread:112:7: internal
compiler error: in dfs_walk_once, at cp/search.c:1645
The output on 4.6:
In file included from bug.cpp:1:0:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/thread:109:14: internal
compiler error: in dfs_walk_once, at cp/search.c:1659
The output on 4.7:
â
In file included from bug.cpp:1:0:
in dfs_walk_once, at cp/search.c:1695
The ICE is avoided at least in these cases:
- replace the method bar() with a non-templated version,
- replace the std::enable_if<...> enabler with void.