This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More front end type mismatch problems
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: dnovillo at redhat dot com (Diego Novillo)
- Cc: gcc at gcc dot gnu dot org, rth at redhat dot com (Richard Henderson)
- Date: Fri, 27 May 2005 14:32:46 -0400 (EDT)
- Subject: Re: More front end type mismatch problems
>
> This is happening in gcc.dg/tree-ssa/20040121-1.c. The test
> specifically tests that (p!=0) + (q!=0) should be computed as
> int:
>
> char *foo(char *p, char *q) {
> int x = (p !=0) + (q != 0);
> ...
> }
>
> During VRP, we get this IL
>
> D.1294_10 = first_8 != 0B;
> D.1295_11 = last_9 != 0B;
> x_12 = D.1294_10 + D.1295_11;
For me (on the mainline as of last night),
both D.1294 and D.1295 are of type int so it
looks like a bug in VRP assuming the resulting
type of a comparison will a boolean type.
Thanks,
Andrew Pinski