This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR49596


This fixes the fallout of the IPA PTA patch.  The 
varpool_all_refs_explicit_p predicate does not properly give answers
for external variables.  Fixed as follows, pre-approved by Honza on IRC.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2011-07-01  Richard Guenther  <rguenther@suse.de>

	PR middle-end/49596
	* cgraph.h (varpool_all_refs_explicit_p): Not analyzed nodes
	may have unknown refs.

Index: gcc/cgraph.h
===================================================================
--- gcc/cgraph.h	(revision 175749)
+++ gcc/cgraph.h	(working copy)
@@ -947,7 +947,8 @@ varpool_can_remove_if_no_refs (struct va
 static inline bool
 varpool_all_refs_explicit_p (struct varpool_node *vnode)
 {
-  return (!vnode->externally_visible
+  return (vnode->analyzed
+	  && !vnode->externally_visible
 	  && !vnode->used_from_other_partition
 	  && !vnode->force_output);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]