https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
--- Comment #24 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Riccardo Mutschlechner from comment #21) > Not sure if this is the best place to start, but here goes. I've noticed > another similar issue. > > Let's say you've compiled a binary, `test`, from a source `test.c`. If you > then flip the arguments to gcc by mistake, `gcc -o test.c test` rather than > `gcc -o test test.c`, you will overwrite the source file by trying to > compile the binary, thus losing it permanently without some other backup. That is PR 80182 really.