Commit 71671f5d by Ilya Enkovich Committed by Ilya Enkovich

ipa-chkp.c (chkp_maybe_create_clone): Reset cdtor flags for instrumentation thunk.

gcc/

	* ipa-chkp.c (chkp_maybe_create_clone): Reset cdtor
	flags for instrumentation thunk.
	(chkp_produce_thunks): Likewise.

gcc/testsuite/

	* gcc.dg/lto/chkp-ctor-merge_0.c: New.

From-SVN: r221877
parent f1e52038
2015-04-06 Ilya Enkovich <ilya.enkovich@intel.com>
* ipa-chkp.c (chkp_maybe_create_clone): Reset cdtor
flags for instrumentation thunk.
(chkp_produce_thunks): Likewise.
2015-04-05 Martin Liska <mliska@suse.cz>
PR ipa/65665
......
......@@ -550,6 +550,9 @@ chkp_maybe_create_clone (tree fndecl)
clone->thunk.thunk_p = true;
clone->thunk.add_pointer_bounds_args = true;
clone->create_edge (node, NULL, 0, CGRAPH_FREQ_BASE);
/* Thunk shouldn't be a cdtor. */
DECL_STATIC_CONSTRUCTOR (clone->decl) = 0;
DECL_STATIC_DESTRUCTOR (clone->decl) = 0;
}
else
{
......@@ -714,6 +717,9 @@ chkp_produce_thunks (bool early)
0, CGRAPH_FREQ_BASE);
node->create_reference (node->instrumented_version,
IPA_REF_CHKP, NULL);
/* Thunk shouldn't be a cdtor. */
DECL_STATIC_CONSTRUCTOR (node->decl) = 0;
DECL_STATIC_DESTRUCTOR (node->decl) = 0;
}
}
......
2015-04-06 Ilya Enkovich <ilya.enkovich@intel.com>
* gcc.dg/lto/chkp-ctor-merge_0.c: New.
2015-04-04 Vladimir Makarov <vmakarov@redhat.com>
PR target/65647
......
/* { dg-lto-do run } */
/* { dg-require-effective-target mpx } */
/* { dg-lto-options { { -O2 -flto -fcheck-pointer-bounds -mmpx -nodefaultlibs -lc } } } */
int glob = 1;
void __attribute__((constructor))
ctor1 ()
{
glob += 1;
}
void __attribute__((constructor))
ctor2 ()
{
glob -= 2;
}
int main (int argc, const char **argv)
{
return glob;
}
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