summary refs log tree commit diff stats
path: root/tests/ccgbugs
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-09-23 19:05:05 +0800
committerGitHub <noreply@github.com>2022-09-23 13:05:05 +0200
commit7739e23420c9a7a4ec7eccdddc0a39df9e905aa8 (patch)
treec2ec38a9dfa480a1bf8908ad95fa7212f7b9d78f /tests/ccgbugs
parent47b59e4d3315dbcb0b17d305f43cc35e4eb89e51 (diff)
downloadNim-7739e23420c9a7a4ec7eccdddc0a39df9e905aa8.tar.gz
defaults to ORC (#19972)
* defaults to Orc

* bootstrap using refc

* use gc

* init orc defines

* unregister orc

* fix gc

* fix commands

* add prepareMutation for orc

* enable deepcopy for orc

* prepareMutation

* more fixes

* some cases

* bug #20081

* partial fixes

* partial fixes

* fixes command line

* more fixes

* build Nim with refc

* use gc

* more fixes

* rstore

* orc doesn't support threadpool

* more shallowCopy

* more fixes

* fixes unsafeNew

* workarounds

* small

* more fixes

* fixes some megatest

* tcodegenbugs1 refc

* fxies megatest

* build nimble with refc

* workaround tensordsl tests

* replace shallowCopy with move

* fixes action

* workaround

* add todo

* fixes important packages

* unpublic unregisterArcOrc

* fixes cpp

* enable windows

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r--tests/ccgbugs/t13062.nim7
-rw-r--r--tests/ccgbugs/tassign_nil_strings.nim2
-rw-r--r--tests/ccgbugs/tcodegenbug1.nim1
-rw-r--r--tests/ccgbugs/tdeepcopy_addr_rval.nim1
-rw-r--r--tests/ccgbugs/thtiobj.nim1
-rw-r--r--tests/ccgbugs/tmissinginit.nim1
-rw-r--r--tests/ccgbugs/tmissingvolatile.nim2
7 files changed, 11 insertions, 4 deletions
diff --git a/tests/ccgbugs/t13062.nim b/tests/ccgbugs/t13062.nim
index fed32a1f7..a8d2c1fec 100644
--- a/tests/ccgbugs/t13062.nim
+++ b/tests/ccgbugs/t13062.nim
@@ -1,5 +1,5 @@
 discard """
-  output: "[p = nil]"
+  matrix: "--mm:refc; --mm:orc"
   targets: "c cpp"
 """
 
@@ -24,4 +24,7 @@ type
     fulfilled: Atomic[bool]
 
 var x: Pledge
-echo x.repr
+when defined(gcRefc):
+  doAssert x.repr == "[p = nil]"
+elif not defined(cpp): # fixme # bug #20081
+  doAssert x.repr == "Pledge(p: nil)"
diff --git a/tests/ccgbugs/tassign_nil_strings.nim b/tests/ccgbugs/tassign_nil_strings.nim
index f6fab7baa..e32bfcade 100644
--- a/tests/ccgbugs/tassign_nil_strings.nim
+++ b/tests/ccgbugs/tassign_nil_strings.nim
@@ -1,5 +1,5 @@
 discard """
-  cmd: "nim $target $options $file"
+  matrix: "--mm:refc"
   output: "Hello"
   ccodecheck: "\\i@'a = ((NimStringDesc*) NIM_NIL)'"
 """
diff --git a/tests/ccgbugs/tcodegenbug1.nim b/tests/ccgbugs/tcodegenbug1.nim
index c62bae1ef..d2ab97ede 100644
--- a/tests/ccgbugs/tcodegenbug1.nim
+++ b/tests/ccgbugs/tcodegenbug1.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:refc"
   output: '''obj = (inner: (kind: Just, id: 7))
 obj.inner.id = 7
 id = 7
diff --git a/tests/ccgbugs/tdeepcopy_addr_rval.nim b/tests/ccgbugs/tdeepcopy_addr_rval.nim
index 07fb8f8ef..4a0b0deaa 100644
--- a/tests/ccgbugs/tdeepcopy_addr_rval.nim
+++ b/tests/ccgbugs/tdeepcopy_addr_rval.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:refc; --mm:orc --deepcopy:on"
   output: "3"
 """
 
diff --git a/tests/ccgbugs/thtiobj.nim b/tests/ccgbugs/thtiobj.nim
index 7a656905f..6db24dad0 100644
--- a/tests/ccgbugs/thtiobj.nim
+++ b/tests/ccgbugs/thtiobj.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:refc"
   targets: "c cpp"
 """
 
diff --git a/tests/ccgbugs/tmissinginit.nim b/tests/ccgbugs/tmissinginit.nim
index 8806a2f21..9eb58221c 100644
--- a/tests/ccgbugs/tmissinginit.nim
+++ b/tests/ccgbugs/tmissinginit.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:refc"
   output: '''0
 0
 0
diff --git a/tests/ccgbugs/tmissingvolatile.nim b/tests/ccgbugs/tmissingvolatile.nim
index 1eccdc6b1..b877eff71 100644
--- a/tests/ccgbugs/tmissingvolatile.nim
+++ b/tests/ccgbugs/tmissingvolatile.nim
@@ -1,6 +1,6 @@
 discard """
   output: "1"
-  cmd: r"nim c --hints:on $options -d:release $file"
+  cmd: r"nim c --hints:on $options --mm:refc -d:release $file"
   ccodecheck: "'NI volatile state;'"
   targets: "c"
 """