summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf/compiler/genT14697
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/perf/compiler/genT14697')
-rwxr-xr-xtestsuite/tests/perf/compiler/genT1469717
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/perf/compiler/genT14697 b/testsuite/tests/perf/compiler/genT14697
new file mode 100755
index 0000000000..73e8e93932
--- /dev/null
+++ b/testsuite/tests/perf/compiler/genT14697
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+SIZE=100
+ROOT=T14697
+# Generates 100 empty modules and T14697 that imports them all
+# It (along with the command line arguments) reproduces a problem where
+# -optP command line flags would be hashed once per file
+for i in $(seq -w 1 $SIZE); do
+ echo "module A$i where" > A$i.hs
+done
+
+echo "module ${ROOT} where" > $ROOT.hs
+for i in $(seq -w 1 $SIZE); do
+ echo "import A$i" >> $ROOT.hs;
+done
+
+# generate flags
+echo -optP-D__F{1..10000}__ > T14697-flags