diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/gnu-inline-class-static.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/gnu-inline-class-static.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/gnu-inline-class-static.C b/gcc/testsuite/g++.dg/ext/gnu-inline-class-static.C new file mode 100644 index 000000000..f22a23c0b --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/gnu-inline-class-static.C @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ // such that static functions are optimized out +/* { dg-final { scan-assembler "func1" } } */ +/* { dg-final { scan-assembler "func2" } } */ +/* { dg-final { scan-assembler-not "func3" } } */ +/* { dg-final { scan-assembler "func4" } } */ +/* { dg-final { scan-assembler "func5" } } */ + +#undef IN_CLASS +#define IN_CLASS gnu_test_static + +struct IN_CLASS { + static int func1(void); + static int func2(void); + static int func3(void); + static int func4(void); + static int func5(void); +}; + +#include "gnu-inline-global.C" |