aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoe Soroka <gits@joesoroka.com>2011-03-07 00:25:27 -0800
committerJoe Soroka <gits@joesoroka.com>2011-03-07 00:25:27 -0800
commit0f0c2d9c02d357c247f7310908124c39b8625d35 (patch)
tree66b499cd032abe24607dd078ae94a8d5457ef91c /tests
parent38cbb40e904f3113ae117278fbbcda0f71f18c92 (diff)
downloadtinycc-0f0c2d9c02d357c247f7310908124c39b8625d35.tar.gz
tinycc-0f0c2d9c02d357c247f7310908124c39b8625d35.tar.bz2
weak redefinition of a symbol should weaken the original
Diffstat (limited to 'tests')
-rw-r--r--tests/tcctest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c
index bd1b975..fc2b9ed 100644
--- a/tests/tcctest.c
+++ b/tests/tcctest.c
@@ -2370,6 +2370,10 @@ extern __typeof(dummy) weak_dummy1 __attribute__((weak, alias("dummy")));
extern __typeof(dummy) __attribute__((weak, alias("dummy"))) weak_dummy2;
extern __attribute__((weak, alias("dummy"))) __typeof(dummy) weak_dummy3;
+int some_lib_func(void);
+int dummy_impl_of_slf(void) { return 444; }
+int some_lib_func(void) __attribute__((weak, alias("dummy_impl_of_slf")));
+
void __attribute__((weak)) weak_test(void)
{
printf("weak_f1=%d\n", weak_f1 ? weak_f1() : 123);