Message ID | Y0PMXoRzh+dg/a1n@tucnak |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1454572wrs; Mon, 10 Oct 2022 00:41:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5uA2B2u9GT0hm6OKI9heICbAzdZobQTM/3vxzHeChz49wogTMDBXURRCTZntS0O0q7Hlpv X-Received: by 2002:a50:c31b:0:b0:458:cc93:8000 with SMTP id a27-20020a50c31b000000b00458cc938000mr17178109edb.264.1665387699678; Mon, 10 Oct 2022 00:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665387699; cv=none; d=google.com; s=arc-20160816; b=RiHrdBFxC26tg5L+f13yvO6KzvV2UswU/o9a6eHx0PfF8EF0BSqfAu6jPty5KCQKYf hZ+xrAci2G7NcuT+tPb1M52oGcbY9Y1mjFKGuybE1DZRkVYXVCE+EImtmZbkHHPWA508 JIqmmFNniyaUtncyrGXfjMxzIX119P//RTKPlstmYd++vGx38iwIxbPWCaP1Q6wHrlOx acuieKlEm7EyzZLhZ0FOyEYRpbSIH9HWT19h0sNngKGFqZiU7Dg9L3rrV0bcNyvHxUYp NnNvENYnMdnH1zV6btcAglLrwS0hkuDBGYopY+DdtC2rtt/puyeUTUlmt+zshFxAcohk B/dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:content-disposition:in-reply-to :mime-version:references:message-id:subject:to:date:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=OQlpDDpG92HsSZBonR/gF7l/JxnsZm8Y88OcNowENlA=; b=PC0vQcz5jWUqaUqLltnU0mYHh5fSEf3LpZGUoXCr2Vu/bN+1MovLTbkIjVfS/zaTw9 Lv1HNbCxq8JgE78moKtm9nuX2S1ibfuupWm0HO1rx/tk7HuUiLSQ6gi8Lb3sWEr3v3DQ V0xaxW9KQBWJYQ2PLeaJ/Ozj25ZA86cCYFSgH+1DnFBtDGtFJwy0UHH7IsnKLrDyZ9Ff +Wtj0AzCo70te1p8KtbY2vC+AzEAZ53Nf8egsZ7/YVIoQA5/u/eods9MOalNQHh3EAJ7 1CMz3HVfbasval3uy5TFXQvuZ3DkdZW3QSbphhVD7KyXVW7LKxLYhZa6+jvsNZoj74pg BuYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=CTm660sS; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id b1-20020aa7c901000000b0044ecd80f257si8540230edt.603.2022.10.10.00.41.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 00:41:39 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=CTm660sS; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 3BBF93858438 for <ouuuleilei@gmail.com>; Mon, 10 Oct 2022 07:41:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3BBF93858438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665387697; bh=OQlpDDpG92HsSZBonR/gF7l/JxnsZm8Y88OcNowENlA=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CTm660sSxHvCDw2CYXck+EJQPOmu7YC/x1Kp7NyRX2Vi127KRILspispPkHFC/oWK nfkHQuabbDJxZVsWIUgjFqkbZziJKoFDGzqcxBF0uupWK0LpyQUfkAYFFsRotOT8xs WKbDV+4K1s4jNQhJqMBXkNCIBgo7Ap9V248xrcdU= 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 ESMTPS id 297003858C53 for <gcc-patches@gcc.gnu.org>; Mon, 10 Oct 2022 07:40:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 297003858C53 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-347-Jgc_IhCoMK-OzsdhzeoJsQ-1; Mon, 10 Oct 2022 03:40:19 -0400 X-MC-Unique: Jgc_IhCoMK-OzsdhzeoJsQ-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 2FBD695D685; Mon, 10 Oct 2022 07:40:19 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E2D5F145D825; Mon, 10 Oct 2022 07:40:18 +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 29A7eFwi3162524 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 10 Oct 2022 09:40:16 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 29A7eEUo3162523; Mon, 10 Oct 2022 09:40:14 +0200 Date: Mon, 10 Oct 2022 09:40:14 +0200 To: Tobias Burnus <tobias@codesourcery.com> Subject: [committed] openmp, fortran: Fix up IFN_ASSUME call Message-ID: <Y0PMXoRzh+dg/a1n@tucnak> References: <e747364c-f716-1661-2570-590a4c47820c@codesourcery.com> <Yz7HQxL3WPtro1Bu@tucnak> <81064796-39af-cf76-d551-e990e48920ed@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <81064796-39af-cf76-d551-e990e48920ed@codesourcery.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jakub Jelinek <jakub@redhat.com> Cc: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746285572392180174?= X-GMAIL-MSGID: =?utf-8?q?1746285572392180174?= |
Series |
[committed] openmp, fortran: Fix up IFN_ASSUME call
|
|
Commit Message
Jakub Jelinek
Oct. 10, 2022, 7:40 a.m. UTC
On Thu, Oct 06, 2022 at 06:15:52PM +0200, Tobias Burnus wrote:
> Like as attached? – It did survive regtesting.
Like in other spots in trans-openmp.cc that create a TARGET_EXPR, the
slot has to be created with create_tmp_var_raw, because gfc_create_var
adds the var to BLOCK_VARS and that ICEs during expansion because
gimple_add_tmp_var_fn has:
gcc_assert (!DECL_CHAIN (tmp) && !DECL_SEEN_IN_BIND_EXPR_P (tmp));
assertion. Also, both C/C++ ensure the argument to IFN_ASSUME has
boolean_type_node, it is easier if Fortran does that too.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.
2022-10-10 Jakub Jelinek <jakub@redhat.com>
* trans-openmp.cc (gfc_trans_omp_assume): Use create_tmp_var_raw
instead of gfc_create_var for TARGET_EXPR slot creation. Create it
with boolean_type_node and convert.
Jakub
--- gcc/fortran/trans-openmp.cc.jj 2022-10-07 00:13:12.508191601 +0200 +++ gcc/fortran/trans-openmp.cc 2022-10-09 14:17:55.430364168 +0200 @@ -4588,11 +4588,14 @@ gfc_trans_omp_assume (gfc_code *code) t = se.expr; else { - tree var = gfc_create_var (TREE_TYPE (se.expr), NULL); + tree var = create_tmp_var_raw (boolean_type_node); + DECL_CONTEXT (var) = current_function_decl; stmtblock_t block2; gfc_init_block (&block2); gfc_add_block_to_block (&block2, &se.pre); - gfc_add_modify_loc (loc, &block2, var, se.expr); + gfc_add_modify_loc (loc, &block2, var, + fold_convert_loc (loc, boolean_type_node, + se.expr)); gfc_add_block_to_block (&block2, &se.post); t = gfc_finish_block (&block2); t = build4 (TARGET_EXPR, boolean_type_node, var, t, NULL, NULL);