public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31141]  New: [4.3 regression] ICE with ellipsis in template parameter list
@ 2007-03-11 22:58 reichelt at gcc dot gnu dot org
  2007-03-11 22:59 ` [Bug c++/31141] " 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 @ 2007-03-11 22:58 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE on mainline:

========================================
template<int N...> void foo(int x[1][N]);

void bar()
{
  int x[1][1];
  foo(x);
}
========================================

bug.cc:1: error: ISO C++ does not include variadic templates
bug.cc: In function 'void bar()':
bug.cc:1: internal compiler error: tree check: expected class 'expression',
have 'constant' (integer_cst) in tsubst_pack_expansion, at cp/pt.c:6829
Please submit a full bug report, [etc.]

Looks like this was caused by your patch for variadic templates, Douglas:

2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/20599
        * typeck.c (check_return_expr): Check for bare parameter packs.
        (comptypes): Compare template parameter packs and
        type pack expansions.
        ...


-- 
           Summary: [4.3 regression] ICE with ellipsis in template parameter
                    list
           Product: gcc
           Version: 4.3.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=31141


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

end of thread, other threads:[~2007-03-31 12:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-11 22:58 [Bug c++/31141] New: [4.3 regression] ICE with ellipsis in template parameter list reichelt at gcc dot gnu dot org
2007-03-11 22:59 ` [Bug c++/31141] " reichelt at gcc dot gnu dot org
2007-03-27 14:11 ` doug dot gregor at gmail dot com
2007-03-28 14:32 ` dgregor at gcc dot gnu dot org
2007-03-31 12:42 ` dgregor at gcc dot gnu dot org
2007-03-31 12:44 ` dgregor 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).