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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [iftrap-1.c] - Blame information for rev 859

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

Line No. Rev Author Line
1 297 jeremybenn
/* Verify that ifcvt doesn't crash under a number of interesting conditions. */
2
 
3
void f1(int p)
4
{
5
  if (p)
6
    __builtin_trap();
7
}
8
 
9
void f2(int p)
10
{
11
  if (p)
12
    __builtin_trap();
13
  else
14
    bar();
15
}
16
 
17
void f3(int p)
18
{
19
  if (p)
20
    bar();
21
  else
22
    __builtin_trap();
23
}
24
 
25
void f4(int p, int q)
26
{
27
  if (p)
28
    {
29
      bar();
30
      if (q)
31
        bar();
32
    }
33
  else
34
    __builtin_trap();
35
}
36
 
37
void f5(int p)
38
{
39
  if (p)
40
    __builtin_trap();
41
  else
42
    abort();
43
}
44
 
45
void f6(int p)
46
{
47
  if (p)
48
    abort();
49
  else
50
    __builtin_trap();
51
}
52
 
53
void f7(int p)
54
{
55
  if (p)
56
    __builtin_trap();
57
  else
58
    __builtin_trap();
59
}
60
 
61
void f8(int p)
62
{
63
  if (p)
64
    __builtin_trap();
65
  else
66
    {
67
      bar();
68
      __builtin_trap();
69
    }
70
}
71
 
72
void f9(int p)
73
{
74
  if (p)
75
    {
76
      bar();
77
      __builtin_trap();
78
    }
79
  else
80
    __builtin_trap();
81
}
82
 
83
void f10(int p)
84
{
85
  if (p)
86
    __builtin_trap();
87
  while (1)
88
    bar();
89
}
90
 
91
void f11(int p)
92
{
93
  if (p)
94
    __builtin_trap();
95
  else
96
    bar();
97
  while (1)
98
    baz();
99
}

powered by: WebSVN 2.1.0

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