OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr22117.c] - Blame information for rev 853

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR tree-optimization/22117
2
   VRP used think that &p[q] is nonzero even though p and q are both
3
   known to be zero after entering the first two "if" statements.  */
4
 
5
/* { dg-do compile } */
6
/* { dg-options "-O2 -fdump-tree-vrp1" } */
7
 
8
void
9
foo (int *p, int q)
10
{
11
  if (p == 0)
12
    {
13
      if (q == 0)
14
        {
15
          int *r = &p[q];
16
          if (r != 0)
17
            link_error ();
18
        }
19
    }
20
}
21
 
22
/* { dg-final { scan-tree-dump-times "Folding predicate r_.* != 0B to 0" 1 "vrp1" } } */
23
/* { dg-final { cleanup-tree-dump "vrp1" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.