This testcase fails:

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int f(int *p)
{
  int a = *p;
  int *q = (int *)0xDEADBEE0;
  *q = 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" } } */


Unlike PR38984 it does not require -fno-delete-null-pointer-checks.


-- 
           Summary: [4.2/4.3/4.4 Regression] missing constraints for
                    pointers accessed directly via their address
           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
OtherBugsDependingO 38984
             nThis:


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

Reply via email to