> > 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