t20972.nim 588 B

123456789101112131415161718192021222324
  1. discard """
  2. matrix: "--mm:refc -d:release; --mm:orc -d:release"
  3. """
  4. {.passC: "-fsanitize=undefined -fsanitize-undefined-trap-on-error -Wall -Wextra -pedantic -flto".}
  5. {.passL: "-fsanitize=undefined -fsanitize-undefined-trap-on-error -flto".}
  6. # bug #20972
  7. type ForkedEpochInfo = object
  8. case kind: bool
  9. of true, false: discard
  10. var info = ForkedEpochInfo(kind: true)
  11. doAssert info.kind
  12. info.kind = false
  13. doAssert not info.kind
  14. block: # bug #22153
  15. discard allocCStringArray([""])
  16. discard allocCStringArray(["1234"])
  17. var s = "1245"
  18. s.add "1"
  19. discard allocCStringArray([s])