re PR c++/49134 (ICE in g++.dg/cpp0x/constexpr tests for arm)
authorJason Merrill <jason@redhat.com>
Mon, 6 Jun 2011 04:16:38 +0000 (00:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 6 Jun 2011 04:16:38 +0000 (00:16 -0400)
PR c++/49134
* tree.c (build_target_expr): Deal with ARM ABI tweaks.

From-SVN: r174682

gcc/cp/ChangeLog
gcc/cp/tree.c

index 48f39f4da21fc83e1a5e7d3f4e292f5f1bc99994..668dd5e19d4861128ed961b53251ce25c5daa95d 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-06  Jason Merrill  <jason@redhat.com>
+
+       PR c++/49134
+       * tree.c (build_target_expr): Deal with ARM ABI tweaks.
+
 2011-06-04  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * init.c (build_delete): Warn when deleting type with non-virtual
index 11e195ea5819eba73eebefe1e4862087edb511ae..025fe2d1d1f011add40e174b71f1a305e79c238e 100644 (file)
@@ -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