re PR c++/63508 (ICE when using bracketed initializer on pointer to member function...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 13 Mar 2019 15:01:00 +0000 (15:01 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 13 Mar 2019 15:01:00 +0000 (15:01 +0000)
2019-03-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/63508
* g++.dg/cpp0x/auto53.C: New.

From-SVN: r269651

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

index a61b668d2e1b167f13723b9edaa41461b836719f..dc261ed89bc8aa0cb617056f2025e584908de549 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/63508
+       * g++.dg/cpp0x/auto53.C: New.
+
 2019-03-13  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/89677
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto53.C b/gcc/testsuite/g++.dg/cpp0x/auto53.C
new file mode 100644 (file)
index 0000000..68b408e
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/63508
+// { dg-do compile { target c++11 } }
+
+template <typename T> class c {
+  void mf() { }
+  using m = void (c::*) ();
+public:
+  c() {
+    auto x = m{&c::mf};
+  }
+};
+
+int main() { c<int> o{}; }