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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [920721-4.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
#ifndef NO_LABEL_VALUES
2
int try (int num) {
3
  __label__ lab1, lab2, lab3, lab4, lab5, lab6, default_lab;
4
 
5
  void *do_switch (int num) {
6
    switch(num) {
7
    case 1:
8
      return &&lab1;
9
    case 2:
10
      return &&lab2;
11
    case 3:
12
      return &&lab3;
13
    case 4:
14
      return &&lab4;
15
    case 5:
16
      return &&lab5;
17
    case 6:
18
      return &&lab6;
19
    default:
20
      return &&default_lab;
21
    }
22
  }
23
 
24
  goto *do_switch (num);
25
 
26
 lab1:
27
  return 1;
28
 
29
 lab2:
30
  return 2;
31
 
32
 lab3:
33
  return 3;
34
 
35
 lab4:
36
  return 4;
37
 
38
 lab5:
39
  return 5;
40
 
41
 lab6:
42
  return 6;
43
 
44
 default_lab:
45
  return -1;
46
}
47
 
48
main()
49
{
50
  int i;
51
  for (i = 1; i <= 6; i++)
52
    {
53
      if (try (i) != i)
54
        abort();
55
    }
56
  exit(0);
57
}
58
#else
59
main(){ exit (0); }
60
#endif

powered by: WebSVN 2.1.0

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