public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
       [not found] <bug-22237-230@http.gcc.gnu.org/bugzilla/>
@ 2005-10-06  8:49 ` rth at gcc dot gnu dot org
  2005-10-06 20:47 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-10-06  8:49 UTC (permalink / raw)
  To: gcc-bugs



-- 

rth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-06-30 02:12:02         |2005-10-06 08:49:07
               date|                            |


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
       [not found] <bug-22237-230@http.gcc.gnu.org/bugzilla/>
  2005-10-06  8:49 ` [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy rth at gcc dot gnu dot org
@ 2005-10-06 20:47 ` cvs-commit at gcc dot gnu dot org
  2005-10-06 22:13 ` cvs-commit at gcc dot gnu dot org
  2005-10-06 22:14 ` rth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-06 20:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from cvs-commit at gcc dot gnu dot org  2005-10-06 20:46 -------
Subject: Bug 22237

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     rth@gcc.gnu.org 2005-10-06 20:46:54

Modified files:
        gcc            : ChangeLog tree-inline.c 
Added files:
        gcc/testsuite/gcc.c-torture/execute/builtins: pr22237-lib.c 
                                                      pr22237.c 

Log message:
        PR tree-opt/22237
        * tree-inline.c (declare_return_variable): Handle modify_dest not
        being a DECL.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10108&r2=2.10109
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-inline.c.diff?cvsroot=gcc&r1=1.210&r2=1.211
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/pr22237-lib.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/pr22237.c.diff?cvsroot=gcc&r1=NONE&r2=1.1


-- 


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
       [not found] <bug-22237-230@http.gcc.gnu.org/bugzilla/>
  2005-10-06  8:49 ` [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy rth at gcc dot gnu dot org
  2005-10-06 20:47 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-06 22:13 ` cvs-commit at gcc dot gnu dot org
  2005-10-06 22:14 ` rth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-06 22:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from cvs-commit at gcc dot gnu dot org  2005-10-06 22:13 -------
Subject: Bug 22237

CVSROOT:        /cvs/gcc
Module name:    gcc
Branch:         gcc-4_0-branch
Changes by:     rth@gcc.gnu.org 2005-10-06 22:13:49

Modified files:
        gcc            : tree-inline.c 
Added files:
        gcc/testsuite/gcc.c-torture/execute/builtins: pr22237-lib.c 
                                                      pr22237.c 

Log message:
        PR tree-opt/22237
        * tree-inline.c (declare_return_variable): Handle modify_dest not
        being a DECL.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-inline.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.170.8.5&r2=1.170.8.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/pr22237-lib.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/pr22237.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1


-- 


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
       [not found] <bug-22237-230@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-10-06 22:13 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-06 22:14 ` rth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-10-06 22:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rth at gcc dot gnu dot org  2005-10-06 22:14 -------
Fixed.


-- 

rth at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
  2005-06-29 23:11 [Bug tree-optimization/22237] New: " jsm28 at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-09-12 19:51 ` janis at gcc dot gnu dot org
@ 2005-09-27 16:13 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |4.0.3


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
  2005-06-29 23:11 [Bug tree-optimization/22237] New: " jsm28 at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-06-30  9:27 ` joseph at codesourcery dot com
@ 2005-09-12 19:51 ` janis at gcc dot gnu dot org
  2005-09-27 16:13 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-09-12 19:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From janis at gcc dot gnu dot org  2005-09-12 19:51 -------
A regression hunt on mainline for powerpc64-linux (with -m64) shows that the
test starts failing with this patch from rth:

  http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg00914.html

The test does not fail with -m32.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu dot org


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
  2005-06-29 23:11 [Bug tree-optimization/22237] New: " jsm28 at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-06-30  2:12 ` pinskia at gcc dot gnu dot org
@ 2005-06-30  9:27 ` joseph at codesourcery dot com
  2005-09-12 19:51 ` janis at gcc dot gnu dot org
  2005-09-27 16:13 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: joseph at codesourcery dot com @ 2005-06-30  9:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From joseph at codesourcery dot com  2005-06-30 09:27 -------
Subject: Re:  [4.0/4.1 Regression] struct copy
 inlining generates overlapping memcpy

On Thu, 30 Jun 2005, pinskia at gcc dot gnu dot org wrote:

> I think this is a latent bug as even 3.4 produces calls to memcpy.

Those are memcpy via a stack temporary (each of pq and qp calls memcpy 
twice), which is OK.  The problem is that 4.0/4.1 use a direct memcpy 
between the overlapping structures.  Either indirect copying as with 3.4, 
or using memmove, would be OK, but you can't just convert

t = s1
s2 = t

into

s2 = s1

if s1 and s2 might overlap.



-- 


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
  2005-06-29 23:11 [Bug tree-optimization/22237] New: " jsm28 at gcc dot gnu dot org
  2005-06-29 23:16 ` [Bug tree-optimization/22237] " pinskia at gcc dot gnu dot org
  2005-06-29 23:22 ` joseph at codesourcery dot com
@ 2005-06-30  2:12 ` pinskia at gcc dot gnu dot org
  2005-06-30  9:27 ` joseph at codesourcery dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-30  2:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-30 02:12 -------
I think this is a latent bug as even 3.4 produces calls to memcpy.

Confirmed, still.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-30 02:12:02
               date|                            |
   Target Milestone|---                         |4.0.2


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
  2005-06-29 23:11 [Bug tree-optimization/22237] New: " jsm28 at gcc dot gnu dot org
  2005-06-29 23:16 ` [Bug tree-optimization/22237] " pinskia at gcc dot gnu dot org
@ 2005-06-29 23:22 ` joseph at codesourcery dot com
  2005-06-30  2:12 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: joseph at codesourcery dot com @ 2005-06-29 23:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From joseph at codesourcery dot com  2005-06-29 23:22 -------
Subject: Re:  [4.0/4.1 Regression] struct copy
 inlining generates overlapping memcpy

On Wed, 29 Jun 2005, pinskia at gcc dot gnu dot org wrote:

> I cannot reproduce this on powerpc-darwin at all.

Maybe powerpc-darwin has a sympathetic memcpy which acts like memmove.  
(If the output contains a direct memcpy between p and q the problem is 
there even if libc covers it up.)  I get the failure on both 
i686-pc-linux-gnu and x86_64-unknown-linux-gnu with mainline of today.



-- 


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


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

* [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
  2005-06-29 23:11 [Bug tree-optimization/22237] New: " jsm28 at gcc dot gnu dot org
@ 2005-06-29 23:16 ` pinskia at gcc dot gnu dot org
  2005-06-29 23:22 ` joseph at codesourcery dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-29 23:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-29 23:16 -------
I cannot reproduce this on powerpc-darwin at all.

-- 


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


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

end of thread, other threads:[~2005-10-06 22:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22237-230@http.gcc.gnu.org/bugzilla/>
2005-10-06  8:49 ` [Bug tree-optimization/22237] [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy rth at gcc dot gnu dot org
2005-10-06 20:47 ` cvs-commit at gcc dot gnu dot org
2005-10-06 22:13 ` cvs-commit at gcc dot gnu dot org
2005-10-06 22:14 ` rth at gcc dot gnu dot org
2005-06-29 23:11 [Bug tree-optimization/22237] New: " jsm28 at gcc dot gnu dot org
2005-06-29 23:16 ` [Bug tree-optimization/22237] " pinskia at gcc dot gnu dot org
2005-06-29 23:22 ` joseph at codesourcery dot com
2005-06-30  2:12 ` pinskia at gcc dot gnu dot org
2005-06-30  9:27 ` joseph at codesourcery dot com
2005-09-12 19:51 ` janis at gcc dot gnu dot org
2005-09-27 16:13 ` mmitchel at gcc dot gnu dot 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).