From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130742 invoked by alias); 14 Jul 2015 21:20:39 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 128351 invoked by uid 89); 14 Jul 2015 21:20:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mailout2.w1.samsung.com Received: from mailout2.w1.samsung.com (HELO mailout2.w1.samsung.com) (210.118.77.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 14 Jul 2015 21:20:36 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NRH00BWNXY5I620@mailout2.w1.samsung.com>; Tue, 14 Jul 2015 22:20:29 +0100 (BST) Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 1F.CA.05269.D1D75A55; Tue, 14 Jul 2015 22:20:29 +0100 (BST) Received: from [106.109.9.156] by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NRH00H4VXY4L920@eusync3.samsung.com>; Tue, 14 Jul 2015 22:20:29 +0100 (BST) Message-id: <55A57D1C.60304@samsung.com> Date: Tue, 14 Jul 2015 21:20:00 -0000 From: Ilmir Usmanov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-version: 1.0 To: Ilmir Usmanov , "cesar@codesourcery.com" Cc: "gcc-patches@gcc.gnu.org" , "fortran@gcc.gnu.org" Subject: Re: [gomp4, fortran] Patch to fix continuation checks of OpenACC and OpenMP directives References: <3008431435623821@web14j.yandex.ru> <5591E54E.90509@ilmir.us> <650751436268444@web22m.yandex.ru> In-reply-to: <650751436268444@web22m.yandex.ru> Content-type: text/plain; charset=koi8-r; format=flowed Content-transfer-encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00085.txt.bz2 Ping On 07.07.2015 14:27, Ilmir Usmanov wrote: > Ping > > 30.06.2015, 03:43, "Ilmir Usmanov" : >> Hi Cesar! >> >> Thanks for your review! >> >> 08.06.2015, 17:59, "Cesar Philippidis" : >>> On 06/07/2015 02:05 PM, Ilmir Usmanov wrote: >>>> Fixed fortran mail-list address. Sorry for inconvenience. >>>> >>>> 08.06.2015, 00:01, "Ilmir Usmanov" : >>>>>> Hi Cesar! >>>>>> >>>>>> This patch fixes checks of OpenMP and OpenACC continuations in >>>>>> case if someone mixes them (i.e. continues OpenMP directive with >>>>>> !$ACC sentinel or vice versa). >>>>>> >>>>>> OK for gomp branch? >>> Thanks for working on this. Does this fix PR63858 by any chance? >> No problem. I had a feeling that something is wrong in the scanner since >> I've committed an initial support of OpenACC ver. 1.0 to gomp branch >> (more than a year ago). >> Now it does fix the PR, because I've added support of fixed form to the >> patch. BTW, your test in the PR has a wrong continuation. Fixed test >> added to the patch. >> >>> two minor nits... >>> >>>> 0001-Fix-mix-of-OpenACC-and-OpenMP-sentinels-in-continuat.patch >>>> >>>> From 5492bf5bc991b6924f5e3b35c11eeaed745df073 Mon Sep 17 00:00:00 2001 >>>> From: Ilmir Usmanov >>>> Date: Sun, 7 Jun 2015 23:55:22 +0300 >>>> Subject: [PATCH] Fix mix of OpenACC and OpenMP sentinels in continuation >>>> >>>> --- >>>> gcc/fortran/ChangeLog | 5 +++++ >>> Use ChangeLog.gomp for gomp-4_0-branch. >> Done. >> >>>> + /* In case we have an OpenMP directive continued by OpenACC >>>> + sentinel, or vice versa, we get both openmp_flag and >>>> + openacc_flag on. */ >>>> + >>>> + if (openacc_flag && openmp_flag) >>>> + { >>>> + int is_openmp = 0; >>>> + for (i = 0; i < 5; i++, c = next_char ()) >>>> + { >>>> + if (gfc_wide_tolower (c) != (unsigned char) "!$acc"[i]) >>>> + is_openmp = 1; >>>> + if (i == 4) >>>> + old_loc = gfc_current_locus; >>>> + } >>>> + gfc_error ("Wrong %s continuation at %C: expected %s, got %s", >>>> + is_openmp ? "OpenACC" : "OpenMP", >>>> + is_openmp ? "!$ACC" : "!$OMP", >>>> + is_openmp ? "!$OMP" : "!$ACC"); >>> I think it's better for the translation project if you made this a >>> complete string. So maybe change this line into >>> >>> gfc_error (is_openmp ? "Wrong continuation at %C: expected !$ACC, got" >>> " !$OMP", >>> : "Wrong continuation at %C: expected !$OMP, got !$ACC"); >> Done >> >>> Other than that, it looks fine. >>> >>> Thanks, >>> Cesar >> OK for gomp branch? >> >> -- >> Ilmir. > -- > Ilmir. > -- Ilmir.