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

Compiler error when appending to the z axis of a width and height fixed 3d array #23156

Closed
drakeerv opened this issue Dec 14, 2024 · 0 comments · Fixed by #23160
Closed

Compiler error when appending to the z axis of a width and height fixed 3d array #23156

drakeerv opened this issue Dec 14, 2024 · 0 comments · Fixed by #23160
Assignees
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. Unit: Checker Bugs/feature requests, that are related to the type checker. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.

Comments

@drakeerv
Copy link

drakeerv commented Dec 14, 2024

V doctor:

V full version: V 0.4.8 b79b4bf.b383cce
OS: windows, Microsoft Windows 11 Pro v26100 64-bit
Processor: 16 cpus, 64bit, little endian, 

getwd: E:\Projects\advent2024\day14
vexe: C:\Users\drake\AppData\Local\Programs\V\V04\v.exe
vexe mtime: 2024-12-03 02:00:11

vroot: OK, value: C:\Users\drake\AppData\Local\Programs\V\V04
VMODULES: OK, value: C:\Users\drake\.vmodules
VTMP: OK, value: C:\Users\drake\AppData\Local\Temp\v_0

Git version: git version 2.41.0.windows.3
Git vroot status: Error: fatal: not a git repository (or any of the parent directories): .git
.git/config present: false

CC version: Error: 'cc' is not recognized as an internal or external command,

operable program or batch file.


emcc version: Error: 'emcc' is not recognized as an internal or external command,

operable program or batch file.


thirdparty/tcc: N/A

What did you do?
./v -g -o vdbg cmd/v && ./vdbg bug.v

fn main() {
	// create a 2x2x* 3d array that holds int values
	mut space := [2][2][]int{}
	// append 0 to the z axis of the cell at 1,1
	space[1][1] << 0
	// print the value at 1,1
	print(space[1][1])
}

What did you expect to see?

[0]

What did you see instead?

================== C compilation error (from tcc): ==============
cc: C:/Users/drake/AppData/Local/Temp/v_0/bug.01JF1YDJYMTDVTG6Y51D71DDF6.tmp.c:7190: warning: implicit declaration of function 'tcc_backtrace'
cc: C:/Users/drake/AppData/Local/Temp/v_0/bug.01JF1YDJYMTDVTG6Y51D71DDF6.tmp.c:13896: error: too few arguments to function
... (the original output was 3 lines long, and was truncated to 2 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 .

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-21593

@spytheman spytheman added Bug This tag is applied to issues which reports bugs. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Checker Bugs/feature requests, that are related to the type checker. labels Dec 14, 2024
@felipensp felipensp self-assigned this Dec 14, 2024
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. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. Unit: Checker Bugs/feature requests, that are related to the type checker. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants