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-7.C] - Blame information for rev 749

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
template 
5
void
6
f1 (void)
7
{
8
  _Complex int a;       // { dg-warning "set but not used" }
9
  _Complex double b;    // { dg-warning "set but not used" }
10
  __real__ a = 1;
11
  __imag__ a = 2;
12
  __real__ b = 3.0;
13
  __imag__ b = 4.0;
14
}
15
 
16
template 
17
int
18
f2 (void)
19
{
20
  _Complex int a;
21
  _Complex double b;
22
  __real__ a = 1;
23
  __imag__ a = 2;
24
  __real__ b = 3.0;
25
  __imag__ b = 4.0;
26
  return __real__ a + __imag__ b;
27
}
28
 
29
template 
30
_Complex double
31
f3 (void)
32
{
33
  _Complex int a;
34
  _Complex double b;
35
  __real__ a = 1;
36
  __imag__ a = 2;
37
  __real__ b = 3.0;
38
  __imag__ b = 4.0;
39
  return a + b;
40
}
41
 
42
void
43
test ()
44
{
45
  f1<0> ();
46
  (void) f2<0> ();
47
  (void) f3<0> ();
48
}

powered by: WebSVN 2.1.0

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