Commit 5548ca35 by Jan Hubicka Committed by Jan Hubicka

re PR lto/50430 (Constructors of static external vars are throwed away leading…

re PR lto/50430 (Constructors of static external vars are throwed away leading to missed optimizations (and ipa-cp ICE).)

	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
parent 8549d9e1
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> 2011-09-15 Diego Novillo <dnovillo@google.com>
* Makefile.in (SYSROOT_CFLAGS_FOR_TARGET): Define from * Makefile.in (SYSROOT_CFLAGS_FOR_TARGET): Define from
...@@ -3048,7 +3048,8 @@ gimple_get_virt_method_for_binfo (HOST_WIDE_INT token, tree known_binfo) ...@@ -3048,7 +3048,8 @@ gimple_get_virt_method_for_binfo (HOST_WIDE_INT token, tree known_binfo)
if (TREE_CODE (v) != VAR_DECL if (TREE_CODE (v) != VAR_DECL
|| !DECL_VIRTUAL_P (v) || !DECL_VIRTUAL_P (v)
|| !DECL_INITIAL (v)) || !DECL_INITIAL (v)
|| DECL_INITIAL (v) == error_mark_node)
return NULL_TREE; return NULL_TREE;
gcc_checking_assert (TREE_CODE (TREE_TYPE (v)) == ARRAY_TYPE); gcc_checking_assert (TREE_CODE (TREE_TYPE (v)) == ARRAY_TYPE);
size = tree_low_cst (TYPE_SIZE (TREE_TYPE (TREE_TYPE (v))), 1); size = tree_low_cst (TYPE_SIZE (TREE_TYPE (TREE_TYPE (v))), 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment