This is similar to a self-driving car having to decide who
should die in case of an accident - children on the street
or grandparents on the sidewalk (for example).
This is discussed from a philosophical point of view on Arte[1] (french with english subtitles). Specifically in form of the Trolley Problem[2].
What I see as a bigger problem is that since AIs are so complex, there is simple way to understand why the AI decided the way it did in a particular situation.
So the question becomes are we willing to accept AI deciding over life and death and in addition, do we accept that we're not able to decipher why AI decide how it decided?
[1]=https://www.arte.tv/en/videos/098794-001-A/how-to-solve-a-mo... [2]=https://en.wikipedia.org/wiki/Trolley_problem