You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build and run the above code with gccgo (gcc backend) and gollvm go (llvm backend)
What did you expect to see?
Nothing output.
What did you see instead?
For gollvm go, the error messages are as follow:
llvm-goc: ./gollvm-master/llvm/tools/gollvm/bridge/go-llvm-materialize.cpp:860: Bexpression* Llvm_backend::materializeComposite(Bexpression*): Assertion `vals.size() == numElements' failed.
For gccgo, the error messages are as follow:
go1: internal compiler error: in return_statement, at go/go-gcc.cc:2168
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-9/README.Bugs for instructions.
A simple profiling:
For non-empty struct with zero-sized trailing fields, we add an extra field "_" to it in gofrontend/go/types.cc:get_backend_struct_fields. But the Bexpression of the results has the same element size with the original results sequence. So the assert failed. I didn't dig into the gccgo code, but I guess the cause of this issue should be the same. There are multiple such assertions in gollvm code, simply removing them don't work. I don't know how gc go handles this case, but gc go can really handle this case.
CC @ianlancetaylor@thanm@cherrymui
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/9QxcZb4KPJh
Build and run the above code with gccgo (gcc backend) and gollvm go (llvm backend)
What did you expect to see?
Nothing output.
What did you see instead?
For gollvm go, the error messages are as follow:
llvm-goc: ./gollvm-master/llvm/tools/gollvm/bridge/go-llvm-materialize.cpp:860: Bexpression* Llvm_backend::materializeComposite(Bexpression*): Assertion `vals.size() == numElements' failed.
For gccgo, the error messages are as follow:
go1: internal compiler error: in return_statement, at go/go-gcc.cc:2168
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-9/README.Bugs for instructions.
A simple profiling:
For non-empty struct with zero-sized trailing fields, we add an extra field "_" to it in gofrontend/go/types.cc:get_backend_struct_fields. But the Bexpression of the results has the same element size with the original results sequence. So the assert failed. I didn't dig into the gccgo code, but I guess the cause of this issue should be the same. There are multiple such assertions in gollvm code, simply removing them don't work. I don't know how gc go handles this case, but gc go can really handle this case.
CC @ianlancetaylor @thanm @cherrymui
The text was updated successfully, but these errors were encountered: