From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 218EB385B832; Mon, 6 Apr 2020 07:29:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 218EB385B832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586158145; bh=SFmI1MxPJczsIGfTjiGBZvJ5I+mZ+0+fXVbSp/E3Hlo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=O11eQ5Oqr/8U/2CfhzZ+b2THXunYHDzSUd6usdXaXaae0soYNes7MB8mFGo5W+AtY 9StAQgUA4NT7m5kPq45/1OCDuAQzxizHqzEH9HN5+UsShUzBqQQxVJP/dBly5/TcQp V6IVEybiBsb5kGM658sdh0wcilajCkcT4Q+27n9E= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94482] [8/9/10 Regression] Inserting into vector with optimization enabled on x86 generates incorrect result Date: Mon, 06 Apr 2020 07:29:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin 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: 8.5 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: Mon, 06 Apr 2020 07:29:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94482 --- Comment #15 from Martin Li=C5=A1ka --- (In reply to Jakub Jelinek from comment #12) > Reduced testcase (-O2 -msse2 -m32): > typedef unsigned V __attribute__ ((__vector_size__ (16))); > union U > { > V j; > unsigned long long i __attribute__ ((__vector_size__ (16))); > }; >=20 > static inline __attribute__((always_inline)) V > foo (unsigned long long a) > { > union U z =3D { .j =3D (V) {} }; > for (unsigned long i =3D 0; i < 1; i++) > z.i[i] =3D a; > return z.j; > } >=20 > static inline __attribute__((always_inline)) V > bar (V a, unsigned long long i, int q) > { > union U z =3D { .j =3D a }; > z.i[q] =3D i; > return z.j; > } >=20 > int > main () > { > union U z =3D { .j =3D bar (foo (1729), 2, 1) }; > if (z.i[0] !=3D 1729) > __builtin_abort (); > return 0; > } Ok, Jakub's version started to Abort with r7-987-gf17a223de829cb5f and can = be seen on current master.=