This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r266923 - in /trunk/gcc: cp/ChangeLog cp/parser...
- From: tschwinge at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Sun, 09 Dec 2018 12:48:49 -0000
- Subject: r266923 - in /trunk/gcc: cp/ChangeLog cp/parser...
Author: tschwinge
Date: Sun Dec 9 12:48:26 2018
New Revision: 266923
URL: https://gcc.gnu.org/viewcvs?rev=266923&root=gcc&view=rev
Log:
Correct the reported line number in C++ combined OpenACC directives
The C++ FE doesn't set the expr_location of the split acc loop in combined acc
parallel/kernels loop directives. This only happens for with combined
directives, otherwise cp_parser_omp_construct would be responsible for setting
the location. After fixing this bug, I was able to resolve a couple of long
standing diagnostics discrepancies between the C/C++ FEs in the test suite.
gcc/cp/
* parser.c (cp_parser_oacc_kernels_parallel): Adjust EXPR_LOCATION
on the combined acc loop.
gcc/testsuite/
* c-c++-common/goacc/combined-directives-3.c: New test.
* c-c++-common/goacc/loop-2-kernels.c (void K): Adjust test.
* c-c++-common/goacc/loop-2-parallel.c (void P): Adjust test.
* c-c++-common/goacc/loop-3.c (void p2): Adjust test.
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
Added:
trunk/gcc/testsuite/c-c++-common/goacc/combined-directives-3.c
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/goacc/loop-2-kernels.c
trunk/gcc/testsuite/c-c++-common/goacc/loop-2-parallel.c
trunk/gcc/testsuite/c-c++-common/goacc/loop-3.c