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
This commit is contained in:
Patrick Marlier 2012-02-06 14:42:07 +00:00 committed by Aldy Hernandez
parent 1d30a09a48
commit fe924d9ff0
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,10 @@
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>
PR tree-optimization/50955

View File

@ -716,7 +716,7 @@ flags_from_decl_or_type (const_tree exp)
{
if (is_tm_builtin (exp))
flags |= ECF_TM_BUILTIN;
else if ((flags & ECF_CONST) != 0
else if ((flags & (ECF_CONST|ECF_NOVOPS)) != 0
|| lookup_attribute ("transaction_pure",
TYPE_ATTRIBUTES (TREE_TYPE (exp))))
flags |= ECF_TM_PURE;

View File

@ -1,5 +1,5 @@
/* 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.
@ -2267,6 +2267,8 @@ expand_call_tm (struct tm_region *region,
}
node = cgraph_get_node (fn_decl);
/* All calls should have cgraph here. */
gcc_assert (node);
if (node->local.tm_may_enter_irr)
transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE);