public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38795]  New: [4.3/4.4 regression] ICE with reinterpret_cast and variadic templates
@ 2009-01-10 16:54 reichelt at gcc dot gnu dot org
  2009-01-10 16:54 ` [Bug c++/38795] " reichelt at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-01-10 16:54 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-15 16:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-10 16:54 [Bug c++/38795] New: [4.3/4.4 regression] ICE with reinterpret_cast and variadic templates reichelt at gcc dot gnu dot org
2009-01-10 16:54 ` [Bug c++/38795] " reichelt at gcc dot gnu dot org
2009-01-13  9:03 ` jakub at gcc dot gnu dot org
2009-01-13 18:12 ` jakub at gcc dot gnu dot org
2009-01-13 18:12 ` [Bug c++/38795] [4.3 " jakub at gcc dot gnu dot org
2009-01-15 16:13 ` rguenth at gcc dot gnu dot org

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).