diff options
author | Martin Liska <mliska@suse.cz> | 2017-08-11 12:01:13 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-08-11 10:01:13 +0000 |
commit | fe8a99d8cdcfacf14b603b99a7730d18ce0ccd1f (patch) | |
tree | 811303a849108a7aac4ab132aa9d5b1becc7e2df /gcc/tree-chkp.c | |
parent | a8b522b483ebb8c972ecfde8779a7a6ec16aecd6 (diff) | |
download | gcc-fe8a99d8cdcfacf14b603b99a7730d18ce0ccd1f.zip gcc-fe8a99d8cdcfacf14b603b99a7730d18ce0ccd1f.tar.gz gcc-fe8a99d8cdcfacf14b603b99a7730d18ce0ccd1f.tar.bz2 |
Do not instrument void variables with MPX (PR tree-opt/79987).
2017-08-11 Martin Liska <mliska@suse.cz>
PR tree-opt/79987
* tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
variables of void type.
2017-08-11 Martin Liska <mliska@suse.cz>
PR tree-opt/79987
* gcc.target/i386/mpx/pr79987.c: New test.
From-SVN: r251049
Diffstat (limited to 'gcc/tree-chkp.c')
-rw-r--r-- | gcc/tree-chkp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c index 12af458..951aec1 100644 --- a/gcc/tree-chkp.c +++ b/gcc/tree-chkp.c @@ -3197,6 +3197,9 @@ chkp_get_bounds_for_decl_addr (tree decl) && !flag_chkp_incomplete_type) return chkp_get_zero_bounds (); + if (VOID_TYPE_P (TREE_TYPE (decl))) + return chkp_get_zero_bounds (); + if (flag_chkp_use_static_bounds && VAR_P (decl) && (TREE_STATIC (decl) |