re PR c++/45033 ("delete" does overload resolution for class operands, but shouldn't.)
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 18 Sep 2017 12:08:14 +0000 (12:08 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 18 Sep 2017 12:08:14 +0000 (12:08 +0000)
2017-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/45033
* g++.dg/expr/delete1.C: New.

From-SVN: r252924

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/delete1.C [new file with mode: 0644]

index a84419551de0cf0d3645600d89ce5879a9695ab1..f2ad8a052ee16cd0656ccf9e6a9ff31c013b4164 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/45033
+       * g++.dg/expr/delete1.C: New.
+
 2017-09-18  Bob Duff  <duff@adacore.com>
 
        * gnat.dg/validity_check.adb: New testcase.
diff --git a/gcc/testsuite/g++.dg/expr/delete1.C b/gcc/testsuite/g++.dg/expr/delete1.C
new file mode 100644 (file)
index 0000000..902e0cc
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/45033
+
+struct A {
+  operator int*() { return 0; }
+  operator int*() const { return 0; }
+};
+
+int main() {
+  A a;
+  int *p = a;
+  delete a;
+}