Tricky DMD bug, but I have no idea how to report
JN
666total at wp.pl
Fri Feb 8 21:23:40 UTC 2019
On Friday, 8 February 2019 at 09:30:12 UTC, Vladimir Panteleev
wrote:
> On Friday, 8 February 2019 at 09:28:48 UTC, JN wrote:
>> I will try. However, one last thing - in the example test
>> scripts, it runs first with one compiler setting (or D
>> version) and the second time with the other compiler setting
>> (or D version). But it looks like the exit code of the first
>> run is ignored anyway, so why run it?
>
> With "set -e", the shell interpreter will exit the script with
> any command that fails (returns with non-zero status), unless
> it's in an "if" condition or such. I'll update the article to
> clarify it.
I see. Dustmite helped. I had to convert it to windows batch, so
my testscript ended up to be:
dmd -O -inline -release -boundscheck=on -i app.d -m64
@IF %ERRORLEVEL% EQU 0 (ECHO No error found) ELSE (EXIT /B 1)
@app | FINDSTR /C:"Object"
@IF %ERRORLEVEL% EQU 0 (ECHO No error found) ELSE (EXIT /B 1)
dmd -O -inline -release -boundscheck=off -i app.d -m64
@IF %ERRORLEVEL% EQU 0 (ECHO No error found) ELSE (EXIT /B 1)
@app | FINDSTR /C:"null"
@IF %ERRORLEVEL% EQU 0 (EXIT /B 0) ELSE (EXIT /B 1)
I managed to greatly reduce the source code. I have filed a bug
with the reduced testcase
https://issues.dlang.org/show_bug.cgi?id=19662 .
More information about the Digitalmars-d-learn
mailing list