[llvm-commits] [llvm-gcc-4.2] r110043 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Stuart Hastings
stuart at apple.com
Mon Aug 2 10:22:02 PDT 2010
On Aug 2, 2010, at 10:12 AM, Stuart Hastings wrote:
> Author: stuart
> Date: Mon Aug 2 12:12:51 2010
> New Revision: 110043
>
> URL: http://llvm.org/viewvc/llvm-project?rev=110043&view=rev
> Log:
> Issue error instead of ICE. Radar 8246180.
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
>
> Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=110043&r1=110042&r2=110043&view=diff
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Mon Aug 2 12:12:51 2010
> @@ -2003,7 +2003,17 @@
> objc_build_compound_setter_call (tree receiver, tree prop_ident, tree rhs)
> {
> tree temp, bind, comma_exp;
> - if (TREE_SIDE_EFFECTS (rhs))
> + /* LLVM LOCAL begin 8246180 */
> +#ifdef OBJCPLUS
> + if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE(rhs)))
> + error("setting a C++ non-POD object value is not implemented - assign the value to a temporary and use the temporary.");
> +#endif
> + if (TREE_SIDE_EFFECTS (rhs)
> +#ifdef OBJCPLUS
> + || TYPE_NEEDS_CONSTRUCTING (TREE_TYPE(rhs))
> +#endif
> + /* LLVM LOCAL end 8246180 */
> + )
> {
> /* To allow for correct property assignment semantics
> and in accordance with C99 rules we generate: type temp;
> @@ -2021,10 +2031,7 @@
> {
> tree type = TREE_TYPE (rhs);
> if (TYPE_NEEDS_CONSTRUCTING (type))
> - {
> - comma_exp = temp;
> - error("setting a C++ non-POD object value is not implemented - assign the value to a temporary and use the temporary.");
> - }
> + comma_exp = temp;
> else
> comma_exp = build_modify_expr (temp, NOP_EXPR, rhs);
> }
I have a test case for this, but I'm not sure how to mark it for the test suite. The correct behavior for llvm-gcc is to issue the diagnostic (above), but clang should compile it without error (it does).
Is there a way for a test case to XFAIL itself only for a particular front-end (e.g. llvm-gcc versus clang) ?
Thanks,
stuart
More information about the llvm-commits
mailing list