This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/69630] [6 Regression] LTO ICE in types_same_for_odr at ipa-devirt.c:402
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Feb 2016 12:31:26 +0000
- Subject: [Bug lto/69630] [6 Regression] LTO ICE in types_same_for_odr at ipa-devirt.c:402
- Auto-submitted: auto-generated
- References: <bug-69630-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69630
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #5)
> URL: https://gcc.gnu.org/viewcvs?rev=233711&root=gcc&view=rev
> Log:
> PR ipa/69630
> * ipa-devirt.c (possible_polymorphic_call_targets): Do not ICE
> on builtin_unreachable.
This does not fix the problem of the test case of comment 1. The committed
patch (comment 5) has added:
@@ -3181,6 +3181,7 @@ possible_polymorphic_call_targets (tree otr_type,
{
if (complete
&& nodes.length () == 1
+ && TREE_CODE (TREE_TYPE (nodes[0]->decl)) == METHOD_TYPE
&& warn_suggest_final_types
&& !outer_type->derived_types.length ())
Which doesn't prevent the ICE. The patch in comment 3 works - and has added the
following. (Cf. line numbers and last lines of the patches):
@@ -3197,6 +3198,7 @@
if (complete
&& warn_suggest_final_methods
&& nodes.length () == 1
+ && TREE_CODE (TREE_TYPE (nodes[0]->decl)) == METHOD_TYPE
&& types_same_for_odr (DECL_CONTEXT (nodes[0]->decl),
outer_type->type))