diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/visibility-5.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/visibility-5.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/visibility-5.c b/gcc/testsuite/gcc.dg/visibility-5.c new file mode 100644 index 000000000..0302768c9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/visibility-5.c @@ -0,0 +1,12 @@ +/* Test visibility attribute on definition of a function that has + already had a forward declaration. */ +/* { dg-do compile } */ +/* { dg-require-visibility "" } */ +/* { dg-final { scan-hidden "foo" } } */ + +void foo(); + +void + __attribute__((visibility ("hidden"))) +foo() +{ } |