aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-03-09 22:34:23 -0500
committerJason Merrill <jason@gcc.gnu.org>2018-03-09 22:34:23 -0500
commit3569f81f2ddc25b1ea22c99230c3e35032bd4752 (patch)
tree52b84fcf9cf6268ab61e222de824edb12e39b095 /gcc/cp/call.c
parenta72e8ba830a57d2737280f627ef4ba5e2f3c1b59 (diff)
downloadgcc-3569f81f2ddc25b1ea22c99230c3e35032bd4752.zip
gcc-3569f81f2ddc25b1ea22c99230c3e35032bd4752.tar.gz
gcc-3569f81f2ddc25b1ea22c99230c3e35032bd4752.tar.bz2
PR c++/84752 - ICE with capture of constexpr array.
* call.c (standard_conversion): Set rvaluedness_matches_p on the identity conversion under ck_lvalue. From-SVN: r258406
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 17cd1c4..45c22aa 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -103,7 +103,7 @@ struct conversion {
being bound to an rvalue expression. If KIND is ck_rvalue,
true when we are treating an lvalue as an rvalue (12.8p33). If
KIND is ck_base, always false. If ck_identity, we will be
- binding a reference directly. */
+ binding a reference directly or decaying to a pointer. */
BOOL_BITFIELD rvaluedness_matches_p: 1;
BOOL_BITFIELD check_narrowing: 1;
/* The type of the expression resulting from the conversion. */
@@ -1139,6 +1139,8 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
{
from = type_decays_to (from);
fcode = TREE_CODE (from);
+ /* Tell convert_like_real that we're using the address. */
+ conv->rvaluedness_matches_p = true;
conv = build_conv (ck_lvalue, from, conv);
}
/* Wrapping a ck_rvalue around a class prvalue (as a result of using