mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
Fix RawVarDecl double codegen bug. Thanks to downs for the testcase.
This commit is contained in:
parent
ccd8810e68
commit
b172c4a668
2 changed files with 5 additions and 0 deletions
|
@ -1332,6 +1332,10 @@ LLValue* DtoRawVarDeclaration(VarDeclaration* var)
|
|||
|
||||
// we don't handle aliases either
|
||||
assert(!var->aliassym);
|
||||
|
||||
// if this already has storage, it must've been handled already
|
||||
if (var->ir.irLocal && var->ir.irLocal->value)
|
||||
return var->ir.irLocal->value;
|
||||
|
||||
// referenced by nested function?
|
||||
#if DMDV2
|
||||
|
|
1
tests/mini/compile_rawvardeclinfinally.d
Normal file
1
tests/mini/compile_rawvardeclinfinally.d
Normal file
|
@ -0,0 +1 @@
|
|||
void foo() { void delegate()[] bar; try {} finally { foreach (dg; bar) dg(); } }
|
Loading…
Add table
Add a link
Reference in a new issue