Skip to content

gccgo: rejects valid program #56109

Closed
Closed
@ALTree

Description

@ALTree
$ gccgo --version
gccgo (Debian 12.2.0-3) 12.2.0

The following valid Go program:

package main

import "math"

func main() {
	f := func(p bool) {
		if p {
			println("hi")
		}
	}
	go f(true || math.Sqrt(2) > 1)
}

compiles and runs on gc, but is rejected by gccgo

$ gccgo main.go 
main.go:11:9: error: too few expressions for struct
   11 |         go f(true || math.Sqrt(2) > 1)
      |         ^

cc @ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions