summaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-11-15 13:44:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-11-15 13:44:34 +0000
commit0e02fb26381e7c8a4766eb0e29c325b5ef6917f9 (patch)
tree847f652b13c72a623572026c35b54afecacf9801 /gcc/gimple.c
parent22692f3ce9d00eac18d5582de90dda5ae5c07c77 (diff)
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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 41d9f677c4f..23ccbae6bcb 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;