https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84630

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-03-01
                 CC|                            |dmalcolm at gcc dot gnu.org
   Target Milestone|---                         |6.5
            Summary|internal compiler error:    |[6/7/8 Regression] ICE:
                   |tree check: expected class  |TYPE_NAME() used on
                   |'type', have 'exceptional'  |error_mark_node in
                   |(error_mark) in             |tsubst_lambda_expr, at
                   |tsubst_lambda_expr, at      |cp/pt.c:17141
                   |cp/pt.c:17141               |
     Ever confirmed|0                           |1

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Confirmed with trunk, 7, 6 (and 5).  Doesn't crash with 4.8.3.

ICE began on this code (with -std=c++11) between r198776 (no ICE) and r198781,
with: 
  "unexpected expression ‘<enumerator>’ of kind template_parm_index")

The ICE message changed to
  "tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in
tsubst_lambda_expr, at cp/pt.c:16972"
sometime between r257193 and r257199 (probably in r257199).

Fails on trunk here:

#3  tsubst_lambda_expr (t=<lambda_expr 0x7ffff1a1c080>, args=<tree_vec
0x7ffff1a1ad00>, complain=1, 
    in_decl=<function_decl 0x7ffff1a09f00 operator()>) at
../../src/gcc/cp/pt.c:17141

17141     determine_visibility (TYPE_NAME (type));

where "type" is "error_mark_node" and thus not a type.

On unchecked builds (e.g. 7), this becomes:

#1  0x00000000007b8eea in cxx_eval_constant_expression(constexpr_ctx const*,
tree_node*, bool, bool*, bool*, tree_node**) ()
    at ../../src/gcc/cp/constexpr.c:4654

4654            internal_error ("unexpected expression %qE of kind %s", t,
4655                            get_tree_code_name (TREE_CODE (t)));

Reply via email to