mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-21 23:33:13 +01:00
Fix RawVarDecl double codegen bug. Thanks to downs for the testcase.
This commit is contained in:
@@ -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(); } }
|
||||
Reference in New Issue
Block a user