aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@gmail.com>2018-07-04 22:21:38 +0300
committerVille Voutilainen <ville@gcc.gnu.org>2018-07-04 22:21:38 +0300
commita617812f148c71209a94f33879b13fa603c6103c (patch)
tree77f5bb740ab05567042ab41b0a1176404331dfc5 /gcc/cp/method.c
parent86b664c0a916decb2e3d4a5188fa5037c67df11f (diff)
downloadgcc-a617812f148c71209a94f33879b13fa603c6103c.zip
gcc-a617812f148c71209a94f33879b13fa603c6103c.tar.gz
gcc-a617812f148c71209a94f33879b13fa603c6103c.tar.bz2
re PR c++/86398 (is_trivially_constructible always returns true even when is_constructible returns false)
PR c++/86398 gcc/cp/ PR c++/86398 * method.c (is_trivially_xible): Return false if is_xible_helper returns a NULL_TREE. testsuite/ PR c++/86398 * g++.dg/ext/is_trivially_constructible1.C: Add new tests. From-SVN: r262420
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 858655b..0b208a8 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1216,7 +1216,7 @@ is_trivially_xible (enum tree_code code, tree to, tree from)
tree expr;
expr = is_xible_helper (code, to, from, /*trivial*/true);
- if (expr == error_mark_node)
+ if (expr == NULL_TREE || expr == error_mark_node)
return false;
tree nt = cp_walk_tree_without_duplicates (&expr, check_nontriv, NULL);
return !nt;