Commit fe8a99d8 by Martin Liska Committed by Martin Liska

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
parent a8b522b4
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>
* asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
TARGET_SUPPORTS_ALIASES.
* cgraph.c (cgraph_node::create_same_body_alias): Likewise.
......
2017-08-11 Martin Liska <mliska@suse.cz>
PR tree-opt/79987
* gcc.target/i386/mpx/pr79987.c: New test.
2017-08-11 Martin Liska <mliska@suse.cz>
PR ipa/81213
* gcc.target/i386/pr81213.c: New test.
......
/* { dg-do compile } */
/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
extern void foo;
void *bar = &foo; /* { dg-warning "taking address of expression of type .void." } */
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment