[Bug c++/102022] incorrect code with -O2

2021-08-23 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102022 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #5

[Bug c++/102022] incorrect code with -O2

2021-08-23 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102022 --- Comment #4 from Richard Biener --- You could use *(void **) which GCC(!) treats conservative. But yes, *(char **)&head should use memcpy to be truly portable.

[Bug c++/102022] incorrect code with -O2

2021-08-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102022 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/102022] incorrect code with -O2

2021-08-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102022 --- Comment #2 from Andrew Pinski --- This part of the code looks like there could be a huge alias violation waiting to happen *(char**)&head

[Bug c++/102022] incorrect code with -O2

2021-08-23 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102022 Martin Liška changed: What|Removed |Added CC||hubicka at gcc dot gnu.org,