From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 74FED3894C25; Wed, 7 Apr 2021 02:11:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74FED3894C25 From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99947] New: [11 Regression] ICE Segmentation fault "during GIMPLE pass: vect" Date: Wed, 07 Apr 2021 02:11:50 +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: 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: Wed, 07 Apr 2021 02:11:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99947 Bug ID: 99947 Summary: [11 Regression] ICE Segmentation fault "during GIMPLE pass: vect" Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi all. $cat small.c #include int a, b, d, e; int16_t c; void f() { for (; e; e++) { int g =3D 6; for (; g > 2; g--) { int i =3D -8; while (i < 20) { i +=3D 5; a +=3D b; } c *=3D d; } b--; } } $gcc -O3 small.c during GIMPLE pass: vect small.c: In function =E2=80=98f=E2=80=99: small.c:4:6: internal compiler error: Segmentation fault 4 | void f() { | ^ 0xb9f63f crash_signal ../../gcc/toplev.c:327 0x90d820 useless_type_conversion_p(tree_node*, tree_node*) ../../gcc/gimple-expr.c:71 0x103daa8 gimple_simplify_VIEW_CONVERT_EXPR /home/tuhaoxin/compilers/gcc/build-20210330/gcc/gimple-match.c:27761 0xf48bd2 gimple_resimplify1 ../../gcc/gimple-match-head.c:242 0x105531e gimple_match_op::resimplify(gimple**, tree_node* (*)(tree_node*)) ../../gcc/gimple-match-head.c:489 0x105531e gimple_simplify_MULT_EXPR /home/tuhaoxin/compilers/gcc/build-20210330/gcc/gimple-match.c:74302 0x1069d44 gimple_simplify(tree_code, tree_node*, tree_node*, tree_node*, gimple**, tree_node* (*)(tree_node*)) ../../gcc/gimple-match-head.c:717 0x915daa gimple_build(gimple**, unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/gimple-fold.c:8509 0xdb30a8 gimple_build(gimple**, tree_code, tree_node*, tree_node*, tree_nod= e*) ../../gcc/gimple-fold.h:84 0xdb30a8 vectorizable_induction(_loop_vec_info*, _stmt_vec_info*, gimple**, _slp_tree*, vec*) ../../gcc/tree-vect-loop.c:8231 0xda89bd vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterat= or*, _slp_tree*, _slp_instance*) ../../gcc/tree-vect-stmts.c:10901 0xdd4cf8 vect_schedule_slp_node ../../gcc/tree-vect-slp.c:6193 0xde18a8 vect_schedule_scc ../../gcc/tree-vect-slp.c:6355 0xde15e9 vect_schedule_scc ../../gcc/tree-vect-slp.c:6336 0xde1d3b vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>) ../../gcc/tree-vect-slp.c:6471 0xdc4735 vect_transform_loop(_loop_vec_info*, gimple*) ../../gcc/tree-vect-loop.c:9535 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)=20 Note that this issue only occurs in the trunk version, so I guess it's a regression problem. Reproduced in Godbolt: https://godbolt.org/z/Evh93dzM6 Thanks, Haoxin=