From 4be4cd6dd7c87b0180f277432874bd21d6d9780d Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 26 Aug 2010 14:20:45 +0000 Subject: [PATCH] re PR tree-optimization/45255 (internal compiler error: verify_stmts failed with -fwhopr) 2010-08-26 Richard Guenther PR tree-optimization/45255 * tree.c (decl_address_invariant_p): DECL_DLLIMPORT_P statics and externals are also invariant. From-SVN: r163565 --- gcc/ChangeLog | 6 ++++++ gcc/tree.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0cdd6aaba952..164bd56b48b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-08-26 Richard Guenther + + PR tree-optimization/45255 + * tree.c (decl_address_invariant_p): DECL_DLLIMPORT_P + statics and externals are also invariant. + 2010-08-25 Jakub Jelinek PR rtl-optimization/44858 diff --git a/gcc/tree.c b/gcc/tree.c index 4ad2f5b12357..a767230d1c85 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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) -- 2.47.2