From patchwork Mon Jan 15 16:37:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 84132 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 F33523858C54 for ; Mon, 15 Jan 2024 16:38:13 +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 DD04B3858D1E for ; Mon, 15 Jan 2024 16:37:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD04B3858D1E 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 DD04B3858D1E 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=1705336662; cv=none; b=UwlJdLtaCYTCvex/R7TyLrHd09iPhyPkqrI2aEOo2jXr8Q4dkxAMSiW2y05tJEkGm7dPAIWNJeVQONZletE4Uu4x3YnvtDKyE7sBzO7eHEB5mTkePUz7mPovUUMPd7yyjblP3SeCbowtk+9K+8t4QrXO9qVnLSYGbvzaDTYBoVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705336662; c=relaxed/simple; bh=i80cW70zqjbLQIzOBcM7zVEEIRY+QKhZKRNnAn9sATQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=ZOsBTGZmhs6Lq6YcKZKKUHG6FeuW4S7j6zQmnVrd1cgZc5LdVFaH6eEn9gFZh7ECLNUvLda5MNC21l5WLVKCHrYWKdqHaj+atkWEAUkpUC6mW88Rci6ChHMabHSx50jMly2ramD5l7Q5GQHz+/6PF0EONVPNkKx7RrSfQ7All7Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705336660; 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=drgCVqGtJlb6Bgu8PHDWjCyfRjFWIUlX131HDoaWxT8=; b=HsYi/hxDncjh5n4q/erRsRuqnoidBSPvMhHmreqGA7h2rEpqDps5YC0iv8IcCW8lWkl3hS 47JyRLIe0cSnGydXYa9EX8m+Cqaj2c4csQK7NptlXezaOd4nRNe8N+eVfUaCKHrbnFzHk4 dveOAQd7UC1I7zKY/+orY5eELEiS7TI= 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-684-66bLWsYfOaase6tVFDVKhw-1; Mon, 15 Jan 2024 11:37:38 -0500 X-MC-Unique: 66bLWsYfOaase6tVFDVKhw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 58E7784AEEF for ; Mon, 15 Jan 2024 16:37:32 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1BBF12026D6F for ; Mon, 15 Jan 2024 16:37:31 +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 40FGbTia3492775 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Mon, 15 Jan 2024 17:37:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 40FGbTcq3492114 for gcc-patches@gcc.gnu.org; Mon, 15 Jan 2024 17:37:29 +0100 Date: Mon, 15 Jan 2024 17:37:28 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Add testcase for already fixed PR [PR113048] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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! The ICE on this testcase was fixed by r14-7141. Tested on x86_64-linux -m32/-m64 with current trunk as well as older trunk which still ICEd, committed to trunk as obvious. 2024-01-15 Jakub Jelinek PR rtl-optimization/113048 * gcc.target/i386/pr113048.c: New test. Jakub --- gcc/testsuite/gcc.target/i386/pr113048.c.jj 2024-01-15 17:25:50.186423929 +0100 +++ gcc/testsuite/gcc.target/i386/pr113048.c 2024-01-15 17:25:41.643539577 +0100 @@ -0,0 +1,26 @@ +/* PR rtl-optimization/113048 */ +/* { dg-do compile } */ +/* { dg-options "-O -march=cascadelake -fwrapv" } */ + +signed char a, b, c; +int d; +const char *e, *q; +short f; +int g; + +void +foo (int x, long long y, long long z) +{ + unsigned char h = x; + int i = __builtin_strncmp (q, e, 2); + h /= g; + unsigned long long j = (~z & (0xfb5856dd8a4d4702ULL & f) / 0) * h; /* { dg-warning "division by zero" } */ + b += __builtin_add_overflow_p (d, c, 0); + signed char k = y; + long l = -k & sizeof (0); + long long m = y + j + z + h + 3 + l; + int n = m + i; + short o = n + f; + signed char p = o + h + k; + a = p; +}