From e8b028d6ee84a598907a9187915508e804b2948c Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Fri, 1 Mar 2002 19:27:05 +0000 Subject: [PATCH] Reduced testcase of a 252.eon (SPEC2000) problem. From-SVN: r50204 --- gcc/testsuite/g++.dg/template/wrap1.C | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/wrap1.C diff --git a/gcc/testsuite/g++.dg/template/wrap1.C b/gcc/testsuite/g++.dg/template/wrap1.C new file mode 100644 index 00000000000..72f687efd14 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/wrap1.C @@ -0,0 +1,27 @@ +// { dg-do compile } + +// Copyright (C) 2002 Free Software Foundation, Inc. +// Contributed by Michael Matz 03 Mar 2002 +// instance of an actual pattern in 252.eon from SPEC2000 + +// The last Wrapper once wasn't completed when applying '='. + +template +class Wrapper { + public: + Wrapper (T& a); + Wrapper (const Wrapper& ref); +}; + +template +class Element { +public: + T * operator[](int x); +}; + +void test() +{ + char bla = 42; + Element< Wrapper > elem; + elem[1][1] = Wrapper (bla); +} -- 2.30.2