public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
@ 2011-01-05 12:58 uweigand at gcc dot gnu.org
  2011-01-11 12:27 ` [Bug tree-optimization/47179] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: uweigand at gcc dot gnu.org @ 2011-01-05 12:58 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/47179] [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
  2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
@ 2011-01-11 12:27 ` rguenth at gcc dot gnu.org
  2011-01-14 15:05 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-11 12:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.01.11 12:14:27
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.5.3
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-11 12:14:27 UTC ---
Mine.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/47179] [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
  2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
  2011-01-11 12:27 ` [Bug tree-optimization/47179] " rguenth at gcc dot gnu.org
@ 2011-01-14 15:05 ` rguenth at gcc dot gnu.org
  2011-01-14 15:19 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-14 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 15:02:27 UTC ---
Author: rguenth
Date: Fri Jan 14 15:02:20 2011
New Revision: 168788

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168788
Log:
2011-01-14  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/47179
    * target.def (ref_may_alias_errno): New target hook.
    * targhooks.h (default_ref_may_alias_errno): Declare.
    * targhooks.c: Include tree-ssa-alias.h and tree-flow.h.
    (default_ref_may_alias_errno): New function.
    * target.h (struct ao_ref_s): Declare.
    * tree-ssa-alias.c: Include target.h.
    (call_may_clobber_ref_p_1): Use the ref_may_alias_errno target hook.
    * Makefile.in (tree-ssa-alias.o): Adjust dependencies.
    (targhooks.o): Likewise.
    * doc/tm.texi.in (TARGET_REF_MAY_ALIAS_ERRNO): Document.
    * doc/tm.texi (TARGET_REF_MAY_ALIAS_ERRNO): Copy documentation.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/doc/tm.texi
    trunk/gcc/doc/tm.texi.in
    trunk/gcc/target.def
    trunk/gcc/target.h
    trunk/gcc/targhooks.c
    trunk/gcc/targhooks.h
    trunk/gcc/tree-ssa-alias.c


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/47179] [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
  2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
  2011-01-11 12:27 ` [Bug tree-optimization/47179] " rguenth at gcc dot gnu.org
  2011-01-14 15:05 ` rguenth at gcc dot gnu.org
@ 2011-01-14 15:19 ` rguenth at gcc dot gnu.org
  2011-01-17 16:06 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-14 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu.org  |uweigand at gcc dot gnu.org

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 15:04:16 UTC ---
Re-assigning to Uli for the SPU part.  I suggest not fixing this for 4.5
(it's a pretty arcane corner case anyway, esp. on SPU I guess).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/47179] [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
  2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-01-14 15:19 ` rguenth at gcc dot gnu.org
@ 2011-01-17 16:06 ` jakub at gcc dot gnu.org
  2011-01-18 20:47 ` uweigand at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 16:06 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |jakub at gcc dot gnu.org


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/47179] [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
  2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-01-17 16:06 ` jakub at gcc dot gnu.org
@ 2011-01-18 20:47 ` uweigand at gcc dot gnu.org
  2011-01-18 20:48 ` uweigand at gcc dot gnu.org
  2011-01-19 12:01 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: uweigand at gcc dot gnu.org @ 2011-01-18 20:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ulrich Weigand <uweigand at gcc dot gnu.org> 2011-01-18 20:13:59 UTC ---
Author: uweigand
Date: Tue Jan 18 20:13:56 2011
New Revision: 168961

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168961
Log:
    PR tree-optimization/47179
    * config/spu/spu.c (spu_ref_may_alias_errno): New function.
    (TARGET_REF_MAY_ALIAS_ERRNO): Define.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/spu/spu.c


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/47179] [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
  2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-01-18 20:47 ` uweigand at gcc dot gnu.org
@ 2011-01-18 20:48 ` uweigand at gcc dot gnu.org
  2011-01-19 12:01 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: uweigand at gcc dot gnu.org @ 2011-01-18 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

Ulrich Weigand <uweigand at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Ulrich Weigand <uweigand at gcc dot gnu.org> 2011-01-18 20:16:10 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/47179] [4.5/4.6 Regression] SPU: errno misoptimization around malloc call
  2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-01-18 20:48 ` uweigand at gcc dot gnu.org
@ 2011-01-19 12:01 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-19 12:01 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.3                       |4.6.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-19 10:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-05 12:58 [Bug tree-optimization/47179] New: [4.5/4.6 Regression] SPU: errno misoptimization around malloc call uweigand at gcc dot gnu.org
2011-01-11 12:27 ` [Bug tree-optimization/47179] " rguenth at gcc dot gnu.org
2011-01-14 15:05 ` rguenth at gcc dot gnu.org
2011-01-14 15:19 ` rguenth at gcc dot gnu.org
2011-01-17 16:06 ` jakub at gcc dot gnu.org
2011-01-18 20:47 ` uweigand at gcc dot gnu.org
2011-01-18 20:48 ` uweigand at gcc dot gnu.org
2011-01-19 12:01 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).