Hi,
I'm trying to create a minimal reproducible examples for an error that appears when I try to convert a medium (a few thousands line of code) to --gc:orc|arc but I can't seem to get a minimal reproducible example.
The error I get is :
/home/rcaillaud/.cache/nim/mainDapo_r/@mstorage@[email protected]: In function ‘tySequence__48JTohSgTy339bRxHzUD8KA newSeq_storageZstorageZacq_4782(NI)’:
/home/rcaillaud/.cache/nim/mainDapo_r/@mstorage@[email protected]:6559:58: error: invalid initialization of reference of type ‘tySequence__9apztJSmgERYU8fZOjI4pOg&’ from expression of type ‘tySequence__48JTohSgTy339bRxHzUD8KA’
newSeq_OOZOOZOOZlocalwsZnimfftw51Zfftw51_548(result, len);
^
In file included from /home/rcaillaud/.cache/nim/mainDapo_r/@mstorage@[email protected]:7:0:
/home/rcaillaud/.cache/nim/mainDapo_r/@mstorage@[email protected]:508:31: note: in passing argument 1 of ‘void newSeq_OOZOOZOOZlocalwsZnimfftw51Zfftw51_548(tySequence__9apztJSmgERYU8fZOjI4pOg&, NI)’
N_LIB_PRIVATE N_NIMCALL(void, newSeq_OOZOOZOOZlocalwsZnimfftw51Zfftw51_548)(tySequence__9apztJSmgERYU8fZOjI4pOg& s, NI len);
^
/home/rcaillaud/.choosenim/toolchains/nim-#devel/lib/nimbase.h:256:44: note: in definition of macro ‘N_NIMCALL’
# define N_NIMCALL(rettype, name) rettype name /* no modifier */
^~~~
Which is very similar to https://github.com/nim-lang/Nim/issues/11636
This occurs with Nim v1.4.8 and Nim devel but only when I compile with -gc:arc (or orc) :
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-07-21
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: f8519657c43f458db9c915cec62c59022041eb05
I can't manage to find a reproducible examples but it seems related to the usage of type Foo = ref object of Model (I use Norm) and seq[Foo];
So how do you proceed on codegen error when you can't find the exact pattern that causes the error ?
@ynfle I can't compile with C because I have C++ exclusive dependencies.
@Araq Ah I would have liked that very much but I have to get my COVID vaccine this Friday 5 pm :(.