aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-03 11:13:09 +0000
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-03 11:13:09 +0000
commitbb903e9c84ce730268cc488d5d3b71821e2c13a2 (patch)
treecffddfa016b791b26c7af434581e9984b8129eea /gcc/cgraphunit.c
parente7e718d0e3388209a0ddc92dc0e91baf547dd262 (diff)
* cgraphbuild.c (record_reference): Canonicalize constructor
values. * gimple-fold.c (canonicalize_constructor_val): Accept being called without function context. * cgraphunit.c (cgraph_finalize_compilation_unit): Clear current_function_decl and cfun. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index c397fe53f6c..93d5c06ce97 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1066,6 +1066,11 @@ cgraph_finalize_compilation_unit (void)
{
timevar_push (TV_CGRAPH);
+ /* If we're here there's no current function anymore. Some frontends
+ are lazy in clearing these. */
+ current_function_decl = NULL;
+ set_cfun (NULL);
+
/* Do not skip analyzing the functions if there were errors, we
miss diagnostics for following functions otherwise. */