https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98544
Bug ID: 98544 Summary: [11 regression] Wrong code generated by tree vectorizer Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mar...@mpa-garching.mpg.de Target Milestone: --- Created attachment 49893 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49893&action=edit test case The attached test case (sorry, I don't have the time to reduce this properly at the moment ...) tests real-valued FFTs of different lengths and should not output anything if compiled properly. However, with current trunk and the following compiler command line, some of the results are really wrong: martin@debian:~/codes/ducc/bug$ g++ -std=c++17 -O1 -mavx -ftree-vectorize bug2.cc martin@debian:~/codes/ducc/bug$ ./a.out problem at length 15; discrepancy is 4.40898 problem at length 20; discrepancy is 4.54691 problem at length 21; discrepancy is 3.70442 problem at length 25; discrepancy is 8.40318 problem at length 27; discrepancy is 8.44956 problem at length 28; discrepancy is 3.12203 problem at length 30; discrepancy is 8.81795 The discrepancies should be below 1e-15. The failure goes away when removing either "-ftree-vectorize" or "-mavx". On released versions of gcc, it runs fine.