[PATCH]: PR29066 ptrmemfunc_vbit_in_delta is broken

Ryan Mansfield rmansfield@qnx.com
Mon Nov 13 16:44:00 GMT 2006

Mark Mitchell wrote:
> Ryan Mansfield wrote:
>> Hi,
>> In build_binary_op, the NE_EXPR/EQ_EXPR comparison of a ptrmemfunc type to a
>> null_ptr_cst only looks at the pfn. This breaks ptrmemfunc_vbit_in_delta 
>> targets as it is possible to have a pfn of 0. 

> since, here, the compiler just needs to update delta; it has no need to
> check PFN.  Therefore, I would expect that your code should explicitly
> check DELTA & 1, rather than just DELTA.

Right, the ABI clearly says "A pointer to member function is NULL when 
ptr = 0 and the least significant bit of adj is zero."

Is the attached patch OK?


Ryan Mansfield
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr29066.patch4
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061113/81a6ffdd/attachment.ksh>

More information about the Gcc-patches mailing list