From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F8773861862; Thu, 9 Jul 2020 12:18:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F8773861862 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594297110; bh=sDLScMI6wwSxHbvwKpjHd8H1Bzr0z02Rg1t+JSEHUpY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZVAsck7mzDeIfv2nXYFJQEW+XqnEGdv0yY1S/eP4pmAlOF1y/ZADsFob4U6XO5zwV F2gK0T9TrhVRwIztHgTH82JelsMvjgohWA5Z2pSjLmTHD9aGose7zhUKNCP3SU9+4q s/22Y/J3bxvTH2wBWeF9SikI935Ub8JVGhAPFyQQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96133] [10/11 Regression] x86-64 gcc 10.1 using -O3 leads to wrong calculation since r10-1882-g831e688af50c5f77 Date: Thu, 09 Jul 2020 12:18:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.2 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, 09 Jul 2020 12:18:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96133 --- Comment #4 from Richard Biener --- Interestingly it works for int[4] but fails for int[2]. typedef int T; static const T a[2][3] =3D { { 1, 2, 3 }, { 4, 5, 6 } }; typedef T v2 __attribute__((vector_size(2*sizeof(T)))); int main() { const T *p =3D &a[0][2]; v2 x =3D *(const v2 *)p; T z =3D x[1]; if (z !=3D 4) __builtin_abort (); return 0; }=