From: Paolo Carlini Date: Mon, 18 Sep 2017 12:08:14 +0000 (+0000) Subject: re PR c++/45033 ("delete" does overload resolution for class operands, but shouldn't.) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10d8c51f302ae1899d7fe9e4d48edb2cfb294ad9;p=gcc.git re PR c++/45033 ("delete" does overload resolution for class operands, but shouldn't.) 2017-09-18 Paolo Carlini PR c++/45033 * g++.dg/expr/delete1.C: New. From-SVN: r252924 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a84419551de..f2ad8a052ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-18 Paolo Carlini + + PR c++/45033 + * g++.dg/expr/delete1.C: New. + 2017-09-18 Bob Duff * 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 index 00000000000..902e0cc4f01 --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/delete1.C @@ -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; +}