This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48044] [4.6 Regression] ICE in function_and_variable_visibility, at ipa.c:875
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Mar 2011 09:36:30 +0000
- Subject: [Bug middle-end/48044] [4.6 Regression] ICE in function_and_variable_visibility, at ipa.c:875
- Auto-submitted: auto-generated
- References: <bug-48044-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48044
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-10 09:36:12 UTC ---
c's vnode is first varpool_mark_needed_node, then it is again marked as not
needed by cgraph_remove_unreachable_nodes (so far both for -O0 and -O1+)
and as nothing like finish_aliases_1 is run afterwards again, the vnode is
!vnode->needed && vnode->force_output. In -O1 case the varpool node is removed
altogether as not needed (which is strange, the vnode's decl is going to be
emitted anyway), but for -O0:
/* We must release unused extern inlines or sanity checking will fail. Rest
of transformations
are undesirable at -O0 since we do not want to remove anything. */
if (!optimize)
return changed;
if (file)
fprintf (file, "Reclaiming variables:");
the reclaiming isn't done, so the vnode remains !vnode->needed and we ICE on it
later on.
I wonder if cgraph_remove_unreachable_nodes shouldn't be somehow alias pairs
aware (can it e.g. call find_aliases_1 again?), or at least for !optimize
shouldn't it avoid clearing vnode->needed for vnode->force_output?