[Bug target/48576] New: wrong code when accessing variables in a large stack frame
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576 Summary: wrong code when accessing variables in a large stack frame Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: akos.paszt...@gmail.com Target: arm-linux-gnueabi Created attachment 23964 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23964 preprocessed source Tried with 4.5.2 (and 4.6.0), stage1 compiler: ../gcc-4.5.2/configure \ --target=arm-linux-gnueabi \ --disable-shared \ --disable-bootstrap \ --with-sysroot=/usr/arm-linux-gnueabi \ --disable-threads \ --disable-libmudflap \ --disable-libssp \ --with-arch=armv7-a --with-tune=cortex-a8 --with-float=hard --with-fpu=neon \ --enable-languages=c \ --with-newlib When compiling the attached source with: ./cc1 -O1 -fgcse -fno-omit-frame-pointer jaj.i gcc produces this code to do "arr[n] = strdup(str)": ... blstrdup subr3, fp, #4096 ldrr3, [r3, #-132] @ this kills r3 ldrr2, [r3, #-128] @ and this doesn't know about it strr0, [r2, r3, asl #2] ... The problem is first visible in jaj.i.192r.ira when using -fdump-rtl-all. Omitting frame pointer "helps" but I think it's pure coincidence. Apologies about the messy test code but I was not able to reduce it more without changing the output.
[Bug target/49404] New: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49404 Summary: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: akos.paszt...@gmail.com Host: i686-pc-linux-gnu Target: arm-none-linux-gnueabi In the ARM implementation of _Unwind_Backtrace [1], if get_eit_entry() returns _URC_END_OF_STACK, as it will when reaching a .cantunwind function (e.g. _start), it is turned into _URC_FAILURE. Thus, _Unwind_Backtrace will (almost always?) return _URC_FAILURE, which is bad if someone relies on that return value. I wonder if the get_eit_entry() result should be just returned verbatim, if it's not _URC_OK, something like: if ((code = get_eit_entry (ucbp, saved_vrs.core.r[R_PC])) != _URC_OK) break; [1] http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/arm/unwind-arm.c;h=4a9e2325c39afca79d05148be46ff72663a8b5cd;hb=HEAD#l974
[Bug target/49404] ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49404 --- Comment #2 from Akos PASZTORY 2011-07-25 15:51:06 UTC --- Does that also apply to _Unwind_Backtrace? Unfortunately the specification I found [1] doesn't elaborate on the return values. Would anything bad happen if it just returned the error code unmodified? [1] http://refspecs.freestandards.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/baselib--unwind-backtrace.html