[Issue 6401] infinite loop with -inline in gflow.c:accumaecpx
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 10 22:49:55 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=6401
--- Comment #6 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Somewhat reduced test:
---
enum LIBRARY
{
GTK
}
struct Linker
{
static void link(T)(ref T funct, string symbol, LIBRARY[] libraries ...)
{
}
}
static this()
{
static foreach(i; 0 .. 10_000)
Linker.link(somefunc, "somefunc", LIBRARY.GTK);
}
void function() c_somefunc;
alias c_somefunc somefunc;
---
To prove that this isn't too much of a contrived test, I checked the compile
times of other compilers.
dmd -O -release -inline | 3 minutes 12 seconds.
gdc -O2 -frelease | 6 seconds.
ldc -O2 -release | 8 seconds.
Actually, the dmd compiler segfaults, I assume because I managed to hit a stack
overflow.
--
More information about the Digitalmars-d-bugs
mailing list