http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49933

           Summary: float pointer postincrement during complex
                    calculations increments twice
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: michael.pip...@mathematik.tu-chemnitz.de


Created attachment 24882
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24882
Multiply complex array with float array. Use pointer postincrement ++ to go
through the float array.

The postincrement operator of float pointers is evaluated twice, if it is used
during complex calculations, e.g., the simple multiplication of the complex
array c and the float array f in the way

#  for(k=0;k<N;k++)
#    c[k] *= (*f_ptr++);

results in 

#  for(k=0;k<N;k++)
#    c[k] *= f_ptr[2*k];

instead of the expected result

#  for(k=0;k<N;k++)
#    c[k] *= f_ptr[k];

Ziel: x86_64-unknown-linux-gnu
Konfiguriert mit: ../gcc-4.6.1/configure
--prefix=/lustrefs/compiler/gcc-4.6/gcc-4.6.1
Thread-Modell: posix
gcc-Version 4.6.1 (GCC)
  • [Bug c/49933] New: float p... michael.pippig at mathematik dot tu-chemnitz.de

Reply via email to