[Bug libfortran/82233] [6/7/8 Regression] execute_command_line causes program to stop when command fails (or does not exist)

urbanjost at comcast dot net gcc-bugzilla@gcc.gnu.org
Mon Sep 18 00:40:00 GMT 2017


--- Comment #3 from urbanjost at comcast dot net ---
Created attachment 42193
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42193&action=edit
specifically even if cmdstat option present, must have cmdmsg or get failure,
and man(1) page needs changed

After looking over the F2008 standard and the recent gfortran changes indicated
in the previous comment it looks like part of the changes between 5.0.4 and 6+
actually made EXECUTE_COMMAND_LINE(3f) more standard-conforming; so (although I
prefer the 5.0.4 version's behavior) I'd like to change the problem description
to two parts:

The man page for gfortran should mention that if CMDSTAT is not present and the
command cannot be executed that the program should terminate. It currently does
and that is a significant change from 5.0.4 (and is apparently what it should
do to be f2008 standard conforming).

Then, as the second attachment shows, supplying CMDSTAT should be sufficient,
but even when CMDSTAT is present if CMDMSG is not the program fails.

And I think a simple termination equivalent to "STOP 'message'" is probably the
expected behavior, where I am getting what looks to be an abort with

Terminating the program is so unlike the de-factor standard SYSTEM(3f) or the C
routine system(3c) the 5.0.4- version behavior was far more intuitive, but the
f2008 standard does say command execution failure without the CMDSTAT option
being present terminates the program; although it is very arguable as to
exactly what that means on different systems (requiring unavailable resources,
file permissions, not being present, getting a "system error" when executing,

More information about the Gcc-bugs mailing list