Skip to content

Does not panic upon division by zero when assigned to _. #551

Closed
@dmitshur

Description

@dmitshur

The following program panics when compiled using gc:

package main

func main() {
	x := 0
	_ = 1 / x
}

It does not panic when compiled with GopherJS.

This is the same issue as golang/go#18024 upstream, and it was uncovered by me when working on go1.8 branch thanks to golang/go@c2bb52b causing fixedbugs/issue8613.go test to run as part of TestGoRepositoryCompilerTests.

Low priority, I'm reporting for tracking purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions