* typeck.c (build_binary_op): Fix pmf comparison logic.
authorJason Merrill <jason@gcc.gnu.org>
Sat, 23 Dec 2000 00:33:26 +0000 (19:33 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 23 Dec 2000 00:33:26 +0000 (19:33 -0500)
From-SVN: r38473

gcc/testsuite/g++.old-deja/g++.other/new6.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/new6.C b/gcc/testsuite/g++.old-deja/g++.other/new6.C
new file mode 100644 (file)
index 0000000..398a0ca
--- /dev/null
@@ -0,0 +1,21 @@
+#include <new>
+using namespace std;
+extern "C" void *malloc (size_t);
+
+int special;
+int space = 0xdeadbeef;
+
+void *operator new (size_t size) throw (bad_alloc)
+{
+  if (special)
+    return &space;
+  return malloc (size);
+}
+
+int main ()
+{
+  special = 1;
+  int *p = new int();
+  special = 0;
+  return *p != 0;
+}