On Sat, Sep 30, 2017 at 5:08 AM, Alexandre Oliva <aol...@redhat.com> wrote: > diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c > index a89ee49..f9209ac 100644 > --- a/gcc/cp/constexpr.c > +++ b/gcc/cp/constexpr.c > @@ -306,6 +306,9 @@ build_data_member_initialization (tree t, > vec<constructor_elt, va_gc> **vec) > tree_stmt_iterator i; > for (i = tsi_start (t); !tsi_end_p (i); tsi_next (&i)) > { > + if (TREE_CODE (tsi_stmt (i)) == DEBUG_BEGIN_STMT) > + /* ??? Can we retain this information somehow? */
There's no need; the result of this function isn't used for codegen any more, just checking. Why do you need a special case for this? The existing code should have the same effect. > @@ -586,6 +590,9 @@ build_constexpr_constructor_member_initializers (tree > type, tree body) > tree_stmt_iterator i; > for (i = tsi_start (body); !tsi_end_p (i); tsi_next (&i)) > { > + if (TREE_CODE (tsi_stmt (i)) == DEBUG_BEGIN_STMT) > + /* ??? Can we retain this information somehow? */ Likewise. > @@ -3783,6 +3791,8 @@ cxx_eval_statement_list (const constexpr_ctx *ctx, tree > t, > for (i = tsi_start (t); !tsi_end_p (i); tsi_next (&i)) > { > tree stmt = tsi_stmt (i); > + if (TREE_CODE (stmt) == DEBUG_BEGIN_STMT) > + continue; Maybe instead of handling this here, add it to the sequence of codes that are returned unchanged in cxx_eval_constant_expression, after PREDICT_EXPR? Jason