Message ID | 20110311145023.GE30899@tyan-ft48-01.lab.bos.redhat.com |
---|---|
State | New |
Headers | show |
--- gcc/ipa.c.jj 2011-01-18 12:20:18.000000000 +0100 +++ gcc/ipa.c 2011-03-11 12:27:04.000000000 +0100 @@ -259,7 +259,7 @@ cgraph_remove_unreachable_nodes (bool be { 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; --- gcc/testsuite/gcc.dg/torture/pr48044.c.jj 2011-03-11 12:28:59.000000000 +0100 +++ gcc/testsuite/gcc.dg/torture/pr48044.c 2011-03-11 12:28:48.000000000 +0100 @@ -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")));