https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61316

            Bug ID: 61316
           Summary: gccgo: spurious "incompatible types in assignment"
                    error [GoSmith]
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: dvyukov at google dot com
                CC: cmang at google dot com

gcc version 4.10.0 20140516 (experimental) (GCC) 

The program is:

package main
func main() {
    func() {
        (*bar(baz()))++
    }()
}
func bar(x, y int) *int {
    i := 0
    return &i
}
func baz() (int, int) {
    return 0, 0
}

go run -compiler=gccgo src.go
src.go:5:9: error: incompatible types in assignment (multiple-value function
call in single-value context)
   (*bar(baz()))++
         ^

gc compiles successfully.

Reply via email to