https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119070
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You could do:
struct_1 *v1 = &global_0.f_2_0;
asm("":"+r"(v1));
unsigned char *v2 = (unsigned char *)v1;
to hide from GCC that the address of v2 is related to a global variable.
And that should get rid of the warning too.
But otherwise this is undefined code.