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: treats 0 as channel #12323

Closed
dvyukov opened this issue Aug 25, 2015 · 2 comments
Closed

gccgo: treats 0 as channel #12323

dvyukov opened this issue Aug 25, 2015 · 2 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Aug 25, 2015

gccgo compiles the following incorrect program:

package a
func s() {
    switch <-0 {}
}

gofrontend is on commit 81810917af7ba19e1f9f8efc8b1989f7d6419d30

@dvyukov dvyukov assigned dvyukov and paranoiacblack and unassigned dvyukov Aug 25, 2015
@dvyukov
Copy link
Member Author

dvyukov commented Aug 25, 2015

@ianlancetaylor

@ianlancetaylor ianlancetaylor added this to the Gccgo milestone Aug 25, 2015
@gopherbot
Copy link
Contributor

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

mydongistiny pushed a commit to mydongistiny/GCC_SaberMod that referenced this issue Sep 17, 2015
    
    When asking for the type of a receive operation, the compiler would
    return an error type if the receive operator was being used on an
    invalid channel type and the error would be reported in a later pass.
    There are several ways that the type checking pass would not see
    the original node and fail to issue the error.  This patch modifies
    receive operations to give an error immediately once it is known that
    the channel type is invalid.
    
    Fixes golang/go#12323.
    
    Reviewed-on: https://go-review.googlesource.com/13987


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227863 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