This is an old gomp4 patch that updates the location of the clause for
acc enter/exit data. Apparently, it didn't impact any test cases. Is
this OK for trunk or should we drop it from OG8?

I bootstrapped and regtested it for x86_64 Linux with nvptx offloading.

Thanks,
Cesar
[OpenACC] Use existing local variable in cp_parser_oacc_enter_exit_data

2018-XX-YY  James Norris <jnor...@codesourcery.com>
	    Cesar Philippidis  <ce...@codesourcery.com>

	gcc/cp/
	* parser.c (cp_parser_oacc_enter_exit_data): Use existing local
	variable.

(cherry picked from gomp-4_0-branch r223007)
---

diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 89f239e0f20..c6ebc494e59 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -37064,7 +37064,7 @@ cp_parser_oacc_enter_exit_data (cp_parser *parser, cp_token *pragma_tok,
   stmt = enter ? make_node (OACC_ENTER_DATA) : make_node (OACC_EXIT_DATA);
   TREE_TYPE (stmt) = void_type_node;
   OMP_STANDALONE_CLAUSES (stmt) = clauses;
-  SET_EXPR_LOCATION (stmt, pragma_tok->location);
+  SET_EXPR_LOCATION (stmt, loc);
   add_stmt (stmt);
   return stmt;
 }
-- 
2.17.1

Reply via email to