]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/ChangeLog
re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP)
authorJakub Jelinek <jakub@gcc.gnu.org>
Fri, 2 Sep 2016 18:38:07 +0000 (20:38 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 2 Sep 2016 18:38:07 +0000 (20:38 +0200)
commit9dc5773f4b529dd0fefffaf2a2bf9b9ff0195edd
tree4e53b18a2fda99a485292dfd9bf30c8fbd9145b7
parentc65236d682789b6a33510aaebfd7e83fe0f30d1a
re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP)

PR c/65467
* gimplify.c (gimplify_adjust_omp_clauses_1): Diagnose implicit
map and firstprivate clauses on target construct for _Atomic
qualified decls.
(gimplify_adjust_omp_clauses): Diagnose explicit firstprivate clauses
on target construct for _Atomic qualified decls.
* omp-low.c (use_pointer_for_field): Return true for _Atomic qualified
decls.
* omp-simd-clone.c (simd_clone_clauses_extract): Warn and give up for
_Atomic qualified arguments not mentioned in uniform clause.
c/
* c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
flag_openmp.
(c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
instead of mark_exp_read on low_bound/length expression.
(c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
c_parser_omp_clause_priority, c_parser_omp_clause_hint,
c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
instead of mark_expr_read.
(c_parser_omp_declare_reduction): Reject _Atomic qualified types.
* c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
* c-tree.h (c_omp_clause_copy_ctor): New prototype.
* c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
array section bases outside of depend clause, for depend clause
use convert_lvalue_to_rvalue on the base.
(c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
linear, aligned, map, to and from clauses.
(c_omp_clause_copy_ctor): New function.
c-family/
* c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
(c_finish_omp_for): Reject _Atomic qualified iterators.
testsuite/
* gcc.dg/gomp/_Atomic-1.c: New test.
* gcc.dg/gomp/_Atomic-2.c: New test.
* gcc.dg/gomp/_Atomic-3.c: New test.
* gcc.dg/gomp/_Atomic-4.c: New test.
* gcc.dg/gomp/_Atomic-5.c: New test.

From-SVN: r239964
17 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-omp.c
gcc/c/ChangeLog
gcc/c/c-objc-common.h
gcc/c/c-parser.c
gcc/c/c-tree.h
gcc/c/c-typeck.c
gcc/gimplify.c
gcc/omp-low.c
gcc/omp-simd-clone.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/gomp/_Atomic-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gomp/_Atomic-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gomp/_Atomic-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gomp/_Atomic-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gomp/_Atomic-5.c [new file with mode: 0644]