summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wunused-var-12.c
blob: 94e56d8a8a798b012309f076712093142b31d2c5 (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
/* PR c++/44780 */
/* { dg-do compile } */
/* { dg-options "-Wunused" } */
/* { dg-options "-Wunused -fno-common" { target { { hppa*-*-hpux* } && { ! hppa*64*-*-* } } } } */

typedef double vec __attribute__ ((__vector_size__ (16)));
vec c, d;

void
foo (void)
{
  vec a;
  vec b;
  a = c;
  b = a;
  d = b;
}

void
bar (void)
{
  vec a;
  vec b;	/* { dg-warning "set but not used" } */
  a = c;
  b = a;
}