You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codeGenIntermediate/src/prog8/codegen/intermediate/IRCodeGen.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ class IRCodeGen(
75
75
initsToRemove += block to initialization
76
76
}
77
77
isPtNumber-> {
78
-
require(initValue.number!=0.0) {"variable should not be initialized with 0, it will already be zeroed as part of BSS clear, initializer=$initialization" }
78
+
require(initValue.number!=0.0|| variable.zpwish!=ZeropageWish.NOT_IN_ZEROPAGE) {"non-zp variable should not be initialized with 0, it will already be zeroed as part of BSS clear, initializer=$initialization" }
Copy file name to clipboardExpand all lines: simpleAst/src/prog8/code/SymbolTable.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -200,7 +200,7 @@ class StStaticVariable(name: String,
200
200
// Certain codegens might want to put them back into the variable directly.
201
201
// For strings and arrays this doesn't occur - these are always already specced at creation time.
202
202
203
-
require(number!=0.0) { "variable should not be initialized with 0, it will already be zeroed as part of BSS clear" }
203
+
require(number!=0.0|| zpwish!=ZeropageWish.NOT_IN_ZEROPAGE) { "non-zp variable should not be initialized with 0, it will already be zeroed as part of BSS clear" }
0 commit comments