diff options
author | Paul Brook <paul@codesourcery.com> | 2011-10-31 14:26:38 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2011-10-31 14:26:38 +0000 |
commit | 2062f77b8b897691f102434aeec3253ad2ea28a5 (patch) | |
tree | 42ff300848a41e6cdbc324d1a275461b455846f8 /gcc/cgraphunit.c | |
parent | 41bd49ea5fb7c089aa2def40e07c548af8a745e2 (diff) | |
download | gcc-2062f77b8b897691f102434aeec3253ad2ea28a5.zip gcc-2062f77b8b897691f102434aeec3253ad2ea28a5.tar.gz gcc-2062f77b8b897691f102434aeec3253ad2ea28a5.tar.bz2 |
cgraphunit.c: Don't mark clones as static constructors.
2011-10-31 Paul Brook <paul@codesourcery.com>
gcc/
* cgraphunit.c: Don't mark clones as static constructors.
gcc/testsuite/
* gcc.dg/constructor-1.c: New test.
From-SVN: r180700
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 25d7561..83c47ab 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2366,6 +2366,10 @@ cgraph_function_versioning (struct cgraph_node *old_version_node, SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); SET_DECL_RTL (new_decl, NULL); + /* When the old decl was a con-/destructor make sure the clone isn't. */ + DECL_STATIC_CONSTRUCTOR(new_decl) = 0; + DECL_STATIC_DESTRUCTOR(new_decl) = 0; + /* Create the new version's call-graph node. and update the edges of the new node. */ new_version_node = |