From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BD493858C42; Thu, 23 May 2024 12:27:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BD493858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716467255; bh=p+c/8wYRdrMeByUVhCmL022U7s66Jgkb4iMZGF+Z/48=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SB45gCyCr7gG+QXESAJWaMy8LlXgYgoVi/XXfeCcZHzuWxaYogug94F7U23/SJy9p cfjjHC3nScftfxQDcDnU2oMjcdncg3Dckihy2e7V40Jq3/c61JPK1QhFmMBJePgX62 XRVkAJQa1z916vsPIiVhsE9bf031Om9huAd4zV1U= From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114148] gcc.target/i386/pr106010-7b.c FAILs Date: Thu, 23 May 2024 12:27:33 +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: 14.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.DE 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: 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=3D114148 --- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE --- To investigate further, I've added comparison functions to a reduced version of pr106010-7b.c, with void cmp_epi8 (_Complex unsigned char* a, _Complex unsigned char* b) { for (int i =3D 0; i !=3D N; i++) if (a[i] !=3D b[i]) { printf ("cmp_epi8: i =3D %d: a[i].r =3D %x a[i].i =3D %x b[i].r =3D= %x b[i].i =3D %x\n", i, __real__ a[i], __imag__ a[i], __real__ b[i], __imag__ b[= i]); } } This shows (when using _Complex unsigned char since on Solaris, char is signed by default) cmp_epi8: i =3D 76: a[i].r =3D 0 a[i].i =3D 0 b[i].r =3D 88 b[i].i =3D 33 cmp_epi8: i =3D 77: a[i].r =3D 0 a[i].i =3D 0 b[i].r =3D 6 b[i].i =3D 8 cmp_epi8: i =3D 80: a[i].r =3D 0 a[i].i =3D 0 b[i].r =3D 3 b[i].i =3D 0 I've also noticed that the test result depends on the implementation of malloc used: * With Solaris libc malloc, libmalloc, and watchmalloc, the test aborts. * However, when using one of libbsdmalloc, libmapmalloc, libmtmalloc, or libumem, the test works. However, ISTM that the test is simply bogus: in avx_test * epi8_src, epi8_dst are allocated with malloc, buffer contents undefined * epi8_dst is cleared * epi8_dst is initialized from p_init * in foo_epi8, epi8_src[0] (an undefined value) is copied into first N elements of epi8_dst * epi8_dst is compared to epi8_src (with the remaining members of epi8_src still undefined) Why on earth would the rest of epi8_dst and epi8_src be identical if epi8_src was never initialized?=