aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2005-01-03 23:26:54 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2005-01-03 23:26:54 +0000
commitd7001ae593744a2243c7674cae610f645ab18252 (patch)
tree715b198064e6dd14dd879b254826896000dafdf4 /gcc/testsuite
parenta035080cbcedd9c8c595f9fa336f4fcd140eb296 (diff)
downloadgcc-d7001ae593744a2243c7674cae610f645ab18252.zip
gcc-d7001ae593744a2243c7674cae610f645ab18252.tar.gz
gcc-d7001ae593744a2243c7674cae610f645ab18252.tar.bz2
darwin.c (darwin_handle_weak_import_attribute): Permit VAR_DECLs to have weak_import attribute.
2005-01-03 Geoffrey Keating <geoffk@apple.com> * config/darwin.c (darwin_handle_weak_import_attribute): Permit VAR_DECLs to have weak_import attribute. Index: testsuite/ChangeLog 2005-01-03 Geoffrey Keating <geoffk@apple.com> * gcc.dg/darwin-weakimport-1.c: Remove check for variables producing warning. * gcc.dg/darwin-weakimport-2.c: New. From-SVN: r92871
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/darwin-weakimport-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/darwin-weakimport-2.c14
3 files changed, 20 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 058df89..f74a542 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-03 Geoffrey Keating <geoffk@apple.com>
+
+ * gcc.dg/darwin-weakimport-1.c: Remove check for variables
+ producing warning.
+ * gcc.dg/darwin-weakimport-2.c: New.
+
2005-01-03 Richard Henderson <rth@redhat.com>
* g++.old-deja/g++.ext/attrib5.C: Move the alias after the referent.
diff --git a/gcc/testsuite/gcc.dg/darwin-weakimport-1.c b/gcc/testsuite/gcc.dg/darwin-weakimport-1.c
index c797720..e74ccc9 100644
--- a/gcc/testsuite/gcc.dg/darwin-weakimport-1.c
+++ b/gcc/testsuite/gcc.dg/darwin-weakimport-1.c
@@ -12,5 +12,3 @@ void b(void)
{
a();
}
-
-extern int c __attribute__((weak_import)); /* { dg-warning "ignored" } */
diff --git a/gcc/testsuite/gcc.dg/darwin-weakimport-2.c b/gcc/testsuite/gcc.dg/darwin-weakimport-2.c
new file mode 100644
index 0000000..1c80233
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/darwin-weakimport-2.c
@@ -0,0 +1,14 @@
+/* APPLE LOCAL file put in 4.1 */
+/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-require-weak "" } */
+
+/* { dg-final { scan-assembler "weak_reference _foo" } } */
+
+extern int foo __attribute__((weak_import));
+
+int main(void)
+{
+ if (&foo)
+ return foo;
+ return 0;
+}