Bug#907649: clang-6.0: Erroneous loop optimisation with -O2, accessing to wrong std::vector element

2018-08-31 Thread Sylvestre Ledru
forwarded 907649 https://bugs.llvm.org/show_bug.cgi?id=38786 thanks Le 30/08/2018 à 18:31, Juan Carlos Garcia Hernandez a écrit : > When compiling with -O2 the code below, resulting loop is wrongly optimized > leading > to plainly wrong results (not an approximation), it seems that elements in

Bug#907649: clang-6.0: Erroneous loop optimisation with -O2, accessing to wrong std::vector element

2018-08-30 Thread Juan Carlos Garcia Hernandez
Package: clang-6.0 Version: 1:6.0.1-5 Severity: normal Dear Maintainer, When compiling with -O2 the code below, resulting loop is wrongly optimized leading to plainly wrong results (not an approximation), it seems that elements in std::vector are not accessed in the right order. %%