diff options
author | Richard Biener <rguenther@suse.de> | 2018-11-15 13:44:34 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-11-15 13:44:34 +0000 |
commit | 0e02fb26381e7c8a4766eb0e29c325b5ef6917f9 (patch) | |
tree | 847f652b13c72a623572026c35b54afecacf9801 /gcc/gimple.c | |
parent | 22692f3ce9d00eac18d5582de90dda5ae5c07c77 (diff) | |
download | gcc-0e02fb26381e7c8a4766eb0e29c325b5ef6917f9.zip gcc-0e02fb26381e7c8a4766eb0e29c325b5ef6917f9.tar.gz gcc-0e02fb26381e7c8a4766eb0e29c325b5ef6917f9.tar.bz2 |
re PR tree-optimization/88029 (ICE in execute_todo, at passes.c:1974)
2018-11-15 Richard Biener <rguenther@suse.de>
PR middle-end/88029
* gimple.c (gimple_call_flags): Union flags from decl, type
and call fntype.
* trans-mem.c (is_tm_pure_call): Simplify.
* gcc.dg/tree-ssa/pr88029.c: New testcase.
From-SVN: r266183
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 41d9f67..23ccbae 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1446,15 +1446,17 @@ gimple_call_same_target_p (const gimple *c1, const gimple *c2) int gimple_call_flags (const gimple *stmt) { - int flags; - tree decl = gimple_call_fndecl (stmt); + int flags = 0; - if (decl) - flags = flags_from_decl_or_type (decl); - else if (gimple_call_internal_p (stmt)) + if (gimple_call_internal_p (stmt)) flags = internal_fn_flags (gimple_call_internal_fn (stmt)); else - flags = flags_from_decl_or_type (gimple_call_fntype (stmt)); + { + tree decl = gimple_call_fndecl (stmt); + if (decl) + flags = flags_from_decl_or_type (decl); + flags |= flags_from_decl_or_type (gimple_call_fntype (stmt)); + } if (stmt->subcode & GF_CALL_NOTHROW) flags |= ECF_NOTHROW; |