summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/constexpr-ackermann.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/constexpr-ackermann.cpp')
-rw-r--r--clang/test/SemaCXX/constexpr-ackermann.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/constexpr-ackermann.cpp b/clang/test/SemaCXX/constexpr-ackermann.cpp
new file mode 100644
index 0000000..c4ea313
--- /dev/null
+++ b/clang/test/SemaCXX/constexpr-ackermann.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only %s
+
+constexpr unsigned long long A(unsigned long long m, unsigned long long n) {
+ return m == 0 ? n + 1 : n == 0 ? A(m-1, 1) : A(m - 1, A(m, n - 1));
+}
+
+using X = int[A(3,4)];
+using X = int[125];