Welcome in the forum!
Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
The line of code
dat_Rx = UART1_UartGetChar();
Within an "if" that towards the sentence was not executed.