This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] (F2015) Permit ERROR STOP in PURE procedures
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 31 Dec 2014 17:45:28 +0100
- Subject: Re: [Patch, Fortran] (F2015) Permit ERROR STOP in PURE procedures
- Authentication-results: sourceware.org; auth=none
- References: <54A40B80 dot 4090402 at net-b dot de>
Hi Tobias,
> It often happens that one wants to debug PURE procedures but as I/O is not
> permitted, this can be difficult. F2008's IMPURE ELEMENTAL helps a bit not
> completely.
>
> Fortran 2015 adds another aid â not I/O which is intrinsically impure â but
> at least ERROR STOP is now permitted.
>
> Attached is this belate Christmas present for Damian and the second F2015
> for GCC 5. (The first was "IMPLICIT NONE (external)".)
>
> Build and regtested on x86-64-gnu-linux.
> OK for the trunk?
looks (almost) ok to me. Just one thing about your test cases:
Shouldn't the dg-error go into error_stop_4.f90 (where you have
-std=f2008ts) instead of error_stop_3.f90 (with -std=gnu)? And then:
-/* Match a number or character constant after an (ALL) STOP or PAUSE
statement. */
+/* Match a number or character constant after an (ERROR) STOP or PAUSE
+ statement. */
I don't actually understand what the "(ALL)" was supposed to mean
here. There is nothing like an ALL STOP statement, right? Or was it
just supposed to refer to *all kinds* of STOP statements? In any case
it's good that it is corrected.
Btw: It's probably not worth to introduce an option like -std=f2015
yet, but since there is an early draft document already, maybe it
would make sense to start a wiki page to document which of those F15
draft features are implemented already?
Thanks for the patch,
Janus