re PR c++/59114 ([c++1y] ICE using auto in conversion operator)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 26 Nov 2014 16:06:53 +0000 (16:06 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 26 Nov 2014 16:06:53 +0000 (16:06 +0000)
2014-11-26  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/59114
* g++.dg/cpp0x/auto43.C: New.

From-SVN: r218090

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

index 5c0ecd7cddb86f8334ada7ce5a31b902766620b7..48e35810079a1d2df56daa1e51355ae5c6601251 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-26  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/59114
+       * g++.dg/cpp0x/auto43.C: New.
+
 2014-11-26  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/63738
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto43.C b/gcc/testsuite/g++.dg/cpp0x/auto43.C
new file mode 100644 (file)
index 0000000..45a8275
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/59114
+// { dg-do compile { target c++11 } }
+
+template<int> struct A
+{
+  template<typename T> operator T();
+};
+
+void foo()
+{
+  A<0>().operator auto();  // { dg-error "invalid use of .auto" }
+}