URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr42508.C] - Rev 718
Go to most recent revision | Compare with Previous | Blame | View Log
// PR tree-optimization/42508
// { dg-do run }
// { dg-options "-O1 -fipa-sra" }
extern "C" void abort ();
int v[10], vidx;
struct A
{
A *prev;
int i;
~A()
{
v[vidx++] = i;
delete prev;
}
};
int
main ()
{
A *a1 = new A ();
A *a2 = new A ();
a1->prev = 0;
a1->i = 1;
a2->prev = a1;
a2->i = 2;
delete a2;
if (vidx != 2 || v[0] != 2 || v[1] != 1)
abort ();
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log