This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix cgraph availability bug
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 15 Nov 2008 21:30:00 +0100
- Subject: Fix cgraph availability bug
Hi,
there is important bug in cgraph_function_body_availability making all
external function bodies available. This would lead to IPA that is not
compatible with overwritting symbols at dynamic link time.
Bootstrapped/regtested i686-linux, will commit it shortly.
* cgraph.c (cgraph_function_body_availability): Fix typo in
externally_visible test.
Index: cgraph.c
===================================================================
--- cgraph.c (revision 141788)
+++ cgraph.c (working copy)
@@ -1423,7 +1423,7 @@ cgraph_function_body_availability (struc
avail = AVAIL_NOT_AVAILABLE;
else if (node->local.local)
avail = AVAIL_LOCAL;
- else if (node->local.externally_visible)
+ else if (!node->local.externally_visible)
avail = AVAIL_AVAILABLE;
/* If the function can be overwritten, return OVERWRITABLE. Take