OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wstrict-aliasing-bogus-escape-3.C] - Rev 693

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();
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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