_XAddPixel is miscompiled by VRP. Reduced testcase: extern void abort(void);
int __attribute__((noinline)) foo(int bits_per_pixel, int depth) { if ((bits_per_pixel | depth) == 1) return 0; else if (bits_per_pixel == 2) return 1; return 2; } int main() { if (foo(2, 0) != 1) abort (); return 0; } where we before the bits_per_pixel == 2 assert that bits_per_pixel == 0, derived from !(bits_per_pixel | depth == 1). -- Summary: [4.3 Regression] VRP miscompiles libX11 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35231