re PR c++/71821 (ICE on invalid C++11 code (incorrect argument for alignas): unexpect...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 17 Oct 2017 19:49:06 +0000 (19:49 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 17 Oct 2017 19:49:06 +0000 (19:49 +0000)
2017-10-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71821
* g++.dg/cpp0x/alignas12.C: New.

From-SVN: r253828

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

index 3da50bfe4f102395a38201c184987aacb4ef0ba8..0fb2c0ab6d2c7826d838021d842fe3c10f4e62c9 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/71821
+       * g++.dg/cpp0x/alignas12.C: New.
+
 2017-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/71368
diff --git a/gcc/testsuite/g++.dg/cpp0x/alignas12.C b/gcc/testsuite/g++.dg/cpp0x/alignas12.C
new file mode 100644 (file)
index 0000000..bc16344
--- /dev/null
@@ -0,0 +1,6 @@
+// PR c++/71821
+// { dg-do compile { target c++11 } }
+
+template < typename > constexpr int f () {  return 4; }
+
+alignas (f < int >) char c;  // { dg-error "non-integral type" }