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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr37508.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-vrp1" } */
3
 
4
struct foo1 {
5
  int i:1;
6
};
7
struct foo2 {
8
  unsigned i:1;
9
};
10
 
11
int test1 (struct foo1 *x)
12
{
13
  if (x->i == 0)
14
    return 1;
15
  else if (x->i == -1)
16
    return 1;
17
  return 0;
18
}
19
 
20
int test2 (struct foo2 *x)
21
{
22
  if (x->i == 0)
23
    return 1;
24
  else if (x->i == -1)
25
    return 1;
26
  return 0;
27
}
28
 
29
int test3 (struct foo1 *x)
30
{
31
  if (x->i == 0)
32
    return 1;
33
  else if (x->i == 1)
34
    return 1;
35
  return 0;
36
}
37
 
38
int test4 (struct foo2 *x)
39
{
40
  if (x->i == 0)
41
    return 1;
42
  else if (x->i == 1)
43
    return 1;
44
  return 0;
45
}
46
 
47
/* { dg-final { scan-tree-dump-times "Folding" 4 "vrp1" { xfail *-*-* } } } */
48
/* { 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.