Commit fe924d9f by Patrick Marlier Committed by Aldy Hernandez

re PR middle-end/52047 ([trans-mem] ICE: SIGSEGV in execute_tm_mark…

re PR middle-end/52047 ([trans-mem] ICE: SIGSEGV in execute_tm_mark (trans-mem.c:2270) with -O -fgnu-tm -fprefetch-loop-arrays)

        PR middle-end/52047
        * trans-mem.c (expand_call_tm): Add an assertion.
        * calls.c (flags_from_decl_or_type): Add ECF_TM_PURE to 'no vops'
        functions.

From-SVN: r183936
parent 1d30a09a
2012-02-06 Patrick Marlier <patrick.marlier@gmail.com>
PR middle-end/52047
* trans-mem.c (expand_call_tm): Add an assertion.
* calls.c (flags_from_decl_or_type): Add ECF_TM_PURE to 'no vops'
functions.
2012-02-06 Richard Guenther <rguenther@suse.de> 2012-02-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50955 PR tree-optimization/50955
......
...@@ -716,7 +716,7 @@ flags_from_decl_or_type (const_tree exp) ...@@ -716,7 +716,7 @@ flags_from_decl_or_type (const_tree exp)
{ {
if (is_tm_builtin (exp)) if (is_tm_builtin (exp))
flags |= ECF_TM_BUILTIN; flags |= ECF_TM_BUILTIN;
else if ((flags & ECF_CONST) != 0 else if ((flags & (ECF_CONST|ECF_NOVOPS)) != 0
|| lookup_attribute ("transaction_pure", || lookup_attribute ("transaction_pure",
TYPE_ATTRIBUTES (TREE_TYPE (exp)))) TYPE_ATTRIBUTES (TREE_TYPE (exp))))
flags |= ECF_TM_PURE; flags |= ECF_TM_PURE;
......
/* Passes for transactional memory support. /* Passes for transactional memory support.
Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -2267,6 +2267,8 @@ expand_call_tm (struct tm_region *region, ...@@ -2267,6 +2267,8 @@ expand_call_tm (struct tm_region *region,
} }
node = cgraph_get_node (fn_decl); node = cgraph_get_node (fn_decl);
/* All calls should have cgraph here. */
gcc_assert (node);
if (node->local.tm_may_enter_irr) if (node->local.tm_may_enter_irr)
transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE); transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment