OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr35164-2.C] - Diff between revs 301 and 384

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 384
struct __shared_count {
struct __shared_count {
    __shared_count() { _M_pi = new int; }
    __shared_count() { _M_pi = new int; }
    int * _M_pi;
    int * _M_pi;
};
};
template
template
class __shared_ptr {
class __shared_ptr {
public:
public:
    __shared_ptr(_Tp* __p);
    __shared_ptr(_Tp* __p);
    void reset(int * __p) {
    void reset(int * __p) {
        __shared_ptr(__p).swap(*this);
        __shared_ptr(__p).swap(*this);
    }
    }
    void swap(__shared_ptr<_Tp>& __other) {
    void swap(__shared_ptr<_Tp>& __other) {
        __other._M_refcount._M_pi = _M_refcount._M_pi;
        __other._M_refcount._M_pi = _M_refcount._M_pi;
    }
    }
    __shared_count _M_refcount;
    __shared_count _M_refcount;
};
};
template class shared_ptr : public __shared_ptr<_Tp> {};
template class shared_ptr : public __shared_ptr<_Tp> {};
int main() {
int main() {
    for (shared_ptr *iter;;)
    for (shared_ptr *iter;;)
    {
    {
        try {
        try {
            (iter++)->reset(new int);
            (iter++)->reset(new int);
        }
        }
        catch (...) {
        catch (...) {
        }
        }
    }
    }
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.