https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657

--- Comment #2 from Christoph Müllner <christophm30 at gmail dot com> ---
Thanks for referencing pr99578.
Based on the information there, I created the following workaround:

void foo(unsigned long v)
{
        volatile unsigned long *p;
        p = (volatile unsigned long*)8;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
        *p = v;
#pragma GCC diagnostic pop
}

Reply via email to