This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] (F2015) Permit ERROR STOP in PURE procedures


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]