Fix cp-ubsan typo.
authorJason Merrill <jason@redhat.com>
Mon, 13 Nov 2017 22:12:49 +0000 (17:12 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 13 Nov 2017 22:12:49 +0000 (17:12 -0500)
* cp-ubsan.c (cp_ubsan_check_member_access_r): Fix handling of
INDIRECT_REF of ADDR_EXPR.

From-SVN: r254711

gcc/cp/ChangeLog
gcc/cp/cp-ubsan.c

index 37741f6fdc3b571e1b9152bb4b7d7de4a9c35d84..83cb401f51d3024e723efe5ea88ee2f82294bdc2 100644 (file)
@@ -1,5 +1,8 @@
 2017-11-13  Jason Merrill  <jason@redhat.com>
 
+       * cp-ubsan.c (cp_ubsan_check_member_access_r): Fix handling of
+       INDIRECT_REF of ADDR_EXPR.
+
        PR c++/82360 - ICE with static_cast in template.
        * call.c (perform_direct_initialization_if_possible): Check
        processing_template_decl.
index cd2b60ad4889d0c97df6a9086d28f989de1b8064..73198b9cff266d3b4f8f7fc36501d44fb20ebb4b 100644 (file)
@@ -205,7 +205,7 @@ cp_ubsan_check_member_access_r (tree *stmt_p, int *walk_subtrees, void *data)
       if (TREE_CODE (t) == ADDR_EXPR)
        {
          *walk_subtrees = 0;
-         t = TREE_OPERAND (stmt, 0);
+         t = TREE_OPERAND (t, 0);
          cp_walk_tree (&t, cp_ubsan_check_member_access_r, data, ucmd->pset);
        }
       break;