From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4EE4A385B515; Thu, 16 Feb 2023 15:25:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EE4A385B515 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676561137; bh=1uIoRdduT7IYi30cWvyeNb8WEChBUYxZ04Pgy9eCQnI=; h=From:To:Subject:Date:From; b=oeBCzfTSHHLbQN+lMVYdBAiKYdLdOFdVk4L4r1AwQ63h+PNs4ENtW/h2B2R05ChzH 1okw6OyUQIPEErhUhhuFF7xfBYgacOxSr/eZjRTg7G3JLfjZ8ZwLkn80KKjSSSLAYy uV4E0XKENoS0aDMEbpNvYZxjX0X3VrLrleRH3YFA= From: "sirl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108821] New: Extra volatile access with -O2 -ftree-loop-im since GCC-11 Date: Thu, 16 Feb 2023 15:25:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sirl 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D108821 Bug ID: 108821 Summary: Extra volatile access with -O2 -ftree-loop-im since GCC-11 Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Hi, this small example extern volatile int *x; static int gCrc; static int crc16Add(int crc, int b) __attribute__((noinline)); static int crc16Add(int crc, int b) { return crc + b; } void f(int data, int dataSz) { int i; for(i=3D0;i