[Bug c++/72800] [5/6/7 Regression] ICE on invalid C++14 code with initialized lambda capture: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in add_capture, at cp/lambda.c:505

2016-08-04 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72800

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Thu Aug  4 19:22:58 2016
New Revision: 239148

URL: https://gcc.gnu.org/viewcvs?rev=239148=gcc=rev
Log:
/cp
2016-08-04  Paolo Carlini  

PR c++/72800
* lambda.c (add_capture): Check lambda_capture_field_type return
value for error_mark_node.

/testsuite
2016-08-04  Paolo Carlini  

PR c++/72800
* g++.dg/cpp1y/lambda-ice1.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/lambda-ice1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/lambda.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/72800] [5/6/7 Regression] ICE on invalid C++14 code with initialized lambda capture: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in add_capture, at cp/lambda.c:505

2016-08-04 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72800

Paolo Carlini  changed:

   What|Removed |Added

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

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

[Bug c++/72800] [5/6/7 Regression] ICE on invalid C++14 code with initialized lambda capture: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in add_capture, at cp/lambda.c:505

2016-08-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72800

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org,
   ||paolo.carlini at oracle dot com
  Known to fail||5.3.0, 6.1.0, 7.0

--- Comment #2 from Martin Sebor  ---
The ICE first appears in r210829:

r210829 | paolo | 2014-05-22 18:28:24 -0400 (Thu, 22 May 2014) | 16 lines

/cp
2014-05-22  Paolo Carlini  

PR c++/61088
* lambda.c (add_capture): Enforce that capture by value requires
complete type.
* typeck2.c (cxx_incomplete_type_inform): Early return if
TYPE_MAIN_DECL is null.

/testsuite
2014-05-22  Paolo Carlini  

PR c++/61088
* g++.dg/cpp0x/lambda/lambda-ice13.C: New.
* g++.dg/cpp0x/lambda/lambda-ice7.C: Adjust.

[Bug c++/72800] [5/6/7 Regression] ICE on invalid C++14 code with initialized lambda capture: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in add_capture, at cp/lambda.c:505

2016-08-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72800

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-08-04
 CC||marxin at gcc dot gnu.org
   Target Milestone|--- |5.5
Summary|ICE on invalid C++14 code   |[5/6/7 Regression] ICE on
   |with initialized lambda |invalid C++14 code with
   |capture: tree check:|initialized lambda capture:
   |expected class ‘type’, have |tree check: expected class
   |‘exceptional’ (error_mark)  |‘type’, have ‘exceptional’
   |in add_capture, at  |(error_mark) in
   |cp/lambda.c:505 |add_capture, at
   ||cp/lambda.c:505
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed.