diff options
author | Bruce Evans <bde@FreeBSD.org> | 2006-10-25 07:29:22 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 2006-10-25 07:29:22 +0000 |
commit | 11e27303d36c30c547a91978ffc9795c814c0072 (patch) | |
tree | b40725647e961bf280510cc5635237d9f2d19704 /contrib/gcc | |
parent | 7c24ae418a1bb9b7057b4546d04751a414934ce1 (diff) | |
download | src-11e27303d36c30c547a91978ffc9795c814c0072.tar.gz src-11e27303d36c30c547a91978ffc9795c814c0072.zip |
Fixed -mprofiler-epilogue. The garbage collector apparently doesn't
understand that non-local variables can never be collected, and when
it collected the static variable for mexitcount_libfunc, gcc aborted
on the next use of this variable.
This quick fix is to reinitialize the variable on every use and depend
on garbage collection recovering the small amount of memory wasted by
this, and not worry by the small amount of time wasted by this. It
would be better to initialize the variable together with most of the
other libfuncs in optabs.c and depend on whatever magic is there to
prevent its collection, but we initialize it here to avoid taking at
least 2 more files off the vendor branch.
Notes
Notes:
svn path=/head/; revision=163679
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/function.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c index 4ff8f6a1d015..8679729412ab 100644 --- a/contrib/gcc/function.c +++ b/contrib/gcc/function.c @@ -7129,7 +7129,9 @@ expand_function_end (void) if (!initialized) { mexitcount_libfunc = init_one_libfunc (".mexitcount"); +#if 0 /* Turn this off to prevent erroneous garbage collection. */ initialized = 1; +#endif } emit_library_call (mexitcount_libfunc, LCT_NORMAL, VOIDmode, 0); } |