URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [vect/] [pr44861.cc] - Rev 751
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do compile } bool f(); struct counted_base { virtual void destroy() { } void release() { if (f()) destroy(); } }; struct shared_count { shared_count() { } ~shared_count() { if (pi) pi->release(); } shared_count(shared_count& r) : pi(r.pi) { if (pi) pi->release(); } counted_base* pi; }; struct Foo; struct shared_ptr { Foo& operator*() { return *ptr; } Foo* ptr; shared_count refcount; }; struct Bar { Bar(Foo&, shared_ptr); }; void g() { shared_ptr foo; new Bar(*foo, foo); } // { dg-final { cleanup-tree-dump "vect" } }
Go to most recent revision | Compare with Previous | Blame | View Log