aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2017-01-23 11:13:23 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-23 12:13:23 +0100
commitbe4e989cd110e3eda9b9b14e6d3f73c9408e8816 (patch)
tree8784926c11173491046562803de287383babcc32 /gcc/ada/sem_util.adb
parente3d53f96ed595fd6e8bef75f166a93e5309b0c2a (diff)
downloadgcc-be4e989cd110e3eda9b9b14e6d3f73c9408e8816.zip
gcc-be4e989cd110e3eda9b9b14e6d3f73c9408e8816.tar.gz
gcc-be4e989cd110e3eda9b9b14e6d3f73c9408e8816.tar.bz2
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 <duff@adacore.com> * 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
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb5
1 files changed, 4 insertions, 1 deletions
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