2 /* { dg-options "-O2" } */
4 /* This test checks that persistent and noinit data are handled correctly. */
6 extern void __crt0_start (void) __attribute__ ((noreturn
));
7 extern void abort (void) __attribute__ ((noreturn
));
8 extern void exit (int) __attribute__ ((noreturn
));
13 int __attribute__((noinit
)) d
;
14 int __attribute__((persistent
)) e
= 2;
19 /* Make sure that the C startup code has correctly initialised the ordinary variables. */
23 #ifndef __MSP430X_LARGE__
24 /* For non-large targets we use the ordinary msp430-sim.ld linker script.
25 This does not support FLASH, and as a side effect it does not support
26 reinitialising initialised data. Hence we only test b and c if this
27 is the first time through this test, or large support has been enabled. */
36 /* First time through - change all the values. */
37 a
= b
= c
= d
= e
= 3;
41 /* Second time through - make sure that d has not been reset. */
47 /* Any other value for e is an error. */
51 /* Simulate a processor reset by calling the C startup code. */
54 /* Should never reach here. */