http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52492
Bug #: 52492 Summary: -ftree-vectorize optimization bug Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: a...@somestuff.ru Created attachment 26834 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26834 the code and memory dump Hello! It seems we found a bug and have a simple code to reproduce it. Bug was found under Linux Mint 12 x86_64, gcc 4.6.1. Please try to compile it as follows: correct version: g++ -O1 test.c++ bug version: g++ -ggdb -O1 -ftree-vectorize test.c++ Correct version returns the right answer (2543), bug version gets segmentation fault in the loop of function st_get_local_state_length. You will need to place file "dump" in the same directory with the program to reproduce this bug. It contains important memory dump. Thanks!