From be4e989cd110e3eda9b9b14e6d3f73c9408e8816 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 23 Jan 2017 11:13:23 +0000 Subject: sem_res.adb (Resolve_Call): In the part of the code where it is deciding whether to turn the call into an... 2017-01-23 Bob Duff * sem_res.adb (Resolve_Call): In the part of the code where it is deciding whether to turn the call into an indexed component, avoid doing so if the call is to an instance of Unchecked_Conversion. Otherwise, the compiler turns it into an indexed component, and resolution of that turns it back into a function call, and so on, resulting in infinite recursion. * sem_util.adb (Needs_One_Actual): If the first formal has a default, then return False. From-SVN: r244774 --- gcc/ada/sem_util.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_util.adb') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 73c8ce0..f8ac8ce 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -16089,7 +16089,10 @@ package body Sem_Util is begin -- Ada 2005 or later, and formals present - if Ada_Version >= Ada_2005 and then Present (First_Formal (E)) then + if Ada_Version >= Ada_2005 + and then Present (First_Formal (E)) + and then No (Default_Value (First_Formal (E))) + then Formal := Next_Formal (First_Formal (E)); while Present (Formal) loop if No (Default_Value (Formal)) then -- cgit v1.1