aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/sprint.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 2ead1c3..0545f25 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -3732,7 +3732,14 @@ package body Sprint is
end loop;
Write_Str (") of ");
- Sprint_Node (Component_Type (Typ));
+ X := Component_Type (Typ);
+
+ -- Preserve sloc of component type, which is defined
+ -- elsewhere than the itype (see comment above).
+
+ Old_Sloc := Sloc (X);
+ Sprint_Node (X);
+ Set_Sloc (X, Old_Sloc);
-- Array subtypes and string subtypes