summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C b/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C
new file mode 100644
index 000000000..be3a5644f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C
@@ -0,0 +1,18 @@
+// { dg-do run }
+class null {
+ null (null const&);
+ void operator& ();
+
+ public:
+ null () {}
+
+ template <typename T>
+ operator T* () const { return 0; }
+} const null;
+
+int main ()
+{
+ int *p = (int*) null;
+
+ return 0;
+}