aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2020-09-29 09:03:18 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-24 05:16:01 -0500
commit91edb3f66cb3572048547f06628eeb38ddadd44c (patch)
tree655dbaabbc6e0f0b656829cd1f528f6e9591b749
parent1cc9ecae0ab80e9aa170950725a47ef285e78c9d (diff)
downloadgcc-91edb3f66cb3572048547f06628eeb38ddadd44c.zip
gcc-91edb3f66cb3572048547f06628eeb38ddadd44c.tar.gz
gcc-91edb3f66cb3572048547f06628eeb38ddadd44c.tar.bz2
[Ada] Fix spurious error on child library-level subprogram with aspects
gcc/ada/ * sem_ch10.adb (Analyze_Compilation_Unit): Move aspects from body to the newly created spec.
-rw-r--r--gcc/ada/sem_ch10.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index aab186c..2d1232e 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -828,6 +828,7 @@ package body Sem_Ch10 is
-- of the child unit does not act as spec any longer.
Set_Acts_As_Spec (N, False);
+ Move_Aspects (From => Unit_Node, To => Unit (Lib_Unit));
Set_Is_Child_Unit (Defining_Entity (Unit_Node));
Set_Debug_Info_Needed (Defining_Entity (Unit (Lib_Unit)));
Set_Comes_From_Source_Default (SCS);