diff options
author | Richard Guenther <rguenther@suse.de> | 2009-07-17 17:41:38 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2009-07-17 17:41:38 +0000 |
commit | 4ab2f1b811f322b0f220763db3f58c14b72f46ae (patch) | |
tree | 327055aa02899373874cfa106f1d4254e18ab455 | |
parent | 79a1ed1378f4c10c2b138058fc29b44d03ab967e (diff) |
2009-07-17 Richard Guenther <rguenther@suse.de>
PR lto/40765
* lto-symtab.c (lto_symtab_merge_decl): Merge TREE_ADDRESSABLE
state.
* gcc.dg/lto/20090717_0.c: New testcase.
* gcc.dg/lto/20090717_1.c: Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@149753 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.lto | 6 | ||||
-rw-r--r-- | gcc/lto-symtab.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog.lto | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/20090717_0.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/20090717_1.c | 11 |
5 files changed, 30 insertions, 0 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto index 9e606403510..1d5483d3434 100644 --- a/gcc/ChangeLog.lto +++ b/gcc/ChangeLog.lto @@ -1,5 +1,11 @@ 2009-07-17 Richard Guenther <rguenther@suse.de> + PR lto/40765 + * lto-symtab.c (lto_symtab_merge_decl): Merge TREE_ADDRESSABLE + state. + +2009-07-17 Richard Guenther <rguenther@suse.de> + * gimple.c (struct sccs): New structure for the SCC finding state. (next_dfs_num): New static global. (visit): New helper function for iterative_hash_gimple_type. diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 5d0d7b17c94..749ec87c2f2 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -572,6 +572,9 @@ lto_symtab_merge_decl (tree new_decl, if (!lto_symtab_compatible (old_decl, new_decl)) return; + /* Merge decl state. */ + TREE_ADDRESSABLE (old_decl) |= TREE_ADDRESSABLE (new_decl); + old_resolution = lto_symtab_get_resolution (old_decl); gcc_assert (resolution != LDPR_UNKNOWN && resolution != LDPR_UNDEF diff --git a/gcc/testsuite/ChangeLog.lto b/gcc/testsuite/ChangeLog.lto index a001b25796a..388b8c40c83 100644 --- a/gcc/testsuite/ChangeLog.lto +++ b/gcc/testsuite/ChangeLog.lto @@ -1,3 +1,9 @@ +2009-07-17 Richard Guenther <rguenther@suse.de> + + PR lto/40765 + * gcc.dg/lto/20090717_0.c: New testcase. + * gcc.dg/lto/20090717_1.c: Likewise. + 2009-07-15 Ben Elliston <bje@au.ibm.com> PR lto/40725 diff --git a/gcc/testsuite/gcc.dg/lto/20090717_0.c b/gcc/testsuite/gcc.dg/lto/20090717_0.c new file mode 100644 index 00000000000..fe13bdf78d4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20090717_0.c @@ -0,0 +1,4 @@ +struct variable { + const char *string; +}; +struct variable table[] = { }; diff --git a/gcc/testsuite/gcc.dg/lto/20090717_1.c b/gcc/testsuite/gcc.dg/lto/20090717_1.c new file mode 100644 index 00000000000..bda8138214b --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20090717_1.c @@ -0,0 +1,11 @@ +struct variable { + const char *string; +}; +extern struct variable table[]; +int main(int argc, char *argv[]) +{ + struct variable *p; + for(p = table; p->string; p++) + ; + return 0; +} |