http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46664
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-26 10:13:45 UTC --- It looks like swapped arguments - fold_binary should have gone by here: /* index +p PTR -> PTR +p index */ if (POINTER_TYPE_P (TREE_TYPE (arg1)) && INTEGRAL_TYPE_P (TREE_TYPE (arg0))) return fold_build2_loc (loc, POINTER_PLUS_EXPR, type, fold_convert_loc (loc, type, arg1), fold_convert_loc (loc, sizetype, arg0)); and fix it up.