view gcc/testsuite/c-c++-common/Wunused-var-12.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR c++/44780 */
/* { dg-do compile } */
/* { dg-options "-Wunused" } */
/* { dg-additional-options "-fno-common" { target { { hppa*-*-hpux* } && { ! lp64 } } } } */

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;
}