From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2BCB23857815; Fri, 2 Apr 2021 02:47:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BCB23857815 From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/99880] New: ICE in maybe_set_vectorized_backedge_value, at tree-vect-loop.c:9161 Date: Fri, 02 Apr 2021 02:47:48 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: haoxintu at gmail dot com 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 keywords 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 02:47:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99880 Bug ID: 99880 Summary: ICE in maybe_set_vectorized_backedge_value, at tree-vect-loop.c:9161 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. This valid program makes GCC crash at -O3. GCC-10 also incurs an ICE with a Segmentation fault, while GCC-10 downwards versions handle this case well. $cat small.c int a, b, c, d, e; void f() { b =3D 5; for (; b <=3D 51; b++) ; int g =3D -8; while (g) { g +=3D 5; int h =3D 10; do { h -=3D a =3D 1; for (; a; a++) ; c *=3D c >=3D d >=3D b; } while (h); c -=3D e; } } $gcc -w -O3 small.c during GIMPLE pass: vect small.c: In function =E2=80=98f=E2=80=99: small.c:2:6: internal compiler error: in maybe_set_vectorized_backedge_valu= e, at tree-vect-loop.c:9161 2 | void f() { | ^ 0x66093f maybe_set_vectorized_backedge_value ../../gcc/tree-vect-loop.c:9161 0xdc466a vect_transform_loop(_loop_vec_info*, gimple*) ../../gcc/tree-vect-loop.c:9650 0xdebbcc try_vectorize_loop_1 ../../gcc/tree-vectorizer.c:1104 0xdec7b1 vectorize_loops() ../../gcc/tree-vectorizer.c:1243 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/home/tuhaoxin/compilers/gcc/build-20210330/libexec/g= cc/x86_64-pc-linux-gnu/11.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=3D/home/tuhaoxin/compilers/gcc/build-20210330/ --enable-bootstrap --enable-checking=3Drelease --enable-languages=3Dc,c++ -disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.1 20210330 (experimental) (GCC) Reproduced on Godbolt: https://godbolt.org/z/WTje44Wen Thanks, Haoxin=