------- Comment #19 from davem at davemloft dot net 2010-03-24 17:59 ------- Created an attachment (id=20186) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20186&action=view) Distilled test case.
The expression that causes problems is: if (__builtin_expect (integer, 0) && ptr != NULL) It thinks that it is legal to test this as: tmp1 = (ptr != NULL) ? 1 : 0; result = (tmp1 & integer); but that fails if "integer" does not have bit 0 set. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385