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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr33340.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
void* operator new(__SIZE_TYPE__, void* __p) { }
2
 
3
struct auto_ptr {
4
        int* p;
5
        ~auto_ptr() { delete p; }
6
};
7
 
8
typedef void* T;
9
struct vector {
10
        void push_back(const T& __x) {
11
                ::new(0) T(__x);
12
                insert(__x);
13
        }
14
        void insert(const T& __x);
15
} v;
16
 
17
void g();
18
void f() {
19
        auto_ptr ap;
20
        if (ap.p) {
21
                ap.p = new int();
22
        }
23
        g();
24
        int* tmp = ap.p;
25
        ap.p = 0;
26
        v.push_back(tmp);
27
}

powered by: WebSVN 2.1.0

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