From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0F17E3858C36; Mon, 28 Aug 2023 14:41:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F17E3858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693233678; bh=d1HlhbVpgR/D/MUKw4dYBdMkJKXEEik2ND7dPYQCH6U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vzkFc+aQwgFnRjDmrQ0AOerIX/QClxmMolxe9RazgeVww86KFVjrkoKeFtVkxYJR4 EhQpPoqcl6TciyZdG1GLbmgxUjvokhfvFRO9igPkpVJbB8Bdx9MhzKturNL820uUaT V0F7NZFfW0AKHGULr7gjVZ21FFk/wJUktGmlMMc8= From: "tg at mirbsd dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111165] [13 regression] builtin strchr miscompiles on Debian/x32 with dietlibc Date: Mon, 28 Aug 2023 14:41:17 +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: 13.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: tg at mirbsd dot org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D111165 --- Comment #10 from Thorsten Glaser --- oh no, wait, that was for strchr=E2=80=A6 the strlen one=E2=80=A6 but, yeah= , that too: extern size_t xstrlen(const char *s); and changing the line again to=E2=80=A6 sp +=3D xstrlen(sp) + 1; =E2=80=A6 and adding in another .c file: size_t xstrlen(const char *s) { register const char *cp =3D s; while (*cp++ !=3D '\0') ; return (--cp - s); } And it still fails.=