aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorIlya Enkovich <ilya.enkovich@intel.com>2013-10-30 09:08:14 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2013-10-30 09:08:14 +0000
commit0038da669587ccb1781a136f153a7e951d04465a (patch)
tree2f282bf555c7fcc5e94fbb7502b91ea8a817b400 /gcc/ipa.c
parent2017035a605bee47b3f4fdf6723fa7dabed2763c (diff)
downloadgcc-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/ipa.c')
-rw-r--r--gcc/ipa.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 868a9d2..9600b48c 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -1260,9 +1260,11 @@ make_pass_ipa_whole_program_visibility (gcc::context *ctxt)
}
/* Generate and emit a static constructor or destructor. WHICH must
- be one of 'I' (for a constructor) or 'D' (for a destructor). BODY
- is a STATEMENT_LIST containing GENERIC statements. PRIORITY is the
- initialization priority for this constructor or destructor.
+ be one of 'I' (for a constructor), 'D' (for a destructor), 'P'
+ (for chp static vars constructor) or 'B' (for chkp static bounds
+ constructor). BODY is a STATEMENT_LIST containing GENERIC
+ statements. PRIORITY is the initialization priority for this
+ constructor or destructor.
FINAL specify whether the externally visible name for collect2 should
be produced. */
@@ -1321,6 +1323,20 @@ cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final)
DECL_STATIC_CONSTRUCTOR (decl) = 1;
decl_init_priority_insert (decl, priority);
break;
+ case 'P':
+ DECL_STATIC_CONSTRUCTOR (decl) = 1;
+ DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("chkp ctor"),
+ NULL,
+ NULL_TREE);
+ decl_init_priority_insert (decl, priority);
+ break;
+ case 'B':
+ DECL_STATIC_CONSTRUCTOR (decl) = 1;
+ DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("bnd_legacy"),
+ NULL,
+ NULL_TREE);
+ decl_init_priority_insert (decl, priority);
+ break;
case 'D':
DECL_STATIC_DESTRUCTOR (decl) = 1;
decl_fini_priority_insert (decl, priority);
@@ -1338,9 +1354,11 @@ cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final)
}
/* Generate and emit a static constructor or destructor. WHICH must
- be one of 'I' (for a constructor) or 'D' (for a destructor). BODY
- is a STATEMENT_LIST containing GENERIC statements. PRIORITY is the
- initialization priority for this constructor or destructor. */
+ be one of 'I' (for a constructor), 'D' (for a destructor), 'P'
+ (for chkp static vars constructor) or 'B' (for chkp static bounds
+ constructor). BODY is a STATEMENT_LIST containing GENERIC
+ statements. PRIORITY is the initialization priority for this
+ constructor or destructor. */
void
cgraph_build_static_cdtor (char which, tree body, int priority)