diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/Wunused-var-2.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/Wunused-var-2.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/Wunused-var-2.c b/gcc/testsuite/c-c++-common/Wunused-var-2.c new file mode 100644 index 0000000..2818259 --- /dev/null +++ b/gcc/testsuite/c-c++-common/Wunused-var-2.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-Wunused" } */ + +int +f1 (void) +{ + int c = ({ + int a; + a = 1; + a; }); + return c; +} + +void +f2 (void) +{ + int f; + f = 0; + __asm__ __volatile__ ("" : "+r" (f)); +} |