]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/50430 (Constructors of static external vars are throwed away leading to...
authorJan Hubicka <jh@suse.cz>
Fri, 16 Sep 2011 14:40:06 +0000 (16:40 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 16 Sep 2011 14:40:06 +0000 (14:40 +0000)
PR lto/50430
* gimple-fold.c (gimple_get_virt_method_for_binfo): Do not ICE on
error_mark_node in the DECL_INITIAL of vtable.

From-SVN: r178908

gcc/ChangeLog
gcc/gimple-fold.c

index f2b39a54a551e7362e159cf539964c9b8b6c1ae2..469aeb3a188fcf29b7a72134a934195e3ed55a16 100644 (file)
@@ -1,3 +1,9 @@
+2011-09-15   Jan Hubicka  <jh@suse.cz>
+
+       PR lto/50430
+       * gimple-fold.c (gimple_get_virt_method_for_binfo): Do not ICE on
+       error_mark_node in the DECL_INITIAL of vtable.
+
 2011-09-15   Diego Novillo  <dnovillo@google.com>
 
        * Makefile.in (SYSROOT_CFLAGS_FOR_TARGET): Define from
index d8da030971443d9bfb2709417f44af64659214de..b481c4a5fa1a397d00167f0aaa866a46697ee0f9 100644 (file)
@@ -3048,7 +3048,8 @@ gimple_get_virt_method_for_binfo (HOST_WIDE_INT token, tree known_binfo)
 
   if (TREE_CODE (v) != VAR_DECL
       || !DECL_VIRTUAL_P (v)
-      || !DECL_INITIAL (v))
+      || !DECL_INITIAL (v)
+      || DECL_INITIAL (v) == error_mark_node)
     return NULL_TREE;
   gcc_checking_assert (TREE_CODE (TREE_TYPE (v)) == ARRAY_TYPE);
   size = tree_low_cst (TYPE_SIZE (TREE_TYPE (TREE_TYPE (v))), 1);