gcc/libgomp/testsuite/libgomp.c++
Jakub Jelinek 02f7334ac9 c++: Fix up handling of captured vars in lambdas in OpenMP clauses [PR93931]
Without the parser.c change we were ICEing on the testcase, because while the
uses of the captured vars inside of the constructs were replaced with capture
proxy decls, we didn't do that for decls in OpenMP clauses.

With that fixed, we don't ICE anymore, but the testcase is miscompiled and FAILs
at runtime.  This is because the capture proxy decls have DECL_VALUE_EXPR and
during gimplification we were gimplifying those to their DECL_VALUE_EXPRs.
That is fine for shared vars, but for privatized ones we must not do that.
So that is what the cp-gimplify.c changes do.  Had to add a DECL_CONTEXT check
before calling is_capture_proxy because some VAR_DECLs don't have DECL_CONTEXT
set (yet) and is_capture_proxy relies on that being non-NULL always.

2020-03-19  Jakub Jelinek  <jakub@redhat.com>

	PR c++/93931
	* parser.c (cp_parser_omp_var_list_no_open): Call process_outer_var_ref
	on outer_automatic_var_p decls.
	* cp-gimplify.c (cxx_omp_disregard_value_expr): Return true also for
	capture proxy decls.

	* testsuite/libgomp.c++/pr93931.C: New test.
2020-03-19 12:22:47 +01:00
..
examples-4 builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
affinity-1.C
atomic-1.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
atomic-2.C
atomic-3.C typeck.c (cp_build_unary_op): Diagnose incrementing boolean expressions. 2016-09-14 17:46:59 +00:00
atomic-4.C
atomic-5.C
atomic-6.C
atomic-7.C
atomic-8.C
atomic-9.C
atomic-10.C
atomic-11.C
atomic-12.C
atomic-13.C
atomic-14.C
atomic-15.C
c++.exp Introduce libgomp/testsuite/libgomp.c-c++-common 2017-09-14 21:15:40 +00:00
cancel-for-1.C
cancel-for-2.C
cancel-parallel-1.C
cancel-parallel-2.C re PR c/63326 (whether a #pragma is a statement depends on the type of pragma) 2015-11-27 09:59:55 +01:00
cancel-parallel-3.C
cancel-sections-1.C
cancel-taskgroup-3.C
cancel-test.h
collapse-1.C
collapse-2.C
copyin-1.C
copyin-2.C
ctor-1.C
ctor-2.C
ctor-3.C
ctor-4.C
ctor-5.C
ctor-6.C
ctor-7.C
ctor-8.C
ctor-9.C
ctor-10.C
ctor-11.C
ctor-12.C
ctor-13.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
declare_target-1.C [hsa,testsuite] Introduce offload_device_shared_as effective target 2016-02-26 20:42:31 +01:00
depend-1.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
depend-iterator-1.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
depobj-1.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
doacross-1.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
for-1.C
for-2.C
for-3.C
for-4.C
for-5.C
for-6.C
for-7.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
for-8.C
for-15.C re PR middle-end/86660 (libgomp.c++/for-15.C ICEs with nvptx offloading) 2018-07-26 18:12:58 +02:00
for-16.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-21.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-22.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-23.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-24.C re PR libgomp/88460 ([nvptx] FAIL: libgomp.c++/for-24.C (internal compiler error)) 2018-12-13 13:53:19 +01:00
for-25.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-26.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-27.C re PR middle-end/91301 (ICE in omp_add_variable on random access iterator distribute parallel for private (iterator)) 2019-07-31 09:49:56 +02:00
lastprivate-conditional-1.C omp-low.c (lower_rec_input_clauses): For lastprivate conditional references... 2019-06-05 09:37:40 +02:00
lastprivate-conditional-2.C omp-low.c (lower_rec_input_clauses): For lastprivate conditional references... 2019-06-05 09:37:40 +02:00
linear-1.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
loop-1.C
loop-2.C Fix -Wreturn-type fallout. 2017-11-06 13:41:35 +00:00
loop-3.C
loop-4.C Fix -Wreturn-type fallout. 2017-11-06 13:41:35 +00:00
loop-5.C
loop-6.C
loop-7.C
loop-8.C
loop-9.C
loop-10.C
loop-11.C
loop-12.C
loop-13.C tree.h (OMP_CLAUSE_LASTPRIVATE_TASKLOOP_IV): Rename to ... 2019-08-06 09:26:32 +02:00
loop-14.C tree.h (OMP_CLAUSE_LASTPRIVATE_TASKLOOP_IV): Rename to ... 2019-08-06 09:26:32 +02:00
loop-15.C tree.h (OMP_CLAUSE_LASTPRIVATE_TASKLOOP_IV): Rename to ... 2019-08-06 09:26:32 +02:00
master-1.C
member-1.C [PR testsuite/68063] Add missing private clause in libgomp.c++/member-1.C 2015-10-27 11:32:32 +01:00
member-2.C Add missing private clause in libgomp.c++/member-2.C 2015-10-23 10:45:13 +00:00
member-3.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
member-4.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
member-5.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
member-6.C gcc/ 2015-11-05 16:08:08 +01:00
member-7.C gcc/ 2015-11-05 16:08:08 +01:00
nested-1.C
parallel-1.C Fix -Wreturn-type fallout. 2017-11-06 13:41:35 +00:00
pr24455-1.C
pr24455.C
pr26691.C
pr26943.C
pr27337.C
pr30703.C
pr34513.C
pr35185.C
pr38650.C
pr39573.C
pr43893.C
pr48869.C
pr49043.C
pr56217.C
pr58706.C re PR c++/58706 (ICE with lambda in OpenMP for-loop) 2016-08-08 21:50:29 +02:00
pr63248.C
pr66702-1.C pr66702-1.C: Require vect_simd_clones effective target. 2015-07-02 10:17:20 +02:00
pr66702-2.C pr66702-1.C: Require vect_simd_clones effective target. 2015-07-02 10:17:20 +02:00
pr69393.C Remove superfluous -fopenmp from libgomp testcases 2017-09-28 09:32:00 +00:00
pr69555-1.C re PR libgomp/69555 (libgomp.c++/target-6.C fails because of undefined behaviour) 2016-03-02 20:16:14 +01:00
pr69555-2.C re PR libgomp/69555 (libgomp.c++/target-6.C fails because of undefined behaviour) 2016-03-02 20:16:14 +01:00
pr70376.C re PR c++/70376 (OpenMP taskloop construct fails to instantiate copy constructor(same as Bug 48869)) 2016-03-23 19:42:19 +01:00
pr81130.C re PR c++/81130 (ICE OpenMP shared clause in gimplify_var_or_parm_decl, at gimplify.c:2584) 2017-06-21 12:58:00 +02:00
pr81314.C re PR c++/81314 (Undefined reference to a function with -fopenmp) 2017-09-14 22:18:17 +02:00
pr82835.C re PR c++/82835 (ICE on valid code with -fopenmp) 2017-11-07 21:51:05 +01:00
pr86291.C re PR c++/86291 (OpenMP incorrect for-loop collapsing with iterators and at least 5 nested loops) 2018-06-26 12:40:50 +02:00
pr86539.C re PR middle-end/86539 (OpenMP wrong-code with taskloop and references) 2018-07-17 10:06:25 +02:00
pr86542.C re PR middle-end/86542 (wrong-code for collapsed taskloop which needs omp_cpyfn) 2018-07-17 12:54:52 +02:00
pr88988.C re PR c++/88988 (ICE: Segmentation fault (in lookup_name_real_1)) 2019-01-31 00:28:53 +01:00
pr93931.C c++: Fix up handling of captured vars in lambdas in OpenMP clauses [PR93931] 2020-03-19 12:22:47 +01:00
reduction-1.C
reduction-2.C
reduction-3.C
reduction-4.C
reduction-5.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
reduction-6.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
reduction-7.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
reduction-8.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
reduction-9.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
reduction-10.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
reduction-11.C re PR middle-end/68221 (libgomp reduction-11/12 failures) 2015-11-20 20:50:46 +01:00
reduction-12.C re PR middle-end/68221 (libgomp reduction-11/12 failures) 2015-11-20 20:50:46 +01:00
reference-1.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
scan-1.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-2.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-3.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-4.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-5.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-6.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-7.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-8.C tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-9.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-10.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-11.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-12.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-13.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-14.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-15.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-16.C re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
sections-1.C
shared-1.C Fix -Wreturn-type fallout. 2017-11-06 13:41:35 +00:00
shared-2.C
simd14.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
simd-1.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-2.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-3.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-4.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-5.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-6.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-7.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-8.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
simd-9.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
single-1.C Fix -Wreturn-type fallout. 2017-11-06 13:41:35 +00:00
single-2.C Fix -Wreturn-type fallout. 2017-11-06 13:41:35 +00:00
single-3.C
target-2-aux.cc
target-2.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
target-6.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
target-7.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
target-8.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
target-9.C tree-core.h (enum omp_clause_code): Adjust OMP_CLAUSE_USE_DEVICE_PTR OpenMP description. 2019-08-07 09:27:10 +02:00
target-10.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
target-11.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
target-12.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
target-13.C gcc/ 2015-11-05 16:08:08 +01:00
target-14.C gcc/ 2015-11-05 16:08:08 +01:00
target-15.C gcc/ 2015-11-05 16:08:08 +01:00
target-16.C gcc/ 2015-11-05 16:08:08 +01:00
target-17.C gcc/ 2015-11-05 16:08:08 +01:00
target-18.C gcc/ 2015-11-05 16:08:08 +01:00
target-19.C gcc/ 2015-11-05 16:08:08 +01:00
target-20.C gimplify.c (gimplify_scan_omp_clauses): Handle COMPONENT_REFs with base of reference to struct. 2016-06-16 21:03:05 +02:00
target-21.C semantics.c (handle_omp_array_sections_1): Don't ICE when processing_template_decl when checking for bitfields and unions. 2016-06-17 15:35:42 +02:00
target-22.C gimplify.c (omp_add_variable): Use GOVD_PRIVATE | GOVD_EXPLICIT for VLA helper variables on target data even if... 2019-08-08 08:39:02 +02:00
task-1.C
task-2.C
task-3.C
task-4.C
task-5.C
task-6.C
task-7.C
task-8.C
task-reduction-1.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-2.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-3.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-4.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-5.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-6.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-7.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-8.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-9.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-10.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-11.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-12.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-13.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-14.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-15.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-16.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-17.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-18.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-19.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop-5.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
taskloop-6.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
taskloop-7.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
taskloop-8.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
taskloop-9.C builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
taskloop-reduction-1.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop-reduction-2.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop-reduction-3.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop-reduction-4.C builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
tls-init1.C
udr-1.C
udr-2.C
udr-3.C
udr-4.C
udr-5.C
udr-6.C
udr-7.C
udr-8.C
udr-11.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-12.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-13.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-14.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-15.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-16.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-17.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-18.C Run testsuite/libgomp.c++/c++.exp at -O2 by default 2015-06-30 12:22:04 +00:00
udr-19.C [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
udr-20.C re PR c++/60228 (ICE using lambda in #pragma omp declare reduction) 2019-11-29 10:10:44 +01:00
udr-21.C re PR c++/60228 (ICE using lambda in #pragma omp declare reduction) 2019-11-29 10:10:44 +01:00