From patchwork Fri Mar 17 08:17:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 71131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp211975wrt; Fri, 17 Mar 2023 01:18:46 -0700 (PDT) X-Google-Smtp-Source: AK7set8H4OoYZ++rkktO+RnWoH6L6UIEwzhBQDtFDjzoZ24EkRro7JxpMj7wFb8bAXgdcg/C0XoX X-Received: by 2002:aa7:ca41:0:b0:4ac:d34b:c2a9 with SMTP id j1-20020aa7ca41000000b004acd34bc2a9mr2100631edt.14.1679041126204; Fri, 17 Mar 2023 01:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679041126; cv=none; d=google.com; s=arc-20160816; b=ANV3NMEMA2aBiqxcUi0Aga1KXK2L49sQQdyKdNAk/b6XOkynpjq6p020fgThVjKZ79 akeH5kbXb5JdAV/NQcwv6sPIzKSEivGudUZShB8XrXbwmxdNpmSWPXwxo2+djjUT48OQ oQR0te7Ay0OU0V3HhEIuvlM94HlFkIQONZgZqGvBoVTD6ri5pM+l506fJr+ktKOqpsMz yL1rd4lbHrYOi1HOCvJDoKjpIagRTmQx1CsALLhqMuc1sucOL5jfkr4ie6dhevdGJULb WHRRzh5VPyQIqgvoN2utpjy1NPQtAtdNf/zCxehRi0O/oH6sbtu2JUJDQ7NHKFpWlBP9 cF9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=BCD/PSPHWgjOCpfeXhLzo2mmgWjlVfBBPFd5ShCDb8o=; b=CxzFXaWsmkr4DmJoVc/+HY1m2m0znXjh1Qbc1l108nY2+IOjtdThkQjHUrXTZK6gBg EXyv8rbuYkJXNxoLeglszWpRX3azxU6V8hkx9c6yp9IU5CzkZC+FfD8z4wWZl2kV123x d2+cAL0bJ0LmaNBNT1CuVGYI3ge/Z7r9t3ob3h3l86m7ySVRDzRZz0Nddhlg126XGxZK I5Cto+nfDyGgFdkQ/QMgDe05sONIcXmMPVPI+Zoy575CRvqLD0uNNajLPbiegoXuloT7 CUsG9NWP7y0MK55B0pZ69CnL9jMsvsKcNuzD+zORizm7WBMxRr1BxqYb1Hh4lkFcWu8v d4Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=fsl32OD+; 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=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id w16-20020aa7d290000000b004af6e957024si1973479edq.580.2023.03.17.01.18.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 01:18:46 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=fsl32OD+; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 05EEE3857803 for ; Fri, 17 Mar 2023 08:18:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05EEE3857803 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679041125; bh=BCD/PSPHWgjOCpfeXhLzo2mmgWjlVfBBPFd5ShCDb8o=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=fsl32OD+gluWOQJXTYWrCua418xD6sLWkfkxzwUpi4XnbZpZvNxr4D8XxIibCb7sj cuQAa3y/gh0+S89ZSfcwRgU2/9ksm+Yfwbi/SyqSu1NhXNUpLbU40lo7bTgew2cYlI AmU/etKrpl6jaXt51huiMihvwyFGPO/Yc+ger26Q= 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 AF9043858423 for ; Fri, 17 Mar 2023 08:18:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF9043858423 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-484-BL6aTLB9N365MEnaAGoW1Q-1; Fri, 17 Mar 2023 04:17:57 -0400 X-MC-Unique: BL6aTLB9N365MEnaAGoW1Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C45893C0F1B9; Fri, 17 Mar 2023 08:17:56 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 89264C15BA0; Fri, 17 Mar 2023 08:17:56 +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 32H8HsgP901970 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 17 Mar 2023 09:17:54 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 32H8Hrmj901969; Fri, 17 Mar 2023 09:17:53 +0100 Date: Fri, 17 Mar 2023 09:17:53 +0100 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up forwprop-39.c testcase [PR109145] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 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_H2, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760602228049354988?= X-GMAIL-MSGID: =?utf-8?q?1760602228049354988?= Hi! As written in the PR, newlib headers aren't C11 compliant in that they don't define CMPLXF macro, and glibc before 2.16 doesn't define that either. I think it is easier to use __builtin_complex directly, over another patch which keeps including complex.h but defines CMPLXF if it isn't defined, we want to test how forwprop behaves rather than what complex.h defines or doesn't define. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-03-17 Jakub Jelinek PR testsuite/109145 * gcc.dg/tree-ssa/forwprop-39.c: Don't include complex.h. (foo): Use __builtin_complex rather than CMPLXF. Jakub --- gcc/testsuite/gcc.dg/tree-ssa/forwprop-39.c.jj 2023-03-13 10:18:59.545433477 +0100 +++ gcc/testsuite/gcc.dg/tree-ssa/forwprop-39.c 2023-03-16 18:49:40.563504504 +0100 @@ -1,14 +1,12 @@ /* { dg-do compile } */ /* { dg-options "-std=c11 -O2 -fdump-tree-forwprop1 -fdump-tree-optimized" } */ -#include - extern void push1(void *p, float _Complex x); void foo (void *q, float _Complex *x) { float r = __real *x; float i = __imag *x; - push1 (q, CMPLXF (r, i)); + push1 (q, __builtin_complex (r, i)); } /* { dg-final { scan-tree-dump-not "COMPLEX_EXPR" "forwprop1" } } */