www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC 1.12.0 compiler crash on Windows x64

reply Radu <void null.pt> writes:
[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.
Oct 21 2018
next sibling parent Radu <void null.pt> writes:
On Monday, 22 October 2018 at 02:47:12 UTC, Radu wrote:
 [Tried to report it with github issue but it doesn't work, 
 can't see the bug after I submitted]

 [...]
Got the bug submitted, finally. (I closed a bunch of duplicates)
Oct 22 2018
prev sibling parent "David Nadlinger" <code klickverbot.at> writes:
On 22 Oct 2018, at 3:47, Radu via digitalmars-d-ldc wrote:
 [Tried to report it with github issue but it doesn't work, can't see 
 the bug after I submitted]
GitHub has been having issues with their backend (https://status.github.com), could you try submitting it again now that things are supposedly back to normal? Thanks! —David
Oct 22 2018