ada: Make Apply_Discriminant_Check.Denotes_Explicit_Dereference more robust
The predicate implements the rules of the language so it needs to cope with
constructs rewritten by the expander, in particular explicit dereferences
that the expander uses liberally for various purposes.
This change makes the detection of rewritten calls more robust and adds the
detection of rewritten return objects.
gcc/ada/
* checks.adb (Apply_Discriminant_Check.Denotes_Explicit_Dereference):
Return false for artificial dereferences generated by the expander.