From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 03B2E385735F; Wed, 4 May 2022 09:28:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03B2E385735F From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/105469] "execution reached an unreachable program point" with -flto Date: Wed, 04 May 2022 09:28:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: Message-ID: In-Reply-To: References: 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, 04 May 2022 09:28:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105469 --- Comment #4 from Jakub Jelinek --- -fno-devirtualize also makes it go away. Without that, the __builtin_unreachable() call in question is created in: #0 0x00007ffff7ad4424 in __memset_avx2_unaligned_erms () from /lib64/libc.= so.6 #1 0x0000000000fee86e in ggc_internal_alloc (size=3D144, f=3D0x0, s=3D0, n= =3D1) at ../../gcc/ggc-page.cc:1400 #2 0x00000000012bf869 in ggc_internal_cleared_alloc (size=3D144, f=3D0x0, = s=3D0, n=3D1) at ../../gcc/ggc-common.cc:114 #3 0x0000000000c9f446 in ggc_internal_cleared_alloc (s=3D144) at ../../gcc/ggc.h:147 #4 0x00000000012d69e5 in ggc_alloc_cleared_gimple_statement_stat (s=3D144)= at ../../gcc/ggc.h:329 #5 0x00000000012cc892 in gimple_alloc (code=3DGIMPLE_CALL, num_ops=3D5) at ../../gcc/gimple.cc:156 #6 0x00000000012d00ae in gimple_copy (stmt=3D)= at ../../gcc/gimple.cc:1913 #7 0x000000000183e098 in remap_gimple_stmt (stmt=3D, id=3D0x7fffffffd1e0) at ../../gcc/tree-inline.cc:1862 #8 0x000000000183e996 in copy_bb (id=3D0x7fffffffd1e0, bb=3D, num=3D..., den=3D...) at ../../gcc/tree-inline.cc:2051 #9 0x0000000001841ee7 in copy_cfg_body (id=3D0x7fffffffd1e0, entry_block_map=3D, exit_block_map=3D,=20 new_entry=3D) at ../../gcc/tree-inline.cc:3085 #10 0x0000000001842b2a in copy_body (id=3D0x7fffffffd1e0, entry_block_map=3D, exit_block_map=3D,=20 new_entry=3D) at ../../gcc/tree-inline.cc:3338 #11 0x0000000001847993 in expand_call_inline (bb=3D, stmt=3D, id=3D0x7fffffffd1e0, to_purge=3D0x7fffffffd1c0) at ../../gcc/tree-inline.cc:5123 when copying the OBJ_TYPE_REF(_9;(struct Writable)writable_7(D)->10B) (writable_7(D), 0); call (line 1345 in repro.cpp) and later on this one is replaced by __builtin_unreachable: #0 gimple_call_set_fndecl (gs=3D0x7fffe8621090, decl=3D) at ../../gcc/gimple.h:3198 #1 0x00000000010b7521 in cgraph_edge::redirect_call_stmt_to_callee ( e=3D -> )>) at ../../gcc/cgraph.cc:1555 #2 0x0000000001841af2 in redirect_all_calls (id=3D0x7fffffffd1e0, bb=3D) at ../../gcc/tree-inline.cc:3002 #3 0x00000000018423c7 in copy_cfg_body (id=3D0x7fffffffd1e0, entry_block_map=3D, exit_block_map=3D,=20 new_entry=3D) at ../../gcc/tree-inline.cc:3173 #4 0x0000000001842b2a in copy_body (id=3D0x7fffffffd1e0, entry_block_map=3D, exit_block_map=3D,=20 new_entry=3D) at ../../gcc/tree-inline.cc:3338 #5 0x0000000001847993 in expand_call_inline (bb=3D, stmt=3D, id=3D0x7fffffffd1e0, to_purge=3D0x7fffffffd1c0) at ../../gcc/tree-inline.cc:5123 #6 0x000000000184874c in gimple_expand_calls_inline (bb=3D, id=3D0x7fffffffd1e0, to_purge=3D0x7fffffffd1c0) at ../../gcc/tree-inline.cc:5318 #7 0x0000000001848f1c in optimize_inline_calls (fn=3D) at ../../gcc/tree-inline.cc:5490 #8 0x000000000141b1ee in inline_transform (node=3D) at ../../gcc/ipa-inline-transform.cc:790=