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 set_type #11537

Closed
dvyukov opened this issue Jul 2, 2015 · 2 comments
Closed

gccgo: internal compiler error in set_type #11537

dvyukov opened this issue Jul 2, 2015 · 2 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 2, 2015

gccgo crashes on the following input:

pacakge a
var f = func() {f++}
go1: internal compiler error: in set_type, at go/gofrontend/expressions.cc:15072
0x5f2d29 Numeric_constant::set_type(Type*, bool, Location)
    ../../gcc/go/gofrontend/expressions.cc:15072
0x5f2e25 Integer_expression::do_check_types(Gogo*)
    ../../gcc/go/gofrontend/expressions.cc:1909
0x6106c3 Expression::check_types(Gogo*)
    ../../gcc/go/gofrontend/expressions.h:814
0x6106c3 Check_types_traverse::expression(Expression**)
    ../../gcc/go/gofrontend/gogo.cc:3232
0x5e2a3d Expression::traverse(Expression**, Traverse*)
    ../../gcc/go/gofrontend/expressions.cc:43
0x613e5d Block::traverse(Traverse*)
    ../../gcc/go/gofrontend/gogo.cc:5741
0x61409e Function::traverse(Traverse*)
    ../../gcc/go/gofrontend/gogo.cc:4863
0x61689e Bindings::traverse(Traverse*, bool)
    ../../gcc/go/gofrontend/gogo.cc:7527
0x616b71 Gogo::traverse(Traverse*)
    ../../gcc/go/gofrontend/gogo.cc:2491
0x616ec2 Gogo::check_types()
    ../../gcc/go/gofrontend/gogo.cc:3242
0x61055c go_parse_input_files(char const**, unsigned int, bool, bool)
    ../../gcc/go/gofrontend/go.cc:108
0x60c32f go_langhook_parse_file
    ../../gcc/go/go-lang.c:304

gcc version 6.0.0 2015070 (experimental) (GCC)

@dvyukov
Copy link
Member Author

dvyukov commented Jul 2, 2015

@paranoiacblack

@gopherbot
Copy link
Contributor

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

pbeeler pushed a commit to SaberMod/GCC_SaberMod that referenced this issue Aug 28, 2015
    
    The gofrontend would crash after hitting an unreachable state while
    trying to determine the type of an arithmetic expression involving
    non-numeric values.  Instead of crashing, it should fail gracefully
    if the relevant error is already reported.
    
    Fixes golang/go#11537.
    
    Reviewed-on: https://go-review.googlesource.com/13793


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227227 138bc75d-0d04-0410-961f-82ee72b054a4
@golang golang locked and limited conversation to collaborators Sep 4, 2016
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

4 participants