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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wunused-var-4.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wunused" } */
3
 
4
struct S { int e; };
5
 
6
int
7
f1 (void)
8
{
9
  int a;
10
  int b;
11
  int c;
12
  int d;
13
  S s;
14
  a = 1;
15
  b = 2;
16
  c = 3;
17
  d = 4;
18
  s.e = 5;
19
  __typeof (c) e;       // { dg-warning "set but not used" }
20
  __decltype (d) f;     // { dg-warning "set but not used" }
21
  __decltype (s.e) g;   // { dg-warning "set but not used" }
22
  e = 1;
23
  f = 1;
24
  g = 1;
25
  return sizeof (a) + __alignof__ (b);
26
}
27
 
28
template 
29
int f2 (void)
30
{
31
  int a;
32
  int b;
33
  int c;
34
  int d;
35
  a = 1;
36
  b = 2;
37
  c = 3;
38
  d = 4;
39
  __typeof (c) e;       // { dg-warning "set but not used" }
40
  __decltype (d) f;     // { dg-warning "set but not used" }
41
  e = 1;
42
  f = 1;
43
  return sizeof (a) + __alignof__ (b);
44
}
45
 
46
void
47
test (void)
48
{
49
  (void) f2<0> ();
50
}

powered by: WebSVN 2.1.0

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