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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Joseph Myers <js...@gcc.gnu.org>:

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

commit r10-6129-gac68e287fc2e939ae6b45ba7ff04e493982b7f62
Author: Joseph Myers <jos...@codesourcery.com>
Date:   Wed Jan 22 01:23:42 2020 +0000

    Fix ICE with cast of division by zero (PR c/93348).

    Bug 93348 reports an ICE on certain cases of casts of expressions that
    may appear only in unevaluated parts of integer constant expressions,
    arising from the generation of nested C_MAYBE_CONST_EXPRs.  This patch
    fixes it by adding a call to remove_c_maybe_const_expr in the
    integer-operands case, as is done in other similar cases.

    Bootstrapped with no regressions for x86_64-pc-linux-gnu.

        PR c/93348
    gcc/c:
        * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
        argument with integer operands.

    gcc/testsuite:
        * gcc.c-torture/compile/pr93348-1.c: New test.

Reply via email to