diff options
author | Jan Hubicka <jh@suse.cz> | 2013-08-30 10:11:41 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-08-30 08:11:41 +0000 |
commit | 47500756e5b5f8469ae0a323f03b613ac50e0bdc (patch) | |
tree | fc647f8a81a976e0d62bf7a102c25fff3ed64626 /gcc | |
parent | 6e8dad054f8de5c33f3837c84b4f4be57e83e7da (diff) | |
download | gcc-47500756e5b5f8469ae0a323f03b613ac50e0bdc.zip gcc-47500756e5b5f8469ae0a323f03b613ac50e0bdc.tar.gz gcc-47500756e5b5f8469ae0a323f03b613ac50e0bdc.tar.bz2 |
* tree.c (set_call_expr_flags): Fix handling of TM_PURE.
From-SVN: r202098
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/tree.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5720a2a..171988a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2013-08-29 Jan Hubicka <jh@suse.cz> + + * tree.c (set_call_expr_flags): Fix handling of TM_PURE. + 2013-08-30 Richard Biener <rguenther@suse.de> PR tree-optimization/58228 @@ -9794,7 +9794,10 @@ build_common_tree_nodes (bool signed_char, bool short_double) } } -/* Modify DECL for given flags. */ +/* Modify DECL for given flags. + TM_PURE attribute is set only on types, so the function will modify + DECL's type when ECF_TM_PURE is used. */ + void set_call_expr_flags (tree decl, int flags) { @@ -9818,8 +9821,7 @@ set_call_expr_flags (tree decl, int flags) DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("leaf"), NULL, DECL_ATTRIBUTES (decl)); if ((flags & ECF_TM_PURE) && flag_tm) - DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("transaction_pure"), - NULL, DECL_ATTRIBUTES (decl)); + apply_tm_attr (decl, get_identifier ("transaction_pure")); /* Looping const or pure is implied by noreturn. There is currently no way to declare looping const or looping pure alone. */ gcc_assert (!(flags & ECF_LOOPING_CONST_OR_PURE) |