1 2019-07-04 Ed Schonberg <schonberg@adacore.com>
3 * exp_unst.adb: Handle conditional expressions.
5 2019-07-04 Yannick Moy <moy@adacore.com>
7 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
8 analyze parts of the code marked in SPARK.
10 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
12 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
15 2019-07-04 Yannick Moy <moy@adacore.com>
17 * sem_spark.adb (Explanation, Get_Expl): New functions to get
18 the explanation for a permission mismatch.
19 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
20 explanation into account for issuing a more precise error
22 (Set_Perm_Prefixes, Set_Perm_Extensions,
23 Set_Perm_Extensions_Move): Pass suitable argument for the
26 2019-07-04 Arnaud Charlet <charlet@adacore.com>
28 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
29 support for record aggregates.
30 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
31 similar local predicate.
32 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
33 predicate when possible.
34 (Is_CCG_Supported_Aggregate): Return False for records with
35 representation clauses and fix the logic for dealing with nested
38 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
40 * opt.adb (Set_Config_Switches): Keep assertions policy as
41 enabled when analysing internal units in GNATprove mode.
43 2019-07-04 Arnaud Charlet <charlet@adacore.com>
45 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
46 N_Variable_Reference_Marker when checking for the presence of
49 2019-07-04 Arnaud Charlet <charlet@adacore.com>
51 * exp_aggr.adb (Check_Component): Take into account type
54 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
56 * doc/gnat_ugn/platform_specific_information.rst: Document
57 Windows socket timeout particularity.
58 * gnat_ugn.texi: Regenerate.
59 * gsocket.h: Include versionhelpers.h.
60 * socket.c (__gnat_minus_500ms): New function.
61 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
63 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
64 500ms from the requested timeout only on old Windows version.
66 2019-07-04 Thomas Quinot <quinot@adacore.com>
68 * get_scos.adb: Remove bogus, dead code.
70 2019-07-04 Ed Schonberg <schonberg@adacore.com>
72 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
73 component is an entity name, its dimensions are those of its
76 2019-07-03 Bob Duff <duff@adacore.com>
78 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
81 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
83 * binde.adb: Remove with clause for System.OS_Lib.
84 (Force_Elab_Order): Refactor the majority of the code in Butil.
85 Use the new forced units iterator to obtain unit names.
86 * bindo-builders.adb: Add with and use clauses for Binderr,
87 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
88 a hash table which maps units to line number in the forced
89 elaboration order file.
90 (Add_Unit): New routine.
91 (Build_Library_Graph): Create forced edges between pairs of
92 units listed in the forced elaboration order file.
93 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
94 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
95 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
96 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
97 Refactor some of the behavior to Bindo-Units.
98 * bindo-graphs.ads: Enable the enumeration literal for forced
100 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
101 Is_Predefined_Unit): New routines.
102 * butil.adb: Add with and use clauses for Opt, GNAT, and
103 System.OS_Lib. Add with clause for Unchecked_Deallocation.
104 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
105 Read_Forced_Elab_Order_File): New routines.
106 * butil.ads: Add with and use clauses for Types. Add new
107 iterator over the units listed in the forced elaboration order
109 (Has_Next, Iterate_Forced_Units, Next): New routine.
110 * namet.adb, namet.ads (Present): New routine.
112 2019-07-03 Bob Duff <duff@adacore.com>
114 * sem_ch3.adb (Access_Definition): The code was creating a
115 master in the case where the designated type is a class-wide
116 interface type. Create a master in the noninterface case as
117 well. That is, create a master for all limited class-wide types.
119 2019-07-03 Yannick Moy <moy@adacore.com>
121 * erroutc.adb (Sloc_In_Range): New function to determine whether
122 the range of a pragma Warnings covers a location, taking
123 instantiations into account.
125 2019-07-03 Johannes Kanig <kanig@adacore.com>
127 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
128 to access the first file provided on the command line.
130 2019-07-03 Ed Schonberg <schonberg@adacore.com>
132 * inline.adb (Process_Formals_In_Aspects): New procedure within
133 Expand_Inlined_Call, to perform a replacement of references to
134 formals that appear in aspect specifications within the body
137 2019-07-03 Justin Squirek <squirek@adacore.com>
139 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
140 the appropriate actual subtype of the object renaming being
142 (Check_Constrained_Object): Minor cleanup.
144 2019-07-03 Yannick Moy <moy@adacore.com>
146 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
147 return go through traversal function call.
148 (Check_Type): Consistently use underlying type.
149 (Get_Perm): Adapt for case of elaboration code where variables
150 are not declared in the environment. Remove incorrect handling
151 of borrow and observe.
153 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
155 * inline.adb (Build_Return_Object_Formal): New routine.
156 (Can_Split_Unconstrained_Function): Code clean up.
157 (Copy_Formals,Copy_Return_Object): New routines.
158 (Split_Unconstrained_Function): Code clean up and refactoring.
160 2019-07-03 Gary Dismukes <dismukes@adacore.com>
162 * bindo-augmentors.adb, bindo-augmentors.ads,
163 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
164 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
165 corrections and reformatting.
167 2019-07-03 Bob Duff <duff@adacore.com>
169 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
170 if an Iterator_Specification is present.
172 2019-07-03 Bob Duff <duff@adacore.com>
174 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
177 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
179 * ali.adb: Add with and use clauses for GNAT,
180 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
181 signature records to invocation signature ids. Add various
182 encodings of invocation-related attributes. Sort and update
183 table Known_ALI_Lines.
184 (Add_Invocation_Construct, Add_Invocation_Relation,
185 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
186 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
187 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
189 (Initialize_ALI): Sort the initialization sequence. Add
190 initialization for all invocation-related tables.
191 (Invocation_Construct_Kind_To_Code,
192 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
193 Invocation_Signature_Of, Present): New routines.
194 (Scan_ALI): Add the default values for invocation-related ids.
195 Scan invocation graph lines.
196 (Scan_Invocation_Graph_Line): New routine.
197 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
198 for invocation constructs, relations, and signatures. Add
199 tables for invocation constructs, relations, and signatures.
200 Update Unit_Record to capture invocation-related ids. Relocate
201 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
203 (Add_Invocation_Construct, Add_Invocation_Relation,
204 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
205 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
206 Code_To_Invocation_Graph_Line_Kind,
207 Invocation_Construct_Kind_To_Code,
208 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
209 Invocation_Signature_Of, Present): New routines.
210 * binde.adb: Add with and use clause for Types. Add use clause
211 for ALI.Unit_Id_Tables;
212 * binde.ads: Relocate table Unit_Id_Tables and subtypes
213 Unit_Id_Table, Unit_Id_Array to ALI.
214 * bindgen.adb: Remove with and use clause for ALI.
215 * bindgen.ads: Remove with and use clause for Binde. Add with
216 and use clause for ALI.
217 * bindo.adb, bindo.ads, bindo-augmentors.adb,
218 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
219 bindo-diagnostics.adb, bindo-diagnostics.ads,
220 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
221 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
222 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
223 bindo-writers.ads: New units.
224 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
225 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
226 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
227 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
228 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
229 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
231 * gnatbind.adb: Add with and use clause for Bindo. Use the new
232 Bindo elaboration order only when -d_N is in effect.
234 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
235 Scope, Signature, Target): New routines.
236 (Write_ALI): Output all invocation-related data.
237 (Write_Invocation_Graph): New routine.
238 * lib-writ.ads: Document the invocation graph ALI line.
239 * namet.adb, namet.ads (Present): New routines.
240 * sem_ch8.adb (Find_Direct_Name): Capture the status of
241 elaboration checks and warnings of an identifier.
242 (Find_Expanded_Name): Capture the status of elaboration checks
243 and warnings of an expanded name.
244 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
245 that invocation graph-related data within the body of the main
246 unit is encoded in the ALI file.
247 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
248 graph-related data within the body of the main unit is encoded
250 (Analyze_Package_Instantiation): Perform minimal decoration of
252 (Analyze_Subprogram_Instantiation): Perform minimal decoration
253 of the instance entity.
254 * sem_elab.adb: Perform heavy refactoring of all code. The unit
255 is now split into "services" which specialize in one area of ABE
256 checks. Add processing in order to capture invocation-graph
257 related attributes of the main unit, and encode them in the ALI
258 file. The Processing phase can now operate in multiple modes,
259 all described by type Processing_Kind. Scenarios and targets
260 are now distinct at the higher level, and carry their own
261 representations. This eliminates the need to constantly
262 recompute their attributes, and offers the various processors a
263 uniform interface. The various initial states of the Processing
264 phase are now encoded using type Processing_In_State, and
266 * sem_elab.ads: Update the literals of type
267 Enclosing_Level_Kind. Add Inline pragmas on several routines.
268 * sem_prag.adb (Process_Inline): Ensure that invocation
269 graph-related data within the body of the main unit is encoded
271 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
273 (Exceptions_OK): Relocated from Sem_Util.
274 (Mark_Save_Invocation_Graph_Of_Body): New routine.
275 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
276 (Mark_Save_Invocation_Graph_Of_Body): New routine.
277 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
278 N_Variable_Reference_Marker.
279 (Is_Elaboration_Warnings_OK_Node): Now applicable to
280 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
281 (Is_Read): Use Flag4.
282 (Is_SPARK_Mode_On_Node): New applicable to
283 N_Variable_Reference_Marker.
284 (Is_Write): Use Flag5.
285 (Save_Invocation_Graph_Of_Body): New routine.
286 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
287 N_Variable_Reference_Marker.
288 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
289 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
290 (Set_Is_SPARK_Mode_On_Node): New applicable to
291 N_Variable_Reference_Marker.
292 (Set_Save_Invocation_Graph_Of_Body): New routine.
293 * sinfo.ads: Update the documentation of attributes
294 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
295 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
296 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
297 and update its occurrence in nodes.
298 (Save_Invocation_Graph_Of_Body): New routine along with pragma
300 (Set_Save_Invocation_Graph_Of_Body): New routine along with
302 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
304 (Scan_Debug_Switches): New routine.
305 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
306 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
307 Component_Vertex_Iterator.
308 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
310 (Iterate_Component_Vertices): New routine.
311 (Iterate_Vertices): Removed.
312 (Next): Update the parameter profile.
313 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
315 * libgnat/g-graphs.ads: Update the initialization of
316 No_Component. Add type Component_Vertex_Iterator. Remove type
318 (Has_Next): Add new versions and remove old ones.
319 (Iterate_Component_Vertices): New routine.
320 (Iterate_Vertices): Removed.
321 (Next): Add new versions and remove old ones.
322 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
324 * libgnat/g-sets.adb (Contains): Reimplemented.
325 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
326 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
327 * rtsfind.ads: Remove extra space.
329 2019-07-03 Yannick Moy <moy@adacore.com>
331 * sem_spark.adb: Add support for locally borrowing and observing
333 (Get_Root_Object): Add parameter Through_Traversal to denote
334 when we are interesting in getting to the traversed parameter.
335 (Is_Prefix_Or_Almost): New function to support detection of
336 illegal access to borrowed or observed paths.
337 (Check_Pragma): Add analysis of assertion pragmas.
339 2019-07-03 Ed Schonberg <schonberg@adacore.com>
341 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
342 we do not build the bodies of predicate fuctions, but the
343 expression in a static predicate must be elaborated to allow
344 case coverage checking within the generic unit.
345 (Build_Discrete_Static_Predicate): In a generic context, return
346 without building function body once the
347 Static_Discrete_Predicate expression for the type has been
350 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
352 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
353 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
355 2019-07-03 Bob Duff <duff@adacore.com>
357 * par-ch3.adb (P_Defining_Identifier): Call
358 Check_Defining_Identifier_Casing.
359 * style.ads, styleg.ads, styleg.adb
360 (Check_Defining_Identifier_Casing): New procedure to check for
361 mixed-case defining identifiers.
362 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
363 flag for checking for mixed-case defining identifiers.
364 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
365 Document new feature.
366 * gnat_ugn.texi: Regenerate.
368 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
370 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
371 (Warning message control): Document that -gnatw.z/Z apply to
373 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
374 types as well, but not if the specified alignment is the minimum
376 * gnat_ugn.texi: Regenerate.
378 2019-07-03 Bob Duff <duff@adacore.com>
380 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
383 2019-07-03 Ed Schonberg <schonberg@adacore.com>
385 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
386 message on attribute applied to a renaming when the renamed
387 object is an aggregate (from code reading).
388 (Check_Aspect_At_End_Of_Declarations): In a generic context
389 where freeze nodes are not generated, the original expression
390 for an aspect may need to be analyzed to precent spurious
391 conformance errors when compared with the expression that is
392 anakyzed at the end of the current declarative list.
394 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
396 * layout.adb (Layout_Type): Do not set the component size of an
397 array with a scalar component if the component type is
400 2019-07-03 Ed Schonberg <schonberg@adacore.com>
402 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
403 the source code of subprograms that are inlined by the
404 front-end, to prevent accidental duplication between loop labels
405 in the inlined code and the code surrounding the inlined call.
407 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
409 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
410 the section on resolving elaboration circularities to eliminate
411 certain combinations of switches which together do not produce
412 the desired effect and confuse users.
413 * gnat_ugn.texi: Regenerate.
415 2019-07-03 Arnaud Charlet <charlet@adacore.com>
417 * bindgen.adb (Gen_Main): Disable generation of reference to
418 Ada_Main_Program_Name for CCG.
419 * bindusg.adb (Display): Add -G to the command-line usage for
421 * opt.ads (Generate_C_Code): Update comment.
422 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
424 2019-07-03 Arnaud Charlet <charlet@adacore.com>
426 * sem_ch7.adb (Has_Referencer): Do not consider inlined
427 subprograms when generating C code, which allows us to generate
428 static inline subprograms.
430 2019-07-03 Justin Squirek <squirek@adacore.com>
432 * sem_ch6.adb (Check_Conformance): Add expression checking for
433 constant modifiers in anonymous access types (in addition to
434 "non-null" types) so that they are considered "matching" for
435 subsequent conformance tests.
437 2019-07-03 Arnaud Charlet <charlet@adacore.com>
439 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
440 Clarify wording on No_Multiple_Elaboration.
441 * gnat_rm.texi: Regenerate.
443 2019-07-03 Ed Schonberg <schonberg@adacore.com>
445 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
446 current instance of a type or subtype, complete the resolution
447 of the name by finding the component of the type denoted by the
450 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
452 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
453 Document that boolean types with convention C now map to C99 bool.
454 * gnat_rm.texi: Regenerate.
456 2019-07-03 Javier Miranda <miranda@adacore.com>
458 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
459 removing code that it is now never executed in the CCG compiler
462 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
464 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
467 2019-07-01 Ed Schonberg <schonberg@adacore.com>
469 * sem_ch12.adb (Is_Defaulted): New predicate in
470 Check_Formal_Package_Intance, to skip the conformance of checks
471 on parameters of a formal package that are defaulted,
473 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
475 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
476 sem_prag.adb, sem_spark.adb: Minor reformatting.
478 2019-07-01 Ed Schonberg <schonberg@adacore.com>
480 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
481 of attribute to be an attribute reference of a discrete type.
483 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
485 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
486 handling of Has_Pragma_Inline_Always and deal with
487 Has_Pragma_No_Inline.
489 2019-07-01 Ed Schonberg <schonberg@adacore.com>
491 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
492 declared as a subtype of a private type with an inherited
493 discriminant constraint, its generated full base appears as a
494 record subtype, so we need to retrieve its oen base type so that
495 the inherited constraint can be applied to it.
497 2019-07-01 Yannick Moy <moy@adacore.com>
499 * sem_spark.adb: Completely rework the algorithm for ownership
500 checking, as the rules in SPARK RM have changed a lot.
501 * sem_spark.ads: Update comments.
503 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
505 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
506 the sockaddr_in structure to determine the existence of length field
507 before the sin_family.
509 2019-07-01 Ed Schonberg <schonberg@adacore.com>
511 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
512 applies to entities with run-time addresses, not to types.
514 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
516 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
517 references to the SPARK RM after the removal of Rule 7.1.4(5).
519 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
521 * sysdep.c: Cleanup references to LynuxWorks in docs and
524 2019-07-01 Ed Schonberg <schonberg@adacore.com>
526 * checks.adb (Insert_Valid_Check): Do not apply validity check
527 to variable declared within a protected object that uses the
528 Lock_Free implementation, to prevent unwarranted constant
529 folding, because entities within such an object msut be treated
532 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
534 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
536 2019-07-01 Ed Schonberg <schonberg@adacore.com>
538 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
539 handling of private and incomplete types whose full view is an
540 access type, to detect additional uplevel references in dynamic
541 bounds. This is relevant to N_Free_Statement among others that
542 manipulate types whose full viww may be an access type.
544 2019-07-01 Pat Rogers <rogers@adacore.com>
546 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
547 size indicated for R as a component of an array.
548 * gnat_rm.texi: Regenerate.
550 2019-07-01 Justin Squirek <squirek@adacore.com>
552 * libgnat/s-win32.ads: Add definition for ULONG, modify
553 OVERLAPPED type, and add appropriate pragmas.
555 2019-07-01 Bob Duff <duff@adacore.com>
557 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
560 2019-07-01 Yannick Moy <moy@adacore.com>
562 * sem_ch4.adb (Operator_Check): Refine error message.
564 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
566 * libgnat/a-calend.ads: Revert "Global => null" contracts on
569 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
571 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
572 componant -> component.
574 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
576 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
577 Instance in various routines.
578 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
579 Update various routines that mention the type.
581 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
583 * libgnat/g-sets.adb: Use type Membership_Set rathern than
584 Instance in various routines.
585 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
586 Update various routines that mention the type.
588 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
590 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
591 Instance in various routines.
592 * libgnat/g-lists.ads: Change type Instance to
593 Doubly_Linked_List. Update various routines that mention the
596 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
598 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
599 Instance in various routines.
600 * libgnat/g-dynhta.ads: Change type Instance to
601 Dynamic_Hash_Table. Update various routines that mention the
604 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
606 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
607 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
609 2019-07-01 Javier Miranda <miranda@adacore.com>
611 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
612 'Min/'Max on integer, enumeration, fixed point and floating
613 point types since the CCG backend now provides in file
614 standard.h routines to support it.
616 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
618 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
619 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
621 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
622 rather than direct comparisons).
623 (Delete): Reimplement to use Delete_Node.
624 (Delete_Node): New routine.
625 (Destroy_Bucket): Invoke the provided destructor.
626 (Present): New routines.
627 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
628 Use better names for the components of iterators.
629 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
630 * libgnat/g-lists.adb: Various minor cleanups (use Present
631 rather than direct comparisons).
632 (Delete_Node): Invoke the provided destructor.
633 (Present): New routine.
634 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
635 Use better names for the components of iterators.
636 (Present): New routine.
637 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
638 Reset): New routines.
640 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
642 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
645 2019-07-01 Ed Schonberg <schonberg@adacore.com>
647 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
648 Resolve result of call to Get_Simple_Init_Val, which may be a
649 conversion of a literal.
651 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
653 * freeze.adb (Freeze_Expression): Remove the horrible useless
654 name hiding of N. Insert the freeze nodes generated by the
655 expression prior to the expression when the nearest enclosing
658 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
660 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
661 formatting issues in the -gnatR section.
662 * gnat_ugn.texi: Regenerate.
664 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
666 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
667 Push -shared-libgcc explicitly, when it is the target default (unless
668 overidden by the static flag).
669 When the user has put an instance of shared/static-libgcc do not push
672 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
674 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
675 and tweak comment on the assertion about the scopes of Itypes. Do not
676 skip the regular processing for Itypes that are E_Record_Subtype with
677 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
678 if the type is dummy and hasn't got its own freeze node.
679 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
680 <E_Access_Subtype>: Save again the DECL of the equivalent type.
681 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
683 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
685 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
686 dereferences when padding to have the same size on both sides. Do it
687 for destination types with self-referential size too.
689 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
691 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
692 type requires strict alignment, then set the RM size to the type size.
693 Rework handling of alignment and sizes of tagged types in ASIS mode.
694 (validate_size): Rename local variable and remove special handling for
695 strict-alignment types.
696 * gcc-interface/utils.c (finish_record_type): Constify local variables
697 and use properly typed constants.
699 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
701 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
702 fields requiring strict alignment, add explicit test on Storage_Unit
703 for position and size, and mention type alignment for position.
705 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
707 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
708 the main variant of a type, if any.
710 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
712 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
713 missing guard for the presence of TYPE_CANONICAL.
714 (set_reverse_storage_order_on_array_type): Likewise.
716 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
718 * gcc-interface/gigi.h (make_packable_type): Remove default value.
719 (value_factor_p): Tweak prototype.
720 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
721 (gnat_to_gnu_component_type): Likewise.
722 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
723 and simplify the condition under which the type is packed. Declare
724 local variable is_bitfield. Pass 1 as max_align to make_packable_type
725 if it is set to true.
726 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
727 * gcc-interface/utils.c (make_packable_array_type): New function.
728 (make_packable_type): Use it to rewrite the type of array field.
729 (maybe_pad_type): Pass align parameter to make_packable_type.
730 (create_field_decl): Minor tweaks.
731 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
732 modulo computation by a masking operation.
734 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
736 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
738 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
739 (maybe_character_value): Likewise.
741 2019-06-24 Jan Hubicka <jh@suse.cz>
743 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
744 type is array or integer prior checking string flag.
745 * gcc-interface/gigi.h (maybe_character_type): Likewise.
746 (maybe_character_value): Likewise.
748 2019-06-24 Martin Sebor <msebor@redhat.com>
750 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
753 2019-06-18 Arnaud Charlet <charlet@adacore.com>
756 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
757 during normal processing.
759 2019-06-17 Arnaud Charlet <charlet@adacore.com>
762 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
763 conditions to avoid a unnecessary exception propagation in the default
766 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
768 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
770 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
772 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
773 Document additional optional parameters.
774 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
775 more than one optional parameter.
776 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
777 the list of supported pragmas. Simplify the handling of parameters
778 and add support for more than one optional parameter.
779 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
780 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
781 used, cold, hot, target and target_clones.
782 (begin_subprog_body): Do not create the RTL for the subprogram here.
783 (handle_noicf_attribute): New static function.
784 (handle_noipa_attribute): Likewise.
785 (handle_flatten_attribute): Likewise.
786 (handle_used_attribute): Likewise.
787 (handle_cold_attribute): Likewise.
788 (handle_hot_attribute): Likewise.
789 (handle_target_attribute): Likewise.
790 (handle_target_clones_attribute): Likewise.
792 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
794 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
796 (Identifier_to_gnu): Use the actual subtype for a reference to a
797 packed array in a return statement.
798 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
799 the prefix in every case.
801 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
803 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
804 Backend_Overflow_Checks_On_Target and rework comments.
806 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
808 * gcc-interface/trans.c (walk_nesting_tree): New static function.
809 (finalize_nrv): Use it to walk the entire nesting tree.
811 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
813 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
814 obsolete test on Is_For_Access_Subtype.
816 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
818 * gcc-interface/decl.c (components_to_record): Set a name on the type
819 created for the REP part, if any.
820 * gcc-interface/utils.c (finish_record_type): Only take the maximum
821 when merging sizes for a variant part at offset 0.
822 (merge_sizes): Rename has_rep parameter into max.
824 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
826 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
827 for stack_protect attribute.
828 (handle_stack_protect_attribute): New static function.
830 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
832 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
833 false if the internal builtin uses a variable list.
835 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
837 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
838 created out of addressability concerns if it's for the _Init parameter
839 of an initialization procedure.
841 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
843 * gcc-interface/ada-builtin-types.def: New file.
844 * gcc-interface/ada-builtins.def: Likewise.
845 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
846 (BUILT_IN_UNLIKELY): Likewise.
847 * gcc-interface/trans.c (independent_iterations_p): Initialize the
848 auto-vector to 16 elements.
849 (Call_to_gnu): Remove local variable and change the vector of actual
850 parameters to an auto-vector. Do not convert actual parameters to
851 the argument type for front-end built-in functions. Add support for
852 front-end built-in functions.
853 (build_noreturn_cond): Use internal instead of built-in function.
854 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
855 (install_builtin_function_types): Likewise.
856 (install_builtin_functions): Include ada-builtins.def first.
858 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
860 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
861 specific case of component types preferably.
863 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
865 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
866 (gnat_to_gnu): Do not convert the result if it is a reference to an
867 unconstrained array used as the prefix of an attribute reference that
870 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
872 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
873 (Identifier_to_gnu): Use it to assert that the type of the identifier
874 and that of its entity are compatible for gigi. Rename a couple of
875 local variables and separate the processing of the result type.
877 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
879 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
880 putting back an intermediate conversion the type of the actuals.
882 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
884 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
885 count to the unsigned version of its base type before proceeding.
887 2019-05-16 Martin Sebor <msebor@redhat.com>
889 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
892 2019-05-08 Arnaud Charlet <charlet@adacore.com>
894 * standard.ads.h: New file.
896 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
898 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
901 2019-04-29 Michael K. Darling <darlingm@gmail.com>
903 * gnatvsn.ads: Bump Library_Version to 10.
905 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
906 Bernd Edlinger <bernd.edlinger@hotmail.de>
907 Jakub Jelinek <jakub@redhat.com>
910 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
911 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
914 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
916 * libgnat/i-cexten.ads (CFloat_128): New type.
918 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
921 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
922 Send_Socket): Fix the computation of structure lengths passed to
924 (Is_IPv6_Address): Fix the number of expected colons.
926 2019-03-11 Martin Liska <mliska@suse.cz>
928 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
929 format message and fix GNU coding style.
931 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
933 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
934 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
935 conversion here. Use TREE_CONSTANT throughout the function.
936 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
937 destination is a more aligned array type or a larger aggregate type,
938 but not between original and packable versions of a type.
940 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
942 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
943 operand with VOID_TYPE.
945 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
947 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
948 entities of a package renaming another one.
950 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
952 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
953 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
954 with test on global optimize switch.
955 (Raise_Error_to_gnu): Likewise.
957 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
959 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
961 2019-02-06 Arnaud Charlet <charlet@adacore.com>
963 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
965 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
967 * repinfo.adb (List_Component_Layout): Remove superfluous space for
969 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
970 * gcc-interface/gigi.h (create_extra_subtype): Declare.
971 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
972 (update_n_elem): New function.
973 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
974 instead of doing it manually.
975 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
976 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
977 of the array to the maximum size.
978 <E_Array_Subtype>: Create an extra subtype using the index type of the
979 base array type for self-referential bounds. Use update_n_elem to
980 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
982 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
983 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
984 the base type for an extra subtype.
985 (gnat_type_max_size): Remove obsolete code.
986 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
987 (can_be_lower_p): Deal with pathological types.
988 * gcc-interface/utils.c (create_extra_subtype): New function.
989 (create_field_decl): Minor tweak.
990 (max_size) <tcc_reference>: Compute a better value by using the extra
991 subtypes on the self-referential bounds.
992 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
993 <tcc_expression>: Likewise.
994 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
995 of the arrays upfront. Swap only if the second length is not constant.
996 Use comparisons on the original bounds consistently for the null tests.
997 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
998 (build_allocator): Minor tweak.
1000 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
1002 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1003 the same value for every dimension of a multidimensional array type.
1005 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1007 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
1008 iteration scheme, if present, throughout the translation.
1010 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1012 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
1013 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
1014 by a call to memset if the LHS is a DECL.
1016 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1018 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
1019 (Loop_Statement_to_gnu): Do not set it.
1021 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1023 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
1024 (Acc_gnat_to_gnu): Likewise.
1025 (Acc_Data_to_gnu): Likewise.
1026 (Acc_Var_to_gnu): Likewise.
1027 (Acc_Reduc_to_gnu): Likewise.
1028 (Acc_Size_List_to_gnu): Likewise.
1029 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
1030 <Pragma_Acc_Data>): Likewise.
1031 (find_loop_for): Remove default value for parameters.
1032 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
1033 <N_Op_Eq>): ...this.
1035 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
1037 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
1038 the sign bit instead of on the sign of the value.
1039 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
1040 <MULT_EXPR>: Add test for degenerate case.
1041 <BIT_AND_EXPR>: Simplify.
1043 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
1045 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
1047 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1050 * exp_ch11.adb: Change "can not" to "cannot".
1051 * sem_ch4.adb: Likewise.
1053 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1056 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
1057 * libgnat/s-regpat.ads: Likewise.
1058 * par-ch4.adb: Likewise.
1059 * set_targ.adb: Likewise.
1060 * types.ads: Likewise.
1062 2019-01-08 Justin Squirek <squirek@adacore.com>
1065 2018-07-31 Justin Squirek <squirek@adacore.com>
1067 * lib-writ.adb (Write_With_Lines): Modfiy the generation
1068 of dependencies within ali files so that source unit
1069 bodies are properly listed even if said bodies are
1070 missing. Perform legacy behavior in GNATprove mode.
1071 * lib-writ.ads: Modify documentation to reflect current
1075 2018-09-26 Justin Squirek <squirek@adacore.com>
1077 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
1078 documentation and an extra conditional check for RCI
1079 units so that generated ali files will list the spec
1080 only instead of a body when a body is not found.
1082 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
1084 * gnatvsn.ads: Bump copyright year.
1086 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1088 Update copyright years.
1090 * gnat_ugn.texi: Bump @copying's copyright year.
1091 * gnat_rm.texi: Likewise.
1093 Copyright (C) 2019 Free Software Foundation, Inc.
1095 Copying and distribution of this file, with or without modification,
1096 are permitted in any medium without royalty provided the copyright
1097 notice and this notice are preserved.