[llvm-commits] [llvm-gcc-4.2] r57022 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Mon Oct 6 05:37:56 PDT 2008
Hi Evan,
> Fix a bug in EmitCallOf which shows up only with assertion turned on. When it's processing a call argument that corresponds to eh_value or eh_select, grab the type of special variables ExceptionValue or ExceptionSelectorValue instead or it won't match the expected type.
>
> With assertion turned off, this bug doesn't cause any miscompilation because pointer types are *compatible*. But it's a bug anyway.
I think the reason for this is while the generic code builds
EXC_PTR_EXPR as a void*:
tree-eh.c: x = build0 (EXC_PTR_EXPR, ptr_type_node);
the objc (not obj-c++) front-end builds it as an objc_object_type:
objc-act.c: return build0 (EXC_PTR_EXPR, objc_object_type);
So the thing to do is simply bitcast to the right type in
llvm-convert. Based on this theory, can you please test the
attached patch for me (the testcase doesn't compile here, even
though I built with obj-c++ support...).
Thanks,
Duncan.
PS: There shouldn't be any issue with FILTER_EXPR as far as I can see.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: evan.diff
Type: text/x-patch
Size: 1986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081006/7ac90b17/attachment.bin>
More information about the llvm-commits
mailing list