[Bug c++/108407] SegFault with structured binding and OpenMP without optimization

2023-01-14 Thread mmoelle1 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108407 --- Comment #4 from Matthias Möller --- Thank you, I have changed the code as suggested and it compiles and runs fine in all optimization levels including '-O0'.

[Bug c++/108407] SegFault with structured binding and OpenMP without optimization

2023-01-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108407 --- Comment #3 from Andrew Pinski --- If you do: return std::tuple(a,b); You don't get the reference.

[Bug c++/108407] SegFault with structured binding and OpenMP without optimization

2023-01-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108407 --- Comment #2 from Andrew Pinski --- > return std::tie(a,b); That returns a reference to the two local variables. Both have now gone out of scope.

[Bug c++/108407] SegFault with structured binding and OpenMP without optimization

2023-01-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108407 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED