[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 98a2528783a9cfe2efe7cab14d421b78c76e90e0..2c8b7d10ae4eea7278754d28f5c71ec3ddde92d8 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 3ef1eda451885ad31ee3bb1dce74d1772b3d709a..634485b5a8c7f26f592042ba846e62ba707a8def 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;
 }