re PR tree-optimization/45255 (internal compiler error: verify_stmts failed with -fwhopr)

2010-08-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45255
	* tree.c (decl_address_invariant_p): DECL_DLLIMPORT_P
	statics and externals are also invariant.

From-SVN: r163565
This commit is contained in:
Richard Guenther 2010-08-26 14:20:45 +00:00 committed by Richard Biener
parent 5423ab77ff
commit 4be4cd6dd7
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2010-08-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45255
* tree.c (decl_address_invariant_p): DECL_DLLIMPORT_P
statics and externals are also invariant.
2010-08-25 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/44858

View File

@ -2474,8 +2474,7 @@ decl_address_invariant_p (const_tree op)
return true;
case VAR_DECL:
if (((TREE_STATIC (op) || DECL_EXTERNAL (op))
&& !DECL_DLLIMPORT_P (op))
if ((TREE_STATIC (op) || DECL_EXTERNAL (op))
|| DECL_THREAD_LOCAL_P (op)
|| DECL_CONTEXT (op) == current_function_decl
|| decl_function_context (op) == current_function_decl)