From c25520e8b93f2c1e367dfb29c01dbffabf7b7762 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 29 Jan 1998 05:21:37 -0500 Subject: new From-SVN: r17551 --- gcc/testsuite/g++.old-deja/g++.pt/alignof.C | 21 +++++++++++++++++++++ gcc/testsuite/g++.old-deja/g++.pt/explicit66.C | 11 +++++++++++ gcc/testsuite/g++.old-deja/g++.pt/sizeof.C | 17 +++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/alignof.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/explicit66.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/sizeof.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.old-deja/g++.pt/alignof.C b/gcc/testsuite/g++.old-deja/g++.pt/alignof.C new file mode 100644 index 0000000..0cfeed4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/alignof.C @@ -0,0 +1,21 @@ +extern "C" void abort(); + +struct S +{ + char c; + double d; +}; + + +template +void foo(T) +{ + if (__alignof__(T) != __alignof__(S)) + abort(); +} + + +int main() +{ + foo(S()); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit66.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit66.C new file mode 100644 index 0000000..d4a3c62 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit66.C @@ -0,0 +1,11 @@ +void f(int) {} +void f(double); + +template +void foo() {} + +int main() +{ + foo(); +} + diff --git a/gcc/testsuite/g++.old-deja/g++.pt/sizeof.C b/gcc/testsuite/g++.old-deja/g++.pt/sizeof.C new file mode 100644 index 0000000..41915b3 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/sizeof.C @@ -0,0 +1,17 @@ +extern "C" void abort(); + +template +int bar() { return I; } + +template +int foo(T) +{ + return bar() + bar(); +} + + +int main() +{ + if (foo(2) != sizeof(int) + 4 + sizeof(long) + 7) + abort(); +} -- cgit v1.1