Bug 35242 - [4.3 regression] ICE with invalid specialization of variadic template
Summary: [4.3 regression] ICE with invalid specialization of variadic template
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P5 normal
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: error-recovery, ice-on-invalid-code, monitored
Depends on:
Blocks:
 
Reported: 2008-02-17 23:01 UTC by Volker Reichelt
Modified: 2009-04-22 15:24 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.4.0
Known to fail: 4.3.3
Last reconfirmed: 2008-02-17 23:14:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2008-02-17 23:01:49 UTC
The following invalid code snippet triggers an ICE on mainline:

===================================================
struct A
{
  template<typename... T> struct B;
};

template<typename... T> struct A::B<T*> {};
===================================================

bug.cc:6: error: parameter packs not expanded with `...':
bug.cc:6: note:         'T'
bug.cc:6: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in cp_parser_class_head, at cp/parser.c:14654
Please submit a full bug report, [etc.]
Comment 1 Joseph S. Myers 2008-03-15 00:43:09 UTC
Update milestone after 4.3.0 release.
Comment 2 Richard Biener 2008-06-06 14:58:59 UTC
4.3.1 is being released, adjusting target milestone.
Comment 3 Paolo Carlini 2008-06-07 11:58:42 UTC
On it.
Comment 4 paolo@gcc.gnu.org 2008-06-08 21:26:34 UTC
Subject: Bug 35242

Author: paolo
Date: Sun Jun  8 21:25:49 2008
New Revision: 136569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136569
Log:
/cp
2008-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/35242
        * pt.c (maybe_process_partial_specialization): Check the tree
	returned by push_template_decl for error_mark_node.
	* parser.c (cp_parser_class_head): Likewise, check the tree
	returned by the latter. 

/testsuite
2008-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/35242
        * g++.dg/cpp0x/vt-35242.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/vt-35242.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog

Comment 5 Paolo Carlini 2008-06-08 21:28:13 UTC
Fixed for 4.4.0.
Comment 6 Joseph S. Myers 2008-08-27 22:03:18 UTC
4.3.2 is released, changing milestones to 4.3.3.
Comment 7 Richard Biener 2009-01-24 10:20:08 UTC
GCC 4.3.3 is being released, adjusting target milestone.
Comment 8 Richard Biener 2009-04-22 15:24:41 UTC
WONTFIX for 4.3.