diff options
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fc75731..9915a7a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-01-11 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_res.adb (Uses_SS): A controlled type requires the secondary stack + if it contains at least one component declaration employing a function + call returning on the secondary stack. + 2018-01-11 Yannick Moy <moy@adacore.com> * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index f3bd3be..c4ed06f 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -889,10 +889,7 @@ package body Sem_Res is Full_Type := T; end if; - if Is_Controlled (Full_Type) then - return False; - - elsif Is_Array_Type (Full_Type) then + if Is_Array_Type (Full_Type) then return Uses_SS (Component_Type (Full_Type)); elsif Is_Record_Type (Full_Type) then |