This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]