From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id BDFE23839DF9 for ; Fri, 13 Jan 2023 16:40:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BDFE23839DF9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673628036; 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=zGyF35HzTfrpGneIwMErKqesg/NlQIVNY0DQ8mP3J8s=; b=NzrlL526fa2UlfP583LiNmwlxGJeGux5V7Wd6cEz+oR/za+upodNS0wTiolDXV13yk3b/3 F7D5oYRkjjqYYba446rjz5xr7XNBl+i6XBCHOvYQAuScupn7C8vJnWw/016e3YcCshVjFk 0yeNoXcmBefe6XljKFAXy+t0eXKPTg0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-383-34b0amU6MP2UsVkhYBaOmg-1; Fri, 13 Jan 2023 11:40:34 -0500 X-MC-Unique: 34b0amU6MP2UsVkhYBaOmg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 85F6818E5355 for ; Fri, 13 Jan 2023 16:40:15 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1277C14171B7 for ; Fri, 13 Jan 2023 16:40:14 +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 30DGeBea1360548 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Fri, 13 Jan 2023 17:40:12 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 30DGeBul1360547 for gcc-patches@gcc.gnu.org; Fri, 13 Jan 2023 17:40:11 +0100 Date: Fri, 13 Jan 2023 17:40:11 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Add another testcase from PR107131 Message-ID: Reply-To: Jakub Jelinek MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! This one is hand reduced to problematic code from optimized dump that used to be miscompiled during combine starting with r12-303 and fixed with r13-3530 aka PR107172 fix. 2023-01-13 Jakub Jelinek PR target/107131 * gcc.c-torture/execute/pr107131.c: New test. --- gcc/testsuite/gcc.c-torture/execute/pr107131.c.jj 2023-01-13 17:29:42.713370475 +0100 +++ gcc/testsuite/gcc.c-torture/execute/pr107131.c 2023-01-13 17:29:33.366503884 +0100 @@ -0,0 +1,18 @@ +/* PR target/107131 */ + +__attribute__((noipa)) unsigned long long +foo (unsigned char o) +{ + unsigned long long t1 = -(long long) (o == 0); + unsigned long long t2 = -(long long) (t1 > 10439075533421201520ULL); + unsigned long long t3 = -(long long) (t1 <= t2); + return t3; +} + +int +main () +{ + if (foo (0) != -1ULL) + __builtin_abort (); + return 0; +} Jakub