Skip to content

cmd/compile: incorrect boolean value passed to function #18725

@toolateforteddy

Description

@toolateforteddy

What version of Go are you using (go version)?

go version go1.8rc2 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"

What did you do?

https://play.golang.org/p/hebuAYQ6eo
Take the program above, that on go 1.7.4 prints out "The right thing.", and run that with a go compiler of version 1.8rc2. You now find that it prints out "The wrong thing." Additionally interesting, if you comment out line 15, the second call to "panicWhen", then the first call behaves correctly.

What did you expect to see?

I expect the program to panic with "The right thing."

What did you see instead?

The first call to panicWhen gets the argument cond as false, and panics with "The wrong thing."

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions