public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/49933] New: float pointer postincrement during complex calculations increments twice
@ 2011-08-01 13:58 michael.pippig at mathematik dot tu-chemnitz.de
  2011-08-01 14:51 ` [Bug c/49933] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: michael.pippig at mathematik dot tu-chemnitz.de @ 2011-08-01 13:58 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: michael.pippig@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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/49933] float pointer postincrement during complex calculations increments twice
  2011-08-01 13:58 [Bug c/49933] New: float pointer postincrement during complex calculations increments twice michael.pippig at mathematik dot tu-chemnitz.de
@ 2011-08-01 14:51 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-01 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-01 14:50:17 UTC ---
This is a dup of PR49644.

*** This bug has been marked as a duplicate of bug 49644 ***


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-01 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-01 13:58 [Bug c/49933] New: float pointer postincrement during complex calculations increments twice michael.pippig at mathematik dot tu-chemnitz.de
2011-08-01 14:51 ` [Bug c/49933] " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).