https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66857

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #4)
> 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;

This fix is OK.

Reply via email to