This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR C++/27592, dynamic_cast fails sometimes


Andrew Pinski wrote:
> 
> On May 21, 2006, at 4:08 PM, Mark Mitchell wrote:
> 
>> Andrew Pinski wrote:
>>
>>>     * rtti.c (build_dynamic_cast_1): Create a NE_EXPR for the first
>>>     operand of the COND_EXPR.
>>
>> Right idea.
>>
>>> +          neq = build2 (NE_EXPR, boolean_type_node, result,
>>> +                cp_convert (TREE_TYPE (result), integer_zero_node));
>>
>> Juse use c_common_truthvalue_conversion (result);
> 
> I just copied what was in that file already in ifnonnull.

That doesn't make it optimal.  Please try the method I suggest, and, if
that works, consider patching the other occurrence as well.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]