On Wed, May 11, 2011 at 11:35 AM, Kai Tietz <ktiet...@googlemail.com> wrote:
> For more detail what happens and why this conditional handling is necessary:
>
> The sample code is:
>
> int
> foo (int a, int b)
> {
>  return (a ? b != 3 : 0);
> }
>
> leads for variant without condition boolifying of arms to:
>
> ;; Function foo (foo)
>
> foo (int a, int b)
> {
>  int D.1991;
>  int D.1990;
>  int D.1989;
>
> <bb 2>:
>  D.1990_2 = a_1(D) != 0;
>  D.1991_4 = b_3(D) != 3;
>  D.1989_5 = D.1991_4 & D.1990_2;
>  return D.1989_5;
>
> }

There is no TRUTH_* expr.  The patch should fix TRUTH_* expr types,
not everything else (I know tcc_comparison exprs have the same issue).

If you want to fix tcc_comparison results as well do so in gimplify_expr
(and adjust the type verifier similar to the TRUTH_ case).

Richard.

Reply via email to