From: Jakub Jelinek Date: Mon, 9 Mar 2015 20:19:34 +0000 (+0100) Subject: re PR lto/65361 (LTO: tree check: expected tree that contains ‘decl minimal’ structur... X-Git-Tag: releases/gcc-5.1.0~539 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9112885a6da43eef107fa3ac6262abbb9d5e1717;p=thirdparty%2Fgcc.git re PR lto/65361 (LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509) PR lto/65361 * ipa-devirt.c (add_type_duplicate): Don't use DECL_CONTEXT on a TREE_BINFO, instead use BINFO_TYPE. From-SVN: r221286 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a45e282f823b..968cb9037d73 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-03-09 Jakub Jelinek + + PR lto/65361 + * ipa-devirt.c (add_type_duplicate): Don't use DECL_CONTEXT + on a TREE_BINFO, instead use BINFO_TYPE. + 2015-03-09 Richard Biener PR middle-end/65270 diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index a3feb8823ca2..c9d153c1b99c 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -1505,9 +1505,9 @@ add_type_duplicate (odr_type val, tree type) extra_base = BINFO_BASE_BINFO (TYPE_BINFO (val->type), BINFO_N_BASE_BINFOS (TYPE_BINFO (type))); - inform (DECL_SOURCE_LOCATION - (TYPE_NAME (DECL_CONTEXT (extra_base))), - "the extra base is defined here "); + tree extra_base_type = BINFO_TYPE (extra_base); + inform (DECL_SOURCE_LOCATION (TYPE_NAME (extra_base_type)), + "the extra base is defined here"); } base_mismatch = true; }