diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-06-27 09:23:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-06-27 09:23:54 +0200 |
commit | c103185290d8e69b03ab40678093514821615abd (patch) | |
tree | 8a0bd159bcd64de1dc52529a53b5c46a89b73d70 /gcc/ubsan.c | |
parent | 00296d7f68fe3f6ce378fed88eab9999af3a2449 (diff) | |
download | gcc-c103185290d8e69b03ab40678093514821615abd.zip gcc-c103185290d8e69b03ab40678093514821615abd.tar.gz gcc-c103185290d8e69b03ab40678093514821615abd.tar.bz2 |
re PR sanitizer/81209 (-fsanitize=undefined ICE on darwin)
PR sanitizer/81209
* ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
* g++.dg/ubsan/pr81209.C: New test.
From-SVN: r249678
Diffstat (limited to 'gcc/ubsan.c')
-rw-r--r-- | gcc/ubsan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ubsan.c b/gcc/ubsan.c index 44effdd..c7a06ef 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -153,6 +153,7 @@ ubsan_encode_value (tree t, enum ubsan_encode_value_phase phase) { var = create_tmp_var_raw (type); TREE_ADDRESSABLE (var) = 1; + DECL_CONTEXT (var) = current_function_decl; } if (phase == UBSAN_ENCODE_VALUE_RTL) { |