diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/unused-5.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/unused-5.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/unused-5.c b/gcc/testsuite/gcc.dg/unused-5.c new file mode 100644 index 000000000..5ccc3f3be --- /dev/null +++ b/gcc/testsuite/gcc.dg/unused-5.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-Wunused" } */ +/* { dg-final { scan-assembler "string_to_look_for" } } */ + +/* 'volatile' variables get output and don't produce a warning about being + unused. */ +static volatile char string[] + = "string_to_look_for"; /* { dg-bogus "not used" } */ |