[C++] Use existing local variable in cp_parser_oacc_enter_exit_data
authorJames Norris <jnorris@codesourcery.com>
Fri, 30 Nov 2018 20:39:40 +0000 (20:39 +0000)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Fri, 30 Nov 2018 20:39:40 +0000 (21:39 +0100)
gcc/cp/
* parser.c (cp_parser_oacc_enter_exit_data): Use existing local
variable.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r266687

gcc/cp/ChangeLog
gcc/cp/parser.c

index 98a2528..2c8b7d1 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-30  James Norris  <jnorris@codesourcery.com>
+
+       * parser.c (cp_parser_oacc_enter_exit_data): Use existing local
+       variable.
+
 2018-11-29  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * decl.c (compute_array_index_type_loc): New, like the current
index 3ef1eda..634485b 100644 (file)
@@ -38472,7 +38472,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;
 }