diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2013-10-30 09:08:14 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2013-10-30 09:08:14 +0000 |
commit | 0038da669587ccb1781a136f153a7e951d04465a (patch) | |
tree | 2f282bf555c7fcc5e94fbb7502b91ea8a817b400 /gcc/gimplify.c | |
parent | 2017035a605bee47b3f4fdf6723fa7dabed2763c (diff) | |
download | gcc-0038da669587ccb1781a136f153a7e951d04465a.zip gcc-0038da669587ccb1781a136f153a7e951d04465a.tar.gz gcc-0038da669587ccb1781a136f153a7e951d04465a.tar.bz2 |
ipa.c (cgraph_build_static_cdtor_1): Support contructors with "chkp ctor" and "bnd_legacy" attributes.
* ipa.c (cgraph_build_static_cdtor_1): Support contructors
with "chkp ctor" and "bnd_legacy" attributes.
* gimplify.c (gimplify_init_constructor): Avoid infinite
loop during gimplification of bounds initializer.
From-SVN: r204198
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 5edc6e8..1f18466 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4080,10 +4080,19 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, individual element initialization. Also don't do this for small all-zero initializers (which aren't big enough to merit clearing), and don't try to make bitwise copies of - TREE_ADDRESSABLE types. */ + TREE_ADDRESSABLE types. + + We cannot apply such transformation when compiling chkp static + initializer because creation of initializer image in the memory + will require static initialization of bounds for it. It should + result in another gimplification of similar initializer and we + may fall into infinite loop. */ if (valid_const_initializer && !(cleared || num_nonzero_elements == 0) - && !TREE_ADDRESSABLE (type)) + && !TREE_ADDRESSABLE (type) + && (!current_function_decl + || !lookup_attribute ("chkp ctor", + DECL_ATTRIBUTES (current_function_decl)))) { HOST_WIDE_INT size = int_size_in_bytes (type); unsigned int align; |