URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [new1.C] - Rev 307
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/36633
/* { dg-do compile } */
/* { dg-options "-O2 -Wall -fdump-tree-forwprop1" } */
// No particular reason for choosing forwprop1 dump to look at.
struct B { ~B() {} };
struct D : public B {};
//struct D {};
struct my_deleter
{
void operator()(D * d)
{
// delete [] d;
}
};
struct smart_ptr
{
smart_ptr(D * ptr) : p(ptr) { }
~smart_ptr() { d(p); }
D * p;
my_deleter d;
};
int
test01()
{
smart_ptr p(new D[7]);
return 0;
}
int main()
{
test01();
return 0;
}
/* { dg-final { scan-tree-dump-not "= .* \\+ -" "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
Go to most recent revision | Compare with Previous | Blame | View Log