aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2020-01-07 17:28:16 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-03 06:01:33 -0400
commit8f8fc3840e9ac62a053fc8ebe0d25955a9ecf290 (patch)
tree037eff1a26cf0a3f23be4150cc5ce71423d1f95a
parent9ff488f0292841a709840b6d2cb4d18e2f1b491a (diff)
downloadgcc-8f8fc3840e9ac62a053fc8ebe0d25955a9ecf290.zip
gcc-8f8fc3840e9ac62a053fc8ebe0d25955a9ecf290.tar.gz
gcc-8f8fc3840e9ac62a053fc8ebe0d25955a9ecf290.tar.bz2
[Ada] Debug info not available on subp having a class-wide precondition
2020-06-03 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * sem_util.adb (Build_Class_Wide_Clone_Decl): Call Set_Debug_Info_Needed to set the Needs_Debug_Info flag on Clone_Id if the flag is set on Spec_Id.
-rw-r--r--gcc/ada/sem_util.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index b73c1f6..6c197b5 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -1618,6 +1618,13 @@ package body Sem_Util is
-- wrapper call to inherited operation.
Set_Class_Wide_Clone (Spec_Id, Clone_Id);
+
+ -- Inherit debug info flag from Spec_Id to Clone_Id to allow debugging
+ -- of the class-wide clone subprogram.
+
+ if Needs_Debug_Info (Spec_Id) then
+ Set_Debug_Info_Needed (Clone_Id);
+ end if;
end Build_Class_Wide_Clone_Decl;
-----------------------------