From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 02DC53882AC9; Tue, 18 Jun 2024 12:27:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02DC53882AC9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718713663; bh=IXO89+4Nmx4nhq3fcy/SqURKFu+esm3/U2XLIY00YIM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rqC4r18mDJOwQ25LpVOFFuxve3TEwR61u/3OZJrVmLqyekcFCghMBvOGR+5CfLHQ5 Zolx9CY6nScE8IF18SuZD3sIBbcW3qaMbrM2SfsiYLqQsmHd84CiR9uqSq+tvT9K56 CisWvIKzncdYaNop/v47D99C99P1qrQNPn4SDNOg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/115539] Misoptimization of application at -O2 -g on x86-64 causing segfaults on valid memory accesses where it works on both clang and gcc at -g (no -O2) Date: Tue, 18 Jun 2024 12:27:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.1.1 X-Bugzilla-Keywords: 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: cc 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=3D115539 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- Your testcase isn't self-contained, there is no main, so there isn't much we can do about it, but from the 220 -Wstrict-aliasing warnings I'd say it is = very likely the code violates TBAA just about everywhere. Try -O2 -fno-strict-aliasing? If that helps, most likely it is just bogus = code being compiled.=