diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-09-19 07:29:33 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-09-19 07:29:33 +0000 |
commit | 78c120b5675cd6619184d8909c4469fd44ec0135 (patch) | |
tree | 3cf9e45be25619caeb7d65106d53aa1746a2b569 /gcc/cp/decl.c | |
parent | 8bc603eeeb0d63506821723c859a4186e868d7c4 (diff) | |
download | gcc-78c120b5675cd6619184d8909c4469fd44ec0135.zip gcc-78c120b5675cd6619184d8909c4469fd44ec0135.tar.gz gcc-78c120b5675cd6619184d8909c4469fd44ec0135.tar.bz2 |
* decl.c (start_function): Robustify.
From-SVN: r36527
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 3b2a057..e016e33 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -13711,9 +13711,14 @@ start_function (declspecs, declarator, attrs, flags) current_function_decl = decl1; cfun->decl = decl1; - my_friendly_assert ((DECL_PENDING_INLINE_P (decl1) - || !DECL_SAVED_FUNCTION_DATA (decl1)), - 20000911); + /* If we are (erroneously) defining a function that we have already + defined before, wipe out what we knew before. */ + if (!DECL_PENDING_INLINE_P (decl1) + && DECL_SAVED_FUNCTION_DATA (decl1)) + { + free (DECL_SAVED_FUNCTION_DATA (decl1)); + DECL_SAVED_FUNCTION_DATA (decl1) = NULL; + } if (ctype && !doing_friend && !DECL_STATIC_FUNCTION_P (decl1)) { |