Interesting enough, I've heard of an awarded score in this situation.
It was back in the 80s before I was working (heck, in the 80s I was only 5) and before the days of illegal substitution. One coach was infamous for running a 7-6 defense when it got down to the goal line inside the two (after all, the penalty would only be one yard or less). The state got wind of this, informed the coach of their displeasure, and told the referees and the coach this is what was going to happen. The very next game he did it without thinking, and the referee--with state overseers present--issued a score. The fans went nuts, but the head coach said "I forgot, give 'em their points" and went on.
We never had the problem again