[Bug c++/99965] segfault only happening with -O3

2021-04-07 Thread juanlucasrey at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99965 --- Comment #7 from Juan Lucas Rey --- the thing is removing the vector m_vPointers makes it work. also this code works fine on clang.. why would it be misaligned?

[Bug c++/99965] segfault only happening with -O3

2021-04-07 Thread juanlucasrey at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99965 --- Comment #6 from Juan Lucas Rey --- I get the following with -fsanitize=alignment bug.cpp:29:21: runtime error: store to misaligned address 0x02249044 for type 'char *', which requires 8 byte alignment 0x02249044: note: pointer points

[Bug c++/99965] segfault only happening with -O3

2021-04-07 Thread juanlucasrey at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99965 --- Comment #4 from Juan Lucas Rey --- I get the error "cannot find -lubsan" with -fsanitize=alignment g++ bug.cpp -o bug -O2 -ftree-loop-vectorize -fvect-cost-model && ./bug this also reproduces the segfault

[Bug c++/99965] segfault only happening with -O3

2021-04-07 Thread juanlucasrey at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99965 --- Comment #1 from Juan Lucas Rey --- g++ --version g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

[Bug c++/99965] New: segfault only happening with -O3

2021-04-07 Thread juanlucasrey at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99965 Bug ID: 99965 Summary: segfault only happening with -O3 Product: gcc Version: 7.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ As