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.

Reply via email to