diff --git a/gcc/testsuite/g++.old-deja/g++.other/field1.C b/gcc/testsuite/g++.old-deja/g++.other/field1.C new file mode 100644 index 00000000000..e734830a1c4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/field1.C @@ -0,0 +1,7 @@ +// Build don't link: + +struct X +{ + static const bool b = true; + static const int i = b ? 1 : 2; +}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/init1.C b/gcc/testsuite/g++.old-deja/g++.other/init1.C new file mode 100644 index 00000000000..a87f14bc4d3 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/init1.C @@ -0,0 +1,10 @@ +extern "C" void abort(); + +int i; +int j = i++; + +int main() +{ + if (i != 1) + abort(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.other/init2.C b/gcc/testsuite/g++.old-deja/g++.other/init2.C new file mode 100644 index 00000000000..c17427a7643 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/init2.C @@ -0,0 +1,20 @@ +// Special g++ Options: -O3 + +typedef int (*fp)(); + +struct S +{ + fp f; +}; + +static int f() +{ + return 0; +} + +static const S s = { &f }; + +int main() +{ + return (*s.f)(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.other/realloc.C b/gcc/testsuite/g++.old-deja/g++.other/realloc.C new file mode 100644 index 00000000000..1e1c6db8aa4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/realloc.C @@ -0,0 +1,14 @@ +// Build don't link: + +extern "C" void realloc(); + +class bug { +public: + void realloc(int foo,int bar); +}; + +void f() { + bug c; + c.realloc(50,50); +} + diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp40.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp40.C new file mode 100644 index 00000000000..d30b4d6a00e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp40.C @@ -0,0 +1,20 @@ +#include + +template class DD = std::vector> class C +{ + DD d; + public: + int f(); +}; + +template class DD> int C::f() +{ + DD d2; + return d2.size(); +} + +int main() +{ + C c; + c.f(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C new file mode 100644 index 00000000000..f206c03c291 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C @@ -0,0 +1,23 @@ +template class D,class E> class C +{ + public: + int g() { return 1; } +}; + +template class D +{ + public: + int f(); +}; + +template int D::f() +{ + C c; + return c.g(); +} + +int main() +{ + D d; + d.f(); +}