aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@dcc.unicamp.br>1998-10-31 02:06:21 +0000
committerAlexandre Oliva <oliva@gcc.gnu.org>1998-10-31 02:06:21 +0000
commitcba30eb8f87bce8511b8bae8ba4d2062b7c4aca9 (patch)
treed669b0282900d3b28e496f2d20430a729276d20c /gcc
parente1a96a5729b45f77160029277379c72276cf94e9 (diff)
downloadgcc-cba30eb8f87bce8511b8bae8ba4d2062b7c4aca9.zip
gcc-cba30eb8f87bce8511b8bae8ba4d2062b7c4aca9.tar.gz
gcc-cba30eb8f87bce8511b8bae8ba4d2062b7c4aca9.tar.bz2
sizeof3.C: a similar testcase not involving base classes
* g++.old-deja/g++.pt/sizeof3.C: a similar testcase not involving base classes From-SVN: r23469
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C27
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5ea28f5..830501c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
1998-10-31 Alexandre Oliva <oliva@dcc.unicamp.br>
+ * g++.old-deja/g++.pt/sizeof3.C: a similar testcase not involving
+ base classes
+
* g++.old-deja/g++.pt/sizeof2.C: incorrect specialization of base
template is selected
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C b/gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C
new file mode 100644
index 0000000..055ca0d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C
@@ -0,0 +1,27 @@
+// Adapted from testcase by Oskar Enoksson <osken393@student.liu.se>
+
+// execution test - XFAIL *-*-*
+
+extern "C" void abort();
+
+template<class T0>
+class A {
+public:
+ typedef T0 T;
+};
+
+template<int K>
+class B {
+ typedef A<char[K]> BC;
+};
+
+template<int N, int M>
+class C {
+public:
+ typedef A<char[M]> AC;
+};
+
+int main() {
+ if (sizeof(C<3,7>::AC::T) != 7) // gets bogus error - XFAIL *-*-*
+ abort();
+}