summaryrefslogtreecommitdiffstats
path: root/misc/cgo/test/testdata/issue29563/weak1.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/test/testdata/issue29563/weak1.c')
-rw-r--r--misc/cgo/test/testdata/issue29563/weak1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/cgo/test/testdata/issue29563/weak1.c b/misc/cgo/test/testdata/issue29563/weak1.c
new file mode 100644
index 0000000..86a2273
--- /dev/null
+++ b/misc/cgo/test/testdata/issue29563/weak1.c
@@ -0,0 +1,11 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+extern int weaksym __attribute__((__weak__));
+int weaksym = 42;
+
+int foo1()
+{
+ return weaksym;
+}