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.129.124]) by sourceware.org (Postfix) with ESMTPS id D8AF13858C53 for ; Tue, 5 Apr 2022 10:31:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D8AF13858C53 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-225-AOG44n9qMHq79NVbfEB_GQ-1; Tue, 05 Apr 2022 06:31:31 -0400 X-MC-Unique: AOG44n9qMHq79NVbfEB_GQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1AB89101A52C; Tue, 5 Apr 2022 10:31:31 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.172]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC8B240D1B9B; Tue, 5 Apr 2022 10:31:30 +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 235AVRAS3915547 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 5 Apr 2022 12:31:28 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 235AVRwW3915546; Tue, 5 Apr 2022 12:31:27 +0200 Resent-From: Jakub Jelinek Resent-Date: Tue, 5 Apr 2022 12:31:27 +0200 Resent-Message-ID: Resent-To: Sandra Loosemore , "fortran@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" Date: Sat, 26 Mar 2022 08:03:18 +0100 From: Jakub Jelinek To: Sandra Loosemore Cc: "fortran@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Fortran: Fix clause splitting for OMP masked taskloop directive Message-ID: Reply-To: Jakub Jelinek References: <5061c0a0-563d-b18e-dc5e-36142ae185ec@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <5061c0a0-563d-b18e-dc5e-36142ae185ec@codesourcery.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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.7 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_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 05 Apr 2022 10:31:34 -0000 On Fri, Mar 25, 2022 at 08:02:04PM -0600, Sandra Loosemore wrote: > I ran into this bug in the handling of clauses on the combined "masked > taskloop" OMP directive when I was working on something else. The fix > turned out to be a 1-liner. OK for trunk? > > -Sandra > commit 17c4fa0bd97c070945004095a06fb7d9e91869e3 > Author: Sandra Loosemore > Date: Wed Mar 23 18:45:25 2022 -0700 > > Fortran: Fix clause splitting for OMP masked taskloop directive > > This patch fixes an obvious coding goof that caused all clauses for > the combined OMP masked taskloop directive to be discarded. > > gcc/fortran/ > * trans-openmp.cc (gfc_split_omp_clauses): Fix mask for > EXEC_OMP_MASKED_TASKLOOP. > > gcc/testsuite/ > * gfortran.dg/gomp/masked-taskloop.f90: New. Ok, thanks. > +! { dg-final { scan-tree-dump "omp taskloop collapse\\(2\\) grainsize\\(4\\)" "original" } } Though perhaps the test should be more flexible and allow both orderings of the clauses and extra clauses too? So: ! { dg-final { scan-tree-dump "omp taskloop \[^\n\r]*grainsize\\(4\\)" "original" } } ! { dg-final { scan-tree-dump "omp taskloop \[^\n\r]*collapse\\(2\\)" "original" } } ? Jakub