Cesar Philippidis 65b5f49699 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>

From-SVN: r266923
2018-12-09 13:48:26 +01:00
..
2018-12-06 18:56:58 +01:00