[Bug c++/37196] New: Broken debug information on FreeBSD (dwarf)

2008-08-21 Thread pip88nl at gmail dot com
Follow the steps on either:

http://xinutec.org/~pippijn/files/txt/46e78059d1e42f9381587ea2ab502f2b.txt
https://gist.github.com/56744b9f0a5b0d69b83e

on FreeBSD. Dwarf debug information is wrong, but this only happens on FreeBSD
and only if the compiling (-S) and assembling (-c) step are split. It happens
for PIC and non-PIC code. It happens for i386 and x86_64.

This bug is blocking, because I rely on this separate assembling step due to an
assembly code analysis and pattern replacement stage in my build. It is
especially blocking, because I can't fix a blocking bug in my own software.


-- 
   Summary: Broken debug information on FreeBSD (dwarf)
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pip88nl at gmail dot com
 GCC build triplet: i386-undermydesk-freebsd
  GCC host triplet: i386-undermydesk-freebsd
GCC target triplet: i386-undermydesk-freebsd


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



[Bug c++/37196] Broken debug information on FreeBSD (dwarf)

2008-08-21 Thread pip88nl at gmail dot com


--- Comment #2 from pip88nl at gmail dot com  2008-08-21 22:56 ---
It works if -g is omitted on the assembling step. Still, the debug information
from the asm should not conflict with the original debug information, should
it?


-- 


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



[Bug target/47120] New: -malign-double does not align doubles in function calls

2010-12-29 Thread pip88nl at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47120

   Summary: -malign-double does not align doubles in function
calls
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: pip8...@gmail.com


According to the gcc manual, -malign-double creates object code with an ABI
that is incompatible to code that was not compiled with that switch. With this
switch, structs containing doubles are aligned correctly (according to double's
alignment requirements) but doubles passed to functions are not. E.g.:

  void foo (int i, double d);
  int main () {
foo (1, 2);
return 0;
  }

On x86, this will emit code storing the double value of 2.0 to a word-aligned
stack location, not a double-word aligned location, as the manual implies.

I suppose the reason for not aligning doubles on a two word boundary in this
instance is that it would, in addition to the struct ABI, break the x86 calling
convention. However, not aligning the double correctly will make code fail that
requires aligned access.