------- Comment #3 from rguenth at gcc dot gnu dot org 2008-03-20 10:18 ------- It works if you rewrite addto to
void addto(unsigned int *a,unsigned int b) { if ((*a+b)<b) exit(0); *a+=b; } because the store is no longer required in the path to exit(0). addto: .LFB3: subq $8, %rsp .LCFI0: movl %esi, %eax addl (%rdi), %eax jb .L5 movl %eax, (%rdi) addq $8, %rsp ret .L5: xorl %edi, %edi call exit -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35646