summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/cond4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/cond4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/cond4.C31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/cond4.C b/gcc/testsuite/g++.old-deja/g++.other/cond4.C
new file mode 100644
index 000000000..6b28824d1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/cond4.C
@@ -0,0 +1,31 @@
+// { dg-do assemble }
+// Origin: Loring Holden <lsh@cs.brown.edu>
+
+template <class V>
+class _vec3d
+{
+ public:
+ double _x, _y;
+};
+
+class Wvec : public _vec3d<int> { };
+
+template <class T>
+class TDI {
+ public:
+ T &get();
+};
+
+template <class T>
+class hashvar {
+ public :
+ T _val;
+ TDI<T> *val() const;
+ T get() const { return true ? val()->get() : _val; }
+};
+
+int
+main() {
+ hashvar<Wvec> CONSTRAINT_DIR;
+ CONSTRAINT_DIR.get();
+}