aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-04-03 15:13:42 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-04-03 15:13:42 -0400
commit8d0d49f8b457d47539898886e3f94aaee9c572d6 (patch)
tree4adccd708cd1135318065700d47a964787fecb81 /gcc/cp/call.c
parentfe736ffd2f423c825da8751111da55a2ad25d059 (diff)
downloadgcc-8d0d49f8b457d47539898886e3f94aaee9c572d6.zip
gcc-8d0d49f8b457d47539898886e3f94aaee9c572d6.tar.gz
gcc-8d0d49f8b457d47539898886e3f94aaee9c572d6.tar.bz2
PR c++/85092 - C++17 ICE with unused list constructor.
* call.c (conv_binds_ref_to_prvalue): Also count ck_identity from a TARGET_EXPR. From-SVN: r259052
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 9351918..901f18c 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -7611,6 +7611,9 @@ conv_binds_ref_to_prvalue (conversion *c)
return true;
if (c->kind == ck_user && TREE_CODE (c->type) != REFERENCE_TYPE)
return true;
+ if (c->kind == ck_identity && c->u.expr
+ && TREE_CODE (c->u.expr) == TARGET_EXPR)
+ return true;
return false;
}