diff options
author | Joseph Myers <jsm28@gcc.gnu.org> | 2004-11-29 18:54:06 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-11-29 18:54:06 +0000 |
commit | 86f029aa95092540cbd4e96f70371960b3a90e7f (patch) | |
tree | 09efe121e3a286e0aae7308c8245228e8c339428 /gcc/testsuite/g++.dg | |
parent | b0c2dee9fbfb3ca4b768c17f14afcb89086c0eae (diff) | |
download | gcc-86f029aa95092540cbd4e96f70371960b3a90e7f.zip gcc-86f029aa95092540cbd4e96f70371960b3a90e7f.tar.gz gcc-86f029aa95092540cbd4e96f70371960b3a90e7f.tar.bz2 |
[multiple changes]
2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
PR c/7544
* Makefile.in (c-lang.o): Update dependencies.
* c-lang.c: Include "c-pragma.h".
(finish_file): Call maybe_apply_pending_pragma_weaks.
* c-pragma.c (maybe_apply_pending_pragma_weaks): New function.
* c-pragma.h (maybe_apply_pending_pragma_weaks): New prototype.
cp:
2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
* Make-lang.in (cp/decl2.o): Update dependencies.
* decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
objc:
2004-11-29 Joseph Myers <joseph@codesourcery.com>
* Make-lang.in (objc/objc-act.o): Update dependencies.
* objc-act.c (objc_finish_file): Call
maybe_apply_pending_pragma_weaks if not OBJCPLUS.
testsuite:
2004-11-29 Joseph Myers <joseph@codesourcery.com>
* g++.dg/ext/weak1.C, gcc.dg/weak/weak-10.c, objc.dg/weak-1.m: New
tests.
From-SVN: r91479
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/weak1.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/weak1.C b/gcc/testsuite/g++.dg/ext/weak1.C new file mode 100644 index 0000000..b7a448f --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/weak1.C @@ -0,0 +1,13 @@ +// Test for #pragma weak where the weak alias symbol isn't declared, +// although the symbol it is an alias for is defined in the +// translation unit. Bug 7544. +// Origin: Joseph Myers <joseph@codesourcery.com> +// { dg-do compile } +// { dg-require-weak "" } +// { dg-require-alias "" } +// { dg-options "-fno-common" } + +// { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?bar1" } } + +#pragma weak bar1 = foo1 +extern "C" void foo1 (void) {} |