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] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/36633
2
 
3
/* { dg-do compile } */
4
/* { dg-options "-O2 -Wall -fdump-tree-forwprop1" } */
5
// No particular reason for choosing forwprop1 dump to look at.
6
 
7
struct B { ~B() {} };
8
struct D : public B {};
9
//struct D {};
10
 
11
struct my_deleter
12
{
13
  void operator()(D * d)
14
  {
15
    //    delete [] d;
16
  }
17
};
18
 
19
struct smart_ptr
20
{
21
  smart_ptr(D * ptr) : p(ptr) { }
22
  ~smart_ptr() { d(p); }
23
  D * p;
24
  my_deleter d;
25
};
26
 
27
int
28
test01()
29
{
30
  smart_ptr p(new D[7]);
31
 
32
  return 0;
33
}
34
 
35
int main()
36
{
37
  test01();
38
  return 0;
39
}
40
 
41
/* { dg-final { scan-tree-dump-not "= .* \\+ -" "forwprop1" } } */
42
/* { dg-final { cleanup-tree-dump "forwprop1" } } */

powered by: WebSVN 2.1.0

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