fixes a long-standing ARC bug (#20849)
* fixes an ARC bug * add a testcase
This commit is contained in:
parent
4a3be7e29e
commit
3d692d08f7
2 changed files with 18 additions and 2 deletions
|
|
@ -546,3 +546,15 @@ proc fooz(sec: var InputSectionBase) =
|
|||
var sec = create(InputSection)
|
||||
sec[] = InputSection(relocations: newSeq[int]())
|
||||
fooz sec[]
|
||||
|
||||
block:
|
||||
type
|
||||
Data = ref object
|
||||
id: int
|
||||
proc main =
|
||||
var x = Data(id: 99)
|
||||
var y = x
|
||||
x[] = Data(id: 778)[]
|
||||
doAssert y.id == 778
|
||||
doAssert x[].id == 778
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue