Skip to content

Commit 5d08b88

Browse files
committed
ASM backend: Fix emitting of global ref initializers
1 parent d015078 commit 5d08b88

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/compiler/ir-tac.bas

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,11 +725,17 @@ private sub _emitVarIniEnd( byval sym as FBSYMBOL ptr )
725725
end sub
726726

727727
private sub _emitVarIniI( byval sym as FBSYMBOL ptr, byval value as longint )
728-
emitVARINIi( symbGetType( sym ), value )
728+
dim realtype as integer
729+
dim realsubtype as FBSYMBOL ptr
730+
symbGetRealType( sym, realtype, realsubtype )
731+
emitVARINIi( realtype, value )
729732
end sub
730733

731734
private sub _emitVarIniF( byval sym as FBSYMBOL ptr, byval value as double )
732-
emitVARINIf( symbGetType( sym ), value )
735+
dim realtype as integer
736+
dim realsubtype as FBSYMBOL ptr
737+
symbGetRealType( sym, realtype, realsubtype )
738+
emitVARINIf( realtype, value )
733739
end sub
734740

735741
private sub _emitVarIniOfs _

0 commit comments

Comments
 (0)