aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-01-15 16:44:56 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2011-01-15 15:44:56 +0000
commitbe46831f5a914a19bce02cb73a5c31bbba95d1b0 (patch)
treef0d2df8b9a10af944cde23619b915e72b462a63c /gcc/ipa.c
parent620437f2d4773ab2b42f4edebbd949577788ca86 (diff)
downloadgcc-be46831f5a914a19bce02cb73a5c31bbba95d1b0.zip
gcc-be46831f5a914a19bce02cb73a5c31bbba95d1b0.tar.gz
gcc-be46831f5a914a19bce02cb73a5c31bbba95d1b0.tar.bz2
re PR tree-optimization/47276 (ICE in function_and_variable_visibility, at ipa.c:857 during compiling glibc.)
PR tree-optimization/47276 * ipa.c (function_and_variable_visibility): Do not try to mark alias declarations as needed. * gcc.dg/pr47276.c: New testcase. From-SVN: r168844
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index fa39f92..0320ded 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -847,6 +847,8 @@ function_and_variable_visibility (bool whole_program)
if ((node = cgraph_node_for_asm (p->target)) != NULL
&& !DECL_EXTERNAL (node->decl))
{
+ if (!node->analyzed)
+ continue;
/* Weakrefs alias symbols from other compilation unit. In the case
the destination of weakref became available because of LTO, we must
mark it as needed. */