From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F6FA3857C4C; Wed, 23 Sep 2020 09:13:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F6FA3857C4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600852391; bh=i2Mr1/o19Mw6W7MozcN1ti9h/mlsFYf9iCBtKIHM8ww=; h=From:To:Subject:Date:From; b=XJd3y9SXH8tyKPUhOiNbizXFaMiVrpr0SMKdfKCmCwaAoxQThyl90HwE4a8x7tVJf Qb90c1cWWqsx2aeH+pGo5m27V1TycQ/9fPkGShKKXNqukOpIHJT+vgl3D/tP3x0UeO EddOl2IOlgBKQfbegQ6nkZzb0uxaxnKQmD6P/QRs= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/97175] New: ice in maybe_warn_for_bound, at builtins.c:3483 Date: Wed, 23 Sep 2020 09:13:11 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail 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 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, 23 Sep 2020 09:13:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97175 Bug ID: 97175 Summary: ice in maybe_warn_for_bound, at builtins.c:3483 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C source code: int a, b; int *c; void d() { while (a > 0) ; c =3D malloc(1); strncpy(c, b, a); } compiled by recent gcc trunk and compiler flag -O2, does this: during RTL pass: expand bug642.c:7:3: internal compiler error: tree check: expected tree that conta= ins =E2=80=98 decl minimal=E2=80=99 structure, have =E2=80=98ssa_name=E2=80=99 in maybe_w= arn_for_bound, at builtins.c: 3483 0xfb13c0 tree_contains_struct_check_failed(tree_node const*, tree_node_structure _enum, char const*, int, char const*) ../../trunk.git/gcc/tree.c:9902 0x74e77b contains_struct_check(tree_node*, tree_node_structure_enum, char const* , int, char const*) ../../trunk.git/gcc/tree.h:3413 0x74e77b maybe_warn_for_bound(int, unsigned int, tree_node*, tree_node*, tree_no de**, tree_node*, access_data const*) ../../trunk.git/gcc/builtins.c:3483 0x74d796 check_access(tree_node*, tree_node*, tree_node*, tree_node*, tree_node* , access_mode, access_data const*) The bug first seems to occur sometime between 20200827 and 20200829.=