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: 188257 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1812847dyc; Mon, 15 Jan 2024 08:38:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsMZFEyMJ9ftsbmONA7cRz9cZEStyxJcNoC8BBQ9plg5LFucC9ReAFfAcpbSXQPp9nsE2E X-Received: by 2002:a05:620a:821a:b0:781:7253:ebdd with SMTP id ow26-20020a05620a821a00b007817253ebddmr5337657qkn.154.1705336709931; Mon, 15 Jan 2024 08:38:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705336709; cv=pass; d=google.com; s=arc-20160816; b=BCBTPqzemd0d5yQUMShh04r2Bz1Ox+cCgswS0bCXKZWM6uH+U+lC6dMK2rhI1HYaQg adDcN/zz052V50QbGA0bxg8fvUwWXuDRMlPpQpQyVOj45HRS14PoadtS+IZbRbIp0Uyq 0O+xHj13V4hixPkGn891KjJ0YbJ84dVzygkFC7HV44UD2ttoGNyf9XMSumxotgOoANFB tkbo7+bymh01EYM+TFMeG35LRw1jwxgbmx4yS34rYIwlaFydVGbsfbQa+ygdL5z9b/vL 8JC7KvbI+jmrisXDh+2gkvpyKi0XAbP7aDvMrNaBVhImpZWz6YN9YEzVy2G//E1KJXDJ zQPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=drgCVqGtJlb6Bgu8PHDWjCyfRjFWIUlX131HDoaWxT8=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=Sejf/ySUtYmKiBfgj1S1y53ZHYn49bOPMXUsfeuUkDrjZTEa5O59UcTtq25puKO8da RwvEhvAXxZU7O3IW21HJ6/pjbvw+HnKMyAWoGcJIeM8TUMZNq00Icawg85dfehi/TB5j 2N8nJvdx15gaN1lQ20L9VR4ptGibWaQpfPU3C55vqP0F2T/D98IHUMStTBMPUaM5zqfU 5YJFy1glNqXz1ZHswdXByQx3ZDoP4uv5PfArisPAemm5sRpKwWHzoFvEjlIp50OHVJvb 019ERlPrFT9Ja7UiQP5cCZiYzyVSeXsYs+zdrX/3ZnTwvwIBxh0cfzqXm7AZZui4AhOT Fnsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HsYi/hxD"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x22-20020a05620a14b600b0078316dbc426si8123687qkj.551.2024.01.15.08.38.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:38:29 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HsYi/hxD"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9D274385840A for ; Mon, 15 Jan 2024 16:38:29 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788175145856874973 X-GMAIL-MSGID: 1788175145856874973 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; +}