[Bug target/60822] New: Index register overwritten on m68k/coldfire
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60822 Bug ID: 60822 Summary: Index register overwritten on m68k/coldfire Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pint at tlink dot de I have a newlib based gcc-4.8.2 crosscompiler on a mingw host with this configuration: ../gcc/configure --target=m68k-elf --prefix=/opt/gcc-4.8.2-m68k --enable-threads --with-newlib --enable-static --with-gnu-as --with-gnu-ld --enable-languages=c++ --with-headers=/src/gcc-4.8.2/build-gcc/../newlib/newlib/libc/include --with-arch=cf invoked with: m68k-elf-gcc -mcpu=54455 -g0 -O2 -Wall -Wextra -S test.cpp -otest.s This test program: struct X { char fill0[80]; int a; char fill1[90]; int b; int Avg(int s) const {return (s * (long long)(a + b)) >> 17;} }; int f=1; int o; extern X x; int main() { o = x.Avg(f); return 0; } Produces this output: lea x,%a0 move.l #174,%d0 move.l #80,%d1 move.l %d3,-(%sp) .cfi_offset 3, -12 moveq #15,%d3 move.l (%a0,%d0.l),%d1 add.l (%a0,%d1.l),%d1 Where the value #80 is overwritten before used in the last statement.
[Bug debug/38367] [4.1/4.2/4.3/4.4 regression] Wrong debug information for big endian function parameters
--- Comment #5 from pint at tlink dot de 2008-12-03 17:00 --- Sorry, I can't try it. The patch cannot be applied to 4.3.2. There is no set_mem_size there in assign_parm_find_stack_rtl. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38367
[Bug debug/38367] New: Wrong debug information for big endian function parameters
<9f> DW_AT_type: <0x117> DW_AT_location: 2 byte block: 91 1c (DW_OP_fbreg: 28) <2>: Abbrev Number: 4 (DW_TAG_variable) DW_AT_name: _i1 DW_AT_decl_file : 1 DW_AT_decl_line : 4 DW_AT_type: <0x12c> DW_AT_location: 2 byte block: 7e 76 (DW_OP_breg14: -10) <2>: Abbrev Number: 4 (DW_TAG_variable) DW_AT_name: _i2 DW_AT_decl_file : 1 DW_AT_decl_line : 5 DW_AT_type: <0x12c> DW_AT_location: 2 byte block: 7e 72 (DW_OP_breg14: -14) <2>: Abbrev Number: 4 (DW_TAG_variable) DW_AT_name: _i3 DW_AT_decl_file : 1 DW_AT_decl_line : 6 DW_AT_type: <0x12c> DW_AT_location: 2 byte block: 7e 6e (DW_OP_breg14: -18) <2>: Abbrev Number: 4 (DW_TAG_variable) DW_AT_name: _s1 DW_AT_decl_file : 1 DW_AT_decl_line : 7 DW_AT_type: <0x131> DW_AT_location: 2 byte block: 7e 7c (DW_OP_breg14: -4) <2>: Abbrev Number: 4 (DW_TAG_variable) DW_AT_name: _s2 DW_AT_decl_file : 1 DW_AT_decl_line : 8 DW_AT_type: <0x131> DW_AT_location: 2 byte block: 7e 7a (DW_OP_breg14: -6) <2>: Abbrev Number: 4 (DW_TAG_variable) DW_AT_name: _c1 DW_AT_decl_file : 1 DW_AT_decl_line : 9 DW_AT_type: <0x136> DW_AT_location: 2 byte block: 7e 7f (DW_OP_breg14: -1) <2>: Abbrev Number: 4 (DW_TAG_variable) DW_AT_name: _c2 DW_AT_decl_file : 1 <100> DW_AT_decl_line : 10 <101> DW_AT_type: <0x136> <105> DW_AT_location: 2 byte block: 7e 7e (DW_OP_breg14: -2) <2><108>: Abbrev Number: 4 (DW_TAG_variable) <109> DW_AT_name: _i4 <10d> DW_AT_decl_file : 1 <10e> DW_AT_decl_line : 11 <10f> DW_AT_type: <0x12c> <113> DW_AT_location: 2 byte block: 7e 6a (DW_OP_breg14: -22) <1><117>: Abbrev Number: 5 (DW_TAG_base_type) <118> DW_AT_byte_size : 4 <119> DW_AT_encoding: 5 (signed) <11a> DW_AT_name: int <1><11e>: Abbrev Number: 6 (DW_TAG_base_type) <11f> DW_AT_byte_size : 2 <120> DW_AT_encoding: 5 (signed) <121> DW_AT_name: (indirect string, offset: 0x0): short int <1><125>: Abbrev Number: 6 (DW_TAG_base_type) <126> DW_AT_byte_size : 1 <127> DW_AT_encoding: 6 (signed char) <128> DW_AT_name: (indirect string, offset: 0x1b): char <1><12c>: Abbrev Number: 7 (DW_TAG_volatile_type) <12d> DW_AT_type: <0x117> <1><131>: Abbrev Number: 7 (DW_TAG_volatile_type) <132> DW_AT_type: <0x11e> <1><136>: Abbrev Number: 7 (DW_TAG_volatile_type) <137> DW_AT_type: <0x125> <1><13b>: Abbrev Number: 8 (DW_TAG_subprogram) <13c> DW_AT_external: 1 <13d> DW_AT_name: (indirect string, offset: 0x16): test <141> DW_AT_decl_file : 1 <142> DW_AT_decl_line : 16 <143> DW_AT_type: <0x117> <147> DW_AT_low_pc : 0x38 <14b> DW_AT_high_pc : 0x6a <14f> DW_AT_frame_base : 0x20(location list) -- Summary: Wrong debug information for big endian function parameters Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pint at tlink dot de GCC build triplet: i686-pc-cygwin GCC host triplet: i686-pc-cygwin GCC target triplet: m68k-unknown-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38367