https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125451
--- Comment #4 from Thomas Wolff <towo at computer dot org> --- Also, using -S shows there is only minor difference in the assembly 20c20 < movzwl %ax, %eax --- > cwtl 23,24d22 < movl 16(%rbp), %edx < movl %edx, %r8d 25a24 > movl 16(%rbp), %ecx 26a26 > movl %ecx, %r8d 58d57 < .def __main; .scl 2; .type 32; .endef 119c118,119 < .ident "GCC: (GNU) 13.4.0" --- > .def __main; .scl 2; .type 32; .endef > .ident "GCC: (GNU) 16.0.1 20260412 (experimental)" and cross-linking those (and also then running both binaries on both systems) confirms the issue is in the linking step.
