re PR c++/90236 (bogus error with auto non-type template argument)
authorMarek Polacek <polacek@redhat.com>
Wed, 24 Apr 2019 21:28:04 +0000 (21:28 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 24 Apr 2019 21:28:04 +0000 (21:28 +0000)
PR c++/90236
* g++.dg/cpp1z/nontype-auto16.C: New test.

From-SVN: r270557

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/nontype-auto16.C [new file with mode: 0644]

index 70ffb8d1e1e38d23da1f7b25d4bbec850f8dbb7e..115c22088ef457f56fee57a7ca614c6e52363014 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-24  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/90236
+       * g++.dg/cpp1z/nontype-auto16.C: New test.
+
 2019-04-24  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/90193
diff --git a/gcc/testsuite/g++.dg/cpp1z/nontype-auto16.C b/gcc/testsuite/g++.dg/cpp1z/nontype-auto16.C
new file mode 100644 (file)
index 0000000..695bb11
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/90236
+// { dg-do compile { target c++17 } }
+
+struct foo { };
+
+template <const auto &> void fnc() { } 
+
+void
+test()
+{
+  static constexpr foo a;
+  fnc<a>();
+}