From db898cddb054fe9898d3fb9a9a6789826f794a58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 3 May 1999 12:21:16 +0000 Subject: [PATCH] New test case. From-SVN: r26746 --- gcc/testsuite/g++.old-deja/g++.ns/template9.C | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.ns/template9.C diff --git a/gcc/testsuite/g++.old-deja/g++.ns/template9.C b/gcc/testsuite/g++.old-deja/g++.ns/template9.C new file mode 100644 index 00000000000..836c022a736 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ns/template9.C @@ -0,0 +1,40 @@ +// Produces ICE 980519. +// Test case from Dirk Engelmann + +namespace vector { + + // allocate memory for vector + + template + inline T* alloc(const int aWidth) + { + // allocate memory + return new T[aWidth]; + } + +} + +namespace matrix { + + // allocate memory for matrix + template + T** alloc(const int aWidth,const int aHeight) + { + // allocate memory + T **mat = vector::alloc(aHeight); + T *data = vector::alloc (aWidth*aHeight); + // set pointer + for (int i=0; i(10,20); + +} -- 2.30.2