public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/61317] New: ones complement fails when using increment(++) into an array
@ 2014-05-26  8:55 richard at rjriley dot info
  2014-05-26  8:57 ` [Bug c/61317] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: richard at rjriley dot info @ 2014-05-26  8:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317

            Bug ID: 61317
           Summary: ones complement fails when using increment(++) into an
                    array
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: richard at rjriley dot info

Created attachment 32855
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32855&action=edit
Test program and results

When taking the one's complement of a number with the result going to an array
using an auto-incremented index, the new gcc produces incorrect values.

ints[j++]=~ints[j-1] & 0xFF; does not produce the same (correct) value as 
a = ~ints[j-1] & 0xFF; ints[j++] = a;


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

end of thread, other threads:[~2014-05-26 13:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-26  8:55 [Bug c/61317] New: ones complement fails when using increment(++) into an array richard at rjriley dot info
2014-05-26  8:57 ` [Bug c/61317] " pinskia at gcc dot gnu.org
2014-05-26 10:50 ` richard at rjriley dot info
2014-05-26 10:57 ` pinskia at gcc dot gnu.org
2014-05-26 12:29 ` redi at gcc dot gnu.org
2014-05-26 12:53 ` richard at rjriley dot info
2014-05-26 13:14 ` mpolacek at gcc dot gnu.org
2014-05-26 13:36 ` redi 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).