Comment #0 by olli.pottonen — 2013-02-18T09:10:07Z
In some cases using scope(exit) and alloca() in the same function leads to DMD internal error.
For example:
import core.stdc.stdlib;
void f(int) {}
void main() {
scope(exit) f(0);
void* bar = alloca(1);
f(0);
}
Trying to compile the code above fails with "Internal error: eh.c 60". I tried this on x86_64 with DMD v.2.061 on OS X and Linux with the same result.
Comment #1 by yebblies — 2013-11-22T22:00:14Z
Can anyone on non-windows reproduce? There have been a bunch of similar issues fixed since this was reported.
Comment #2 by hsteoh — 2014-09-11T18:56:54Z
On git HEAD (Linux/x86_64), I get this compile error:
------
Error: cannot mix core.std.stdlib.alloca() and exception handling in _Dmain()
------
Comment #3 by mxfomin — 2015-06-23T18:33:17Z
I suggest to close. It is not clear whether it was filed as ICE or as enhancement. If latter, a new issue can be opened.