]> gcc.gnu.org Git - gcc.git/commitdiff
2008-05-20 Ed Schonberg <schonberg@adacore.com>
authorEd Schonberg <schonberg@adacore.com>
Tue, 20 May 2008 12:51:29 +0000 (14:51 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 20 May 2008 12:51:29 +0000 (14:51 +0200)
* sprint.adb
(Print_Itype): Do not modify the sloc of the component type of a
(packed) array itype, because it is an unrelated type whose source
location is independent of the point of creation of the itype itself.

From-SVN: r135645

gcc/ada/sprint.adb

index 2ead1c33019f9611cce408efb4631dc5b8204eec..0545f2585cd835d36f2e7674307f7d05e187ecc2 100644 (file)
@@ -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
 
This page took 0.067898 seconds and 5 git commands to generate.