parent
e6e1e9574d
commit
581bcfe290
2 changed files with 14 additions and 0 deletions
|
|
@ -1441,6 +1441,7 @@ proc copySym*(s: PSym; id: ItemId): PSym =
|
||||||
result.position = s.position
|
result.position = s.position
|
||||||
result.loc = s.loc
|
result.loc = s.loc
|
||||||
result.annex = s.annex # BUGFIX
|
result.annex = s.annex # BUGFIX
|
||||||
|
result.constraint = s.constraint
|
||||||
if result.kind in {skVar, skLet, skField}:
|
if result.kind in {skVar, skLet, skField}:
|
||||||
result.guard = s.guard
|
result.guard = s.guard
|
||||||
result.bitsize = s.bitsize
|
result.bitsize = s.bitsize
|
||||||
|
|
|
||||||
13
tests/ccgbugs/t16027.nim
Normal file
13
tests/ccgbugs/t16027.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
discard """
|
||||||
|
ccodecheck: "__restrict__"
|
||||||
|
action: compile
|
||||||
|
joinable: false
|
||||||
|
"""
|
||||||
|
|
||||||
|
# see bug #16027
|
||||||
|
iterator myitems(s: seq[int]): int =
|
||||||
|
var data {.codegenDecl: "$# __restrict__ $#".} : ptr int = nil
|
||||||
|
yield 1
|
||||||
|
|
||||||
|
for i in @[1].myitems:
|
||||||
|
discard
|
||||||
Loading…
Add table
Add a link
Reference in a new issue