On Fri, Mar 18, 2022 at 02:15:11PM +0100, Tobias Burnus wrote:
> This patch addresses a side issue found when looking at PR103039.
> 
> Namely instead of printing:
> 
>    55 |   !$omp parallel firstprivate(tt)
>       |                              1
> Error: ASSOCIATE name ‘__tmp_INTEGER_4’ in FIRSTPRIVATE clause at (1)
> 
> With the patch, the error is:
> 
> Error: Associate name ‘tt’ in FIRSTPRIVATE clause at (1)
> 
> That is: It prints the proper name and it uses 'associate name'
> matching the Fortran standard – and takes into account that an
> associate name not only used with ASSOCIATE but also with
> SELECT TYPE, SELECT RANK, and (untested) CHANGE TEAMS.
> 
> OK for mainline?

LGTM, thanks.

> Fortran/OpenMP: Improve associate-name diagnostic [PR103039]
> 
> gcc/fortran/ChangeLog:
> 
>       PR fortran/103039
>       * openmp.cc (resolve_omp_clauses): Improve associate-name diagnostic
>       for select type/rank.
> 
> gcc/testsuite/ChangeLog:
> 
>       PR fortran/103039
>       * gfortran.dg/gomp/associate1.f90: Update dg-error.
>       * gfortran.dg/gomp/associate2.f90: New test.
> 
>  gcc/fortran/openmp.cc                         | 12 +++--
>  gcc/testsuite/gfortran.dg/gomp/associate1.f90 | 40 +++++++-------
>  gcc/testsuite/gfortran.dg/gomp/associate2.f90 | 76 
> +++++++++++++++++++++++++++
>  3 files changed, 104 insertions(+), 24 deletions(-)

        Jakub

Reply via email to