aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/conv7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/conv7.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/conv7.C45
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv7.C b/gcc/testsuite/g++.old-deja/g++.other/conv7.C
new file mode 100644
index 00000000000..0a7e76dfe3f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/conv7.C
@@ -0,0 +1,45 @@
+// Build don't link:
+//
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 5 May 2001 <nathan@codesourcery.com>
+
+// Bug 2726. We ICE'd trying to say something about possibly confusing
+// conversion overload resolution.
+
+class foo
+{
+};
+
+template<class T>
+class bar
+{
+public:
+ operator const T&() const ;
+ operator T&() ;
+
+};
+
+
+template<class T, class Ref, class NodePtr, class ListPtr>
+class iterator_template
+{
+public:
+ iterator_template();
+ Ref operator*() const;
+
+};
+
+struct IdlDeclarator
+{
+};
+
+typedef bar< IdlDeclarator > IdlDeclarator_bar;
+int
+yyparse()
+
+{
+
+ iterator_template<IdlDeclarator_bar,IdlDeclarator_bar&,foo*,foo*> declIter;
+ const IdlDeclarator& declarator = *declIter; // WARNING - choosing
+ return 1;
+}