re PR lto/65361 (LTO: tree check: expected tree that contains ‘decl minimal’ structur...
authorJakub Jelinek <jakub@redhat.com>
Mon, 9 Mar 2015 20:19:34 +0000 (21:19 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 9 Mar 2015 20:19:34 +0000 (21:19 +0100)
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
gcc/ipa-devirt.c

index a45e282f823bcb312c8382af64452f963f1b4c3d..968cb9037d73446ae7ff7e1b27d83126b6d05171 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-09  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <rguenther@suse.de>
 
        PR middle-end/65270
index a3feb8823ca26c6a7abe3ecd10d9e24703e6c0be..c9d153c1b99c2e3456b64fb7125e05e9d976119d 100644 (file)
@@ -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;
        }