aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 11e195e..025fe2d 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