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

Compiling vab with -autofree doesn't work #23219

Open
snowflakednew opened this issue Dec 20, 2024 · 1 comment
Open

Compiling vab with -autofree doesn't work #23219

snowflakednew opened this issue Dec 20, 2024 · 1 comment
Labels
Autofree Bugs/feature requests, that are related to -autofree. Bug This tag is applied to issues which reports bugs.

Comments

@snowflakednew
Copy link

snowflakednew commented Dec 20, 2024

Describe the bug

Compiling vab with -autofree does not work

Reproduction Steps

v install vab && v -autofree -show-timings ~/.vmodules/vab

Expected Behavior

V successfully compiles vab

Current Behavior

0.007    ms v start
0.860    ms v parsing CLI args
293.408  ms Builder.front_stages.parse_files
4.844    ms Builder.resolve_deps
1641.288 ms Builder.parse_imports
239.343  ms SCAN
1143.589 ms PARSE
1934.913 ms ALL_FRONT_STAGES
0.143    ms Checker.generic_insts_to_concrete
1321.017 ms CHECK
142.758  ms TRANSFORM
11.426   ms Table.complete_interface_check
112.586  ms all_fn_const_and_global
142.492  ms MARKUSED
0.527    ms Gen.write_sorted_fn_typesymbol_declaration
23.974   ms Gen.sort_structs
35.049   ms cgen init
397.867  ms cgen parallel processing
4.645    ms Gen.sort_globals_consts
36.689   ms cgen unification
7.384    ms Gen.write_init_function
6.437    ms Gen.interface_table
30.289   ms cgen common
510.009  ms C GEN
10832.232 ms C  cc
================== C compilation error (from cc): ==============
cc:       |         ^
cc: /data/data/com.termux/files/usr/tmp/v_10356/vab.01JFHAVAHTGQ5Y589VE65NX700.tmp.c:29775:47: error: unexpected type name 'string': expected expression
cc:  29775 | string _arg_expr_flag_trace_println_1_15995 = string _t28; /* if prepend */
cc:        |                                               ^
cc: /data/data/com.termux/files/usr/tmp/v_10356/vab.01JFHAVAHTGQ5Y589VE65NX700.tmp.c:29775:53: error: expected ';' at end of declaration
cc:  29775 | string _arg_expr_flag_trace_println_1_15995 = string _t28; /* if prepend */
cc:        |                                                     ^
cc:        |                                                     ;
cc: /data/data/com.termux/files/usr/tmp/v_10356/vab.01JFHAVAHTGQ5Y589VE65NX700.tmp.c:29777:6: error: use of undeclared identifier '_t28'; did you mean '_t7'?
cc:  29777 |                                         _t28 = _SLIT("(long)");
cc:        |                                         ^~~~
cc:        |                                         _t7
... (the original output was 83 lines long, and was truncated to 12 lines)
================================================================
(You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
16096.413 ms TOTAL

Possible Solution

No response

Additional Information/Context

CC is clang version 19.1.6
Target: aarch64-unknown-linux-android24
Thread model: posix
Build environment is termux

V version

V 0.4.8 05cbbfb

Environment details (OS name and version, etc.)

OS: termux, 4.19.191-g468a43073423-dirty, #1 SMP PREEMPT Mon Nov 11 18:15:53 CST 2024
Processor: 8 cpus, 64bit, little endian

getwd: /data/data/com.termux/files/home
vexe: /data/data/com.termux/files/home/.v/v
vexe mtime: 2024-12-20 07:59:54

vroot: OK, value: /data/data/com.termux/files/home/.v
VMODULES: OK, value: /data/data/com.termux/files/home/.vmodules
VTMP: OK, value: /data/data/com.termux/files/usr/tmp/v_10356

Git version: git version 2.47.1
Git vroot status: weekly.2024.45-366-g05cbbfba-dirty (4 commit(s) behind V master)
.git/config present: true

CC version: clang version 19.1.6
emcc version: N/A
thirdparty/tcc status: thirdparty-unknown-unknown de82a130-dirty```
> [!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.
@snowflakednew snowflakednew added the Bug This tag is applied to issues which reports bugs. label Dec 20, 2024
@felipensp
Copy link
Member

Duplicated of #23081

@felipensp felipensp added the Autofree Bugs/feature requests, that are related to -autofree. label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Autofree Bugs/feature requests, that are related to -autofree. Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

2 participants