summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wunused-var-6.C
blob: 0fb8e5cac38f060a6243dcf57f668d7390b97d53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// { dg-do compile }
// { dg-options "-Wunused" }

template <int N>
int
f1 (void)
{
  int c = ({
    int a;
    a = 1;
    a; });
  return c;
}

template <int N>
void
f2 (void)
{
  int f;
  f = 0;
  __asm__ __volatile__ ("" : "+r" (f));
}

void
test ()
{
  (void) f1<0> ();
  f2<0> ();
}