public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/38984]  New: [4.2/4.3/4.4 Regression] NULL pointers always considered distinct by PTA, even with -fno-delete-null-pointer-checks
@ 2009-01-27 10:59 bonzini at gnu dot org
  2009-01-27 11:02 ` [Bug tree-optimization/38984] " bonzini at gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 19+ messages in thread
From: bonzini at gnu dot org @ 2009-01-27 10:59 UTC (permalink / raw)
  To: gcc-bugs

This testcase fails:

/* { dg-do compile } */
/* { dg-options "-O2 -fno-delete-null-pointer-checks -fdump-tree-optimized" }
*/

int f(int *p)
{
  int a = *p;
  int *null = 0;
  *null = 5;
  return *p == a;
}

/* { dg-final { scan-tree-dump-times " = \\\*p" 2 "optimized" } } */
/* { dg-final { scan-tree-dump-not "return 1" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */

This testcase is important because targets that are always MMU-less (like AVR)
will always have -fdelete-null-pointer-checks disabled, so the wrong code bug
will happen with -O2.  IMO it is a P2.


-- 
           Summary: [4.2/4.3/4.4 Regression] NULL pointers always considered
                    distinct by PTA, even with -fno-delete-null-pointer-
                    checks
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonzini at gnu dot org


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


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

end of thread, other threads:[~2009-02-02  8:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-27 10:59 [Bug tree-optimization/38984] New: [4.2/4.3/4.4 Regression] NULL pointers always considered distinct by PTA, even with -fno-delete-null-pointer-checks bonzini at gnu dot org
2009-01-27 11:02 ` [Bug tree-optimization/38984] " bonzini at gnu dot org
2009-01-27 11:08   ` Andrew Thomas Pinski
2009-01-27 11:06 ` rguenth at gcc dot gnu dot org
2009-01-27 11:06 ` rguenth at gcc dot gnu dot org
2009-01-27 11:08 ` pinskia at gmail dot com
2009-01-27 11:10 ` bonzini at gnu dot org
2009-01-27 11:16 ` bonzini at gnu dot org
2009-01-27 12:14 ` rguenth at gcc dot gnu dot org
2009-01-27 12:27 ` bonzini at gnu dot org
2009-01-27 12:30 ` rguenther at suse dot de
2009-01-27 16:24 ` rguenth at gcc dot gnu dot org
2009-01-28  8:03 ` bonzini at gcc dot gnu dot org
2009-01-28  8:05 ` bonzini at gnu dot org
2009-01-28 11:29 ` [Bug tree-optimization/38984] [4.2/4.3 " bonzini at gnu dot org
2009-01-28 11:29 ` bonzini at gnu dot org
2009-02-01 21:34 ` rguenth at gcc dot gnu dot org
2009-02-01 22:03 ` rguenth at gcc dot gnu dot org
2009-02-02  8:27 ` bonzini at 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).