From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 415CF38618AB; Thu, 15 Feb 2024 15:14:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 415CF38618AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708010099; bh=cmLQcz516mIhyQXJdU+UiAxLPu2t89NLUYz8J6g7wPs=; h=From:To:Subject:Date:From; b=al5ba9VHIITcyFqrmic9y4yvO6gWs3dmruQ3614RVa1gaFJqovZbMBA70VwdtBs0R eigskry1He6PgsHNH1HxpMRers819rKdbrGI9pnlTRb7QRFrKyHyOhZhfFmN/lO9Q3 aie+I1hVPEtxSXarMHx6e9DZGw9RU1UtVIzZyU2U= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-8329] testsuite: Add testcase for already fixed PR [PR107385] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: 4040d472825f203660371331c9e86cd75e30f8d2 X-Git-Newrev: 407b04b59f712ba41d1bcfbf86eba68c52e7917f Message-Id: <20240215151459.415CF38618AB@sourceware.org> Date: Thu, 15 Feb 2024 15:14:59 +0000 (GMT) List-Id: https://gcc.gnu.org/g:407b04b59f712ba41d1bcfbf86eba68c52e7917f commit r13-8329-g407b04b59f712ba41d1bcfbf86eba68c52e7917f Author: Jakub Jelinek Date: Thu Feb 15 15:55:25 2024 +0100 testsuite: Add testcase for already fixed PR [PR107385] This testcase has been fixed by the PR113921 fix, but unlike testcase in there this one is not target specific. 2024-02-15 Jakub Jelinek PR middle-end/107385 * gcc.dg/pr107385.c: New test. (cherry picked from commit 5459a9074afabf700f055fc8164f88dadb1c39b0) Diff: --- gcc/testsuite/gcc.dg/pr107385.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gcc/testsuite/gcc.dg/pr107385.c b/gcc/testsuite/gcc.dg/pr107385.c new file mode 100644 index 000000000000..b678f57a3dfc --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr107385.c @@ -0,0 +1,20 @@ +/* PR middle-end/107385 */ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +__attribute__((noipa)) int +foo (void) +{ + int x; + asm goto ("": "=r" (x) : "0" (15) :: lab); + x = 6; +lab: + return x; +} + +int +main () +{ + if (foo () != 6) + __builtin_abort (); +}