aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2011-04-03 11:13:09 +0000
committerMichael Matz <matz@gcc.gnu.org>2011-04-03 11:13:09 +0000
commit0038d4e09077594de90e1b1a53e5ff8e76cd735d (patch)
treecffddfa016b791b26c7af434581e9984b8129eea /gcc/cgraphunit.c
parent91f2fae8cc58e1b1dae3b62e2407903190ed1af4 (diff)
downloadgcc-0038d4e09077594de90e1b1a53e5ff8e76cd735d.zip
gcc-0038d4e09077594de90e1b1a53e5ff8e76cd735d.tar.gz
gcc-0038d4e09077594de90e1b1a53e5ff8e76cd735d.tar.bz2
cgraphbuild.c (record_reference): Canonicalize constructor values.
* 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. From-SVN: r171903
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 c397fe5..93d5c06 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. */