On Sat, Nov 22, 2014 at 12:09:46PM +0100, Martin Jambor wrote:
> 2014-11-21 Martin Jambor <[email protected]>
>
> PR ipa/63551
> * ipa-inline-analysis.c (evaluate_conditions_for_known_args): Convert
> value of the argument to the type of the value in the condition.
>
> testsuite/
> * gcc.dg/ipa/pr63551.c: New test.
>
>
> Index: src/gcc/ipa-inline-analysis.c
> ===================================================================
> --- src.orig/gcc/ipa-inline-analysis.c
> +++ src/gcc/ipa-inline-analysis.c
> @@ -880,7 +880,10 @@ evaluate_conditions_for_known_args (stru
> }
> if (c->code == IS_NOT_CONSTANT || c->code == CHANGED)
> continue;
> - res = fold_binary_to_constant (c->code, boolean_type_node, val,
> c->val);
> + val = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (c->val), val);
VCE should only be used if the sizes of the types are the same.
Is that always the case here?
Jakub