[Bug c++/13005] Pointer wrongly adjusted for derived class containing virtual function
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Tue Nov 11 17:57:00 GMT 2003
------- Additional Comments From bangerth at dealii dot org 2003-11-11 17:57 -------
Oh, yes, and one more datapoint: without optimization, I get this assembler code:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl (%eax), %edx
addl $4, %edx
movl 12(%ebp), %eax
movl %eax, 4(%edx)
popl %ebp
ret
That is, the addl is there. On the other hand, _with_ optimization, we get
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl (%eax), %edx
movl 12(%ebp), %eax
movl %eax, 8(%edx)
popl %ebp
ret
The addl is gone, but note that in the first case the result is written
into 4(%edx), while in the second into 8(%edx). My assembler times have
long gone for good, but to me this seems functionally equivalent.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13005
More information about the Gcc-bugs
mailing list