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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6BC263858D35 for ; Wed, 15 Feb 2023 10:07:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BC263858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676455678; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=lM2voMhbmUc6j0SIGDHphXxtwoVTN2lvE4MtkxWZHow=; b=bc3OdplutRhuDYfUujgtXngsDhWvUk6BOa5kg4uPwFDzySQd/MbhFstZ4c+CobjySQ/+Yx +x/4X/ntHd0BTwBVq4eg/lB2+60UiAvgK2va6/0bZSuvs+4rv6mfPvbPt/9wmddRFiYZLt PBzS42NNUtHAyo4P8YtlRdJtYFehhI4= 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-272-zvKvEYCqNcCb7jkXd98uFg-1; Wed, 15 Feb 2023 05:07:56 -0500 X-MC-Unique: zvKvEYCqNcCb7jkXd98uFg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6978B8027FD; Wed, 15 Feb 2023 10:07:56 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.203]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCACB2026D4B; Wed, 15 Feb 2023 10:07:55 +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 31FA7qfX755712 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 15 Feb 2023 11:07:53 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 31FA7pTE755711; Wed, 15 Feb 2023 11:07:51 +0100 Date: Wed, 15 Feb 2023 11:07:51 +0100 From: Jakub Jelinek To: Tobias Burnus Cc: gcc-patches , fortran Subject: Re: [Patch][v2] OpenMP/Fortran: Fix loop-iter var privatization with !$OMP LOOP [PR108512] Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.5 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 List-Id: On Fri, Feb 10, 2023 at 12:52:47PM +0100, Tobias Burnus wrote: > > I'm afraid this is needed but insufficient. > > I think > > case EXEC_OMP_MASKED_TASKLOOP: > > case EXEC_OMP_MASKED_TASKLOOP_SIMD: > > case EXEC_OMP_MASTER_TASKLOOP: > > case EXEC_OMP_MASTER_TASKLOOP_SIMD: > > case EXEC_OMP_PARALLEL_LOOP: > > case EXEC_OMP_TARGET_PARALLEL_LOOP: > > case EXEC_OMP_TARGET_TEAMS_LOOP: > > case EXEC_OMP_TARGET_SIMD: > > case EXEC_OMP_TEAMS_LOOP: > > should be in the list above (of course alphabetically sorted in between the > > others) > > gfc_resolve_omp_parallel_blocks (code, ns); > > I think 'TARGET_SIMD' shouldn't be resolved though parallel blocks but You're right, we use gfc_resolve_omp_parallel_blocks for parallel, teams, task but not for target alone. > can call directly call gfc_resolve_omp_do_blocks (as > currently/previously implemented). The masked version were already > handled inside gfc_resolve_omp_parallel_blocks but missing in > gfc_resolve_code, while the 'loop' ones had to be added to both. > > (I did not extend the testcase, but I updated two to add additional > dg-error to the same line.) > gcc/fortran/ChangeLog: > > PR fortran/108512 > * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop' > directives. > (gfc_resolve_do_iterator): Set a source location for added > 'private'-clause arguments. > * resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks > also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for > combined directives with loop + '{masked,master} taskloop (simd)'. > > gcc/testsuite/ChangeLog: > > PR fortran/108512 > * gfortran.dg/gomp/loop-5.f90: New test. > * gfortran.dg/gomp/loop-2.f90: Update dg-error. > * gfortran.dg/gomp/taskloop-2.f90: Update dg-error. LGTM, thanks. Jakub