The spell Summon Greater Demon is quite clear on where your summoned demon appears at.
The demon appears in an unoccupied space you can see within range…
The wording of this spell is very similar to the rest of the spells that summon things in regards to where the summoned creature materializes at. And the spell goes on to say how the demon can disappear: zero hit points, the PC loses concentration, etc.
What if you aren't using the spell in combat and you want it to fly to a neighboring city and kill someone? Are there rules for this that aren't mentioned in the spell description?
What happens when a summoned demon goes out of range?
Best Answer
Nothing interesting happens.
The “range” of the spell tells you what spaces are eligible for summoning the demon:
After this, there is no range related restriction on where the demon can go:
Compare to the spell mage hand:
Mage hand ends when the hand goes out of range because that’s written in the spell description. Summon greater demon has no such restriction.