From 7cd200f63f80396e9ddfe163a3fed86fd2aed672 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 27 Mar 2017 10:25:01 +0200 Subject: re PR sanitizer/80168 (ICE in make_decl_rtl, at varasm.c:1311 w/ VLA and -fsanitize=address) PR sanitizer/80168 * asan.c (instrument_derefs): Copy over last operand from original COMPONENT_REF to the new COMPONENT_REF with DECL_BIT_FIELD_REPRESENTATIVE. * ubsan.c (instrument_object_size): Likewise. * gcc.dg/asan/pr80168.c: New test. From-SVN: r246492 --- gcc/ubsan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ubsan.c') diff --git a/gcc/ubsan.c b/gcc/ubsan.c index 17965ef..323c1cc 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -1772,7 +1772,7 @@ instrument_object_size (gimple_stmt_iterator *gsi, bool is_lhs) { tree repr = DECL_BIT_FIELD_REPRESENTATIVE (TREE_OPERAND (t, 1)); t = build3 (COMPONENT_REF, TREE_TYPE (repr), TREE_OPERAND (t, 0), - repr, NULL_TREE); + repr, TREE_OPERAND (t, 2)); } break; case ARRAY_REF: -- cgit v1.1