[Bug 721531]

Rsandifo-gcc 721531 at bugs.launchpad.net
Mon Jun 27 09:33:10 UTC 2011


Author: rsandifo
Date: Mon Jun 27 09:33:06 2011
New Revision: 175427

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175427
Log:
gcc/
2011-07-24  Richard Guenther  <rguenther at suse.de>

	PR tree-optimization/49169
	* fold-const.c (get_pointer_modulus_and_residue): Don't rely on
	the alignment of function decls.

gcc/testsuite/
2011-07-24  Michael Hope  <michael.hope at linaro.org>
	    Richard Sandiford  <richard.sandiford at linaro.org>

	PR tree-optimization/49169
	* gcc.dg/torture/pr49169.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr49169.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog

-- 
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:
  New
Status in Linaro GCC:
  Triaged
Status in “gcc-4.5” package in Ubuntu:
  Triaged
Status in “gcc-4.5” source package in Natty:
  Won't Fix
Status in “gcc-4.5” source package in Oneiric:
  Triaged

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