diff mbox

Fix PR45255

Message ID alpine.LNX.2.00.1008261617410.28912@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Aug. 26, 2010, 2:19 p.m. UTC
As noted by several people the DECL_DLLIMPORT_P test in
decl_address_invariant_p does not make much sense.

Bootstrapped and tested on x86_64-unknown-linux-gnu, the bug audit
trail says also tested on Windows 7 x64 multi-lib native.

Committed.

Richard.

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.
diff mbox

Patch

Index: gcc/tree.c
===================================================================
--- gcc/tree.c	(revision 163562)
+++ gcc/tree.c	(working copy)
@@ -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)