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?
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
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
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)
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