Re: [PATCH] c: Fix C cast error-recovery [PR101171]

2021-06-24 Thread Marek Polacek via Gcc-patches
On Thu, Jun 24, 2021 at 12:11:23PM +0200, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs during error-recovery, as build_c_cast calls > note_integer_operands on error_mark_node and that wraps it into > C_MAYBE_CONST_EXPR which is unexpected and causes ICE later on. > Seems most other c

[PATCH] c: Fix C cast error-recovery [PR101171]

2021-06-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs during error-recovery, as build_c_cast calls note_integer_operands on error_mark_node and that wraps it into C_MAYBE_CONST_EXPR which is unexpected and causes ICE later on. Seems most other callers of note_integer_operands check early if something is error_mark_node