diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-21 11:39:38 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-21 11:39:38 +0200 |
commit | c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3 (patch) | |
tree | 7c88202b47a8f36b2eaebf00561b9256dd6e900f /gcc/ada/lib-writ.adb | |
parent | 2c2870a1b16c867b9ef0ea6cf0a8eb16af4c1b2d (diff) | |
download | gcc-c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3.zip gcc-c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3.tar.gz gcc-c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3.tar.bz2 |
[multiple changes]
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
declaration with no aspects, whose subtype_mark is a subtype
with predicates, inherits the list of subprograms for the type.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
change.
2016-04-21 Thomas Quinot <quinot@adacore.com>
* g-socket.adb (Raise_Host_Error): Include additional Name parameter.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* lib-writ.adb (Write_ALI): Do not record in ali file units
that are present in the files table but not analyzed. These
units are present because they appear in the context of units
named in limited_with clauses, and the unit being compiled does
not depend semantically on them.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
create the procedure body for an function returning an array type,
when generating C code. Reuse the subprogram body rather than
creating a new one, both as an efficiency measure and because
in an instance the body may contain global references that must
be preserved.
From-SVN: r235324
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r-- | gcc/ada/lib-writ.adb | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index b65892a..34f3628 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -155,8 +155,9 @@ package body Lib.Writ is OA_Setting => 'O', SPARK_Mode_Pragma => Empty); - -- Parse system.ads so that the checksum is set right - -- Style checks are not applied. + -- Parse system.ads so that the checksum is set right, + -- Style checks are not applied. The Ekind is set to ensure + -- that this reference is always present in the ali file. declare Save_Mindex : constant Nat := Multiple_Unit_Index; @@ -166,6 +167,7 @@ package body Lib.Writ is Style_Check := False; Initialize_Scanner (Units.Last, System_Source_File_Index); Discard_List (Par (Configuration_Pragmas => False)); + Set_Ekind (Cunit_Entity (Units.Last), E_Package); Style_Check := Save_Style; Multiple_Unit_Index := Save_Mindex; end; @@ -1429,6 +1431,17 @@ package body Lib.Writ is Units.Table (Unum).Dependency_Num := J; Sind := Units.Table (Unum).Source_Index; + -- The dependency table also contains units that appear in the + -- context of a unit loaded through a limited_with clause. These + -- units are never analyzed, and thus the main unit does not + -- really have a dependency on them. + + if Present (Cunit_Entity (Unum)) + and then Ekind (Cunit_Entity (Unum)) = E_Void + then + goto Next_Unit; + end if; + Write_Info_Initiate ('D'); Write_Info_Char (' '); @@ -1452,6 +1465,18 @@ package body Lib.Writ is Write_Info_Char (' '); Write_Info_Str (Get_Hex_String (Source_Checksum (Sind))); + -- If the dependency comes from a limited_with clause, + -- record limited_checksum. + -- Disable for now, until full checksum changes are checked. + + -- if Present (Cunit_Entity (Unum)) + -- and then From_Limited_With (Cunit_Entity (Unum)) + -- then + -- Write_Info_Char (' '); + -- Write_Info_Char ('Y'); + -- Write_Info_Str (Get_Hex_String (Limited_Chk_Sum (Sind))); + -- end if; + -- If subunit, add unit name, omitting the %b at the end if Present (Cunit (Unum)) then @@ -1492,6 +1517,9 @@ package body Lib.Writ is end if; Write_Info_EOL; + + <<Next_Unit>> + null; end loop; end; |