From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 434463858024; Sat, 22 May 2021 16:21:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 434463858024 From: "dragan.mladjenovic at syrmia dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/100604] GCC generates invalid LO_SYM for unaligned global Date: Sat, 22 May 2021 16:21:52 +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: 11.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dragan.mladjenovic at syrmia 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 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: Sat, 22 May 2021 16:21:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100604 --- Comment #4 from dragan.mladjenovic at syrmia dot com --- It seems to be copied from the owning var_decl align in vararsm.c:assemble_variable. Now when optimizing that happens at a later st= age and rtx gets created lazily from var_decl and has only mode alignment. That= 's why on -O or greater middle-end doesn't try to expand unaligned access, whi= ch might be an issue in itself.=