nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.61k stars 1.47k forks source link

Test failures on aarch64 #24287

Open ggardet opened 1 month ago

ggardet commented 1 month ago

Description

Test failures on openSUSE Tumbleweed aarch64:

[ 1419s] FAIL: tests/compiler/tasm.nim c                                    ( 1.13 sec)
[ 1419s] Test "tests/compiler/tasm.nim" in category "compiler"
[ 1419s] Failure: reNimcCrash
[ 1419s] $ /home/abuild/rpmbuild/BUILD/nim-2.0.6/bin/nim c --hints:on -d:testing --nimblePath:build/deps/pkgs2   --nimCache:nimcache/tests/compiler/tasm.nim_4a8a08f09d37b73795649038408b5f33  tests/compiler/tasm.nim
[ 1419s] Hint: used config file '/home/abuild/rpmbuild/BUILD/nim-2.0.6/config/nim.cfg' [Conf]
[ 1419s] Hint: used config file '/home/abuild/rpmbuild/BUILD/nim-2.0.6/config/config.nims' [Conf]
[ 1419s] Hint: used config file '/home/abuild/rpmbuild/BUILD/nim-2.0.6/tests/config.nims' [Conf]
[ 1419s] Hint: used config file '/home/abuild/rpmbuild/BUILD/nim-2.0.6/tests/compiler/nim.cfg' [Conf]
[ 1419s] CC: ../../lib/system/exceptions.nim
[ 1419s] CC: ../../lib/std/private/since.nim
[ 1419s] CC: ../../lib/system/ctypes.nim
[ 1419s] CC: ../../lib/std/sysatomics.nim
[ 1419s] CC: ../../lib/system/ansi_c.nim
[ 1419s] CC: ../../lib/system/memory.nim
[ 1419s] CC: ../../lib/std/private/syslocks.nim
[ 1419s] CC: ../../lib/std/private/threadtypes.nim
[ 1419s] CC: ../../lib/std/private/digitsutils.nim
[ 1419s] CC: ../../lib/std/private/miscdollars.nim
[ 1419s] CC: ../../lib/std/assertions.nim
[ 1419s] CC: ../../lib/system/iterators.nim
[ 1419s] CC: ../../lib/system/coro_detection.nim
[ 1419s] CC: ../../lib/std/private/dragonbox.nim
[ 1419s] CC: ../../lib/std/private/schubfach.nim
[ 1419s] CC: ../../lib/std/formatfloat.nim
[ 1419s] CC: ../../lib/std/objectdollar.nim
[ 1419s] CC: ../../lib/system/dollars.nim
[ 1419s] CC: ../../lib/std/typedthreads.nim
[ 1419s] CC: ../../lib/system/stacktraces.nim
[ 1419s] CC: ../../lib/std/private/bitops_utils.nim
[ 1419s] CC: ../../lib/system/countbits_impl.nim
[ 1419s] CC: ../../lib/system/repr_v2.nim
[ 1419s] CC: ../../lib/std/widestrs.nim
[ 1419s] CC: ../../lib/std/syncio.nim
[ 1419s] CC: ../../lib/system.nim
[ 1419s] CC: tasm.nim
[ 1419s] /tmp/cclh6zGD.s: Assembler messages:
[ 1419s] /tmp/cclh6zGD.s:178: Error: expected a register or register list at operand 1 -- `add $1,x0'
[ 1419s] Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -pthread -std=c99   -I/home/abuild/rpmbuild/BUILD/nim-2.0.6/lib -I/home/abuild/rpmbuild/BUILD/nim-2.0.6/tests/compiler -o /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/compiler/tasm.nim_4a8a08f09d37b73795649038408b5f33/@mtasm.nim.c.o /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/compiler/tasm.nim_4a8a08f09d37b73795649038408b5f33/@mtasm.nim.c' failed with exit code: 1
[ 1434s] FAIL: tests/objects/tobjcov.nim c                                  ( 1.45 sec)
[ 1434s] Test "tests/objects/tobjcov.nim" in category "objects"
[ 1434s] Failure: reNimcCrash
[ 1434s] $ /home/abuild/rpmbuild/BUILD/nim-2.0.6/bin/nim c --hints:on -d:testing --nimblePath:build/deps/pkgs2   --nimCache:nimcache/tests/objects/tobjcov.nim_4a8a08f09d37b73795649038408b5f33  tests/objects/tobjcov.nim
[ 1434s] Hint: used config file '/home/abuild/rpmbuild/BUILD/nim-2.0.6/config/nim.cfg' [Conf]
[ 1434s] Hint: used config file '/home/abuild/rpmbuild/BUILD/nim-2.0.6/config/config.nims' [Conf]
[ 1434s] Hint: used config file '/home/abuild/rpmbuild/BUILD/nim-2.0.6/tests/config.nims' [Conf]
[ 1434s] tobjcov.nim(17, 6) Hint: 'ap' is declared but not used [XDeclaredButNotUsed]
[ 1434s] CC: ../../lib/system/exceptions.nim
[ 1434s] CC: ../../lib/std/private/since.nim
[ 1434s] CC: ../../lib/system/ctypes.nim
[ 1434s] CC: ../../lib/std/sysatomics.nim
[ 1434s] CC: ../../lib/system/ansi_c.nim
[ 1434s] CC: ../../lib/system/memory.nim
[ 1434s] CC: ../../lib/std/private/syslocks.nim
[ 1434s] CC: ../../lib/std/private/threadtypes.nim
[ 1434s] CC: ../../lib/std/private/digitsutils.nim
[ 1434s] CC: ../../lib/std/private/miscdollars.nim
[ 1434s] CC: ../../lib/std/assertions.nim
[ 1434s] CC: ../../lib/system/iterators.nim
[ 1434s] CC: ../../lib/system/coro_detection.nim
[ 1434s] CC: ../../lib/std/private/dragonbox.nim
[ 1434s] CC: ../../lib/std/private/schubfach.nim
[ 1434s] CC: ../../lib/std/formatfloat.nim
[ 1434s] CC: ../../lib/std/objectdollar.nim
[ 1434s] CC: ../../lib/system/dollars.nim
[ 1434s] CC: ../../lib/std/typedthreads.nim
[ 1434s] CC: ../../lib/system/stacktraces.nim
[ 1434s] CC: ../../lib/std/private/bitops_utils.nim
[ 1434s] CC: ../../lib/system/countbits_impl.nim
[ 1434s] CC: ../../lib/system/repr_v2.nim
[ 1434s] CC: ../../lib/std/widestrs.nim
[ 1434s] CC: ../../lib/std/syncio.nim
[ 1434s] CC: ../../lib/system.nim
[ 1434s] CC: tobjcov.nim
[ 1434s] /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/objects/tobjcov.nim_4a8a08f09d37b73795649038408b5f33/@mtobjcov.nim.c: In function ‘NimMainModule’:
[ 1434s] /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/objects/tobjcov.nim_4a8a08f09d37b73795649038408b5f33/@mtobjcov.nim.c:162:56: error: assignment to ‘tyProc__TUiTBv9aW4IvMRnoP50YGDw’ {aka ‘void (*)(tyObject_TA__xNfsszU9cfPEqAtTvpVpYYA *)’} from incompatible pointer type ‘void (*)(tyObject_TB__U9bTppYOtItGELjlBe2q0Jg *)’ [-Wincompatible-pointer-types]
[ 1434s]   162 |         nimlf_(22, "tobjcov.nim");      f__tobjcov_u34 = bp__tobjcov_u7;
[ 1434s]       |                                                        ^
[ 1434s] Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -pthread   -I/home/abuild/rpmbuild/BUILD/nim-2.0.6/lib -I/home/abuild/rpmbuild/BUILD/nim-2.0.6/tests/objects -o /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/objects/tobjcov.nim_4a8a08f09d37b73795649038408b5f33/@mtobjcov.nim.c.o /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/objects/tobjcov.nim_4a8a08f09d37b73795649038408b5f33/@mtobjcov.nim.c' failed with exit code: 1
[ 2205s] /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/megatest_4a8a08f09d37b73795649038408b5f33/@mobjects@stoop1.nim.c: In function ‘init__objectsZtoop49_u95’:
[ 2205s] /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/megatest_4a8a08f09d37b73795649038408b5f33/@mobjects@stoop1.nim.c:200:43: error: assignment to ‘tyProc__TWQxHSB84qMQfAN2Ap9bVhw’ {aka ‘void (*)(tyObject_TFigure__svHNF2RWaxzzfAQX9cM9bosQ *)’} from incompatible pointer type ‘void (*)(tyObject_TRectangle__31BGECx1CNi6rP3YseNjcg *)’ [-Wincompatible-pointer-types]
[ 2205s]   200 |         nimln_(35);     (*my_p0).Sup.draw = drawRectangle__objectsZtoop49_u93;
[ 2205s]       |                                           ^
[ 2205s] /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/megatest_4a8a08f09d37b73795649038408b5f33/@mobjects@stoop1.nim.c: In function ‘init__objectsZtoop49_u35’:
[ 2205s] /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/megatest_4a8a08f09d37b73795649038408b5f33/@mobjects@stoop1.nim.c:320:43: error: assignment to ‘tyProc__TWQxHSB84qMQfAN2Ap9bVhw’ {aka ‘void (*)(tyObject_TFigure__svHNF2RWaxzzfAQX9cM9bosQ *)’} from incompatible pointer type ‘void (*)(tyObject_TCircle__AYUL46F30iSn43qozLLgYw *)’ [-Wincompatible-pointer-types]
[ 2205s]   320 |         nimln_(23);     (*my_p0).Sup.draw = drawCircle__objectsZtoop49_u29;
[ 2205s]       |                                           ^
[ 2205s] Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -pthread   -I/home/abuild/rpmbuild/BUILD/nim-2.0.6/lib -I/home/abuild/rpmbuild/BUILD/nim-2.0.6/tests -o /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/megatest_4a8a08f09d37b73795649038408b5f33/@mobjects@stoop1.nim.c.o /home/abuild/rpmbuild/BUILD/nim-2.0.6/nimcache/tests/megatest_4a8a08f09d37b73795649038408b5f33/@mobjects@stoop1.nim.c' failed with exit code: 1
[ 2205s] 
[ 2205s] 
[ 2205s] 
[ 2205s] FAIL: megatest compilation failed

Nim Version

2.0.6 on openSUSE Tumbleweed aarch64

Current Output

No response

Expected Output

No response

Known Workarounds

No response

Additional Information

No response

metagn commented 1 month ago

tasm would be acceptable since it's a different architecture but it uses $1 (dollar sign) instead of %1, not sure if this is supposed to work.

toop1 and tobjcov both cast proc (x: var Subtype) where Subtype = object of Supertype to proc (x: var Supertype). It seems this cast is treated as a no-op by codegen time.

ringabout commented 3 weeks ago

Probably it was fixed by the devel version

ggardet commented 3 weeks ago

Probably it was fixed by the devel version

https://github.com/nim-lang/Nim/commits/devel/tests/compiler/tasm.nim had no update, so I guess this has not been fixed.

ringabout commented 3 weeks ago

tasm.nim

=> #24389

What about the other ones?