Pre-preface: If I recall correctly, ethics questions are on topic on this forum (correct me if I'm wrong). So this questions seems fine. Some vegans are annoyed/frustrated by ethics-based hypotheticals (probably because they're often asked by trolls), but I find them interesting and I think they're a good way to build a strong ethical foundation.
Preface: Most ethical vegans (a tautology by most definitions) are concerned about reducing suffering (of those beings which have the capacity to suffer) by abstaining from consuming products which contribute to the demand for more suffering. I'm going to answer this question from that perspective.
Answer: You ask "is a vegan allowed to eat the pig". This assumes an absolute set of agreed-upon rules which governs the behaviour of all people who call themselves vegan. Obviously this doesn't exist, but if we use our assumptions from the preface, then the answer depends only on one question:
Will eating the pig cause more suffering? If so, don't eat the pig.
Veganism is just an extension of ethics to one's diet and lifestyle.
In light of this, your question may just as well be: Is it okay for vegans to eat any sentient being that was killed by some accident?
Whatever the question, we need only think about the most ethical choice given the circumstances of the actual situation.
So to answer your question: It's depends on the specific circumstances. Of course, most vegans wouldn't eat the pig (just like they wouldn't eat a dead child), but in some bizarre (though conceivable) situation where eating the pig was the most ethical choice, an ethical person would of course eat the pig.