From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BBD783858410; Wed, 6 Sep 2023 08:24:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBD783858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693988667; bh=1BtwbTvkRQvhRzS7PhpgpgBe3/SMU18GN1VzlmW+itw=; h=From:To:Subject:Date:From; b=hc3hadXZmXTMHZH+OUP7tA8PHWJUEa7eGGIaw2HJUejSeJl0voSCoG/jPCluUZicB jxxeZCu3i3uonFOjRjoJsZXtdLjGoI0SaBAkDRSYlnI8CsR0WvatFZeYbqeiDLLPdS ZknXxoRpmtGXEXitz2MeVXXgHYsDBl4W7ws41OJE= From: "shaohua.li at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111303] New: ICE: in type, at value-range.h:869 Date: Wed, 06 Sep 2023 08:24:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: shaohua.li at inf dot ethz.ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111303 Bug ID: 111303 Summary: ICE: in type, at value-range.h:869 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: shaohua.li at inf dot ethz.ch Target Milestone: --- gcc at -O2 crashes on the following test case. Compiler explorer: https://godbolt.org/z/qK6dMTK14 $ cat a.c unsigned char a; int b(int c) { if (c >=3D 5000) return c / 5; } void d() { b(a - 5); } int main() {} $ $ gcc -O2 a.c during GIMPLE pass: evrp : In function 'd': :7:1: internal compiler error: in type, at value-range.h:869 7 | int main() {} | ^~~ 0x21af71e internal_error(char const*, ...) ???:0 0x9dd814 fancy_abort(char const*, int, char const*) ???:0 0x16cada5 gimple_simplify_TRUNC_DIV_EXPR(gimple_match_op*, gimple**, tree_n= ode* (*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*) ???:0 0x180c22a gimple_match_op::resimplify(gimple**, tree_node* (*)(tree_node*)) ???:0 0x180c880 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) ???:0 0x1f41940 gimple_ranger::fold_stmt(gimple_stmt_iterator*, tree_node* (*)(tree_node*)) ???:0 0x13c5478 rvrp_folder::fold_stmt(gimple_stmt_iterator*) ???:0 0x12a653e substitute_and_fold_dom_walker::before_dom_children(basic_block_d= ef*) ???:0 0x1f09107 dom_walker::walk(basic_block_def*) ???:0 0x12a568b substitute_and_fold_engine::substitute_and_fold(basic_block_def*) ???:0 0x13c4f9c execute_ranger_vrp(function*, bool, bool) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. Compiler returned: 1 $=