diff options
author | Jason Merrill <jason@redhat.com> | 2018-04-03 15:13:42 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2018-04-03 15:13:42 -0400 |
commit | 8d0d49f8b457d47539898886e3f94aaee9c572d6 (patch) | |
tree | 4adccd708cd1135318065700d47a964787fecb81 /gcc/cp/call.c | |
parent | fe736ffd2f423c825da8751111da55a2ad25d059 (diff) | |
download | gcc-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.c | 3 |
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; } |