mirror of git://gcc.gnu.org/git/gcc.git
re PR middle-end/52888 (Unable to inline function pointer call with inexact signature match)
2012-04-10 Richard Guenther <rguenther@suse.de> PR middle-end/52888 * gimple-low.c (gimple_check_call_args): Properly account for compatible aggregate types. From-SVN: r186276
This commit is contained in:
parent
0878843fd5
commit
e30459d52b
|
@ -1,3 +1,9 @@
|
||||||
|
2012-04-10 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR middle-end/52888
|
||||||
|
* gimple-low.c (gimple_check_call_args): Properly account for
|
||||||
|
compatible aggregate types.
|
||||||
|
|
||||||
2012-04-10 Richard Guenther <rguenther@suse.de>
|
2012-04-10 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
* toplev.h (tree_rest_of_compilation): Remove.
|
* toplev.h (tree_rest_of_compilation): Remove.
|
||||||
|
|
|
@ -240,15 +240,17 @@ gimple_check_call_args (gimple stmt, tree fndecl)
|
||||||
i < nargs;
|
i < nargs;
|
||||||
i++, p = DECL_CHAIN (p))
|
i++, p = DECL_CHAIN (p))
|
||||||
{
|
{
|
||||||
|
tree arg;
|
||||||
/* We cannot distinguish a varargs function from the case
|
/* We cannot distinguish a varargs function from the case
|
||||||
of excess parameters, still deferring the inlining decision
|
of excess parameters, still deferring the inlining decision
|
||||||
to the callee is possible. */
|
to the callee is possible. */
|
||||||
if (!p)
|
if (!p)
|
||||||
break;
|
break;
|
||||||
|
arg = gimple_call_arg (stmt, i);
|
||||||
if (p == error_mark_node
|
if (p == error_mark_node
|
||||||
|| gimple_call_arg (stmt, i) == error_mark_node
|
|| arg == error_mark_node
|
||||||
|| !fold_convertible_p (DECL_ARG_TYPE (p),
|
|| (!types_compatible_p (DECL_ARG_TYPE (p), TREE_TYPE (arg))
|
||||||
gimple_call_arg (stmt, i)))
|
&& !fold_convertible_p (DECL_ARG_TYPE (p), arg)))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,15 +258,17 @@ gimple_check_call_args (gimple stmt, tree fndecl)
|
||||||
{
|
{
|
||||||
for (i = 0, p = parms; i < nargs; i++, p = TREE_CHAIN (p))
|
for (i = 0, p = parms; i < nargs; i++, p = TREE_CHAIN (p))
|
||||||
{
|
{
|
||||||
|
tree arg;
|
||||||
/* If this is a varargs function defer inlining decision
|
/* If this is a varargs function defer inlining decision
|
||||||
to callee. */
|
to callee. */
|
||||||
if (!p)
|
if (!p)
|
||||||
break;
|
break;
|
||||||
|
arg = gimple_call_arg (stmt, i);
|
||||||
if (TREE_VALUE (p) == error_mark_node
|
if (TREE_VALUE (p) == error_mark_node
|
||||||
|| gimple_call_arg (stmt, i) == error_mark_node
|
|| arg == error_mark_node
|
||||||
|| TREE_CODE (TREE_VALUE (p)) == VOID_TYPE
|
|| TREE_CODE (TREE_VALUE (p)) == VOID_TYPE
|
||||||
|| !fold_convertible_p (TREE_VALUE (p),
|
|| (!types_compatible_p (TREE_VALUE (p), TREE_TYPE (arg))
|
||||||
gimple_call_arg (stmt, i)))
|
&& !fold_convertible_p (TREE_VALUE (p), arg)))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue