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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #3)
> Thank you for the patch.
> The testcase fails in a different way with different flags; I haven't
> checked if the patch helps:
> 
> $ x86_64-pc-linux-gnu-gcc -Os -mno-sse2 testcase.c 
> testcase.c: In function 'foo':
> testcase.c:4:3: error: invalid conversion from type '__bf16' without option
> '-msse2'
>     4 |   (0 ? : f) && c;
>       |   ^
> testcase.c:4:3: internal compiler error: tree check: expected class 'type',
> have 'exceptional' (error_mark) in build_int_cst, at tree.cc:1651
> 0x2c7684d internal_error(char const*, ...)
>         /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
> ...

It should because the COND_EXPR with an error_mark_node is not created any
more.

Reply via email to