summaryrefslogtreecommitdiff
path: root/gcc/tree-chkp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-chkp.c')
-rw-r--r--gcc/tree-chkp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
index e241f50f308..951aec10b3a 100644
--- a/gcc/tree-chkp.c
+++ b/gcc/tree-chkp.c
@@ -52,6 +52,8 @@ along with GCC; see the file COPYING3. If not see
#include "tree-dfa.h"
#include "ipa-chkp.h"
#include "params.h"
+#include "stringpool.h"
+#include "attribs.h"
/* Pointer Bounds Checker instruments code with memory checks to find
out-of-bounds memory accesses. Checks are performed by computing
@@ -3195,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)