[Bug middle-end/86680] possible gcc optimization
florian.laroche at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 27 21:56:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86680
--- Comment #9 from Florian La Roche <florian.laroche at googlemail dot com> ---
Puh, even introduced an error here. This one works, but is
getting complex compared to the original code:
extern unsigned long __bss_start[];
extern unsigned long __bss_end[];
void clear_bss(void)
{
unsigned long *bss = __bss_start;
unsigned long i, end = (__bss_end - __bss_start) * sizeof (unsigned long);
for (i = 0; i < end; i += sizeof (unsigned long))
*bss++ = 0UL;
}
best regards,
Florian La Roche
More information about the Gcc-bugs
mailing list