General Motors on Thursday became the third automaker in the last two years to be accused of putting software on vehicles designed to cheat U.S. emissions law.