------- Comment #2 from pinskia at gcc dot gnu dot org 2006-06-14 14:05 ------- The code is basicially the same as: void multiply(float *data_, const float *op, unsigned int size_) { for (unsigned int i=0; i<size_; ++i) data_[i] *= op[i]; }
And what happens is op is data_ + 3 and size_ is 6, we will get the wrong answer as there will be no feedback in the loop. Anyways this is a 4.1 bug fixed already in 4.2.0 -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org GCC build triplet|i686-pc-linux-gnu | GCC host triplet|i686-pc-linux-gnu | GCC target triplet|i686-pc-linux-gnu | Keywords| |wrong-code Summary|[4.2 regression] missed |[4.1 Regression] wrong |optimization with -ftree- |optimization with -ftree- |vectorize |vectorize Target Milestone|--- |4.1.2 Version|4.2.0 |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28029