[Bug c++/84630] [6/7/8 Regression] ICE: TYPE_NAME() used on error_mark_node in tsubst_lambda_expr, at cp/pt.c:17141

2018-04-18 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84630

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Wed Apr 18 08:03:45 2018
New Revision: 259460

URL: https://gcc.gnu.org/viewcvs?rev=259460=gcc=rev
Log:
/cp
2018-04-18  Paolo Carlini  

PR c++/84630
* pt.c (tsubst_lambda_expr): Check begin_lambda_type return value
for error_mark_node.

/testsuite
2018-04-18  Paolo Carlini  

PR c++/84630
* g++.dg/cpp0x/pr84630.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr84630.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/84630] [6/7/8 Regression] ICE: TYPE_NAME() used on error_mark_node in tsubst_lambda_expr, at cp/pt.c:17141

2018-04-17 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84630

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #3 from Paolo Carlini  ---
Seems easy.

[Bug c++/84630] [6/7/8 Regression] ICE: TYPE_NAME() used on error_mark_node in tsubst_lambda_expr, at cp/pt.c:17141

2018-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84630

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug c++/84630] [6/7/8 Regression] ICE: TYPE_NAME() used on error_mark_node in tsubst_lambda_expr, at cp/pt.c:17141

2018-03-01 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84630

David Malcolm  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  ---
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 ‘’ 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=, args=, complain=1, 
in_decl=) 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  0x007b8eea in cxx_eval_constant_expression(constexpr_ctx const*,
tree_node*, bool, bool*, bool*, tree_node**) ()
at ../../src/gcc/cp/constexpr.c:4654

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