[Bug 721531] Re: [armel] gcc computes wrong address for main() at build time

Launchpad Bug Tracker 721531 at bugs.launchpad.net
Thu Jul 14 18:35:11 UTC 2011


This bug was fixed in the package gcc-4.6 - 4.6.1-4ubuntu1

---------------
gcc-4.6 (4.6.1-4ubuntu1) oneiric; urgency=low

  * Merge with Debian.

gcc-4.6 (4.6.1-4) unstable; urgency=low

  * Update to SVN 20110714 (r176280) from the gcc-4_6-branch.
    - Fix PR tree-optimization/49094, PR target/39633, PR c++/49672,
      PR fortran/49698, PR fortran/49690, PR fortran/49562, PR libfortran/49296,
      PR target/49487, PR tree-optimization/49651, PR ada/48711.

  [ Matthias Klose ]
  * Build Go on alpha for gcc-snapshot builds.
  * For multicore ARM, clear both caches, not just the dcache (proposed
    patch by Andrew Haley).
  * Fix for PR rtl-optimization/{48830,48808,48792}, taken from the trunk.
    LP: #807573.
  * Fix PR tree-optimization/49169, optimisations strip the Thumb/ARM mode bit
    off function pointers (Richard Sandiford). LP: #721531.

  [ Marcin Juszkiewicz ]
  * Define DEB_TARGET_MULTIARCH macro.
  * debian/rules2: Macro and configuration consolidation.

gcc-4.6 (4.6.1-3) unstable; urgency=medium

  * Update to SVN 20110709 (r176108) from the gcc-4_6-branch.
    - Fix PR target/49335, PR tree-optimization/49618, PR c++/49598,
      PR fortran/49479, PR target/49621, PR target/46779, PR target/49660,
      PR c/49644, PR debug/49522, PR debug/49522, PR middle-end/49640,
      PR c++/48157, PR c/49644, PR fortran/48926.
    - Apparently fixes a boost issue. Closes: #632938.
  * Apply proposed patch for PR fortran/49690. Closes: #631204.

  * README.Debian: New section 'Former and/or inactive maintainers'.
 -- Matthias Klose <doko at ubuntu.com>   Thu, 14 Jul 2011 20:18:27 +0200

** Changed in: gcc-4.6 (Ubuntu Oneiric)
       Status: New => Fix Released

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

Title:
  [armel] gcc computes wrong address for main() at build time

Status in The GNU Compiler Collection:
  Confirmed
Status in Linaro GCC:
  Fix Committed
Status in Linaro GCC 4.5 series:
  Fix Committed
Status in Linaro GCC 4.6 series:
  Fix Committed
Status in “gcc-4.5” package in Ubuntu:
  Triaged
Status in “gcc-4.6” package in Ubuntu:
  Fix Released
Status in “gcc-4.5” source package in Natty:
  Won't Fix
Status in “gcc-4.6” source package in Natty:
  Invalid
Status in “gcc-4.5” source package in Oneiric:
  Triaged
Status in “gcc-4.6” source package in Oneiric:
  Fix Released

Bug description:
  Binary package hint: gcc-4.5

  During the debugging of mono, we found a confirmed tool chain
  regression and isolated it down to a testcase:

  Test code:

  void main() {
          void *p = main;
          if ((int)p & 1) printf ("HIT!\n"); 
  }

  Output:

  mcasadevall at risingsun:~/tmp$ gcc  -g test.c 
  test.c: In function 'main':
  test.c:3:18: warning: incompatible implicit declaration of built-in function 'printf'
  mcasadevall at risingsun:~/tmp$ ./a.out 
  HIT!

  mcasadevall at risingsun:~/tmp$ gcc  -g -O2 test.c 
  test.c: In function 'main':
  test.c:3:18: warning: incompatible implicit declaration of built-in function 'printf'
  mcasadevall at risingsun:~/tmp$ ./a.out 
  mcasadevall at risingsun:~/tmp$ 

  Doesn't occur with gcc-4.4.

  Additional comments from #monodev:
  16:26:58 < vargaz> NCommander: it seems to think function addresses on arm 
                     have their lowest bit set to 0, which is not true for 
                     thumb.

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




More information about the foundations-bugs mailing list