From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 780C43858D35; Sat, 17 Jun 2023 14:29:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 780C43858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687012187; bh=Nw5NEAMPk1YMCkgNQcBrNUvFsIboXzPCEPCDaW0GNiY=; h=From:To:Subject:Date:From; b=Uts6/vtElVp8fGQarP+o1dkJRG8BElZmL2l9KezflunpRVVVUaFGDnz18JV/dX+X2 TA2/vjf2j7iBMybvCj3qY13cnItggOOxV7HBM+zZQ+8Y6bH0yh5F7eHT1lVfG75out A0ggERHrZeqyM6G5iAijzR/dpV3P7TJHPH2A5QLM= From: "shaohua.li at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/110298] New: ICE at -Os on x86_64-linux-gnu Date: Sat, 17 Jun 2023 14:29:46 +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=3D110298 Bug ID: 110298 Summary: ICE at -Os on x86_64-linux-gnu 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: --- ICE at -Os. $ cat a.c int a, b, c, d, e; int f() { c =3D 0; for (; c >=3D 0; c--) { d =3D 0; for (; d <=3D 0; d++) { e =3D 0; for (; d + c + e >=3D 0; e--) ; a =3D 1; b =3D 0; for (; a; ++b) a *=3D 2; for (; b + d >=3D 0;) return 0; } } } int main() {} $ $ gcc-tk -Os a.c during GIMPLE pass: cunroll a.c: In function =E2=80=98f=E2=80=99: a.c:2:5: internal compiler error: tree check: expected class =E2=80=98type= =E2=80=99, have =E2=80=98exceptional=E2=80=99 (error_mark) in tree_nop_conversion_p, at tre= e.cc:11961 2 | int f() { | ^ 0x20cb70e internal_error(char const*, ...) ???:0 0x87f9b6 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ???:0 0x16e265d generic_simplify_386(unsigned int, tree_node*, tree_node*, tree_node*, tree_node**, tree_code) ???:0 0x16b8bc8 generic_simplify_GE_EXPR(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ???:0 0xca5f45 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ???:0 0xcc0dc4 fold(tree_node*) ???:0 0x1209be8 simplify_replace_tree(tree_node*, tree_node*, tree_node*, tree_no= de* (*)(tree_node*, void*), void*, bool) ???:0 0x120abcb substitute_in_loop_info(loop*, tree_node*, tree_node*) ???:0 0x10c6dc5 replace_uses_by(tree_node*, tree_node*) ???:0 0xb485d3 merge_blocks(basic_block_def*, basic_block_def*) ???:0 0x10d9784 cleanup_tree_cfg(unsigned int) ???: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. $ $ gcc-tk -v Using built-in specs. COLLECT_GCC=3Dgcc-tk COLLECT_LTO_WRAPPER=3D/zdata/shaoli/compilers/ccbuilder-compilers/gcc-27612= ce352921d74086102d9ad4d3e011923f837/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/= lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --disable-multilib --disable-bootstrap --enable-languages=3Dc,c++ --prefix=3D/zdata/shaoli/compilers/ccbuilder-compilers/gcc-27612ce352921d74= 086102d9ad4d3e011923f837 Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230616 (experimental) (GCC) $=