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

// { dg-do compile }
// { dg-options "-fvolatile" }

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

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