This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call


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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]