summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/new2.C
blob: 8b207d0a0337c78701dc91cc7e896ee8daaeba15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Origin: asharji@uwaterloo.ca

// { dg-do compile }

class bar {
  public :
    bar() { }
    void * operator new ( __SIZE_TYPE__ , void * storage ) 
     { return (void *)1;}
};

class foo {
  public:
    void mem ( ) {
        new ( 0 ) bar;
    }
};