diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2021-05-13 00:12:31 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2021-05-13 00:14:34 +0200 |
commit | d21963ce7a87db3d4a6921a0fa98b72ea6f4e7f5 (patch) | |
tree | db0aa327d96d9b4cd8630044235d7cc9c3cf669a /gcc/omp-low.c | |
parent | db514f98a383b2ebdcfe74feb80f98f406cec174 (diff) | |
download | gcc-d21963ce7a87db3d4a6921a0fa98b72ea6f4e7f5.zip gcc-d21963ce7a87db3d4a6921a0fa98b72ea6f4e7f5.tar.gz gcc-d21963ce7a87db3d4a6921a0fa98b72ea6f4e7f5.tar.bz2 |
OpenMP: detach - fix firstprivate handling
gcc/ChangeLog:
* omp-low.c (finish_taskreg_scan): Use the proper detach decl.
libgomp/ChangeLog:
* testsuite/libgomp.c-c++-common/task-detach-12.c: New test.
* testsuite/libgomp.fortran/task-detach-12.f90: New test.
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index c0ce1a4..cadca7e 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2460,7 +2460,7 @@ finish_taskreg_scan (omp_context *ctx) TYPE_FIELDS (ctx->record_type) = field; if (ctx->srecord_type) { - field = lookup_sfield (OMP_CLAUSE_DECL (detach_clause), ctx); + field = lookup_sfield (OMP_CLAUSE_DECL (c), ctx); p = &TYPE_FIELDS (ctx->srecord_type); while (*p) if (*p == field) |