Maybe for simple programs. Of course, an arbitrarily deep neural net can emulate any compiler (a function from plain text to machine instruction sequences). But predicting output is limited by the halting problem and complexity.
Whether a neural net could be trained to emulate a compiler seems like the more pertinent question.
I've had the displeasure of trying to explain classical learning hardness results to someone who kept repeating back to me "but RNNs are Turing complete!" If anything, the expressive power of the model you're trying to train pushes back against your efforts to train it to do something useful.