repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* ru.po: Update.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wunused-var-7.C
blob
cf1b605c9aea90e71bb909ea47f61e0cc8af5e81
1
// { dg-do compile }
2
// { dg-options "-Wunused" }
3
4
template <int N>
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 <int N>
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 <int N>
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
}