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

gccgo: internal compiler error in do_get_backend (4) #12939

Closed
dvyukov opened this issue Oct 14, 2015 · 2 comments
Closed

gccgo: internal compiler error in do_get_backend (4) #12939

dvyukov opened this issue Oct 14, 2015 · 2 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Oct 14, 2015

gccgo crashes on the following input:

func s()[a]return]<0{n("",m())
func()a(){(p)}
func(intMap)m(){s=(m)
m[y]=e([]e,d(4))}}
for rangem{}}
func p(){for{var g c
for _,t=range s()
go1: internal compiler error: in do_get_backend, at go/gofrontend/expressions.cc:3365
0x5f2932 Type_conversion_expression::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/expressions.cc:3365
0x5f07b1 Builtin_call_expression::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/expressions.cc:8178
0x651e20 Temporary_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:494

0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x64f65c Block_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1836
0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x64f65c Block_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1836
0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x64f65c Block_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1836
0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x64f65c Block_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1836
0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x64f65c Block_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1836
0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x64f65c Block_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1836
0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x64f65c Block_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1836
0x61fb57 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5891
0x62135c Function::build(Gogo*, Named_object*)
    ../../gcc/go/gofrontend/gogo.cc:5497
0x622877 Named_object::get_backend(Gogo*, std::vector<Bexpression*, std::allocator<Bexpression*> >&, std::vector<Btype*, std::allocator<Btype*> >&, std::vector<Bfunction*, std::allocator<Bfunction*> >&)
    ../../gcc/go/gofrontend/gogo.cc:7217

gcc on rev 228818, gofrontend on a4bcd319d98ddc52b3e7d16ec87d92aad868ab05

@dvyukov
Copy link
Member Author

dvyukov commented Oct 14, 2015

@ianlancetaylor

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/16235 mentions this issue.

kraj pushed a commit to kraj/gcc that referenced this issue Jan 27, 2016
    
    Another issue with erroneous array types.  When an erroneous array
    type is in a function's signature, particularly the return type, we
    must guarantee that type is changed into an error type.  Otherwise,
    any operations that work on arrays and slices will crash when applied
    to the erroneous array return type.
    
    Fixes golang/go#12939.
    
    Reviewed-on: https://go-review.googlesource.com/16235


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232858 138bc75d-0d04-0410-961f-82ee72b054a4
@golang golang locked and limited conversation to collaborators Feb 3, 2017
asiekierka pushed a commit to WonderfulToolchain/gcc-ia16 that referenced this issue May 16, 2022
    
    Another issue with erroneous array types.  When an erroneous array
    type is in a function's signature, particularly the return type, we
    must guarantee that type is changed into an error type.  Otherwise,
    any operations that work on arrays and slices will crash when applied
    to the erroneous array return type.
    
    Fixes golang/go#12939.
    
    Reviewed-on: https://go-review.googlesource.com/16235

From-SVN: r232858
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants