<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66581>66581</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] ERROR STOP default code is wrong
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sscalpone
</td>
</tr>
</table>
<pre>
Looks like a problem lowering the default value of the exit code.
```
% flang-new estop.f90
% a.out
Fortran ERROR STOP
% echo $?
0
```
The exit code ought to be 1.
> If the stop-code in an ERROR STOP statement is of type character or does not appear, it is recommended that a processor-dependent nonzero value be supplied as the process exit status, if the processor supports that concept.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUtFunDAQ_BrzsjrEmYMeDzykuSBVqpQqzQ8YvIAb40XeJWn69RVwVS5SJWRkz65nZj2G2Q0BsVbFV1VcErPISLFm7oyfKWDSkn2vvxO9MHj3gmBgjtR6nMDTG0YXBpARwWJvFi_wavyCQP12iL-dQEcWU5VdVHZ3Xcvs-u1bXUDvTRgOAd8AWWhO--oGNCktsm8bihJNgIenp8cn-Pn8-OOjDLuRQOmTypv9MPs_3bY-36oDWoZRQAhahONnrfkDfNvNrMIOW7kL8EkDsBjBCYOA4837-4zQjSaaTjACRbCEDIEEzDyjiUrfg9uqI3Y0TRgsWpDRyD7fDpkpHizOKxIEAoU_GOk63haBl3n2Di0Y3tRdm3ZTq56FN5L-FqW49VEU3sk6Ch3Okia2zm2VVybB-lhWp_M5z_JzMtadKYu2OBa2OvVlqRFLPFptWo1VYbH9krhaZzrPqmN5LIssP6e2y8pTWbRVaXRb9FadMpyM86n3r1NKcUgc84J1WRbnY-JNi5638Gk9EFnoXeR1Mryg0lrpe6X1Fg-V3_WRgmCwK1Bcklivdx7aZWB1yrxj4Q8WceK3VO_NxeX2wf6ldX9OhrdIYUiW6OtRZGaV3yndKN0MTsalTTualG7Wq6-_wxzpF3aidLMpZaWbzdDfAAAA__-qvg-x">