gcc/libgomp/testsuite
Jakub Jelinek 8b60459465 openmp: Don't optimize shared to firstprivate on task with depend clause
The attached testcase is miscompiled, because we optimize shared clauses
to firstprivate when task body can't modify the variable even when the
task has depend clause.  That is wrong, because firstprivate means the
variable will be copied immediately when the task is created, while with
depend clause some other task might change it later before the dependencies
are satisfied and the task should observe the value only after the change.

2020-12-18  Jakub Jelinek  <jakub@redhat.com>

	* gimplify.c (struct gimplify_omp_ctx): Add has_depend member.
	(gimplify_scan_omp_clauses): Set it to true if OMP_CLAUSE_DEPEND
	appears on OMP_TASK.
	(gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Force
	GOVD_WRITTEN on shared variables if task construct has depend clause.

	* testsuite/libgomp.c/task-6.c: New test.
2020-12-18 21:43:20 +01:00
..
config
lib libgomp testsuite: tell warning from error diagnostics, etc. [PR80219, PR85303] 2020-11-02 14:14:43 +01:00
libgomp.c openmp: Don't optimize shared to firstprivate on task with depend clause 2020-12-18 21:43:20 +01:00
libgomp.c-c++-common openmp: Add support for non-VLA {,first}private allocate on omp task 2020-11-14 01:46:16 +01:00
libgomp.c++ openmp: Add support for non-VLA {,first}private allocate on omp task 2020-11-14 01:46:16 +01:00
libgomp.fortran Fortran: Add 'omp scan' support of OpenMP 5.0 2020-12-08 16:54:22 +01:00
libgomp.graphite
libgomp.oacc-c
libgomp.oacc-c-c++-common Fix templatized C++ OpenACC 'cache' directive ICEs 2020-11-25 19:57:39 +01:00
libgomp.oacc-c++ Fix templatized C++ OpenACC 'cache' directive ICEs 2020-11-25 19:57:39 +01:00
libgomp.oacc-fortran Fix atomic_capture-1.f90 testcase 2020-11-25 13:55:45 +00:00
libgomp-site-extra.exp.in
libgomp-test-support.exp.in
Makefile.am
Makefile.in