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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [c-c++-common/] [Wunused-var-9.c] - Blame information for rev 686

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 686 jeremybenn
/* { dg-options "-Wunused" } */
2
/* { dg-do compile } */
3
 
4
int f1 (int *, int);
5
int f2 (int *);
6
int f3 (int *);
7
 
8
int
9
f4 (int x)
10
{
11
  int a, n = 0;
12
  int b;
13
  for (a = f1 (&b, x); f2 (&b); (void) (a = f3 (&b)))
14
    n++;
15
  return n;
16
}
17
 
18
void
19
f5 (int x)
20
{
21
  int a;
22
  a = x;
23
  (void) (a = x);
24
}
25
 
26
void
27
f6 (int x)
28
{
29
  int a;        /* { dg-warning "set but not used" } */
30
  a = x;
31
}
32
 
33
void
34
f7 (int x)
35
{
36
  int a;
37
  ({ a = x; });
38
}
39
 
40
int
41
f8 (int x)
42
{
43
  int a;
44
  int b = ({ a = x; });
45
  return b;
46
}
47
 
48
int v;
49
 
50
void
51
f9 (int x)
52
{
53
  int a;
54
  ({ v++, a = x; });
55
}
56
 
57
int
58
f10 (int x)
59
{
60
  int a;
61
  int b = ({ v++, a = x; });
62
  return b;
63
}
64
 
65
void
66
f11 (int x)
67
{
68
  int a;
69
  a = x;
70
  ({ v++, a; });
71
}
72
 
73
int
74
f12 (int x)
75
{
76
  int a;
77
  a = x;
78
  int b = ({ v++, a; });
79
  return b;
80
}

powered by: WebSVN 2.1.0

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