1 2019-07-04 Ed Schonberg <schonberg@adacore.com>
3 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
4 component is an entity name, its dimensions are those of its
7 2019-07-03 Bob Duff <duff@adacore.com>
9 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
12 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
14 * binde.adb: Remove with clause for System.OS_Lib.
15 (Force_Elab_Order): Refactor the majority of the code in Butil.
16 Use the new forced units iterator to obtain unit names.
17 * bindo-builders.adb: Add with and use clauses for Binderr,
18 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
19 a hash table which maps units to line number in the forced
20 elaboration order file.
21 (Add_Unit): New routine.
22 (Build_Library_Graph): Create forced edges between pairs of
23 units listed in the forced elaboration order file.
24 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
25 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
26 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
27 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
28 Refactor some of the behavior to Bindo-Units.
29 * bindo-graphs.ads: Enable the enumeration literal for forced
31 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
32 Is_Predefined_Unit): New routines.
33 * butil.adb: Add with and use clauses for Opt, GNAT, and
34 System.OS_Lib. Add with clause for Unchecked_Deallocation.
35 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
36 Read_Forced_Elab_Order_File): New routines.
37 * butil.ads: Add with and use clauses for Types. Add new
38 iterator over the units listed in the forced elaboration order
40 (Has_Next, Iterate_Forced_Units, Next): New routine.
41 * namet.adb, namet.ads (Present): New routine.
43 2019-07-03 Bob Duff <duff@adacore.com>
45 * sem_ch3.adb (Access_Definition): The code was creating a
46 master in the case where the designated type is a class-wide
47 interface type. Create a master in the noninterface case as
48 well. That is, create a master for all limited class-wide types.
50 2019-07-03 Yannick Moy <moy@adacore.com>
52 * erroutc.adb (Sloc_In_Range): New function to determine whether
53 the range of a pragma Warnings covers a location, taking
54 instantiations into account.
56 2019-07-03 Johannes Kanig <kanig@adacore.com>
58 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
59 to access the first file provided on the command line.
61 2019-07-03 Ed Schonberg <schonberg@adacore.com>
63 * inline.adb (Process_Formals_In_Aspects): New procedure within
64 Expand_Inlined_Call, to perform a replacement of references to
65 formals that appear in aspect specifications within the body
68 2019-07-03 Justin Squirek <squirek@adacore.com>
70 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
71 the appropriate actual subtype of the object renaming being
73 (Check_Constrained_Object): Minor cleanup.
75 2019-07-03 Yannick Moy <moy@adacore.com>
77 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
78 return go through traversal function call.
79 (Check_Type): Consistently use underlying type.
80 (Get_Perm): Adapt for case of elaboration code where variables
81 are not declared in the environment. Remove incorrect handling
82 of borrow and observe.
84 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
86 * inline.adb (Build_Return_Object_Formal): New routine.
87 (Can_Split_Unconstrained_Function): Code clean up.
88 (Copy_Formals,Copy_Return_Object): New routines.
89 (Split_Unconstrained_Function): Code clean up and refactoring.
91 2019-07-03 Gary Dismukes <dismukes@adacore.com>
93 * bindo-augmentors.adb, bindo-augmentors.ads,
94 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
95 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
96 corrections and reformatting.
98 2019-07-03 Bob Duff <duff@adacore.com>
100 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
101 if an Iterator_Specification is present.
103 2019-07-03 Bob Duff <duff@adacore.com>
105 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
108 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
110 * ali.adb: Add with and use clauses for GNAT,
111 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
112 signature records to invocation signature ids. Add various
113 encodings of invocation-related attributes. Sort and update
114 table Known_ALI_Lines.
115 (Add_Invocation_Construct, Add_Invocation_Relation,
116 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
117 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
118 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
120 (Initialize_ALI): Sort the initialization sequence. Add
121 initialization for all invocation-related tables.
122 (Invocation_Construct_Kind_To_Code,
123 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
124 Invocation_Signature_Of, Present): New routines.
125 (Scan_ALI): Add the default values for invocation-related ids.
126 Scan invocation graph lines.
127 (Scan_Invocation_Graph_Line): New routine.
128 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
129 for invocation constructs, relations, and signatures. Add
130 tables for invocation constructs, relations, and signatures.
131 Update Unit_Record to capture invocation-related ids. Relocate
132 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
134 (Add_Invocation_Construct, Add_Invocation_Relation,
135 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
136 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
137 Code_To_Invocation_Graph_Line_Kind,
138 Invocation_Construct_Kind_To_Code,
139 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
140 Invocation_Signature_Of, Present): New routines.
141 * binde.adb: Add with and use clause for Types. Add use clause
142 for ALI.Unit_Id_Tables;
143 * binde.ads: Relocate table Unit_Id_Tables and subtypes
144 Unit_Id_Table, Unit_Id_Array to ALI.
145 * bindgen.adb: Remove with and use clause for ALI.
146 * bindgen.ads: Remove with and use clause for Binde. Add with
147 and use clause for ALI.
148 * bindo.adb, bindo.ads, bindo-augmentors.adb,
149 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
150 bindo-diagnostics.adb, bindo-diagnostics.ads,
151 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
152 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
153 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
154 bindo-writers.ads: New units.
155 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
156 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
157 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
158 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
159 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
160 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
162 * gnatbind.adb: Add with and use clause for Bindo. Use the new
163 Bindo elaboration order only when -d_N is in effect.
165 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
166 Scope, Signature, Target): New routines.
167 (Write_ALI): Output all invocation-related data.
168 (Write_Invocation_Graph): New routine.
169 * lib-writ.ads: Document the invocation graph ALI line.
170 * namet.adb, namet.ads (Present): New routines.
171 * sem_ch8.adb (Find_Direct_Name): Capture the status of
172 elaboration checks and warnings of an identifier.
173 (Find_Expanded_Name): Capture the status of elaboration checks
174 and warnings of an expanded name.
175 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
176 that invocation graph-related data within the body of the main
177 unit is encoded in the ALI file.
178 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
179 graph-related data within the body of the main unit is encoded
181 (Analyze_Package_Instantiation): Perform minimal decoration of
183 (Analyze_Subprogram_Instantiation): Perform minimal decoration
184 of the instance entity.
185 * sem_elab.adb: Perform heavy refactoring of all code. The unit
186 is now split into "services" which specialize in one area of ABE
187 checks. Add processing in order to capture invocation-graph
188 related attributes of the main unit, and encode them in the ALI
189 file. The Processing phase can now operate in multiple modes,
190 all described by type Processing_Kind. Scenarios and targets
191 are now distinct at the higher level, and carry their own
192 representations. This eliminates the need to constantly
193 recompute their attributes, and offers the various processors a
194 uniform interface. The various initial states of the Processing
195 phase are now encoded using type Processing_In_State, and
197 * sem_elab.ads: Update the literals of type
198 Enclosing_Level_Kind. Add Inline pragmas on several routines.
199 * sem_prag.adb (Process_Inline): Ensure that invocation
200 graph-related data within the body of the main unit is encoded
202 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
204 (Exceptions_OK): Relocated from Sem_Util.
205 (Mark_Save_Invocation_Graph_Of_Body): New routine.
206 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
207 (Mark_Save_Invocation_Graph_Of_Body): New routine.
208 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
209 N_Variable_Reference_Marker.
210 (Is_Elaboration_Warnings_OK_Node): Now applicable to
211 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
212 (Is_Read): Use Flag4.
213 (Is_SPARK_Mode_On_Node): New applicable to
214 N_Variable_Reference_Marker.
215 (Is_Write): Use Flag5.
216 (Save_Invocation_Graph_Of_Body): New routine.
217 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
218 N_Variable_Reference_Marker.
219 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
220 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
221 (Set_Is_SPARK_Mode_On_Node): New applicable to
222 N_Variable_Reference_Marker.
223 (Set_Save_Invocation_Graph_Of_Body): New routine.
224 * sinfo.ads: Update the documentation of attributes
225 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
226 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
227 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
228 and update its occurrence in nodes.
229 (Save_Invocation_Graph_Of_Body): New routine along with pragma
231 (Set_Save_Invocation_Graph_Of_Body): New routine along with
233 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
235 (Scan_Debug_Switches): New routine.
236 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
237 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
238 Component_Vertex_Iterator.
239 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
241 (Iterate_Component_Vertices): New routine.
242 (Iterate_Vertices): Removed.
243 (Next): Update the parameter profile.
244 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
246 * libgnat/g-graphs.ads: Update the initialization of
247 No_Component. Add type Component_Vertex_Iterator. Remove type
249 (Has_Next): Add new versions and remove old ones.
250 (Iterate_Component_Vertices): New routine.
251 (Iterate_Vertices): Removed.
252 (Next): Add new versions and remove old ones.
253 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
255 * libgnat/g-sets.adb (Contains): Reimplemented.
256 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
257 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
258 * rtsfind.ads: Remove extra space.
260 2019-07-03 Yannick Moy <moy@adacore.com>
262 * sem_spark.adb: Add support for locally borrowing and observing
264 (Get_Root_Object): Add parameter Through_Traversal to denote
265 when we are interesting in getting to the traversed parameter.
266 (Is_Prefix_Or_Almost): New function to support detection of
267 illegal access to borrowed or observed paths.
268 (Check_Pragma): Add analysis of assertion pragmas.
270 2019-07-03 Ed Schonberg <schonberg@adacore.com>
272 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
273 we do not build the bodies of predicate fuctions, but the
274 expression in a static predicate must be elaborated to allow
275 case coverage checking within the generic unit.
276 (Build_Discrete_Static_Predicate): In a generic context, return
277 without building function body once the
278 Static_Discrete_Predicate expression for the type has been
281 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
283 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
284 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
286 2019-07-03 Bob Duff <duff@adacore.com>
288 * par-ch3.adb (P_Defining_Identifier): Call
289 Check_Defining_Identifier_Casing.
290 * style.ads, styleg.ads, styleg.adb
291 (Check_Defining_Identifier_Casing): New procedure to check for
292 mixed-case defining identifiers.
293 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
294 flag for checking for mixed-case defining identifiers.
295 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
296 Document new feature.
297 * gnat_ugn.texi: Regenerate.
299 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
301 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
302 (Warning message control): Document that -gnatw.z/Z apply to
304 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
305 types as well, but not if the specified alignment is the minimum
307 * gnat_ugn.texi: Regenerate.
309 2019-07-03 Bob Duff <duff@adacore.com>
311 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
314 2019-07-03 Ed Schonberg <schonberg@adacore.com>
316 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
317 message on attribute applied to a renaming when the renamed
318 object is an aggregate (from code reading).
319 (Check_Aspect_At_End_Of_Declarations): In a generic context
320 where freeze nodes are not generated, the original expression
321 for an aspect may need to be analyzed to precent spurious
322 conformance errors when compared with the expression that is
323 anakyzed at the end of the current declarative list.
325 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
327 * layout.adb (Layout_Type): Do not set the component size of an
328 array with a scalar component if the component type is
331 2019-07-03 Ed Schonberg <schonberg@adacore.com>
333 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
334 the source code of subprograms that are inlined by the
335 front-end, to prevent accidental duplication between loop labels
336 in the inlined code and the code surrounding the inlined call.
338 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
340 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
341 the section on resolving elaboration circularities to eliminate
342 certain combinations of switches which together do not produce
343 the desired effect and confuse users.
344 * gnat_ugn.texi: Regenerate.
346 2019-07-03 Arnaud Charlet <charlet@adacore.com>
348 * bindgen.adb (Gen_Main): Disable generation of reference to
349 Ada_Main_Program_Name for CCG.
350 * bindusg.adb (Display): Add -G to the command-line usage for
352 * opt.ads (Generate_C_Code): Update comment.
353 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
355 2019-07-03 Arnaud Charlet <charlet@adacore.com>
357 * sem_ch7.adb (Has_Referencer): Do not consider inlined
358 subprograms when generating C code, which allows us to generate
359 static inline subprograms.
361 2019-07-03 Justin Squirek <squirek@adacore.com>
363 * sem_ch6.adb (Check_Conformance): Add expression checking for
364 constant modifiers in anonymous access types (in addition to
365 "non-null" types) so that they are considered "matching" for
366 subsequent conformance tests.
368 2019-07-03 Arnaud Charlet <charlet@adacore.com>
370 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
371 Clarify wording on No_Multiple_Elaboration.
372 * gnat_rm.texi: Regenerate.
374 2019-07-03 Ed Schonberg <schonberg@adacore.com>
376 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
377 current instance of a type or subtype, complete the resolution
378 of the name by finding the component of the type denoted by the
381 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
383 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
384 Document that boolean types with convention C now map to C99 bool.
385 * gnat_rm.texi: Regenerate.
387 2019-07-03 Javier Miranda <miranda@adacore.com>
389 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
390 removing code that it is now never executed in the CCG compiler
393 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
395 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
398 2019-07-01 Ed Schonberg <schonberg@adacore.com>
400 * sem_ch12.adb (Is_Defaulted): New predicate in
401 Check_Formal_Package_Intance, to skip the conformance of checks
402 on parameters of a formal package that are defaulted,
404 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
406 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
407 sem_prag.adb, sem_spark.adb: Minor reformatting.
409 2019-07-01 Ed Schonberg <schonberg@adacore.com>
411 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
412 of attribute to be an attribute reference of a discrete type.
414 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
416 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
417 handling of Has_Pragma_Inline_Always and deal with
418 Has_Pragma_No_Inline.
420 2019-07-01 Ed Schonberg <schonberg@adacore.com>
422 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
423 declared as a subtype of a private type with an inherited
424 discriminant constraint, its generated full base appears as a
425 record subtype, so we need to retrieve its oen base type so that
426 the inherited constraint can be applied to it.
428 2019-07-01 Yannick Moy <moy@adacore.com>
430 * sem_spark.adb: Completely rework the algorithm for ownership
431 checking, as the rules in SPARK RM have changed a lot.
432 * sem_spark.ads: Update comments.
434 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
436 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
437 the sockaddr_in structure to determine the existence of length field
438 before the sin_family.
440 2019-07-01 Ed Schonberg <schonberg@adacore.com>
442 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
443 applies to entities with run-time addresses, not to types.
445 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
447 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
448 references to the SPARK RM after the removal of Rule 7.1.4(5).
450 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
452 * sysdep.c: Cleanup references to LynuxWorks in docs and
455 2019-07-01 Ed Schonberg <schonberg@adacore.com>
457 * checks.adb (Insert_Valid_Check): Do not apply validity check
458 to variable declared within a protected object that uses the
459 Lock_Free implementation, to prevent unwarranted constant
460 folding, because entities within such an object msut be treated
463 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
465 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
467 2019-07-01 Ed Schonberg <schonberg@adacore.com>
469 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
470 handling of private and incomplete types whose full view is an
471 access type, to detect additional uplevel references in dynamic
472 bounds. This is relevant to N_Free_Statement among others that
473 manipulate types whose full viww may be an access type.
475 2019-07-01 Pat Rogers <rogers@adacore.com>
477 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
478 size indicated for R as a component of an array.
479 * gnat_rm.texi: Regenerate.
481 2019-07-01 Justin Squirek <squirek@adacore.com>
483 * libgnat/s-win32.ads: Add definition for ULONG, modify
484 OVERLAPPED type, and add appropriate pragmas.
486 2019-07-01 Bob Duff <duff@adacore.com>
488 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
491 2019-07-01 Yannick Moy <moy@adacore.com>
493 * sem_ch4.adb (Operator_Check): Refine error message.
495 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
497 * libgnat/a-calend.ads: Revert "Global => null" contracts on
500 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
502 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
503 componant -> component.
505 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
507 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
508 Instance in various routines.
509 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
510 Update various routines that mention the type.
512 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
514 * libgnat/g-sets.adb: Use type Membership_Set rathern than
515 Instance in various routines.
516 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
517 Update various routines that mention the type.
519 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
521 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
522 Instance in various routines.
523 * libgnat/g-lists.ads: Change type Instance to
524 Doubly_Linked_List. Update various routines that mention the
527 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
529 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
530 Instance in various routines.
531 * libgnat/g-dynhta.ads: Change type Instance to
532 Dynamic_Hash_Table. Update various routines that mention the
535 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
537 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
538 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
540 2019-07-01 Javier Miranda <miranda@adacore.com>
542 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
543 'Min/'Max on integer, enumeration, fixed point and floating
544 point types since the CCG backend now provides in file
545 standard.h routines to support it.
547 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
549 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
550 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
552 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
553 rather than direct comparisons).
554 (Delete): Reimplement to use Delete_Node.
555 (Delete_Node): New routine.
556 (Destroy_Bucket): Invoke the provided destructor.
557 (Present): New routines.
558 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
559 Use better names for the components of iterators.
560 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
561 * libgnat/g-lists.adb: Various minor cleanups (use Present
562 rather than direct comparisons).
563 (Delete_Node): Invoke the provided destructor.
564 (Present): New routine.
565 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
566 Use better names for the components of iterators.
567 (Present): New routine.
568 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
569 Reset): New routines.
571 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
573 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
576 2019-07-01 Ed Schonberg <schonberg@adacore.com>
578 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
579 Resolve result of call to Get_Simple_Init_Val, which may be a
580 conversion of a literal.
582 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
584 * freeze.adb (Freeze_Expression): Remove the horrible useless
585 name hiding of N. Insert the freeze nodes generated by the
586 expression prior to the expression when the nearest enclosing
589 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
591 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
592 formatting issues in the -gnatR section.
593 * gnat_ugn.texi: Regenerate.
595 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
597 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
598 Push -shared-libgcc explicitly, when it is the target default (unless
599 overidden by the static flag).
600 When the user has put an instance of shared/static-libgcc do not push
603 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
605 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
606 and tweak comment on the assertion about the scopes of Itypes. Do not
607 skip the regular processing for Itypes that are E_Record_Subtype with
608 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
609 if the type is dummy and hasn't got its own freeze node.
610 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
611 <E_Access_Subtype>: Save again the DECL of the equivalent type.
612 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
614 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
616 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
617 dereferences when padding to have the same size on both sides. Do it
618 for destination types with self-referential size too.
620 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
622 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
623 type requires strict alignment, then set the RM size to the type size.
624 Rework handling of alignment and sizes of tagged types in ASIS mode.
625 (validate_size): Rename local variable and remove special handling for
626 strict-alignment types.
627 * gcc-interface/utils.c (finish_record_type): Constify local variables
628 and use properly typed constants.
630 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
632 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
633 fields requiring strict alignment, add explicit test on Storage_Unit
634 for position and size, and mention type alignment for position.
636 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
638 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
639 the main variant of a type, if any.
641 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
643 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
644 missing guard for the presence of TYPE_CANONICAL.
645 (set_reverse_storage_order_on_array_type): Likewise.
647 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
649 * gcc-interface/gigi.h (make_packable_type): Remove default value.
650 (value_factor_p): Tweak prototype.
651 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
652 (gnat_to_gnu_component_type): Likewise.
653 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
654 and simplify the condition under which the type is packed. Declare
655 local variable is_bitfield. Pass 1 as max_align to make_packable_type
656 if it is set to true.
657 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
658 * gcc-interface/utils.c (make_packable_array_type): New function.
659 (make_packable_type): Use it to rewrite the type of array field.
660 (maybe_pad_type): Pass align parameter to make_packable_type.
661 (create_field_decl): Minor tweaks.
662 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
663 modulo computation by a masking operation.
665 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
667 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
669 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
670 (maybe_character_value): Likewise.
672 2019-06-24 Jan Hubicka <jh@suse.cz>
674 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
675 type is array or integer prior checking string flag.
676 * gcc-interface/gigi.h (maybe_character_type): Likewise.
677 (maybe_character_value): Likewise.
679 2019-06-24 Martin Sebor <msebor@redhat.com>
681 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
684 2019-06-18 Arnaud Charlet <charlet@adacore.com>
687 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
688 during normal processing.
690 2019-06-17 Arnaud Charlet <charlet@adacore.com>
693 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
694 conditions to avoid a unnecessary exception propagation in the default
697 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
699 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
701 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
703 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
704 Document additional optional parameters.
705 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
706 more than one optional parameter.
707 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
708 the list of supported pragmas. Simplify the handling of parameters
709 and add support for more than one optional parameter.
710 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
711 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
712 used, cold, hot, target and target_clones.
713 (begin_subprog_body): Do not create the RTL for the subprogram here.
714 (handle_noicf_attribute): New static function.
715 (handle_noipa_attribute): Likewise.
716 (handle_flatten_attribute): Likewise.
717 (handle_used_attribute): Likewise.
718 (handle_cold_attribute): Likewise.
719 (handle_hot_attribute): Likewise.
720 (handle_target_attribute): Likewise.
721 (handle_target_clones_attribute): Likewise.
723 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
725 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
727 (Identifier_to_gnu): Use the actual subtype for a reference to a
728 packed array in a return statement.
729 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
730 the prefix in every case.
732 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
734 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
735 Backend_Overflow_Checks_On_Target and rework comments.
737 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
739 * gcc-interface/trans.c (walk_nesting_tree): New static function.
740 (finalize_nrv): Use it to walk the entire nesting tree.
742 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
744 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
745 obsolete test on Is_For_Access_Subtype.
747 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
749 * gcc-interface/decl.c (components_to_record): Set a name on the type
750 created for the REP part, if any.
751 * gcc-interface/utils.c (finish_record_type): Only take the maximum
752 when merging sizes for a variant part at offset 0.
753 (merge_sizes): Rename has_rep parameter into max.
755 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
757 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
758 for stack_protect attribute.
759 (handle_stack_protect_attribute): New static function.
761 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
763 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
764 false if the internal builtin uses a variable list.
766 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
768 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
769 created out of addressability concerns if it's for the _Init parameter
770 of an initialization procedure.
772 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
774 * gcc-interface/ada-builtin-types.def: New file.
775 * gcc-interface/ada-builtins.def: Likewise.
776 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
777 (BUILT_IN_UNLIKELY): Likewise.
778 * gcc-interface/trans.c (independent_iterations_p): Initialize the
779 auto-vector to 16 elements.
780 (Call_to_gnu): Remove local variable and change the vector of actual
781 parameters to an auto-vector. Do not convert actual parameters to
782 the argument type for front-end built-in functions. Add support for
783 front-end built-in functions.
784 (build_noreturn_cond): Use internal instead of built-in function.
785 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
786 (install_builtin_function_types): Likewise.
787 (install_builtin_functions): Include ada-builtins.def first.
789 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
791 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
792 specific case of component types preferably.
794 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
796 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
797 (gnat_to_gnu): Do not convert the result if it is a reference to an
798 unconstrained array used as the prefix of an attribute reference that
801 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
803 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
804 (Identifier_to_gnu): Use it to assert that the type of the identifier
805 and that of its entity are compatible for gigi. Rename a couple of
806 local variables and separate the processing of the result type.
808 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
810 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
811 putting back an intermediate conversion the type of the actuals.
813 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
815 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
816 count to the unsigned version of its base type before proceeding.
818 2019-05-16 Martin Sebor <msebor@redhat.com>
820 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
823 2019-05-08 Arnaud Charlet <charlet@adacore.com>
825 * standard.ads.h: New file.
827 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
829 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
832 2019-04-29 Michael K. Darling <darlingm@gmail.com>
834 * gnatvsn.ads: Bump Library_Version to 10.
836 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
837 Bernd Edlinger <bernd.edlinger@hotmail.de>
838 Jakub Jelinek <jakub@redhat.com>
841 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
842 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
845 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
847 * libgnat/i-cexten.ads (CFloat_128): New type.
849 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
852 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
853 Send_Socket): Fix the computation of structure lengths passed to
855 (Is_IPv6_Address): Fix the number of expected colons.
857 2019-03-11 Martin Liska <mliska@suse.cz>
859 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
860 format message and fix GNU coding style.
862 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
864 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
865 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
866 conversion here. Use TREE_CONSTANT throughout the function.
867 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
868 destination is a more aligned array type or a larger aggregate type,
869 but not between original and packable versions of a type.
871 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
873 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
874 operand with VOID_TYPE.
876 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
878 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
879 entities of a package renaming another one.
881 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
883 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
884 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
885 with test on global optimize switch.
886 (Raise_Error_to_gnu): Likewise.
888 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
890 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
892 2019-02-06 Arnaud Charlet <charlet@adacore.com>
894 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
896 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
898 * repinfo.adb (List_Component_Layout): Remove superfluous space for
900 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
901 * gcc-interface/gigi.h (create_extra_subtype): Declare.
902 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
903 (update_n_elem): New function.
904 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
905 instead of doing it manually.
906 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
907 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
908 of the array to the maximum size.
909 <E_Array_Subtype>: Create an extra subtype using the index type of the
910 base array type for self-referential bounds. Use update_n_elem to
911 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
913 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
914 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
915 the base type for an extra subtype.
916 (gnat_type_max_size): Remove obsolete code.
917 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
918 (can_be_lower_p): Deal with pathological types.
919 * gcc-interface/utils.c (create_extra_subtype): New function.
920 (create_field_decl): Minor tweak.
921 (max_size) <tcc_reference>: Compute a better value by using the extra
922 subtypes on the self-referential bounds.
923 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
924 <tcc_expression>: Likewise.
925 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
926 of the arrays upfront. Swap only if the second length is not constant.
927 Use comparisons on the original bounds consistently for the null tests.
928 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
929 (build_allocator): Minor tweak.
931 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
933 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
934 the same value for every dimension of a multidimensional array type.
936 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
938 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
939 iteration scheme, if present, throughout the translation.
941 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
943 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
944 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
945 by a call to memset if the LHS is a DECL.
947 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
949 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
950 (Loop_Statement_to_gnu): Do not set it.
952 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
954 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
955 (Acc_gnat_to_gnu): Likewise.
956 (Acc_Data_to_gnu): Likewise.
957 (Acc_Var_to_gnu): Likewise.
958 (Acc_Reduc_to_gnu): Likewise.
959 (Acc_Size_List_to_gnu): Likewise.
960 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
961 <Pragma_Acc_Data>): Likewise.
962 (find_loop_for): Remove default value for parameters.
963 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
966 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
968 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
969 the sign bit instead of on the sign of the value.
970 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
971 <MULT_EXPR>: Add test for degenerate case.
972 <BIT_AND_EXPR>: Simplify.
974 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
976 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
978 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
981 * exp_ch11.adb: Change "can not" to "cannot".
982 * sem_ch4.adb: Likewise.
984 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
987 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
988 * libgnat/s-regpat.ads: Likewise.
989 * par-ch4.adb: Likewise.
990 * set_targ.adb: Likewise.
991 * types.ads: Likewise.
993 2019-01-08 Justin Squirek <squirek@adacore.com>
996 2018-07-31 Justin Squirek <squirek@adacore.com>
998 * lib-writ.adb (Write_With_Lines): Modfiy the generation
999 of dependencies within ali files so that source unit
1000 bodies are properly listed even if said bodies are
1001 missing. Perform legacy behavior in GNATprove mode.
1002 * lib-writ.ads: Modify documentation to reflect current
1006 2018-09-26 Justin Squirek <squirek@adacore.com>
1008 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
1009 documentation and an extra conditional check for RCI
1010 units so that generated ali files will list the spec
1011 only instead of a body when a body is not found.
1013 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
1015 * gnatvsn.ads: Bump copyright year.
1017 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1019 Update copyright years.
1021 * gnat_ugn.texi: Bump @copying's copyright year.
1022 * gnat_rm.texi: Likewise.
1024 Copyright (C) 2019 Free Software Foundation, Inc.
1026 Copying and distribution of this file, with or without modification,
1027 are permitted in any medium without royalty provided the copyright
1028 notice and this notice are preserved.