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 global_variable_set_init #11541

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

gccgo: internal compiler error in global_variable_set_init #11541

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

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 2, 2015

gccgo crashes on the following program:

package a
var a = 1e20/complex64(1e-20)
go1: internal compiler error: in global_variable_set_init, at go/go-gcc.cc:2440
0x607000 Gcc_backend::global_variable_set_init(Bvariable*, Bexpression*)
    ../../gcc/go/go-gcc.cc:2440
0x6276ed Gogo::write_globals()
    ../../gcc/go/gofrontend/gogo.cc:1395

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/13904 mentions this issue.

@gopherbot
Copy link
Contributor

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

paranoiacblack pushed a commit to golang/gofrontend 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.

Change-Id: I54e41d748a325004fde59f9e4e02d9c40f8f6576
Reviewed-on: https://go-review.googlesource.com/14646
Reviewed-by: Ian Lance Taylor <[email protected]>
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 Sep 22, 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