switch (func)
{
case CFN_BUILT_IN_CONSTANT_P:
+ if (gimple_call_num_args (call) != 1)
+ return;
m_op1 = gimple_call_arg (call, 0);
if (irange::supports_p (TREE_TYPE (m_op1)))
m_operator = &op_cfn_constant_p;
break;
CASE_FLT_FN (CFN_BUILT_IN_SIGNBIT):
+ if (gimple_call_num_args (call) != 1)
+ return;
m_op1 = gimple_call_arg (call, 0);
m_operator = &op_cfn_signbit;
break;
CASE_FLT_FN (CFN_BUILT_IN_ISINF):
+ if (gimple_call_num_args (call) != 1)
+ return;
m_op1 = gimple_call_arg (call, 0);
m_operator = &op_cfn_isinf;
break;
case CFN_BUILT_IN_ISFINITE:
+ if (gimple_call_num_args (call) != 1)
+ return;
m_op1 = gimple_call_arg (call, 0);
m_operator = &op_cfn_isfinite;
break;
case CFN_BUILT_IN_ISNORMAL:
+ if (gimple_call_num_args (call) != 1)
+ return;
m_op1 = gimple_call_arg (call, 0);
m_operator = &op_cfn_isnormal;
break;
default:
{
unsigned arg;
- if (gimple_call_fnspec (call).returns_arg (&arg) && arg == 0)
+ if (gimple_call_fnspec (call).returns_arg (&arg)
+ && arg == 0
+ && gimple_call_num_args (call) > 0)
{
m_op1 = gimple_call_arg (call, 0);
m_operator = &op_cfn_pass_through_arg1;