Stateful member variable initialized with temporary reference
Stack-local variables do not yet exist at the time of initialization. Additionally, pointing to a temporary variable will lead to a dangling pointer as soon as it goes out of scope - potential use after free.
Erroneous code example:
FUNCTION_BLOCK foo
VAR
a : REF_TO BOOL := REF(b);
END_VAR
VAR_TEMP
b : BOOL;
END_VAR
END_FUNCTION_BLOCK