diff gcc/testsuite/g++.dg/ipa/pr85549.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/g++.dg/ipa/pr85549.C	Thu Oct 25 07:37:49 2018 +0900
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#include <vector>
+
+#define N 10
+
+static void visit(int &level, int n, int k, std::vector< int > &value) {
+  level = level + 1;
+  value[k] = level;
+  for (int i = 0 ; i < n; i++)
+    if (value[i] == 0)
+      visit(level, n, i, value);
+}
+void permutations()
+{
+  std::vector< int > value(N);
+  int level = -1;
+  visit(level, N, 0, value);
+}
+void testExtendByBox() {
+  permutations();
+}
+
+int main() {
+  testExtendByBox();
+  return 0;
+}