From: Jason Merrill Date: Mon, 6 Jun 2011 04:16:38 +0000 (-0400) Subject: re PR c++/49134 (ICE in g++.dg/cpp0x/constexpr tests for arm) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=22d60ad267dae84a52bd57521bcb8a99bf33eb41;p=gcc.git re PR c++/49134 (ICE in g++.dg/cpp0x/constexpr tests for arm) PR c++/49134 * tree.c (build_target_expr): Deal with ARM ABI tweaks. From-SVN: r174682 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 48f39f4da21..668dd5e19d4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-06-06 Jason Merrill + + PR c++/49134 + * tree.c (build_target_expr): Deal with ARM ABI tweaks. + 2011-06-04 Jonathan Wakely * init.c (build_delete): Warn when deleting type with non-virtual diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 11e195ea581..025fe2d1d1f 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -292,6 +292,9 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain) #ifdef ENABLE_CHECKING gcc_assert (VOID_TYPE_P (TREE_TYPE (value)) || TREE_TYPE (decl) == TREE_TYPE (value) + /* On ARM ctors return 'this'. */ + || (TREE_CODE (TREE_TYPE (value)) == POINTER_TYPE + && TREE_CODE (value) == CALL_EXPR) || useless_type_conversion_p (TREE_TYPE (decl), TREE_TYPE (value))); #endif