This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66857] [5/6 Regression] Reference not bound to lvalue
- From: "ppalka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Jul 2015 23:44:18 +0000
- Subject: [Bug c++/66857] [5/6 Regression] Reference not bound to lvalue
- Auto-submitted: auto-generated
- References: <bug-66857-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66857
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Reverting the change made to ocp_convert in r217814 fixes it:
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 13bc1f7..6d4bd9a 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -687,7 +687,8 @@ ocp_convert (tree type, tree expr, int convtype, int flags,
}
/* FIXME remove when moving to c_fully_fold model. */
- e = scalar_constant_value (e);
+ if (!CLASS_TYPE_P (type))
+ e = scalar_constant_value (e);
if (error_operand_p (e))
return error_mark_node;