First off, what is an allergen? In the simplest terms, an allergen is any substance (antigen) which provokes an allergic reaction, and an allergic reaction is just an overly vigorous immune response to a perceived threat to the body that would not otherwise be harmful.
That said, if a gene is borrowed from a plant that produces a known allergen, then that makes the allergen far easier to find during subsequent allergen testing, which comprises a sizable fraction of the GMO safety research that is done. Generally what GM seed companies do is screen each gene they’re considering using against known allergens, and then discard ones that are similar.
This Slate article discusses the database of known allergens against which the new proteins in GMO’s are checked:
Also, according to FDA regulations, having a GM that produces an allergen requires a mandatory label.
Consequently, whenever such a company enters into FDA consultation, taking a gene from a known allergenic species triggers a follow up investigation into whether or not the gene introduced is one of those allergens.
As a matter of fact, that’s precisely how the famous Brazil Nut gene was found in Soy. This was discovered in an industry-funded study in Madison, WI. It was published and included in the GENERA database link hyper-linked earlier, but here is a direct link as well.
Subsequently, they can determine whether or not it actually triggers an allergic response via pinprick tests and food challenges.
However, another concern that has been raised in the past is the possibility of inadvertently producing a new allergen that nobody would know to even test for, (however improbable that might be), or that the new protein will signal greater production of an already existing allergen in the food which was previously produced at sufficiently small endogenous levels that it wasn’t ever a problem before.
While it is theoretically possible to introduce a new allergen this way, here’s the problem with that line of reasoning insofar as it has been applied as an indictment against GE technology:
What this means is that the potential for introducing previously-unknown allergens into new foods is actually much less likely to slip our notice in the case of GE than for other common methods, such as selective breeding, radiation mutagenesis and hybridization, all of which shuffle around hundreds or even thousands of alleles which are not tracked, and the end product of which is subjected to little or no scientific screening process at all, despite possessing a higher inherent likelihood of producing unintended consequences.
As a matter of fact, that HAS happened with the Kiwi fruit (from woody vine species of the genus Actinidia), for which genetic engineering was not involved, and which you can read about here. By contrast, there are no confirmed cases of this ever happening in the case of Genetically Engineered foods.
Thus, although no precautionary measures available to us would 100% ensure that this could never happen, it’s at least as likely (if not more so) with non-GE methods than with GE. Therefore, unless one is prepared to use the same argument to chastise literally every other known form of artificial selection in plant cultivation, then the claim represents a biased asymmetric application of the precautionary principle that is not based on a sound comparative risk-benefit analysis.
Despite that double standard, the testing for such allergens has been quite extensive nevertheless, and has received close attention from regulatory bodies, as you can read even more about here. (Additional references and links are supplied therein):
It’s also worth noting that some scientists are working on finding ways to use genetic engineering to actually reduce allergies: a goal with which they are already having some success (as Dr. McHughen explains here):
So there you have it. Contrary to the claims of biotechnology opponents, the risks of introducing allergens into the food supply are (at worst) no greater than with older cultivation methods, and are most-likely much lower, yet are tested far more carefully than foods that have come about via any of those other methods.