diff options
author | Richard Biener <rguenther@suse.de> | 2015-09-24 11:01:14 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-09-24 11:01:14 +0000 |
commit | 760e1bb7e2d0dd045c8aac2320fd073eebe9e93d (patch) | |
tree | e014a72b390a0bcb4621b4fcdf7b3bf064f76429 /gcc | |
parent | 4dfe21acc2072b7dd35cd57ced94cf880b896158 (diff) | |
download | gcc-760e1bb7e2d0dd045c8aac2320fd073eebe9e93d.zip gcc-760e1bb7e2d0dd045c8aac2320fd073eebe9e93d.tar.gz gcc-760e1bb7e2d0dd045c8aac2320fd073eebe9e93d.tar.bz2 |
re PR lto/67699 (ICE (segfault) compiling a const array with -flto)
2015-09-24 Richard Biener <rguenther@suse.de>
PR lto/67699
* lto-cgraph.c (compute_ltrans_boundary): Do not stream
abstract origins.
* g++.dg/pr67699.C: New testcase.
From-SVN: r228084
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto-cgraph.c | 15 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/pr67699.C | 8 |
4 files changed, 19 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7bc8e91..ed7224f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-24 Richard Biener <rguenther@suse.de> + + PR lto/67699 + * lto-cgraph.c (compute_ltrans_boundary): Do not stream + abstract origins. + 2015-09-24 Thomas Schwinge <thomas@codesourcery.com> * tree-object-size.c (plus_stmt_object_size) diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index d70537d..51f31c8 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -895,14 +895,6 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder) add_node_to (encoder, node, true); lto_set_symtab_encoder_in_partition (encoder, node); create_references (encoder, node); - /* For proper debug info, we need to ship the origins, too. */ - if (DECL_ABSTRACT_ORIGIN (node->decl)) - { - struct cgraph_node *origin_node - = cgraph_node::get_create (DECL_ABSTRACT_ORIGIN (node->decl)); - origin_node->used_as_abstract_origin = true; - add_node_to (encoder, origin_node, true); - } } for (lsei = lsei_start_variable_in_partition (in_encoder); !lsei_end_p (lsei); lsei_next_variable_in_partition (&lsei)) @@ -914,13 +906,6 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder) lto_set_symtab_encoder_in_partition (encoder, vnode); lto_set_symtab_encoder_encode_initializer (encoder, vnode); create_references (encoder, vnode); - /* For proper debug info, we need to ship the origins, too. */ - if (DECL_ABSTRACT_ORIGIN (vnode->decl)) - { - varpool_node *origin_node - = varpool_node::get (DECL_ABSTRACT_ORIGIN (vnode->decl)); - lto_set_symtab_encoder_in_partition (encoder, origin_node); - } } /* Pickle in also the initializer of all referenced readonly variables to help folding. Constant pool variables are not shared, so we must diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fe4f67f..02dc902 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-09-24 Richard Biener <rguenther@suse.de> + + PR lto/67699 + * g++.dg/pr67699.C: New testcase. + 2015-09-24 Richard Earnshaw <rearnsha@arm.com> PR libgcc/67624 diff --git a/gcc/testsuite/g++.dg/pr67699.C b/gcc/testsuite/g++.dg/pr67699.C new file mode 100644 index 0000000..c9ff591 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr67699.C @@ -0,0 +1,8 @@ +// { dg-do compile } +// { dg-require-effective-target lto } +// { dg-options "-flto" } + +template <class T> class foo { + foo() { int const bar[2] = {1, 1}; } +}; +template class foo<int>; |