Our teacher, the Rema, wrote: An animal that was fattened with forbidden items is permitted, but if it was fattened all its days only with forbidden items, it is forbidden. Thus far his words. And he explained his words in his book Darkhei Moshe, for the Mordechai wrote in the seventh chapter of Yevamot that it is permitted, and Tosafot in Temurah [31a] wrote that it is forbidden; and for this reason, he distinguished between if it was fattened all its days, which is what Tosafot are dealing with, see there, and if it was not fattened all its days, which is what the Mordechai is dealing with, see there. And in truth, in Temurah there, they are dealing with regard to a sacrifice and where it ate vetch of idolatry, and Tosafot wrote that at first glance even for a commoner it is forbidden because its primary growth is from them, see there. And if so, one could say that they were only stringent regarding the prohibition of idolatry and not regarding other prohibitions, or at least they were stringent regarding items from which benefit is forbidden and not regarding items forbidden for eating, for there is no reason to forbid since the food is digested in its innards. And all the great Acharonim agreed to permit [Shach, and Peri Chadash, and Kereti U-Peleti, and Maharit, and Keneset HaGedolah]. Furthermore, the Rambam ruled at the end of the third chapter of Issurei Mizbe'ach that an animal fattened with vetch of idolatry is permitted even for the Altar, and all the more so for a commoner, and he did not distinguish between all its days or not. And we explicitly learned at the end of Terumot that one may feed vetch of terumah to animals, and that which was forbidden there for an Israelite to feed his animal vetch of terumah is because it is forbidden for an Israelite to benefit from terumah in a manner of destruction, see there [Peri Chadash]. And there is clear proof for this, for we learned there: An Israelite who rented a cow from a Kohen may feed it vetch of terumah. And presumably the Israelite eats the milk from his animal, and it is explained that it is permitted to feed it continuously, for if we were to say that the Israelite is forbidden to eat the milk, the Tanna should have specified. And if you say that milk is permitted and meat is forbidden, what difference is there between one and the other?
כתב רבינו הרמ"א בהמה שנתפטמה בדברים אסורים מותרת אבל אם לא נתפטמה כל ימיה רק בדברים אסורים אסורה עכ"ל וביאר דבריו בספרו ד"מ דהמרדכי כתב בפ"ז דיבמות דמותרת ותוס' בתמורה [ל"א.] כתבו שאסורה ולזה חילק בין נתפטמה כל ימיה דמזה מיירו התוס' ע"ש ובין לא נתפטמה כל ימיה דמזה מיירי המרדכי ע"ש ובאמת בתמורה שם מיירי לגבי קרבן ושאכלה כרשיני עכו"ם והתוס' כתבו דלפום ריהטא אפילו להדיוט אסור מפני שעיקר גדילתה מהן ע"ש וא"כ י"ל דרק באיסור עכו"ם החמירו ולא בשארי איסורים או עכ"פ באיסורי הנאה החמירו ולא באיסורי אכילה שאין טעם לאסור שהרי המאכל נתעכל במעיה וכל גדולי האחרונים הסכימו להיתר [ש"ך ופר"ח וכרו"פ ומהרי"ט וכנה"ג] ועוד שהרמב"ם פסק בספ"ג מאיסורי מזבח דבהמה שנתפטמה בכרשיני עכו"ם מותרת אף למזבח וכ"ש להדיוט ולא חילק בין כל ימיה או לאו ולהדיא שנינו בסוף תרומות דמאכילין כרשיני תרומה לבהמות וזה שאסר שם לישראל להאכיל לבהמתו כרשיני תרומה משום דאסור לישראל ליהנות מהתרומה בדבר של כילוי ע"ש [פר"ח] וראיה ברורה לזה שהרי שנינו שם ישראל ששכר פרה מכהן מאכילה כרשיני תרומה והרי מסתמא הישראל אוכל החלב מבהמתו ומבואר שמותר להאכילה בתמידיות דאם נאמר שהישראל אסור לאכול החלב ה"ל לתנא לפרש ואם תאמר דחלב מותר ובשר אסור איזה הפרש יש בין זל"ז: