This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38795] New: [4.3/4.4 regression] ICE with reinterpret_cast and variadic templates
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2009 16:54:34 -0000
- Subject: [Bug c++/38795] New: [4.3/4.4 regression] ICE with reinterpret_cast and variadic templates
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet is triggers an ICE since GCC 4.3.0:
========================================
template<typename... T> int foo(int i)
{
return *reinterpret_cast<T*>(i);
}
void bar(int i)
{
foo<int>(i);
}
========================================
bug.cc: In function 'int foo(int) [with T = int]':
bug.cc:8: instantiated from here
bug.cc:3: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_type_parm in lookup_conversions,
at cp/search.c:2459
Please submit a full bug report, [etc.]
It's a regression because the code crashes even without -std=gnu++0x.
--
Summary: [4.3/4.4 regression] ICE with reinterpret_cast and
variadic templates
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38795