------- Comment #2 from rguenth at gcc dot gnu dot org 2007-07-09 13:41 ------- Created an attachment (id=13875) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13875&action=view) patch
With the proposed patch mainline generates again foo: pushl %ebp movl %esp, %ebp movl 8(%ebp), %ecx movl 12(%ebp), %edx popl %ebp movl 8(%ecx,%edx,4), %eax addl 4(%ecx,%edx,4), %eax addl 12(%ecx,%edx,4), %eax ret and return (*(p + (i + 2) * 4) + *(p + (i + 1) * 4)) + *(p + (i + 3) * 4); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32698