From 9112885a6da43eef107fa3ac6262abbb9d5e1717 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 9 Mar 2015 21:19:34 +0100 Subject: [PATCH] =?utf8?q?re=20PR=20lto/65361=20(LTO:=20tree=20check:=20ex?= =?utf8?q?pected=20tree=20that=20contains=20=E2=80=98decl=20minimal?= =?utf8?q?=E2=80=99=20structure,=20have=20=E2=80=98tree=5Fbinfo=E2=80=99?= =?utf8?q?=20in=20add=5Ftype=5Fduplicate,=20at=20ipa-devirt.c:1509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-devirt.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a45e282f823..968cb9037d7 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 a3feb8823ca..c9d153c1b99 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; } -- 2.30.2