From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA7CD3856DD4; Fri, 21 Oct 2022 07:29:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA7CD3856DD4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666337369; bh=wKv0za9KNFxxJrzbqAaXnt5JQal2a6UxS9ZrHqkda2M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=noPwuJV/famZL0OyrljIKLoIFwvaBu1R7o4uOu66AknTHlqWgN25/G3JmDKIRNLdR 0PvMKBRqwdJOgQYOVha+E2i2hJkwMxYGuPDRHN+ufF4y+3J+RNNc50fRijzexRSvHO tIicbudyF04aLbRzbe+3aRW1P1T3dCdiiy9G3s/M= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107339] RISC V -mstrict-align Date: Fri, 21 Oct 2022 07:29:29 +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.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D107339 --- Comment #5 from Andrew Pinski --- That is because with the non pointer case gcc can figure out the alignment without having to assume via pointers. Note the original code is also undefined by the c standard even the non poi= nter case you gave, it just happens to work is not a reason to depend on it.=