aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-04-02 01:21:36 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-18 08:41:01 +0000
commitde02cb5d72cfbac5a7a5537c5bf85c11f716f806 (patch)
treea0239561bd162fc982ef292f4460ee45cf12def0 /gcc
parentdf61c5dc3a16178834651d3437da6fa4490b480b (diff)
downloadgcc-de02cb5d72cfbac5a7a5537c5bf85c11f716f806.zip
gcc-de02cb5d72cfbac5a7a5537c5bf85c11f716f806.tar.gz
gcc-de02cb5d72cfbac5a7a5537c5bf85c11f716f806.tar.bz2
[Ada] Fix internal error on subprogram instantiation
The compiler builds renamings for actuals of formal objects for debugging purposes in this case, but it must not generate them for temporaries. gcc/ada/ * exp_dbug.ads (Build_Subprogram_Instance_Renamings): Fix typo. * exp_dbug.adb (Build_Subprogram_Instance_Renamings): Build the renaming only for actuals of formal objects.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_dbug.adb1
-rw-r--r--gcc/ada/exp_dbug.ads2
2 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/exp_dbug.adb b/gcc/ada/exp_dbug.adb
index 2231b9c..76f08e3 100644
--- a/gcc/ada/exp_dbug.adb
+++ b/gcc/ada/exp_dbug.adb
@@ -1028,6 +1028,7 @@ package body Exp_Dbug is
E := First_Entity (Wrapper);
while Present (E) loop
if Nkind (Parent (E)) = N_Object_Declaration
+ and then Present (Corresponding_Generic_Association (Parent (E)))
and then Is_Elementary_Type (Etype (E))
then
Loc := Sloc (Expression (Parent (E)));
diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads
index 0c0dd1a..273d6ed 100644
--- a/gcc/ada/exp_dbug.ads
+++ b/gcc/ada/exp_dbug.ads
@@ -1444,7 +1444,7 @@ package Exp_Dbug is
-- placed within the wrapper package of the instance, and the entity in
-- these declarations is encoded in a complex way that GDB does not handle
-- well. These new renaming declarations appear within the body of the
- -- subprogram, and are redundant from a visibility point of view, but They
+ -- subprogram, and are redundant from a visibility point of view, but they
-- should have no measurable performance impact, and require no special
-- decoding in the debugger.