From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 566DE3858D35; Mon, 10 Jun 2024 06:07:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 566DE3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717999640; bh=zfLvNhIwIvT3ORDzciW1fLYmrYxnvJJQ/UdOKboCqIQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nYJN0lFqSlTS4H5TO14BqZ23i+7nZ4biFHTp0Nfzcuy+Ynv04dJ8iHrGbhXEXeaGD lv9Fjl3lKA/8ZjLydRxYTdnZNny7nKTB5sBInYXRzsCU6WTwIM30rBO/9Dpt2974SF RiZdlp3uTTamoACj/btdPDDL3zMPLudcPYvb/QTM= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115404] [15 Regression] possibly wrong code on glibc-2.39 since r15-1113-gde05e44b2ad963 Date: Mon, 10 Jun 2024 06:07:19 +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: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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=3D115404 --- Comment #3 from Uro=C5=A1 Bizjak --- (In reply to Sergei Trofimovich from comment #0) > if (__builtin_add_overflow ((uintptr_t) string, maxlen, &end)) > end =3D -1; > > Could it be that dead store to `&end` somehow conflicts with a following > `end =3D -1`? FYI, this is not dead store, the two lines above are exactly what middle-end now transforms to a .SAT_ADD. The function returns -1 (AKA INT_MAX) when addition overflows.=