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

            Bug ID: 58531
           Summary: [4.7/4.8 Regression] Strange array element ordering
                    with O1 flag
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guillaume at eulerian dot com

The 4.8.1 is compiling in reverse order elements of a static array with O flag
>0.

My attached test code output with -O0:

----
Options: -Wall -O0
./test-4.7
(R0)0x401a34 ->(1)-> (R1)0x401a35
./test-4.8
(R0)0x401a64 ->(1)-> (R1)0x401a65
----

with -O1:
----
Options: -Wall -O1
./test-4.7
(R0)0x4019ec ->(1)-> (R1)0x4019ed
./test-4.8
(R0)0x401a3d ->(-1)-> (R1)0x401a3c
----

Reply via email to