alloca cause DMD compiler error (Internal error: eh.c 54)
Maxime Chevalier-Boisvert
maximechevalierb at gmail.com
Mon Jul 8 10:37:07 PDT 2013
I'm getting a strange compiler error when using alloca in my
code. What's doubly strange is that I have 2 functions in the
same file needing to call alloca for the same purpose. It seems
to work fine in one of the functions, but uncommenting alloca in
the other causes this cryptic error message to appear:
Internal error: eh.c 54
I believe it might be because the problematic function also
creates structs on the stack. The following minimal example
replicates the compiler error:
struct TheStruct
{
~this()
{
}
}
void bar()
{
}
void foo(IRInstr instr)
{
auto s = TheStruct();
bar();
auto a = alloca(16);
}
More information about the Digitalmars-d
mailing list