I’m not sure that’s entirely analogous. Open source and commercially licensed compilers would have licensing agreements governing how they can be used. But I imagine if a person made their own compiler, and didn’t license it to anybody, but somebody somehow gained access to it and used it to compile their code, that the resulting output would infact be infringing the IP rights of the compilers author. I’m sure you could also publicly release a compiler with a license that assigned copyright of the output to the compiler’s author (though I doubt you could convince anybody to use it).