re PR middle-end/48044 (ICE in function_and_variable_visibility, at ipa.c:875)

PR middle-end/48044
	* ipa.c (cgraph_remove_unreachable_nodes): Enqueue
	all vnode->force_output nodes as needed.

	* gcc.dg/torture/pr48044.c: New test.

From-SVN: r170873
This commit is contained in:
Jakub Jelinek 2011-03-11 15:47:26 +01:00 committed by Jakub Jelinek
parent 30f7cdcde6
commit 4074f163fc
4 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-03-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/48044
* ipa.c (cgraph_remove_unreachable_nodes): Enqueue
all vnode->force_output nodes as needed.
2011-03-11 Jason Merrill <jason@redhat.com>
PR c++/48069

View File

@ -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;

View File

@ -1,3 +1,8 @@
2011-03-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/48044
* gcc.dg/torture/pr48044.c: New test.
2011-03-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/47768

View File

@ -0,0 +1,7 @@
/* PR middle-end/48044 */
/* { dg-do compile } */
/* { dg-require-alias "" } */
int a __asm__ ("b") = 0;
extern int c __asm__ ("a") __attribute__ ((alias ("b")));
extern int d __attribute__ ((weak, alias ("a")));