https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96762
Michael Meissner <meissner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-05-27
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |meissner at gcc dot gnu.org
--- Comment #1 from Michael Meissner <meissner at gcc dot gnu.org> ---
The example only shows the bug with big endian, 32-bit without optimization.
If you optimize the code, the array assignment goes away. Here is a better
example that can be optimized:
extern void foo (char *);
void
g4 (void)
{
char zj[] = "XXXXXXXXXXXXXXXX";
foo (zj);
}
With the current trunk (as of May 27th) the new example fails at no
optimization, -O1, and -O2.