URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wstrict-aliasing-bogus-escape-3.C] - Rev 839
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing" } */
struct Node_base {};
struct Node : Node_base
{
int data;
};
struct List
{
Node_base node, *prev;
List() : prev(&node) { xyz(); }
void xyz();
int back() { return static_cast<Node*>(prev)->data; }
};
struct A
{
virtual ~A();
};
A* foo();
void bar()
{
List y;
if (y.back())
delete foo();
}
Go to most recent revision | Compare with Previous | Blame | View Log