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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr42363.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR middle-end/pr42363, extended from the test for PR middle-end/37913.  */
2
/* { dg-do compile } */
3
/* { dg-options "-g" } */
4
 
5
void foo (void) __attribute__ ((noreturn));
6
 
7
static int __attribute__ ((noreturn))
8
bar (void)
9
{
10
  foo ();
11
}
12
 
13
int
14
baz (void)
15
{
16
  int i = bar ();
17
  return i + 1;
18
}
19
 
20
int fooz (void) __attribute__ ((noreturn));
21
 
22
static int __attribute__ ((noreturn))
23
bart (void)
24
{
25
  return fooz (); /* { dg-warning "noreturn" } */
26
}
27
 
28
int bazr (void)
29
{
30
  int i = bart ();
31
  return i + 1;
32
}
33
 
34
static inline int
35
bard (void)
36
{
37
  return fooz ();
38
}
39
 
40
int bizr (void)
41
{
42
  int i, j;
43
 
44
  i = j = bard ();
45
 
46
  return i + 1;
47
}
48
 
49
/* This might be regarded as pure and folded, rather than inlined.
50
   It's pure evil.  */
51
static int __attribute__ ((pure, const, noreturn))
52
barf (void)
53
{
54
} /* { dg-warning "does return" } */
55
 
56
static int __attribute__ ((pure, const))
57
bark (void)
58
{
59
  barf ();
60
}
61
 
62
int buzr (void)
63
{
64
  int i, j;
65
 
66
  i = j = bark () + bark ();
67
 
68
  return i + 1;
69
}
70
 
71
int buzt (void)
72
{
73
  int i, j;
74
 
75
  i = j = barf () + barf ();
76
 
77
  return i + 1;
78
}
79
 
80
void bust (void)
81
{
82
  while (barf ())
83
    ;
84
}

powered by: WebSVN 2.1.0

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