Tool/software: TI C/C++ Compiler
An investigation into the use of __attribute__ ((persistent)) by GNU MSP430 compiler v5.3.0.224 has found the following anomalies, as detailed in the thread MSP430FR5969: GCC v5.3.0.219 using persistent attribute :
1) Attempting to use __attribute__ ((persistent)) on a variable with automatic storage is silently ignored without a warning. Ideally a warning should be reported in this case (as the TI compiler does).
2) Under some conditions using __attribute__ ((persistent)) on a variable with static storage, where the variable is initialized to zero, results in the variable being placed in the .bss section rather than the .persistent section. No warning is reported if the variable ends up being placed in the .bss section, with the result that the program doesn't operate a expected because the variable is not persistent.
If the TI compiler team agrees the GNU MSP430 compiler behavior is anomalous could they inform the GNU MSP430 maintainers.
Thanks.