This is a rather stupid implementation as it does the search in linear time. More importantly, it is correct and helps porting gcc. Besides, it can easily be fixed in due time.