https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69820
Bug ID: 69820 Summary: Test was miss compiled with -O3 option. Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vsevolod.livinskij at frtk dot ru Target Milestone: --- Created attachment 37689 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37689&action=edit Reproducer. Test case produces incorrect result with -O3 option. Everything works fine with gcc version 5.3.1 20160212 (Revision=233387) and gcc version 4.9.4 20160212 (prerelease) (Revision=233387). Output: > g++ -march=core-avx2 -O3 repr.cpp ; ./a.out 7540928331148314342 > g++ -march=core-avx2 -O2 repr.cpp ; ./a.out 18084857435860378664 GCC version: > g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/export/users/vlivinsk/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /export/users/gnutester/stability/svn/trunk/configure --with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-fpmath=sse --enable-checking=release --with-pkgversion=Revision=233012 --prefix=/export/users/gnutester/stability/work/trunk/64/install --enable-languages=c,c++,fortran,java,lto Thread model: posix gcc version 6.0.0 20160130 (experimental) (Revision=233012)