cmd/gc: generate type alg after calling dowidth.

Previously it might happen before calling dowidth and
result in a compiler crash.

Fixes issue 8060.

LGTM=dvyukov, rsc
R=golang-codereviews, dvyukov, gobot, rsc
CC=golang-codereviews
https://codereview.appspot.com/110980044