]> git.ipfire.org Git - thirdparty/gcc.git/commit
Arrow operator handling for C front-end in OpenMP map clauses
authorChung-Lin Tang <cltang@codesourcery.com>
Mon, 8 Mar 2021 07:56:52 +0000 (15:56 +0800)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 22 Apr 2021 17:14:33 +0000 (10:14 -0700)
commit60040dfff937acf02e44eb17902ea2d162f4d2ea
tree140217cb867e3bda35f884b3e53ed53a2887e1bf
parent9664f9e383fc859757d533318d0c5862108a6025
Arrow operator handling for C front-end in OpenMP map clauses

This patch merges some of the equivalent changes already done for the C++
front-end to the C parts.

2021-03-08  Chung-Lin Tang  <cltang@codesourcery.com>

gcc/c/ChangeLog:

* c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
call to c_parser_omp_variable_list to 'true'.
* c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
array base handling.
(c_finish_omp_clauses): Handle 'A->member' case in map clauses.

gcc/ChangeLog:

* gimplify.c (gimplify_scan_omp_clauses): Add MEM_REF case when
handling component_ref_p case. Add unshare_expr and gimplification
when created GOMP_MAP_STRUCT is not a DECL. Add code to add
firstprivate pointer for *pointer-to-struct case.

gcc/testsuite/ChangeLog:

* gcc.dg/gomp/target-3.c: New test.
gcc/c/c-parser.c
gcc/c/c-typeck.c
gcc/gimplify.c
gcc/testsuite/gcc.dg/gomp/target-3.c [new file with mode: 0644]