aboutsummaryrefslogtreecommitdiff
path: root/gcc/ubsan.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-03-07 07:11:14 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-03-07 07:11:14 +0100
commit1f6dba54da4c437e74fbb1c92621adb33582efff (patch)
tree650681b7c596b0039d28f13112a1d8d99a50ca8c /gcc/ubsan.c
parent45174deccead5dbdfd20e69c867195448e5931ff (diff)
downloadgcc-1f6dba54da4c437e74fbb1c92621adb33582efff.zip
gcc-1f6dba54da4c437e74fbb1c92621adb33582efff.tar.gz
gcc-1f6dba54da4c437e74fbb1c92621adb33582efff.tar.bz2
re PR sanitizer/79897 (ICE in gimplify_modify_expr, at gimplify.c:5627 on ARM target)
PR sanitizer/79897 * ubsan.c (ubsan_encode_value): Call mark_addressable on the temporary. * c-c++-common/ubsan/pr79897.c: New test. From-SVN: r245945
Diffstat (limited to 'gcc/ubsan.c')
-rw-r--r--gcc/ubsan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index 11a41e1..17965ef 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -145,6 +145,7 @@ ubsan_encode_value (tree t, bool in_expand_p)
code by making vars unnecessarily addressable. */
tree var = create_tmp_var (type);
tree tem = build2 (MODIFY_EXPR, void_type_node, var, t);
+ mark_addressable (var);
if (in_expand_p)
{
rtx mem