Why not simply use a logical function like in your example and directly test it (without an additional variable):
if ( check_exit() ) exit
Or, if you want to use integers, e.g. negative integers denote errors and positive ones are warnings:
if ( complicated_check() > 0 ) then
print *, 'WARNING'
elseif( complicated_check() < 0 ) then
exit
endif
Although this is starting to get inefficient without auxiliary variables ;-)