diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2012-01-23 17:53:51 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2012-01-23 17:53:51 +0000 |
commit | e617b554f875af03992ab03b45752bfdeb418730 (patch) | |
tree | 07e1352f51708c7ae1280f8dab60e5344e1c3e3a | |
parent | b53d0fe275e48d4488804ebb88bef73a24b3ed65 (diff) | |
download | gcc-e617b554f875af03992ab03b45752bfdeb418730.zip gcc-e617b554f875af03992ab03b45752bfdeb418730.tar.gz gcc-e617b554f875af03992ab03b45752bfdeb418730.tar.bz2 |
trans-mem.c (ipa_tm_create_version): Set externally_visible.
* trans-mem.c (ipa_tm_create_version): Set externally_visible.
(ipa_tm_create_version_alias): Same.
From-SVN: r183444
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/lto-1.c | 9 | ||||
-rw-r--r-- | gcc/trans-mem.c | 4 |
3 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c697580d..c86d926 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-23 Aldy Hernandez <aldyh@redhat.com> + + * trans-mem.c (ipa_tm_create_version): Set externally_visible. + (ipa_tm_create_version_alias): Same. + 2012-01-18 Uros Bizjak <ubizjak@gmail.com> PR libitm/51830 diff --git a/gcc/testsuite/gcc.dg/tm/lto-1.c b/gcc/testsuite/gcc.dg/tm/lto-1.c new file mode 100644 index 0000000..c254b3e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tm/lto-1.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm -flto" } */ + +__attribute__((transaction_safe)) +void foo() +{ +} + +/* { dg-final { scan-assembler "ZGTt3foo" } } */ diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 30dc4b3..de7a913 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -4219,7 +4219,7 @@ struct create_version_alias_info tree new_decl; }; -/* A subrontine of ipa_tm_create_version, called via +/* A subroutine of ipa_tm_create_version, called via cgraph_for_node_and_aliases. Create new tm clones for each of the existing aliases. */ static bool @@ -4259,6 +4259,7 @@ ipa_tm_create_version_alias (struct cgraph_node *node, void *data) new_node = cgraph_same_body_alias (NULL, new_decl, info->new_decl); new_node->tm_clone = true; + new_node->local.externally_visible = info->old_node->local.externally_visible; /* ?? Do not traverse aliases here. */ get_cg_data (&node, false)->clone = new_node; @@ -4294,6 +4295,7 @@ ipa_tm_create_version (struct cgraph_node *old_node) DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl)); new_node = cgraph_copy_node_for_versioning (old_node, new_decl, NULL, NULL); + new_node->local.externally_visible = old_node->local.externally_visible; new_node->lowered = true; new_node->tm_clone = 1; get_cg_data (&old_node, true)->clone = new_node; |