GCC 3.4.3 and 3.4.4 generated wrong code at -O2 and -Os opt level for the
attached testcase. If I user -O1 the test case works fine.

Secondly it also works fine if I specify -O2 -fno-if-convertion2

Thirdly If I comment out

newinfo->fig->shape = *&shape;

line in the testcase it works fine agains.

The testcase can be compile and linked and runtime outputs should match

correct output should be 1
alpha.style = 1
correct output should be 2
alpha.style = 2

in wrong code case. It prints.

correct output should be 1
alpha.style = 254
correct output should be 2
alpha.style = 2

The testcase works fine with GCC 4.0 and CVS Trunk GCC

-- 
           Summary: [ARM] Wrong code generation with -O2
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: raj dot khem at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-unknown-linux


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

Reply via email to