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