From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C97F3858412; Wed, 1 Sep 2021 23:45:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C97F3858412 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/102162] Byte-wise access optimized away at -O1 and above Date: Wed, 01 Sep 2021 23:45:07 +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: unknown X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Wed, 01 Sep 2021 23:45:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102162 --- Comment #19 from Andrew Pinski --- Gimple level does look correct: unit-size align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff7315bd0 precision:32 min max context > readonly arg:0 unit-size align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff73159d8 attributes > fields context pointer_to_this > arg:0 constant arg:0 t.c:17:9 start: t.c:17:9 finish: t.c:17:39> arg:1 > arg:1 unit-size align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-ty= pe 0x7ffff7251690 precision:32 min max context pointer_to_this > unsigned packed SI t.c:12:33 size unit-size align:8 warn_if_not_align:0 offset_align 128 offset bit-offset context > t.c:12:103 start: t.c:12:97 finish: t.c:12:105> The var_decl too: (gdb) p debug_tree(0x7ffff7ff6120) unit-size align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff7251690 precision:32 min max context pointer_to_this > addressable used public unsigned external read SI t.c:6:14 size unit-size user align:8 warn_if_not_align:0 context attributes value >> chain >=