Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freestanding_module_import_2 assembly failure on ARM64 #23397

Open
davidebeatrici opened this issue Jan 7, 2025 · 6 comments
Open

freestanding_module_import_2 assembly failure on ARM64 #23397

davidebeatrici opened this issue Jan 7, 2025 · 6 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@davidebeatrici
Copy link
Contributor

davidebeatrici commented Jan 7, 2025

Describe the bug

DEBUG:  FAIL  [2210/2214] C:  3191.9 ms, R: 58072.836 ms vlib/v/gen/c/coutput_test.v
DEBUG: > testing whether .out files match:
DEBUG: OK   C:  2812ms, R:35ms v run vlib/v/gen/c/testdata/volatile.vv == vlib/v/gen/c/testdata/volatile.out 
DEBUG: OK   C:  4176ms, R:29ms v -d ddd1=true -d ddd2=false run vlib/v/gen/c/testdata/use_flag_comptime_with_if.vv == vlib/v/gen/c/testdata/use_flag_comptime_with_if.out 
DEBUG: OK   C:  4834ms, R:19ms v -d my_f64=2.0 -d my_i64=3 -d my_string="a four" -d my_bool -d my_char=g -d my_size=8 -d field_fsa_size=16 run vlib/v/gen/c/testdata/use_flag_comptime_values.vv == vlib/v/gen/c/testdata/use_flag_comptime_values.out 
DEBUG: OK   C:  4229ms, R:35ms v run vlib/v/gen/c/testdata/translated_module.vv == vlib/v/gen/c/testdata/translated_module.out 
DEBUG: OK   C:  2464ms, R:19ms v -translated run vlib/v/gen/c/testdata/translated_const_fixed_array.vv == vlib/v/gen/c/testdata/translated_const_fixed_array.out 
DEBUG: OK   C:  1980ms, R:38ms v run vlib/v/gen/c/testdata/sumtype_struct_depend_order.vv == vlib/v/gen/c/testdata/sumtype_struct_depend_order.out 
DEBUG: OK   C:  3118ms, R:12ms v run vlib/v/gen/c/testdata/sumtype_pass_by_reference.vv == vlib/v/gen/c/testdata/sumtype_pass_by_reference.out 
DEBUG: OK   C:  2375ms, R:21ms v run vlib/v/gen/c/testdata/struct_fn_member_print.vv == vlib/v/gen/c/testdata/struct_fn_member_print.out 
DEBUG: OK   C:  2850ms, R:12ms v run vlib/v/gen/c/testdata/struct_field_free.vv == vlib/v/gen/c/testdata/struct_field_free.out 
DEBUG: OK   C:  1963ms, R:16ms v run vlib/v/gen/c/testdata/strlit_len_optimization.vv == vlib/v/gen/c/testdata/strlit_len_optimization.out 
DEBUG: > skipping vlib/v/gen/c/testdata/spawn_stack_windows.vv on !windows
DEBUG: OK   C:  2112ms, R:32ms v run vlib/v/gen/c/testdata/spawn_stack_nix.vv == vlib/v/gen/c/testdata/spawn_stack_nix.out 
DEBUG: OK   C:  1832ms, R:59ms v run vlib/v/gen/c/testdata/spawn_call_fn_struct_field.vv == vlib/v/gen/c/testdata/spawn_call_fn_struct_field.out 
DEBUG: OK   C: 11312ms, R: 8ms v -prod -skip-unused run vlib/v/gen/c/testdata/self_printer_with_prod.vv == vlib/v/gen/c/testdata/self_printer_with_prod.out 
DEBUG: OK   C:   982ms, R: 7ms v run vlib/v/gen/c/testdata/ref_sumtype_map_as_struct_field.vv == vlib/v/gen/c/testdata/ref_sumtype_map_as_struct_field.out 
DEBUG: OK   C:   871ms, R: 6ms v run vlib/v/gen/c/testdata/preinclude_example_changed_order.vv == vlib/v/gen/c/testdata/preinclude_example_changed_order.out 
DEBUG: OK   C:  1306ms, R: 7ms v run vlib/v/gen/c/testdata/preinclude_example.vv == vlib/v/gen/c/testdata/preinclude_example.out 
DEBUG: OK   C:  1403ms, R: 7ms v run vlib/v/gen/c/testdata/platform_wrapper_non_emscripten.vv == vlib/v/gen/c/testdata/platform_wrapper_non_emscripten.out 
DEBUG: OK   C:   710ms, R: 6ms v run vlib/v/gen/c/testdata/none_literal_str.vv == vlib/v/gen/c/testdata/none_literal_str.out 
DEBUG: OK   C:   751ms, R: 7ms v run vlib/v/gen/c/testdata/mutable_receiver_type_mapping.vv == vlib/v/gen/c/testdata/mutable_receiver_type_mapping.out 
DEBUG: OK   C:   740ms, R: 6ms v run vlib/v/gen/c/testdata/multi_return_ignored_if_guard.vv == vlib/v/gen/c/testdata/multi_return_ignored_if_guard.out 
DEBUG: OK   C:   648ms, R: 6ms v -d not_defined run vlib/v/gen/c/testdata/init_fn_with_if_attr_not_defined.vv == vlib/v/gen/c/testdata/init_fn_with_if_attr_not_defined.out 
DEBUG: OK   C:   658ms, R: 6ms v -d init_on run vlib/v/gen/c/testdata/init_fn_with_if_attr_defined.vv == vlib/v/gen/c/testdata/init_fn_with_if_attr_defined.out 
DEBUG: OK   C:   710ms, R: 6ms v run vlib/v/gen/c/testdata/if_else_return.vv == vlib/v/gen/c/testdata/if_else_return.out 
DEBUG: OK   C:   668ms, R: 6ms v -d some_define run vlib/v/gen/c/testdata/if_define_check_set.vv == vlib/v/gen/c/testdata/if_define_check_set.out 
DEBUG: OK   C:   658ms, R: 6ms v -d some_define= run vlib/v/gen/c/testdata/if_define_check_not_set.vv == vlib/v/gen/c/testdata/if_define_check_not_set.out 
DEBUG: OK   C:   706ms, R: 6ms v run vlib/v/gen/c/testdata/gen_expr_to_string_with_call_and_return_ref.vv == vlib/v/gen/c/testdata/gen_expr_to_string_with_call_and_return_ref.out 
DEBUG: V panic: compilation failed: ================== C compilation error (from gcc): ==============
DEBUG: cc: /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/freestanding_module_import_2.exe.01JGQMFTHXFKW4ZQ759Z70Y9NV.tmp.c: In function ‘sys_call1’:
DEBUG: cc: /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/freestanding_module_import_2.exe.01JGQMFTHXFKW4ZQ759Z70Y9NV.tmp.c:6826:9: error: impossible constraint in ‘asm’
DEBUG: cc:  6826 |         __asm__ (
DEBUG: cc:       |         ^~~~~~~
DEBUG: cc: /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/freestanding_module_import_2.exe.01JGQMFTHXFKW4ZQ759Z70Y9NV.tmp.c: In function ‘sys_call2’:
DEBUG: cc: /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/freestanding_module_import_2.exe.01JGQMFTHXFKW4ZQ759Z70Y9NV.tmp.c:6836:9: warning: ‘asm’ operand 3 probably does not match constraints
DEBUG: cc:  6836 |         __asm__ (
DEBUG: cc:       |         ^~~~~~~
DEBUG: cc: /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/freestanding_module_import_2.exe.01JGQMFTHXFKW4ZQ759Z70Y9NV.tmp.c: In function ‘sys_call3’:
DEBUG: cc: /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/freestanding_module_import_2.exe.01JGQMFTHXFKW4ZQ759Z70Y9NV.tmp.c:6847:9: warning: ‘asm’ operand 3 probably does not match constraints
DEBUG: cc:  6847 |         __asm__ (
DEBUG: cc:       |         ^~~~~~~
DEBUG: ... (the original output was 24 lines long, and was truncated to 12 lines)
DEBUG: =================================================================
DEBUG: (You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).
DEBUG: builder error: 
DEBUG: ==================
DEBUG: C error found. It should never happen, when compiling pure V code.
DEBUG: This is a V compiler bug, please report it using `v bug file.v`,
DEBUG: or goto https://github.com/vlang/v/issues/new/choose .
DEBUG: You can also use #help on Discord: https://discord.gg/vlang .
DEBUG: v hash: 3953445
DEBUG:                                                         | 0xaaaad4b7a5c4 | /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/511_11/coutput_test(+0x3a5c4) 
DEBUG:                                                         | 0xaaaad4b790c0 | /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/511_11/coutput_test(+0x390c0) 
DEBUG:                                                         | 0xaaaad4b7c2dc | /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/511_11/coutput_test(+0x3c2dc) 
DEBUG:                                                         | 0xffff8dcd0a94 | /lib64/libc.so.6(+0x30a94) 
DEBUG:                                                         | 0xffff8dcd0b78 | /lib64/libc.so.6(__libc_start_main+0x98) 
DEBUG:                                                         | 0xaaaad4b59030 | /tmp/v_192/tsession_ffff89a50020_01JGQMDK9D7GBF09KXZVM9C32W/511_11/coutput_test(+0x19030)

Reproduction Steps

v vlib/v/gen/c/coutput_test.v

Expected Behavior

The test to succeed.

Current Behavior

The test fails to build.

Possible Solution

No response

Additional Information/Context

Full log: https://file-store.openmandriva.org/api/v1/file_stores/32f80acbbdb28ac8e2d5eea7943d7efb4fcce010.log?show=true

V version

0.4.9

Environment details (OS name and version, etc.)

OpenMandriva on ARM64.

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Huly®: V_0.6-21828

@davidebeatrici davidebeatrici added the Bug This tag is applied to issues which reports bugs. label Jan 7, 2025
@JalonSolov
Copy link
Contributor

I see this

$ v vlib/v/gen/c/coutput_test.v
> testing whether .out files match:
OK   C:    85ms, R: 1ms v run vlib/v/gen/c/testdata/mutable_receiver_type_mapping.vv == vlib/v/gen/c/testdata/mutable_receiver_type_mapping.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/c_varargs.vv == vlib/v/gen/c/testdata/c_varargs.out 
> skipping vlib/v/gen/c/testdata/spawn_stack_windows.vv on !windows
OK   C:    83ms, R: 1ms v -autofree run vlib/v/gen/c/testdata/assigning_and_printing_struct_with_optional_field.vv == vlib/v/gen/c/testdata/assigning_and_printing_struct_with_optional_field.out 
OK   C:    85ms, R: 1ms v run vlib/v/gen/c/testdata/preinclude_example_changed_order.vv == vlib/v/gen/c/testdata/preinclude_example_changed_order.out 
OK   C:  2213ms, R: 1ms v -prod -skip-unused run vlib/v/gen/c/testdata/self_printer_with_prod.vv == vlib/v/gen/c/testdata/self_printer_with_prod.out 
OK   C:    82ms, R: 1ms v -d some_define= run vlib/v/gen/c/testdata/if_define_check_not_set.vv == vlib/v/gen/c/testdata/if_define_check_not_set.out 
OK   C:  2506ms, R: 1ms v -prod -no-skip-unused run vlib/v/gen/c/testdata/embed_with_prod.vv == vlib/v/gen/c/testdata/embed_with_prod.out 
OK   C:    87ms, R: 1ms v -d my_f64=2.0 -d my_i64=3 -d my_string="a four" -d my_bool -d my_char=g -d my_size=8 -d field_fsa_size=16 run vlib/v/gen/c/testdata/use_flag_comptime_values.vv == vlib/v/gen/c/testdata/use_flag_comptime_values.out 
OK   C:    83ms, R: 1ms v -d some_define run vlib/v/gen/c/testdata/if_define_check_set.vv == vlib/v/gen/c/testdata/if_define_check_set.out 
OK   C:    86ms, R: 1ms v run vlib/v/gen/c/testdata/comptime_interface_field.vv == vlib/v/gen/c/testdata/comptime_interface_field.out 
OK   C:    89ms, R: 1ms v run vlib/v/gen/c/testdata/if_else_return.vv == vlib/v/gen/c/testdata/if_else_return.out 
OK   C:   315ms, R: 1ms v -cc gcc run vlib/v/gen/c/testdata/freestanding_module_import_1.vv == vlib/v/gen/c/testdata/freestanding_module_import_1.out 
OK   C:    81ms, R: 1ms v run vlib/v/gen/c/testdata/enum_switch_case.vv == vlib/v/gen/c/testdata/enum_switch_case.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/addr_from_range.vv == vlib/v/gen/c/testdata/addr_from_range.out 
> skipping vlib/v/gen/c/testdata/aligned_attr_gcc_windows.vv on !windows
OK   C:    84ms, R: 1ms v run vlib/v/gen/c/testdata/addition.vv == vlib/v/gen/c/testdata/addition.out 
OK   C:    88ms, R: 1ms v run vlib/v/gen/c/testdata/multi_return_ignored_if_guard.vv == vlib/v/gen/c/testdata/multi_return_ignored_if_guard.out 
OK   C:    91ms, R: 1ms v -d ddd1=true -d ddd2=false run vlib/v/gen/c/testdata/use_flag_comptime_with_if.vv == vlib/v/gen/c/testdata/use_flag_comptime_with_if.out 
OK   C:    89ms, R: 1ms v -g run vlib/v/gen/c/testdata/comptime_if_cond.vv == vlib/v/gen/c/testdata/comptime_if_cond.out 
OK   C:    83ms, R: 1ms v run vlib/v/gen/c/testdata/alias_c_parent_type_decl.vv == vlib/v/gen/c/testdata/alias_c_parent_type_decl.out 
OK   C:    88ms, R: 1ms v run vlib/v/gen/c/testdata/alias_of_array_method_call.vv == vlib/v/gen/c/testdata/alias_of_array_method_call.out 
OK   C:    90ms, R: 1ms v run vlib/v/gen/c/testdata/comptime_option_call.vv == vlib/v/gen/c/testdata/comptime_option_call.out 
OK   C:    83ms, R: 1ms v -d init_on run vlib/v/gen/c/testdata/init_fn_with_if_attr_defined.vv == vlib/v/gen/c/testdata/init_fn_with_if_attr_defined.out 
OK   C:    84ms, R: 1ms v -d not_defined run vlib/v/gen/c/testdata/init_fn_with_if_attr_not_defined.vv == vlib/v/gen/c/testdata/init_fn_with_if_attr_not_defined.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/struct_fn_member_print.vv == vlib/v/gen/c/testdata/struct_fn_member_print.out 
OK   C:    89ms, R: 2ms v run vlib/v/gen/c/testdata/spawn_stack_nix.vv == vlib/v/gen/c/testdata/spawn_stack_nix.out 
OK   C:    90ms, R: 1ms v run vlib/v/gen/c/testdata/attr_string_quotes_escape.vv == vlib/v/gen/c/testdata/attr_string_quotes_escape.out 
> skipping vlib/v/gen/c/testdata/aligned_attr_msvc_windows.vv on !windows
OK   C:   287ms, R: 0ms v -cc gcc -freestanding run vlib/v/gen/c/testdata/freestanding_module_import_2.vv == vlib/v/gen/c/testdata/freestanding_module_import_2.out 
OK   C:    90ms, R: 1ms v run vlib/v/gen/c/testdata/alias_interface_method_call.vv == vlib/v/gen/c/testdata/alias_interface_method_call.out 
OK   C:    88ms, R: 1ms v run vlib/v/gen/c/testdata/struct_field_free.vv == vlib/v/gen/c/testdata/struct_field_free.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/translated_module.vv == vlib/v/gen/c/testdata/translated_module.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/none_literal_str.vv == vlib/v/gen/c/testdata/none_literal_str.out 
OK   C:    82ms, R: 1ms v -translated run vlib/v/gen/c/testdata/translated_const_fixed_array.vv == vlib/v/gen/c/testdata/translated_const_fixed_array.out 
OK   C:    85ms, R: 1ms v run vlib/v/gen/c/testdata/sumtype_pass_by_reference.vv == vlib/v/gen/c/testdata/sumtype_pass_by_reference.out 
OK   C:    89ms, R: 1ms v run vlib/v/gen/c/testdata/preinclude_example.vv == vlib/v/gen/c/testdata/preinclude_example.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/assert_fncalls.vv == vlib/v/gen/c/testdata/assert_fncalls.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/for_in_side_effect.vv == vlib/v/gen/c/testdata/for_in_side_effect.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/array_init_no_error.vv == vlib/v/gen/c/testdata/array_init_no_error.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/strlit_len_optimization.vv == vlib/v/gen/c/testdata/strlit_len_optimization.out 
OK   C:    91ms, R: 1ms v run vlib/v/gen/c/testdata/export_and_weak.vv == vlib/v/gen/c/testdata/export_and_weak.out 
OK   C:    90ms, R: 1ms v run vlib/v/gen/c/testdata/ref_sumtype_map_as_struct_field.vv == vlib/v/gen/c/testdata/ref_sumtype_map_as_struct_field.out 
OK   C:    91ms, R: 1ms v run vlib/v/gen/c/testdata/building_multiple_c_sources.vv == vlib/v/gen/c/testdata/building_multiple_c_sources.out 
OK   C:    89ms, R: 1ms v run vlib/v/gen/c/testdata/const_references.vv == vlib/v/gen/c/testdata/const_references.out 
OK   C:    90ms, R: 2ms v run vlib/v/gen/c/testdata/spawn_call_fn_struct_field.vv == vlib/v/gen/c/testdata/spawn_call_fn_struct_field.out 
OK   C:  3036ms, R: 1ms v -prod -no-skip-unused run vlib/v/gen/c/testdata/embed_with_prod_zlib.vv == vlib/v/gen/c/testdata/embed_with_prod_zlib.out 
OK   C:    84ms, R: 1ms v run vlib/v/gen/c/testdata/sumtype_struct_depend_order.vv == vlib/v/gen/c/testdata/sumtype_struct_depend_order.out 
OK   C:    83ms, R: 1ms v run vlib/v/gen/c/testdata/aligned_attr_nix.vv == vlib/v/gen/c/testdata/aligned_attr_nix.out 
OK   C:    87ms, R: 1ms v run vlib/v/gen/c/testdata/literal_c_variadic_arg.vv == vlib/v/gen/c/testdata/literal_c_variadic_arg.out 
OK   C:    88ms, R: 1ms v run vlib/v/gen/c/testdata/platform_wrapper_non_emscripten.vv == vlib/v/gen/c/testdata/platform_wrapper_non_emscripten.out 
OK   C:    90ms, R: 1ms v run vlib/v/gen/c/testdata/gen_expr_to_string_with_call_and_return_ref.vv == vlib/v/gen/c/testdata/gen_expr_to_string_with_call_and_return_ref.out 
OK   C:    88ms, R: 1ms v run vlib/v/gen/c/testdata/for_in.vv == vlib/v/gen/c/testdata/for_in.out 
OK   C:    86ms, R: 1ms v run vlib/v/gen/c/testdata/volatile.vv == vlib/v/gen/c/testdata/volatile.out 
OK   C:   147ms, R: 1ms v -d callstack run vlib/v/gen/c/testdata/callstack.vv == vlib/v/gen/c/testdata/callstack.out 
OK   C:  2645ms, R: 1ms v -prod run vlib/v/gen/c/testdata/embed_with_prod_and_several_decoders.vv == vlib/v/gen/c/testdata/embed_with_prod_and_several_decoders.out 
OK   C:    84ms, R: 1ms v run vlib/v/gen/c/testdata/array_as_interface.vv == vlib/v/gen/c/testdata/array_as_interface.out 
> testing whether all line patterns in `.c.must_have` files match:
OK   C:   81ms v -o - -enable-globals -no-skip-unused vlib/v/gen/c/testdata/global_initializer_nix.vv matches vlib/v/gen/c/testdata/global_initializer_nix.c.must_have 
OK   C:  107ms v -o - -no-skip-unused vlib/v/gen/c/testdata/embed.vv matches vlib/v/gen/c/testdata/embed.c.must_have 
> skipping vlib/v/gen/c/testdata/aligned_attr_msvc_windows.vv on !windows
OK   C:  106ms v -o - -prod -no-skip-unused vlib/v/gen/c/testdata/embed_with_prod_zlib.vv matches vlib/v/gen/c/testdata/embed_with_prod_zlib.c.must_have 
OK   C:   72ms v -o - -autofree vlib/v/gen/c/testdata/interface_auto_free.vv matches vlib/v/gen/c/testdata/interface_auto_free.c.must_have 
OK   C:   74ms v -o -  vlib/v/gen/c/testdata/compare_structs.vv matches vlib/v/gen/c/testdata/compare_structs.c.must_have 
OK   C:   76ms v -o - -os windows vlib/v/gen/c/testdata/console_windows_program.vv matches vlib/v/gen/c/testdata/console_windows_program.c.must_have 
OK   C:   75ms v -o -  vlib/v/gen/c/testdata/addition.vv matches vlib/v/gen/c/testdata/addition.c.must_have 
OK   C:   83ms v -o -  vlib/v/gen/c/testdata/translated_module.vv matches vlib/v/gen/c/testdata/translated_module.c.must_have 
OK   C:   85ms v -o - -shared vlib/v/gen/c/testdata/closure_shared_lib.vv matches vlib/v/gen/c/testdata/closure_shared_lib.c.must_have 
> skipping vlib/v/gen/c/testdata/waiter_fns_gen_windows.vv on !windows
OK   C:   79ms v -o - -d customflag -no-skip-unused vlib/v/gen/c/testdata/comptime_if_attribute_in_test2.vv matches vlib/v/gen/c/testdata/comptime_if_attribute_in_test2.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/const_references.vv matches vlib/v/gen/c/testdata/const_references.c.must_have 
OK   C:   76ms v -o -  vlib/v/gen/c/testdata/alias_c_parent_type_decl.vv matches vlib/v/gen/c/testdata/alias_c_parent_type_decl.c.must_have 
OK   C:  109ms v -o - -prod -no-skip-unused vlib/v/gen/c/testdata/embed_with_prod.vv matches vlib/v/gen/c/testdata/embed_with_prod.c.must_have 
OK   C:   79ms v -o -  vlib/v/gen/c/testdata/c_extern_on_C_fn_declarations.vv matches vlib/v/gen/c/testdata/c_extern_on_C_fn_declarations.c.must_have 
> skipping vlib/v/gen/c/testdata/aligned_attr_gcc_windows.vv on !windows
OK   C:   77ms v -o - -d not_defined vlib/v/gen/c/testdata/init_fn_with_if_attr_not_defined.vv matches vlib/v/gen/c/testdata/init_fn_with_if_attr_not_defined.c.must_have 
OK   C:   74ms v -o -  vlib/v/gen/c/testdata/check_combination_of_alias_and_sumtype.vv matches vlib/v/gen/c/testdata/check_combination_of_alias_and_sumtype.c.must_have 
OK   C:   81ms v -o - -os windows vlib/v/gen/c/testdata/gui_windows_program_with_console_tag.vv matches vlib/v/gen/c/testdata/gui_windows_program_with_console_tag.c.must_have 
OK   C:   80ms v -o -  vlib/v/gen/c/testdata/unused_result_err.vv matches vlib/v/gen/c/testdata/unused_result_err.c.must_have 
> skipping vlib/v/gen/c/testdata/spawn_stack_windows.vv on !windows
OK   C:   78ms v -o -  vlib/v/gen/c/testdata/assert_fncalls.vv matches vlib/v/gen/c/testdata/assert_fncalls.c.must_have 
OK   C:   75ms v -o - -enable-globals vlib/v/gen/c/testdata/global_export_nix.vv matches vlib/v/gen/c/testdata/global_export_nix.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/export_and_weak.vv matches vlib/v/gen/c/testdata/export_and_weak.c.must_have 
OK   C:   78ms v -o -  vlib/v/gen/c/testdata/fixed_arr_compare.vv matches vlib/v/gen/c/testdata/fixed_arr_compare.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/spawn_stack_nix.vv matches vlib/v/gen/c/testdata/spawn_stack_nix.c.must_have 
OK   C:   79ms v -o - -autofree vlib/v/gen/c/testdata/autofree_json_encode.vv matches vlib/v/gen/c/testdata/autofree_json_encode.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/if_else_return.vv matches vlib/v/gen/c/testdata/if_else_return.c.must_have 
OK   C:   93ms v -o - -no-skip-unused vlib/v/gen/c/testdata/unused_import_aliased_as_underscore.vv matches vlib/v/gen/c/testdata/unused_import_aliased_as_underscore.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/strlit_len_optimization.vv matches vlib/v/gen/c/testdata/strlit_len_optimization.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/for_in.vv matches vlib/v/gen/c/testdata/for_in.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/c_varargs.vv matches vlib/v/gen/c/testdata/c_varargs.c.must_have 
OK   C:   78ms v -o - -no-skip-unused vlib/v/gen/c/testdata/alias_char_ptr_to_ptr.vv matches vlib/v/gen/c/testdata/alias_char_ptr_to_ptr.c.must_have 
OK   C:   75ms v -o -  vlib/v/gen/c/testdata/aligned_attr_nix.vv matches vlib/v/gen/c/testdata/aligned_attr_nix.c.must_have 
OK   C:   77ms v -o -  vlib/v/gen/c/testdata/linker_section_nix.vv matches vlib/v/gen/c/testdata/linker_section_nix.c.must_have 
OK   C:  114ms v -o - -prod vlib/v/gen/c/testdata/embed_with_prod_and_several_decoders.vv matches vlib/v/gen/c/testdata/embed_with_prod_and_several_decoders.c.must_have 
OK   C:   74ms v -o - -d init_on vlib/v/gen/c/testdata/init_fn_with_if_attr_defined.vv matches vlib/v/gen/c/testdata/init_fn_with_if_attr_defined.c.must_have 
OK   C:   79ms v -o -  vlib/v/gen/c/testdata/waiter_fns_gen_nix.vv matches vlib/v/gen/c/testdata/waiter_fns_gen_nix.c.must_have 
OK   C:   75ms v -o -  vlib/v/gen/c/testdata/enum_switch_case.vv matches vlib/v/gen/c/testdata/enum_switch_case.c.must_have 
OK   C:   78ms v -o -  vlib/v/gen/c/testdata/volatile.vv matches vlib/v/gen/c/testdata/volatile.c.must_have 
OK   C:   80ms v -o -  vlib/v/gen/c/testdata/addr.vv matches vlib/v/gen/c/testdata/addr.c.must_have 
OK   C:   80ms v -o - -enable-globals vlib/v/gen/c/testdata/globals_with_weak_tag.vv matches vlib/v/gen/c/testdata/globals_with_weak_tag.c.must_have 
OK   C:   76ms v -o - -os wasm32_emscripten vlib/v/gen/c/testdata/platform_wrapper_emscripten.vv matches vlib/v/gen/c/testdata/platform_wrapper_emscripten.c.must_have 
OK   C:   76ms v -o -  vlib/v/gen/c/testdata/comp_if_unknown.vv matches vlib/v/gen/c/testdata/comp_if_unknown.c.must_have 
OK   C:   83ms v -o - -shared vlib/v/gen/c/testdata/func_type_dependency.vv matches vlib/v/gen/c/testdata/func_type_dependency.c.must_have 
OK   C:   80ms v -o -  vlib/v/gen/c/testdata/addr_from_range.vv matches vlib/v/gen/c/testdata/addr_from_range.c.must_have 
OK   C:   78ms v -o -  vlib/v/gen/c/testdata/struct_fn_member_print.vv matches vlib/v/gen/c/testdata/struct_fn_member_print.c.must_have 
OK   C:   79ms v -o - -os windows vlib/v/gen/c/testdata/gui_windows_program.vv matches vlib/v/gen/c/testdata/gui_windows_program.c.must_have 
OK   C:   79ms v -o -  vlib/v/gen/c/testdata/c_ident_for_ptr_arg.vv matches vlib/v/gen/c/testdata/c_ident_for_ptr_arg.c.must_have 
$

@davidebeatrici
Copy link
Contributor Author

What distribution and compiler are you using?

@JalonSolov
Copy link
Contributor

Manjaro on x64, tcc compiler.

@davidebeatrici
Copy link
Contributor Author

Alright, could you try with GCC, please?

@JalonSolov
Copy link
Contributor

Same successful output. Command was v -cc gcc vlib/v/gen/c/coutput_test.v. Also worked with v -cc clang vlib/v/gen/c/coutput_test.v.

@kbkpbot
Copy link
Contributor

kbkpbot commented Jan 8, 2025

This is because vlib/builtin/linux_bare/linux_syscalls.v has only amd64 implementation, no arm64.

fn sys_call0(scn u64) u64 {
        mut res := u64(0)
        asm amd64 {
                syscall
                ; =a (res)
                ; a (scn)
        }
        return res
}

fn sys_call1(scn u64, arg1 u64) u64 {
        mut res := u64(0)
        asm amd64 {
                syscall
                ; =a (res)
                ; a (scn)
                  D (arg1)
        }
        return res
}
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

3 participants