From patchwork Thu Apr 27 22:04:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 756166 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wDWGw3qXWz9s9Z for ; Fri, 28 Apr 2017 08:05:44 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="XgYqOl9R"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=bPCLO9To2BGdw/KUI JbRq2wCb6C0ukTOayKYnMwQxTQD7iEtLH1oMbd0nXbWn8uskOXqPfoNnwLbRHEcH DG13bRJfbGX6uPAPnDSijtEvBUQiK3cVWN7f7kIOPEKzhUsEuFE4Jv4hrYNVJ9lW Km6eZF1K4Lw43gtteV+KZeOUxs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=iA1GiuAGIp+J/Vyr+Ffaa9R 65Jk=; b=XgYqOl9RFN30G2rsl+tPxSjZjf3H7UxaMyu6y3/FH/LqsOr4vdCDNQp 5byaCgZZwUbyWkDJJNXcW79qYwYLbwCOu0Zf10iDFL5HFjuPdDEDx76CggYrBEFS H3QWXOgNMV1rqXmgfAry7RAa6PfqwKa70qvdcMW8bec7awm7aRwU= Received: (qmail 78311 invoked by alias); 27 Apr 2017 22:05:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 78290 invoked by uid 89); 27 Apr 2017 22:05:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=Person, 920, 9, 25 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Apr 2017 22:05:08 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1d3rX8-0005KH-I5 from Tom_deVries@mentor.com ; Thu, 27 Apr 2017 15:05:08 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 27 Apr 2017 23:04:59 +0100 Subject: Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite To: Jakub Jelinek References: <336349f0-b973-77c0-c5f5-710240312270@mentor.com> <587C88D3-2CEA-4E54-899E-ADFE8FBB6DC4@comcast.net> <20170426115738.GP1809@tucnak> CC: Mike Stump , Rainer Orth , Richard Biener , GCC Patches From: Tom de Vries Message-ID: <57fe5b00-f121-1b0c-5515-5267b4b08002@mentor.com> Date: Fri, 28 Apr 2017 00:04:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170426115738.GP1809@tucnak> X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) On 04/26/2017 01:57 PM, Jakub Jelinek wrote: > I guess those should be decided case by case > whether we want relative, absolute or saved line numbers. If the > diagnostic is within the same function or code block as the stuff it is > relative to, relative is fine, but if e.g. the messages are just at the end > of file and there are unrelated functions in between, it is not a good idea I've written attached patches: - replace absolute linenrs in objc.dg,obj-c++.dg - replace absolute linenrs in gfortran.dg and tested them on x86_64 with -m64/-m32. OK for trunk? Thanks, - Tom Replace absolute linenrs in gfortran.dg 2017-04-25 Tom de Vries * gfortran.dg/gomp/appendix-a/a.24.1.f90: Replace absolute linenrs. * gfortran.dg/gomp/appendix-a/a.31.3.f90: Same. --- .../gfortran.dg/gomp/appendix-a/a.24.1.f90 | 6 ++--- .../gfortran.dg/gomp/appendix-a/a.31.3.f90 | 26 ++++++++++------------ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 index 802577b..52a2cbb 100644 --- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 @@ -11,7 +11,7 @@ !$OMP THREADPRIVATE(/BLOCKX/) INTEGER I, J i=1 -!$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J) +!$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J) ! { dg-line omp_parallel } J = OMP_GET_NUM_THREADS(); ! O.K. - J is listed in PRIVATE clause A = Z(J) ! O.K. - A is listed in PRIVATE clause @@ -19,8 +19,8 @@ X=1 ! O.K. - X is THREADPRIVATE Z(I) = Y ! Error - cannot reference I or Y here ! { dg-error "'i' not specified" "" { target *-*-* } .-1 } */ -! { dg-error "enclosing 'parallel'" "" { target *-*-* } 14 } */ -! { dg-error "'y' not specified" "" { target *-*-* } 20 } */ +! { dg-error "enclosing 'parallel'" "" { target *-*-* } omp_parallel } */ +! { dg-error "'y' not specified" "" { target *-*-* } .-3 } */ !$OMP DO firstprivate(y) DO I = 1,10 Z(I) = Y ! O.K. - I is the loop iteration variable diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 index 598c904..7de656a 100644 --- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 @@ -1,15 +1,13 @@ ! { dg-do compile } - PROGRAM A31_3_WRONG - MAX = HUGE(0) - M=0 - !$OMP PARALLEL DO REDUCTION(MAX: M) ! MAX is no longer the - ! intrinsic so this - ! is non-conforming -! { dg-error "OMP DECLARE REDUCTION max not found" "" { target *-*-* } 5 } */ - DO I = 1, 100 - CALL SUB(M,I) - END DO - END PROGRAM A31_3_WRONG - SUBROUTINE SUB(M,I) - M = MAX(M,I) - END SUBROUTINE SUB +PROGRAM A31_3_WRONG + MAX = HUGE(0) + M=0 + !$OMP PARALLEL DO REDUCTION(MAX: M) ! MAX is no longer the intrinsic so this is non-conforming + ! { dg-error "OMP DECLARE REDUCTION max not found" "" { target *-*-* } .-1 } */ + DO I = 1, 100 + CALL SUB(M,I) + END DO +END PROGRAM A31_3_WRONG +SUBROUTINE SUB(M,I) + M = MAX(M,I) +END SUBROUTINE SUB