diff options
author | Michael Matz <matz@suse.de> | 2011-04-03 11:13:09 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2011-04-03 11:13:09 +0000 |
commit | 0038d4e09077594de90e1b1a53e5ff8e76cd735d (patch) | |
tree | cffddfa016b791b26c7af434581e9984b8129eea /gcc/cgraphunit.c | |
parent | 91f2fae8cc58e1b1dae3b62e2407903190ed1af4 (diff) | |
download | gcc-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.c | 5 |
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. */ |