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_lower #12615

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

gccgo: internal compiler error in do_lower #12615

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

Comments

@dvyukov
Copy link
Member

dvyukov commented Sep 14, 2015

gccgo crashes on the following program:

package a
var f=0<<6i
go1: internal compiler error: in do_lower, at go/gofrontend/expressions.cc:4881
0x5f86fc Binary_expression::do_lower(Gogo*, Named_object*, Statement_inserter*, int)
    ../../gcc/go/gofrontend/expressions.cc:4881
0x6108ae Expression::lower(Gogo*, Named_object*, Statement_inserter*, int)
    ../../gcc/go/gofrontend/expressions.h:801
0x6108ae Lower_parse_tree::expression(Expression**)
    ../../gcc/go/gofrontend/gogo.cc:2744
0x61245e Gogo::lower_expression(Named_object*, Statement_inserter*, Expression**)
    ../../gcc/go/gofrontend/gogo.cc:2783
0x61c0fc Variable::lower_init_expression(Gogo*, Named_object*, Statement_inserter*)
    ../../gcc/go/gofrontend/gogo.cc:6041
0x61c14c Lower_parse_tree::variable(Named_object*)
    ../../gcc/go/gofrontend/gogo.cc:2613
0x6169c9 Bindings::traverse(Traverse*, bool)
    ../../gcc/go/gofrontend/gogo.cc:7546
0x616b51 Gogo::traverse(Traverse*)
    ../../gcc/go/gofrontend/gogo.cc:2495
0x617047 Gogo::lower_parse_tree()
    ../../gcc/go/gofrontend/gogo.cc:2761
0x61042c go_parse_input_files(char const**, unsigned int, bool, bool)
    ../../gcc/go/gofrontend/go.cc:95
0x60c20f go_langhook_parse_file
    ../../gcc/go/go-lang.c:304

gofrontend is on commit 1d9d92ab09996d2f7795481d2876a21194502b89

@dvyukov
Copy link
Member Author

dvyukov commented Sep 14, 2015

@ianlancetaylor

@ianlancetaylor ianlancetaylor added this to the Gccgo milestone Sep 14, 2015
@gopherbot
Copy link
Contributor

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

rth7680 pushed a commit to rth7680/gcc that referenced this issue Oct 20, 2015
    
    The fix for golang/go#11541 made the assertion that getting an invalid
    Numeric_constant after evaluating an invalid constant must result in
    an error in a binary expression.  However, a Numeric_constant can be
    invalid if it is unset, which occurs when either operand cannot be
    converted to the right type.  These errors are issued after the
    Numeric_constant is lowered.
    
    Fixes golang/go#12615.
    
    Reviewed-on: https://go-review.googlesource.com/14646


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229098 138bc75d-0d04-0410-961f-82ee72b054a4
@golang golang locked and limited conversation to collaborators Oct 24, 2016
asiekierka pushed a commit to WonderfulToolchain/gcc-ia16 that referenced this issue May 16, 2022
    
    The fix for golang/go#11541 made the assertion that getting an invalid
    Numeric_constant after evaluating an invalid constant must result in
    an error in a binary expression.  However, a Numeric_constant can be
    invalid if it is unset, which occurs when either operand cannot be
    converted to the right type.  These errors are issued after the
    Numeric_constant is lowered.
    
    Fixes golang/go#12615.
    
    Reviewed-on: https://go-review.googlesource.com/14646

From-SVN: r229098
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