From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 40F843857C6D; Thu, 1 Oct 2020 11:31:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40F843857C6D From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/97264] [11 Regression] -fpa-modref breaks va_arg on glibc Date: Thu, 01 Oct 2020 11:31:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 11.0 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: Thu, 01 Oct 2020 11:31:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97264 --- Comment #6 from Richard Biener --- (In reply to Andreas Schwab from comment #5) > Why doesn't gcc warn about that? It does: unsigned char **q; void foo (char *p) { q =3D (unsigned char **)&p; } > gcc t.c -fstrict-aliasing -Wstrict-aliasing=3D2 -S t.i: In function 'foo': t.i:4:3: warning: dereferencing type-punned pointer will break strict-alias= ing rules [-Wstrict-aliasing] q =3D (unsigned char **)&p; ^ note the default level of -Wstrict-aliasing when enabled is 3 which will not warn when the pointer is not dereferenced in the same expression.=