Do not instrument static target_expr for use-after-scope (PR sanitizer/90570).
authorMartin Liska <mliska@suse.cz>
Thu, 23 May 2019 10:12:01 +0000 (12:12 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 23 May 2019 10:12:01 +0000 (10:12 +0000)
commit832ece86e5a9f98f49571ed6407a8d93c4f50e18
treea6b30518d5be13069c8276cda611649ee8be1e31
parent02b73313044f66774df9b38eadc519d3d7ee7a1b
Do not instrument static target_expr for use-after-scope (PR sanitizer/90570).

2019-05-23  Martin Liska  <mliska@suse.cz>

PR sanitizer/90570
* gimplify.c (gimplify_target_expr): Skip TREE_STATIC target
expression similarly to gimplify_decl_expr.
2019-05-23  Martin Liska  <mliska@suse.cz>

PR sanitizer/90570
* g++.dg/asan/pr90570.C: New test.

From-SVN: r271548
gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/asan/pr90570.C [new file with mode: 0644]