LDC 1.12.0 compiler crash on Windows x64
Radu
void at null.pt
Mon Oct 22 02:47:12 UTC 2018
[Tried to report it with github issue but it doesn't work, can't
see the bug after I submitted]
On a Windows x64 machine compiling with `LDC 1.12.0` or `LDC
1.11.0`, there is a compiler crash for the described files bellow.
LDC info
```
LDC - the LLVM D compiler (1.12.0):
based on DMD v2.082.1 and LLVM 7.0.0
built with LDC - the LLVM D compiler (1.12.0)
Default target: x86_64-pc-windows-msvc
Host CPU: broadwell
http://dlang.org - http://wiki.dlang.org/LDC
```
Command `ldc2 -release -lib -O3 a.d b.d c.d`
Files
a.b
```d
module a;
import c;
```
b.d
```d
module b;
import std.concurrency;
import std.experimental.logger;
class C {}
class Bug {
static m()
{
C c;
void empty() {}
try
for(;;)
receive({
if(c)
empty();
});
catch (Exception e)
error(e);
}
}
```
c.d
```d
module c;
import std.concurrency;
```
This is a dustmite sample, I could't get it to a more reduce
version.
The workaround is to move the try/catch inside the loop. There is
no crash on the Linux version.
More information about the digitalmars-d-ldc
mailing list