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/cgraphbuild.c | |
parent | 91f2fae8cc58e1b1dae3b62e2407903190ed1af4 (diff) | |
download | gcc-0038d4e09077594de90e1b1a53e5ff8e76cd735d.tar.gz |
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/cgraphbuild.c')
-rw-r--r-- | gcc/cgraphbuild.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index 6b8116a612a..3948cf62802 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -53,6 +53,12 @@ record_reference (tree *tp, int *walk_subtrees, void *data) tree decl; struct record_reference_ctx *ctx = (struct record_reference_ctx *)data; + t = canonicalize_constructor_val (t); + if (!t) + t = *tp; + else if (t != *tp) + *tp = t; + switch (TREE_CODE (t)) { case VAR_DECL: |