If its a compiler problem, you'll know immediately. This is because a compiler error will involve the program executable not being built or run, and instead the compiler will give you errors, normally pointing to certain suspicious lines in your source code.
A runtime error is when you run the program, and either it crashes in some way or it produces weird, unexpected outputs. If you mean 'the compiler made a mistake compiling your code, causing your program to run incorrectly', rest assured that with all good compilers that should never happen (I have never heard of it every happening, actually).