The clue is in the error - declare it - either as a signal or a variable within the process...
Unless you're using numeric_std package. In which case this becomes a defined type. So you'll need to change the name of your signal.
For more complete information about compiler optimizations, see our Optimization Notice.