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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [vrp08.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { dg-do compile } */
2
/* { dg-options "-O2 -fno-tree-fre -fdump-tree-vrp-details" } */
3
 
4
/* Compile with -fno-tree-fre -O2 to prevent CSEing *p.  */
5
foo (int a, int *p)
6
{
7
  int x = *p + 2;
8
  int y = *p - 1;
9
  int z = *p + 9;
10
 
11
  /* This should be folded to if (1), but only one ASSERT_EXPR should
12
     be inserted.  */
13
  if (p)
14
    a = x + y + z;
15
  else
16
    a = x - y;
17
 
18
  return a;
19
}
20
 
21
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" } } */
22
/* { dg-final { scan-tree-dump-times "PREDICATE: p_. ne_expr 0" 1 "vrp" } } */
23
/* { dg-final { cleanup-tree-dump "vrp" } } */

powered by: WebSVN 2.1.0

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