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/] [pr18133-2.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O1 -fdump-tree-optimized-blocks" } */
3
 
4
int c, d;
5
 
6
int
7
bar (int a)
8
{
9
  void *p;
10
  int b;
11
 
12
  if (a!=0)
13
    {
14
      b = 3;
15
      p = &&L0;
16
    }
17
  else
18
    {
19
      b = 5;
20
      p = &&L1;
21
    }
22
 
23
  goto *p;
24
 
25
 L0:
26
  c = b;
27
  return 1;
28
 
29
 L1:
30
  d = b;
31
  return 0;
32
}
33
 
34
/* The both paths to the block containing the goto *p should
35
   have been threaded, thus eliminating the need for the goto *p.  */
36
 
37
/* { dg-final { scan-tree-dump-times "goto p" 0 "optimized" } } */
38
 
39
/* There should not be any abnormal edges as DOM removed the
40
   computed goto.  */
41
 
42
/* { dg-final { scan-tree-dump-times "ab" 0 "optimized" } } */
43
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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