public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/37060]  New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
@ 2008-08-08 15:16 schwab at suse dot de
  2008-08-08 15:17 ` [Bug middle-end/37060] " schwab at suse dot de
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: schwab at suse dot de @ 2008-08-08 15:16 UTC (permalink / raw)
  To: gcc-bugs

$ gcc -O2 -S sparc-tdep.i 
In function ‘memcpy’,
    inlined from ‘sparc32_store_return_value’ at sparc-tdep.i:39:
sparc-tdep.i:8: warning: call to __builtin___memcpy_chk will always overflow
destination buffer


-- 
           Summary: [4.3/4.4 regression] Bogus __builtin___memcpy_chk
                    overflow warning
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schwab at suse dot de
GCC target triplet: ia64-*-*


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


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

* [Bug middle-end/37060] [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
@ 2008-08-08 15:17 ` schwab at suse dot de
  2008-08-08 15:44 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: schwab at suse dot de @ 2008-08-08 15:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from schwab at suse dot de  2008-08-08 15:16 -------
Created an attachment (id=16047)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16047&action=view)
Testcase


-- 


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


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

* [Bug middle-end/37060] [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
  2008-08-08 15:17 ` [Bug middle-end/37060] " schwab at suse dot de
@ 2008-08-08 15:44 ` rguenth at gcc dot gnu dot org
  2008-08-27 22:12 ` jsm28 at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-08-08 15:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-08-08 15:43 -------
We fail to see that the len == 16 case cannot happen in the second if (), more
specifically we fail to jump-thread because of the twisted CFG.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
 GCC target triplet|ia64-*-*                    |
           Keywords|                            |missed-optimization
           Priority|P3                          |P2
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-08 15:43:24
               date|                            |
   Target Milestone|---                         |4.3.2


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


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

* [Bug middle-end/37060] [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
  2008-08-08 15:17 ` [Bug middle-end/37060] " schwab at suse dot de
  2008-08-08 15:44 ` rguenth at gcc dot gnu dot org
@ 2008-08-27 22:12 ` jsm28 at gcc dot gnu dot org
  2008-12-27 14:42 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-08-27 22:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jsm28 at gcc dot gnu dot org  2008-08-27 22:05 -------
4.3.2 is released, changing milestones to 4.3.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.2                       |4.3.3


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


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

* [Bug middle-end/37060] [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (2 preceding siblings ...)
  2008-08-27 22:12 ` jsm28 at gcc dot gnu dot org
@ 2008-12-27 14:42 ` pinskia at gcc dot gnu dot org
  2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-27 14:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-12-27 14:41 -------
I don't get the warning on the trunk or the 4.3 branch on i386-darwin8.11.


-- 


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


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

* [Bug middle-end/37060] [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (3 preceding siblings ...)
  2008-12-27 14:42 ` pinskia at gcc dot gnu dot org
@ 2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
  2009-02-03 17:15 ` bonzini at gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-24 10:20 -------
GCC 4.3.3 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.3                       |4.3.4


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


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

* [Bug middle-end/37060] [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (4 preceding siblings ...)
  2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
@ 2009-02-03 17:15 ` bonzini at gnu dot org
  2009-02-03 17:21 ` bonzini at gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bonzini at gnu dot org @ 2009-02-03 17:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bonzini at gnu dot org  2009-02-03 17:15 -------
Only fails on 64-bit targets.


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bonzini at gnu dot org


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


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

* [Bug middle-end/37060] [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (5 preceding siblings ...)
  2009-02-03 17:15 ` bonzini at gnu dot org
@ 2009-02-03 17:21 ` bonzini at gnu dot org
  2009-04-16 22:42 ` [Bug middle-end/37060] [4.3/4.4/4.5 " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bonzini at gnu dot org @ 2009-02-03 17:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bonzini at gnu dot org  2009-02-03 17:21 -------
Interesting: we actually propagate *more* on 64-bit targets, and end up with

  __builtin___memcpy_chk (&buf, valbuf_7(D), 16, 8);


while on 32-bit we get

  __builtin___memcpy_chk (&buf, valbuf_7(D), D.1293_2, 8);


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2008-08-08 15:43:24         |2009-02-03 17:21:05
               date|                            |


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


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

* [Bug middle-end/37060] [4.3/4.4/4.5 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (6 preceding siblings ...)
  2009-02-03 17:21 ` bonzini at gnu dot org
@ 2009-04-16 22:42 ` pinskia at gcc dot gnu dot org
  2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-16 22:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2009-04-16 22:42 -------
Changing int len; into size_t len; and changing unsigned length to  size_t
length; causes this to fail even on 32bits.


-- 


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


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

* [Bug middle-end/37060] [4.3/4.4/4.5 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (7 preceding siblings ...)
  2009-04-16 22:42 ` [Bug middle-end/37060] [4.3/4.4/4.5 " pinskia at gcc dot gnu dot org
@ 2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
  2010-05-22 18:25 ` [Bug middle-end/37060] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


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


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

* [Bug middle-end/37060] [4.3/4.4/4.5/4.6 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (8 preceding siblings ...)
  2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
@ 2010-05-22 18:25 ` rguenth at gcc dot gnu dot org
  2010-07-25  0:04 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2010-05-22 18:12 -------
GCC 4.3.5 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.5                       |4.3.6


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


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

* [Bug middle-end/37060] [4.3/4.4/4.5/4.6 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (9 preceding siblings ...)
  2010-05-22 18:25 ` [Bug middle-end/37060] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
@ 2010-07-25  0:04 ` pinskia at gcc dot gnu dot org
  2010-07-25  0:17 ` pinskia at gcc dot gnu dot org
  2010-07-26  9:06 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-07-25  0:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2010-07-25 00:04 -------
I think this testcase has some other issues at least on the trunk.
sparc_floating_p.isra.0 is produced for 32bit but not 64bit.


And then we have:
MEM[(const struct type *)type_1(D)].code;

Why didn't we just produce an indirect reference here as the const should be
able to be ignored?  (CCing Richard about that part).


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/37060] [4.3/4.4/4.5/4.6 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (10 preceding siblings ...)
  2010-07-25  0:04 ` pinskia at gcc dot gnu dot org
@ 2010-07-25  0:17 ` pinskia at gcc dot gnu dot org
  2010-07-26  9:06 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-07-25  0:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2010-07-25 00:17 -------
Here is a simple testcase of why 32bit does not produce the 16:
int j(unsigned a)
{
  int c;
  int b = a;
  if (a == 1)
    c = b;
  else
    c = 1;
  return b + c;
}
--- CUT ---


-- 


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


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

* [Bug middle-end/37060] [4.3/4.4/4.5/4.6 regression] Bogus __builtin___memcpy_chk overflow warning
  2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
                   ` (11 preceding siblings ...)
  2010-07-25  0:17 ` pinskia at gcc dot gnu dot org
@ 2010-07-26  9:06 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-26  9:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from rguenth at gcc dot gnu dot org  2010-07-26 09:06 -------
(In reply to comment #11)
> I think this testcase has some other issues at least on the trunk.
> sparc_floating_p.isra.0 is produced for 32bit but not 64bit.
> 
> 
> And then we have:
> MEM[(const struct type *)type_1(D)].code;
> 
> Why didn't we just produce an indirect reference here as the const should be
> able to be ignored?  (CCing Richard about that part).

There are no more INDIRECT_REFs.  The above is type_1->code, just not
pretty printed as such.


-- 


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


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

end of thread, other threads:[~2010-07-26  9:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-08 15:16 [Bug middle-end/37060] New: [4.3/4.4 regression] Bogus __builtin___memcpy_chk overflow warning schwab at suse dot de
2008-08-08 15:17 ` [Bug middle-end/37060] " schwab at suse dot de
2008-08-08 15:44 ` rguenth at gcc dot gnu dot org
2008-08-27 22:12 ` jsm28 at gcc dot gnu dot org
2008-12-27 14:42 ` pinskia at gcc dot gnu dot org
2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
2009-02-03 17:15 ` bonzini at gnu dot org
2009-02-03 17:21 ` bonzini at gnu dot org
2009-04-16 22:42 ` [Bug middle-end/37060] [4.3/4.4/4.5 " pinskia at gcc dot gnu dot org
2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
2010-05-22 18:25 ` [Bug middle-end/37060] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
2010-07-25  0:04 ` pinskia at gcc dot gnu dot org
2010-07-25  0:17 ` pinskia at gcc dot gnu dot org
2010-07-26  9:06 ` rguenth 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).