From cd920e1348eaa1100b90f378f44e110152816149 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 13 Nov 2017 17:12:49 -0500 Subject: [PATCH] Fix cp-ubsan typo. * cp-ubsan.c (cp_ubsan_check_member_access_r): Fix handling of INDIRECT_REF of ADDR_EXPR. From-SVN: r254711 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/cp-ubsan.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 37741f6fdc3..83cb401f51d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2017-11-13 Jason Merrill + * 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. diff --git a/gcc/cp/cp-ubsan.c b/gcc/cp/cp-ubsan.c index cd2b60ad488..73198b9cff2 100644 --- a/gcc/cp/cp-ubsan.c +++ b/gcc/cp/cp-ubsan.c @@ -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; -- 2.30.2