summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-19.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/visibility-19.c')
-rw-r--r--gcc/testsuite/gcc.dg/visibility-19.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/visibility-19.c b/gcc/testsuite/gcc.dg/visibility-19.c
new file mode 100644
index 00000000000..3c2455fb291
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/visibility-19.c
@@ -0,0 +1,9 @@
+/* Test that accessed external functions are marked. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
+/* { dg-require-visibility "" } */
+/* { dg-final { scan-hidden "foo" } } */
+
+extern void foo(void) __attribute__ ((visibility ("hidden")));
+typedef void (*foo_t)(void);
+foo_t test = foo;