re PR middle-end/48044 (ICE in function_and_variable_visibility, at ipa.c:875)
[gcc.git] / gcc / ipa.c
index 0320ded7a879b1a4842efc869a828424a97d0d66..49554083c02097e9ae911e02367a72734ce149e2 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -1,5 +1,5 @@
 /* Basic IPA optimizations and utilities.
-   Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
+   Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -259,7 +259,7 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
     {
       vnode->next_needed = NULL;
       vnode->prev_needed = NULL;
-      if (vnode->analyzed
+      if ((vnode->analyzed || vnode->force_output)
          && !varpool_can_remove_if_no_refs (vnode))
        {
          vnode->needed = false;