From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26063 invoked by alias); 14 Jul 2011 10:04:41 -0000 Received: (qmail 26048 invoked by uid 22791); 14 Jul 2011 10:04:41 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mx01.qsc.de (HELO mx01.qsc.de) (213.148.129.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jul 2011 10:04:21 +0000 Received: from [192.168.178.22] (port-92-204-19-234.dynamic.qsc.de [92.204.19.234]) by mx01.qsc.de (Postfix) with ESMTP id CD8ED3D01B; Thu, 14 Jul 2011 12:04:19 +0200 (CEST) Message-ID: <4E1EBF23.60307@net-b.de> Date: Thu, 14 Jul 2011 10:06:00 -0000 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Daniel Carrera CC: gfortran , gcc-patches@gcc.gnu.org Subject: Re: [Patch, Fortran] Add caf_runtime_error to libgfortran/caf/single.c References: <4E1EBB75.4070205@gmail.com> In-Reply-To: <4E1EBB75.4070205@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2011-07/txt/msg01124.txt.bz2 On 07/14/2011 11:48 AM, Daniel Carrera wrote: > This patch adds a caf_runtime_error function to the non-MPI > implementation of Coarray Fortran. It is based on the MPI function of > the same name in mpi.c. > > Ok to commit? I was wondering - based on the discussion - whether one should remove the "int error" argument from caf_runtime_error and simply use "exit (EXIT_FAILURE)" for all exit() calls in mpi.c/single.c, cf. http://gcc.gnu.org/ml/fortran/2011-07/msg00140.html But one can also do so as follow up patch. Thus, OK for the patch as is - or with replacing all exit(...) by "exit(EXIT_FAILURE)", which uses stdlib.h's EXIT_FAILURE. One then can also drop the "int error" argument to the caf_runtime_error function. Thanks for the patch! Tobias > ChangeLog: > > 2011-07-14 Daniel Carrera > > * caf/single.c: Include stdarg.h header. > (caf_runtime_error): New function based on the function in > mpi.c with the same name. > (_gfortran_caf_init): Use caf_runtime_error. > * caf/mpi.c (caf_runtime_error): Add a note to keep in sync > with the function in single.c.