[Bug c/63880] GCC overoptimization on local arrays of size 1

2014-11-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63880 --- Comment #4 from Richard Biener --- Indeed this is a case we don't handle as QOI special-case (we accept other cases of strictly undefined code though). In this case it is recommended to just do arglist *p = malloc (sizeof (arglist) + sizeof

[Bug c/63880] GCC overoptimization on local arrays of size 1

2014-11-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63880 --- Comment #3 from Andrew Pinski --- if you allocated an arglist via malloc (or alloca) and not have a struct which contained arglist, it would be valid (well GCC would do the correct thing as we define it as being valid).

[Bug c/63880] GCC overoptimization on local arrays of size 1

2014-11-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63880 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/63880] GCC overoptimization on local arrays of size 1

2014-11-14 Thread petzke at teltarif dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63880 --- Comment #1 from Kai Petzke --- Created attachment 33980 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33980&action=edit A file with small modifications from overoptimized.c, that compiles correctly.