From: Jakub Jelinek Date: Wed, 31 Jul 2019 14:32:24 +0000 (+0200) Subject: re PR c/91192 (non-deterministic ICE on invalid) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a28351e7f54cb63ed19e2fa67de8f91101260d94;p=gcc.git re PR c/91192 (non-deterministic ICE on invalid) PR c/91192 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range even if finish is UNKNOWN_LOCATION, just use start as finish in that case. From-SVN: r273935 --- diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index d07051b15a3..18c4e413e2d 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,10 @@ +2019-07-31 Jakub Jelinek + + PR c/91192 + * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range + even if finish is UNKNOWN_LOCATION, just use start as finish in that + case. + 2019-07-25 Martin Liska Dominik Infuhr diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 67210493c7e..c7c13a6d9ae 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -7477,8 +7477,9 @@ c_parser_sizeof_expression (c_parser *parser) error_at (expr_loc, "% applied to a bit-field"); result = c_expr_sizeof_expr (expr_loc, expr); } - if (finish != UNKNOWN_LOCATION) - set_c_expr_source_range (&result, start, finish); + if (finish == UNKNOWN_LOCATION) + finish = start; + set_c_expr_source_range (&result, start, finish); return result; }