From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 40C3238582A4; Thu, 28 Jul 2022 22:16:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40C3238582A4 From: "vt at altlinux dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106470] Subscribed access to __m256i casted to (uint16_t *) produces garbage or a warning Date: Thu, 28 Jul 2022 22:16:59 +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: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vt at altlinux dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: 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, 28 Jul 2022 22:16:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106470 --- Comment #5 from Vitaly Chikunov --- I experimented with `_mm256_extract_epi16` too and loop liek this worked to= o: ``` # pragma GCC unroll 16 for (size_t i =3D 0; i < 16; i++) { printf(" %04x", _mm256_extract_epi16(tmp, i)); } ``` That's why I started to experiment with `#pragma GCC unroll 16` for the 2nd test case. Curiously, in `liboqs` adding the pragma removes the `=E2=80=98tmp=E2=80=99= is used uninitialized` warning (while w/o pragma it compiles with warning), but in reproducer it acts contrary - with the pragma it causes warning and w/o pra= gma it compiles quietly.=