[Bug 1029454] Re: cselim tree optimizer generates incorrect code

Launchpad Bug Tracker 1029454 at bugs.launchpad.net
Sat May 11 04:17:40 UTC 2013


** Branch linked: lp:debian/gnat-4.6

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.6 in Ubuntu.
https://bugs.launchpad.net/bugs/1029454

Title:
  cselim tree optimizer generates incorrect code

Status in Linaro GCC:
  Fix Released
Status in “gcc-4.6” package in Ubuntu:
  Fix Released
Status in “gcc-4.6” source package in Precise:
  Triaged

Bug description:
  I think gcc (4.6.3-1ubuntu5, amd64) generates incorrect code with the
  attached test case.

  The expected output is "m = 8241071186". However, when compiled with
  "-O3", it outputs "m = 1". Looking further, it seems that the
  following lines:

         *m = 1UL;
        ularith_div_2ul_ul_ul_r (m, 0UL, 1UL, s);

  are being swapped in the assembly output.

  The output is correct when compiled with "-O2" or with "-O3 -fno-tree-
  cselim".

  On Debian (version 4.6.3-1), the output is always correct. I have
  reports that the output is correct with upstream gcc compiled on
  Ubuntu, so this behaviour looks Ubuntu-specific.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc-linaro/+bug/1029454/+subscriptions




More information about the foundations-bugs mailing list