From: Jason Merrill Date: Thu, 29 Jan 1998 10:21:37 +0000 (-0500) Subject: new X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c25520e8b93f2c1e367dfb29c01dbffabf7b7762;p=gcc.git new From-SVN: r17551 --- 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 00000000000..0cfeed4084c --- /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 00000000000..d4a3c627a97 --- /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 00000000000..41915b30927 --- /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(); +}