summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/weak/weak-13.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/weak/weak-13.c')
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-13.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/weak/weak-13.c b/gcc/testsuite/gcc.dg/weak/weak-13.c
new file mode 100644
index 000000000..15106a534
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/weak/weak-13.c
@@ -0,0 +1,13 @@
+/* Test for weak aliases with multiple declarations. Sun assembler
+ rejects multiple weak alias definitions in the output. */
+/* { dg-do assemble } */
+/* { dg-require-weak "" } */
+/* { dg-require-alias "" } */
+/* { dg-options "" } */
+
+#pragma weak foo = _foo
+
+extern int foo;
+extern int foo;
+
+int _foo = 4;