summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2018-12-30 10:28:12 +0000
committerAndreas Rumpf <rumpf_a@web.de>2018-12-30 11:28:12 +0100
commit82c009a2cbc5d07ab9a847f1c58228a20efaf219 (patch)
tree4eb145a07f09df58fd84702b4e22719495c47f22 /tests
parentcbbdcb266962df39bbdacb99ccd2a656ce9c3af7 (diff)
downloadNim-82c009a2cbc5d07ab9a847f1c58228a20efaf219.tar.gz
Dead code elimination for entire modules and their init procs if empty (#10032)
* fixes #9798
* Change order of write modules
* Move datInit calls ahead of initStackBottom
Diffstat (limited to 'tests')
-rw-r--r--tests/ccgbugs/tforward_decl_only.nim2
-rw-r--r--tests/manyloc/standalone/barebone.nim6
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/ccgbugs/tforward_decl_only.nim b/tests/ccgbugs/tforward_decl_only.nim
index 2a867bc3b..74fbae303 100644
--- a/tests/ccgbugs/tforward_decl_only.nim
+++ b/tests/ccgbugs/tforward_decl_only.nim
@@ -1,5 +1,7 @@
 discard """
 ccodecheck: "\\i !@('struct tyObject_MyRefObject'[0-z]+' {')"
+ccodecheck: "\\i !@('mymoduleInit')"
+ccodecheck: "\\i @('mymoduleDatInit')"
 output: "hello"
 """
 
diff --git a/tests/manyloc/standalone/barebone.nim b/tests/manyloc/standalone/barebone.nim
index 9d75f8f2e..0b38616b2 100644
--- a/tests/manyloc/standalone/barebone.nim
+++ b/tests/manyloc/standalone/barebone.nim
@@ -1,4 +1,8 @@
-
+discard """
+ccodecheck: "\\i !@('systemInit')"
+ccodecheck: "\\i !@('systemDatInit')"
+output: "hello"
+"""
 # bug  #2041: Macros need to be available for os:standalone!
 import macros