diff options
author | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-30 09:08:14 +0000 |
---|---|---|
committer | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-30 09:08:14 +0000 |
commit | b4c881eb3518fdcefebbbb84a89d1e5b1b33a03f (patch) | |
tree | 2f282bf555c7fcc5e94fbb7502b91ea8a817b400 /gcc/gimplify.c | |
parent | cd03d35e83a9cb8aa272ce0c662100037a8d31dc (diff) | |
download | gcc-b4c881eb3518fdcefebbbb84a89d1e5b1b33a03f.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204198 138bc75d-0d04-0410-961f-82ee72b054a4
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 5edc6e8c33d..1f18466fa87 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; |