Error: external routine has local entity declarations.
What to do: remove these declarations, or make the routine non-external. 
