diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2020-11-03 22:06:29 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2020-11-03 22:26:02 +0100 |
commit | fab72592d86d11b89a01f0f3c2c9c329d43466c1 (patch) | |
tree | 445a2dc949c8e911cea9fdd89a841d67e4d2522f /gcc/omp-low.c | |
parent | 12d05123053359903c2859c72ce29749662b3ab5 (diff) | |
download | gcc-fab72592d86d11b89a01f0f3c2c9c329d43466c1.zip gcc-fab72592d86d11b89a01f0f3c2c9c329d43466c1.tar.gz gcc-fab72592d86d11b89a01f0f3c2c9c329d43466c1.tar.bz2 |
[OpenACC] Use proper location to 'inform' of enclosing parent compute construct
Bug fix for recent commit beddd1762ad2bbe84dd776c54489153f83f21e56 "[OpenACC]
More precise diagnostics for 'gang', 'worker', 'vector' clauses with arguments
on 'loop' only allowed in 'kernels' regions":
> [...], and 'inform' at the location of the enclosing parent
> compute construct/[...].
Now really.
gcc/
* omp-low.c (scan_omp_for) <OpenACC>: Use proper location to
'inform' of enclosing parent compute construct.
gcc/testsuite/
* c-c++-common/goacc/pr92793-1.c: Extend.
* gfortran.dg/goacc/pr92793-1.f90: Likewise.
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 2f1a544..ea9008b 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2443,7 +2443,7 @@ scan_omp_for (gomp_for *stmt, omp_context *outer_ctx) "argument not permitted on %qs clause", omp_clause_code_name[OMP_CLAUSE_CODE (c)]); if (tgt) - inform (gimple_location (outer_ctx->stmt), + inform (gimple_location (tgt->stmt), "enclosing parent compute construct"); else if (oacc_get_fn_attrib (current_function_decl)) inform (DECL_SOURCE_LOCATION (current_function_decl), |