aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/gimple.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/gimple.c')
-rw-r--r--gcc-4.9/gcc/gimple.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc-4.9/gcc/gimple.c b/gcc-4.9/gcc/gimple.c
index d48134647..b55d7c4e3 100644
--- a/gcc-4.9/gcc/gimple.c
+++ b/gcc-4.9/gcc/gimple.c
@@ -1330,11 +1330,14 @@ gimple_call_flags (const_gimple stmt)
/* Return the "fn spec" string for call STMT. */
-static tree
+static const_tree
gimple_call_fnspec (const_gimple stmt)
{
tree type, attr;
+ if (gimple_call_internal_p (stmt))
+ return internal_fn_fnspec (gimple_call_internal_fn (stmt));
+
type = gimple_call_fntype (stmt);
if (!type)
return NULL_TREE;
@@ -1351,7 +1354,7 @@ gimple_call_fnspec (const_gimple stmt)
int
gimple_call_arg_flags (const_gimple stmt, unsigned arg)
{
- tree attr = gimple_call_fnspec (stmt);
+ const_tree attr = gimple_call_fnspec (stmt);
if (!attr || 1 + arg >= (unsigned) TREE_STRING_LENGTH (attr))
return 0;
@@ -1385,7 +1388,7 @@ gimple_call_arg_flags (const_gimple stmt, unsigned arg)
int
gimple_call_return_flags (const_gimple stmt)
{
- tree attr;
+ const_tree attr;
if (gimple_call_flags (stmt) & ECF_MALLOC)
return ERF_NOALIAS;