Donald Knuth has shown in 1974 paper *Structured Programming with goto statements* several "unavoidable" uses of the goto statement, but this is not the case here.