In VARIABLES.CSV, RETAIN variable were only flagged as such for GLOBALS, now local POU variable shoud be as well.
--- a/stage4/generate_c/generate_var_list.cc Tue Feb 15 10:34:23 2022 +0100
+++ b/stage4/generate_c/generate_var_list.cc Fri Jul 22 09:24:12 2022 +0200
@@ -481,6 +481,7 @@
/* VAR RETAIN var_init_decl_list END_VAR */
void *visit(retentive_var_declarations_c *symbol) {
unsigned int was_retain = is_retain;
+ is_retain = 1;
symbol->var_init_decl_list->accept(*this);
is_retain = was_retain;
return NULL;