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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:f24015a4c2ca6d6fbbf7090004b3a83081f18f03

commit r16-2026-gf24015a4c2ca6d6fbbf7090004b3a83081f18f03
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Thu Jul 3 11:58:50 2025 -0700

    fold: Change comparison of error_mark_node to use error_operand_p in
tree_expr_nonnegative_warnv_p [PR118948]

    This is an obvious fix for this small regression. Basically after
r15-328-g5726de79e2154a,
    there is a call to tree_expr_nonnegative_warnv_p where the type of the
expression is now
    error_mark_node. Though there was only a check if the expression was
error_mark_node.

    Bootstrapped and tested on x86_64-linux-gnu.

            PR c/118948

    gcc/ChangeLog:

            * fold-const.cc (tree_expr_nonnegative_warnv_p): Use
            error_operand_p instead of checking for error_mark_node directly.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr118948-1.c: New test.

    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Reply via email to