From patchwork Fri Aug 14 11:19:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: FX Coudert X-Patchwork-Id: 507353 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 569EC1401B5 for ; Fri, 14 Aug 2015 21:19:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=nMe4Po/G; 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 :content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= default; b=j/oZLAh1bQY37Ukhr+GrrQT0014VFMY+r+Wc8U5Y9/kgy5O4fF5zz Jeynk06db699ugLVSa36Ii8knYt7/0Urs2tqmoaFhJ6bTHNMg3/yI110EJTGUkui jZYivYa8ZqdsXp0fwfw4ayZs+dnQ5+Pfn2kyCsTtXsUc2Z393eFItg= 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 :content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=default; bh=QQXT5SxKFaDXnrmzYXzBEvgxGTk=; b=nMe4Po/GC4x5WPjn1fOxtQuwFcZn 4/502mPbogGLjRm2+V8lWnDVKaJz4MknxW6jIQtnrlRONyzVGv11gEs+LzUMfkva yqnw0Cmv74+PLSJICQc+vOD7lFhw3gbWQj94bssL9DuZwK1kCg4h7z7933M3bqmx 99lCxWjTRXWExZU= Received: (qmail 3766 invoked by alias); 14 Aug 2015 11:19:39 -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 3743 invoked by uid 89); 14 Aug 2015 11:19:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS, UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wi0-f181.google.com Received: from mail-wi0-f181.google.com (HELO mail-wi0-f181.google.com) (209.85.212.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 14 Aug 2015 11:19:38 +0000 Received: by wijp15 with SMTP id p15so16031171wij.0; Fri, 14 Aug 2015 04:19:35 -0700 (PDT) X-Received: by 10.180.23.66 with SMTP id k2mr5594358wif.85.1439551175555; Fri, 14 Aug 2015 04:19:35 -0700 (PDT) Received: from [10.192.4.91] (pv6931-0490936689.pck.nerim.net. [213.41.155.51]) by smtp.gmail.com with ESMTPSA id gt10sm2576676wib.20.2015.08.14.04.19.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Aug 2015 04:19:34 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: Add checkpoint to libgomp dg-shouldfail tests (was: [PR testsuite/65205] Fix dg-shouldfail usage in OpenACC libgomp tests) From: FX In-Reply-To: <87h9o2i1fj.fsf@kepler.schwinge.homeip.net> Date: Fri, 14 Aug 2015 13:19:30 +0200 Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek , fortran@gcc.gnu.org, James Norris Message-Id: <874191C2-249E-487C-B384-35DF0E19DDF4@gmail.com> References: <54FF0C91.8020307@mentor.com> <871tj1rdfc.fsf@schwinge.name> <87h9o2i1fj.fsf@kepler.schwinge.homeip.net> To: Thomas Schwinge > (Can a Fortran person please comment on this: as it's nontrivial to write > to stderr, let's just write to stdout followed by a flush, which does > have the same ordering effect -- OK?) Although there are no absolute guarantees on flushing, it should work in practice. Note that the FLUSH subroutine (as in “call flush”) is nonstandard. The standard way to achieve this is the FLUSH statement: use iso_fortran_env, only : output_unit flush output_unit where the first line (“use …”) goes at the very top of the routine/program, above “implicit none”. So the patch for, e.g., libgomp.oacc-fortran/data-already-7.f would be: I hope this helps, FX Index: libgomp/testsuite/libgomp.oacc-fortran/data-already-7.f =================================================================== --- libgomp/testsuite/libgomp.oacc-fortran/data-already-7.f (revision 226823) +++ libgomp/testsuite/libgomp.oacc-fortran/data-already-7.f (working copy) @@ -1,5 +1,6 @@ ! { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } + USE ISO_FORTRAN_ENV, ONLY: OUTPUT_UNIT IMPLICIT NONE INCLUDE "openacc_lib.h" @@ -7,6 +8,8 @@ !$ACC ENTER DATA CREATE (I) CALL ACC_CREATE (I) + PRINT *, "CheCKpOInT" + FLUSH OUTPUT_UNIT END