From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66481 invoked by alias); 1 Sep 2017 12:08:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 66422 invoked by uid 89); 1 Sep 2017 12:08:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=mailer X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Sep 2017 12:08:48 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 98B96C9D25; Fri, 1 Sep 2017 12:08:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 98B96C9D25 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jakub@redhat.com Received: from tucnak.zalov.cz (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B4ED96FC0; Fri, 1 Sep 2017 12:08:46 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v81C8hC5007516; Fri, 1 Sep 2017 14:08:43 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v81C8g74007515; Fri, 1 Sep 2017 14:08:42 +0200 Date: Fri, 01 Sep 2017 12:08:00 -0000 From: Jakub Jelinek To: dbroemmel Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: Patch for [Bug fortran/81841] [5/6/7/8 Regression] THREADPRIVATE (OpenMP) wrongly rejected in BLOCK DATA Message-ID: <20170901120842.GJ2323@tucnak> Reply-To: Jakub Jelinek References: <2f2d738f-90d7-0efe-1caf-7e3a6387b0eb@daswigwam.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2f2d738f-90d7-0efe-1caf-7e3a6387b0eb@daswigwam.de> User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00036.txt.bz2 On Fri, Sep 01, 2017 at 11:09:47AM +0200, dbroemmel wrote: > Hi all, > > attached are a proposed fix and new testcase for PR81841. The > THREADPRIVATE statement is currently wrongly rejected as part of BLOCK DATA. > > The testcase also does (very basic) runtime checks. It fails (compiling) > prior to the patch and completes after. Tested on x86_64 GNU/Linux. > > Thanks, > Dirk > > > 2017-09-01 dbroemmel The ChangeLog format is date two spaces real name two spaces > > PR fortran/81841 > * parse.c (parse_spec): adding ST_OMP_THREADPRIVATE as allowed Add instead of adding Also all the ChangeLog lines except empty and ones starting with date should be tab indented, not sure if it is your mailer that ate it or omission. > statement. > > 2017-09-01 dbroemmel > > PR fortran/81841 > * gfortran.dg/gomp/omp_threadprivate3.f90: New testcase. > Index: gcc/fortran/parse.c > =================================================================== > --- gcc/fortran/parse.c (revision 251553) > +++ gcc/fortran/parse.c (working copy) > @@ -3694,6 +3694,7 @@ > case ST_EQUIVALENCE: > case ST_IMPLICIT: > case ST_IMPLICIT_NONE: > + case ST_OMP_THREADPRIVATE: > case ST_PARAMETER: > case ST_STRUCTURE_DECL: > case ST_TYPE: This looks good. > Index: gcc/testsuite/gfortran.dg/gomp/omp_threadprivate3.f90 > =================================================================== > --- gcc/testsuite/gfortran.dg/gomp/omp_threadprivate3.f90 (revision 0) > +++ gcc/testsuite/gfortran.dg/gomp/omp_threadprivate3.f90 (working copy) > @@ -0,0 +1,158 @@ > +! { dg-do run } This is wrong. Runtime testcases for OpenMP belong into libgomp/testsuite/. That said, I fail to see why such a large testcase is needed, wouldn't a simple ! PR fortran/81841 ! { dg-do compile } block data implicit none integer :: int2 real :: flt2 common /c_block_2/ int2, flt2 !$OMP THREADPRIVATE(/c_block_2/) data int2, flt2 /2, 2.2/ end block data testcase in gfortran.dg/gomp/ be sufficient here? Jakub