diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/init/new21.C | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/init/ptrmem4.C | 13 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/static30.C | 10 |
4 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d2ff6b2..266cc59 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2007-07-05 Mark Mitchell <mark@codesourcery.com> + + PR c++/32245 + * g++.dg/init/ptrmem4.C: New test. + + PR c++/32251 + * g++.dg/init/new21.C: Likewise. + + PR c++/31992 + * g++.dg/template/static30.C: Likewise. + 2007-07-05 Dorit Nuzman <dorit@il.ibm.com> * gcc.dg/vect/costmodel/ppc: New directory. diff --git a/gcc/testsuite/g++.dg/init/new21.C b/gcc/testsuite/g++.dg/init/new21.C new file mode 100644 index 0000000..5797ea9 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/new21.C @@ -0,0 +1,10 @@ +// PR c++/32251 + +struct A { + A(); + void operator delete(void *, ...); +}; + +void foo () { + new A; // { dg-warning "deallocation" } +} diff --git a/gcc/testsuite/g++.dg/init/ptrmem4.C b/gcc/testsuite/g++.dg/init/ptrmem4.C new file mode 100644 index 0000000..44ab8cf --- /dev/null +++ b/gcc/testsuite/g++.dg/init/ptrmem4.C @@ -0,0 +1,13 @@ +// PR c++/32245 +// { dg-do run } + +struct foo { + int mem1; + int foo::* mem2; +}; + +int main () { + foo x = { 0 } ; + if (x.mem2 != foo().mem2) + return 1; +} diff --git a/gcc/testsuite/g++.dg/template/static30.C b/gcc/testsuite/g++.dg/template/static30.C new file mode 100644 index 0000000..01fa5dc --- /dev/null +++ b/gcc/testsuite/g++.dg/template/static30.C @@ -0,0 +1,10 @@ +// PR c++/31992 + +template <int> struct A +{ + static const int i1; + static const int i2; +}; + +template <int N> const int A<N>::i1(A<N>::i); +template <int N> const int A<N>::i2(3, A<N>::i); |