diff options
author | Frank Ch. Eigler <fche@redhat.com> | 2004-07-15 17:33:23 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@gcc.gnu.org> | 2004-07-15 17:33:23 +0000 |
commit | 429b4470bd94c9a894fa65b83fc80254cfee4e7e (patch) | |
tree | a5d315056bd01107b9dfac4bb19280ac29db5640 /libmudflap | |
parent | 35b6fdcfc2ea1cc14b04038dadae2a52792ea5eb (diff) | |
download | gcc-429b4470bd94c9a894fa65b83fc80254cfee4e7e.tar.gz |
* Fix for g++/15861
2004-07-15 Frank Ch. Eigler <fche@redhat.com>
g++/15861
* mf-runtime.c (__mf_init): Make it non-static. Tolerate
repeated invocation.
From-SVN: r84761
Diffstat (limited to 'libmudflap')
-rw-r--r-- | libmudflap/ChangeLog | 6 | ||||
-rw-r--r-- | libmudflap/mf-runtime.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 804359a0036..60fbf2edede 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,9 @@ +2004-07-15 Frank Ch. Eigler <fche@redhat.com> + + g++/15861 + * mf-runtime.c (__mf_init): Make it non-static. Tolerate + repeated invocation. + 2004-07-09 Frank Ch. Eigler <fche@redhat.com> Test case for g++/15861 diff --git a/libmudflap/mf-runtime.c b/libmudflap/mf-runtime.c index f1cd0a22db7..332b9c2eebf 100644 --- a/libmudflap/mf-runtime.c +++ b/libmudflap/mf-runtime.c @@ -206,7 +206,7 @@ static __mf_object_t *__mf_object_cemetary[__MF_TYPE_MAX_CEM+1][__MF_PERSIST_MAX /* ------------------------------------------------------------------------ */ /* Forward function declarations */ -static void __mf_init () CTOR; +void __mf_init () CTOR; static void __mf_sigusr1_respond (); static unsigned __mf_find_objects (uintptr_t ptr_low, uintptr_t ptr_high, __mf_object_t **objs, unsigned max_objs); @@ -615,11 +615,15 @@ __mf_object_tree (int type) } -void +/* not static */void __mf_init () { char *ov = 0; + /* Return if initialization has already been done. */ + if (LIKELY (__mf_starting_p == 0)) + return; + /* This initial bootstrap phase requires that __mf_starting_p = 1. */ #ifdef PIC __mf_resolve_dynamics (); |