Hello all, I experience target crashing when cross compiling for ARM with -ftree-loop-distribute-patterns, which is enabled by the -O3 flag. The crash happens in the startup code, before main() is called. This startup code looks like this: extern unsigned long _sidata; /* Set by the linker */ extern unsigned long _sdata; /* Set by the linker */ extern unsigned long _sbss; /* Set by the linker */ extern unsigned long _ebss; /* Set by the linker */ void Reet_Handler (void) { unsigned long *src = &_sidata unsigned long *src = &_sdata /* Copy data segment into RAM */ if (src != dst) { while (dst < &_edata) *(dst++) = *(src++); } /* Zero BSS segment */ dst = &_sbss; while (dst < &_ebss) *(dst++) = 0; main(); } With -ftree-loop-distribute-patterns those two loops are replaced by calls to memcpy() and memset(). The memcpy function finishes just fine. But the memset function doesn't seem to finish. It looks like this: void memset (void *s, int c, size_t n) { int i; for (i=0; i<n; i++) ((char *)s)[i] = c; } Any ideas why this function is crashing? I can't see anything suspicious here. Thanks -- Josef Wolf jw@xxxxxxxxxxxxx