[Bug middle-end/71051] incorrect sparc64 code generated, inevitable jump to null function pointer
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 10 23:49:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71051
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|target |middle-end
Resolution|--- |INVALID
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Simple fix:
const fptr_t *start = __DTOR_LIST__ ;
const fptr_t *end= __DTOR_LIST_END__;
asm("":"+r"(start));
asm("":"+r"(end));
for (const fptr_t *p = start + 1; p < end; ) {
(*(*p++))();
}
---- CUT ----
Basically GCC no longer knows that the array of __DTOR_LIST__ is only of size
1 or that start and end point to two different arrays.
More information about the Gcc-bugs
mailing list