gcc/testsuite/c-c++-common/Wunused-var-16.c
raw| 1 | /* PR c++/78949 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-Wunused -fdump-tree-optimized" } */ |
| 4 | /* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */ |
| 5 | |
| 6 | typedef unsigned char V __attribute__((vector_size(16))); |
| 7 | V v; |
| 8 | |
| 9 | void |
| 10 | foo () |
| 11 | { |
| 12 | V y = {}; |
| 13 | V x = {}; // { dg-bogus "set but not used" } |
| 14 | y &= ~x; |
| 15 | v = y; |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-tree-dump-not " ~0" "optimized" } } */ |