Skip to content

Incorrect code generated with uint8 or int8 loop variables. #7509

@gopherbot

Description

@gopherbot

by techtix:

What does 'go version' print?
go version go1.2 linux/amd64

What steps reproduce the problem?
Run the attached program.
Also see: http://play.golang.org/p/dRqAUxPWeA

What happened?
On play.golang.org it results in the server error: 
"Error communicating with remote server."

On my desktop the program gets stuck in an infinite loop due to
an non-incrementing loop variable.

What should have happened instead?
The program should run and terminate
after producing 32 lines of output

Please provide any additional information below.
The attached program uses uint8 but the same problem
exists for int8 loop variables.

Yes I know it's unusual to use an 8bit loop variable, but
the problem arose as part of a test suite.

P.S. Thanks for a brilliant language.

Attachments:

  1. arith.go (906 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions