From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E58BD3858C50; Fri, 21 Apr 2023 16:38:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E58BD3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682095080; bh=QhsPhM0b5qdodskLaSrdkuaDA4qcjMzRsht5GF2OX/M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PdIuOjUEvCXHbbH51cY6KJ9hkjfaGUc+qgBftYRfUE9lDrYqnKIWFPaDiQqsE3VUf wzhNYDvKV3eQ72MqesPXyGCwFZWIkzRSJzr3EZfPaKco8yFmuKyI1AhJc7evikERvf NaVn1Y28HwULdDGD8b3+EcYvJsfD2IrS9OlFWcIk= From: "hector at marcansoft dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109585] Carla/sord miscompiled with -O2 on ARM64 (inlining issue) Date: Fri, 21 Apr 2023 16:38:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hector at marcansoft 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109585 --- Comment #6 from Hector Martin --- Cleaned it up into a self-contained repro. Simply compiling with `gcc -O2 -o test test.c && test` gives a segfault. -O1 or -fno-schedule-insns -fno-schedule-insns2 avoids the issue. Looking at assembly output on godbolt, it seems this likely goes at least as far back as 11.1 if not earlier.=