On Wed, 26 Jun 2024, Marek Polacek wrote:

> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
> 
> -- >8 --
> Here we ICE in c_expr_sizeof_expr on an erroneous expr.value.  The
> code checks for expr.value == error_mark_node but here the e_m_n is
> wrapped in a C_MAYBE_CONST_EXPR.  I don't think we should have created
> such a tree, so let's return earlier in c_cast_expr.
> 
>       PR c/115642
> 
> gcc/c/ChangeLog:
> 
>       * c-typeck.cc (c_cast_expr): Return error_mark_node if build_c_cast
>       failed.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gcc.dg/noncompile/sizeof-1.c: New test.

OK.

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to