[Bug c++/58706] ICE with lambda in OpenMP for-loop

2017-10-10 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58706

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.0

--- Comment #4 from Paolo Carlini  ---
Fixed in 7.1.0 then.

[Bug c++/58706] ICE with lambda in OpenMP for-loop

2016-08-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58706

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Mon Aug  8 19:50:29 2016
New Revision: 239251

URL: https://gcc.gnu.org/viewcvs?rev=239251=gcc=rev
Log:
PR c++/58706
* parser.c: Include tree-iterator.h.
(cp_parser_omp_for_loop_init): Move lambda DECL_EXPRs from init
to FOR_BLOCK.
(cp_parser_omp_for_loop): Handle non-STATEMENT_LIST FOR_BLOCK
entries.

* testsuite/libgomp.c++/pr58706.C: New test.

Added:
trunk/libgomp/testsuite/libgomp.c++/pr58706.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/libgomp/ChangeLog

[Bug c++/58706] ICE with lambda in OpenMP for-loop

2016-08-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58706

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
This isn't valid code, as OpenMP doesn't support C++11 and later, so in order
to stay in the well defined territory, you shouldn't use C++11 and later
constructs in OpenMP constructs.

[Bug c++/58706] ICE with lambda in OpenMP for-loop

2016-08-07 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58706

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-08-07
 Ever confirmed|0   |1
  Known to fail||6.1.0

--- Comment #1 from Andrew Pinski  ---
Confirmed:
t88.cc: In instantiation of 'void foo() [with T = int]':
t88.cc:10:12:   required from here
t88.cc:3:9: internal compiler error: in tsubst_copy, at cp/pt.c:14042
 #pragma omp for
 ^~~
0x5d0f73 tsubst_copy
../../gcc/gcc/cp/pt.c:14040
0x5d16b3 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:16992
0x5cbcd3 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:15801
0x5ccc6f tsubst_omp_for_iterator
../../gcc/gcc/cp/pt.c:14880
0x5ccc6f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:15524
0x5cc44f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:15289
0x5e6987 instantiate_decl(tree_node*, int, bool)
../../gcc/gcc/cp/pt.c:22013
0x5e875f instantiate_pending_templates(int)
../../gcc/gcc/cp/pt.c:22130
0x607d1b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:4599
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.