From patchwork Mon Sep 9 07:45:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1982400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=caeV0ALR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X2JmS6rmsz1y1l for ; Mon, 9 Sep 2024 17:46:00 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E022385E837 for ; Mon, 9 Sep 2024 07:45:59 +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.129.124]) by sourceware.org (Postfix) with ESMTP id 84995385C6C7 for ; Mon, 9 Sep 2024 07:45:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 84995385C6C7 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 84995385C6C7 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725867939; cv=none; b=pOTih9pyVMFjQzo2IhozJdNhK2vGeHOADm7/2JO6KE0d9rsFFEjTJTB8hvPE5DkKCsme6t2q8/DcsXUyT1pRuFLRUQgCD3xJneYm7awkSWuvvM0nrtQPVJ+36y/PtG0b3dEYWysS0ulpZzwf/SsbdB9dvDTwNsJ5hUWF4SxYUTU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725867939; c=relaxed/simple; bh=4WFuK/iRqItU5sB/t4BfKDdKROEG/AUzzO9FxEc91EY=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=SIXQ84ohf+5WjoyhHxxTH2Eiv3GduMK0GPI+KFsfHq3mEybM3seB2UPFMuO+6re0dYw5b5bC0aiD7P6AdWyxUelqfwkhRYwnbC7J0UmZ984j2o725bVyA6i2Z92UDkXc+nbj9Lt3icYVZOR6ZVqRySd0wuBO4CCWUoP7mP84mVY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725867938; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=i+5IoOpk62bur0oDgDgRTibXd/ybQrzyfM5DPTJwF3E=; b=caeV0ALRMXyKQGkwsJLdtIVkD/fClAFOrDVg7pD8uyZzpjDNHOC6reCa+cTWoSPUdtES8b mke1U00oFDfhEQf6MvyltsyBObwk3or8E2JXX/LdUVpVlhSKznn1KsmC9GlhoP8aFE3agL WE22FzkXEq/PUjYjaE0s4hfJnI0ques= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-217-LjULtCY2PaKwJc1R0g4RfA-1; Mon, 09 Sep 2024 03:45:37 -0400 X-MC-Unique: LjULtCY2PaKwJc1R0g4RfA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DED5E1955F44 for ; Mon, 9 Sep 2024 07:45:35 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.29]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1968519560B1; Mon, 9 Sep 2024 07:45:34 +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 4897jWvS123154 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 9 Sep 2024 09:45:32 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 4897jWW3123153; Mon, 9 Sep 2024 09:45:32 +0200 Date: Mon, 9 Sep 2024 09:45:32 +0200 From: Jakub Jelinek To: Andrew MacLeod Cc: gcc-patches , "hernandez, aldy" Subject: [committed] testsuite: Fix up pr116588.c test [PR116588] Message-ID: References: <53b44a35-fdf6-47bd-ac06-ee1b584d6dd3@redhat.com> MIME-Version: 1.0 In-Reply-To: <53b44a35-fdf6-47bd-ac06-ee1b584d6dd3@redhat.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.6 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_H3, 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~incoming=patchwork.ozlabs.org@gcc.gnu.org On Sat, Sep 07, 2024 at 01:58:46PM -0400, Andrew MacLeod wrote: The test as committed without the tree-vrp.cc change only FAILs with FAIL: gcc.dg/pr116588.c scan-tree-dump-not vrp2 "0 != 0" The DEBUG code in there was just to make it easier to debug, but doesn't actually fail when the test is miscompiled. We don't need such debugging code in simple tests like that, but it is useful if they abort when miscompiled. With this patch without the tree-vrp.cc change I see FAIL: gcc.dg/pr116588.c execution test FAIL: gcc.dg/pr116588.c scan-tree-dump-not vrp2 "0 != 0" and with it it passes. Tested on x86_64-linux with make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=pr116588.c' and committed to trunk as obvious. 2024-09-09 Jakub Jelinek PR tree-optimization/116588 * gcc.dg/pr116588.c: Remove -DDEBUG from dg-options. (main): Remove debugging code and simplify. Jakub --- gcc/testsuite/gcc.dg/pr116588.c.jj 2024-09-09 09:27:39.155082488 +0200 +++ gcc/testsuite/gcc.dg/pr116588.c 2024-09-09 09:31:37.951970837 +0200 @@ -1,7 +1,7 @@ /* PR tree-optimization/116588 */ /* { dg-do run { target bitint575 } } */ /* { dg-require-effective-target int128 } */ -/* { dg-options "-O2 -fno-vect-cost-model -fno-tree-dominator-opts -fno-tree-fre --param=vrp-block-limit=0 -DDEBUG -fdump-tree-vrp2-details" } */ +/* { dg-options "-O2 -fno-vect-cost-model -fno-tree-dominator-opts -fno-tree-fre --param=vrp-block-limit=0 -fdump-tree-vrp2-details" } */ int a; __int128 b, c; @@ -18,15 +18,8 @@ foo (_BitInt (129) e) int main () { - __int128 x = foo (0); -#ifdef DEBUG - for (unsigned i = 0; i < sizeof (x); i++) - __builtin_printf ("%02x", i[(volatile unsigned char *) &x]); - __builtin_printf("\n"); -#else - if (x) - __builtin_abort(); -#endif + if (foo (0)) + __builtin_abort (); } /* { dg-final { scan-tree-dump-not "0 != 0" "vrp2" } } */