OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr18628.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O2" } */
3
 
4
/* PR middle-end/18628 exposed a problem in which cse folded a load
5
   from a jump table into the label that was the target of the branch.
6
   Unfortunately, the indirect jump was moved to a different basic
7
   block, and the LABEL_REF copied to the register wasn't enough to
8
   keep the cfg from optimizing the otherwise-unused label away.  So
9
   we ended up with a dangling reference to the label.  */
10
 
11
int i;
12
 
13
int main()
14
{
15
  for (;;)
16
  {
17
    switch (i)
18
    {
19
      case 0:
20
      case 1:
21
        return 1;
22
 
23
      case 2:
24
      case 3:
25
        return 0;
26
 
27
      case 5:
28
        --i;
29
    }
30
  }
31
}

powered by: WebSVN 2.1.0

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