ERROR:Xst:827 - while synthesizing the code
The synthesizer is confused because if reset is high and there is a rising edge on the clock then you have asked for two different things to happen to Q. You need to change the two separate if statements to an if... else if ... kind of structure.