diff options
author | Chung-Lin Tang <cltang@codesourcery.com> | 2022-01-27 18:33:00 +0800 |
---|---|---|
committer | Chung-Lin Tang <cltang@codesourcery.com> | 2022-01-27 18:35:37 +0800 |
commit | 1c91b014923f418e0aab789c5cf57facf04bf266 (patch) | |
tree | 49bc3533c159ab9edb912db2b115b9af165f3dae /gcc/tree.h | |
parent | 2e4bf373f2ae97be3adc654054e7e8a982813766 (diff) | |
download | gcc-1c91b014923f418e0aab789c5cf57facf04bf266.zip gcc-1c91b014923f418e0aab789c5cf57facf04bf266.tar.gz gcc-1c91b014923f418e0aab789c5cf57facf04bf266.tar.bz2 |
Fix omp-low ICE for indirect references based off component access [PR103642]
This issue was triggered after the patch extending syntax for component access
in map clauses in commit 0ab29cf0bb68960c1f87405f14b4fb2109254e2f.
In gimplify_scan_omp_clauses, the case for handling indirect accesses (which
creates firstprivate ptr and zero-length array section map for such decls) was
erroneously went into for non-pointer cases (here being the base struct decl),
so added the
appropriate checks there.
Added new testcase is a compile only test for the ICE. The original omptests
t-partial-struct test actually should not execute correctly, because for
map(t.s->a[:N]), map(t.s[:1]) is not implicitly mapped, thus the entire
offloaded access does not work as is (fixing that omptests test is out of
scope here).
2022-01-27 Chung-Lin Tang <cltang@codesourcery.com>
PR middle-end/103642
gcc/ChangeLog:
* gimplify.cc (gimplify_scan_omp_clauses): Do not do indir_p handling
for non-pointer or non-reference-to-pointer cases.
gcc/testsuite/ChangeLog:
* c-c++-common/gomp/pr103642.c: New test.
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions