diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-04-25 12:02:24 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-04-25 12:02:24 +0200 |
commit | b33a0cb323fa000f8fe50b8ad844fda2bda47c1d (patch) | |
tree | 14ae49465d58278bc2c4e120847f9c4c7c40e6d7 /gcc/c/c-decl.c | |
parent | 87ed4159acd89266d3aeae39c3ce9e548556d7f4 (diff) | |
download | gcc-b33a0cb323fa000f8fe50b8ad844fda2bda47c1d.zip gcc-b33a0cb323fa000f8fe50b8ad844fda2bda47c1d.tar.gz gcc-b33a0cb323fa000f8fe50b8ad844fda2bda47c1d.tar.bz2 |
re PR sanitizer/84307 (asan blocks dead-store elimination)
PR sanitizer/84307
* c-decl.c (build_compound_literal): Call pushdecl (decl) even when
it is not TREE_STATIC.
* c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
its COMPOUND_LITERAL_EXPR_DECL.
From-SVN: r259641
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index f0198ec..7255588 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -5348,6 +5348,8 @@ build_compound_literal (location_t loc, tree type, tree init, bool non_const, pushdecl (decl); rest_of_decl_compilation (decl, 1, 0); } + else + pushdecl (decl); if (non_const) { |