From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 33AFF3858D37; Sun, 22 Oct 2023 09:20:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33AFF3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697966401; bh=Cbx+kEHDlU10wWGzD0Bgp+zSMfT+tGlEM8zF7StD9vs=; h=From:To:Subject:Date:From; b=p21jBhmDwYQ5RNZ6nHYCiqjtOjGmFPfvtP1XEeGE0nM/CcuBn5XjOIcszZn/0HU3b RMyMMxloKeuIG3/GFwDQx3D+mnVjKX2I4f4dAmXmaJRrBqCrOSScPYLguGXntmAiGr Zw7ztO2t8elZ7UG0h0FsX9SWO/ZPN0QUFaXpvOBs= From: "shaohua.li at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111917] New: ICE in as_a, at is-a.h:255 since GCC-8 Date: Sun, 22 Oct 2023 09:20:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization 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=3D111917 Bug ID: 111917 Summary: ICE in as_a, at is-a.h:255 since GCC-8 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: shaohua.li at inf dot ethz.ch Target Milestone: --- gcc at -O3 crashed. I didn't bisect this case because it affected even gcc-8. Compiler explorer: https://godbolt.org/z/7Mz9G6Kro $ cat a.c long a() { long b, c; for (; b; b++) c <<=3D 1; return c; } static int d() { e: f: for (; a();) ; goto f; return 0; } int main() { d(); } $ $ gcc -O3 a.c during GIMPLE pass: unswitch a.c: In function 'int main()': a,c:15:5: internal compiler error: in as_a, at is-a.h:255 15 | int main() { d(); } | ^~~~ 0x26259de internal_error(char const*, ...) ???:0 0xaf830e fancy_abort(char const*, int, char const*) ???:0 0x15b8af2 number_of_iterations_exit(loop*, edge_def*, tree_niter_desc*, boo= l, bool, basic_block_def**) ???:0 0x14fca28 number_of_latch_executions(loop*) ???:0 0x15ba69d estimate_numbers_of_iterations(loop*) ???:0 0x15bc037 estimated_loop_iterations(loop*, generic_wide_int >*) ???:0 0x15bc067 estimated_loop_iterations_int(loop*) ???:0 0x15cf559 tree_ssa_unswitch_loops(function*) ???: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. $=