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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The cause is again DEBUG_BEGIN_STMTs.  cp_parser_statement_expr's
4941      return cp_expr (expr, combined_loc);
now calls protected_set_expr_location on expr, which for -g0 is a
CLEANUP_POINT_EXPR, but with -g is STATEMENT_LIST which contains a
DEBUG_BEGIN_STMT and that CLEANUP_POINT_EXPR.
protected_set_expr_location will do:
5147      if (CAN_HAVE_LOCATION_P (t))
5148        SET_EXPR_LOCATION (t, loc);
so overrides EXPR_LOCATION on the CLEANUP_POINT_EXPR, but in the -g case
doesn't.
Do we want protected_set_expr_location to handle STATEMENT_LISTs that only
contain a single non-DEBUG_* stmt by recursing into that?

Reply via email to