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

defect &Object{}.a #22688

Closed
markfirmware opened this issue Oct 28, 2024 · 0 comments · Fixed by #22689
Closed

defect &Object{}.a #22688

markfirmware opened this issue Oct 28, 2024 · 0 comments · Fixed by #22689
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.

Comments

@markfirmware
Copy link

markfirmware commented Oct 28, 2024

V doctor:

V full version: V 0.4.8 df4c6ac.5d76ee4
OS: linux, Debian GNU/Linux 12 (bookworm) (VM)
Processor: 1 cpus, 64bit, little endian, DO-Premium-AMD

getwd: /home/user/github.com/markfirmware/vlister/src
vexe: /home/user/github.com/vlang/v/v
vexe mtime: 2024-10-28 20:57:38

vroot: OK, value: /home/user/github.com/vlang/v
VMODULES: OK, value: /home/user/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.39.5
Git vroot status: weekly.2024.43-58-g5d76ee46
.git/config present: true

CC version: cc (Debian 12.2.0-14) 12.2.0
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9

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

struct Object {
  a int
}

fn main() {
  field := &Object{}.a
  println('${field}')
}

What did you expect to see?

compile ok

What did you see instead?

================== C compilation error (from tcc): ==============
cc: /tmp/v_1000/field_ref_main.01JBAEQVFERFTWSV304MH6SME1.tmp.c:13476: error: lvalue expected
=================================================================
(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-21137

@felipensp felipensp added 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. labels Oct 28, 2024
@felipensp felipensp self-assigned this Oct 28, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants