mirror of git://gcc.gnu.org/git/gcc.git
re PR lto/88130 (ICE in copy_function_or_variable, at lto-streamer-out.c:2315 since r260963)
PR lto/88130 * varpool.c (varpool_node::ctor_useable_for_folding_p): Also return false at WPA time when body was removed. * g++.dg/torture/pr88130.C: New testcase. From-SVN: r267515
This commit is contained in:
parent
0588e28824
commit
3b456f8da3
|
|
@ -1,3 +1,9 @@
|
||||||
|
2019-01-02 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
|
PR lto/88130
|
||||||
|
* varpool.c (varpool_node::ctor_useable_for_folding_p): Also return
|
||||||
|
false at WPA time when body was removed.
|
||||||
|
|
||||||
2019-01-02 Martin Liska <mliska@suse.cz>
|
2019-01-02 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
PR tree-optimization/88650
|
PR tree-optimization/88650
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2019-01-02 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
|
PR lto/88130
|
||||||
|
* g++.dg/torture/pr88130.C: New testcase.
|
||||||
|
|
||||||
2019-01-02 Martin Liska <mliska@suse.cz>
|
2019-01-02 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
PR tree-optimization/88650
|
PR tree-optimization/88650
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-flto" } */
|
||||||
|
/* { dg-require-effective-target lto } */
|
||||||
|
class a {
|
||||||
|
public:
|
||||||
|
static const long b = 1;
|
||||||
|
};
|
||||||
|
struct c {
|
||||||
|
enum d { e };
|
||||||
|
};
|
||||||
|
class C;
|
||||||
|
class f {
|
||||||
|
public:
|
||||||
|
f(c::d);
|
||||||
|
template <typename g> C operator<=(g);
|
||||||
|
};
|
||||||
|
class C {
|
||||||
|
public:
|
||||||
|
template <typename h> void operator!=(h &);
|
||||||
|
};
|
||||||
|
void i() {
|
||||||
|
f j(c::e);
|
||||||
|
try {
|
||||||
|
j <= 0 != a::b;
|
||||||
|
} catch (...) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -335,16 +335,16 @@ varpool_node::ctor_useable_for_folding_p (void)
|
||||||
if (TREE_THIS_VOLATILE (decl))
|
if (TREE_THIS_VOLATILE (decl))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/* Avoid attempts to load constructors that was not streamed. */
|
||||||
|
if (in_lto_p && DECL_INITIAL (real_node->decl) == error_mark_node
|
||||||
|
&& real_node->body_removed)
|
||||||
|
return false;
|
||||||
|
|
||||||
/* If we do not have a constructor, we can't use it. */
|
/* If we do not have a constructor, we can't use it. */
|
||||||
if (DECL_INITIAL (real_node->decl) == error_mark_node
|
if (DECL_INITIAL (real_node->decl) == error_mark_node
|
||||||
&& !real_node->lto_file_data)
|
&& !real_node->lto_file_data)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Avoid attempts to load constructors that was not streamed. */
|
|
||||||
if (flag_ltrans && DECL_INITIAL (real_node->decl) == error_mark_node
|
|
||||||
&& real_node->body_removed)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Vtables are defined by their types and must match no matter of interposition
|
/* Vtables are defined by their types and must match no matter of interposition
|
||||||
rules. */
|
rules. */
|
||||||
if (DECL_VIRTUAL_P (decl))
|
if (DECL_VIRTUAL_P (decl))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue