[Bug c++/95638] Legit-looking code doesn't work with -O2

2020-06-11 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95638 --- Comment #5 from bin cheng --- (In reply to Jakub Jelinek from comment #1) > All I can say is that bisection shows (at least when preprocessed with g++ > 8.3.1 first) that this changed behavior in >

[Bug c++/95638] Legit-looking code doesn't work with -O2

2020-06-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95638 --- Comment #4 from Jonathan Wakely --- I don't see anything obviously wrong with the code. Nothing seems to write to the storage before the constructor, let alone rely on those writes being preserved.

[Bug c++/95638] Legit-looking code doesn't work with -O2

2020-06-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95638 --- Comment #3 from Jakub Jelinek --- (In reply to Martin Liška from comment #2) > The code works with -flifetime-dse=1, so I bet there's some object that goes > out of life: > https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html >

[Bug c++/95638] Legit-looking code doesn't work with -O2

2020-06-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95638 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #2

[Bug c++/95638] Legit-looking code doesn't work with -O2

2020-06-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95638 Jakub Jelinek changed: What|Removed |Added CC||amker at gcc dot gnu.org,