cmd/gc: accept ideal float as indices.

Fixes issue 4813.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://codereview.appspot.com/7625050