------- Comment #4 from rguenth at gcc dot gnu dot org 2008-02-14 13:43 -------
Reduced testcase, which shows this is inlining related and not related to
PR34989. Honza, can you have a look? After inlining we have:
<bb 2>:
# iter_6 = PHI <iter_7(ab)(4), iter_2(ab)(5)>
where clearly iter_6 should be marked abnormal? But I also don't see who
messes up between sdse2 and apply_inline (we don't seem to inline anything
after all).
struct __shared_count {
__shared_count() { _M_pi = new int; }
int * _M_pi;
};
template<typename _Tp>
class __shared_ptr {
public:
__shared_ptr(_Tp* __p);
void reset(int * __p) {
__shared_ptr(__p).swap(*this);
}
void swap(__shared_ptr<_Tp>& __other) {
__other._M_refcount._M_pi = _M_refcount._M_pi;
}
__shared_count _M_refcount;
};
template<typename _Tp> class shared_ptr : public __shared_ptr<_Tp> {};
int main() {
for (shared_ptr<int> *iter;;)
{
try {
(iter++)->reset(new int);
}
catch (...) {
}
}
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35182