Got compiler crash in Mangler::mangleFuncType
Uranuz via Digitalmars-d
digitalmars-d at puremagic.com
Sat Mar 25 01:13:08 PDT 2017
On Saturday, 25 March 2017 at 07:57:11 UTC, Stefan Koch wrote:
> On Saturday, 25 March 2017 at 06:56:40 UTC, Uranuz wrote:
>> After changes in my project tried to compile, but compiler
>> failed. Running dmd under GDB gives the following:
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00000000005807a0 in Mangler::mangleFuncType(TypeFunction*,
>> TypeFunction*, unsigned char, Type*) ()
>>
>> Could someone give me adivice how to investigate and maybe fix
>> this problem?
>
> Switch to git ~master and see if it still occurs.
> Also if you can share the source I am happy to debug this.
I just put debug messages on every `assert` and figured out it
fails on lines:
bool implicit0 = (f.next.ty == Tvoid &&
isMain());
Type tret = implicit0 ? Type.tint32 : f.next;
assert(tret.ty != Tvoid);
if (vresult || returnLabel)
buildResultVar(scout ? scout : sc2, tret);
I really don't understand what it is... Now I cannot share
codebase easily. Seems that it fails on my programme `main`
function or near that, because compiler stack not so deep. There
is some check for isMain AFAIK... What is this about?
More information about the Digitalmars-d
mailing list