From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 02976386F45F; Mon, 18 Jan 2021 11:44:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02976386F45F From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98726] New: aarch64: tree check: expected integer_cst, have poly_int_cst in to_wide, at tree.h:5984 Date: Mon, 18 Jan 2021 11:44:04 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: acoplan at gcc dot gnu.org 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 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: Mon, 18 Jan 2021 11:44:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98726 Bug ID: 98726 Summary: aarch64: tree check: expected integer_cst, have poly_int_cst in to_wide, at tree.h:5984 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- The following fails: $ cat test.c int a, c; char b; int d() { a =3D 0; for (; a <=3D 21; a =3D (short)a + 1) b &=3D c; } $ aarch64-elf-gcc -c test.c -O3 -march=3Darmv8.2-a+sve during GIMPLE pass: forwprop test.c: In function 'd': test.c:3:5: internal compiler error: tree check: expected integer_cst, have poly_int_cst in to_wide, at tree.h:5984 3 | int d() { | ^ 0x1161f66 tree_check_failed(tree_node const*, char const*, int, char const*, ...) /home/alecop01/toolchain/src/gcc/gcc/tree.c:9812 0x7393c1 tree_check(tree_node const*, char const*, int, char const*, tree_c= ode) /home/alecop01/toolchain/src/gcc/gcc/tree.h:3594 0x7393c1 wi::to_wide(tree_node const*) /home/alecop01/toolchain/src/gcc/gcc/tree.h:5984 0x1177e1d vector_cst_int_elt(tree_node const*, unsigned int) /home/alecop01/toolchain/src/gcc/gcc/tree.c:11104 0x11935a3 vector_cst_elt(tree_node const*, unsigned int) /home/alecop01/toolchain/src/gcc/gcc/tree.c:11131 0xa35b48 const_binop(tree_code, tree_node*, tree_node*, tree_node*) /home/alecop01/toolchain/src/gcc/gcc/fold-const.c:1644 0x1484144 gimple_resimplify2 /home/alecop01/toolchain/src/gcc/gcc/gimple-match-head.c:276 0x14b3ca2 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) /home/alecop01/toolchain/src/gcc/gcc/gimple-match-head.c:957 0xa9c5d1 fold_stmt_1 /home/alecop01/toolchain/src/gcc/gcc/gimple-fold.c:6016 0xa9ef9b fold_stmt(gimple_stmt_iterator*, tree_node* (*)(tree_node*)) /home/alecop01/toolchain/src/gcc/gcc/gimple-fold.c:6254 0xf73a2a execute /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-forwprop.c:3108 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=