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 [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 24C493857824 for ; Mon, 22 Feb 2021 12:10:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 24C493857824 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-214-Nj-BSIBrMCmKHw2KRxUhwg-1; Mon, 22 Feb 2021 07:10:17 -0500 X-MC-Unique: Nj-BSIBrMCmKHw2KRxUhwg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A85C4801965; Mon, 22 Feb 2021 12:10:16 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-197.ams2.redhat.com [10.36.112.197]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3DCD25D9CC; Mon, 22 Feb 2021 12:10:15 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 11MCADF81341350 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 22 Feb 2021 13:10:13 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 11MCACDX1341349; Mon, 22 Feb 2021 13:10:12 +0100 Date: Mon, 22 Feb 2021 13:10:12 +0100 From: Jakub Jelinek To: Tobias Burnus Cc: gcc-patches , fortran Subject: Re: [Patch] Fortran/OpenMP: Fix optional dummy procedures [PR99171] Message-ID: <20210222121012.GL4020736@tucnak> Reply-To: Jakub Jelinek References: <1c1cee8a-e27b-05ec-be49-73cee8326af7@mentor.com> MIME-Version: 1.0 In-Reply-To: <1c1cee8a-e27b-05ec-be49-73cee8326af7@mentor.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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=-6.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 12:10:27 -0000 On Mon, Feb 22, 2021 at 01:06:56PM +0100, Tobias Burnus wrote: > Normal dummy arguments get some additional redirection if they are > OPTIONAL; however, that's not the case for dummy procedures. > > That was shown by a simple 'procedure(), optional :: proc' example > in the PR. – The fix is as simple. > > However, I thought it still makes sense to test all combinations of > procedure pointer (incl. c_funptr) with optional and pointer... > > OK for mainline and GCC 10 (it is a 10/11 regression)? Ok, thanks. > gcc/fortran/ChangeLog: > > PR fortran/99171 > * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional > dummy procs as nonoptional as no special treatment is needed. > > libgomp/ChangeLog: > > PR fortran/99171 > * testsuite/libgomp.fortran/dummy-procs-1.f90: New test. > > gcc/fortran/trans-openmp.c | 5 +- > .../testsuite/libgomp.fortran/dummy-procs-1.f90 | 393 +++++++++++++++++++++ > 2 files changed, 397 insertions(+), 1 deletion(-) Jakub