https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71567
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This:
*(gr->ggint[i]) != '\0' && i < NIN
is reading one past the array bounds. Swapping the operands of && fixes the
problem.
The reason dummy influences GCC optimization is that if it is not there, GCC
assumes struct1 has a flexible array at the end of it.