This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52582] g++ ICE when compiling qt-4.8.0 with -O2 on PPC (32bit)
- 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: Tue, 13 Mar 2012 22:15:58 +0000
- Subject: [Bug c++/52582] g++ ICE when compiling qt-4.8.0 with -O2 on PPC (32bit)
- Auto-submitted: auto-generated
- References: <bug-52582-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52582
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 22:15:58 UTC ---
Ah, #define HAVE_AS_GNU_ATTRIBUTE 1 in auto-host.h is essential for this.
This is devirt in action, for some reason the devirtualized A::~A () doesn't
have DECL_EXTERNAL set (not sure what should set it, the FE, the
devirtualizer?)
and likely the rs6000 backend just should be more forgiving and if it can't
find a cgraph node, IMHO call_ABI_of_interest should just return true as a
conservative answer.
So, for 4.7.0 IMHO best would be to do:
--- gcc/config/rs6000/rs6000.c 2012-03-13 19:58:59.342625117 +0100
+++ gcc/config/rs6000/rs6000.c 2012-03-13 23:14:15.693828006 +0100
@@ -7452,6 +7452,9 @@ call_ABI_of_interest (tree fndecl)
/* Interesting functions that we are emitting in this object file. */
c_node = cgraph_get_node (fndecl);
c_node = cgraph_function_or_thunk_node (c_node, NULL);
+ if (c_node == NULL)
+ return true;
+
return !cgraph_only_called_directly_p (c_node);
}
return false;
and for 4.7.1/4.8 (while this can perhaps stay) we should find out why
DECL_EXTERNAL isn't set.