C++ PATCH to build_new_method_call for c++/26577

Jason Merrill jason@redhat.com
Fri Jun 30 20:52:00 GMT 2006


In this PR, a call to a static member function from within a volatile 
non-static member function was reformed to

   *this, A::bar();

causing the backend to try to copy *this to a temporary, which lead to 
an abort in cp_expr_size.  The bug is in the translation above: a call 
to a static member function should not imply a dereference of 'this'.

Fixed by forcing evaluation of the object pointer, not the object itself.

Tested x86_64-pc-linux-gnu, applied to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: volatile-this.patch
Type: text/x-patch
Size: 1501 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060630/f6a9ad73/attachment.bin>


More information about the Gcc-patches mailing list