[Bug ipa/68148] Devirtualization only applies to last of multiple successive calls
jgreenhalgh at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 18 17:10:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68148
James Greenhalgh <jgreenhalgh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jgreenhalgh at gcc dot gnu.org
--- Comment #6 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> ---
This fix also fixed an ICE on ARM targets:
bug.cpp:23:1: internal compiler error: in get_untransformed_body, at
cgraph.c:3311
}
^
0x8dc245 cgraph_node::get_untransformed_body()
.../gcc/cgraph.c:3311
0x8e79bd cgraph_node::expand()
.../gcc/cgraphunit.c:1941
0x8e9413 expand_all_functions
.../gcc/cgraphunit.c:2107
0x8e9413 symbol_table::compile()
...gcc/cgraphunit.c:2463
0x8eb56f symbol_table::finalize_compilation_unit()
.../gcc/cgraphunit.c:2553
The testcase for that looked like:
class B
{
public:
virtual void a (int *x) = 0;
virtual void b (int *x) = 0;
};
class Mouseintdapter : public virtual B
{
void a (int *x) {}
void b (int *x) {}
};
B* collection;
void foo (int *x)
{
collection->a(x);
}
void bar (int *x)
{
collection->b(x);
}
And would fail at -O2 for most ARM target flag combinations I tried.
More information about the Gcc-bugs
mailing list