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/] [ssa-ccp-12.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
 
4
struct A
5
{
6
  int a;
7
  int b;
8
};
9
 
10
struct A a;
11
const int B = 42;
12
 
13
void foo (int i)
14
{
15
  if (i > 10)
16
    a.a = 42;
17
  else
18
    {
19
      a.b = 21;
20
      a.a = a.b + 21;
21
    }
22
 
23
  /* This should be folded to 'if (0)' as a.a and B are both 42.  */
24
  if (a.a != B)
25
    link_error ();
26
}
27
 
28
main ()
29
{
30
  foo (3);
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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