[Ada] Fix composability of return on the secondary stack
commit121522250886c8e5ea663af724affc1884944bbe
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 4 May 2022 10:31:14 +0000 (4 12:31 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 1 Jun 2022 08:43:17 +0000 (1 08:43 +0000)
treed6f670ed3fde05d4e4057ef4ae5f719af5cc134a
parentfdb2f2e696250fafc13635ac8c026d82e05f7738
[Ada] Fix composability of return on the secondary stack

Having components that need to be returned on the secondary stack would
not always force a record type to be returned on the secondary stack
itself.

gcc/ada/

* sem_util.adb
(Returns_On_Secondary_Stack.Caller_Known_Size_Record): Directly
check the dependence on discriminants for the variant part, if
any, instead of calling the Is_Definite_Subtype predicate.
gcc/ada/sem_util.adb