From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9233D3858C55; Sat, 1 Oct 2022 03:02:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9233D3858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664593331; bh=ijcw6zYpyOIg/YMadby2LPFeibSSboozjSqSC5N4+S8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q/2eKYuRN3rQNHbdUCXvMLJ3eqkdCv2fsm4/iO6KQXDESRxRmi7mdf8bf+QURAyo3 wbcSqN579MENNwE5B6aXYNhAEoPh7HvJXocP+cdlIYHqDGIXosqnoj4b3YWulVNpnt qgLfcNELcHQCuFC3KM0nkiCscrRn/zAaxoX1GySk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/107107] Wrong codegen from TBAA when stores to distinct same-mode types are collapsed? Date: Sat, 01 Oct 2022 03:02:11 +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: alias, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: cf_known_to_fail 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=3D107107 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |4.1.2, 4.4.7, 4.5.3 --- Comment #3 from Andrew Pinski --- Here is a testcase which has failed since before 4.1.2: ``` static inline void set_longish(int is_long_long, void *p, long x) { if (is_long_long) *(long long*)p =3D x; else *(long*)p =3D x; } static long test(long long *p, int index, int mode) { *p =3D 1; set_longish(mode, p+index, 2); return *p; } long (*volatile vtest)(long long*, int, int) =3D test; #include int main(void) { long long x; long result =3D vtest(&x, 0, 1); printf("%lu/%llu\n", result, x); } ``` The only difference from the original testcase is marking set_longish as st= atic inline. I suspect what changed between 4.7 and 4.8 for the original testcas= e is inlining.=