------- Comment #34 from gcc at troy dot rollo dot name 2007-03-06 03:51 ------- The problem looks like a bug in GCC's optimisation in 4.1.1 - for the following code:
152 while (--delete_count>=0) { 153 zval *q = *(zval **)(--p); 154 *p = NULL; (gdb) l 155 zval_ptr_dtor(&q); 156 } 157 EG(argument_stack).top_element = p; ('p' is declared as void **) it is producing: add %fp, -20, %l3 L1 clr %g1 add %l0, -4, %l0 st %g1, [ %fp + -20 ] clr [ %l0 ] call 0x261ea4 <_zval_ptr_dtor> mov %l3, %o0 inc %l1 cmp %l2, %l1 bne L1 %l0 contains the pointer "p". %l3 contains &q (q is at %fp-20). Notice that %g1 (which is set to 0 at L1) is always being stored in "q". -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30819