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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [new1.C] - Rev 693

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" } } */

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.