mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
Merged DMD commit 0fbeb2af9206600453af6e6a14bafc639b35b95c:
bugzilla 5159 Segfault(interpret.c): calling a static function pointer variable in CTFE
This commit is contained in:
@@ -2711,11 +2711,15 @@ Expression *CallExp::interpret(InterState *istate)
|
||||
VarDeclaration *vd = ((VarExp *)((PtrExp*)ecall)->e1)->var->isVarDeclaration();
|
||||
if (vd && vd->value && vd->value->op == TOKsymoff)
|
||||
fd = ((SymOffExp *)vd->value)->var->isFuncDeclaration();
|
||||
else {
|
||||
ecall = vd->value->interpret(istate);
|
||||
else
|
||||
{
|
||||
ecall = getVarExp(loc, istate, vd);
|
||||
if (ecall == EXP_CANT_INTERPRET)
|
||||
return ecall;
|
||||
|
||||
if (ecall->op == TOKsymoff)
|
||||
fd = ((SymOffExp *)ecall)->var->isFuncDeclaration();
|
||||
}
|
||||
fd = ((SymOffExp *)ecall)->var->isFuncDeclaration();
|
||||
}
|
||||
}
|
||||
else
|
||||
ecall = ((PtrExp*)ecall)->e1->interpret(istate);
|
||||
|
||||
Reference in New Issue
Block a user