From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 41FF13857C71; Mon, 23 Nov 2020 16:38:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41FF13857C71 From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 Date: Mon, 23 Nov 2020 16:38:33 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de 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, 23 Nov 2020 16:38:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97956 Bug ID: 97956 Summary: [11 Regression] ICE in build2, at tree.c:4872 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Changed between 20200823 and 20201004, derived from memchr.c : $ cat z1.c typedef __INT8_TYPE__ int8_t; typedef __INT32_TYPE__ int32_t; extern void* memchr (const void*, int, long); struct SX { int32_t n; int8_t a[]; }; const struct SX sx =3D { 0x1221 }; const char sx_rep[] =3D { }; void test_find (void) { int n =3D 0, nb =3D (const char*)&sx.a - (const char*)&sx; const char *p =3D (const char*)&sx, *q =3D sx_rep; n +=3D p + 1 =3D=3D memchr (p, q[1], nb); } $ gcc-11-20201122 -c z1.c $ $ gcc-11-20201122 -c z1.c -O2 during GIMPLE pass: forwprop z1.c: In function 'test_find': z1.c:16:1: internal compiler error: in build2, at tree.c:4872 16 | } | ^ 0xdaae9e build2(tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/tree.c:4871 0x880b9f build2_loc ../../gcc/tree.h:4371 0x880b9f fold_build2_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:13318 0xc3ad53 forward_propagate_into_comparison_1 ../../gcc/tree-ssa-forwprop.c:434 0xc41900 forward_propagate_into_comparison ../../gcc/tree-ssa-forwprop.c:491 0xc41900 execute ../../gcc/tree-ssa-forwprop.c:3145=