From f5710887ad5b831a63fcd08babf0a2ae171f09e4 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 22 Apr 1998 21:02:15 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r19379 --- gcc/testsuite/g++.old-deja/g++.pt/expr5.C | 10 +++++ gcc/testsuite/g++.old-deja/g++.pt/spec17.C | 44 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/expr5.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/spec17.C diff --git a/gcc/testsuite/g++.old-deja/g++.pt/expr5.C b/gcc/testsuite/g++.old-deja/g++.pt/expr5.C new file mode 100644 index 00000000000..4cb5078702f --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/expr5.C @@ -0,0 +1,10 @@ +// Build don't link: + +template +struct S1; + +template +struct S2 +{ + typedef typename S1= j ? 0 : 1) >::type type; +}; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec17.C b/gcc/testsuite/g++.old-deja/g++.pt/spec17.C new file mode 100644 index 00000000000..3e3dd63751a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec17.C @@ -0,0 +1,44 @@ +// Build don't link: + +template +struct Foo { }; + +template +struct BT { }; + +template +struct BT< Foo, Foo > { static const int i = 1; }; + +template +struct BT< T1, Foo > { static const int i = 2; }; + +template +struct BT< Foo, T2 > { static const int i = 3; }; + +template +int foo(Foo, Foo) +{ + return 1; +} + +template +int foo(T1, Foo) +{ + return 2; +} + +template +int foo(Foo, T2) +{ + return 3; +} + +void f() +{ + BT< double, Foo >::i; + BT< Foo, Foo >::i; + BT< Foo, float >::i; + foo(1.0, Foo()); + foo(Foo(), Foo()); + foo(Foo(), 1.0); +}