diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-02-03 18:57:24 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-02-03 18:57:24 -0500 |
commit | 82bf778342ec221fdaf525e0841682d99d1ad529 (patch) | |
tree | 0f8a8e6dcc1356018e2545011479a4fb0a575bd4 | |
parent | 9c0d03672f068d9fc7cf3297fbd571f1ff197452 (diff) | |
download | gcc-82bf778342ec221fdaf525e0841682d99d1ad529.zip gcc-82bf778342ec221fdaf525e0841682d99d1ad529.tar.gz gcc-82bf778342ec221fdaf525e0841682d99d1ad529.tar.bz2 |
new
From-SVN: r17654
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/field1.C | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/init1.C | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/init2.C | 20 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/realloc.C | 14 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/ttp40.C | 20 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/ttp41.C | 23 |
6 files changed, 94 insertions, 0 deletions
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 0000000..e734830 --- /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 0000000..a87f14b --- /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 0000000..c17427a --- /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 0000000..1e1c6db --- /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 0000000..d30b4d6 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp40.C @@ -0,0 +1,20 @@ +#include <vector> + +template<class E,template<class> class DD = std::vector> class C +{ + DD<E> d; + public: + int f(); +}; + +template<class E,template<class> class DD> int C<E,DD>::f() +{ + DD<E> d2; + return d2.size(); +} + +int main() +{ + C<int> 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 0000000..f206c03 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C @@ -0,0 +1,23 @@ +template<template<class> class D,class E> class C +{ + public: + int g() { return 1; } +}; + +template<class T> class D +{ + public: + int f(); +}; + +template<class T> int D<T>::f() +{ + C<D,D> c; + return c.g(); +} + +int main() +{ + D<char> d; + d.f(); +} |