From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9334D3858D28; Tue, 24 Jan 2023 17:46:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9334D3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674582402; bh=bu4T4wbEoC2jCd3LoAfD/8LywFyVG2+N3mAXeTiWgwE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ztx62zubbmZoEkUejPudY6l9UcYkTauhDAo+APln8RPHhQB79MwfBkuQU28ZtZn2J gGBG4y5Ig83jDI0JaX7D9Ni7RvIDbjmfGES6sSRPl+/UK2O9xK83q2BazuUDHiNCtJ qSG1/Ur0ZjoRHN8KujOkJMx3fnMv/njpTFpm8ZIo= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108498] [11/12/13 Regression] ppc64 big endian generates uninitialized reads with -fstore-merging Date: Tue, 24 Jan 2023 17:46:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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=3D108498 --- Comment #24 from Jakub Jelinek --- (In reply to Eric Botcazou from comment #23) > > The C/C++ FEs since r9-6625-gbec1da64aec26a490 turn some array initiali= zers > > into strings. >=20 > Ouch. I'm not sure that's worthwhile if the arrays are not byte-aligned. They actually are byte aligned. What happens is basically we have first some INTEGER_CST byte-sized store, then a STRING_CST store and then an INTEGER_CST store of just a few bits. So, the conditions for merging the first INTEGER_CST with the STRING_CST are met, string_concatenate is set, everything is contiguous and so the bit store at= the end is merged in (in the testcase there are some other stores in between too, a= ll INTEGER_CSTs). In the end we got a group with 71 bits with byte aligned start and we just store 64 bits and leave those 7 uninitialized.=