From patchwork Thu Mar 28 11:01:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 87757 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9608D3858404 for ; Thu, 28 Mar 2024 11:02:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0EB2A3858D28 for ; Thu, 28 Mar 2024 11:01:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0EB2A3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0EB2A3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711623692; cv=none; b=ZYQjHImwxrNZF1rgtOSoLGc93yheOnmqq7bfMhtOofhNjFed0fzRDn+q5QY7FAZUON+oY37MvGRZVvRX+ilI6LaWFQZm/nDMIUzb/62QMV+nnJkuS7V21RBPgO7iHAyPilW0Cb/hmqrR7m4zOR76aqrTE2TtWUyxfKz4phO6pak= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711623692; c=relaxed/simple; bh=iTtmJq/KkypE7WOFJQPAt7c/vV1XCyWfvHbmgnRSJU4=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=X304Gg1Jt7azf8W+SGxk6cySc3zNSM/+Ll8JI6YUetrJ3Q258aPeWnbpYBelDch1PGiZfUubgGXDxB0PD8oBzbxDONXHDN+rHfvD42cXCSbVjalxAseL/5dVqOREDtarp+EXT9thWCdlMI4AeTJuRbXCDZvrtHfB2EadJiASdhQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711623688; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=vY0D+EX8vuDNtnrVM6CKJXiYbRBefOY0CmjQKylWlFI=; b=Xo9dIeC3dWQbH2xCBrl3aT1Nlq2DdFDWtZXFJyn1SOQEz+XrBaSgo1SB6+HyLvqDCGFFbH tE6hHVvtwtQr9SlRPAhx8NPiJF8M6aRU9PLaSLeUBPur3GCdllgl10DnxtJtcQXlITsyRk +h2FwP4xlPT/IFvBG6TWn07e96TSdvg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-482-VB5DFLWoOy6feo7tROBfKg-1; Thu, 28 Mar 2024 07:01:27 -0400 X-MC-Unique: VB5DFLWoOy6feo7tROBfKg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0CC389B866 for ; Thu, 28 Mar 2024 11:01:26 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.57]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 733EE17AB9 for ; Thu, 28 Mar 2024 11:01:26 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 42SB1K2H744185 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Thu, 28 Mar 2024 12:01:20 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 42SB1J5l744184 for gcc-patches@gcc.gnu.org; Thu, 28 Mar 2024 12:01:19 +0100 Date: Thu, 28 Mar 2024 12:01:19 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Add testcase for already fixed PR [PR109925] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Hi! This testcase was made latent by r14-4089 and got fixed both on the trunk and 13 branch with PR113372 fix. Adding testcase to the testsuite and will close the PR as a dup. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2024-03-28 Jakub Jelinek PR tree-optimization/109925 * gcc.c-torture/execute/pr109925.c: New test. Jakub --- gcc/testsuite/gcc.c-torture/execute/pr109925.c.jj 2024-03-27 17:54:32.836301831 +0100 +++ gcc/testsuite/gcc.c-torture/execute/pr109925.c 2024-03-27 17:54:18.602494494 +0100 @@ -0,0 +1,30 @@ +/* PR tree-optimization/109925 */ + +int a, c, f; + +int +main () +{ + int g[2]; + for (c = 0; c < 2; c++) + { + { + char h[20], *b = h; + int d = 48, e = 0; + while (d && e < 5) + b[e++] = d /= 10; + f = e; + } + g[f - 2 + c] = 0; + } + for (;;) + { + for (; a <= 4; a++) + if (g[0]) + break; + break; + } + if (a != 5) + __builtin_abort (); + return 0; +}