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

2012-08-06 Thread Bug Watch Updater
** Changed in: gcc Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To manage notific

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

2011-10-13 Thread Peter Maydell
For the record, this bites QEMU compiled on Natty as well (and results in an immediate crash on startup). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong addre

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

2011-08-16 Thread Matthias Klose
fixed in oneiric in gcc-4.5 ** Changed in: gcc-4.5 (Ubuntu Oneiric) Status: Triaged => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong add

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

2011-07-23 Thread Launchpad Bug Tracker
** Branch linked: lp:debian/gnat-4.6 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To manage notifications about this bug g

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

2011-07-19 Thread Michael Hope
** Changed in: gcc-linaro/4.6 Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To

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

2011-07-19 Thread Michael Hope
** Changed in: gcc-linaro/4.5 Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To

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

2011-07-15 Thread Launchpad Bug Tracker
** Branch linked: lp:debian/gcc-4.6 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To manage notifications about this bug go

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

2011-07-14 Thread Launchpad Bug Tracker
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/3

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

2011-07-14 Thread Matthias Klose
** Also affects: gcc-4.6 (Ubuntu) Importance: Undecided Status: New ** Changed in: gcc-4.6 (Ubuntu Natty) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531

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

2011-07-12 Thread Bug Watch Updater
** Changed in: gcc Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To manage notifications ab

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

2011-07-10 Thread Michael Hope
** Also affects: gcc-linaro/4.5 Importance: Medium Assignee: Richard Sandiford (rsandifo) Status: In Progress ** Also affects: gcc-linaro/4.6 Importance: Undecided Status: New ** Changed in: gcc-linaro/4.5 Status: In Progress => Fix Committed ** Changed in: gcc-li

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

2011-07-03 Thread Michael Hope
** Changed in: gcc-linaro Milestone: None => 4.6-2011.07 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To manage notifi

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

2011-07-03 Thread Michael Hope
** Changed in: gcc-linaro Status: Triaged => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time To manage not

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

2011-06-29 Thread Michael Hope
** Branch linked: lp:~rsandifo/gcc-linaro/lp721531-4.5 ** Branch linked: lp:~rsandifo/gcc-linaro/lp721531-4.6 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong

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

2011-06-08 Thread Michael Hope
** Changed in: gcc-linaro Assignee: (unassigned) => Richard Sandiford (rsandifo) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at bui

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

2011-05-26 Thread Bug Watch Updater
Launchpad has imported 1 comments from the remote bug at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49169. If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.

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

2011-05-25 Thread Michael Hope
I've logged this in GCC bugzilla. We'll get it fixed up there. ** Bug watch added: GCC Bugzilla #49169 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49169 ** Also affects: gcc via http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49169 Importance: Unknown Status: Unknown -- You receive

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

2011-05-25 Thread Michael Hope
This fault exists in all upstream versions from 4.5 onwards including recent trunk: michaelh@ursa2:~/linaro/bugs$ uname -a Linux ursa2 2.6.35.3-cbuild2+ #8 SMP Mon Apr 4 12:46:46 NZST 2011 armv7l GNU/Linux michaelh@ursa2:~/linaro/bugs$ lsb_release -a No LSB modules are available. Distributor ID:

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

2011-05-25 Thread Kate Stewart
Is this still an issue with 4.6? Need to understand implications of this for the release please. ** Changed in: gcc-4.5 (Ubuntu Oneiric) Assignee: (unassigned) => Linaro Tool Chain Working Group (linaro-toolchain-wg) -- You received this bug notification because you are a member of Ubuntu

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

2011-04-06 Thread Michael Hope
Hi Ken. I'm not surprised by the results above. At all optimisation levels, GCC knows the alignment of a variable and therefore knows the value of the lower bits. At -O0 'foo' works as this information isn't propagated to the next line. 'thumb' fails as the value and alignment are available rig

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

2011-04-06 Thread Ken Werner
As shown above this bug makes it a bit difficult to obtain the thumb marker. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc computes wrong address for main() at build time

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

2011-04-06 Thread Ken Werner
I see a very similar issue even with -O0 when using GCC 4.5.2-8ubuntu1 on my ARM board. Here is a simple test: $ cat test.c && gcc -O0 -Wall -Winline test.c -o test.bin && echo "O0:" && ./test.bin && gcc -O2 -Wall -Winline test.c -o test.bin && echo "O2:" && ./test.bin #include static long

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

2011-03-15 Thread Kate Stewart
Changing bug to Won't Fix for Natty and retargetting to Oneiric.If this can not be worked around, please update status back to confirmed, and will work with teams to see what options are possible. ** Also affects: gcc-4.5 (Ubuntu Oneiric) Importance: Undecided Status: New ** Changed

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

2011-03-15 Thread Kate Stewart
** Changed in: gcc-4.5 (Ubuntu Natty) Assignee: (unassigned) => Linaro Tool Chain Working Group (linaro-toolchain-wg) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/721531 Title: [armel] gcc co

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

2011-03-08 Thread Michael Hope
I'm fairly sure this exists in FSF 4.5 but will confirm. FSF bugs are are lower priority to us and we're a bit swamped at the moment so I'm afraid this may not be fixed soon. A work around would be to break GCC's knowledge of the alignment of the variable. Passing it through another function wou

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

2011-02-19 Thread Andrew Stubbs
@Steve: if you want GDB to give the true function address use '*main' - 'main' will give the first address after the prologue (at least when setting breakpoints, it does). @Michael: I think casting pointers from one pointer type to another (type punning) is deeply dodgy due to strict-aliasing rule

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

2011-02-18 Thread Michael Hope
Confirmed in Linaro GCC 4.5-2011.02-0. I assume that GCC is looking at the type, checking the expected alignment, and then inferring what the value of the LSB should be. This code: extern int foo; void main() { void *p = &foo; if ((int)p & 1) printf ("HIT!\n"); } gets op

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

2011-02-18 Thread Michael Hope
@paul: the address will be changing due to the code before it changing at different optimisation levels. The important thing is that in ARM mode the LSB is clear, while in Thumb mode the LSB is set in all situations. -- You received this bug notification because you are a member of Ubuntu Bugs,

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

2011-02-18 Thread Michael Hope
@steve: GDB has set the breakpoint at the first interesting instruction after the prologue, which is fine. GCC seems to be correct - if you want to jump to main, you want to jump to address 0x8390 in Thumb mode (i.e. LSB set). -- You received this bug notification because you are a member of Ubu

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

2011-02-18 Thread Paul Larson
Not sure if this is relevant, but I seem to be seeing something slightly different. I also added a printf to see what it thinks the value of p is, and tested this with gcc-4.3, 4.4, 4.5: gcc version 4.3.5 (Ubuntu 4.3.5-3ubuntu1) without -O2: p=0x83e0 with -O2: p=0x83e0 gcc version 4.4.5 (Ubuntu/

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

2011-02-18 Thread Steve Langasek
This is reproducible with gcc-4.5 4.5.1-8ubuntu2, the version being used at natty open. So it seems to be a longstanding bug. Not reproducible when building with -O1 or -O2 because gcc optimizes the code out completely (getting the right answer for the address of main in this case... or at least