"if you give the compiler the same inputs, including flags, you will get the same out. "
no, no it won't. compile a program with multiple compilation units using -O3, sha256sum it, remove all the compiled binary and object files and repeat. you'll find the hashes do not match.
