diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-03-27 10:25:01 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-03-27 10:25:01 +0200 |
commit | 7cd200f63f80396e9ddfe163a3fed86fd2aed672 (patch) | |
tree | 9d890861f781d818c9cf51163d9891b54bed78b5 /gcc/asan.c | |
parent | 79f512ffebee22885684ff63bc3d66e7e6db9b4b (diff) | |
download | gcc-7cd200f63f80396e9ddfe163a3fed86fd2aed672.zip gcc-7cd200f63f80396e9ddfe163a3fed86fd2aed672.tar.gz gcc-7cd200f63f80396e9ddfe163a3fed86fd2aed672.tar.bz2 |
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
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1868,7 +1868,8 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t, tree repr = DECL_BIT_FIELD_REPRESENTATIVE (TREE_OPERAND (t, 1)); instrument_derefs (iter, build3 (COMPONENT_REF, TREE_TYPE (repr), TREE_OPERAND (t, 0), repr, - NULL_TREE), location, is_store); + TREE_OPERAND (t, 2)), + location, is_store); return; } |