This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37293] [4.4 Regression] r139762 breaks libstdc++ build on darwin
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2008 01:57:09 -0000
- Subject: [Bug middle-end/37293] [4.4 Regression] r139762 breaks libstdc++ build on darwin
- References: <bug-37293-11113@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-08-31 01:57 -------
Here is a short reduced testcase:
void f(int);
inline void _M_reset (int *a) throw()
{
f (*a);
}
bool _M_finished();
int _M_curr_index;
void _M_allocate_single_object()
{
if (__builtin_expect (_M_finished(), false))
{
_M_reset(&_M_curr_index);
_M_reset(&_M_curr_index);
}
}
So what is happening is that we are not inlining as the we find the basic block
containing the two _M_reset is cold (via the __builtin_expect) so we decide to
do IPA-CP instead as we have two calls to that function with the same argument.
We create an IPA-cp clone of the function of _M_reset, mark it as a local
function but don't clear DECL_WEAK. I will see what we can do for this decl
soon.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-08-31 01:57:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37293