[Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
uweigand at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 5 12:58:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47179
Summary: [4.5/4.6 Regression] SPU: errno misoptimization around
malloc call
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: uweigand@gcc.gnu.org
CC: rguenther@suse.de
Target: spu-elf
The problem described in PR 42944 is still present on SPU.
This is because the SPU system library (newlib) uses:
extern struct _reent _impure_data;
#define errno (_impure_data._errno)
in its version of errno.h, but GCC's call_may_clobber_ref_p_1 routine assumes
errno is always either a global or else accessed via a pointer. It does not
handle component references.
(Note that the problem seems to be specific to the SPU, because of an
optimization that makes use of the fact that SPU code is always
single-threaded. On other platforms, newlib accesses errno via a pointer as
well.)
More information about the Gcc-bugs
mailing list