]> gcc.gnu.org Git - gcc.git/blob - gcc/ada/ChangeLog
cb20cfa037ce424643394a1002f2e9bdf98d25d3
[gcc.git] / gcc / ada / ChangeLog
1 2017-10-20 Yannick Moy <moy@adacore.com>
2
3 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
4 compare a dimensioned expression with a literal.
5 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
6 special value zero.
7 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
8 dimensionality system in GNAT.
9 * gnat_ugn.texi: Regenerate.
10
11 2017-10-20 Yannick Moy <moy@adacore.com>
12
13 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
14 inadequate silencing of errors.
15 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
16 checking the subprogram body generated from an expression function,
17 when this is done as part of the preanalysis done on expression
18 functions, as the subprogram body may not yet be attached in the AST.
19 The error if any will be issued later during the analysis of the body.
20 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
21
22 2017-10-20 Arnaud Charlet <charlet@adacore.com>
23
24 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
25 warning on ineffective use clause.
26
27 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
28
29 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
30 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
31 to issue the warning on the absence of local raise.
32 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
33 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
34 absence of local raise.
35 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
36 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
37 where a scenario could give rise to raising Program_Error.
38 * sem_elab.adb: Typo fixes.
39 * fe.h (Warn_If_No_Local_Raise): Declare.
40 * gcc-interface/gigi.h (get_exception_label): Change return type.
41 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
42 simple vector of Entity_Id.
43 (gnu_storage_error_label_stack): Likewise.
44 (gnu_program_error_label_stack): Likewise.
45 (gigi): Adjust to above changes.
46 (Raise_Error_to_gnu): Likewise.
47 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
48 (N_Push_Constraint_Error_Label): Push the label onto the stack.
49 (N_Push_Storage_Error_Label): Likewise.
50 (N_Push_Program_Error_Label): Likewise.
51 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
52 a warning on the absence of local raise.
53 (N_Pop_Storage_Error_Label): Likewise.
54 (N_Pop_Program_Error_Label): Likewise.
55 (push_exception_label_stack): Delete.
56 (get_exception_label): Change return type to Entity_Id and adjust.
57 * gcc-interface/utils2.c (build_goto_raise): Change type of first
58 parameter to Entity_Id and adjust. Set TREE_USED on the label.
59 (build_call_raise): Adjust calls to get_exception_label and also
60 build_goto_raise.
61 (build_call_raise_column): Likewise.
62 (build_call_raise_range): Likewise.
63 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
64 Document actual default behavior.
65
66 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
67
68 * einfo.ads: Minor consistent punctuation in comment. All numbered
69 items in the comment of Is_Internal are now terminated with a period.
70
71 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
72
73 * exp_util.adb (Build_Temporary): Mark created temporary entity as
74 internal.
75
76 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
77
78 * sem_type.adb (In_Generic_Actual): Simplified.
79
80 2017-10-20 Justin Squirek <squirek@adacore.com>
81
82 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
83 verify a renaming exists for a generic formal before comparing it to
84 the actual as defaulted formals will not have a renamed_object.
85
86 2017-10-20 Javier Miranda <miranda@adacore.com>
87
88 * exp_ch6.adb (Replace_Returns): Fix wrong management of
89 N_Block_Statement nodes.
90
91 2017-10-20 Bob Duff <duff@adacore.com>
92
93 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
94 component of an array aggregate if it is initialized by a
95 build-in-place function call.
96 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
97 bip for nonlimited types.
98 * debug.adb: Document -gnatd.9.
99
100 2017-10-20 Bob Duff <duff@adacore.com>
101
102 * sem_ch12.adb: Remove redundant setting of Parent.
103
104 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
105
106 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
107 of the operands is a string literal.
108
109 2017-10-20 Bob Duff <duff@adacore.com>
110
111 * einfo.ads: Comment fix.
112
113 2017-10-20 Clement Fumex <fumex@adacore.com>
114
115 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
116
117 2017-10-20 Ed Schonberg <schonberg@adacore.com>
118
119 * sem_dim.adb (Extract_Power): Accept dimension values that are not
120 non-negative integers when the dimensioned base type is an Integer
121 type.
122
123 2017-10-20 Bob Duff <duff@adacore.com>
124
125 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
126 that an allocator came from a b-i-p return statement.
127 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
128 object of a nonlimited build-in-place function call.
129 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
130 Alloc_For_BIP_Return flag on generated allocators.
131 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
132 If the N_Assignment_Statement has been transformed into something else,
133 then Should_Transform_BIP_Assignment won't work.
134 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
135 "Remove Adjust if we're building the return object of an extended
136 return statement in place." Back out that part of the change, because
137 the Alloc_For_BIP_Return flag is now used for that.
138
139 2017-10-19 Bob Duff <duff@adacore.com>
140
141 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
142 should be "T". Handle case of a subtype of a class-wide type.
143
144 2017-10-19 Bob Duff <duff@adacore.com>
145
146 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
147 which node kinds can legitimately be ignored, and raise Program_Error
148 for others.
149
150 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
151
152 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
153 instantiation that acts as a compilation unit.
154 (Find_Code_Unit): Reimplemented.
155 (Find_Top_Unit): Reimplemented.
156 (Find_Unit_Entity): New routine.
157 (Process_Instantiation_SPARK): Correct the elaboration requirement a
158 package instantiation imposes on a unit.
159
160 2017-10-19 Bob Duff <duff@adacore.com>
161
162 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
163 for a narrow set of controlled types.
164
165 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
166
167 * sinput.ads (Line_Start): Add pragma Inline.
168 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
169
170 2017-10-19 Bob Duff <duff@adacore.com>
171
172 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
173 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
174 build-in-place function call so that the temp is declared in the right
175 place.
176
177 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
178
179 * gcc-interface/misc.c (gnat_tree_size): Move around.
180
181 * gcc-interface/utils.c (max_size): Deal with SSA names.
182
183 2017-10-17 Jakub Jelinek <jakub@redhat.com>
184
185 * gcc-interface/misc.c (gnat_tree_size): New function.
186 (LANG_HOOKS_TREE_SIZE): Redefine.
187
188 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
189
190 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
191 Remote_Call_Interface is not a suitable preelaboratd context when the
192 call appears in the package body.
193
194 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
195
196 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
197 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
198 alignment for consistency. If Align is non-zero, use the minimum of
199 Align and M for the alignment.
200 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
201 setting the alignment directly.
202
203 2017-10-14 Ed Schonberg <schonberg@adacore.com>
204
205 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
206 optional string in an Assert pragma until the expansion of the pragma
207 has rewritten it as a conditional statement, so that the string
208 argument is only evaluaed if the assertion fails. This is mandated by
209 RM 11.4.2.
210
211 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
212
213 * debug.adb: Switch -gnatd.v and associated flag are now used to
214 enforce the SPARK rules for elaboration in SPARK code.
215 * sem_elab.adb: Describe switch -gnatd.v.
216 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
217 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
218 in effect.
219 (Process_Variable_Assignment): Clarify why variable assignments are
220 processed reglardless of whether -gnatd.v is in effect.
221 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
222 sections on elaboration code and compilation switches.
223 * gnat_ugn.texi: Regenerate.
224
225 2017-10-14 Gary Dismukes <dismukes@adacore.com>
226
227 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
228 sem_warn.adb: Minor reformattings.
229
230 2017-10-14 Ed Schonberg <schonberg@adacore.com>
231
232 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
233 for reverse iteration over formal containers.
234 * gnat_rm.texi: Regenerate.
235
236 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
237
238 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
239 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
240 (Ensure_Static_Prior_Elaboration): Renamed to
241 Ensure_Prior_Elaboration_Static for consistency reasons.
242 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
243 reflect its new purpose.
244 (Is_Initialized): New routine.
245 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
246 in order to reflect its new purpose.
247 (Is_Variable_Read): New routine.
248 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
249 to reflect its new purpose.
250 (Process_Variable_Assignment): This routine now acts as a top level
251 dispatcher for variable assignments.
252 (Process_Variable_Assignment_Ada): New routine.
253 (Process_Variable_Assignment_SPARK): New routine.
254 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
255 to reflects its new purpose. A reference to a variable is now suitable
256 for ABE processing only when it is a read. The logic in the routine now
257 reflects the latest SPARK elaboration rules.
258
259 2017-10-14 Justin Squirek <squirek@adacore.com>
260
261 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
262 triggers marking on formal subprograms.
263
264 2017-10-14 Javier Miranda <miranda@adacore.com>
265
266 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
267 renamings of objects that come from the sources.
268
269 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
270
271 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
272 parameter and set the alignment of the type to Align.
273 (Copy_Float_Type): Adjust call to Build_Float_Type.
274 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
275 call to Build_Float_Type and do not set RM_Size and Alignment.
276
277 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
278
279 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
280 GNATRTL_NONTASKING_OBJ.
281
282 2017-10-14 Bob Duff <duff@adacore.com>
283
284 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
285 enabling b-i-p for nonlimited controlled types (but disabled).
286
287 2017-10-14 Justin Squirek <squirek@adacore.com>
288
289 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
290 Has_Warnings_Off with Warnings_Off.
291
292 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
293
294 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
295
296 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
297
298 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
299 enclosing package at the end of the visible declarations.
300 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
301 an initialization item which is undefined due to some illegality.
302
303 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
304
305 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
306 within each unit that require a default-sized primary and secondary
307 stack to be generated by the binder.
308 (Scan_ALI): Scan new 'T' lines.
309 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
310 * bindgen.adb (Gen_Output_File): Count the number of default-sized
311 stacks within the closure that are to be created by the binder.
312 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
313 stacks and record these in System.Secodnary_Stack.
314 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
315 closure of the program being bound.
316 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
317 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
318 (Expand_N_Object_Declaration): Count the number of default-sized stacks
319 used by task objects contained within the object whose declaration is
320 being expanded. Only performed when either the restrictions
321 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
322 effect.
323 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
324 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
325 the expansion of a task type if the size of the stack is known at
326 run-time and the restrictions No_Implicit_Heap_Allocations or
327 No_Implicit_Task_Allocations are in effect.
328 (Make_Task_Create_Call): If using a restricted profile provide
329 secondary stack parameter: either the statically created stack or null.
330 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
331 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
332 Unit_Record initialization expressions.
333 * lib-writ.adb (Add_Preprocessing_Dependency,
334 Ensure_System_Dependency): Include Primary_Stack_Count and
335 Sec_Stack_Count in Unit_Record initialization expression.
336 (Write_ALI): Write T lines.
337 (Write_Unit_Information): Do not output 'T' lines if there are no
338 stacks for the binder to generate.
339 * lib-writ.ads: Updated library information documentation to include
340 new T line entry.
341 * lib.adb (Increment_Primary_Stack_Count): New routine.
342 (Increment_Sec_Stack_Count): New routine.
343 (Primary_Stack_Count): New routine.
344 (Sec_Stack_Count): New routine.
345 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
346 Unit_Record and updated documentation.
347 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
348 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
349 (Primary_Stack_Count): New routine along with pragma Inline.
350 (Sec_Stack_Count): New routine along with pragma Inline.
351 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
352 redefined. New flag Default_Sec_Stack_Size and
353 Quantity_Of_Default_Size_Sec_Stacks.
354 * rtfinal.c Fixed erroneous comment.
355 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
356 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
357 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
358 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
359 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
360 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
361 (Set_Sec_Stack_Addr): Removed routine.
362 (Get_Sec_Stack): New routine.
363 (Set_Sec_Stack): New routine.
364 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
365 reflect new procedure and global names.
366 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
367 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
368 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
369 parameter profile to allow the secondary stack size to be specified.
370 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
371 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
372 call to remove Secondary_Stack_Size reference. Add secondary stack
373 address and size to SSL.Create_TSD call.
374 (Task_Wrapper): Remove secondary stack creation.
375 * libgnarl/s-tarest.ads (Create_Restricted_Task,
376 Create_Restricted_Task_Sequential): Update parameter profile to include
377 Sec_Stack_Address and clarify the Size parameter.
378 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
379 from profile and body.
380 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
381 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
382 Common_ATCB.
383 (Initialize_ATCB): Update the parameter profile to remove
384 Secondary_Stack_Size.
385 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
386 call to Initialize_ATCB. Add secondary stack address and size to
387 SSL.Create_TSD call, and catch any storage exception from the call.
388 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
389 new subprogram and component names.
390 (Task_Wrapper): Remove secondary stack creation.
391 (Vulnerable_Complete_Master): Update to reflect TSD changes.
392 * libgnarl/s-tassta.ads: Reformat comments.
393 (Create_Task): Update parameter profile.
394 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
395 profile to include secondary stack size. Remove secondary size
396 parameter from Initialize_ATCB call and add it to Create_TSD call.
397 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
398 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
399 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
400 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
401 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
402 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
403 Sec_Stack_Dynamic.
404 (Default_Sec_Stack_Size): New routine.
405 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
406 now Preelaborate.
407 * libgnat/s-soflin.adb: Removed unused with-clauses. With
408 System.Soft_Links.Initialize to initialize non-tasking TSD.
409 (Create_TSD): Update parameter profile. Initialize the TSD and
410 unconditionally call SS_Init.
411 (Destroy_TSD): Update SST.SS_Free call.
412 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
413 Set_Sec_Stack_Addr_Soft): Remove routines.
414 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
415 Set_Sec_Stack_Soft): Add routines.
416 (NT_TSD): Move to private part of package specification.
417 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
418 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
419 objects to *_Sec_Stack_*. TSD: removed warning suppression and
420 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
421 (Create_TSD): Update parameter profile.
422 (NT_TSD): Move to private section from body.
423 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
424 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
425 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
426 Remove routine.
427 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
428 (Thread_Body_Enter): Update parameter profile and body to adapt to new
429 System.Secondary_Stack.
430 (Init_RTS): Update body for new System.Soft_Links names.
431 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
432 s-soliin.o.
433
434 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
435
436 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
437 operating on trees as wide_ints.
438
439 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
440
441 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
442 as a scoping construct when it is byproduct of exception handling.
443
444 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
445
446 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
447 semantic field Target of node N_Call_Marker.
448
449 2017-10-09 Ed Schonberg <schonberg@adacore.com>
450
451 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
452 attempts to copy a limited value, when the allocator is the expression
453 in an expression function.
454
455 2017-10-09 Joel Brobecker <brobecker@adacore.com>
456
457 * doc/share/conf.py: Tell the style checker that this is a Python
458 fragment, and therefore that pyflakes should not be run to validate
459 this file.
460
461 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
462
463 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
464 (Is_Entity_Name): Likewise.
465 (Is_String_Type): Likewise.
466 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
467 and remove useless comparisons on the base types.
468 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
469 on T2. Always test Is_Private_Type before Full_View_Covers.
470
471 2017-10-09 Bob Duff <duff@adacore.com>
472
473 * exp_ch4.adb: Minor refactoring.
474
475 2017-10-09 Javier Miranda <miranda@adacore.com>
476
477 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
478 not components.
479
480 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
481
482 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
483 are verified only in the static model.
484
485 2017-10-09 Ed Schonberg <schonberg@adacore.com>
486
487 * sem_ch5.adb (Analyze_Iterator_Specification,
488 Check_Reverse_Iteration): Check that the domain of iteration supports
489 reverse iteration when it is a formal container. This requires the
490 presence of a Previous primitive in the Iterable aspect.
491 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
492 primitives Last and Previous to support reverse iteration over formal
493 containers.
494 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
495 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
496 for reverse iteration using primitives Last and Previous in generated
497 loop.
498
499 2017-10-09 Ed Schonberg <schonberg@adacore.com>
500
501 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
502 of the Defining_Program_Unit_Name, which is an identifier, in order to
503 construct the string for the fully qualified name.
504
505 2017-10-09 Justin Squirek <squirek@adacore.com>
506
507 * sem_ch3.adb: Rename Uses_Unseen_Priv into
508 Contains_Lib_Incomplete_Type.
509
510 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
511
512 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
513 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
514 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
515 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
516 sem_ch10.adb, par-ch8.adb: Minor reformatting.
517
518 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
519
520 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
521 in the static model.
522 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
523 in the static model.
524 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
525 the static model.
526
527 2017-10-09 Ed Schonberg <schonberg@adacore.com>
528
529 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
530 expressions when the enclosing scope is a subprogram body and the next
531 declaration is a body that freezes entities previously declared in the
532 scope.
533
534 2017-10-09 Justin Squirek <squirek@adacore.com>
535
536 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
537 ghost packages and living packages in use clauses.
538 (Use_One_Type, Note_Redundant_Use): Correct warning messages
539
540 2017-10-09 Justin Squirek <squirek@adacore.com>
541
542 * osint.ads: Document new parameter FD for Read_Source_File.
543
544 2017-10-09 Ed Schonberg <schonberg@adacore.com>
545
546 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
547 which the predicate check applies is tagged, convert the expression to
548 that type. This is in most cases a no-op, but is relevant if the
549 expression is clas-swide, because the predicate function being invoked
550 is not a primitive of the type and cannot take a class-wide actual.
551
552 2017-10-09 Gary Dismukes <dismukes@adacore.com>
553
554 * exp_disp.adb: Minor reformatting.
555
556 2017-10-09 Arnaud Charlet <charlet@adacore.com>
557
558 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
559
560 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
561
562 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
563 GNATprove.
564 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
565
566 2017-10-09 Bob Duff <duff@adacore.com>
567
568 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
569 immediately if the call has already been processed (by a previous call
570 to Make_Build_In_Place_Call_In_Anonymous_Context).
571 * sem_elab.adb: Minor typo fixes.
572
573 2017-10-09 Ed Schonberg <schonberg@adacore.com>
574
575 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
576 predicate, do not replace an identifier that matches the type if the
577 identifier is a selector in a selected component, because this
578 indicates a reference to some homograph of the type itself, and not to
579 the current occurence in the predicate.
580
581 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
582
583 * repinfo.adb (List_Record_Layout): Tweak formatting.
584 (Write_Val): Remove superfluous spaces in back-end layout mode.
585
586 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
587
588 * sem_res.adb (Property_Error): Remove.
589 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
590 current wording of the rule.
591
592 2017-10-09 Justin Squirek <squirek@adacore.com>
593
594 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
595 before analyzing a given scope due to an expression function.
596 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
597
598 2017-10-09 Bob Duff <duff@adacore.com>
599
600 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
601 Defining_Identifier (Obj_Decl) in two places, because it might have
602 changed.
603 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
604 involving 'Input on (not visibly) derived types.
605
606 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
607
608 * atree.adb: Add new soft link Rewriting_Proc.
609 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
610 (Set_Rewriting_Proc): New routine.
611 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
612 (Set_Rewriting_Proc): New routine.
613 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
614 for *E*laboration flag to maintain consistency with other elaboration
615 flag generating subprograms.
616 * debug.adb: Document the new usage of flag -gnatdL.
617 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
618 as Protected_Subprogram. Flag148 is now used as
619 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
620 Is_Initial_Condition_Procedure.
621 (Is_Elaboration_Checks_OK_Id): New routine.
622 (Is_Initial_Condition_Procedure): New routine.
623 (Protected_Subprogram): New routine.
624 (Receiving_Entry): New routine.
625 (SPARK_Pragma): Update assertion.
626 (SPARK_Pragma_Inherited): Update assertion.
627 (Suppress_Elaboration_Warnings): Removed.
628 (Set_Is_Elaboration_Checks_OK_Id): New routine.
629 (Set_Is_Initial_Condition_Procedure): New routine.
630 (Set_Protected_Subprogram): New routine.
631 (Set_Receiving_Entry): New routine.
632 (Set_SPARK_Pragma): Update assertion.
633 (Set_SPARK_Pragma_Inherited): Update assertion.
634 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
635 (Write_Field19_Name): Add output for Receiving_Entry.
636 (Write_Field39_Name): Add output for Protected_Subprogram.
637 (Write_Field40_Name): Update the output for SPARK_Pragma.
638 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
639 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
640 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
641 of various entities.
642 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
643 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
644 (Protected_Subprogram): New routine along with pragma Inline.
645 (Receiving_Entry): New routine along with pragma Inline.
646 (Suppress_Elaboration_Warnings): Removed.
647 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
648 Inline.
649 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
650 Inline.
651 (Set_Protected_Subprogram): New routine along with pragma Inline.
652 (Set_Receiving_Entry): New routine along with pragma Inline.
653 (Set_Suppress_Elaboration_Warnings): Removed.
654 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
655 consistency with other finalizer generating subprograms.
656 (Default_Initialize_Object): Mark the block which wraps the call to
657 finalize as being part of initialization.
658 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
659 Initial_Condition.
660 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
661 (Next_Suitable_Statement): Update the comment on usage. Skip over call
662 markers generated by the ABE mechanism.
663 * exp_ch9.adb (Activation_Call_Loc): New routine.
664 (Add_Accept): Link the accept procedure to the original entry.
665 (Build_Protected_Sub_Specification): Link the protected or unprotected
666 version to the original subprogram.
667 (Build_Task_Activation_Call): Code cleanup. Use a source location which
668 is very close to the "begin" or "end" keywords when generating the
669 activation call.
670 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
671 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
672 process loops.
673 (Expand_SPARK_N_Loop_Statement): New routine.
674 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
675 call to the Default_Initial_Condition procedure.
676 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
677 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
678 effect.
679 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
680 (Insert_Actions): Add processing for N_Call_Marker.
681 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
682 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
683 * frontend.adb: Initialize Sem_Elab. Process all saved top level
684 elaboration scenarios for ABE issues.
685 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
686 nodes.
687 * lib.adb (Earlier_In_Extended_Unit): New variant.
688 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
689 (Preanalysis_Active): New routine.
690 * sem.ads (Preanalysis_Active): New routine.
691 * sem_attr.adb (Analyze_Access_Attribute): Save certain
692 elaboration-related attributes. Save the scenario for ABE processing.
693 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
694 effect. Save certain elaboration-related attributes.
695 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
696 attributes. Save the scenario for ABE processing.
697 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
698 mode in effect. Save certain elaboration-related attributes.
699 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
700 locating the first real statement.
701 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
702 certain elaboration-related attributes.
703 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
704 elaboration warnings.
705 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
706 generated for purposes of wrapping an attribute used as a generic
707 actual.
708 (Find_Direct_Name): Save certain elaboration-related attributes. Save
709 the scenario for ABE processing.
710 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
711 the scenario for ABE processing.
712 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
713 elaboration-related attributes.
714 (Analyze_Requeue): Save certain elaboration-related attributes. Save
715 the scenario for ABE processing.
716 (Analyze_Single_Task_Declaration): Save certain elaboration-related
717 attributes.
718 (Analyze_Task_Type_Declaration): Save certain elaboration-related
719 attributes.
720 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
721 elaboration-related attributes.
722 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
723 effect. Save certain elaboration-related attributes.
724 (Analyze_Package_Instantiation): Save certain elaboration-related
725 attributes. Save the scenario for ABE processing. Create completing
726 bodies in case the instantiation results in a guaranteed ABE.
727 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
728 attributes Save the scenario for ABE processing. Create a completing
729 body in case the instantiation results in a guaranteed ABE.
730 (Provide_Completing_Bodies): New routine.
731 * sem_elab.ads: Brand new implementation.
732 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
733 Elaborate_Body): Do not suppress elaboration warnings.
734 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
735 operator.
736 (Resolve_Call): Save certain elaboration-related attributes. Save the
737 scenario for ABE processing.
738 (Resolve_Entity_Name): Do not perform any ABE processing here.
739 (Resolve_Entry_Call): Inherit certain attributes from the original call.
740 * sem_util.adb (Begin_Keyword_Location): New routine.
741 (Defining_Entity): Update the parameter profile. Add processing for
742 concurrent subunits that are rewritten as null statements.
743 (End_Keyword_Location): New routine.
744 (Find_Enclosing_Scope): New routine.
745 (In_Instance_Visible_Part): Code cleanup.
746 (In_Subtree): Update the parameter profile. Add new version.
747 (Is_Preelaborable_Aggregate): New routine.
748 (Is_Preelaborable_Construct): New routine.
749 (Mark_Elaboration_Attributes): New routine.
750 (Scope_Within): Update the parameter profile.
751 (Scope_Within_Or_Same): Update the parameter profile.
752 * sem_util.ads (Begin_Keyword_Location): New routine.
753 (Defining_Entity): Update the parameter profile and the comment on
754 usage.
755 (End_Keyword_Location): New routine.
756 (Find_Enclosing_Scope): New routine.
757 (In_Instance_Visible_Part): Update the parameter profile.
758 (In_Subtree): Update the parameter profile. Add new version.
759 (Is_Preelaborable_Aggregate): New routine.
760 (Is_Preelaborable_Construct): New routine.
761 (Mark_Elaboration_Attributes): New routine.
762 (Scope_Within): Update the parameter profile and the comment on usage.
763 (Scope_Within_Or_Same): Update the parameter profile and the comment on
764 usage.
765 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
766 to determine whether a loop has meaningful condition actions.
767 (Has_Condition_Actions): New routine.
768 * sinfo.adb (ABE_Is_Certain): Removed.
769 (Is_Declaration_Level_Node): New routine.
770 (Is_Dispatching_Call): New routine.
771 (Is_Elaboration_Checks_OK_Node): New routine.
772 (Is_Initialization_Block): New routine.
773 (Is_Known_Guaranteed_ABE): New routine.
774 (Is_Recorded_Scenario): New routine.
775 (Is_Source_Call): New routine.
776 (Is_SPARK_Mode_On_Node): New routine.
777 (No_Elaboration_Check): Removed.
778 (Target): New routine.
779 (Was_Attribute_Reference): New routine.
780 (Set_ABE_Is_Certain): Removed.
781 (Set_Is_Declaration_Level_Node): New routine.
782 (Set_Is_Dispatching_Call): New routine.
783 (Set_Is_Elaboration_Checks_OK_Node): New routine.
784 (Set_Is_Initialization_Block): New routine.
785 (Set_Is_Known_Guaranteed_ABE): New routine.
786 (Set_Is_Recorded_Scenario): New routine.
787 (Set_Is_Source_Call): New routine.
788 (Set_Is_SPARK_Mode_On_Node): New routine.
789 (Set_No_Elaboration_Check): Removed.
790 (Set_Target): New routine.
791 (Set_Was_Attribute_Reference): New routine.
792 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
793 Do_Discriminant_Check now utilizes Flag3. Attribute
794 No_Side_Effect_Removal now utilizes Flag17. Add new node
795 N_Call_Marker. Update the structure of various nodes.
796 (ABE_Is_Certain): Removed along with pragma Inline.
797 (Is_Declaration_Level_Node): New routine along with pragma Inline.
798 (Is_Dispatching_Call): New routine along with pragma Inline.
799 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
800 (Is_Initialization_Block): New routine along with pragma Inline.
801 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
802 (Is_Recorded_Scenario): New routine along with pragma Inline.
803 (Is_Source_Call): New routine along with pragma Inline.
804 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
805 (No_Elaboration_Check): Removed along with pragma Inline.
806 (Target): New routine along with pragma Inline.
807 (Was_Attribute_Reference): New routine along with pragma Inline.
808 (Set_ABE_Is_Certain): Removed along with pragma Inline.
809 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
810 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
811 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
812 Inline.
813 (Set_Is_Initialization_Block): New routine along with pragma Inline.
814 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
815 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
816 (Set_Is_Source_Call): New routine along with pragma Inline.
817 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
818 (Set_No_Elaboration_Check): Removed along with pragma Inline.
819 (Set_Target): New routine along with pragma Inline.
820 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
821 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
822
823 2017-10-09 Bob Duff <duff@adacore.com>
824
825 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
826
827 2017-10-09 Bob Duff <duff@adacore.com>
828
829 * freeze.ads: Minor comment fixed.
830
831 2017-10-09 Bob Duff <duff@adacore.com>
832
833 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
834 care of unchecked conversions in addition to regular conversions. This
835 takes care of a case where a type is derived from a private untagged
836 type that is completed by a tagged controlled type.
837
838 2017-10-09 Ed Schonberg <schonberg@adacore.com>
839
840 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
841 rewriting a class-wide condition, handle properly the case where the
842 controlling argument of the operation to which the condition applies is
843 an access to a tagged type, and the condition includes a dispatching
844 call with an implicit dereference.
845
846 2017-10-09 Bob Duff <duff@adacore.com>
847
848 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
849 the code at the end of this procedure that was setting the type of a
850 class-wide object to the specific type returned by a function call.
851 Treat this case as indefinite instead.
852
853 2017-10-09 Ed Schonberg <schonberg@adacore.com>
854
855 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
856 Suppress spurious ambiguity error when two traversals of the homonym
857 chain (first directly, and then through an examination of relevant
858 interfaces) retrieve the same operation, when other irrelevant homonyms
859 of the operatioh are also present.
860
861 2017-10-09 Ed Schonberg <schonberg@adacore.com>
862
863 * sem_util.adb (Object_Access_Level): If the object is the return
864 statement of an expression function, return the level of the function.
865 This is relevant when the object involves an implicit conversion
866 between access types and the expression function is a completion, which
867 forces the analysis of the expression before rewriting it as a body, so
868 that freeze nodes can appear in the proper scope.
869
870 2017-10-09 Bob Duff <duff@adacore.com>
871
872 * atree.adb: Make nnd apply to everything "interesting", including
873 Rewrite. Remove rrd.
874
875 2017-10-09 Javier Miranda <miranda@adacore.com>
876
877 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
878 processing the declaration of the dummy object internally created by
879 Make_DT to compute the offset to the top of components referencing
880 secondary dispatch tables.
881 (Initialize_Tag): Do not initialize the offset-to-top field if it has
882 been initialized initialized.
883 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
884 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
885 (Make_DT): Create a dummy constant object if we can statically build
886 secondary dispatch tables.
887 (Make_Secondary_DT): For statically allocated secondary dispatch tables
888 use the dummy object to compute the offset-to-top field value by means
889 of the attribute 'Position.
890
891 2017-10-09 Bob Duff <duff@adacore.com>
892
893 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
894 code so if BIPAlloc is not passed in, it will likely raise
895 Program_Error instead of cause miscellaneous chaos.
896 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
897 as for the other Is_B-I-P... functions.
898 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
899 aggregate whose ancestor part is a build-in-place call returning a
900 nonlimited type, transform the assignment to the ancestor part to use a
901 temp.
902 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
903 creating an Itype for a library unit entity.
904 (Check_Initialization): Avoid spurious error message on
905 internally-generated call.
906 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
907 right-hand side is a build-in-place call. This didn't happen when b-i-p
908 was only for limited types.
909 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
910 implies >= Ada 2005.
911 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
912 repeatedly.
913 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
914
915 2017-10-09 Arnaud Charlet <charlet@adacore.com>
916
917 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
918
919 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
920
921 * libgnarl/s-taprob.adb: Minor whitespace fix.
922
923 2017-10-09 Bob Duff <duff@adacore.com>
924
925 * namet.ads: Minor comment fix.
926
927 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
928
929 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
930 just like other program units listed in Ada RM 10.1(1).
931
932 2017-10-09 Justin Squirek <squirek@adacore.com>
933
934 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
935
936 2017-10-09 Ed Schonberg <schonberg@adacore.com>
937
938 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
939 actual for a formal package is an instantiation of a child unit, create
940 a freeze node for the instance of the parent if it appears in the same
941 scope and is not frozen yet.
942
943 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
944
945 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
946 in-source documentation for tagged types's Offset_To_Top.
947
948 2017-10-09 Bob Duff <duff@adacore.com>
949
950 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
951 confusing. Same for N_Loc. Remove assumption that b-i-p implies
952 limited. This is for the case of a function call that occurs as the
953 default for a record component.
954 (Expand_N_Object_Declaration): Deal with the case where expansion has
955 created an object declaration initialized with something like
956 F(...)'Reference.
957 * exp_ch3.adb: Minor reformatting.
958
959 2017-10-09 Ed Schonberg <schonberg@adacore.com>
960
961 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
962 the attribute is an object, but it may appear within a conversion. The
963 object itself must be retrieved when generating the range test that
964 implements the validity check on a scalar type.
965
966 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
967
968 PR ada/82393
969 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
970 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
971
972 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
973 Pierre-Marie de Rodat <derodat@adacore.com>
974
975 PR ada/82384
976 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
977 (time_t): Change from derived type to subtype.
978 (timeval): Use suseconds_t for tv_usec.
979 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
980
981 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
982
983 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
984 handling the form (plus/mult (convert @0) @1).
985
986 2017-09-29 Bob Duff <duff@adacore.com>
987
988 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
989 what we had before.
990 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
991 change. Set the Etype in the class-wide case. This fixes a regression
992 in the libadalang test suite.
993
994 2017-09-29 Joel Brobecker <brobecker@adacore.com>
995
996 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
997 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
998 in comment markup.
999 * gnat_ugn.texi: Regenerate.
1000
1001 2017-09-29 Justin Squirek <squirek@adacore.com>
1002
1003 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
1004 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
1005 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
1006 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
1007 for checking source file status and error message and/or call to
1008 Read_Source_File.
1009 * libgnat/s-os_lib.ads: Add new potential value constant for
1010 uninitialized file descriptors.
1011 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
1012 return result of IO to encompass a read access failure in addition to a
1013 file-not-found error.
1014
1015 2017-09-29 Bob Duff <duff@adacore.com>
1016
1017 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
1018 functions returning nonlimited types. Allow for qualified expressions
1019 and type conversions.
1020 (Expand_N_Extended_Return_Statement): Correct the computation of
1021 Func_Bod to allow for child units.
1022 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
1023 limited (initialization of In_Place_Expansion), and implies >= Ada
1024 2005.
1025 (Is_Build_In_Place_Result_Type): New function to accompany
1026 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
1027 sometimes we just have the type on our hands, not the function. For
1028 now, does the same thing as the old version, so build-in-place is
1029 disabled for nonlimited types, except that you can use -gnatd.9 to
1030 enable it.
1031 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
1032 accompany Is_Build_In_Place_Function and
1033 Is_Build_In_Place_Function_Call, because sometimes we just have the
1034 type on our hands, not the function.
1035 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
1036 cases.
1037 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
1038 questionable code at the end that was setting the Etype.
1039 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
1040 determine whether "return (...agg...);" is returning from a
1041 build-in-place function.
1042 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
1043 Remove assumption that b-i-p implies limited (initialization of
1044 In_Place_Expansion).
1045 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
1046 an unchecked conversion. Add assertions.
1047 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
1048 secondary stack here, just because the type needs finalization. That
1049 code is obsolete.
1050 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
1051 For "return (...agg...);" don't assume b-i-p implies limited.
1052 Needs_Finalization does not imply secondary stack.
1053 (Expand_Array_Aggregate): Named notation. Reverse the sense of
1054 Component_OK_For_Backend -- more readability with fewer double
1055 negatives.
1056 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
1057 b-i-p implies >= Ada 2005.
1058 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
1059 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
1060 object of an extended return statement in place.
1061 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
1062 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
1063 b-i-p implies >= Ada 2005.
1064 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
1065 b-i-p implies >= Ada 2005.
1066 * exp_ch7.adb: Comment fix.
1067 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
1068 assumptions that b-i-p implies >= Ada 2005.
1069 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
1070 b-i-p implies >= Ada 2005.
1071 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
1072 (Expr), in case Pool_Id is not set.
1073 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
1074 qualified or converted.
1075 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
1076 (Param)) = N_Identifier; that's all it could be.
1077 * sinfo.ads: Comment fixes.
1078 * snames.ads-tmpl: Comment fixes.
1079 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
1080
1081 2017-09-29 Justin Squirek <squirek@adacore.com>
1082
1083 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
1084 all cases related to marking entity identifiers.
1085
1086 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
1087
1088 * adaint.c (win32_wait): Properly handle error and take into account
1089 the WIN32 limitation on the number of simultaneous wait objects.
1090
1091 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
1092
1093 * cal.c: Minor proofreading.
1094
1095 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
1096
1097 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
1098 * gnat_ugn.texi: Regenerate.
1099
1100 2017-09-29 Bob Duff <duff@adacore.com>
1101
1102 * lib-xref.ads: Comment fix.
1103
1104 2017-09-29 Bob Duff <duff@adacore.com>
1105
1106 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
1107 Discriminants can't need finalization.
1108
1109 2017-09-29 Ed Schonberg <schonberg@adacore.com>
1110
1111 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
1112 for types in expression if the function is within a generic unit.
1113 * sem_res.adb (Resolve): In a generic context do not freeze an
1114 expression, unless it is an entity. This exception is solely for the
1115 purpose of detecting illegal uses of deferred constants in generic
1116 units.
1117 * sem_res.adb: Minor reformatting.
1118
1119 2017-09-29 Justin Squirek <squirek@adacore.com>
1120
1121 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
1122 redundant warnings.
1123
1124 2017-09-29 Yannick Moy <moy@adacore.com>
1125
1126 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
1127
1128 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1129
1130 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
1131 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
1132 Document the effect of pragma Optimize_Alignment (Space) on non-packed
1133 record types.
1134 * gnat_rm.texi: Regenerate.
1135
1136 2017-09-25 Justin Squirek <squirek@adacore.com>
1137
1138 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
1139 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
1140 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
1141 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
1142 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
1143 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
1144 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
1145 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
1146 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
1147 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
1148 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
1149 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
1150 Removal of ineffective use-clauses.
1151 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
1152 constant folded barriers.
1153 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
1154 Subtype_Marks and Names list in use-clause nodes to their new singular
1155 counterparts (e.g. Subtype_Mark, Name).
1156 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
1157 Prev_Ids and More_Ids in use-clause nodes.
1158 (P_Use_Clause): Modify to take a list as a parameter.
1159 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
1160 subtype_marks within an aggregate use-clauses into individual clauses.
1161 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
1162 P_Use_Clause to match its new behavior.
1163 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
1164 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
1165 errors.
1166 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
1167 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
1168 the declarative region.
1169 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
1170 after analysis (Analyze_Package_Specification): Update use clause chain
1171 when there is no body.
1172 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
1173 parameter to determine weither the installation of scopes should also
1174 propagate on the use-clause "chain".
1175 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
1176 what constitutes a valid "use" of a clause.
1177 (Update_Use_Clause_Chain): Created to aggregate common machinary used
1178 to clean up use-clause chains (and warn on ineffectiveness) at the end
1179 of declaritive regions.
1180 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
1181 package name from a use-package clause.
1182 (Analyze_Package_Name_List): Created to perform analysis on a list of
1183 package names (similar to Analyze_Package_Name).
1184 (Find_Most_Prev): Created to traverse to the beginning of a given
1185 use-clause chain.
1186 (Most_Decendant_Use_Clause): Create to identify which clause from a
1187 given set is highest in scope (not always the most prev).
1188 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
1189 handle the new chaining algorithm, also many changes related to
1190 redundant clauses. A new parameter has also been added to force
1191 installation to handle certain cases.
1192 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
1193 Analyze_Task_Body): Mark use clauses on relevant entities.
1194 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
1195 Install_Parents): Add parameter to determine weither the installation
1196 of scopes should also propagate on the use-clause "chain".
1197 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
1198 Install_Context to avoid redundant chaining of use-clauses.
1199 * sem_ch13.adb: Minor reformatting.
1200 * sem_res.adb (Resolve): Mark use clauses on operators.
1201 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
1202 entities.
1203 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
1204 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
1205 represent any given clause's usage/reference/necessity.
1206 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
1207 nodes to allow loose chaining of redundant clauses.
1208 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
1209 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
1210 reorganization in node fields.
1211 * types.ads (Source_File_Index): Adjust index bounds.
1212 (No_Access_To_Source_File): New constant.
1213
1214 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1215
1216 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
1217 the expression to be used in the generated attribute specification
1218 (rather than relocating it) to avoid resolving a potentially malformed
1219 tree when the expression is resolved through an ASIS-specific call to
1220 Resolve_Aspect_Expressions. This manifests itself as a crash on a
1221 function with parameter associations.
1222
1223 2017-09-25 Yannick Moy <moy@adacore.com>
1224
1225 * exp_spark.adb (Expand_SPARK_Indexed_Component,
1226 Expand_SPARK_Selected_Component): New procedures to insert explicit
1227 dereference if required.
1228 (Expand_SPARK): Call the new procedures.
1229
1230 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
1231
1232 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
1233 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
1234 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
1235 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
1236 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
1237
1238 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
1239
1240 * adaint.c (win32_wait): Properly handle error and take into account
1241 the WIN32 limitation on the number of simultaneous wait objects.
1242
1243 2017-09-25 Yannick Moy <moy@adacore.com>
1244
1245 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
1246 invariant procedure in GNATprove mode.
1247 * sem_ch5.adb (Analyze_Assignment): Likewise.
1248
1249 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
1250
1251 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
1252 "back-end" in comments.
1253
1254 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1255
1256 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
1257 call that appears in a classwide precondition and that mentions an
1258 access formal of the subprogram, must use the accessibility level of
1259 the actual in the call. This is one case in which a reference to a
1260 formal parameter appears outside of the body of the subprogram.
1261
1262 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
1263
1264 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
1265 for GNATprove.
1266 (Resolve_Entry): Clean up predicate
1267
1268 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
1269
1270 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
1271 than Program_Error because U_E is more in line with respect to the
1272 intended behavior.
1273
1274 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1275
1276 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
1277 Storage_Size does not freeze, and thus can include references to
1278 deferred constants.
1279
1280 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
1281
1282 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
1283 reference when it appears within a pragma of no significance to SPARK.
1284 (In_Insignificant_Pragma): New routine.
1285 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
1286
1287 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1288
1289 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
1290 actual is a renaming, indicate that it is the renamed package that must
1291 be frozen before the instantiation.
1292
1293 2017-09-25 Yannick Moy <moy@adacore.com>
1294
1295 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
1296 of dimensionality system in GNAT UG.
1297 * gnat_ugn.texi: Regenerate.
1298
1299 2017-09-25 Yannick Moy <moy@adacore.com>
1300
1301 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
1302 GNATprove_Mode when switch -gnatdF used.
1303
1304 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
1305
1306 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
1307 the backend.
1308
1309 2017-09-25 Javier Miranda <miranda@adacore.com>
1310
1311 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
1312 expansion of user-defined enumeration types when the generation of
1313 names for enumeration literals is suppressed.
1314
1315 2017-09-25 Gary Dismukes <dismukes@adacore.com>
1316
1317 * libgnarl/s-taprop__linux.adb: Minor reformatting.
1318
1319 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1320
1321 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
1322 that appear as selector names of parameter associations, as these are
1323 never resolved by visibility.
1324
1325 2017-09-25 Justin Squirek <squirek@adacore.com>
1326
1327 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
1328
1329 2017-09-25 Doug Rupp <rupp@adacore.com>
1330
1331 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
1332
1333 2017-09-25 Javier Miranda <miranda@adacore.com>
1334
1335 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
1336 (Expand_User_Defined_Enumeration_Image): New subprogram.
1337 (Expand_Image_Attribute): Enable speed-optimized expansion of
1338 user-defined enumeration types when we are compiling with optimizations
1339 enabled.
1340
1341 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
1342
1343 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
1344 routine is already provided by Einfo.
1345 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
1346 Sem_Util, which had better comments and avoided double calls to
1347 Abstract_State.
1348
1349 2017-09-25 Bob Duff <duff@adacore.com>
1350
1351 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
1352
1353 2017-09-25 Doug Rupp <rupp@adacore.com>
1354
1355 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
1356 (Compute_Base_Monotonic_Clock): New function.
1357 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
1358 (Timed_Delay): Likewise.
1359 (Monotonic_Clock): Likewise.
1360 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
1361
1362 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1363
1364 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
1365 previous change.
1366
1367 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
1368
1369 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
1370 Minor reformatting.
1371
1372 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1373
1374 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
1375
1376 2017-09-18 Bob Duff <duff@adacore.com>
1377
1378 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
1379 reference types in the access-to-access case.
1380
1381 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
1382
1383 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
1384 of the "aliased" keyword on the prefix from here to...
1385 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
1386 to Check_No_Implicit_Aliasing.
1387 * sinfo.ads (Non_Aliased_Prefix): Delete.
1388 (Set_Non_Aliased_Prefix): Likewise.
1389 * sinfo.adb (Non_Aliased_Prefix): Delete.
1390 (Set_Non_Aliased_Prefix): Likewise.
1391
1392 2017-09-18 Bob Duff <duff@adacore.com>
1393
1394 * exp_ch5.adb (Build_Formal_Container_Iteration,
1395 Expand_Formal_Container_Element_Loop): Convert the container to the
1396 root type before passing it to the iteration operations, so it will be
1397 of the right type.
1398
1399 2017-09-18 Bob Duff <duff@adacore.com>
1400
1401 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
1402
1403 2017-09-18 Bob Duff <duff@adacore.com>
1404
1405 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
1406 and it's a bit-packed array, pass False to the Consider_IS parameter of
1407 Needs_Simple_Initialization.
1408
1409 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
1410
1411 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
1412 the preexisting body.
1413 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
1414 (Process_Inline): Verify the placement of pragma Inline_Always. The
1415 pragma must now appear on the initial declaration of the related
1416 subprogram.
1417
1418 2017-09-18 Ed Schonberg <schonberg@adacore.com>
1419
1420 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
1421 declarative list in a subprogram body, analyze aspext specifications to
1422 provide basic semantic information, because otherwise the aspect
1423 specifications might only be snalyzed during expansion, when related
1424 subprograms are generated.
1425
1426 2017-09-18 Bob Duff <duff@adacore.com>
1427
1428 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
1429 validity checks have rewritten the tree.
1430
1431 2017-09-18 Bob Duff <duff@adacore.com>
1432
1433 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
1434
1435 2017-09-18 Ed Schonberg <schonberg@adacore.com>
1436
1437 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
1438 qualified exxpression for an aggregate in a generic unit, verify that
1439 the scope of the type is itself visible and not hidden, so that the
1440 qualified expression is correctly resolved in any instance.
1441
1442 2017-09-18 Bob Duff <duff@adacore.com>
1443
1444 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
1445 mark refers to the current instance. Set the type to Any_Type in that
1446 case, to avoid later crashes.
1447
1448 2017-09-18 Ed Schonberg <schonberg@adacore.com>
1449
1450 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
1451 subsidiary of Build_Assignment, used to handle the initialization code
1452 for a mutable record component whose default value is an aggregate that
1453 sets the values of the discriminants of the components.
1454
1455 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
1456
1457 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
1458 the entity as being volatile for an overlay that toggles the scalar
1459 storage order.
1460
1461 2017-09-18 Fedor Rybin <frybin@adacore.com>
1462
1463 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
1464 options -U main and --harness-only are not compatible.
1465
1466 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
1467
1468 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
1469
1470 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
1471
1472 * einfo.ads (Is_Imported): Update comment, as this
1473 routine also applies to constants.
1474
1475 2017-09-18 Yannick Moy <moy@adacore.com>
1476
1477 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
1478 holding state.
1479
1480 2017-09-18 Justin Squirek <squirek@adacore.com>
1481
1482 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
1483 constant indication for Pragma_Linker_Section.
1484
1485 2017-09-18 Bob Duff <duff@adacore.com>
1486
1487 Alternate fix for PR ada/71358
1488 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
1489 Instead, make a local copy of Config, and if it's null, allocate an
1490 empty Command_Line_Configuration_Record, so we won't crash on null
1491 pointer dereference.
1492
1493 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
1494
1495 * libgnarl/a-intnam__rtems.ads: Update copyright date.
1496 * libgnarl/s-interr__hwint.adb: Likewise.
1497 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
1498 * libgnarl/s-osinte__rtems.adb: Likewise.
1499 * libgnarl/s-osinte__rtems.ads: Likewise.
1500
1501 2017-09-13 Nicolas Roche <roche@adacore.com>
1502
1503 * Make-lang.in: In the fallback mechanim, parse the associated .ali
1504 file and try to guess the locations of dependencies.
1505
1506 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
1507
1508 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
1509 the suppression status of Alignment_Check on the current scope.
1510 (Alignment_Checks_Suppressed): New function to use the saved instead of
1511 the current suppression status of Alignment_Check.
1512 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
1513 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
1514 the table, call Register_Address_Clause_Check.
1515 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
1516 recorded address clause instead of its entity.
1517
1518 2017-09-13 Jerome Guitton <guitton@adacore.com>
1519
1520 * libgnarl/s-tpopsp__vxworks-tls.adb,
1521 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
1522 (Self): Register thread if task id is null.
1523
1524 2017-09-13 Arnaud Charlet <charlet@adacore.com>
1525
1526 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
1527
1528 2017-09-13 Arnaud Charlet <charlet@adacore.com>
1529
1530 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
1531 from an entity to only scope index, as a mapping from an entity to the
1532 same entity was useless.
1533 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
1534 to E.
1535 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
1536 to E.
1537 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
1538 variable, just use return statements.
1539
1540 2017-09-13 Arnaud Charlet <charlet@adacore.com>
1541
1542 * libgnarl/s-vxwext__kernel-smp.adb,
1543 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
1544 New file.
1545
1546 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
1547
1548 * einfo.adb: Flag42 is now Is_Controlled_Active.
1549 (Is_Controlled): This attribute is now synthesized.
1550 (Is_Controlled_Active): This attribute is now an explicit flag rather
1551 than a synthesized attribute. (Set_Is_Controlled): Removed.
1552 (Set_Is_Controlled_Active): New routine.
1553 (Write_Entity_Flags): Update the output for Flag42.
1554 * einfo.ads: Update the documentation of the following attributes:
1555 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
1556 and Is_Controlled_Active have swapped their functionality.
1557 (Is_Controlled): Renamed to Is_Controlled_Active.
1558 (Is_Controlled_Active): Renamed to Is_Controlled.
1559 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
1560 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
1561 Is_Controlled.
1562 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
1563 (Needs_Finalization): Code clean up. Remove the tests for
1564 Disable_Controlled because a) they were incorrect as they would reject
1565 a type which is sublect to the aspect, but may contain controlled
1566 components, and b) they are no longer necessary.
1567 * exp_util.ads (Needs_Finalization): Update comment on documentation.
1568 * freeze.adb (Freeze_Array_Type): Restore the original use of
1569 Is_Controlled.
1570 (Freeze_Record_Type): Restore the original use of Is_Controlled.
1571 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
1572 Is_Controlled.
1573 (Array_Type_Declaration): Restore the original use of Is_Controlled.
1574 (Build_Derived_Private_Type): Restore the original use of
1575 Is_Controlled.
1576 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
1577 type derived from Ada.Finalization.[Limited_]Controlled.
1578 (Build_Derived_Type): Restore the original use of Is_Controlled.
1579 (Record_Type_Definition): Restore the original use of Is_Controlled.
1580 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
1581 Is_Controlled.
1582 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
1583 (Analyze_Aspect_Specifications): Use routine
1584 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
1585
1586 2017-09-13 Vincent Celier <celier@adacore.com>
1587
1588 * clean.adb (Gnatclean): Fix error when looking for target
1589 of <target>-gnatclean
1590
1591 2017-09-13 Javier Miranda <miranda@adacore.com>
1592 Ed Schonberg <schonberg@adacore.com>
1593
1594 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
1595 expanded name that designates the current instance of a child unit in
1596 its own body and appears as the prefix of a reference to an entity
1597 local to the child unit.
1598
1599 2017-09-12 Bob Duff <duff@adacore.com>
1600
1601 * sem_warn.adb: Minor comment.
1602
1603 2017-09-12 Bob Duff <duff@adacore.com>
1604
1605 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
1606 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
1607 be Default_Initialized_Item, and apply pragma Unmodified to it,
1608 to suppress the warning.
1609
1610 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
1611
1612 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
1613 for access types.
1614
1615 2017-09-12 Yannick Moy <moy@adacore.com>
1616
1617 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
1618 together with Global when ignoring one in CodePeer mode.
1619
1620 2017-09-12 Javier Miranda <miranda@adacore.com>
1621
1622 * sem_ch3.adb (Analyze_Declarations): In nested
1623 package declarations that have a private part enable missing check
1624 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
1625 resolved at the end of the immediately enclosing declaration list.
1626
1627 2017-09-12 Bob Duff <duff@adacore.com>
1628
1629 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
1630 Empty.
1631
1632 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
1633
1634 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
1635 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
1636 dF flag.
1637 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
1638 in preparation for the evolution of the SPARK language that
1639 includes a pointer analysis for checking non-aliasing of access
1640 types. The Check_Safe_Pointers function is the entry point, and
1641 will traverse the AST and raise compile-time errors everytime
1642 it detects non-begign aliasing. Detailed comments are present
1643 in the sem_spark.ads file.
1644 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
1645 functions to iterate over the list of globals of a subprogram.
1646 * libgnat/system.ads: Add restriction No_Finalization.
1647 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
1648 dependency on g-dynhta.adb.
1649
1650 2017-09-12 Bob Duff <duff@adacore.com>
1651
1652 * sem_ch6.adb (Analyze_Expression_Function): Call
1653 Check_Dynamically_Tagged_Expression.
1654 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
1655 "and then Is_Tagged_Type (Typ)" because there is an earlier
1656 "Assert (Is_Tagged_Type (Typ))".
1657
1658 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
1659
1660 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
1661
1662 2017-09-11 Arnaud Charlet <charlet@adacore.com>
1663
1664 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
1665 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
1666 for no longer supported platforms.
1667 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
1668 description of the semantics for dimensionality analysis.
1669 * gnat_ugn.texi: Regenerated.
1670
1671 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
1672
1673 * freeze.adb (Has_Incomplete_Compoent): Delete.
1674 (Freeze_Profile):
1675 Do not inhibit the freezing of the profile of an expression
1676 function here.
1677 (Freeze_Subprogram): Do not re-create extra formals.
1678 * sem_ch6.adb (Analyze_Expression_Function): Always
1679 pre-analyze the expression if the function is not a completion.
1680 (Analyze_Subprogram_Body_Helper): For the body generated
1681 from an expression function that is not a completion, do
1682 not freeze the profile and temporary mask the types declared
1683 outside the expression that are not yet frozen.
1684 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
1685 during the pre-analysis of an expression function.
1686
1687 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
1688
1689 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
1690 (gigi): Likewise.
1691
1692 2017-09-11 Yannick Moy <moy@adacore.com>
1693
1694 * lib-xref-spark_specific.adb: Minor rewrite.
1695
1696 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
1697
1698 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
1699 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
1700 renaming into account.
1701
1702 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
1703
1704 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
1705 * gcc-interface/Makefile.in: Take this renaming into account.
1706
1707 2017-09-11 Arnaud Charlet <charlet@adacore.com>
1708
1709 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
1710 longer used.
1711
1712 2017-09-11 Yannick Moy <moy@adacore.com>
1713
1714 * sem_util.adb (Check_Result_And_Post_State):
1715 Do not issue a warning about missing reference to an outcome if
1716 the subprogram is ghost and has no outputs.
1717 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
1718 reformatting.
1719
1720 2017-09-11 Yannick Moy <moy@adacore.com>
1721
1722 * gnat1drv.adb (Adjust_Global_Switches): Set
1723 Check_Validity_Of_Parameters to False in GNATprove mode.
1724 * opt.ads (Check_Validity_Of_Parameters): Document switch to
1725 set option.
1726
1727 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
1728
1729 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
1730 generate debug info for inner record types if -fgnat-encodings=minimal.
1731 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
1732 type as the debug type.
1733
1734 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1735
1736 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
1737 packed record types if pragma Optimize_Alignment (Space) is enabled.
1738
1739 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1740
1741 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
1742 limits for expression functions.
1743 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
1744
1745 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1746
1747 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
1748 layout of the record from the parent type only if both are or are not
1749 unchecked unions.
1750 (is_stored_discriminant): Return false for an unchecked union.
1751
1752 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1753
1754 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
1755 return NULL_EXPR.
1756
1757 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1758
1759 * gcc-interface/decl.c (promote_object_alignment): New function taken
1760 from...
1761 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
1762 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
1763 create a padding type on success before doing the atomic check.
1764
1765 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1766
1767 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
1768 promotion to static memory earlier in the processing.
1769
1770 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1771
1772 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
1773 and TYPE_BY_REFERENCE_P flags on types after various promotions.
1774 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1775 Consider all kinds of entities.
1776
1777 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
1778
1779 * gcc-interface/utils.c (convert): When converting to a padding type,
1780 reuse an existing CONSTRUCTOR if it has got the right size.
1781
1782 2017-09-08 Nicolas Roche <roche@adacore.com>
1783
1784 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
1785 source in libgnat/
1786 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
1787 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
1788 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
1789 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
1790 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
1791 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
1792 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
1793 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
1794 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
1795 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
1796 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
1797 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
1798 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
1799 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
1800 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
1801 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
1802 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
1803 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
1804 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
1805 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
1806 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
1807 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
1808 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
1809 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
1810 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
1811 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
1812 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
1813 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
1814 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
1815 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
1816 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
1817 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
1818 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
1819 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
1820 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
1821 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
1822 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
1823 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
1824 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
1825 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
1826 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
1827 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
1828 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
1829 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
1830 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
1831 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
1832 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
1833 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
1834 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
1835 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
1836 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
1837 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
1838 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
1839 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
1840 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
1841 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
1842 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
1843 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
1844 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
1845 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
1846 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
1847 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
1848 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
1849 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
1850 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
1851 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
1852 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
1853 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
1854 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
1855 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
1856 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
1857 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
1858 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
1859 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
1860 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
1861 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
1862 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
1863 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
1864 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
1865 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
1866 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
1867 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
1868 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
1869 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
1870 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
1871 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
1872 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
1873 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
1874 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
1875 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
1876 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
1877 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
1878 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
1879 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
1880 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
1881 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
1882 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
1883 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
1884 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
1885 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
1886 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
1887 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
1888 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
1889 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
1890 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
1891 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
1892 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
1893 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
1894 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
1895 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
1896 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
1897 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
1898 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
1899 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
1900 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
1901 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
1902 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
1903 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
1904 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
1905 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
1906 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
1907 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
1908 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
1909 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
1910 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
1911 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
1912 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
1913 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
1914 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
1915 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
1916 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
1917 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
1918 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
1919 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
1920 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
1921 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
1922 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
1923 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
1924 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
1925 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
1926 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
1927 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
1928 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
1929 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
1930 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
1931 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
1932 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
1933 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
1934 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
1935 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
1936 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
1937 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
1938 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
1939 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
1940 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
1941 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
1942 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
1943 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
1944 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
1945 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
1946 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
1947 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
1948 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
1949 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
1950 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
1951 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
1952 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
1953 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
1954 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
1955 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
1956 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
1957 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
1958 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
1959 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
1960 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
1961 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
1962 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
1963 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
1964 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
1965 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
1966 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
1967 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
1968 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
1969 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
1970 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
1971 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
1972 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
1973 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
1974 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
1975 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
1976 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
1977 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
1978 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
1979 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
1980 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
1981 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
1982 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
1983 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
1984 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
1985 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
1986 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
1987 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
1988 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
1989 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
1990 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
1991 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
1992 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
1993 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
1994 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
1995 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
1996 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
1997 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
1998 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
1999 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
2000 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
2001 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
2002 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
2003 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
2004 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
2005 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
2006 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
2007 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
2008 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
2009 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
2010 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
2011 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
2012 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
2013 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
2014 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
2015 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
2016 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
2017 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
2018 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
2019 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
2020 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
2021 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
2022 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
2023 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
2024 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
2025 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
2026 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
2027 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
2028 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
2029 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
2030 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
2031 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
2032 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
2033 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
2034 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
2035 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
2036 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
2037 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
2038 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
2039 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
2040 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
2041 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
2042 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
2043 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
2044 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
2045 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
2046 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
2047 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
2048 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
2049 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
2050 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
2051 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
2052 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
2053 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
2054 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
2055 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
2056 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
2057 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
2058 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
2059 to libgnat subdirectory.
2060
2061 2017-09-08 Yannick Moy <moy@adacore.com>
2062
2063 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
2064 return the entity associated with the call.
2065 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
2066 Replace the internal Get_Function_Id with the new
2067 Sem_Aux.Get_Called_Entity.
2068 (Iterate_Call_Parameters): New
2069 procedure to iterate on formals and actuals at the same time.
2070 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
2071 Set SPARK_Mode from spec when set, for analysis
2072 of instance. Restore after analysis of instance.
2073 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
2074 set, for analysis of body instance. Restored automatically at
2075 the end of the subprogram.
2076 * gnat1drv.adb (Adjust_Global_Switches): Set
2077 Check_Validity_Of_Parameters to False in GNATprove mode.
2078 * opt.ads (Check_Validity_Of_Parameters): Document switch to
2079 set option.
2080
2081 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2082
2083 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
2084 (New_Copy_Tree): ...there. Reset the hash tables only if they
2085 were used in the previous invocation.
2086 * s-htable.adb: Fix typo.
2087
2088 2017-09-08 Bob Duff <duff@adacore.com>
2089
2090 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
2091
2092 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2093
2094 * sem_aggr.adb: minor style fix.
2095
2096 2017-09-08 Bob Duff <duff@adacore.com>
2097
2098 * sprint.adb (Write_Corresponding_Source): Ignore if there is
2099 no current source file.
2100 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
2101 Print something helpful in case N is invalid.
2102 * sprint.ads: Minor comment fix.
2103
2104 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2105
2106 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
2107 access types.
2108
2109 2017-09-08 Bob Duff <duff@adacore.com>
2110
2111 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
2112 Ada_2020, along the same lines as the other Ada version pragmas.
2113
2114 2017-09-08 Gary Dismukes <dismukes@adacore.com>
2115
2116 * sem_ch12.adb: Minor typo fixes and reformatting.
2117
2118 2017-09-08 Yannick Moy <moy@adacore.com>
2119
2120 * sem_aggr.adb (Resolve_Record_Aggregate):
2121 Rewrite bounds of aggregate subexpressions which may depend on
2122 discriminants of the enclosing aggregate.
2123
2124 2017-09-08 Yannick Moy <moy@adacore.com>
2125
2126 * sem_ch5.adb: Prevent assertion failure on illegal code.
2127
2128 2017-09-08 Yannick Moy <moy@adacore.com>
2129
2130 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
2131 calling Renamed_Entity on an entity which cannot be a renaming.
2132
2133 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2134
2135 * exp_aggr.adb: Add with & use clause for Urealp.
2136 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
2137 elementary types instead of just discrete types.
2138 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
2139 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
2140 Be prepared for the FP zero value in the memset case. Add small
2141 guard.
2142
2143 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2144
2145 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
2146 of loop.
2147
2148 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
2149
2150 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
2151 of New_Copy because the latter leaves the syntactic structure of
2152 the tree inconsistent (a child is accessible through two parents)
2153 and prevents proper replication of itypes by subsequent calls
2154 to New_Copy_Tree.
2155 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
2156 New_Copy because the latter leaves the syntactic structure of the
2157 tree inconsistent (a child is accessible through two parents)
2158 and prevents proper replication of itypes by subsequent calls
2159 to New_Copy_Tree.
2160 * sem_util.adb (In_Subtree): New routine.
2161 (New_Copy_Tree): Reimplemented.
2162 * sem_util.ads (In_Subtree): New routine.
2163 (New_Copy_Tree): Reimplemented.
2164
2165 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2166
2167 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
2168 for aspect Default_Value is a static scalar value, but it does
2169 not freeze the type. Yhis allows for subsequent representation
2170 clauses for the type.
2171
2172 2017-09-08 Javier Miranda <miranda@adacore.com>
2173
2174 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
2175 not add entries into the undefined reference table when we are
2176 compiling with errors ignored.
2177
2178 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2179
2180 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
2181 check if the instance is within an enclosing instance body. The
2182 formal package was legal in the enclosing generic, and is
2183 legal in the enclosing instantiation. This optimisation may be
2184 applicable elsewhere, and it also removes spurious errors that
2185 may arise with on-the-fly processing of instantiations that
2186 contain Inline_Always subprograms.
2187
2188 2017-09-08 Vincent Celier <celier@adacore.com>
2189
2190 * gnatcmd.adb: Disregard empty argument of GNAT driver.
2191
2192 2017-09-08 Justin Squirek <squirek@adacore.com>
2193
2194 * checks.adb (Insert_Valid_Check): Manually decorate
2195 the generated temporary for range valdity checks.
2196
2197 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2198
2199 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
2200
2201 2017-09-08 Justin Squirek <squirek@adacore.com>
2202
2203 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
2204 case to handle underscore flags.
2205 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
2206 new procedure to handle underscores.
2207
2208 2017-09-08 Javier Miranda <miranda@adacore.com>
2209
2210 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
2211 divisions with fixed point results to avoid generating twice
2212 the runtime check on divide by zero.
2213 * checks.adb (Apply_Divide_Checks): Ensure that operands are
2214 not evaluated twice (once for their runtime checks and once for
2215 their regular computation).
2216
2217 2017-09-08 Yannick Moy <moy@adacore.com>
2218
2219 * sem_prag.adb (Analyze_Part_Of): Add missing
2220 return statements after issuing errors. Add detection of
2221 out-of-order item and single concurrent type.
2222
2223 2017-09-08 Nicolas Roche <roche@adacore.com>
2224
2225 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
2226 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
2227 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
2228 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
2229 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
2230 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
2231 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
2232 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
2233 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
2234 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
2235 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
2236 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
2237 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
2238 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
2239 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
2240 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
2241 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
2242 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
2243 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
2244 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
2245 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
2246 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
2247 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
2248 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
2249 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
2250 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
2251 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
2252 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
2253 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
2254 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
2255 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
2256 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
2257 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
2258 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
2259 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
2260 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
2261 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
2262 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
2263 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
2264 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
2265 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
2266 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
2267 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
2268 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
2269 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
2270 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
2271 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
2272 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
2273 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
2274 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
2275 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
2276 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
2277 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
2278 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
2279
2280 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2281
2282 * doc/share/conf.py, doc/share/latex_elements.py,
2283 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
2284 highlighting.
2285
2286 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2287
2288 * gnat_rm.texi, gnat_ugn.texi,
2289 doc/gnat_ugn/the_gnat_compilation_model.rst,
2290 doc/gnat_ugn/getting_started_with_gnat.rst,
2291 doc/gnat_ugn/inline_assembler.rst,
2292 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2293 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
2294 doc/gnat_ugn/about_this_guide.rst,
2295 doc/gnat_ugn/platform_specific_information.rst,
2296 doc/gnat_ugn/example_of_binder_output.rst,
2297 doc/gnat_ugn/gnat_and_program_execution.rst,
2298 doc/gnat_ugn/gnat_utility_programs.rst,
2299 doc/gnat_rm/implementation_of_specific_ada_features.rst,
2300 doc/gnat_rm/interfacing_to_other_languages.rst,
2301 doc/gnat_rm/implementation_defined_aspects.rst,
2302 doc/gnat_rm/intrinsic_subprograms.rst,
2303 doc/gnat_rm/implementation_defined_characteristics.rst,
2304 doc/gnat_rm/implementation_advice.rst,
2305 doc/gnat_rm/implementation_defined_attributes.rst,
2306 doc/gnat_rm/compatibility_and_porting_guide.rst,
2307 doc/gnat_rm/standard_library_routines.rst,
2308 doc/gnat_rm/the_gnat_library.rst,
2309 doc/gnat_rm/implementation_defined_pragmas.rst,
2310 doc/gnat_rm/representation_clauses_and_pragmas.rst,
2311 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2312 doc/gnat_rm/obsolescent_features.rst,
2313 doc/gnat_rm/about_this_guide.rst,
2314 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
2315 doc/gnat_rm/implementation_of_ada_2012_features.rst,
2316 doc/gnat_ugn.rst,
2317 doc/gnat_rm.rst: Update documentation.
2318
2319 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2320
2321 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
2322 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
2323 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
2324
2325 2017-09-08 Bob Duff <duff@adacore.com>
2326
2327 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
2328 New routine to read the Tag robustly.
2329 * exp_attr.adb (Input): Change the expansion of 'Input,
2330 in the class-wide case, to call String_Input_Tag instead of
2331 String_Input_Blk_IO.
2332
2333 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2334
2335 * s-rident.ads (Restriction_Id): reorder enum
2336 literals, so that Pure_Barriers is no longer in range of the
2337 Cunit_Boolean_Restrictions subtype.
2338
2339 2017-09-08 Nicolas Roche <roche@adacore.com>
2340
2341 * a-taster.ads, a-taster.adb: Move to libgnarl
2342 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
2343 Add support for files in libgnarl.
2344
2345 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2346
2347 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
2348 accessibility check to an interface conversion, whose purpose
2349 is to perform a pointer adjustment in a dispatching call.
2350 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
2351 when the actual is a construct that involves a dereference of an
2352 expression that includes a formal of the enclosing subprogram,
2353 In such cases, the accessibility level of the actual is that of
2354 the corresponding formal, which is passed in as an additional
2355 actual in the outer call.
2356
2357 2017-09-08 Bob Duff <duff@adacore.com>
2358
2359 * exp_intr.adb (Add_Source_Info): Do not decode
2360 file names; they were not encoded in the first place.
2361
2362 2017-09-08 Bob Duff <duff@adacore.com>
2363
2364 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
2365 exceptions instead of crashes. Check for absurdly long strings
2366 and empty strings. Empty strings cause trouble because they can
2367 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
2368 be empty, which causes an array index out of bounds.
2369 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
2370 instead of crashes.
2371
2372 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2373
2374 * sem_util.adb (Is_CCT_Instance): allow use in
2375 the context of protected types.
2376
2377 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2378
2379 * a-tigeli.adb: minor remove extra whitespace.
2380
2381 2017-09-08 Gary Dismukes <dismukes@adacore.com>
2382
2383 * par-ch4.adb: Reformatting of an error message.
2384
2385 2017-09-08 Javier Miranda <miranda@adacore.com>
2386
2387 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
2388 identifiers to ensure their correct decoration of names on
2389 aspect expressions.
2390
2391 2017-09-08 Yannick Moy <moy@adacore.com>
2392
2393 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
2394 not skip a loop coming from source which is rewritten into a loop.
2395
2396 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2397
2398 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
2399 wrapper has convention Ada, to prevent spurious warnings on
2400 unconstrained array parameters.
2401
2402 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2403
2404 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
2405 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
2406
2407 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2408
2409 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
2410
2411 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2412
2413 * exp_intr.adb (Append_Entity_Name): Move to ...
2414 * sem_util.ads, sem_util.adb: ... here to share it.
2415 (Subprogram_Name): New subprogram, to compute the name of the enclosing
2416 subprogram/entity.
2417 * errutil.adb (Error_Msg): Fill new field Node.
2418 * erroutc.ads (Subprogram_Name_Ptr): New.
2419 (Error_Msg_Object): New field Node.
2420 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
2421 * errout.adb (Error_Msg): New variant with node id parameter.
2422 Fill new parameter Node when emitting messages. Revert previous
2423 changes for Include_Subprogram_In_Messages.
2424 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
2425 generating warning message.
2426
2427 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2428
2429 * par-ch4.adb (P_Iterated_Component_Association): Place construct
2430 under -gnat2020 flag, given that it is a future feature of
2431 the language.
2432 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
2433 defining identifier as referenced to prevent spurious warnings:
2434 corresponding loop is expanded into one or more loops whose
2435 variable has the same name, and the expression uses those names
2436 and not the original one.
2437
2438 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
2439
2440 * sem_elab.adb (Check_A_Call): Do not consider
2441 references to internal variables for SPARK semantics.
2442
2443 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2444
2445 * inline.adb (In_Package_Spec): refine type of
2446 the parameter from Node_Id to Entity_Id.
2447
2448 2017-09-08 Justin Squirek <squirek@adacore.com>
2449
2450 * exp_ch5.adb (Expand_Formal_Container_Loop):
2451 Reset the scope of the loop parameter after it is reanalyzed.
2452
2453 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2454
2455 * sem_util.ads (Set_Rep_Info): New inline procedure.
2456 * sem_util.adb (Set_Rep_Info): Implement it.
2457 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
2458 always copy the representation aspects onto the subtype.
2459
2460 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
2461
2462 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
2463 Correction of the return type from access type to option type.
2464 (Simple_HTable): Moving the Instance_Data to ads file.
2465
2466 2017-09-08 Yannick Moy <moy@adacore.com>
2467
2468 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
2469
2470 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2471
2472 * opt.ads (Include_Subprogram_In_Messages): New variable.
2473 * errout.ads (Current_Subprogram_Ptr): New variable.
2474 * errout.adb (Error_Msg): Prepend current subprogram info
2475 in messages if Include_Subprogram_In_Messages is set.
2476 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
2477 Current_Subprogram.
2478 * gnat1drv.adb (Adjust_Global_Switches): Set
2479 Include_Subprogram_In_Messages when -gnatdJ is set.
2480 * debug.adb: Document and reserve -gnatdJ.
2481
2482 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
2483
2484 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
2485 functions to iterate over simple hastables.
2486 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
2487
2488 2017-09-08 Javier Miranda <miranda@adacore.com>
2489
2490 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
2491 missing checks on the presence of Entity() before checking the
2492 entity attributes.
2493
2494 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2495
2496 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
2497 statements, use local variable and remove unnecessary processing.
2498
2499 2017-09-08 Javier Miranda <miranda@adacore.com>
2500
2501 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
2502 subprogram.
2503 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
2504 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
2505 subprogram.
2506 (Unqual_BIP_Iface_Function_Call): New subprogram.
2507 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
2508 subprogram containing code that was previously inside
2509 Make_Build_In_Place_Call_In_Object_Declaration since it is also
2510 required for one of the new subprograms.
2511 (Expand_Actuals):
2512 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
2513 (Expand_N_Extended_Return_Statement): Extend the
2514 cases covered by an assertion on expected BIP object
2515 declarations.
2516 (Make_Build_In_Place_Call_In_Assignment):
2517 Removing unused code; found working on this ticket.
2518 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
2519 that replaces the internal name of the renaming declaration
2520 into the new subprogram Replace_Renaming_Declaration_Id.
2521 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
2522 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
2523 New subprogram.
2524 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
2525 subprogram.
2526 (Unqual_BIP_Iface_Function_Call): New subprogram.
2527 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
2528 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
2529 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
2530 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2531 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
2532 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
2533 (Expand_N_Indexed_Component): Invoke the new subprogram
2534 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2535 (Expand_N_Selected_Component): Invoke the new subprogram
2536 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2537 (Expand_N_Slice): Invoke the new subprogram
2538 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2539 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
2540 Invoke the new subprogram
2541 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2542
2543 2017-09-08 Javier Miranda <miranda@adacore.com>
2544
2545 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
2546 access to interface types. Remove also the accessibility check.
2547
2548 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2549
2550 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
2551 all the types that are referenced by the expression.
2552 (Analyze_Expression_Function): Call Freeze_Expr_Types for
2553 a completion instead of manually freezing the type of the
2554 expression.
2555 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
2556
2557 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2558
2559 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
2560 New procedure, auxiliary to Expand_Pragma_Check, to handle
2561 references to the discriminants of a protected type within a
2562 precondition of a protected operation. This is needed because
2563 the original precondition has been analyzed in the context of
2564 the protected declaration, but in the body of the operation
2565 references to the discriminants have been replaved by references
2566 to the discriminants of the target object, and these references
2567 are only created when expanding the protected body.
2568
2569 2017-09-08 Yannick Moy <moy@adacore.com>
2570
2571 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
2572 Loop_Variant.
2573
2574 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2575
2576 * exp_attr.adb (Build_Record_VS_Func): If the record is an
2577 unchecked union, do not emit checks for its (non-existent)
2578 discriminants, or for variant parts that depend on them.
2579
2580 2017-09-08 Justin Squirek <squirek@adacore.com>
2581
2582 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
2583 Find_Comparison_Type.Try_One_Interp): Add check for generic
2584 instances.
2585
2586 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2587
2588 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
2589 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
2590 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
2591 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
2592 remaining references to AAMP_On_Target.
2593
2594 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2595
2596 * style.adb: Fix typo.
2597
2598 2017-09-08 Javier Miranda <miranda@adacore.com>
2599
2600 * einfo.adb (Underlying_Type): Add missing support for class-wide
2601 types that come from the limited view.
2602 * exp_attr.adb (Attribute_Address): Check class-wide type
2603 interfaces using the underlying type to handle limited-withed
2604 types.
2605 (Attribute_Tag): Check class-wide type interfaces using
2606 the underlying type to handle limited-withed types.
2607
2608 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2609
2610 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
2611 over a subtype of a type with a static predicate, taking into
2612 account the predicate function of the parent type and the bounds
2613 given in the loop specification.
2614 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
2615 a loop specification that is a subtype indication whose type mark
2616 is a type with a static predicate, inherit predicate function,
2617 used to build case statement for rewritten loop.
2618
2619 2017-09-08 Justin Squirek <squirek@adacore.com>
2620
2621 * lib-load.adb: Modify printing of error message to exclude file
2622 line number.
2623
2624 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2625
2626 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
2627 don't inline subprograms declared in both visible and private
2628 parts of a package.
2629 (In_Package_Spec): previously In_Package_Visible_Spec; now
2630 detects subprograms declared both in visible and private parts
2631 of a package spec.
2632
2633 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2634
2635 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
2636 the type is an anonymous array in an object declaration, whose
2637 component type has an invariant, use the object declaration
2638 as the insertion point for the invariant procedure, given that
2639 there is no explicit type declaration for an anonymous array type.
2640
2641 2017-09-08 Bob Duff <duff@adacore.com>
2642
2643 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
2644
2645 2017-09-08 Bob Duff <duff@adacore.com>
2646
2647 * a-strfix.adb (Trim): Compute Low and High only if needed.
2648
2649 2017-09-08 Justin Squirek <squirek@adacore.com>
2650
2651 * lib-load.adb (Load_Main_Source): Add error output in the case a
2652 source file is missing.
2653
2654 2017-09-08 Bob Duff <duff@adacore.com>
2655
2656 PR ada/80888
2657 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
2658 Default_WCEM by default (i.e. if the encoding is not specified
2659 by the Form string).
2660
2661 2017-09-08 Bob Duff <duff@adacore.com>
2662
2663 * s-trasym.ads (Hexa_Traceback): If
2664 Suppress_Hex is True, print "..." instead of a hexadecimal
2665 address.
2666 * s-trasym.adb: Ignore No_Hex in this version.
2667 Misc cleanup.
2668
2669 2017-09-08 Bob Duff <duff@adacore.com>
2670
2671 * debug.adb: Minor reformatting.
2672
2673 2017-09-08 Bob Duff <duff@adacore.com>
2674
2675 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
2676 code so it doesn't trigger an "uninit var" warning.
2677
2678 2017-09-08 Nicolas Roche <roche@adacore.com>
2679
2680 * s-hibaen.ads: Remove obsolete file.
2681
2682 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2683
2684 * a-locale.ads: Add comment explaining the state of this package.
2685
2686 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2687
2688 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
2689 of packages.
2690 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
2691 allow calls in the context of package spec (for pragma
2692 Initializes) and bodies (for pragma Refined_State).
2693
2694 2017-09-08 Bob Duff <duff@adacore.com>
2695
2696 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
2697 new Exp.
2698
2699 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2700
2701 * debug.adb (dA): Adjust comment.
2702 * gnat1drv.adb (Gnat1drv): Likewise.
2703 * opt.ads (List_Representation_Info_Extended): New variable.
2704 * repinfo.adb (List_Record_Info): Split implementation into...
2705 (Compute_Max_Length): ...this. Recurse on records if requested.
2706 (List_Record_Layout): Likewise.
2707 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
2708 statement, accept '0' and set List_Representation_Info_Extended
2709 on 'e'.
2710 * usage.adb (Usage): Document new -gnatRe variant.
2711
2712 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2713
2714 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
2715 Do not save the given entity in the global variable Default_Pool
2716 if the pragma appears within a generic unit.
2717
2718 2017-09-08 Bob Duff <duff@adacore.com>
2719
2720 * errout.adb (Delete_Warning): Do not
2721 decrement Warnings_Treated_As_Errors. This is called before
2722 Warnings_Treated_As_Errors has been incremented to account for
2723 this warning. Decrementing it here can lead to negative values
2724 of Warnings_Treated_As_Errors, raising Constraint_Error in
2725 checks-on builds, and causing the compiler to return an error
2726 code in checks-off builds.
2727
2728 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2729
2730 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
2731 entities of named concurrent types as Ref_Id and not of anonymous
2732 concurrent objects (because callers already know when a conversion
2733 is necessary and can easily do it); also, do not expect protected
2734 types or protected objects as Context_Id (because no flow-related
2735 SPARK pragmas are attached there); reflect these changes in a
2736 more precise comment.
2737
2738 2017-09-08 Olivier Hainque <hainque@adacore.com>
2739
2740 * g-altive.ads: Add documentation.
2741
2742 2017-09-08 Bob Duff <duff@adacore.com>
2743
2744 * sem_util.ads, debug.adb: Minor comment fix.
2745 * erroutc.ads: Comment fix.
2746
2747 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2748
2749 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
2750 for compatibility of component types of formal and actual in an
2751 instantiation of a child unit, when the component type of the
2752 formal is itself a formal of an enclosing generic.
2753
2754 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2755
2756 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
2757 sem_prag.adb to make it available for GNATprove; for concurrent
2758 types replace custom scope climbing with Scope_Same_Or_Within; for
2759 single concurrent objects add scope climbing (with Scope_Within),
2760 which was not there (that's the primary semantic change of this
2761 commit); also, when comparing a single concurrent object with
2762 its corresponding concurrent type rely on equality of types,
2763 not of objects (because that's simpler to code).
2764 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
2765 (Analyze_Global_Item): adjust special-casing of references to the
2766 current instance of a concurrent unit in the Global contracts
2767 of task types and single tasks objects; similar for references
2768 in the protected operations and entries of protected types and
2769 single protected objects (in all these cases the current instance
2770 behaves as an implicit parameter and must not be mentioned in
2771 the Global contract).
2772
2773 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2774
2775 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
2776 function calls returning a record within a subprogram call,
2777 for C generation.
2778
2779 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2780
2781 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
2782 name that designates the current instance of a child unit in its
2783 own body and appears as the prefix of a reference to an entity
2784 local to the child unit.
2785 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
2786 Minor reformatting.
2787
2788 2017-09-08 Yannick Moy <moy@adacore.com>
2789
2790 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
2791 may be intentional.
2792
2793 2017-09-08 Tristan Gingold <gingold@adacore.com>
2794
2795 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
2796 warnings on internal units in configurable run time mode.
2797
2798 2017-09-08 Bob Duff <duff@adacore.com>
2799
2800 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
2801 representation items from interfaces that the derived type
2802 implements, not just from the parent type.
2803 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
2804 this to return an empty list when there are no interfaces.
2805 * einfo.ads, sem_ch13.adb: Minor comment fixes.
2806 * sem_attr.adb: Minor comment fix.
2807
2808 2017-09-08 Doug Rupp <rupp@adacore.com>
2809
2810 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
2811 x86-vx7.
2812
2813 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
2814
2815 * exp_ch4.adb (Expand_N_Allocator): Generate a
2816 call to Allocate_Any_Controlled when the allocation does not
2817 require any initialization.
2818
2819 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
2820
2821 * sem_util.adb (Copy_Node_With_Replacement):
2822 Update the Renamed_Object field of a replicated object renaming
2823 declaration.
2824
2825 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
2826
2827 * exp_ch9.adb (Is_Pure_Barrier): Allow type
2828 conversions and components of objects. Simplified the detection
2829 of the Count attribute by identifying the corresponding run-time
2830 calls.
2831
2832 2017-09-08 Yannick Moy <moy@adacore.com>
2833
2834 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
2835 sem_type.adb, sinfo.ads: Minor reformatting.
2836
2837 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2838
2839 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
2840 of Freeze_Profile, used to inhibit the freezing of the profile
2841 of an expression function declared within a nested package, when
2842 some type in the profile depends on a private type declared in
2843 an enclosing package.
2844
2845 2017-09-08 Bob Duff <duff@adacore.com>
2846
2847 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
2848 the subunit case. It's still OK to set it in the "missing subunits"
2849 case, because that won't cause the obsolete .ali files that cause
2850 confusion.
2851
2852 2017-09-08 Bob Duff <duff@adacore.com>
2853
2854 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
2855 unclear why this didn't cause a warning.
2856 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
2857 pragmas. It's unclear why this didn't cause an error.
2858
2859 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
2860
2861 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
2862 Reimplemented.
2863 (Expand_SPARK_Potential_Renaming): Code clean up.
2864 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
2865 the item does not have a proper entity.
2866 (Analyze_Input_Item): Add a guard in case the item does not have a
2867 proper entity.
2868 (Collect_States_And_Objects): Include object renamings in the
2869 items being collected.
2870 (Resolve_State): Update the documentation of this routine.
2871 * sem_util.adb (Entity_Of): Add circuitry to handle
2872 renamings of function results.
2873 (Remove_Entity): New routine.
2874 (Remove_Overloaded_Entity): Take advantage of factorization.
2875 * sem_util.ads (Entity_Of): Update the documentation
2876 of this routine.
2877 (Remove_Entity): New routine.
2878 (Remove_Overloaded_Entity): Update the documentation of this
2879 routine.
2880
2881 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2882
2883 * repinfo.adb (List_Record_Info): During first loop,
2884 do not override the normalized position and first bit
2885 if they have already been set. Move fallback code
2886 for the packed case to the case where it belongs.
2887 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
2888 Also adjust the normalized position of components.
2889 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
2890
2891 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2892
2893 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
2894 the placement of a primitive operation O that renames an operation
2895 R declared in an inner package, and which is thus not a primitive
2896 of the dispatching type of O. In this case O is a new primitive
2897 and does not inherit its dispatch table position from R (which
2898 has none).
2899
2900 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2901
2902 * sem_dim.adb (Analyze_Dimension_If_Expression,
2903 Analyze_Dimension_Case_Expression): new subprograms to verify
2904 the dimensional correctness of Ada2012 conditional expressions,
2905 and set properly the dimensions of the construct.
2906 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
2907 call Analyze_Dimension.
2908
2909 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2910
2911 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
2912 loop on an interface declared as a private extension of another
2913 synchronized interface.
2914
2915 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2916
2917 * sem_ch12.adb (Check_Generic_Parent): New procedure within
2918 Analyze_Associations, to handle actual packages that depend on
2919 previous instances. If a package IAP that is an instantiation is
2920 used as an actual in a subsequent instantiation SI in the same
2921 scope, and IAP has a body, IAP must be frozen before SI. If
2922 the generic parent of IAP is itself declared in a previous
2923 instantiation in the same scope, that instantiation must also
2924 be frozen before SI.
2925 (Install_Body): Prevent double insertion of freeze node for
2926 instance.
2927
2928 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
2929
2930 * sem_prag.adb (Resolve_State): Update the
2931 comment on documentation. Generate a reference to the state once
2932 resolution takes place.
2933
2934 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2935
2936 * sem_ch13.adb (Analyze_Aspect_Specifications, case
2937 Linker_Section): If the aspect applies to an object declaration
2938 with explicit initialization, do not delay the freezing of the
2939 object, to prevent access-before-elaboration in the generated
2940 initialization code.
2941
2942 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2943
2944 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
2945 (Integer_Value (Item)) when the size of the fixed decimal type
2946 is larger than Integer.
2947
2948 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
2949
2950 PR ada/82127
2951 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
2952 in order of increasing position in more cases.
2953
2954 2017-09-07 Yannick Moy <moy@adacore.com>
2955
2956 * a-exetim-mingw.ads: Add contract Global=>null
2957 on all operations that are modeled as having no read or write
2958 of global variables in SPARK.
2959
2960 2017-09-07 Raphael Amiard <amiard@adacore.com>
2961
2962 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
2963 to Hmaps.Generic_Ops.
2964 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
2965 cursors.
2966 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
2967 cursors.
2968 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
2969 position in cursors.
2970
2971 2017-09-07 Javier Miranda <miranda@adacore.com>
2972
2973 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
2974 allow disabling the generation of implicit pragma Elaborate_All
2975 on task bodies.
2976
2977 2017-09-07 Javier Miranda <miranda@adacore.com>
2978
2979 * exp_disp.adb (Make_Tags): Avoid suffix counter
2980 in the external name of the elaboration flag. Required to fix
2981 the regressions introduced by the initial version of this patch.
2982
2983 2017-09-07 Bob Duff <duff@adacore.com>
2984
2985 * sem_ch6.adb (Analyze_Function_Return): Do not
2986 insert an explicit conversion to force the displacement of the
2987 "this" pointer to reference the secondary dispatch table in the
2988 case where the return statement is returning a raise expression,
2989 as in "return raise ...".
2990
2991 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2992
2993 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
2994 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
2995 procedure from sem_disp.adb.
2996 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
2997 with Unit.
2998 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
2999 return the instantiation node for subprograms. Update references
3000 to Get_Unit_Instantiation_Node.
3001 * sem_ch7.adb (Install_Parent_Private_Declarations): update
3002 reference to Get_Unit_Instantiation_Node.
3003 * exp_dist.adb (Build_Package_Stubs): update reference to
3004 Get_Unit_Instantiation_Node.
3005 * sem_ch9.adb: minor typo in comment.
3006 * lib-xref-spark_specific.adb
3007 (Traverse_Declaration_Or_Statement): traverse into task type
3008 definition.
3009
3010 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3011
3012 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
3013 to handle properly various cases of type conversions where the
3014 target type and/or the expression carry dimension information.
3015 (Dimension_System_Root); If a subtype carries dimension
3016 information, obtain the source parent type that carries the
3017 Dimension aspect.
3018
3019 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
3020
3021 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
3022
3023 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3024
3025 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
3026 If the prefix is a reference to an object, rewrite it as an
3027 explicit dereference, as required by 3.7.2 (2) and as is done
3028 with most other attributes whose prefix is an access value.
3029
3030 2017-09-07 Bob Duff <duff@adacore.com>
3031
3032 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
3033 Refined_Depends aspect.
3034 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
3035 Refined_Depends pragma.
3036 * scans.ads: Fix documentation of Inside_Depends flag.
3037 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
3038
3039 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
3040
3041 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
3042 Account for the case where the are no lists to insert, but the
3043 secondary stack still requires management.
3044 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
3045 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
3046 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
3047 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
3048 Minor reformatting.
3049
3050 2017-09-07 Vincent Celier <celier@adacore.com>
3051
3052 * clean.adb: Do not get the target parameters before calling
3053 gprclean.
3054
3055 2017-09-07 Nicolas Roche <roche@adacore.com>
3056
3057 * s-osinte-solaris-posix.ads: Removed.
3058
3059 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3060
3061 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
3062 single concurrent objects.
3063
3064 2017-09-07 Javier Miranda <miranda@adacore.com>
3065
3066 * s-regexp.ads: Fix documentation of the globbing grammar.
3067
3068 2017-09-07 Gary Dismukes <dismukes@adacore.com>
3069
3070 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
3071
3072 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3073
3074 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
3075 in CodePeer mode, to support more legacy code automatically.
3076
3077 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3078
3079 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
3080 and thus not a controlling argument, preserve its type after
3081 rewriting because it may appear in an nested call with a classwide
3082 parameter.
3083
3084 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3085
3086 * comperr.adb (Delete_SCIL_Files): Handle case of
3087 N_Package_Instantiation.
3088
3089 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3090
3091 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
3092 clause for a unit U appears in a context that includes a regular
3093 with_clause on U, rewrite the redundant private clause into a null
3094 statement, rather than removing it altogether from the context,
3095 so that ASIS tools can reconstruct the original source.
3096
3097 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3098
3099 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
3100 for aspect Small can be of any real type (not only a universal
3101 real literal) as long as it is a static constant.
3102
3103 2017-09-07 Thomas Quinot <quinot@adacore.com>
3104
3105 * par_sco.adb: Minor reformatting.
3106
3107 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3108
3109 * s-parame-ae653.ads: Removed.
3110
3111 2017-09-07 Nicolas Roche <roche@adacore.com>
3112
3113 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
3114 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
3115 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
3116 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
3117 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
3118 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
3119
3120 2017-09-07 Yannick Moy <moy@adacore.com>
3121
3122 * a-ngelfu.ads Add preconditions to all functions
3123 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
3124
3125 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3126
3127 * lib-xref.adb (Generate_Reference): ignore
3128 references to entities which are Part_Of single concurrent
3129 objects.
3130
3131 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3132
3133 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
3134 comment.
3135
3136 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3137
3138 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
3139 Null_Task_Id is passed.
3140
3141 2017-09-07 Javier Miranda <miranda@adacore.com>
3142
3143 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
3144 attribute. Defined for record types and subtypes.
3145 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
3146 (Init_Tags_List) to facilitate generating separate code in the
3147 IP routine to initialize the object components and for completing
3148 the elaboration of dispatch tables.
3149 * exp_ch3.adb (Build_Init_Procedure): Improve the code
3150 generated in the IP routines by means of keeping separate
3151 the initialization of the object components from the
3152 initialization of its dispatch tables. (Init_Secondary_Tags):
3153 Adding new formal (Init_Tags_List) and adjusting calls to
3154 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
3155 adjusting also calls to Ada.Tags.Register_Interface_Offset
3156 because the type of one of its formals has been changed.
3157 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
3158 modified. Instead of receiving a pointer to an object this
3159 routine receives now a primary tag.
3160 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
3161 additional formal: the tag of the primary dispatch table.
3162 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
3163 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
3164 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
3165 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
3166 formal in calls to Init_Secondary_Tags.
3167
3168 2017-09-07 Javier Miranda <miranda@adacore.com>
3169
3170 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
3171 subprogram.
3172 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
3173 applied to generic subprograms.
3174
3175 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3176
3177 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
3178 (because it refers to the anonymous concurrent object, not its type);
3179 fix condition for emitting error message about task/protected type,
3180
3181 2017-09-07 Bob Duff <duff@adacore.com>
3182
3183 * binde.adb (Debug_Flag_Old): If both -do and -dp
3184 are specified, behave as if just -do was specified, rather than
3185 using a mixture.
3186
3187 2017-09-07 Nicolas Roche <roche@adacore.com>
3188
3189 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
3190 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
3191
3192 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3193
3194 * sem_prag.adb (Find_Role): The Global_Seen flag
3195 is now consulted not only for abstract states and variables,
3196 but for all kinds of items.
3197 (Collect_Subprogram_Inputs_Outputs): Do not process formal
3198 generic parameters, because unlike ordinary formal parameters,
3199 generic formals only act as input/ outputs if they are explicitly
3200 mentioned in a Global contract.
3201
3202 2017-09-07 Yannick Moy <moy@adacore.com>
3203
3204 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
3205 predicate procedure. Check predicate pragma/aspect with Ghost entity.
3206 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
3207 reformatting.
3208
3209 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3210
3211 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
3212 (code cleanup);
3213 * sem_ch3.adb (Build_Derived_Record_Type):i Call
3214 Copy_Dimensions_Of_Components after creating the copy of the
3215 record declaration.
3216 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
3217 derived recor type, copy the dikensions if any of each component
3218 of the parent record to the corresponding component declarations
3219 of the derived record. These expressions are used among other
3220 things as default values in aggregates with box associations.
3221 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
3222 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
3223 Minor reformatting.
3224
3225 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3226
3227 * sem_util.adb: Remove extra space after THEN.
3228
3229 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3230
3231 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
3232 also mark the renamed subprogram as referenced.
3233
3234 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3235
3236 * par-ch6.adb (P_Subprogram): Improve error message on null
3237 procedure with misplaced aspect specification, which the parser
3238 first attempts to interpret as a malformed expression function.
3239
3240 2017-09-07 Gary Dismukes <dismukes@adacore.com>
3241
3242 * sem_attr.adb (Analyze_Attribute_Old_Result):
3243 Allow attributes Result and Old in the case of an expression
3244 function.
3245
3246 2017-09-07 Justin Squirek <squirek@adacore.com>
3247
3248 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
3249 Volatile to subcomponents.
3250
3251 2017-09-07 Bob Duff <duff@adacore.com>
3252
3253 * exp_ch7.adb (Find_Last_Init): Check for the
3254 case where a build-in-place function call has been replaced by a
3255 'Reference attribute reference.
3256
3257 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3258
3259 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
3260 nodes.
3261
3262 2017-09-07 Bob Duff <duff@adacore.com>
3263
3264 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
3265 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
3266 secondary stack for all functions that return limited tagged
3267 types -- just do it for dispatching calls. Misc cleanup.
3268 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
3269 remove qualifications and type conversions. Fix various bugs
3270 where only a single level of qualification or conversion was
3271 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
3272 instead of "X".
3273 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
3274 cleanup.
3275
3276 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3277
3278 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
3279 do not create actual subtypes that may generate further predicate
3280 functions.
3281 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
3282 of body is a predicate function as well.
3283 (Resolve_Aspect_Expressions, Resolve_Name): For a component
3284 association, only the expression needs resolution, not the name.
3285 (Resolve_Aspect_Expressions, case Predicates): Construct and
3286 analyze the predicate function declaration in the scope of the
3287 type, before making the type and its discriminants visible.
3288
3289 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3290
3291 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
3292 only if the record type itself comes from source.
3293
3294 2017-09-06 Gary Dismukes <dismukes@adacore.com>
3295
3296 * sem_ch5.adb: Minor reformatting and a typo fix
3297
3298 2017-09-06 Arnaud Charlet <charlet@adacore.com>
3299
3300 * sinput-l.ads: minor remove extra period at the end of comment
3301
3302 2017-09-06 Arnaud Charlet <charlet@adacore.com>
3303
3304 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
3305 E_Discriminant.
3306 (Find_Role): remove support for E_Discriminant.
3307
3308 2017-09-06 Javier Miranda <miranda@adacore.com>
3309
3310 * exp_ch6.adb (Expand_Simple_Function_Return):
3311 Add missing implicit type conversion to force displacement of the
3312 "this" pointer.
3313
3314 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3315
3316 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
3317
3318 2017-09-06 Yannick Moy <moy@adacore.com>
3319
3320 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
3321 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
3322
3323 2017-09-06 Bob Duff <duff@adacore.com>
3324
3325 * sem_ch8.adb: Change Assert to be consistent with
3326 other similar ones.
3327
3328 2017-09-06 Bob Duff <duff@adacore.com>
3329
3330 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
3331 requested. Previously, the -do switch meant "run Elab_New and
3332 Elab_Old and use the order chosen by Elab_Old, possibly with
3333 debugging printouts comparing the two orders." Now it means
3334 "do not run Elab_New." This is of use if there are bugs that
3335 cause Elab_New to crash.
3336 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
3337 type conversions.
3338 * ali.ads (Elab_Position): Change type to Nat, to avoid various
3339 type conversions.
3340
3341 2017-09-06 Arnaud Charlet <charlet@adacore.com>
3342
3343 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
3344 reference to SPARK RM.
3345
3346 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3347
3348 * layout.adb: Use SSU short hand consistently throughout the file.
3349
3350 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3351
3352 * freeze.adb (Freeze_Record_Type)
3353 <Sized_Component_Total_Round_RM_Size>: New local variable to
3354 accumulate the rounded RM_Size of components. Update it for
3355 every component whose RM_Size is statically known. Add missing
3356 guard to check that bit packing is really required before issuing
3357 the error about packing. Swap condition for clarity's sake.
3358 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
3359
3360 2017-09-06 Fedor Rybin <frybin@adacore.com>
3361
3362 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
3363 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
3364 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
3365 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
3366 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
3367 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
3368 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
3369 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
3370 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
3371 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
3372 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
3373 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
3374 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
3375 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
3376 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
3377 project manager sources.
3378
3379 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3380
3381 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
3382 entity of a mutable type and the right-hand side is a conditional
3383 expression, resolve the alternatives of the conditional using
3384 the base type of the target entity, because the alternatives
3385 may have distinct subtypes. This is particularly relevant if
3386 the alternatives are aggregates.
3387
3388 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3389
3390 * checks.adb (Apply_Predicate_Check): If the expression is an
3391 aggregate that is the RHS of an assignment, apply the check to
3392 the LHS after the assignment, rather than to the aggregate. This
3393 is more efficient than creating a temporary for the aggregate,
3394 and prevents back-end crashes when the aggregate includes a
3395 dynamic "others' association.
3396
3397 2017-09-06 Yannick Moy <moy@adacore.com>
3398
3399 * sem_ch12.adb (Analyze_Instance_And_Renamings):
3400 Set variable to ignore SPARK_Mode in instance before the analysis
3401 of the generated package declaration.
3402
3403 2017-09-06 Yannick Moy <moy@adacore.com>
3404
3405 * sem_res.adb (Resolve_Call): Do not issue a
3406 message for calls inside expression function, unless body was
3407 seen and is candidate for inlining.
3408
3409 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3410
3411 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
3412 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
3413 body. do not freeze the formals of the generic unit.
3414
3415 2017-09-06 Gary Dismukes <dismukes@adacore.com>
3416
3417 * errout.adb (Error_Msg): Separate the
3418 treatment for warning vs. style messages in inlinings and
3419 instantiations. Prevents blowups on calls to Warn_Insertion for
3420 style messages, which should not be called in that case because
3421 Warning_Msg_Char is not set.
3422
3423 2017-09-06 Justin Squirek <squirek@adacore.com>
3424
3425 * sem_prag.adb (Check_VFA_Conflicts): Created
3426 to group all Volatile_Full_Access checks relating to other
3427 representation pragmas (Mark_Component_Or_Object): Created
3428 to centeralize the flagging of attributes for the record type
3429 component case, a pragma applied individually to a component, and
3430 the object case.
3431 (Process_Atomic_Independent_Shared_Volatile):
3432 Add propagation of certain pragmas to record components and move
3433 evaluation of VFA checks
3434
3435 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3436
3437 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
3438 Do not warn on conditions that are not obeyed for Inline_Always
3439 subprograms, when assertions are not enabled.
3440
3441 2017-09-06 Arnaud Charlet <charlet@adacore.com>
3442
3443 * sem_util.adb (Unique_Entity): For abstract states return their
3444 non-limited view.
3445
3446 2017-09-06 Bob Duff <duff@adacore.com>
3447
3448 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
3449 that is a proper body corresponding to a stub, we defer the
3450 adjustment of the sloc until after the correct adjustment has
3451 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
3452 the adjustment, because it will be outside the range in (the old,
3453 incorrect) S_Adjustment.
3454 * inline.adb: Use named notation for readability and uniformity.
3455 * sinput-l.adb: Minor improvements to debugging output printed
3456 for Debug_Flag_L.
3457 * sinput-l.ads (Create_Instantiation_Source): Minor comment
3458 correction.
3459
3460 2017-09-06 Vincent Celier <celier@adacore.com>
3461
3462 * make.adb: Do not invoke gprbuild for -bargs -P.
3463
3464 2017-09-06 Sylvain Dailler <dailler@adacore.com>
3465
3466 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
3467 case when Op is of kind N_Qualified_Expression. In this case,
3468 the function is called recursively on the subexpression like in
3469 other cases.
3470 * make.adb: Minor reformatting
3471
3472 2017-09-06 Justin Squirek <squirek@adacore.com>
3473
3474 * einfo.adb (Set_Linker_Section_Pragma): Modify
3475 Set_Linker_Section_Pragma to be consistant with the "getter"
3476 Linker_Section_Pragma.
3477 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
3478 checking for container loops so that the index cursor is not
3479 directly changable by the user with the use of E_Loop_Parameter.
3480 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
3481 * sem_warn.adb (Check_References): Revert previous change.
3482
3483 2017-09-06 Bob Duff <duff@adacore.com>
3484
3485 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
3486 calls and the like.
3487
3488 2017-09-06 Yannick Moy <moy@adacore.com>
3489
3490 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
3491 declarations to only consider valid uses of Global/Depends those on
3492 single concurrent objects.
3493
3494 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3495
3496 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
3497 error as soon as one of the specified components overlaps the
3498 parent field.
3499
3500 2017-09-06 Arnaud Charlet <charlet@adacore.com>
3501
3502 * sem_prag.ads: minor fix typo in comment.
3503
3504 2017-09-06 Justin Squirek <squirek@adacore.com>
3505
3506 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
3507 from source before checking source references.
3508 * sem_warn.adb (Check_References): Add check for internal block
3509 before recursing.
3510
3511 2017-09-06 Vincent Celier <celier@adacore.com>
3512
3513 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
3514 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
3515 gnatname.adb: Remove the Project Manager from the GNAT tools.
3516 * gcc-interface/Makefile.in: ditto.
3517
3518 2017-09-06 Bob Duff <duff@adacore.com>
3519
3520 * sem_util.ads: Minor comment fix.
3521
3522 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3523
3524 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
3525 Generate a freeze node for the actual of a formal package, if
3526 the actual is declared in the same unit and has a corresponding
3527 body, to prevent the current instance from being frozen before
3528 the actual is.
3529
3530 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3531
3532 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
3533
3534 2017-09-06 Yannick Moy <moy@adacore.com>
3535
3536 * sem_warn.adb: Minor refactoring.
3537
3538 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3539
3540 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
3541 to retrieve the inherited classwide precondition/postcondition
3542 of a subprogram.
3543 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
3544 freezing a subprogram, to complete the generation of the
3545 corresponding checking code.
3546
3547 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3548
3549 * exp_util.adb (Is_Controlled_Indexing): New routine.
3550 (Is_Displace_Call): Use routine Strip to remove indirections.
3551 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
3552 missing case of controlled generalized indexing.
3553 (Is_Source_Object): Use routine Strip to remove indirections.
3554 (Strip): New routine.
3555
3556 2017-09-06 Bob Duff <duff@adacore.com>
3557
3558 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
3559 we include the proper header. Otherwise, we just declare the necessary
3560 things from the capabilities library. This is so we can build on
3561 machines without that library, while still enabling that library.
3562 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
3563 simply return 0 if the library is not present, or not included
3564 in the link.
3565
3566 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
3567
3568 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
3569 for renamings that involve function calls in prefix form.
3570
3571 2017-09-06 Bob Duff <duff@adacore.com>
3572
3573 * sem_ch3.adb (Analyze_Subtype_Declaration):
3574 Set Has_Delayed_Freeze on a subtype of an incomplete type.
3575
3576 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
3577
3578 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
3579 has no parameter specification and no entry index, use the entry name
3580 as the end of the generated SCO statement.
3581
3582 2017-09-06 Steve Baird <baird@adacore.com>
3583
3584 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
3585 uses of 'Image and related attributes as having side effects in
3586 order to avoid replicating such uses.
3587 * pprint.ads (Expression_Image) Add new generic formal flag
3588 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
3589 (eventually) override the default.
3590 * pprint.adb (Expression_Image) If the new flag is set, then
3591 suppress the ".all" suffix when displaying a dereference whose
3592 prefix is a use of a value-capturing compiler temp of the sort
3593 generated by Expr_Util.Remove_Side_Effects .
3594 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
3595 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
3596 Minor reformatting.
3597 * inline.adb: Minor wording change.
3598
3599 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3600
3601 * sem_ch7.adb: Update comment.
3602
3603 2017-09-06 Yannick Moy <moy@adacore.com>
3604
3605 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
3606 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
3607 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
3608 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
3609 so that applies to any entity.
3610
3611 2017-09-06 Yannick Moy <moy@adacore.com>
3612
3613 * sem_ch3.adb (Derived_Type_Declaration): Use
3614 Incomplete_Or_Partial_View rather than local Find_Partial_View.
3615
3616 2017-09-06 Javier Miranda <miranda@adacore.com>
3617
3618 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
3619 following ISO-8861.
3620
3621 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3622
3623 * sem_dim.adb (Analyze_Dimension): In an instance, a type
3624 conversion takes its dimensions from the expression, not from
3625 the context type.
3626 (Dimensions_Of_Operand): Ditto.
3627
3628 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3629
3630 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
3631 null procedures when GNAT coverage is used, so that their (empty)
3632 bodies are properly covered.
3633
3634 2017-09-06 Bob Duff <duff@adacore.com>
3635
3636 * sem_ch13.adb (Resolve_Aspect_Expressions): If
3637 the entity is a type with discriminants, make the discriminants
3638 directly visible in aspect clauses.
3639
3640 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3641
3642 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
3643 Universal_Real and the context is a floating-point type, resolve
3644 both operands to the target type.
3645
3646 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3647
3648 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
3649 sem_ch3.adb, sem_util.adb: Minor reformatting.
3650
3651 2017-09-06 Yannick Moy <moy@adacore.com>
3652
3653 * freeze.adb (Check_Inherited_Conditions): Rewriting
3654 of inherited preconditions and postconditions should only occur
3655 in GNATprove mode, that is, when GNATprove_Mode is True, not to
3656 be confused with SPARK_Mode being On.
3657
3658 2017-09-06 Yannick Moy <moy@adacore.com>
3659
3660 * sem_warn.adb (Check_References): Take into
3661 account possibility of attribute reference as original node.
3662
3663 2017-09-06 Yannick Moy <moy@adacore.com>
3664
3665 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
3666 use of attribute.
3667
3668 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3669
3670 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
3671 on the procedure created to encapsulate the body.
3672 * sem_ch7.adb: Add with clause for GNAT.HTable.
3673 (Entity_Table_Size): New constant.
3674 (Entity_Hash): New function.
3675 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
3676 (Is_Subprogram_Ref): Rename into...
3677 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
3678 the table instead of bailing out on them. Scan the value of constants
3679 if it is not known at compile time.
3680 (Contains_Subprograms_Refs): Rename into...
3681 (Scan_Subprogram_Refs): ...this.
3682 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
3683 Is_Public flag on subprograms if they are not actually referenced.
3684 (Hide_Public_Entities): Beef up comment on the algorithm.
3685 Reset the table of subprograms on entry.
3686
3687 2017-09-06 Yannick Moy <moy@adacore.com>
3688
3689 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
3690
3691 2017-09-06 Javier Miranda <miranda@adacore.com>
3692
3693 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
3694 cannot handle a type conversion of an array as an aggregate
3695 component.
3696
3697 2017-09-06 Bob Duff <duff@adacore.com>
3698
3699 * g-comlin.adb (Try_Help): Remove ".exe" so we
3700 get the same results on windows and unix.
3701
3702 2017-09-06 Justin Squirek <squirek@adacore.com>
3703
3704 * exp_imgv.adb (Expand_Image_Attribute),
3705 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
3706 Added case to handle new-style 'Image expansion
3707 (Rewrite_Object_Image): Moved from exp_attr.adb
3708 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
3709 attribute cases so that the relevant subprograms in exp_imgv.adb
3710 handle all expansion.
3711 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
3712 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
3713 cases to call common function Analyze_Image_Attribute.
3714 (Analyze_Image_Attribute): Created as a common path for all
3715 image attributes (Check_Object_Reference_Image): Removed
3716 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
3717 Removed and refactored into Is_Object_Image (Is_Object_Image):
3718 Created as a replacement for Is_Image_Applied_To_Object
3719
3720 2017-09-06 Yannick Moy <moy@adacore.com>
3721
3722 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
3723 message for missing input.
3724
3725 2017-09-06 Yannick Moy <moy@adacore.com>
3726
3727 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
3728 of protected subprograms and entries.
3729 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
3730 New function to detect when a subprogram of entry is defined
3731 inside a protected object.
3732
3733 2017-09-06 Bob Duff <duff@adacore.com>
3734
3735 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
3736 whether the current process has the CAP_SYS_NICE capability.
3737 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
3738 ceiling priorities if the current process has the CAP_SYS_NICE
3739 capability.
3740
3741 2017-09-06 Bob Duff <duff@adacore.com>
3742
3743 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
3744 check back to the body, because SPARK is not yet ready for
3745 "or else raise Constraint_Error".
3746
3747 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3748
3749 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
3750 procedure by a single null statement, after evaluating the
3751 actuals that require it.
3752
3753 2017-09-06 Javier Miranda <miranda@adacore.com>
3754
3755 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
3756 Generating C code improve the code that checks the use of nested
3757 aggregates to initialize object declarations.
3758
3759 2017-09-06 Yannick Moy <moy@adacore.com>
3760
3761 * sem_ch3.adb (Derived_Type_Declaration): Detect
3762 violations of new rule SPARK RM 3.4(1). Also refactor existing
3763 check to use the new function Find_Partial_View.
3764
3765 2017-09-06 Vincent Celier <celier@adacore.com>
3766
3767 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
3768 from the Prj hierarchy has been removed from the GNAT driver.
3769
3770 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3771
3772 * sem_type.adb (Interface_Present_In_Ancestor): Within an
3773 expression function, or within a spec expression (default value,
3774 etc) a reference to an incomplete type is legal: legality of
3775 the operation will be checked when some related entity (type,
3776 object or subprogram) is frozen.
3777
3778 2017-09-06 Gary Dismukes <dismukes@adacore.com>
3779
3780 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
3781 adjustments and a typo fix.
3782
3783 2017-09-06 Yannick Moy <moy@adacore.com>
3784
3785 * sem_res.adb (Resolve_Call): Do not issue info
3786 message about inlining of calls to functions in assertions,
3787 for functions whose body has not been seen yet.
3788
3789 2017-09-06 Bob Duff <duff@adacore.com>
3790
3791 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
3792 we can use modern Ada in this package.
3793 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
3794 Move Ada.Command_Line.Response_File to System.Response_File,
3795 and make Ada.Command_Line.Response_File into a rename of
3796 System.Response_File. This is to avoid having gnatbind depend
3797 Ada.Command_Line, which would damage the bootstrap process now
3798 that Ada.Command_Line contains modern Ada (the raise expression).
3799 * gnatbind.adb: Avoid dependence on
3800 Ada.Command_Line. Depend on System.Response_File instead
3801 of Ada.Command_Line.Response_File. Change one call to
3802 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
3803 to Ada.Command_Line.Argument_Count to use Arg_Count.
3804 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
3805
3806 2017-09-06 Bob Duff <duff@adacore.com>
3807
3808 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
3809 switch, because we've already read gnat.adc by default.
3810
3811 2017-09-06 Bob Duff <duff@adacore.com>
3812
3813 * exp_ch5.adb (Get_Default_Iterator): Replace
3814 "Assert(False)" with "return Iter", because if an iterable
3815 type is derived from a noniterable one, then we won't find an
3816 overriding or inherited default iterator.
3817
3818 2017-09-06 Yannick Moy <moy@adacore.com>
3819
3820 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
3821 literal index used to access a string is null or negative.
3822
3823 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3824
3825 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
3826 allowed on loop parameters.
3827 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
3828 on loop parameters.
3829 (Write_Field15_Name): Update the output for
3830 Status_Flag_Or_Transient_Decl.
3831 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
3832 to loop parameters. Update the documentation of the attribute
3833 and the E_Loop_Parameter entity.
3834 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
3835 which assumes that cursors can never be controlled.
3836 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
3837 guard which assumes that cursors can never be controlled.
3838
3839 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3840
3841 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
3842 sem_warn.adb: Minor reformatting.
3843
3844 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3845
3846 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
3847 fix and preserve older GNAT warning on overlapping actuals that
3848 are not elementary types.
3849
3850 2017-09-06 Justin Squirek <squirek@adacore.com>
3851
3852 * sem_attr.adb: Comment correction.
3853
3854 2017-09-06 Gary Dismukes <dismukes@adacore.com>
3855
3856 * sem_util.adb: Minor reformatting.
3857
3858 2017-09-06 Yannick Moy <moy@adacore.com>
3859
3860 * a-comlin.ads (Argument): Add precondition for analysis.
3861
3862 2017-09-06 Yannick Moy <moy@adacore.com>
3863
3864 * sem_res.adb (Resolve): Update message for function call as statement.
3865
3866 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3867
3868 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
3869 generated bodies for renamings that are completions, when renamed
3870 procedure is No_Return.
3871 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
3872 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
3873 with No_Return, the renamed entity must be No_Return as well.
3874
3875 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3876
3877 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
3878 Minor reformatting.
3879
3880 2017-09-06 Justin Squirek <squirek@adacore.com>
3881
3882 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
3883 attribute cases (Rewrite_Object_Reference_Image): Created to
3884 aid the rewriting of new-style 'Image attributes.
3885 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
3886 (Check_Object_Reference_Image): Created to handle verification of
3887 'Image with object-references as prefixes.
3888 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
3889 Create predicate to identify cases where an 'Image attribute's
3890 prefix applies to an object reference.
3891
3892 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3893
3894 * freeze.adb (Freeze_Entity): Do not generate a freeze
3895 node for a generic unit, even if it includes delayed aspect
3896 specifications. Freeze nodes for generic entities must never
3897 appear in the tree that reaches the back-end of the compiler.
3898
3899 2017-09-06 Yannick Moy <moy@adacore.com>
3900
3901 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
3902
3903 2017-09-06 Yannick Moy <moy@adacore.com>
3904
3905 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
3906 to subprograms in other units as possibly inlined.
3907
3908 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3909
3910 * freeze.adb (Freeze_Entity): For a derived type that has no
3911 explicit delayed aspects but may inherit delayed aspects from its
3912 parent type, analyze aspect at freeze point for proper capture
3913 of an inherited aspect.
3914
3915 2017-09-06 Arnaud Charlet <charlet@adacore.com>
3916
3917 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
3918 renamings; also, avoid repeated calls to Renamed_Object when getting
3919 through object renamings.
3920
3921 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3922
3923 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
3924 array type declaration in a private part, when an index is a
3925 subtype indication of a discrete type with a private partial view.
3926
3927 2017-09-06 Javier Miranda <miranda@adacore.com>
3928
3929 * exp_ch4.adb (Expand_Modular_Op): Force generating
3930 temporary to improve the generated code.
3931
3932 2017-09-06 Tristan Gingold <gingold@adacore.com>
3933
3934 * s-fatgen.adb: Minor typo fix in comment.
3935
3936 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3937
3938 * exp_ch5.adb (Make_Field_Assign): If the type
3939 of the right-hand side has stored constraint, use its values
3940 (except for those that are renamings of parent discriminants)
3941 to produce additional assignments for the discriminants of the
3942 left-hand side, which are invisible in the righ-hand side and
3943 not retrievable as selected components.
3944
3945 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3946
3947 * sem_util.adb (Needs_One_Formal): The first formal of such a
3948 function must be a controlling formal, so that Obj.F (X, Y)
3949 can have the interpretation F(Obj)(X, Y).
3950 * sem_util.ads: Clarify documentation.
3951
3952 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3953
3954 * table.ads, table.adb: Restore original implementation.
3955 * namet.h (Names_Ptr): Adjust back.
3956 (Name_Chars_Ptr): Likewise.
3957 * uintp.h (Uints_Ptr): Likewise.
3958 (Udigits_Ptr): Likewise.
3959 * g-table.ads: Remove pragma Compiler_Unit_Warning.
3960 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
3961 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
3962 * spark_xrefs.ads: Likewise.
3963 * scos.h: Undo latest changes.
3964
3965 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3966
3967 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
3968 No_Return flag to instance if pragma applies to generic unit. This
3969 must be done explicitly because the pragma does not appear
3970 directly in the generic declaration (unlike the corresponding
3971 aspect specification).
3972
3973 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3974
3975 * sem_ch7.adb (Has_Referencer): Move up and expand comment
3976 explaining the test used to detect inlining. Use same test
3977 in second occurrence.
3978 (Analyze_Package_Body_Helper): Minor formatting fixes.
3979
3980 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3981
3982 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
3983 derived type with a mixture of renamed and constrained parent
3984 discriminants, the constraint for the target must obtain the
3985 discriminant values from both the operand and from the stored
3986 constraint for it, given that the constrained discriminants are
3987 not visible in the object.
3988 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
3989 side may be derived from that of the left-hand side (as in the
3990 case of an assignment with a change of representation) so the
3991 discriminant to be used in the retrieval of the value of the
3992 component must be the entity in the type of the right-hand side.
3993
3994 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3995
3996 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
3997 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3998 * exp_util.adb (Is_Source_Object): Account for
3999 the cases where the source object may appear as a dereference
4000 or within a type conversion.
4001 * exp_ch6.adb: Fix missing space in error message.
4002
4003 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4004
4005 * sem_prag.adb: Update description of Eliminate.
4006
4007 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4008
4009 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
4010 properly an attribute reference 'Loop_Entry that appears in the
4011 list of indices of an indexed expression, to prevent an infinite
4012 loop in the compiler.
4013
4014 2017-09-06 Bob Duff <duff@adacore.com>
4015
4016 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
4017
4018 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4019
4020 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
4021 in a set membership is an overloaded enumeration literal, and
4022 the type of the alternative is resolved from a previous one,
4023 replace the entity of the alternative as well as the type,
4024 to prevent inconsistencies between the entity and the type.
4025
4026 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4027
4028 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
4029 (No_Component_Reordering_Specified): New switch.
4030 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
4031 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
4032 * bcheck.adb (Check_Consistent_No_Component_Reordering):
4033 New check.
4034 (Check_Configuration_Consistency): Invoke it.
4035 * debug.adb (d.r): Toggle the effect of the switch.
4036 (d.v): Change to no-op.
4037 * einfo.ads (Has_Complex_Representation):
4038 Restrict to record types.
4039 (No_Reordering): New alias for Flag239.
4040 (OK_To_Reorder_Components): Delete.
4041 (No_Reordering): Declare.
4042 (Set_No_Reordering): Likewise.
4043 (OK_To_Reorder_Components): Delete.
4044 (Set_OK_To_Reorder_Components): Likewise.
4045 * einfo.adb (Has_Complex_Representation): Expect record types.
4046 (No_Reordering): New function.
4047 (OK_To_Reorder_Components): Delete.
4048 (Set_Has_Complex_Representation): Expect base record types.
4049 (Set_No_Reordering): New procedure.
4050 (Set_OK_To_Reorder_Components): Delete.
4051 (Write_Entity_Flags): Adjust to above change.
4052 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
4053 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
4054 OK_To_Reorder_Components on record types with convention Ada.
4055 * lib-writ.adb (Write_ALI): Deal with NC marker.
4056 * opt.ads (No_Component_Reordering): New flag.
4057 (No_Component_Reordering_Config): Likewise.
4058 (Config_Switches_Type): Add No_Component_Reordering component.
4059 * opt.adb (Register_Opt_Config_Switches): Copy
4060 No_Component_Reordering onto No_Component_Reordering_Config.
4061 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
4062 (Save_Opt_Config_Switches): Save No_Component_Reordering.
4063 (Set_Opt_Config_Switches): Set No_Component_Reordering.
4064 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
4065 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
4066 No_Reordering flag from the default.
4067 (Build_Derived_Private_Type): Likewise.
4068 (Build_Derived_Record_Type): Likewise. Then inherit it
4069 for untagged types and clean up handling of similar flags.
4070 (Record_Type_Declaration): Likewise.
4071 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
4072 remove redundant test on Is_Tagged_Type.
4073 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
4074 (Sig_Flags): Likewise.
4075 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
4076 (Pragma_Id): Add Pragma_No_Component_Reordering value.
4077 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
4078 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
4079 Copy the layout of the parent type only if the No_Reordering
4080 settings match.
4081 (components_to_record): Reorder record types with
4082 convention Ada by default unless No_Reordering is set or -gnatd.r
4083 is specified and do not warn if No_Reordering is set in GNAT mode.
4084
4085 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4086
4087 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
4088 new predicate to reject declarations that can be completions,
4089 when there is a visible prior homograph that is a null procedure.
4090 * sem_ch6.adb (Analyze_Null_Procedure): use it.
4091 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
4092
4093 2017-09-06 Thomas Quinot <quinot@adacore.com>
4094
4095 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
4096 run of 253 characters or more.
4097
4098 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4099
4100 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
4101 properly incomplete subtypes that may be created by explicit or
4102 implicit declarations.
4103 (Is_Base_Type): Take E_Incomplete_Subtype into account.
4104 (Subtype_Kind): Ditto.
4105 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
4106 Ekind of a subtype of a discriminated incomplete type.
4107 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
4108 incomplete types, to preserve error reporting.
4109 (Process_Incomplete_Dependents): Do not create a subtype
4110 declaration for an incomplete subtype that is created internally.
4111 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
4112 incomplete subtypes that do not require a completion, either
4113 because they are limited views, of they are generic actuals.
4114
4115 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4116
4117 * checks.adb (Insert_Valid_Check): Remove the
4118 suspicious manipulation of the Do_Range_Check flag as ths is
4119 no linger needed. Suppress validity check when analysing the
4120 validation variable.
4121
4122 2017-09-06 Philippe Gil <gil@adacore.com>
4123
4124 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
4125 GNATCOLL.Memory
4126
4127 2017-09-06 Bob Duff <duff@adacore.com>
4128
4129 * sem_elim.adb: Minor comment fix.
4130
4131 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4132
4133 * sem_util.adb (Is_Object_Reference): A function call is an
4134 object reference, and thus attribute references for attributes
4135 that are functions (such as Pred and Succ) as well as predefined
4136 operators are legal in contexts that require an object, such as
4137 the prefix of attribute Img and the Ada2020 version of 'Image.
4138
4139 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4140
4141 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
4142 exp_ch3.adb, xoscons.adb: Minor reformatting.
4143
4144 2017-09-06 Raphael Amiard <amiard@adacore.com>
4145
4146 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
4147 Position parameter. If supplied, use it to provide efficient iteration.
4148 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
4149 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
4150 iteration.
4151
4152 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4153
4154 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
4155 designated type is class-wide and the expression is an unchecked
4156 conversion, preserve the conversion when checking the tag of the
4157 designated object, to prevent spurious semantic errors when the
4158 expression in the conversion has an untagged type (for example
4159 an address attribute).
4160
4161 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4162
4163 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
4164 operation is subject to a pragma Eliminate.
4165
4166 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4167
4168 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
4169
4170 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4171
4172 * fe.h (Eliminate_Error_Msg): Remove.
4173
4174 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
4175
4176 * gcc-interface/utils.c (make_packable_type): Update call to
4177 mode_for_size_tree.
4178
4179 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
4180
4181 * gcc-interface/utils2.c (build_load_modify_store):
4182 Use int_mode_for_size.
4183
4184 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4185
4186 PR ada/62235
4187 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
4188 for Itypes that are E_Record_Subtype with a cloned subtype.
4189 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
4190
4191 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4192
4193 * gcc-interface/trans.c (convert_with_check): Use a custom base type
4194 if the base type of the expression has a different machine mode.
4195 Rename a couple of parameters and local variable.
4196
4197 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4198
4199 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
4200 conversions around prefixes that are not references.
4201
4202 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4203
4204 * gcc-interface/utils.c (unchecked_convert): When the result type is a
4205 non-biased integral type with size 0, set the result to 0 directly.
4206
4207 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4208
4209 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
4210 (renaming_from_instantiation_p): ...this.
4211 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
4212 instead of explicit tests on kind of entities. Adjust for renaming.
4213 (gnat_to_gnu_profile_type): Likewise.
4214 (gnat_to_gnu_subprog_type): Likewise.
4215 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
4216 (Case_Statement_to_gnu): Likewise.
4217 (gnat_to_gnu): Likewise.
4218 (process_freeze_entity): Likewise.
4219 (process_type): Likewise.
4220 (add_stmt_with_node): Adjust for renaming.
4221 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
4222 (renaming_from_generic_instantiation_p): Rename to...
4223 (renaming_from_instantiation_p): ...this. Use inline predicate.
4224 (pad_type_hasher::keep_cache_entry): Fold.
4225
4226 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4227
4228 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
4229 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
4230 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
4231 (N_Slice): Likewise.
4232 (N_Selected_Component): Likewise. Do not try again to translate it.
4233 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
4234
4235 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4236
4237 * repinfo.ads: Document new treatment of dynamic values.
4238 (TCode): Bump upper bound to 29.
4239 (Dynamic_Val): New constant set to 29.
4240 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
4241 (Rep_Value) <Dynamic_Val>: Likewise.
4242 * repinfo.h (Dynamic_Val): New macro.
4243 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
4244 DECL_P nodes too.
4245 <INTEGER_CST>: Set TCODE instead of recursing.
4246 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
4247 <VAR_DECL>: New case.
4248 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
4249 <BIT_AND_EXPR>: Adjust.
4250 <CALL_EXPR>: Do not fall through.
4251
4252 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4253
4254 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
4255 there is no target, do not create a temporary for the return value for
4256 an allocator either.
4257
4258 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4259
4260 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
4261 unconstrained array type.
4262
4263 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4264 Alan Hayward <alan.hayward@arm.com>
4265 David Sherwood <david.sherwood@arm.com>
4266
4267 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
4268 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
4269
4270 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4271 Alan Hayward <alan.hayward@arm.com>
4272 David Sherwood <david.sherwood@arm.com>
4273
4274 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
4275 is_a <scalar_int_mode>.
4276 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
4277 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
4278
4279 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4280 Alan Hayward <alan.hayward@arm.com>
4281 David Sherwood <david.sherwood@arm.com>
4282
4283 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
4284 instead of mode_for_size.
4285 (gnat_to_gnu_subprog_type): Likewise.
4286 * gcc-interface/utils.c (make_type_from_size): Likewise.
4287
4288 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4289 Alan Hayward <alan.hayward@arm.com>
4290 David Sherwood <david.sherwood@arm.com>
4291
4292 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
4293 (fp_size_to_prec): Likewise.
4294
4295 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4296 Alan Hayward <alan.hayward@arm.com>
4297 David Sherwood <david.sherwood@arm.com>
4298
4299 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
4300 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
4301
4302 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4303 Alan Hayward <alan.hayward@arm.com>
4304 David Sherwood <david.sherwood@arm.com>
4305
4306 * gcc-interface/decl.c (validate_size): Update use of
4307 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
4308
4309 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4310 Alan Hayward <alan.hayward@arm.com>
4311 David Sherwood <david.sherwood@arm.com>
4312
4313 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
4314 (fp_size_to_prec): Likewise.
4315
4316 2017-08-29 Martin Liska <mliska@suse.cz>
4317
4318 PR other/39851
4319 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
4320
4321 2017-08-08 Martin Liska <mliska@suse.cz>
4322
4323 * gcc-interface/trans.c: Include header files.
4324
4325 2017-07-29 Jakub Jelinek <jakub@redhat.com>
4326
4327 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
4328 as new argument to the imported_module_or_decl debug hook.
4329
4330 2017-07-25 Javier Miranda <miranda@adacore.com>
4331
4332 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
4333 evaluated twice.
4334
4335 2017-07-19 Jakub Jelinek <jakub@redhat.com>
4336
4337 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
4338 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
4339 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
4340
4341 2017-07-18 Mike Frysinger <vapier@chromium.org>
4342
4343 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
4344 (../../gnatlink$(exeext)): Likewise.
4345
4346 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
4347
4348 PR ada/81446
4349 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
4350 (Backend_Overflow_Checks): Set to True.
4351
4352 2017-06-23 Jakub Jelinek <jakub@redhat.com>
4353
4354 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
4355
4356 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
4357
4358 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
4359 notice. New macro.
4360 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
4361 as a definition.
4362 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
4363 definition.
4364 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
4365 imported subprograms for the current compilation unit as
4366 definitions. Disable debug info for references to variables.
4367 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
4368 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
4369 not built-in functions to their binding scope.
4370 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
4371 the function as a definition. Update all callers.
4372 (gnat_write_global_declarations): Emit debug info for imported
4373 functions. Filter out external variables for which debug info
4374 is disabled.
4375
4376 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
4377
4378 PR ada/81105
4379 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
4380 (i[3456]86-pc-gnu): Likewise.
4381 (x86_64 kfreebsd): Likewise.
4382
4383 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
4384
4385 PR bootstrap/80897
4386 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
4387
4388 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
4389
4390 PR ada/81070
4391 * s-interr-hwint.adb: Reinstate.
4392 * gcc-interface/Makefile.in (RTEMS): Use it again.
4393
4394 2017-06-08 Olivier Hainque <hainque@adacore.com>
4395
4396 * vx_crtbegin_auto.c: Update year in copyright notice.
4397 * vx_crtbegin.c: Likewise.
4398 * vx_crtbegin.inc: Likewise.
4399 * vx_crtend.c: Likewise.
4400
4401 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
4402
4403 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
4404 * s-tpopsp-rtems.adb: Delete.
4405
4406 2017-06-02 Olivier Hainque <hainque@adacore.com>
4407
4408 * vx_crtbegin_auto.c: New file.
4409 * vx_crtbegin.c: New file.
4410 * vx_crtbegin.inc: New file.
4411 * vx_crtend.c: New file.
4412
4413 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
4414
4415 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
4416 const qualifiers that cause -Wignored-qualifiers warnings.
4417
4418 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
4419
4420 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
4421 for Itypes that are E_Access_Subtype.
4422 <E_Access_Subtype>: Use the DECL of the base type directly.
4423
4424 2017-05-22 Ed Schonberg <schonberg@adacore.com>
4425 Eric Botcazou <ebotcazou@adacore.com>
4426
4427 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
4428 limited view may appear in the profile of a function, and a call to
4429 that function in another unit in which the full view is available must
4430 use this full view to spurious type errors at the point of call.
4431 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
4432 of parent body with a with clause for the main unit.
4433 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
4434 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
4435 types declared in external units like types from limited with clauses.
4436 Adjust final processing of defer_limited_with_list accordingly.
4437 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
4438 again to translate the prefix after the field if it is incomplete.
4439
4440 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
4441
4442 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
4443 alignment for simple volatile fields and remove associated errors.
4444
4445 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
4446
4447 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
4448 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
4449
4450 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
4451
4452 * gcc-interface/utils.c (can_materialize_object_renaming_p):
4453 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
4454 process Original_Node instead of expanded names.
4455
4456 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
4457
4458 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
4459 addressability check in the constrained case.
4460
4461 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
4462
4463 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
4464 types not coming from a limited context.
4465
4466 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
4467
4468 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
4469 the inlined list that are not public.
4470 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
4471 there is a pragma Inline_Always on the subprogram.
4472
4473 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
4474
4475 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
4476 <N_Allocator>: Use properly typed constants.
4477 (extract_values): Move around.
4478 (pos_to_constructor): Minor tweaks.
4479 (Sloc_to_locus): Fix formatting.
4480 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
4481 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
4482 (Gigi_Equivalent_Type): Adjust head comment.
4483 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
4484
4485 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
4486
4487 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
4488 is a representation clause on an extension, propagate the alignment of
4489 the parent type only if the platform requires strict alignment.
4490
4491 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
4492
4493 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
4494 instead of Word_Size.
4495
4496 Revert
4497 2017-03-28 Andreas Schwab <schwab@suse.de>
4498
4499 PR ada/80117
4500 * system-linux-aarch64-ilp32.ads: New file.
4501 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
4502 from LIBGNAT_TARGET_PAIRS.
4503 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
4504 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
4505 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
4506 or -mabi=ilp32, resp.
4507
4508 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
4509
4510 PR ada/80626
4511 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
4512 instead of Word_Size.
4513
4514 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4515
4516 * raise-gcc.c (exception_class_eq): Make ec parameter const.
4517
4518 2017-05-02 Richard Biener <rguenther@suse.de>
4519
4520 * gcc-interface/misc.c (gnat_post_options): Do not set
4521 -fstrict-overflow.
4522
4523 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4524
4525 * gcc-interface/trans.c (assoc_to_constructor): Make sure
4526 Corresponding_Discriminant is only called on discriminants.
4527 Skip the saving of the result only for them.
4528 (gnat_to_gnu) <N_Selected_Component>: Likewise.
4529 <N_Unchecked_Type_Conversion>: Translate the result type first.
4530 (gigi): Set TREE_NOTHROW on Begin_Handler.
4531 (stmt_list_cannot_raise_p): New predicate.
4532 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
4533 a cleanup if the statements of the handler cannot raise.
4534 (process_freeze_entity): Use Is_Record_Type.
4535 (process_type): Likewise.
4536
4537 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4538
4539 * einfo.ads (Corresponding_Record_Component): New alias
4540 for Node21 used for E_Component and E_Discriminant.
4541 * einfo.adb (Corresponding_Record_Component): New function.
4542 (Set_Corresponding_Record_Component): New procedure.
4543 (Write_Field21_Name): Handle Corresponding_Record_Component.
4544 * sem_ch3.adb (Inherit_Component): Set
4545 Corresponding_Record_Component for every component in
4546 the untagged case. Clear it afterwards for non-girder
4547 discriminants.
4548 * gcc-interface/decl.c (gnat_to_gnu_entity)
4549 <E_Record_Type>: For a derived untagged type with discriminants
4550 and constraints, apply the constraints to the layout of the
4551 parent type to deduce the layout.
4552 (field_is_aliased): Delete.
4553 (components_to_record): Test DECL_ALIASED_P directly.
4554 (annotate_rep): Check that fields are present except for
4555 an extension.
4556 (create_field_decl_from): Add DEBUG_INFO_P
4557 parameter and pass it in recursive and other calls. Add guard
4558 for the manual CSE on the size.
4559 (is_stored_discriminant): New predicate.
4560 (copy_and_substitute_in_layout): Consider only
4561 stored discriminants and check that original fields are present
4562 in the old type. Deal with derived types. Adjust call to
4563 create_variant_part_from.
4564
4565 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4566
4567 * exp_ch6.adb (Expand_Call_Helper): When locating the
4568 accessibility entity created for an access parameter, handle
4569 properly a reference to a formal of an enclosing subprogram. if
4570 the reference appears in an inherited class-wide condition, it
4571 is the rewriting of the reference in the ancestor expression,
4572 but the accessibility entity must be that of the current formal.
4573
4574 2017-05-02 Javier Miranda <miranda@adacore.com>
4575
4576 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
4577 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
4578 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
4579 Call Expand_Non_Binary_Modular_Op.
4580
4581 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4582
4583 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
4584 has discriminants, do not override the Stored_Constraint list of
4585 the full view of the derived type with that of the derived type.
4586
4587 2017-05-02 Bob Duff <duff@adacore.com>
4588
4589 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
4590
4591 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
4592
4593 * s-os_lib.ads: Minor typo fix.
4594
4595 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
4596
4597 * gnatls.adb: Merge and refactor code from Prj.Env and remove
4598 this deprecated dependency.
4599
4600 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4601
4602 * exp_util.ads: minor comment addition.
4603
4604 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4605
4606 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
4607 pastos in part #3 of the head comment.
4608
4609 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4610
4611 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
4612 procedure body for a local (sub)type declaration within a
4613 predicate function. Invariant checks do not apply to these, and
4614 the expansion of the procedure will happen in the wrong scope,
4615 leading to misplaced freeze nodes.
4616
4617 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4618
4619 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
4620 to analyze generated actions. If the main unit is a body,
4621 the required scope is that of the corresponding unit declaration.
4622
4623 2017-05-02 Arnaud Charlet <charlet@adacore.com>
4624
4625 * einfo.adb (Declaration_Node): flip branches of
4626 an IF statement to avoid repeated negations in its condition;
4627 no change in semantics, only to improve readability.
4628
4629 2017-05-02 Arnaud Charlet <charlet@adacore.com>
4630
4631 * sem_case.adb: Remove extra spaces in parameter declarations.
4632
4633 2017-05-02 Justin Squirek <squirek@adacore.com>
4634
4635 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
4636 in usage line for new -gnatwE switch.
4637
4638 2017-05-02 Claire Dross <dross@adacore.com>
4639
4640 * a-cofuve.ads (Remove): Remove unnecessary
4641 conditions in precondition.
4642
4643 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
4644
4645 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
4646 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
4647
4648 2017-05-02 Justin Squirek <squirek@adacore.com>
4649
4650 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
4651 alternative expression.
4652 * sem_res.adb (Resolve_Case_Expression): Ditto.
4653
4654 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4655
4656 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
4657 Refine predicate for the case where the primitive operation
4658 is a renaming of equality. An overriding operation that is
4659 a user-defined renaming of predefined equality inherits its
4660 slot from the overridden operation. Otherwise it is treated
4661 as a predefined op and occupies the same predefined slot as
4662 equality. A call to it is transformed into a call to its alias,
4663 which is the predefined equality. A dispatching call thus uses
4664 the proper slot if operation is further inherited and called
4665 with class-wide arguments.
4666
4667 2017-05-02 Justin Squirek <squirek@adacore.com>
4668
4669 * errout.adb (Set_Msg_Text): Add a case to switch the message
4670 type when the character '[' is detected signifying a warning
4671 about a run-time exception.
4672 * opt.ads Add a new Warning_Mode value for new switch
4673 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
4674 to handle new warning mode
4675 * usage.adb (Usage): Add usage entry for -gnatwE
4676 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
4677
4678 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4679
4680 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
4681 declaration that operates on some fixed point type.
4682
4683 2017-05-02 Justin Squirek <squirek@adacore.com>
4684
4685 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
4686
4687 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
4688
4689 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
4690
4691 2017-05-02 Justin Squirek <squirek@adacore.com>
4692
4693 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
4694 expression (Analyze_If_Expression): Add check for valid condition
4695 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
4696 on case-expression
4697 * sem_res.adb (Resolve_If_Expression): Add check for valid
4698 condition and then-expression.
4699
4700 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4701
4702 * exp_ch3.adb (Build_Initialization_Call): Generate a null
4703 statement if the initialization call is a null procedure, as
4704 can happen with a controlled type with no explicit Initialize
4705 procedure, or an array of such.
4706 * exp_ch7.adb (Process_Object_Declaration): For a type with
4707 controlled components that has a trivial Initialize procedure,
4708 insert declaration for finalization counter after object
4709 declaration itself.
4710 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
4711 finalization block and attendant declarations if component has
4712 a trivial Initialize procedure.
4713 (Make_Init_Call): Do not generate a call if controlled type has
4714 a trivial Initialize procedure.
4715
4716 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4717
4718 * g-forstr.ads (Data): Move Format component last.
4719 * g-forstr.adb ("+"): Adjust for above change.
4720 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
4721 * g-sechas.ads (Context): Move Key last.
4722 * g-socket.ads (Service_Entry_Type): Move Aliases last.
4723 * s-fileio.adb (Temp_File_Record): Move Name last.
4724 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
4725 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
4726
4727 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
4728
4729 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
4730 switch introduced recently. finally not needed.
4731
4732 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
4733
4734 * sem_ch6.adb (Analyze_Null_Procedure): Set the
4735 Corresponding_Body link for a null procedure declaration.
4736
4737 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4738
4739 * atree.h (Flag290): Add missing terminating parenthesis.
4740 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
4741 (Set_Is_Class_Wide_Clone): Likewise.
4742 * einfo.ads (Is_Class_Wide_Clone): Likewise.
4743
4744 2017-05-02 Gary Dismukes <dismukes@adacore.com>
4745
4746 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
4747 parameter Array_Comp to indicate the case of an array object
4748 with null-excluding components.
4749 * checks.adb (Null_Exclusion_Static_Checks):
4750 Call Compile_Time_Constraint_Error instead of
4751 Apply_Compile_Time_Constraint_Error in the component case. Also
4752 call that when Array_Comp is True, with an appropriate warning for
4753 the array component case. Only create an explicit initialization
4754 by null in the case of an object of a null-excluding access type
4755 (and no longer do that in the component case).
4756 * sem_ch3.adb (Check_Component): Add a Boolean parameter
4757 Array_Comp defaulted to False. Pass Empty for the Comp
4758 actual when calling Null_Exclusion_Static_Checks in the case
4759 where Comp_Decl matches Object_Decl, because we don't have a
4760 component in that case. In the case of an object or component
4761 of an array type, pass True for Array_Comp on the recursive call
4762 to Check_Component.
4763
4764 2017-05-02 Bob Duff <duff@adacore.com>
4765
4766 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
4767 compute the linux priority from the Ada priority. Call this everywhere
4768 required. In particular, the previous version was not doing this
4769 computation when setting the ceiling priority in various places. It
4770 was just converting to C.int, which results in a ceiling that is off
4771 by 1.
4772
4773 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4774
4775 * sem_ch3.adb: Comment predicate inheritance.
4776
4777 2017-05-02 Tristan Gingold <gingold@adacore.com>
4778
4779 * s-trasym.ads: Add comment.
4780
4781 2017-05-02 Bob Duff <duff@adacore.com>
4782
4783 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
4784 * sem_ch4.adb: Minor reformatting.
4785 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
4786 * s-taspri-posix-noaltstack.ads: Minor refactoring.
4787 * sinput.ads: Minor typo fix.
4788
4789 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4790
4791 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
4792 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
4793 here from exp_ch9, to recognize objects whose creation requires
4794 dynamic allocation, so that the proper warning can be emitted
4795 when restriction No_Implicit_Heap_Allocation is in effect.
4796 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
4797 to emit proper warning when an object that requires dynamic
4798 allocation is declared.
4799
4800 2017-05-02 Tristan Gingold <gingold@adacore.com>
4801
4802 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
4803
4804 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4805
4806 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
4807 visibility rules for equality operators that apply within an
4808 instantiation apply within an inlined body.
4809 * sem_type.adb (Add_One_Interp): ditto.
4810
4811 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
4812
4813 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
4814 procedures.
4815
4816 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4817
4818 * snames.ads-tmpl
4819 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
4820 Name_No_Tagged_Streams): Move to regular pragmas. Add
4821 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
4822 and Secondary_Stack_Size.
4823 (Pragma_Id): Move Pragma_Assume,
4824 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
4825 Pragma_No_Tagged_Streams to second part.
4826
4827 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
4828
4829 * exp_attr.adb: Minor reformatting.
4830
4831 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4832
4833 * sem_ch4.adb (Analyze_Selected_Component): Improve error
4834 detection for illegal references to private components or
4835 operations of a protected type in the body of the type.
4836
4837 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4838
4839 * opt.ads: Add missing GNAT markers in comments.
4840 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
4841 settings of Optimize_Alignment at the end.
4842
4843 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
4844
4845 * checks.adb (Apply_Constraint_Check): Do not apply
4846 a discriminant check when the associated type is a constrained
4847 subtype created for an unconstrained nominal type.
4848 * exp_attr.adb: Minor reformatting.
4849
4850 2017-05-02 Bob Duff <duff@adacore.com>
4851
4852 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
4853 the N_Raise_Expression case.
4854 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
4855 and add assertions.
4856
4857 2017-05-02 Yannick Moy <moy@adacore.com>
4858
4859 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
4860 optimize length comparison in GNATprove mode.
4861 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
4862 operator /= into negation of operator = when needed.
4863 (Expand_SPARK): Call new
4864 function to expand operator /=.
4865
4866 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4867
4868 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
4869 Simplify the expression for a fixed-fixed division to remove
4870 divisions by constants whenever possible, as an optimization
4871 for restricted targets.
4872
4873 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
4874
4875 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
4876
4877 2017-05-02 Bob Duff <duff@adacore.com>
4878
4879 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
4880 to find primitive ops, instead of using an Identifier that will
4881 later be looked up. This is necessary because these ops are not
4882 necessarily visible at all places where we need to call them.
4883 * exp_util.ads: Minor comment fix.
4884
4885 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4886
4887 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
4888 references are fully conformant if they are both expansions
4889 of the discriminant of a protected type, within one of the
4890 protected operations. One occurrence may be expanded into a
4891 constant declaration while the other is an input parameter to
4892 the corresponding generated subprogram.
4893
4894 2017-05-02 Justin Squirek <squirek@adacore.com>
4895
4896 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
4897 recursivly searching composite-types for null-excluding access
4898 types and verifying them.
4899 (Analyze_Object_Declaration): Add a
4900 call to Check_Null_Excluding_Components for static verification
4901 of non-initialized objects.
4902 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
4903 a parameter for a composite-type's component and an extra case
4904 for printing component information.
4905
4906 2017-05-02 Yannick Moy <moy@adacore.com>
4907
4908 * sem_ch10.adb (Analyze_Subunit): Take
4909 configuration pragma into account when restoring appropriate
4910 pragma for analysis of subunit.
4911
4912 2017-05-02 Justin Squirek <squirek@adacore.com>
4913
4914 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
4915 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
4916 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
4917 clauses from the runtime.
4918
4919 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
4920
4921 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
4922 array components specially.
4923
4924 2017-05-02 Ed Schonberg <schonberg@adacore.com>
4925
4926 * sem_ch8.adb (Premature_Usage): If the premature usage of
4927 an entity is as the expression in its own object decaration,
4928 rewrite the reference as Any_Id to prevent cascaded errors or
4929 compiler loops when such an entity is used in an address clause.
4930
4931 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
4932
4933 * gcc-interface/decl.c (components_to_record): Add missing guard.
4934
4935 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
4936
4937 * gcc-interface/decl.c (components_to_record): Add more comments.
4938 Put back pending fields onto the regular list if the misalignment
4939 happens to cancel itself.
4940
4941 2017-04-28 Ed Schonberg <schonberg@adacore.com>
4942
4943 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
4944 controlling actual in a prefixed call, preserve the original node
4945 information if the prefix itself has been rewritten, for ASIS use.
4946
4947 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
4948
4949 * exp_ch6.adb (Insert_Post_Call_Actions):
4950 Code clean up. Insert the post-call actions after an enclosing
4951 procedure call when N denotes a function call and appears as an
4952 actual parameter in the procedure call.
4953
4954 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
4955
4956 * freeze.adb (Check_Component_Storage_Order): If there is a clause
4957 for the component, also reject the attribute if the component
4958 doesn't end on a byte boundary and its scalar storage order is
4959 different from that of the enclosing record type.
4960
4961 2017-04-28 Javier Miranda <miranda@adacore.com>
4962
4963 * atree.ads (Info_Messages): Removed.
4964 (Warning_Info_Messages): New counter.
4965 (Report_Info_Messages): New counter.
4966 * err_vars.ads Update documentation.
4967 * errout.adb (Delete_Warning_And_Continuations): Update
4968 Info_Message occurrences.
4969 (Error_Msg_Internal): Update Info_Message occurrences.
4970 (Delete_Warning): Update Info_Message occurrences.
4971 (Write_Error_Summary): Update Info_Message occurrences.
4972 (Output_Messages): Update Info_Message occurrences.
4973 (To_Be_Removed): Update Info_Message occurrences.
4974 (Reset_Warnings): Update Info_Message occurrences.
4975 * errutil.adb (Error_Msg): Update Info_Message occurrences.
4976 (Finalize): Update Info_Message occurrences.
4977 (Initialize): Update Info_Message occurrences.
4978 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
4979 (Compilation_Errors): Update Info_Message_Occurences.
4980
4981 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
4982
4983 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
4984 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
4985 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
4986 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
4987 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
4988 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
4989 Y_Size.
4990 * sem_eval.adb (Why_Not_Static): Initialize Typ.
4991 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
4992
4993 2017-04-28 Bob Duff <duff@adacore.com>
4994
4995 * sem_util.ads, sem_util.adb (Might_Raise): New function
4996 that replaces Is_Exception_Safe, but has the opposite
4997 sense. Is_Exception_Safe was missing various cases -- calls inside
4998 a pragma Debug, calls inside an 'if' or assignment statement,
4999 etc. Might_Raise now walks the entire subtree looking for things
5000 that can raise.
5001 * exp_ch9.adb (Is_Exception_Safe): Remove.
5002 (Build_Protected_Subprogram_Body): Replace call to
5003 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
5004 constants where possible).
5005 * exp_ch7.adb: Rename Is_Protected_Body -->
5006 Is_Protected_Subp_Body. A protected_body is something different
5007 in the grammar.
5008
5009 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5010
5011 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
5012 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
5013 (P_Discrete_Choice_List): Initialize Expr_Node variable.
5014 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
5015 (P_Protected): Likewise.
5016 * sem_case.adb (Check_Duplicates):
5017 Add pragma Warnings on variable.
5018 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
5019 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
5020 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
5021 (Analyze_Exit_Statement): Initialize Scope_Id variable.
5022 (Analyze_Iterator_Specification): Initialize Bas variable.
5023 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
5024 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
5025 (Analyze_Accept_Statement): Initialize Task_Nam.
5026
5027 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5028
5029 * checks.adb (Install_Primitive_Elaboration_Check):
5030 Do not generate an elaboration check if all checks have been
5031 suppressed.
5032
5033 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5034
5035 * sem_ch13.adb (Analyze_Aspect_Specifications, case
5036 Interrupt_Handler and Attach_Handler): Generate reference
5037 to protected operation to prevent spurious warnings about
5038 unreferenced entities. Previous scheme failed with style checks
5039 enabled.
5040
5041 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5042
5043 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
5044 that follows an expression function must not be relocated to
5045 the generated body, because it applies to the code that follows.
5046
5047 2017-04-28 Gary Dismukes <dismukes@adacore.com>
5048
5049 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
5050 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
5051 code that might violate the more stringent checking for 'Access
5052 introduced in Ada 2005.
5053
5054 2017-04-28 Arnaud Charlet <charlet@adacore.com>
5055
5056 * a-cforse.adb: minor style fix in comment.
5057
5058 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5059
5060 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
5061 initialize Block_Decls variable.
5062 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
5063 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
5064 * exp_disp.adb (Expand_Interface_Actuals): Initialize
5065 Formal_DDT and Actual_DDT variables.
5066 (Expand_Interface_Thunk): Initialize Iface_Formal.
5067 (Make_DT): Initialize Size_Comp.
5068 (Make_Select_Specific_Data_Table): Initialize Decls.
5069 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
5070 Also initialize more RPC_Receiver_* variables.
5071 (Build_To_Any_Function): Initialize Cstr_Formal.
5072 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
5073
5074 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5075
5076 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
5077 node between access types, freeze the designated type as well,
5078 so that dispatch table pointers are created in the proper scope,
5079 and not in the constructed body of the expression function.
5080
5081 2017-04-28 Bob Duff <duff@adacore.com>
5082
5083 * alloc.ads (Nodes_Initial): Go back to previous value. The large
5084 value makes large compilations faster, but small compilations slower.
5085
5086 2017-04-28 Arnaud Charlet <charlet@adacore.com>
5087
5088 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
5089
5090 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5091
5092 * erroutc.adb (Compilation_Errors): Do not consider info messages
5093 as suitable warnings when warnings must be treated as errors.
5094 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
5095 internally-generated packages when outputting completion
5096 information.
5097 * errout.adb (Output_Messages): Do not consider info messages as
5098 suitable warnings when warnings must be treated as errors.
5099 * errutil.adb (Finalize): Do not consider info messages as
5100 suitable warnings when warnings must be treated as errors.
5101
5102 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5103
5104 * warnsw.ads: Minor fix for incorrect wording in comment.
5105
5106 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5107
5108 * sem_res.adb (In_Instance_Code): New predicate in
5109 Valid_Conversion, to determine whether a type conversion appears
5110 as (or within) an actual for a formal object. Type conversions
5111 in instances are not rechecked in Valid_Conversion because
5112 visibility changes between generic location andi instance may
5113 lead to spurious errors, but conversions within an actual must be
5114 fully checked, and they are not fully resolved when pre-analyzing
5115 the actuals.
5116
5117 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5118
5119 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
5120 New_Copy_Tree instead of Relocate_Node as any subsequent copies
5121 of the relocated node will have mangled Parent pointers.
5122 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
5123 tables used in conjunction with entity and itype replication.
5124 (Visit_Entity): Rewrite the restriction on which entities
5125 require duplication. The restriction now includes all types.
5126
5127 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5128
5129 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
5130 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
5131 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
5132 cleanups.
5133
5134 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5135
5136 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
5137 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
5138
5139 2017-04-28 Gary Dismukes <dismukes@adacore.com>
5140
5141 * exp_util.adb: Minor reformatting.
5142
5143 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5144
5145 * sem_ch4.adb: Fix copy/pasto.
5146
5147 2017-04-27 Tristan Gingold <gingold@adacore.com>
5148
5149 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
5150 raise-gcc.c. Fix include search path for raise-gcc.c
5151
5152 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
5153
5154 * fe.h (Warn_On_Questionable_Layout): Declare.
5155 * warnsw.ads (Warn_On_Record_Holes): Move down.
5156 (Warn_On_Questionable_Layout): New boolean variable.
5157 (Warning_Record): Add Warn_On_Questionable_Layout field.
5158 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
5159 (Restore_Warnings): Likewise.
5160 (Save_Warnings): Likewise.
5161 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
5162 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
5163 components_to_record.
5164 (gnu_field_to_gnat): New function.
5165 (warn_on_field_placement): Likewise.
5166 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
5167 parameters. Rename local variables and adjust recursive call.
5168 Rework final scan of the field list and implement warnings on the
5169 problematic placement of specific sorts of fields.
5170
5171 2017-04-27 Bob Duff <duff@adacore.com>
5172
5173 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
5174 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
5175 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
5176 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
5177 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
5178 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
5179 For efficiency, cache results of Is_Internal_File_Name and
5180 Is_Predefined_File_Name in the Units table. This avoids a lot
5181 of repeated text processing.
5182
5183 2017-04-27 Emmanuel Briot <briot@adacore.com>
5184
5185 * g-comlin.adb (Sort_Sections): remove useless test.
5186
5187 2017-04-27 Claire Dross <dross@adacore.com>
5188
5189 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
5190 allow the use of regular equality over elements in contracts.
5191 (Formal_Model): Ghost package containing model functions that are
5192 used in subprogram contracts.
5193 (Current_To_Last): Removed, model functions should be used instead.
5194 (First_To_Previous): Removed, model functions should be used instead.
5195 (Strict_Equal): Removed, model functions should be used instead.
5196 (No_Overlap): Removed, model functions should be used instead.
5197 (Equivalent_Keys): Functions over cursors are removed. They were
5198 awkward with explicit container parameters.
5199 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
5200 allow the use of regular equality over elements in contracts.
5201 (Formal_Model): Ghost package containing model functions that
5202 are used in subprogram contracts.
5203 (Current_To_Last): Removed, model functions should be used instead.
5204 (First_To_Previous): Removed, model functions should be used instead.
5205 (Strict_Equal): Removed, model functions should be used instead.
5206 (No_Overlap): Removed, model functions should be used instead.
5207
5208 2017-04-27 Yannick Moy <moy@adacore.com>
5209
5210 * gnat1drv.adb: Code cleanup.
5211
5212 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5213
5214 * exp_util.adb (Replace_Entity): The prefix of a 'Result
5215 attribute reference in a post- condition is the subprogram to
5216 which the condition applies. If the condition is inherited
5217 by a type extension, the prefix becomes a reference to the
5218 inherited operation, but there is no need to create a wrapper
5219 for this operation, because 'Result is expanded independently
5220 when elaborating the postconditions.
5221
5222 2017-04-27 Bob Duff <duff@adacore.com>
5223
5224 * sinput.adb: Minor code cleanup.
5225 * namet.adb (Append): Create faster versions of
5226 Append(String) and Append(Name_Id) by using slice assignment
5227 instead of loops.
5228 * sem_util.adb (In_Instance): Speed this up by removing
5229 unnecessary tests; Is_Generic_Instance is defined for all
5230 entities.
5231 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
5232 Remove unused function.
5233 * alloc.ads (Nodes_Initial): Use a much larger value, because
5234 the compiler was spending a lot of time copying the nodes table
5235 when it grows. This number was chosen in 1996, so is rather out
5236 of date with current memory sizes. Anyway, it's virtual memory.
5237 Get rid of Orig_Nodes_...; use Node_... instead.
5238 * atree.adb (Lock): Do not release the Nodes tables; it's a
5239 waste of time.
5240 Orig_Nodes_ ==> Nodes_
5241 * nlists.adb: Orig_Nodes_ ==> Nodes_
5242 * g-table.adb: Remove unused "with" clause.
5243 * g-table.ads, table.ads: Remove Big_Table_Type, which should
5244 not be used by clients.
5245 * g-dyntab.adb (Last_Allocated): New function
5246 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
5247
5248 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5249
5250 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
5251 check.
5252 (Subtypes_Statically_Match): Remove duplicate check.
5253 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
5254
5255 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5256
5257 * exp_aggr.adb (Replace_Type): Remove the special processing
5258 for selected components.
5259 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
5260 processing for attributes Fixed_Value and Integer_Value.
5261 * exp_util.adb (Side_Effect_Free): Merge the processing for
5262 qualified expressions, type conversions, and unchecked type
5263 conversions.
5264 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
5265 and Optional.
5266 * par-ch3.adb (P_Declarative_Items): Merge the processing for
5267 tokens function, not, overriding, and procedure.
5268 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
5269 for qualified expressions, type conversions, and unchecked
5270 type conversions.
5271 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
5272 processing for Ada 83 and instances.
5273 (Object_Access_Level): Merge the processing for indexed components
5274 and selected components.
5275 * uname.adb (Add_Node_Name): Merge the processing for stubs.
5276
5277 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5278
5279 * checks.adb (Install_Primitive_Elaboration_Check):
5280 Do not generate the check when restriction No_Elaboration_Code
5281 is in effect.
5282
5283 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5284
5285 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
5286 of Expand_Dispatching_Call. If the denoted subprogram has a
5287 class-wide precondition, this is the only precondition that
5288 applies to the call, rather that the class-wide preconditions
5289 that may apply to the body that is executed. (This is specified
5290 in AI12-0195).
5291
5292 2017-04-27 Yannick Moy <moy@adacore.com>
5293
5294 * gnat1drv.adb (Adjust_Global_Switches): Issue
5295 a warning in GNATprove mode if the runtime library does not
5296 support IEEE-754 floats.
5297
5298 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5299
5300 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
5301 is itself inherited it does not carry any contract information,
5302 so examine its parent operation which is its Alias.
5303
5304 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5305
5306 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
5307 prefix can be an object reference in which case Obj'Image (X)
5308 can only be interpreted as an indexing of the parameterless
5309 version of the attribute.
5310 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
5311 an indexing or a slice operation if the attribute does not require
5312 parameters. In Ada2012 'Image also belongs in this category,
5313 and A'Image (lo .. hi) is legal and must be parsed as a slice.
5314
5315 2017-04-27 Yannick Moy <moy@adacore.com>
5316
5317 * exp_ch4.adb: Minor reformatting.
5318 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
5319 disable the CodePeer and C generation modes. Similar to the
5320 opposite actions done in CodePeer mode.
5321
5322 2017-04-27 Yannick Moy <moy@adacore.com>
5323
5324 * sem_res.adb: Remove duplicate code.
5325 * sem_attr.adb: Delete duplicate code.
5326
5327 2017-04-27 Bob Duff <duff@adacore.com>
5328
5329 * g-dyntab.adb: Reduce the amount of copying in
5330 Release. No need to copy items past Last.
5331
5332 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5333
5334 * checks.adb Add with and use clauses for Sem_Disp.
5335 (Install_Primitive_Elaboration_Check): New routine.
5336 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
5337 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
5338 processing of 'Elaborated.
5339 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
5340 elaboration check.
5341
5342 2017-04-27 Bob Duff <duff@adacore.com>
5343
5344 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
5345 If the table grows and then shrinks back to empty, we won't necessarily
5346 point back to the empty array. Code cleanups.
5347 * sinput.ads: Add 'Base to Size clause to match the declared
5348 component subtypes.
5349
5350 2017-04-27 Claire Dross <dross@adacore.com>
5351
5352 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
5353 allow the use of regular equality over elements in contracts.
5354 (Formal_Model): Ghost package containing model functions that
5355 are used in subprogram contracts.
5356 (Current_To_Last): Removed, model functions should be used instead.
5357 (First_To_Previous): Removed, model functions should be used instead.
5358 (Strict_Equal): Removed, model functions should be used instead.
5359 (No_Overlap): Removed, model functions should be used instead.
5360 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
5361 Boolean generic parameter to disable contracts for equivalence
5362 between keys.
5363 (Witness): Create a witness of a key that is used for handling of
5364 equivalence between keys.
5365 (Has_Witness): Check whether a witness is contained in a map.
5366 (W_Get): Get the element associated to a witness.
5367 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
5368 directly.
5369 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
5370 Boolean generic parameter to disable contracts for equivalence
5371 between keys.
5372 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
5373 of equivalence on functional maps.
5374 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
5375 of equivalence on functional maps.
5376
5377 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5378
5379 * exp_ch9.adb (Expand_Entry_Barrier): Code
5380 cleanup. Do not perform the optimization which removes the
5381 declarations of the discriminant and component renamings when
5382 validity checks on operands and attributes are in effect.
5383
5384 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5385
5386 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
5387 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
5388 a-cfhama.ads, a-cofove.ads: Minor reformatting.
5389
5390 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5391
5392 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
5393 pointer dereference.
5394 * g-spipat.adb (Dump): Code clean up. Protect against a possible
5395 null pointer dereference.
5396
5397 2017-04-27 Bob Duff <duff@adacore.com>
5398
5399 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
5400 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
5401 Free renames Init, since they do the same thing.
5402 * g-table.ads: Default for Table_Low_Bound.
5403 * table.ads: Default for Table_Low_Bound, Table_Initial, and
5404 Table_Increment.
5405
5406 2017-04-27 Bob Duff <duff@adacore.com>
5407
5408 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
5409 can reallocate.
5410 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
5411 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
5412 Reorder code so that above assertions do not fail.
5413 * table.ads: Remove obsolete comment on Locked.
5414
5415 2017-04-27 Claire Dross <dross@adacore.com>
5416
5417 * a-cfdlli.ads: Code cleanup.
5418
5419 2017-04-27 Yannick Moy <moy@adacore.com>
5420
5421 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
5422 when needed for proof. (Expand_SPARK): Call the new procedure.
5423 * exp_util.ads Fix typo.
5424
5425 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5426
5427 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
5428 fixes.
5429
5430 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5431
5432 * sem_elab.adb Add new type Visited_Element
5433 and update the contents of table Elab_Visited. Various code clean up.
5434 (Check_Elab_Call): Determine whether a prior call to
5435 the same subprogram was already examined within the same context.
5436 (Check_Internal_Call_Continue): Register the subprogram being
5437 called as examined within a particular context. Do not suppress
5438 elaboration warnings.
5439
5440 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5441
5442 * xoscons.adb, osint.ads: Minor reformatting.
5443
5444 2017-04-27 Bob Duff <duff@adacore.com>
5445
5446 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
5447 Table_Count_Type --> Table_Last_Type, because the name
5448 was confusing (a "count" usually starts at zero). Add
5449 functionality supported or needed by other tables packages
5450 (Move, Release_Threshold).
5451 * g-table.ads, g-table.adb: This is now just a thin wrapper
5452 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
5453 or needed by other tables packages (Save, Restore).
5454 * table.ads, table.adb: This is now just a thin wrapper around
5455 * g-table.ads/g-table.adb.
5456 * namet.h, scos.h, uintp.h: These files are reaching into the
5457 private data of some instances of g-table, whose names changed,
5458 so the above change requires some adjustment here. It now uses
5459 public interfaces.
5460
5461 2017-04-27 Bob Duff <duff@adacore.com>
5462
5463 * namet.adb, namet.ads: Minor: remove unused procedures.
5464
5465 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
5466
5467 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
5468 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
5469 Add pragma Warnings on Rtype variable in nested block. *
5470 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
5471 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
5472 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
5473 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
5474 (Process_Component_List_For_Finalize): Initialize Counter_Id.
5475 (Build_Finalize_Statements): Initialize Bod_Stmts.
5476 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
5477
5478 2017-04-27 Claire Dross <dross@adacore.com>
5479
5480 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
5481 allow the use of regular equality over elements in contracts.
5482 (Formal_Model): Ghost package containing model functions that are
5483 used in subprogram contracts.
5484 (Current_To_Last): Removed, model
5485 functions should be used instead.
5486 (First_To_Previous): Removed, model functions should be used instead.
5487 (Strict_Equal): Removed, model functions should be used instead.
5488 (No_Overlap): Removed, model functions should be used instead.
5489 (Equivalent_Keys): Functions over cursors are removed. They were
5490 awkward with explicit container parameters.
5491 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
5492 (proof only) procedure to help GNATprove when equivalence over
5493 keys is not equality.
5494
5495 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5496
5497 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
5498 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
5499 Minor reformatting and code cleanups.
5500
5501 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5502
5503 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
5504 subsidiary of Check_Inherited_Conditions, to build pragmas for an
5505 operation whose ancestor has classwide pre/postconditions. This
5506 is used both to check the legality of the inheritance in Ada
5507 and in SPARK, and to determine whether a wrapper is needed for
5508 an inherited operation.
5509 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
5510 Improve placement of error message for inherited classwide
5511 conditions that become illegal on type derivation.
5512
5513 2017-04-27 Yannick Moy <moy@adacore.com>
5514
5515 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
5516 SPARK_Mode from context on generic package.
5517 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
5518 useless test.
5519
5520 2017-04-27 Claire Dross <dross@adacore.com>
5521
5522 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
5523 overflows in computations.
5524 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
5525 overflows in computations.
5526 (Insert): Rewrite precondition to avoid overflows in computations.
5527 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
5528 overflows in computations.
5529 (Insert): Rewrite precondition to avoid overflows in computations.
5530
5531 2017-04-27 Steve Baird <baird@adacore.com>
5532
5533 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
5534 flag when it is declared in order to avoid confusing CodePeer about
5535 the possibility of an uninitialized variable read.
5536
5537 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5538
5539 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
5540 no dimensionality error if the subtype of the expression is
5541 identical to the nominal subtype in the declaration, even though
5542 the expression itself may have been constant-folded and lack a
5543 dimension vector.
5544 * sem_dim.ads: Add comments on setting of dimension vectors and
5545 its interaction with node rewritings and side-effect removal.
5546
5547 2017-04-27 Bob Duff <duff@adacore.com>
5548
5549 * debug.adb: Minor comment correction.
5550 * sem_dim.ads: Minor reformatting and typo fixes.
5551
5552 2017-04-27 Bob Duff <duff@adacore.com>
5553
5554 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
5555 Last of the tables via function calls, rather than relying on layout
5556 of data structures.
5557
5558 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5559
5560 * exp_util.adb: No wrapper in GNATprove mode.
5561
5562 2017-04-27 Yannick Moy <moy@adacore.com>
5563
5564 * sem_res.adb (Resolve_Comparison_Op): Always
5565 evaluate comparisons between values of universal types.
5566
5567 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5568
5569 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
5570 an elaboration counter nor a check when in GNATprove mode.
5571 * sem_util.adb (Build_Elaboration_Entity): Do not create an
5572 elaboration counter when in GNATprove mode.
5573
5574 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5575
5576 * freeze.adb: copy-paste typo.
5577
5578 2017-04-27 Yannick Moy <moy@adacore.com>
5579
5580 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
5581 Use correct test to detect call in GNATprove mode instead of
5582 compilation.
5583
5584 2017-04-27 Claire Dross <dross@adacore.com>
5585
5586 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
5587 New property function expressing that the element of a
5588 sequence are contained in the union of two sequences.
5589 (Formal_Model.M_Elements_Included): New property function
5590 expressing that the element of a sequence are another sequence.
5591 (Generic_Sorting): Use new property functions to state that
5592 elements are preserved by Sort and Merge.
5593 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
5594 allow the use of regular equality over elements in contracts.
5595 (Formal_Model): Ghost package containing model functions
5596 that are used in subprogram contracts. (Capacity):
5597 On unbounded containers, return the maximal capacity.
5598 (Current_To_Last): Removed, model functions should be used instead.
5599 (First_To_Previous): Removed, model functions should be used instead.
5600 (Append): Default parameter value replaced
5601 by new wrapper to allow more precise contracts.
5602 (Insert): Subprogram restored, it seems it was useful to users even if
5603 it is inefficient.
5604 (Delete): Subprogram restored, it seems it was useful to users even if
5605 it is inefficient.
5606 (Prepend): Subprogram restored, it seems it was useful to users even
5607 if it is inefficient.
5608 (Delete_First): Subprogram restored, it seems it
5609 was useful to users even if it is inefficient. (Delete_Last):
5610 Default parameter value replaced by new wrapper to allow more
5611 precise contracts.
5612 (Generic_Sorting.Merge): Subprogram restored.
5613 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
5614 allow the use of regular equality over elements in contracts.
5615 (Formal_Model): Ghost package containing model functions
5616 that are used in subprogram contracts. (Capacity):
5617 On unbounded containers, return the maximal capacity.
5618 (Current_To_Last): Removed, model functions should be used
5619 instead.
5620 (First_To_Previous): Removed, model functions should be used instead.
5621 (Append): Default parameter value replaced
5622 by new wrapper to allow more precise contracts.
5623 (Insert): Subprogram restored, it seems it was useful to users even if
5624 it is inefficient.
5625 (Delete): Subprogram restored, it seems it was useful to users even if
5626 it is inefficient.
5627 (Prepend): Subprogram restored, it seems it was useful to users even
5628 if it is inefficient.
5629 (Delete_First): Subprogram restored, it seems it
5630 was useful to users even if it is inefficient. (Delete_Last):
5631 Default parameter value replaced by new wrapper to allow more
5632 precise contracts.
5633 (Generic_Sorting.Merge): Subprogram restored.
5634 (Vector): Do not reuse formal vectors, as it is no longer possible
5635 to supply them with an equality function over elements.
5636
5637 2017-04-27 Bob Duff <duff@adacore.com>
5638
5639 * g-dyntab.adb (Release): When allocating the new
5640 table, use the correct slice of the old table to initialize it.
5641
5642 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
5643
5644 * einfo.ads: Minor fixes in comments.
5645
5646 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5647
5648 * sem_prag.adb: disable clones in SPARK_Mode.
5649
5650 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5651
5652 * sem_util.ads, contracts.adb: Minor reformatting.
5653
5654 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5655
5656 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
5657 Build body of subprogram that has a class-wide condition that
5658 contains calls to other primitives.
5659 (Build_Class_Wide_Clone_Call); Build a call to the common
5660 class-wide clone of a subprogram with classwide conditions. The
5661 body of the subprogram becomes a wrapper for a call to the
5662 clone. The inherited operation becomes a similar wrapper to which
5663 modified conditions apply, and the call to the clone includes
5664 the proper conversion in a call the parent operation.
5665 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
5666 subprogram that has a classwide condition that contains calls to
5667 other primitives, build an internal subprogram that is invoked
5668 through a type-specific wrapper for all inherited subprograms
5669 that may have a modified condition.
5670 * sem_prag.adb (Check_References): If subprogram has a classwide
5671 condition, create entity for corresponding clone, to be invoked
5672 through wrapper subprograns.
5673 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
5674 message about placement if pragma isi internally generated.
5675 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
5676 a classwide clone, build body of clone as copy of original body,
5677 and rewrite original body as a wrapper as a wrapper for a call to
5678 the clone, so that it incorporates the original pre/postconditions
5679 of the subprogram.
5680 * freeze.adb (Check_Inherited_Conditions): For an inherited
5681 subprogram that inherits a classwide condition, build spec and
5682 body of corresponding wrapper so that call to inherited operation
5683 gets the modified conditions.
5684 * contracts.adb (Analyze_Contracts): If analysis of classwide
5685 condition has created a clone for a primitive operation, analyze
5686 declaration of clone.
5687
5688 2017-04-27 Steve Baird <baird@adacore.com>
5689
5690 * exp_util.adb (Build_Allocate_Deallocate_Proc):
5691 Add "Suppress => All_Checks" to avoid generating unnecessary
5692 checks.
5693
5694 2017-04-27 Yannick Moy <moy@adacore.com>
5695
5696 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
5697 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
5698 inlining body in GNATprove mode when switch -gnatdm used.
5699 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
5700 in GNATprove mode when switch -gnatdm used.
5701
5702 2017-04-27 Arnaud Charlet <charlet@adacore.com>
5703
5704 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
5705 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
5706 clauses, so that we keep an indication of the address clause
5707 before removing it from the tree.
5708
5709 2017-04-27 Yannick Moy <moy@adacore.com>
5710
5711 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
5712 of expression being qualified, when not an object name, or else
5713 evaluate the underlying name.
5714
5715 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
5716
5717 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
5718
5719 2017-04-27 Justin Squirek <squirek@adacore.com>
5720
5721 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
5722 Process_Component_List_For_Finalization as a local variable.
5723 (Process_Component_For_Finalize): Add an extra parameter to avoid
5724 global references.
5725 (Process_Component_List_For_Finalization): Correct calls to
5726 Process_Component_For_Finalize to take Num_Comps as a parameter.
5727
5728 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5729
5730 * sem_ch8.adb (Find_Direct_Name): Account for the case where
5731 a use-visible entity is defined within a nested scope of an
5732 instance when giving priority to entities which were visible in
5733 the original generic.
5734 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
5735
5736 2017-04-27 Tristan Gingold <gingold@adacore.com>
5737
5738 * raise-gcc.c: Don't use unwind.h while compiling
5739 for the frontend, but mimic host behavior.
5740
5741 2017-04-27 Javier Miranda <miranda@adacore.com>
5742
5743 * sem_ch3.adb (Build_Discriminated_Subtype):
5744 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
5745
5746 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5747
5748 * sem_prag.adb (Analyze_Global_Item):
5749 Do not consider discriminants because they are not "entire
5750 objects". Remove the discriminant-related checks because they are
5751 obsolete.
5752 (Analyze_Input_Output): Do not consider discriminants
5753 because they are not "entire objects".
5754
5755 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5756
5757 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
5758 perform check if the current scope does not come from source,
5759 as is the case for a rewritten task body, because check has
5760 been performed already, and may not be doable because of changed
5761 visibility.
5762
5763 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5764
5765 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
5766 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
5767 Minor reformatting.
5768
5769 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5770
5771 * sem_ch4.adb (Analyze_Call): If the return type of a function
5772 is incomplete in an context in which the full view is available,
5773 replace the type of the call by the full view, to prevent spurious
5774 type errors.
5775 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
5776 abstract subprogram so that compiler does not reject a parameter
5777 of a primitive operation of a tagged type being frozen, when
5778 the untagged type of that parameter cannot be frozen.
5779
5780 2017-04-27 Bob Duff <duff@adacore.com>
5781
5782 * sem_attr.adb (Compute_Type_Key): Don't walk
5783 representation items for irrelevant types, which could be in a
5784 different source file.
5785
5786 2017-04-27 Steve Baird <baird@adacore.com>
5787
5788 * exp_attr.adb (Expand_N_Attribute_Reference):
5789 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
5790 for CodePeer.
5791
5792 2017-04-27 Yannick Moy <moy@adacore.com>
5793
5794 * exp_unst.ads: Fix typos in comments.
5795
5796 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5797
5798 * sem_eval.adb (Choice_Matches): Handle properly a real literal
5799 whose type has a defined static predicate.
5800
5801 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5802
5803 * exp_ch4.adb (Insert_Dereference_Action):
5804 Do not adjust the address of a controlled object when the
5805 associated access type is subject to pragma No_Heap_Finalization.
5806 Code reformatting.
5807
5808 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
5809
5810 * gcc-interface/utils.c (gnat_type_for_size): Set
5811 TYPE_ARTIFICIAL on created types.
5812
5813 2017-04-27 Claire Dross <dross@adacore.com>
5814
5815 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
5816 modifications in functional containers.
5817 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
5818 to improve readablity. Subprograms are separated between basic
5819 operations, constructors and properties. Universally quantified
5820 formulas in contracts are factorized in independant functions
5821 with a name and a comment. Names of parameters are improved.
5822
5823 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5824
5825 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
5826
5827 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5828
5829 * sem_res.adb (Resolve_Type_Conversion): Do not
5830 install a predicate check here since this is already done during
5831 the expansion phase. Verify whether the operand satisfies the
5832 static predicate (if any) of the target type.
5833 * sem_ch3.adb (Analyze_Object_Declaration): Do
5834 not install a predicate check if the object is initialized by
5835 means of a type conversion because the conversion is subjected
5836 to the same check.
5837
5838 2017-04-27 Tristan Gingold <gingold@adacore.com>
5839
5840 * raise.c (__gnat_builtin_longjmp): Remove.
5841 (__gnat_bracktrace):
5842 Add a dummy definition for the compiler (__gnat_eh_personality,
5843 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
5844 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
5845 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
5846 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
5847 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
5848 and a-except-2005.adb.
5849 * raise-gcc.c: Allow build in compiler, compiled as a C++
5850 file.
5851 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
5852 (db): Constify msg_format.
5853 (get_call_site_action_for): Don't use void arithmetic.
5854 * system.ads (Frontend_Exceptions): Set to False.
5855 (ZCX_By_Default): Set to True.
5856 (GCC_ZC_Support): Set to True.
5857 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
5858 a-except.ad[sb].
5859 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
5860 in gnat1 and gnatbind.
5861 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
5862 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
5863 * s-excmac.ads, s-excmac.adb: Copy of variants.
5864 * a-except.o: Adjust preequisites.
5865 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
5866
5867 2017-04-27 Claire Dross <dross@adacore.com>
5868
5869 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
5870 modifications in functional containers.
5871 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
5872 to improve readablity. Subprograms are separated between basic
5873 operations, constructors and properties. Universally quantified
5874 formulas in contracts are factorized in independant functions
5875 with a name and a comment. Names of parameters are improved.
5876
5877 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5878
5879 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
5880
5881 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5882
5883 * sem_res.adb (Resolve_Type_Conversion): Do not
5884 install a predicate check here since this is already done during
5885 the expansion phase. Verify whether the operand satisfies the
5886 static predicate (if any) of the target type.
5887 * sem_ch3.adb (Analyze_Object_Declaration): Do
5888 not install a predicate check if the object is initialized by
5889 means of a type conversion because the conversion is subjected
5890 to the same check.
5891
5892 2017-04-27 Tristan Gingold <gingold@adacore.com>
5893
5894 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
5895 replaced by their variants).
5896
5897 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5898
5899 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
5900 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
5901 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
5902
5903 2017-04-27 Tristan Gingold <gingold@adacore.com>
5904
5905 * s-excmac-gcc.ads, s-excmac-gcc.adb,
5906 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
5907 Ada95.
5908
5909 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5910
5911 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
5912 the loop which detects potential enclosing transient scopes. The
5913 loop now terminates much earlier as transient scopes are bounded
5914 by packages and subprograms.
5915
5916 2017-04-27 Claire Dross <dross@adacore.com>
5917
5918 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
5919 allow the use of regular equality over elements in contracts.
5920 (Cursor): Type is now public so that it can be used in
5921 model functions.
5922 (Formal_Model): Ghost package containing
5923 model functions that are used in subprogram contracts.
5924 (Current_To_Last): Removed, model functions should be used
5925 instead.
5926 (First_To_Previous): Removed, model functions should
5927 be used instead.
5928 (Strict_Equal): Removed, model functions
5929 should be used instead.
5930 (Append): Default parameter value
5931 replaced by new wrapper to allow more precise contracts.
5932 (Insert): Default parameter value replaced by new wrapper to
5933 allow more precise contracts.
5934 (Delete): Default parameter
5935 value replaced by new wrapper to allow more precise contracts.
5936 (Prepend): Default parameter value replaced by new wrapper to
5937 allow more precise contracts.
5938 (Delete_First): Default parameter
5939 value replaced by new wrapper to allow more precise contracts.
5940 (Delete_Last): Default parameter value replaced by new wrapper
5941 to allow more precise contracts.
5942
5943 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5944
5945 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
5946 for object declarations.
5947 (Expand_SPARK_N_Object_Declaration): New routine.
5948 * sem_elab.adb (Check_A_Call): Include calls to the
5949 Default_Initial_Condition procedure of a type under the SPARK
5950 elaboration checks umbrella.
5951
5952 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5953
5954 * sem.adb (Analyze): Diagnose an illegal iterated component
5955 association.
5956 * sem_util.ads, sem_util.adb
5957 (Diagnose_Iterated_Component_Association): New routine.
5958
5959 2017-04-27 Bob Duff <duff@adacore.com>
5960
5961 * adaint.c (__gnat_get_current_dir): Return 0 in length if
5962 getcwd fails.
5963 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
5964 exception if getcwd failed.
5965
5966 2017-04-27 Yannick Moy <moy@adacore.com>
5967
5968 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
5969 entities with special prefix.
5970
5971 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5972
5973 * debug.adb Change the documentation of switch -gnatd.s.
5974 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
5975 to manage the secondary stack when an enclosing scope already
5976 performs this functionality (aka relaxed management). Switch
5977 -gnatd.s may be used to force strict management in which case
5978 the block will manage the secondary stack unconditionally. Add
5979 a guard to stop the traversal when encountering a package or a
5980 subprogram scope.
5981
5982 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5983
5984 * sem_res.adb (Resolve_Call): Refine further the handling of
5985 limited views of return types in function calls. If the function
5986 that returns a limited view appears in the current unit,
5987 we do not replace its type by the non-limited view because
5988 this transformation is performed int the back-end. However,
5989 the type of the call itself must be the non-limited view, to
5990 prevent spurious resolution errors.
5991
5992 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5993
5994 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
5995 Removed, proposed implementation using generics for class-wide
5996 preconditions proved impractical.
5997 (Class_Wide_Clone): New attribute of subprogram. Designates
5998 subprogram created for primitive operations with class-wide
5999 pre/postconditions that contain calls to other primitives. The
6000 clone holds the body of the original primitive, but the
6001 pre/postonditions do not apply to it. The original body is
6002 rewritten as a wrapper for a call to the clone.
6003 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
6004 the flag is set, no code for the corresponding pre/postconditions
6005 is inserted into its body.
6006
6007 2017-04-27 Bob Duff <duff@adacore.com>
6008
6009 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
6010 Scalar_Storage_Order if -gnatI is given.
6011 * sem_prag.adb (Analyze_Pragma): Ignore
6012 Default_Scalar_Storage_Order if -gnatI is given.
6013
6014 2017-04-27 Claire Dross <dross@adacore.com>
6015
6016 * a-cofuba.ads (Add): Take as an additional input parameter
6017 the position where the element should be inserted.
6018 (Remove): New function that removes an element from the container.
6019 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
6020 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
6021 (Remove): New function that removes an element from a set.
6022 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
6023 (Remove): New function that removes an element from a sequence.
6024 (Insert): New function that adds anywhere in a sequence.
6025
6026 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6027
6028 * checks.adb (Generate_Range_Check): Revert previous change.
6029
6030 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6031
6032 * sem_util.adb: Minor reformatting/rewording.
6033
6034 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6035
6036 * lib-xref.adb (Generate_Reference): The use
6037 of attribute 'Result is not considered a violation of pragma
6038 Unreferenced.
6039
6040 2017-04-27 Justin Squirek <squirek@adacore.com>
6041
6042 * cstand.adb (Create_Standard): Correctly set
6043 Directly_Designated_Type for Any_Access.
6044 * sem_type.adb (Covers): Minor grammar fixes.
6045
6046 2017-04-27 Bob Duff <duff@adacore.com>
6047
6048 * sem_attr.adb: Minor cleanup.
6049
6050 2017-04-27 Claire Dross <dross@adacore.com>
6051
6052 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
6053 private child of Ada.Containers used to implement all functional
6054 containers.
6055 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
6056 child of Ada.Containers. It provides functional indefinite unbounded
6057 maps which can be used as high level models for specification
6058 of data structures.
6059 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
6060 child of Ada.Containers. It provides functional indefinite unbounded
6061 sets which can be used as high level models for specification
6062 of data structures.
6063 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
6064 child of Ada.Containers. It provides functional indefinite unbounded
6065 vectors which can be used as high level models for specification
6066 of data structures.
6067 * Makefile.rtl: Add new packages.
6068 * impunit.adb: Add new packages.
6069
6070 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6071
6072 * sem_ch4.adb: Minor reformatting.
6073
6074 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6075
6076 * sem_ch12.adb (Analyze_Associations): minor reformatting.
6077 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
6078 point type actual that has user-defined arithmetic primitives,
6079 when there is a previous actual for a formal package that defines
6080 a fixed-point type with the parent user-defined operator.
6081
6082 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6083
6084 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
6085 * sem_attr.adb (Resolve_Attribute): Generate a range check when
6086 the component type allows range checks.
6087
6088 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6089
6090 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
6091 corresponding declaration, because formal derived types are
6092 rewritten as private extensions.
6093
6094 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6095
6096 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
6097 dimensions of operands if node has been analyzed already, because
6098 previous analysis and dimension checking will have removed the
6099 dimension information from the operands.
6100
6101 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6102
6103 * debug.adb: Document the use of switch -gnatd.s.
6104 * einfo.ads Update the documentation on attribute
6105 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
6106 the uses of these attributes from certain entities.
6107 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
6108 which determines whether the block should continue to manage
6109 the secondary stack.
6110 (Manages_Sec_Stack): New routine.
6111
6112 2017-04-27 Bob Duff <duff@adacore.com>
6113
6114 * atree.ads: Minor edit.
6115
6116 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6117
6118 * sinfo.ads: Update the section on Ghost mode. Add
6119 a section on SPARK mode. Update the placement of section on
6120 expression functions.
6121
6122 2017-04-27 Bob Duff <duff@adacore.com>
6123
6124 * sinput.adb (Get_Source_File_Index): Don't
6125 assert that S is in the right range in the case where this is
6126 a .dg file under construction.
6127
6128 2017-04-27 Yannick Moy <moy@adacore.com>
6129
6130 * sem_util.adb (Check_Result_And_Post_State):
6131 Handle more precisely each conjunct in expressions formed by
6132 and'ing sub-expressions.
6133
6134 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6135
6136 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
6137
6138 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6139
6140 * gnat_rm.texi, gnat_ugn.texi,
6141 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
6142 doc/gnat_ugn/platform_specific_information.rst,
6143 doc/gnat_ugn/gnat_and_program_execution.rst,
6144 doc/gnat_ugn/gnat_utility_programs.rst,
6145 doc/gnat_ugn/the_gnat_compilation_model.rst,
6146 doc/gnat_rm/implementation_defined_attributes.rst,
6147 doc/gnat_rm/the_gnat_library.rst,
6148 doc/gnat_rm/implementation_defined_pragmas.rst,
6149 doc/gnat_rm/representation_clauses_and_pragmas.rst,
6150 doc/gnat_rm/implementation_of_specific_ada_features.rst,
6151 doc/gnat_rm/implementation_defined_aspects.rst,
6152 doc/gnat_rm/implementation_defined_characteristics.rst: Update
6153 documentation.
6154
6155 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6156
6157 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
6158 generating C code on complex case expressions.
6159
6160 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6161
6162 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
6163 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
6164 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
6165 Ada_2012 instead of Ada_2005 to be compatible with the above
6166 change.
6167 * bindgen.adb: Silence new warning on pragma Ada_95.
6168
6169 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6170
6171 * checks.adb (Generate_Range_Check): Revert part of previous change.
6172
6173 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6174
6175 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
6176 container indexing operation that appears as a an actual in a
6177 parameter association in a procedure call.
6178
6179 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
6180
6181 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
6182 Fix spelling mistakes.
6183
6184 2017-04-25 Bob Duff <duff@adacore.com>
6185
6186 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
6187 * sinput-p.adb: Use regular fat pointers, with bounds checking,
6188 for source buffers. Fix misc obscure bugs.
6189 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
6190 checking, for source buffers. Modify representation clause for
6191 Source_File_Record as appropriate. Move Source_File_Index_Table
6192 from spec to body, because it is not used outside the body.
6193 Move Set_Source_File_Index_Table into the private part, because
6194 it is used only in the body and in children. Use trickery to
6195 modify the dope in the generic instantiation case. It's ugly,
6196 but not as ugly as the previous method. Fix documentation.
6197 Remove obsolete code.
6198 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
6199 indexing in source buffers.
6200 * fmap.adb: Avoid conversions from one string type to another.
6201 Remove a use of global name buffer.
6202 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
6203 fixes.
6204
6205 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6206
6207 * exp_util.adb, exp_ch4.adb: Minor reformatting.
6208
6209 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6210
6211 * checks.adb: Code clean up in various routines.
6212 (Generate_Range_Check): Do not generate a range check when the
6213 expander is not active or when index/range checks are suppressed
6214 on the target type.
6215 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
6216 Remove variants that include a Supress parameter. These routines
6217 are never used, and were introduced before the current scope-based
6218 check suppression method.
6219
6220 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
6221
6222 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
6223 code and some subprogram calls that are now noop.
6224
6225 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6226
6227 * exp_ch4.adb (Expand_N_Case_Expression): Take
6228 Minimize_Expression_With_Actions into account when possible.
6229
6230 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6231
6232 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
6233 (Known_Null): Moved to Sem_Util.
6234 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
6235 (Known_Null): Moved to Sem_Util.
6236 * sem_util.adb Add new enumeration type Null_Status_Kind.
6237 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
6238 this routine is now carried out by Null_Status.
6239 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
6240 is now carried out by Null_Status.
6241 (Null_Status): New routine.
6242 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
6243 (Known_Null): Moved from Exp_Util.
6244
6245 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6246
6247 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
6248 error on the return type of an expression function that is a
6249 completion, if the type is derived from a generic formal type.
6250
6251 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6252
6253 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
6254 conversion are those of the target type.
6255
6256 2017-04-25 Bob Duff <duff@adacore.com>
6257
6258 * a-clrefi.adb: Minor cleanup.
6259
6260 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6261
6262 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
6263
6264 2017-04-25 Bob Duff <duff@adacore.com>
6265
6266 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
6267 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
6268 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
6269 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
6270 the Internal_Source buffer. This removes the incorrect call to "="
6271 the customer noticed.
6272 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
6273 eventually need to eliminate them altogether. Or else get rid
6274 of zero-origin addressing.
6275
6276 2017-04-25 Claire Dross <dross@adacore.com>
6277
6278 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
6279 function used in GNATprove to know if an expression contains
6280 non-dispatching calls on primitives of a tagged type.
6281
6282 2017-04-25 Bob Duff <duff@adacore.com>
6283
6284 * rtsfind.adb (Initialize): Initialize
6285 First_Implicit_With. Building the compiler with Normalize_Scalars
6286 and validity checking finds this being used as an uninitialized
6287 variable.
6288
6289 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6290
6291 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
6292 Add a warning about SPARK mode management. The routine now
6293 saves and restores both the mode and associated pragma.
6294 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
6295 SPARK mode management. The routine now saves and restores both
6296 the mode and associated pragma.
6297 (Analyze_Object_Contract):
6298 Add a warning about SPARK mode management. The routine
6299 now saves and restores both the mode and associated pragma.
6300 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
6301 management. The routine now saves and restores both the mode
6302 and associated pragma. (Analyze_Package_Contract): Add a warning
6303 about SPARK mode management. The routine now saves and restores
6304 both the mode and associated pragma.
6305 (Analyze_Task_Contract):
6306 Add a warning about SPARK mode management. The routine now saves
6307 and restores both the mode and associated pragma.
6308 * expander.adb (Expand): Change the way the Ghost mode is saved
6309 and restored.
6310 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
6311 saved and restored.
6312 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
6313 and restored.
6314 * exp_util.adb (Build_DIC_Procedure_Body):
6315 Change the way the Ghost mode is saved and restored.
6316 (Build_DIC_Procedure_Declaration): Change the way the Ghost
6317 mode is saved and restored.
6318 (Build_Invariant_Procedure_Body):
6319 Change the way the Ghost mode is saved and restored.
6320 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
6321 mode is saved and restored.
6322 (Make_Predicate_Call): Change the
6323 way the Ghost mode is saved and restored.
6324 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
6325 saved and restored.
6326 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
6327 and its assignment.
6328 (Mark_And_Set_Ghost_Body): Remove parameter
6329 Mode and its assignment.
6330 (Mark_And_Set_Ghost_Completion):
6331 Remove parameter Mode and its assignment.
6332 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
6333 assignment.
6334 (Mark_And_Set_Ghost_Instantiation): Remove parameter
6335 Mode and its assignment.
6336 (Mark_And_Set_Ghost_Procedure_Call):
6337 Remove parameter Mode and its assignment.
6338 (Set_Ghost_Mode):
6339 Remove parameter Mode and its assignment.
6340 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
6341 and update the comment on usage.
6342 (Mark_And_Set_Ghost_Body):
6343 Remove parameter Mode and update the comment on usage.
6344 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
6345 update the comment on usage.
6346 (Mark_And_Set_Ghost_Declaration):
6347 Remove parameter Mode and update the comment on usage.
6348 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
6349 update the comment on usage.
6350 (Mark_And_Set_Ghost_Procedure_Call):
6351 Remove parameter Mode and update the comment on usage.
6352 (Set_Ghost_Mode): Remove parameter Mode and update the comment
6353 on usage.
6354 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
6355 types.
6356 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
6357 of obsolete field SPARK_Mode_Pragma.
6358 (Load_Main_Source): Remove
6359 the assignment of obsolete field SPARK_Mode_Pragma.
6360 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
6361 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
6362 the assignment of obsolete field SPARK_Mode_Pragma.
6363 (Ensure_System_Dependency): Remove the assignment of obsolete
6364 field SPARK_Mode_Pragma.
6365 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
6366 mode management. Change the way Ghost and SPARK modes are saved
6367 and restored.
6368 * sem.adb (Analyze): Change the way the Ghost mode is saved
6369 and restored.
6370 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
6371 Ghost mode is saved and restored.
6372 (Process_Full_View): Change
6373 the way the Ghost mode is saved and restored.
6374 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
6375 mode is saved and restored.
6376 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
6377 mode is saved and restored.
6378 (Analyze_Subprogram_Body_Helper):
6379 Change the way the Ghost mode is saved and restored.
6380 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
6381 Ghost mode is saved and restored.
6382 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
6383 management. Save the SPARK mode-related data prior to any changes
6384 to the scope stack and contexts. The mode is then reinstalled
6385 before the subunit is analyzed in order to restore the original
6386 view of the subunit.
6387 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
6388 warning on region management. Change the way the Ghost and
6389 SPARK modes are saved and restored.
6390 (Inline_Instance_Body):
6391 Add a warning about SPARK mode management. Code clean up.
6392 (Analyze_Subprogram_Instantiation): Update the warning on region
6393 management. Change the way the Ghost and SPARK modes are saved
6394 and restored.
6395 (Instantiate_Package_Body): Update the warning
6396 on region management. Change the way the Ghost and SPARK modes
6397 are saved and restored.
6398 (Instantiate_Subprogram_Body): Update
6399 the warning on region management. Change the way the Ghost and
6400 SPARK modes are saved and restored.
6401 (Set_Instance_Env): Add a
6402 warning about SPARK mode management. Change the way SPARK mode
6403 is saved and restored.
6404 * sem_ch13.adb (Build_Predicate_Functions):
6405 Change the way the Ghost mode is saved and restored.
6406 (Build_Predicate_Function_Declaration): Change the way the Ghost
6407 mode is saved and restored.
6408 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
6409 mode management. Change the way SPARK mode is saved and restored.
6410 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
6411 Change the way the Ghost mode is saved and restored.
6412 (Analyze_Initial_Condition_In_Decl_Part): Change the way
6413 the Ghost mode is saved and restored.
6414 (Analyze_Pragma):
6415 Change the way the Ghost mode is saved and restored.
6416 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
6417 Ghost mode is saved and restored.
6418 * sem_util.adb (Install_SPARK_Mode): New routine.
6419 (Restore_SPARK_Mode): New routine.
6420 (Save_SPARK_Mode_And_Set): Removed.
6421 (Set_SPARK_Mode): New routine.
6422 * sem_util.ads (Install_SPARK_Mode): New routine.
6423 (Restore_SPARK_Mode): New routine.
6424 (Save_SPARK_Mode_And_Set): Removed.
6425 (Set_SPARK_Mode): New routine.
6426
6427 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6428
6429 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
6430 to determine whether a type is declared in a local package that
6431 has not yet been frozen.
6432 * freeze.adb (Freeze_Before): Use new predicate to determine
6433 whether a local package must be installed on the scope stack
6434 in order to evaluate in the proper scope actions generated by
6435 aspect specifications, such as Predicate
6436 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
6437 using new predicate.
6438
6439 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6440
6441 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
6442 comparisons between non- scalar expressions expressions because
6443 their values cannot be invalidated.
6444 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
6445 comment on usage.
6446
6447 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6448
6449 * par_sco.adb: Minor reformatting.
6450
6451 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6452
6453 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
6454 is a type from an unfrozen local package, install package to
6455 complete the analysis of delayed aspects of the type.
6456
6457 2017-04-25 Tristan Gingold <gingold@adacore.com>
6458
6459 * bingen.adb (System_Version_Control_Used): New variable.
6460 (Resolve_Binder_Options): Set the above variable.
6461 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
6462 (Gen_Elab_Order): Emit blank line before.
6463
6464 2017-04-25 Justin Squirek <squirek@adacore.com>
6465
6466 * sem_cat.adb (Validate_RT_RAT_Component): Added
6467 an extra check to ignore incomplete types.
6468
6469 2017-04-25 Thomas Quinot <quinot@adacore.com>
6470
6471 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
6472 bogus circuitry for the case where Name is Predicate.
6473
6474 2017-04-25 Thomas Quinot <quinot@adacore.com>
6475
6476 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
6477 Create SCOs for Predicate aspects in disabled
6478 state initially, to be enabled later on by...
6479 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
6480 SCO for predicate as enabled.
6481
6482 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6483
6484 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
6485 pragmas Warnings Off / On.
6486 * namet.adb (Finalize): Remove now obsolete pair of pragmas
6487 Warnings Off / On.
6488 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
6489 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
6490 consider comparisons between static expressions because their
6491 values cannot be invalidated.
6492 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
6493 Warnings Off / On.
6494 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
6495 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
6496
6497 2017-04-25 Bob Duff <duff@adacore.com>
6498
6499 * sem_elab.adb (In_Task_Activation): Trace internal calls in
6500 task bodies.
6501
6502 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6503
6504 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
6505 typo fixes.
6506
6507 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6508
6509 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
6510 On/Off to defend against a spurious warning in conditional
6511 compilation.
6512 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
6513 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
6514 defend against a spurious warning in conditional compilation.
6515 * output.adb Add a pair of pragma Warnings On/Off to defend
6516 against a spurious warning in conditional compilation.
6517 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
6518 (Fold_General_Op): New routine.
6519 (Fold_Static_Real_Op): New routine.
6520 (Test_Comparison): New routine.
6521 * sem_eval.ads (Test_Comparison): New routine.
6522 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
6523 (Warn_On_Constant_Valid_Condition): New routine.
6524 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
6525 to detect a specific case.
6526 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
6527 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
6528 to defend against a spurious warning in conditional compilation.
6529 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
6530 against a spurious warning in conditional compilation.
6531 * usage.adb Add a pair of pragma Warnings On/Off to defend
6532 against a spurious warning in conditional compilation.
6533
6534 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6535
6536 * sinfo.ads, sem_ch13.adb: Update comment.
6537
6538 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6539
6540 * sem_util.adb (Is_Post_State): A reference to a
6541 generic in out parameter is considered a change in the post-state
6542 of a subprogram.
6543
6544 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6545
6546 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
6547 declaration of a subprogram instance within its wrapper package,
6548 skip over null statements that may result from the rewriting of
6549 ignored pragmas.
6550
6551 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6552
6553 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
6554 If the type is an unchecked_union, replace the attribute with
6555 a Raise_Program_Error (rather than inserting such before the
6556 attribute reference) to handle properly the case where we are
6557 processing a component of a larger record, and we need to prevent
6558 further expansion for the unchecked union.
6559 (Expand_Attribute_Reference, case 'Write): If the type is
6560 an unchecked_union, check whether enclosing scope is a Write
6561 subprogram. Replace attribute with a Raise_Program_Error if the
6562 discriminants of the unchecked_union type have not default values
6563 because such a use is erroneous..
6564
6565 2017-04-25 Tristan Gingold <gingold@adacore.com>
6566
6567 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
6568 Add relative_deadline to task record on edf profile.
6569 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
6570 (Make_Task_Create_Call): Pass relative_deadline value.
6571 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
6572 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
6573 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
6574 * sem_prag.adb (Set_Ravenscar_Profile): Handle
6575 GNAT_Ravenscar_EDF (set scheduling policy).
6576 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
6577 pragma.
6578 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
6579 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
6580 New names.
6581 (Pragma_Deadline_Floor): New pragma.
6582 * targparm.adb (Get_Target_Parameters): Recognize
6583 GNAT_Ravenscar_EDF profile.
6584
6585 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6586
6587 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
6588
6589 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6590
6591 * sem_aux.adb (Nearest_Ancestor): Use original node of type
6592 declaration to locate nearest ancestor, because derived
6593 type declarations for record types are rewritten as record
6594 declarations.
6595 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
6596 properly derivations that are completions of private types.
6597 (Add_Predicates): If type is private, examine rep. items of full
6598 view, which may include inherited predicates.
6599 (Build_Predicate_Functions): Ditto.
6600
6601 2017-04-25 Javier Miranda <miranda@adacore.com>
6602
6603 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
6604 to generate new entities for subtype declarations located in
6605 Expression_With_Action nodes.
6606
6607 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6608
6609 * sem_elab.adb (Check_A_Call): Remove
6610 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
6611 need for Elaborate_All when SPARK elaboration checks are
6612 required. Update the checks for instances, variables, and calls
6613 to Default_Initial_Condition procedures.
6614
6615 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6616
6617 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
6618 into a boolean aspect, in analogy with the Ada aspect No_Return.
6619
6620 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6621
6622 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
6623
6624 2017-04-25 Bob Duff <duff@adacore.com>
6625
6626 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
6627 Is_True_Constant for an array variable that is passed to a
6628 foreign function as an 'in' parameter.
6629 * debug.adb: Document -gnatd.q.
6630
6631 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6632
6633 * sem_ch6.adb (Analyze_Expression_Function): If expression function
6634 is completion and return type is an access type do not freeze
6635 designated type: this will be done in the process of freezing
6636 the expression if needed.
6637 (Freeze_Expr_Types): Check whether type is complete before
6638 creating freeze node, to provide a better error message if
6639 reference is premature.
6640 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
6641 functions created by type derivations.
6642
6643 2017-04-25 Pascal Obry <obry@adacore.com>
6644
6645 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
6646
6647 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6648
6649 * sem_res.adb (Resolve_Type_Conversion):
6650 When resolving against any fixed type, set the type of the
6651 operand as universal real when the operand is a multiplication
6652 or a division where both operands are of any fixed type.
6653 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
6654 placement of an error message by pointing to the operand of a
6655 type conversion rather than the conversion itself.
6656
6657 2017-04-25 Thomas Quinot <quinot@adacore.com>
6658
6659 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
6660 Needs_Debug_Info when producing SCOs.
6661
6662 2017-04-25 Thomas Quinot <quinot@adacore.com>
6663
6664 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
6665 Always pass a null finalization master for a library level named access
6666 type to which a pragme No_Heap_Finalization applies.
6667
6668 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6669
6670 PR ada/78845
6671
6672 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
6673 set to A'First(2) and vice versa.
6674
6675 2017-04-25 Yannick Moy <moy@adacore.com>
6676
6677 * freeze.adb (Freeze_Record_Type): Remove obsolete
6678 rule on volatile tagged record restriction on SPARK code.
6679
6680 2017-04-25 Yannick Moy <moy@adacore.com>
6681
6682 * sem_prag.adb (minor) Fix SPARK RM reference.
6683
6684 2017-04-25 Yannick Moy <moy@adacore.com>
6685
6686 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
6687 comment to reflect which entity is chosen as unique entity.
6688 (Unique_Entity): Return full view instead of private spec for
6689 protected type or task type. Fix possible incorrect access when
6690 called on entry.
6691
6692 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6693
6694 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
6695 array types only instead of all packed array types.
6696
6697 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6698
6699 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
6700 dimension system, verify that dimensions of both match.
6701 (Check_Conformance): Add error message in case of dimension
6702 mismatch.
6703 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
6704 predicate.
6705
6706 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6707
6708 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
6709 confusing.
6710
6711 2017-04-25 Yannick Moy <moy@adacore.com>
6712
6713 * sem_util.adb: Minor refactoring.
6714 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
6715
6716 2017-04-25 Claire Dross <dross@adacore.com>
6717
6718 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
6719 ultimate alias when accessing overridden operation. Indeed, if the
6720 overridden operation is itself inherited, it won't have any explicit
6721 contract.
6722
6723 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6724
6725 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
6726 overlap if the two formals have different types, because formally
6727 the corresponding actuals cannot designate the same objects.
6728
6729 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6730
6731 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
6732 dimensions are present from context, use them. b) If operand is
6733 a static constant rewritten as a literal, obtain the dimensions
6734 from the original declaration, otherwise use dimensions of type
6735 established from context.
6736
6737 2017-04-25 Yannick Moy <moy@adacore.com>
6738
6739 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
6740 of array that is private.
6741
6742 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6743
6744 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
6745 reformatting.
6746
6747 2017-04-25 Yannick Moy <moy@adacore.com>
6748
6749 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
6750 on body.
6751
6752 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6753
6754 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
6755 the check that recognizes a call to a private overridding and
6756 replaces the called subprogram with its alias.
6757
6758 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6759
6760 * exp_util.adb: Minor reformatting.
6761
6762 2017-04-25 Justin Squirek <squirek@adacore.com>
6763
6764 * exp_ch3.adb (Freeze_Type): Add condition to always treat
6765 interface types as a partial view of a private type for the
6766 generation of invariant procedure bodies.
6767 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
6768 Add a condition to get the Corresponding_Record_Type for
6769 concurrent types, add condition to return in the absence of a
6770 class in the pragma, remove call to Replace_Type_References,
6771 and add call to Replace_References.
6772 (Add_Interface_Invariatns),
6773 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
6774 to including the working type T.
6775 (Add_Own_Invariants): Remove
6776 legacy condition for separate units, remove dispatching for ASIS
6777 and save a copy of the expression in the pragma expression.
6778 (Build_Invariant_Procedure_Body): Default initalize vars,
6779 remove return condition on interfaces, always use the
6780 private type for interfaces, and move the processing of types
6781 until after the processing of invariants for the full view.
6782 (Build_Invariant_Procedure_Declaration): Remove condition
6783 to return if an interface type is encountered and add
6784 condition to convert the formal parameter to its class-wide
6785 counterpart if Work_Typ is abstract.
6786 (Replace_Type): Add call to Remove_Controlling_Arguments.
6787 (Replace_Type_Ref): Remove class-wide dispatching for the current
6788 instance of the type.
6789 (Replace_Type_References): Remove parameter "Derived"
6790 (Remove_Controlling_Arguments): Created in order to removing
6791 the controlliong argument from calls to primitives in the case
6792 of the formal parameter being an class-wide abstract type.
6793 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
6794 to the change made to Freeze_Type in exp_ch3. Add a condition
6795 to treat interface types as a partial view.
6796 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
6797 to Build_Invariant_Procedure_Declaration to properly generate a
6798 "partial" invariant procedure when Typ is an interface.
6799
6800 2017-04-25 Bob Duff <duff@adacore.com>
6801
6802 * a-numeri.ads: Go back to using brackets encoding for the Greek
6803 letter pi.
6804
6805 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6806
6807 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
6808 (10-15): if derived type T with progenitors is abstract,
6809 and primitive P of this type inherits non-trivial classwide
6810 preconditions from both a parent operation and from an interface
6811 operation, then the inherited operation is abstract if the parent
6812 operation is not null.
6813 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
6814 with Covered_Interface_Op to yield the actual interface operation
6815 that is implemented by a given inherited operation.
6816
6817 2017-04-25 Javier Miranda <miranda@adacore.com>
6818
6819 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
6820 and right operands after performing the validity checks. Required
6821 because validity checks may remove side effects from the operands.
6822
6823 2017-04-25 Javier Miranda <miranda@adacore.com>
6824
6825 * exp_attr.adb (Attribute_Unrestricted_Access):
6826 Do not disable implicit type conversion. Required to generate
6827 code that displaces the pointer to reference the secondary
6828 dispatch table.
6829
6830 2017-04-25 Pascal Obry <obry@adacore.com>
6831
6832 * prj-attr.adb, snames.ads-tmpl: Add package Install's
6833 Required_Artifacts attribute.
6834
6835 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6836
6837 * sem_util.adb (Same_Value): String literals are compile-time
6838 values, and comparing them must use Expr_Value_S.
6839
6840 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6841
6842 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
6843 dereference is introduced for the object, and the object is
6844 overloaded, do not check whether it is aliased, because it may
6845 include an implicit dereference.
6846 * sem_type.adb (Disambiguate): If two interpretations are access
6847 attribute types with the same designated type keep either of
6848 them and do not report an ambiguity. A true ambiguity will be
6849 reported elsewhere.
6850
6851 2017-04-25 Bob Duff <duff@adacore.com>
6852
6853 * a-numeri.ads: Change the encoding of Greek letter Pi from
6854 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
6855 to indicate the encoding. We considered using a byte order mark
6856 (BOM), but that causes various trouble (misc software eats the
6857 BOM, if you have a patch with a BOM, then it's not at the start
6858 of the patch, so it's not a BOM, the BOM affects with-ing files,
6859 etc.).
6860 * scng.adb, s-wchcnv.adb: Minor.
6861
6862 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6863
6864 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
6865 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6866
6867 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
6868 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
6869 Improve error message on operations that inherit non-conforming
6870 classwide preconditions from ancestor and progenitor.
6871 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
6872 moved here from sem_ch3.
6873 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
6874 check given in RM 6.1.1 (17) concerning renamings of overriding
6875 operations that inherits class-wide preconditions from ancestor
6876 or progenitor.
6877
6878 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6879
6880 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
6881 (Build_Adjust_Statements): Code cleanup.
6882 (Build_Finalizer): Update the initialization of
6883 Exceptions_OK.
6884 (Build_Finalize_Statements): Code cleanup.
6885 (Build_Initialize_Statements): Code cleanup.
6886 (Make_Deep_Array_Body): Update the initialization of
6887 Exceptions_OK.
6888 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
6889 (Process_Object_Declaration): Generate a null exception handler only
6890 when exceptions are allowed.
6891 (Process_Transients_In_Scope): Update the initialization of
6892 Exceptions_OK.
6893 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
6894 routine.
6895 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
6896 restrictions when the handler is internally generated and the
6897 mode is warnings.
6898
6899 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6900
6901 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
6902 enforce legality rule on classwide preconditions inherited from
6903 both an ancestor and a progenitor (RM 6.1.1 (10-13).
6904 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
6905 subprogram need not be dispatching if it appears in a precondition
6906 for an abstract or null subprogram.
6907
6908 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6909
6910 * sem_ch10.adb: Minor typo fix.
6911
6912 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6913
6914 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
6915
6916 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6917
6918 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
6919 have a length which is a power of 2.
6920 (Is_Predefined_File_Name): Likewise. Adjust comment.
6921
6922 2017-04-25 Bob Duff <duff@adacore.com>
6923
6924 * exp_aggr.adb (Component_Count): Protect the
6925 arithmetic from attempting to convert a value >= 2**31 to Int,
6926 which would otherwise raise Constraint_Error.
6927
6928 2017-04-25 Bob Duff <duff@adacore.com>
6929
6930 * opt.ads (Locking_Policy): Fix incorrect documentation. The
6931 first character of the policy name is not unique.
6932
6933 2017-04-25 Bob Duff <duff@adacore.com>
6934
6935 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
6936 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
6937 about this flag not being used. It was already used, and it is
6938 now used more.
6939
6940 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6941
6942 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
6943 (Ignore_SPARK_Mode_Pragmas): New routine.
6944 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
6945 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
6946 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
6947 related entities.
6948 (Ignore_SPARK_Mode_Pragmas): New routine
6949 along with pragma Inline.
6950 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
6951 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
6952 Ignore_SPARK_Mode_Pragmas_In_Instance.
6953 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
6954 Save and restore the value of global flag
6955 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
6956 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
6957 the corresponding spec or the body must ignore all SPARK_Mode
6958 pragmas found within.
6959 (Analyze_Subprogram_Declaration): Mark
6960 the spec when it needs to ignore all SPARK_Mode pragmas found
6961 within to allow the body to infer this property in case it is
6962 instantiated or inlined later.
6963 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
6964 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
6965 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
6966 when the corresponding spec also ignored all SPARK_Mode pragmas
6967 found within.
6968 (Analyze_Package_Declaration): Mark the spec when
6969 it needs to ignore all SPARK_Mode pragmas found within to allow
6970 the body to infer this property in case it is instantiated or
6971 inlined later.
6972 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
6973 Save and restore the value of flag
6974 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
6975 formal spec when it needs to ignore all SPARK_Mode
6976 pragmas found within to allow the body to infer this
6977 property in case it is instantiated or inlined later.
6978 (Analyze_Package_Instantiation): Save and restore the value
6979 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
6980 the instance spec when it needs to ignore all SPARK_Mode
6981 pragmas found within to allow the body to infer this
6982 property in case it is instantiated or inlined later.
6983 (Analyze_Subprogram_Instantiation): Save and restore the value
6984 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
6985 instance spec and anonymous package when they need to ignore
6986 all SPARK_Mode pragmas found within to allow the body to infer
6987 this property in case it is instantiated or inlined later.
6988 (Instantiate_Package_Body): Save and restore the value of global
6989 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
6990 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
6991 corresponding instance spec also ignored all SPARK_Mode pragmas
6992 found within.
6993 (Instantiate_Subprogram_Body): Save and restore the
6994 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
6995 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
6996 when the corresponding instance spec also ignored all SPARK_Mode
6997 pragmas found within.
6998 * sem_prag.adb (Analyze_Pragma): Update the reference to
6999 Ignore_Pragma_SPARK_Mode.
7000 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
7001 all SPARK_Mode pragmas defined within yields mode "off".
7002
7003 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7004
7005 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
7006
7007 2017-04-25 Bob Duff <duff@adacore.com>
7008
7009 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
7010 All_Checks" to avoid generating unnecessary checks.
7011 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
7012 All_Checks".
7013 * sem.ads: Fix comment.
7014 * expander.ads: Fix comment.
7015 * exp_atag.ads: Fix comment: "Index = 0" should be
7016 "Index >= 0".
7017
7018 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7019
7020 * s-taprop-linux.adb: Minor editorial fixes.
7021
7022 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7023
7024 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
7025 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
7026 variable and set it to True whenever the main hash table is
7027 populated. Short- circuit the Assoc function if it is false
7028 and add associated guards.
7029
7030 2017-04-25 Olivier Hainque <hainque@adacore.com>
7031
7032 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
7033 specs without elaboration code that have an elaboration counter
7034 nevertheless, e.g. when compiled with -fpreserve-control-flow.
7035 * sem_ch10.adb (Analyze_Compilation_Unit):
7036 Set_Elaboration_Entity_Required when requested to preserve
7037 control flow, to ensure the unit elaboration is materialized at
7038 bind time, resulting in the inclusion of the unit object file
7039 in the executable closure at link time.
7040
7041 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
7042
7043 * exp_dbug.adb: In Debug_Renaming_Declaration,
7044 when dealing with indexed component, accept to produce a renaming
7045 symbol when the index is an IN parameter or when it is a name
7046 defined in an outer scope.
7047
7048 2017-04-25 Yannick Moy <moy@adacore.com>
7049
7050 * errout.adb (Error_Msg): Adapt continuation
7051 message in instantiations and inlined bodies for info messages.
7052
7053 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7054
7055 * fname.adb (Has_Internal_Extension): Add pragma Inline.
7056 Use direct 4-character slice comparisons.
7057 (Has_Prefix): Add
7058 pragma Inline. (Has_Suffix): Delete.
7059 (Is_Internal_File_Name):
7060 Test Is_Predefined_File_Name first.
7061 (Is_Predefined_File_Name):
7062 Use direct slice comparisons as much as possible and limit all
7063 comparisons to at most 8 characters.
7064
7065 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7066
7067 * checks.adb (Insert_Valid_Check): Code cleanup.
7068 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
7069 (Expand_Actuals): Generate proper copy-back for a validation
7070 variable when it acts as the argument of a type conversion.
7071 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
7072 predicate to operate on type qualifications.
7073
7074 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7075
7076 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
7077 Minor reformatting.
7078
7079 2017-04-25 Bob Duff <duff@adacore.com>
7080
7081 * sem_prag.adb (No_Return): Give an error if the pragma applies
7082 to a body. Specialize the error for the specless body case,
7083 as is done for (e.g.) pragma Convention.
7084 * debug.adb: Add switch -gnatd.J to disable the above legality
7085 checks. This is mainly for use in our test suite, to avoid
7086 rewriting a lot of illegal (but working) code. It might also
7087 be useful to customers. Under this switch, if a pragma No_Return
7088 applies to a body, and the procedure raises an exception (as it
7089 should), the pragma has no effect. If the procedure does return,
7090 execution is erroneous.
7091
7092 2017-04-25 Bob Duff <duff@adacore.com>
7093
7094 * exp_ch6.adb (Expand_Actuals): This is the
7095 root of the problem. It took N as an 'in out' parameter, and in
7096 some cases, rewrote N, but then set N to Original_Node(N). So
7097 the node returned in N had no Parent. The caller continued
7098 processing of this orphaned node. In some cases that caused a
7099 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
7100 and trips over the Empty Parent). The solution is to make N an
7101 'in' parameter. Instead of rewriting it, return the list of
7102 post-call actions, so the caller can do the rewriting later,
7103 after N has been fully processed.
7104 (Expand_Call_Helper): Move most of Expand_Call here. It has
7105 too many premature 'return' statements, and we want to do the
7106 rewriting on return.
7107 (Insert_Post_Call_Actions): New procedure to insert the post-call
7108 actions in the appropriate place. In the problematic case,
7109 that involves rewriting N as an Expression_With_Actions.
7110 (Expand_Call): Call the new procedures Expand_Call_Helper and
7111 Insert_Post_Call_Actions.
7112
7113 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7114
7115 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
7116 properly type derived from generic formal types, to handle
7117 properly modified version of ACATS 4.1B B611017.
7118
7119 2017-04-25 Javier Miranda <miranda@adacore.com>
7120
7121 * exp_unst.adb (Subp_Index): Adding missing
7122 support for renamings and functions that return a constrained
7123 array type (i.e. functions for which the frontend built a
7124 procedure with an extra out parameter).
7125
7126 2017-04-25 Pascal Obry <obry@adacore.com>
7127
7128 * s-string.adb: Minor code clean-up.
7129
7130 2017-04-25 Bob Duff <duff@adacore.com>
7131
7132 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
7133 procedure.
7134 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
7135 function for Non_Blocking_Wait_Process.
7136
7137 2017-04-25 Bob Duff <duff@adacore.com>
7138
7139 * prep.adb (Preprocess): Remove incorrect
7140 Assert. Current character can be ASCII.CR.
7141
7142 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7143
7144 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
7145 convention Stdcall, which has a number of exceptions. Convention
7146 is legal on a component declaration whose type is an anonymous
7147 access to subprogram.
7148
7149 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7150
7151 * sem_ch4.adb: sem_ch4.adb Various reformattings.
7152 (Try_One_Prefix_Interpretation): Use the base type when dealing
7153 with a subtype created for purposes of constraining a private
7154 type with discriminants.
7155
7156 2017-04-25 Javier Miranda <miranda@adacore.com>
7157
7158 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
7159 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
7160 dispatching primitives (Restore_Warnings): Restore warning on
7161 late dispatching primitives (Save_Warnings): Save warning on late
7162 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
7163 to enable/disable this warning.
7164 (WA_Warnings): Set warning on late dispatching primitives.
7165 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
7166 that its parent type has a private extension.
7167 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
7168 New subprogram.
7169 * usage.adb: Document -gnatw.j and -gnatw.J.
7170
7171 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7172
7173 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
7174 reformatting.
7175
7176 2017-04-25 Bob Duff <duff@adacore.com>
7177
7178 * binde.adb (Validate): Do not pass dynamic strings
7179 to pragma Assert, because older compilers do not support that.
7180
7181 2017-04-25 Bob Duff <duff@adacore.com>
7182
7183 * s-fileio.adb (Close): When a temp file is
7184 closed, delete it and clean up its Temp_File_Record immediately,
7185 rather than waiting until later.
7186 (Temp_File_Record): Add File
7187 component, so Close can know which Temp_File_Record corresponds
7188 to the file being closed.
7189 (Delete): Don't delete temp files,
7190 because they are deleted by Close.
7191 (Open): Set the File component
7192 of Temp_File_Record. This requires moving the creation of the
7193 Temp_File_Record to the end, after the AFCB has been created.
7194
7195 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7196
7197 * checks.adb (Insert_Valid_Check): Do not generate
7198 a validity check when inside a generic.
7199
7200 2017-04-25 Yannick Moy <moy@adacore.com>
7201
7202 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
7203
7204 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7205
7206 * snames.ads-tmpl (Snames): More names for detecting predefined
7207 potentially blocking subprograms.
7208
7209 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7210
7211 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
7212 concerning inheritance of class-wide preconditions do not apply
7213 to postconditions.
7214
7215 2017-04-25 Bob Duff <duff@adacore.com>
7216
7217 * s-ficobl.ads: Minor comment fix.
7218
7219 2017-04-25 Yannick Moy <moy@adacore.com>
7220
7221 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
7222 conversions from float to integer in GNATprove mode.
7223 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
7224 to call Apply_Type_Conversion_Checks, so that range checks
7225 are properly positioned when needed on conversions, including
7226 when converting from float to integer. (Determine_Range): In
7227 GNATprove mode, take into account the possibility of conversion
7228 from float to integer.
7229 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
7230 check on conversions from fixed-point to integer, not anymore
7231 on conversions from floating-point to integer, when in GNATprove
7232 mode.
7233
7234 2017-04-25 Yannick Moy <moy@adacore.com>
7235
7236 * checks.adb (Determine_Range_R): Special case type conversions
7237 from integer to float in order to get bounds in that case too.
7238 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
7239 mode, for computations involved in interval checking.
7240
7241 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7242
7243 * checks.adb (Insert_Valid_Check): Partially reimplement validity
7244 checks.
7245 * einfo.adb Node36 is now used as Validated_Object.
7246 (Validated_Object): New routine.
7247 (Set_Validated_Object): New routine.
7248 (Write_Field36_Name): Add an entry for Validated_Object.
7249 * einfo.ads Add new attribute Validated_Object along with
7250 usage in entities.
7251 (Validated_Object): New routine along with pragma Inline.
7252 (Set_Validated_Object): New routine along with pragma Inline.
7253 * exp_attr.adb (Make_Range_Test): Add processing for validation
7254 variables to avoid extra reads and copies of the prefix.
7255 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
7256 variables in order to reflect any changes done in the variable
7257 back into the original object.
7258 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
7259 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
7260
7261 2017-04-25 Steve Baird <baird@adacore.com>
7262
7263 * exp_ch7.adb (Build_Array_Deep_Procs,
7264 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
7265 generate Finalize_Address routines for CodePeer.
7266
7267 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7268
7269 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
7270 Analyze_Pre_Post_Condition, to implement the legality checks
7271 mandated by AI12-0131: Pre'Class shall not be specified for an
7272 overriding primitive subprogram of a tagged type T unless the
7273 Pre'Class aspect is specified for the corresponding primitive
7274 subprogram of some ancestor of T.
7275
7276 2017-04-25 Bob Duff <duff@adacore.com>
7277
7278 * sem_ch8.adb (Use_One_Type): If a use_type_clause
7279 is redundant, set its Used_Operations to empty. This is only
7280 necessary for use clauses that appear in the parent of a generic
7281 child unit, because those use clauses get reanalyzed when we
7282 instantiate the generic, and we don't want the Used_Operations
7283 carried over from the original context (where it was probably
7284 not redundant).
7285
7286 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7287
7288 * exp_ch6.adb: Minor reformatting.
7289
7290 2017-04-25 Bob Duff <duff@adacore.com>
7291
7292 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
7293 Use Source_Index (Current_Sem_Unit) to find the correct casing.
7294 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
7295 (Current_Sem_Unit) to find the correct casing.
7296 * par.adb (Par): Null out Current_Source_File, to ensure that
7297 the above bugs won't rear their ugly heads again.
7298
7299 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7300
7301 * sem_ch8.adb (Find_Type): For an attribute reference
7302 'Class, if prefix type is synchronized and previous errors
7303 have suppressed the creation of the corresponding record type,
7304 create a spurious class-wide for the synchonized type itself,
7305 to catch other misuses of the attribute
7306
7307 2017-04-25 Steve Baird <baird@adacore.com>
7308
7309 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
7310 is True, then don't generate the accessibility check for the
7311 tag of a tagged result.
7312 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
7313 if CodePeer_Mode is True, then don't generate the
7314 tag checks for the result of call to an instance of
7315 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
7316 descendant of" check and the accessibility check).
7317
7318 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7319
7320 * sem_ch13.adb: Code cleanups.
7321 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
7322 * sem_ch8.ads: Minor comment fix.
7323
7324 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7325
7326 * exp_ch4.adb (Library_Level_Target): New function.
7327 (Expand_Concatenate): When optimization is enabled, also expand
7328 the operation out-of-line if the concatenation is present within
7329 the expression of the declaration of a library-level object and
7330 not only if it is the expression of the declaration.
7331
7332 2017-04-25 Bob Duff <duff@adacore.com>
7333
7334 * freeze.adb (Freeze_Object_Declaration): Do
7335 not Remove_Side_Effects if there is a pragma Linker_Section,
7336 because in that case we want static initialization in the
7337 appropriate section.
7338
7339 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7340
7341 * exp_dbug.adb: Minor rewording and reformatting.
7342
7343 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7344
7345 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
7346 handle the proposed changes to rules concerning potentially
7347 unevaluated expressions, to include selected components that
7348 do not depend on discriminants, and indexed components with
7349 static indices.
7350 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
7351 predicate in quantified expression, and fix bugs in the handling
7352 of case expressions and membership test.
7353 (Analyze_Attribute_Old_Result): use new predicate.
7354 (Analyze_Attribute, case Loop_Entry): ditto.
7355
7356 2017-04-25 Bob Duff <duff@adacore.com>
7357
7358 * s-secsta.adb (SS_Info): Add a comment
7359 explaining why we don't need to walk all the chunks in order to
7360 compute the total size.
7361
7362 2017-04-25 Bob Duff <duff@adacore.com>
7363
7364 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
7365 of the global name buffer to 4*Max_Line_Length.
7366
7367 2017-04-25 Javier Miranda <miranda@adacore.com>
7368
7369 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
7370 renaming entity for debug information, mark the entity as needing debug
7371 info if it comes from sources.
7372
7373 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7374
7375 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
7376 restriction converning the use of 'Address where the prefix is
7377 of a controlled type.
7378
7379 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
7380
7381 * exp_dbug.adb: In Debug_Renaming_Declaration,
7382 skip slices that are made redundant by an indexed component
7383 access.
7384 * atree.h: New definition for Original_Node.
7385
7386 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7387
7388 * sem_prag.adb, sem_prag.ads: Minor reformatting.
7389
7390 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7391
7392 * sem_ch3.adb (Check_Entry_Contract): Call
7393 Preanalyze_Spec_Expression so that resolution takes place as well.
7394 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
7395 internal calls that appear in preconditions of protected
7396 operations, in default values for same, and in contract guards
7397 for contract cases in SPARK.
7398
7399 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7400
7401 * a-numaux.ads: Fix description of a-numaux-darwin
7402 and a-numaux-x86.
7403 (Double): Define to Long_Float.
7404 * a-numaux-vxworks.ads (Double): Likewise.
7405 * a-numaux-darwin.ads
7406 (Double): Likewise.
7407 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
7408 * a-numaux-x86.ads: Fix package description.
7409 * a-numaux-x86.adb (Is_Nan): Minor tweak.
7410 (Reduce): Adjust and complete description. Call Is_Nan instead of
7411 testing manually. Use an integer temporary to hold rounded value.
7412 * a-numaux-darwin.adb (Reduce): Likewise.
7413 (Is_Nan): New function.
7414
7415 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7416
7417 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
7418 on analysis of prefix whose type is a current instance of a
7419 synchronized type, but where the prefix itself is an entity that
7420 is an object.
7421
7422 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7423
7424 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
7425 the identity of callable entities therein, because they have been
7426 properly resolved, and prefixed calls may have been rewritten
7427 as normal calls.
7428
7429 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
7430
7431 * exp_ch3.adb (Build_Init_Statements): Convert
7432 the expression of the pragma/aspect Secondary_Stack_Size to
7433 internal type System.Parameters.Size_Type before assigning
7434 it to the Secondary_Stack_Size component of the task type's
7435 corresponding record.
7436
7437 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7438
7439 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
7440 (etc) optimizations when the type is modular and the offsets
7441 are equal.
7442
7443 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7444
7445 * s-osinte-freebsd.ads: Minor comment tweaks
7446
7447 2017-04-25 Javier Miranda <miranda@adacore.com>
7448
7449 * urealp.adb (UR_Write): Reverse previous patch
7450 adding documentation on why we generate multiplications instead
7451 of divisions (needed to avoid expressions whose computation with
7452 large numbers may cause division by 0).
7453
7454 2017-04-25 Bob Duff <duff@adacore.com>
7455
7456 * erroutc.adb (Set_Specific_Warning_Off,
7457 Set_Warnings_Mode_Off): Use the correct source file for
7458 Stop. Was using Current_Source_File, which is only valid during
7459 parsing. Current_Source_File will have a leftover value from
7460 whatever file happened to be parsed last, because of a with_clause
7461 or something.
7462
7463 2017-04-25 Bob Duff <duff@adacore.com>
7464
7465 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
7466 to In_Predefined_Unit, but including GNAT units.
7467 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
7468 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
7469 because Should_Ignore_Pragma was not working reliably outside
7470 the parser, because Current_Source_File is not valid.
7471 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
7472 * par-prag.adb: Call Should_Ignore_Pragma_Par.
7473
7474 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7475
7476 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
7477 codepeer mode.
7478
7479 2017-04-25 Javier Miranda <miranda@adacore.com>
7480
7481 * urealp.adb (UR_Write): Fix output of constants with a base other
7482 that 10.
7483
7484 2017-04-25 Justin Squirek <squirek@adacore.com>
7485
7486 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
7487 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
7488 Add extra parameter for Process_Interface_Name.
7489 (Process_Interface_Name): Add parameter for pragma to analyze
7490 corresponding aspect.
7491 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
7492 from sem_ch13.adb
7493
7494 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7495
7496 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
7497 correction.
7498
7499 2017-04-25 Yannick Moy <moy@adacore.com>
7500
7501 * sem_res.adb (Resolve_Comparison_Op): Do not
7502 attempt evaluation of relational operations inside assertions.
7503
7504 2017-04-25 Justin Squirek <squirek@adacore.com>
7505
7506 * exp_util.adb (Add_Interface_Invariants):
7507 Restored, code moved back from Build_Invariant_Procedure_Body.
7508 (Add_Parent_Invariants): Restored, code moved back from
7509 Build_Invariant_Procedure_Body.
7510 (Build_Invariant_Procedure_Body):
7511 Remove refactored calls and integrated code from
7512 Add_Parent_Invariants and Add_Interface_Invariants.
7513
7514 2017-04-25 Johannes Kanig <kanig@adacore.com>
7515
7516 * errout.adb (Output_Messages): Adjust computation of total
7517 errors
7518 * erroutc.adb (Error_Msg): In statistics counts, deal
7519 correctly with informational messages that are not warnings.
7520 * errutil.adb (Finalize): adjust computation of total errors.
7521
7522 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7523
7524 * terminals.c (__gnat_terminate_pid): New.
7525 * g-exptty.ads (Terminate_Process): New. Update comments.
7526
7527 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7528
7529 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
7530
7531 2017-04-25 Justin Squirek <squirek@adacore.com>
7532
7533 * sem_ch3.adb (Analyze_Declarations): Minor
7534 correction to comments, move out large conditional and scope
7535 traversal into a predicate.
7536 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
7537 logic.
7538
7539 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7540
7541 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
7542 of prefix whose type is a current instance of a synchronized
7543 type. If the prefix is an object this is an external call (or
7544 requeue) that can only access public operations of the object. The
7545 previous predicate was too restrictive, and did not allow public
7546 protected operations, only task entries.
7547
7548 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7549
7550 * sem_ch5.adb, fname.adb: Minor reformatting.
7551
7552 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7553
7554 * einfo.adb (Is_Anonymous_Access_Type): New routine.
7555 * einfo.ads Update the placement of
7556 E_Anonymous_Access_Subprogram_Type along with all subtypes that
7557 mention the ekind.
7558 (Is_Anonymous_Access_Type): New routine.
7559 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
7560 master for an access type subject to pragma No_Heap_Finalization.
7561 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
7562 allocated or deallocated does not finalization actions if the
7563 associated access type is subject to pragma No_Heap_Finalization.
7564 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
7565 * par-prag.adb Pragma No_Heap_Finalization does not need special
7566 processing from the parser.
7567 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
7568 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
7569 * sem_prag.adb Add an entry in table Sig_Flags for pragma
7570 No_Heap_Finalization.
7571 (Analyze_Pragma): Add processing for
7572 pragma No_Heap_Finalization. Update various error messages to
7573 use Duplication_Error.
7574 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
7575 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
7576 and corresponding pragma id.
7577
7578 2017-04-25 Bob Duff <duff@adacore.com>
7579
7580 * freeze.adb (Freeze_Record_Type): Use the
7581 underlying type of the component type to determine whether it's
7582 elementary. For representation clause purposes, a private type
7583 should behave the same as its full type.
7584 * fname.ads, fname.adb (Is_Predefined_File_Name):
7585 Make sure things like "system.ali" are recognized as predefined.
7586
7587 2017-04-25 Javier Miranda <miranda@adacore.com>
7588
7589 * debug.adb: Update documentation of -gnatd.6.
7590
7591 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7592
7593 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
7594 element iterator when the name is an overloaded function call,
7595 one of whose interpretations yields an array.
7596
7597 2017-04-25 Bob Duff <duff@adacore.com>
7598
7599 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
7600 Is_Internal_Unit_Name): New functions for operating on unit
7601 names, as opposed to file names. There's some duplicated code
7602 with fname.adb, which is unfortunate, but it seems like we don't
7603 want to add dependencies here.
7604 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
7605 to Is_Predefined_Unit_Name; the former was wrong, because Uname
7606 is not a file name at all.
7607 * fname.ads, fname.adb: Document the fact that
7608 Is_Predefined_File_Name and Is_Internal_File_Name can be called
7609 for ALI files, and fix the code so it works properly for ALI
7610 files. E.g. these should return True for "system.ali".
7611
7612 2017-04-25 Justin Squirek <squirek@adacore.com>
7613
7614 * exp_util.adb (Add_Invariant): Removed,
7615 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
7616 and Add_Own_Invariant. (Add_Invariant_Check): Used
7617 for adding runtime checks from any kind of invariant.
7618 (Add_Inherited_Invariant): Generates invariant checks for
7619 class-wide invariants (Add_Interface_Invariants): Removed, code
7620 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
7621 Create a types own invariant procedure (Add_Parent_Invariants):
7622 Removed, code moved to Build_Invariant_Procedure_Body
7623 (Build_Invariant_Procedure_Body): Add refactored calls
7624 and integrated code from Add_Parent_Invariants and
7625 Add_Interface_Invariants.
7626 (Process_Type): Removed, the
7627 relavant code was inlined into both Add_Own_Invariant and
7628 Add_Inherited_Invariant.
7629
7630 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7631
7632 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
7633 scn.adb, osint.adb, fname.adb: Minor reformatting.
7634
7635 2017-04-25 Pascal Obry <obry@adacore.com>
7636
7637 * s-taprop-mingw.adb: Do not check for CloseHandle in
7638 Finalize_TCB.
7639
7640 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7641
7642 * sem_util.adb (Check_Part_Of_Reference):
7643 Continue to examine the context if the reference appears within
7644 an expression function.
7645
7646 2017-04-25 Justin Squirek <squirek@adacore.com>
7647
7648 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
7649 and Build_Invariant_Procedure_Declaration.
7650 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
7651 and Build_Invariant_Procedure_Declaration from exp_ch7
7652 and break-out Is_Untagged_Private_Derivation from
7653 Build_Invariant_Procedure_Body.
7654 (Replace_Type_References):
7655 Append an extra parameter to allow for dispatching replacements
7656 and add the corrasponding logic.
7657 (Type_Invariant): Remove
7658 Replace_Typ_Refs and replace its references with calls to
7659 Replace_Type_References.
7660 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
7661
7662 2017-04-25 Bob Duff <duff@adacore.com>
7663
7664 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
7665 that returns True when appropriate.
7666 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
7667 when compiling predefined files.
7668 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
7669 "gnat.adc" should not be considered a predefined file name.
7670 That required (or at least encouraged) a lot of cleanup of global
7671 variable usage. We shouldn't be communicating information via
7672 the global name buffer.
7673 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
7674 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
7675 required by the above-mentioned cleanup.
7676
7677 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7678
7679 * osint.adb (Find_File): Handle properly a request for a
7680 configuration file whose name is a directory.
7681
7682 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7683
7684 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
7685
7686 2017-04-25 Bob Duff <duff@adacore.com>
7687
7688 * types.ads: Minor: Fix '???' comment.
7689 * sem_ch8.adb: Minor comment fix.
7690
7691 2017-04-25 Bob Duff <duff@adacore.com>
7692
7693 * sem_prag.adb: Remove suspicious uses of Name_Buf.
7694 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
7695 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
7696 Add String_To_Name with no side effects.
7697
7698 2017-04-25 Justin Squirek <squirek@adacore.com>
7699
7700 * sem_ch3.adb (Analyze_Declarations): Add
7701 additional condition for edge case.
7702
7703 2017-04-25 Bob Duff <duff@adacore.com>
7704
7705 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
7706 reserved words inside pragmas. This is necessary to allow the
7707 pragma name Interface to be used in pragma Ignore_Pragma.
7708 * par.adb: Minor comment fix.
7709
7710 2017-04-25 Javier Miranda <miranda@adacore.com>
7711
7712 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
7713 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
7714 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
7715 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
7716 occurrences of RE_Type_Is_Abstract
7717
7718 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7719
7720 * exp_util.adb (Build_Chain): Account for ancestor
7721 subtypes while traversing the derivation chain.
7722
7723 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7724
7725 * sem_attr.adb: minor reformatting.
7726
7727 2017-04-25 Doug Rupp <rupp@adacore.com>
7728
7729 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
7730
7731 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7732
7733 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
7734 the first pass over an assignment statement with target names,
7735 to prevent the generation of subtypes (such as discriminated
7736 record components)that may carry the target name outside of the
7737 tree for the assignment. The subtypes will be generated when
7738 the assignment is reanalyzed in full.
7739 (Analyze_Target_Name): Handle properly class-wide types.
7740
7741 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7742
7743 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
7744 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
7745 the purposes of freezing.
7746 * exp_util.adb Update the documentation and structure of the
7747 type map used in class-wide semantics of assertion expressions.
7748 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
7749 and resolve the triaged expression because all substitutions
7750 refer to the proper entities. Update the replacement of
7751 references.
7752 (Build_DIC_Procedure_Body): Add formal parameter
7753 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
7754 are now only processed when freezing occurs. Build a body only
7755 when one is needed.
7756 (Entity_Hash): Removed.
7757 (Map_Types): New routine.
7758 (Replace_Object_And_Primitive_References): Removed.
7759 (Replace_References): New routine.
7760 (Replace_Type_References): Moved to the library level of Exp_Util.
7761 (Type_Map_Hash): New routine.
7762 (Update_Primitives_Mapping): Update the mapping call.
7763 (Update_Primitives_Mapping_Of_Types): Removed.
7764 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
7765 parameter For_Freeze and update the comment on usage.
7766 (Map_Types): New routine.
7767 (Replace_References): New routine.
7768 (Replace_Type_References): Moved to the library level of Exp_Util.
7769 (Update_Primitives_Mapping_Of_Types): Removed.
7770 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
7771 properties of the private type to the full view in case the full
7772 view derives from a parent type and inherits a DIC pragma.
7773 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
7774 DIC pragma is placed at the top of a declarative region.
7775
7776 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7777
7778 * a-tasatt.adb: Complete previous change and use an unsigned
7779 int to avoid overflow checks.
7780
7781 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7782
7783 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
7784 the error message when the attribute reference is an actual in
7785 a call to a subprogram inherited from a generic formal type with
7786 unknown discriminants, which makes the subprogram and its formal
7787 parameters intrinsic (see RM 6.3.1 (8) and (13)).
7788
7789 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7790
7791 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
7792 sem_prag.adb: Minor reformatting.
7793
7794 2017-04-25 Bob Duff <duff@adacore.com>
7795
7796 * sem_attr.adb (Type_Key): Add code in the
7797 recursive Compute_Type_Key to protect against fetching the source
7798 code for Standard, in case a component of the type is declared
7799 in Standard. There was already code to do this for the original
7800 type, but not for its components.
7801
7802 2017-04-25 Javier Miranda <miranda@adacore.com>
7803
7804 * exp_ch3.adb (Build_Initialization_Call): Handle
7805 subtypes of private types when searching for the underlying full
7806 view of a private type.
7807
7808 2017-04-25 Javier Miranda <miranda@adacore.com>
7809
7810 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
7811 real conditional expression can appear in a fixed-type context
7812 and must be resolved with that context to facilitate the code
7813 generation to the backend.
7814
7815 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7816
7817 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
7818 to indicate whether during inline processing, when some unit U1
7819 appears in the context of a unit U2 compiled for instantiation
7820 or inlining purposes, the body of U1 needs to be compiled as well.
7821 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
7822 context is a package declaration.
7823 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
7824 Analyze_Generic_Package_Declaration): ditto.
7825 * inline.adb (Analyze_Inlined_Bodies): Check
7826 Body_Needed_For_Inlining.
7827
7828 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7829
7830 * par.adb (Current_Assign_Node): Global variable use to record
7831 the presence of a target_name in the right hand side of the
7832 assignment being parsed.
7833 * par-ch4.adb (P_Name): If the name is a target_name, mark the
7834 enclosing assignment node accordingly.
7835 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
7836 appropriately.
7837 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
7838 analyzing RHS if the statement has target_names.
7839 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
7840 properly choices that are subtype marks.
7841 * exp_ch5.adb: Code cleanup.
7842
7843 2017-04-25 Bob Duff <duff@adacore.com>
7844
7845 * s-memory.adb: Add a comment regarding efficiency.
7846 * atree.adb: Fix the assertion, and combine 2 assertions into one,
7847 "the source has an extension if and only if the destination does."
7848 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
7849
7850 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7851
7852 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
7853 conversion.
7854
7855 2017-04-25 Doug Rupp <rupp@adacore.com>
7856
7857 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
7858 handling for ppc64-vx7.
7859 * sigtramp-vxworks-target.inc
7860 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
7861
7862 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7863
7864 * ada_get_targ.adb: New file.
7865
7866 2017-04-25 Bob Duff <duff@adacore.com>
7867
7868 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
7869 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
7870 (UI_GCD): Remove ??? comment involving possible efficiency
7871 improvements. This just isn't important after all these years.
7872 Also minor cleanup.
7873 * uintp.ads: Minor cleanup.
7874
7875 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7876
7877 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
7878 Revert previous changes.
7879 * scng.adb: Minor reformatting.
7880 * s-stratt.ads: Fix unbalanced parens in comment.
7881
7882 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7883
7884 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
7885 Minor reformatting.
7886
7887 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7888
7889 * scng.adb (Scan): Handle '@' appropriately.
7890 * sem_ch5.adb: Code cleanup.
7891
7892 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7893
7894 * freeze.adb (Check_Expression_Function): Do not check for the
7895 use of deferred constants if the freezing of the expression
7896 function is triggered by its generated body, rather than a
7897 premature use.
7898
7899 2017-04-25 Javier Miranda <miranda@adacore.com>
7900
7901 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
7902 subtypes of private types when performing the view conversion.
7903
7904 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7905
7906 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
7907 the purposes of freezing.
7908 * exp_util.adb Update the documentation and structure of the
7909 type map used in class-wide semantics of assertion expressions.
7910 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
7911 and resolve the triaged expression because all substitutions
7912 refer to the proper entities. Update the replacement of
7913 references.
7914 (Build_DIC_Procedure_Body): Add formal parameter
7915 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
7916 are now only processed when freezing occurs. Build a body only
7917 when one is needed.
7918 (Entity_Hash): Removed.
7919 (Map_Types): New routine.
7920 (Replace_Object_And_Primitive_References): Removed.
7921 (Replace_References): New routine.
7922 (Replace_Type_References): Moved to the library level of Exp_Util.
7923 (Type_Map_Hash): New routine.
7924 (Update_Primitives_Mapping): Update the mapping call.
7925 (Update_Primitives_Mapping_Of_Types): Removed.
7926 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
7927 parameter For_Freeze and update the comment on usage.
7928 (Map_Types): New routine.
7929 (Replace_References): New routine.
7930 (Replace_Type_References): Moved to the library level of Exp_Util.
7931 (Update_Primitives_Mapping_Of_Types): Removed.
7932 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
7933 properties of the private type to the full view in case the full
7934 view derives from a parent type and inherits a DIC pragma.
7935 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
7936 DIC pragma is placed at the top of a declarative region.
7937
7938 2017-04-25 Tristan Gingold <gingold@adacore.com>
7939
7940 * s-mmap.ads (Data): Add pragma Inline.
7941
7942 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7943
7944 * checks.adb (Insert_Valid_Check): Do not use
7945 a renaming to alias a volatile name because this will lead to
7946 multiple evaluations of the volatile name. Use a constant to
7947 capture the value instead.
7948
7949 2017-04-25 Doug Rupp <rupp@adacore.com>
7950
7951 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
7952
7953 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7954
7955 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
7956 Add out parameter to indicate to caller that a wrapper must
7957 be constructed for an inherited primitive whose inherited
7958 pre/postcondition has called to overridden primitives.
7959 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
7960 for inherited primitive that requires it.
7961 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
7962 legal primitive operations and belong to the list of bodies
7963 generated after the freeze point of a type.
7964 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
7965 of Build_Class_Wide_Expression.
7966 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
7967 to construct the specification of the wrapper subprogram created
7968 for an inherited operation.
7969
7970 2017-04-25 Bob Duff <duff@adacore.com>
7971
7972 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
7973 pthread_mutexattr_setprioceiling): Add new interfaces for these
7974 pthread operations.
7975 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
7976 protocols as appropriate for Locking_Policy 'C' and 'I'.
7977 * s-taprop-posix.adb: Minor reformatting to make it more similar
7978 to s-taprop-linux.adb.
7979
7980 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7981
7982 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
7983 Handle properly a multi- level derivation involving both renamed
7984 and constrained parent discriminants, when the type to be
7985 constrained has fewer discriminants that the ultimate ancestor.
7986
7987 2017-04-25 Bob Duff <duff@adacore.com>
7988
7989 * sem_util.adb (Is_Object_Reference): In the
7990 case of N_Explicit_Dereference, return False if it came from a
7991 conditional expression.
7992
7993 2017-04-25 Bob Duff <duff@adacore.com>
7994
7995 * par-ch4.adb (P_Case_Expression): If a semicolon
7996 is followed by "when", assume that ";" was meant to be ",".
7997
7998 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7999
8000 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
8001 fixes.
8002
8003 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8004
8005 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
8006 loading of an entity.
8007 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
8008 previously repeated in the analysis.
8009 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
8010 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
8011 use new procedure SPARK_Implicit_Load.
8012 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
8013 SPARK_Implicit_Load.
8014
8015 2017-04-25 Javier Miranda <miranda@adacore.com>
8016
8017 * sem_util.adb (New_Copy_Tree): By default
8018 copying of defining identifiers is prohibited because
8019 this would introduce an entirely new entity into the
8020 tree. This patch introduces an exception to this general
8021 rule: the declaration of constants and variables located in
8022 Expression_With_Action nodes.
8023 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
8024 (In_Map): New subprogram.
8025 (Visit_Entity): New subprogram.
8026 (Visit_Node): Handle EWA_Level,
8027 EWA_Inner_Scope_Level, and take care of defining entities defined
8028 in Expression_With_Action nodes.
8029
8030 2017-04-25 Thomas Quinot <quinot@adacore.com>
8031
8032 * exp_ch6.adb: minor comment edit.
8033 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
8034 procedure specifications that come from source.
8035 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
8036 Null_Statement attribute.
8037 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
8038 procedure, generate statement SCO for the generated NULL statement.
8039 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
8040 parser, if available.
8041
8042 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8043
8044 * system-linux-s390.ads: Use Long_Integer'Size to define
8045 Memory_Size.
8046
8047 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
8048
8049 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
8050
8051 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
8052
8053 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
8054 * g-socket.adb (To_Host_Entry): Fix typo in comment.
8055 * gnat_ugn.texi: Fix typo.
8056 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
8057 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
8058 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
8059 * sem_util.adb (Mark_Coextensions): Likewise.
8060 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
8061
8062 2017-03-28 Andreas Schwab <schwab@suse.de>
8063
8064 PR ada/80117
8065 * system-linux-aarch64-ilp32.ads: New file.
8066 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
8067 from LIBGNAT_TARGET_PAIRS.
8068 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
8069 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
8070 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
8071 or -mabi=ilp32, resp.
8072
8073 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
8074
8075 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
8076
8077 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
8078
8079 PR ada/79903
8080 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
8081
8082 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
8083
8084 PR ada/79945
8085 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
8086
8087 * system-linux-arm.ads (Default_Bit_Order): Likewise.
8088 * system-linux-mips.ads (Default_Bit_Order): Likewise.
8089 * system-linux-armeb.ads: Delete.
8090 * system-linux-mipsel.ads: Likewise.
8091 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
8092 (ARM/Linux): Likewise.
8093
8094 2017-02-24 Jakub Jelinek <jakub@redhat.com>
8095
8096 PR c/79677
8097 * gcc-interface/misc.c (gnat_handle_option): Pass true to
8098 handle_generated_option GENERATED_P.
8099
8100 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8101
8102 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
8103 around a justified modular type if it doesn't have the same scalar
8104 storage order as the enclosing record type.
8105
8106 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8107
8108 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
8109 of boolean rvalues to function calls.
8110
8111 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8112
8113 * gcc-interface/utils.c (fold_bit_position): New function.
8114 (rest_of_record_type_compilation): Call it instead of bit_position to
8115 compute the field position and remove the call to remove_conversions.
8116 (compute_related_constant): Factor out the multiplication in both
8117 operands, if any, and streamline the final test.
8118
8119 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8120
8121 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
8122
8123 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8124
8125 * gcc-interface/decl.c: Include demangle.h.
8126 (is_cplusplus_method): Return again true for a primitive operation
8127 only if it is dispatching. For a subprogram with an interface name,
8128 call the demangler to get the number of C++ parameters and compare it
8129 with the number of Ada parameters.
8130
8131 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8132
8133 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
8134 there is no end label, put the location of the At_End procedure on
8135 the call to the procedure.
8136
8137 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8138
8139 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
8140 value for array types with TYPE_INDEX_TYPE set on their domain type.
8141 * gcc-interface/utils.c (max_size): For operations and expressions, do
8142 not build a new node if the operands have not changed or are missing.
8143
8144 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8145
8146 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
8147 argument when recursing on TRUTH_NOT_EXPR.
8148
8149 2017-02-12 John Marino <gnugcc@marino.st>
8150
8151 * system-freebsd-x86.ads: Rename into...
8152 * system-freebsd.ads: ...this.
8153 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
8154 * gcc-interface/Makefile.in: Support aarch64-freebsd.
8155 (x86-64/FreeBSD): Adjust to above renaming.
8156 (i386/FreeBSD): Likewise.
8157
8158 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
8159
8160 * comperr.adb: Update FSF bug reporting URL.
8161
8162 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
8163 Jakub Jelinek <jakub@redhat.com>
8164
8165 PR ada/79309
8166 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
8167
8168 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
8169
8170 PR lto/79061
8171 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
8172 to build_translation_unit_decl.
8173
8174 2017-01-23 Javier Miranda <miranda@adacore.com>
8175
8176 * sem_util.adb (New_Copy_Tree): Code cleanup:
8177 removal of the internal map (ie. variable Actual_Map, its
8178 associated local variables, and all the code handling it).
8179 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
8180 force loading of the System package when processing a task type.
8181 (Analyze_Protected_Type_Declaration): in GNATprove mode force
8182 loading of the System package when processing a protected type.
8183 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
8184 force loading of the System package when processing compilation
8185 unit with a main-like subprogram.
8186 * frontend.adb (Frontend): remove forced loading of the System
8187 package.
8188
8189 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8190
8191 * sem_prag.adb (Default_Initial_Condition): If the desired type
8192 declaration is a derived type declaration with discriminants,
8193 it is rewritten as a private type declaration.
8194 * sem_ch13.adb (Replace_Type_References_Generic,
8195 Visible_Component): A discriminated private type with descriminnts
8196 has components that must be rewritten as selected components
8197 if they appear as identifiers in an aspect expression such as
8198 a Default_Initial_Condition.
8199 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
8200 nodes.
8201
8202 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8203
8204 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
8205 * gnat1drv.adb Generate an empty object file for an ignored
8206 Ghost compilation unit.
8207 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
8208
8209 2017-01-23 Yannick Moy <moy@adacore.com>
8210
8211 * sem_ch4.adb (Analyze_Indexed_Component_Form):
8212 Adapt to inlined prefix with string literal subtype.
8213 * inline.adb (Expand_Inlined_Call): Keep unchecked
8214 conversion inside inlined call when formal type is constrained.
8215
8216 2017-01-23 Javier Miranda <miranda@adacore.com>
8217
8218 * sem_util.adb (New_Copy_Tree): Code cleanup:
8219 removal of global variables. All the global variables, global
8220 functions and tables of this subprogram are now declared locally.
8221
8222 2017-01-23 Gary Dismukes <dismukes@adacore.com>
8223
8224 * exp_strm.ads: Minor reformatting and typo fixes.
8225
8226 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8227
8228 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
8229 exp_aggr.adb: Minor reformatting.
8230 * g-diopit.adb: minor grammar/punctuation fix in comment.
8231 * g-byorma.ads: minor fix of unbalanced parens in comment.
8232
8233 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8234
8235 * par.adb: Update the documentation of component Labl.
8236 * par-ch6.adb (P_Return_Statement): Set the expected label of
8237 an extended return statement to Error.
8238
8239 2017-01-23 Tristan Gingold <gingold@adacore.com>
8240
8241 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
8242
8243 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8244
8245 * expander.adb: Handle N_Delta_Aggregate.
8246
8247 2017-01-23 Javier Miranda <miranda@adacore.com>
8248
8249 * exp_ch6.adb (Expand_Call): Improve the code that
8250 checks if some formal of the called subprogram is a class-wide
8251 interface, to handle subtypes of class-wide interfaces.
8252
8253 2017-01-23 Javier Miranda <miranda@adacore.com>
8254
8255 * checks.adb (Apply_Parameter_Aliasing_Checks):
8256 Remove side effects of the actuals before generating the overlap
8257 check.
8258
8259 2017-01-23 Justin Squirek <squirek@adacore.com>
8260
8261 * exp_strm.ads, exp_strm.ads
8262 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
8263 as to avoid getting the underlying type by default.
8264 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
8265 underlying type in the Iiput and output attribute cases when
8266 building their respective functions.
8267
8268 2017-01-23 Gary Dismukes <dismukes@adacore.com>
8269
8270 * scng.adb: Minor reformatting of error message.
8271
8272 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8273
8274 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
8275 to freeze the return type of an expression funxtion that is a
8276 completion, if the type is a limited view and the non-limited
8277 view is available.
8278
8279 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8280
8281 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
8282 aggregate construct.
8283 (P_Record_Or_Array_Component_Association): An array aggregate
8284 can start with an Iterated_Component_Association.
8285 * scng.adb: Modify error message on improper use of @ in earlier
8286 versions of the language.
8287 * sinfo.ads: New node kind N_Delta_Aggregate.
8288 * sinfo.adb: An N_Delta_Aggregate has component associations and
8289 an expression.
8290 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
8291 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
8292 Create a new index for each one of the choices in the association,
8293 to prevent spurious homonyms in the scope.
8294 (Resolve_Delta_Aggregate): New.
8295 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
8296 * exp_util.adb (Insert_Actions): Take into account
8297 N_Delta_Aggregate.
8298 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
8299 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
8300 and local procedures Expand_Delta_Array_Aggregate and
8301 expand_Delta_Record_Aggregate.
8302 * sprint.adb: Handle N_Delta_Aggregate.
8303
8304 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8305
8306 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
8307 empty name when the exception declaration is subject to pragma
8308 Discard_Names.
8309 (Null_String): New routine.
8310
8311 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8312
8313 * par-ch9.adb (P_Protected_Definition): Parse
8314 any optional and potentially illegal pragmas which appear in
8315 a protected operation declaration list.
8316 (P_Task_Items): Parse
8317 any optional and potentially illegal pragmas which appear in a
8318 task item list.
8319
8320 2017-01-23 Pascal Obry <obry@adacore.com>
8321
8322 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
8323 is needed when a foreign thread call a Win32 API using a thread handle
8324 like GetThreadTimes() for example.
8325
8326 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8327
8328 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
8329 allow an 'Address clause to be specified on a prefix of a
8330 class-wide type.
8331
8332 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8333
8334 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
8335 attribute 'Valid is a renaming of the original expression when
8336 the expression denotes a name. For all other kinds of expression,
8337 use a constant to capture the value.
8338 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
8339 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
8340
8341 2017-01-23 Justin Squirek <squirek@adacore.com>
8342
8343 * sem_eval.adb (Eval_Integer_Literal): Add special
8344 case to avoid optimizing out check if the literal appears in
8345 an if-expression.
8346
8347 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8348
8349 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
8350 allow an 'Address clause to be specified on a prefix of a
8351 class-wide type.
8352
8353 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8354
8355 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
8356 attribute 'Valid is a renaming of the original expression when
8357 the expression denotes a name. For all other kinds of expression,
8358 use a constant to capture the value.
8359 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
8360 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
8361
8362 2017-01-23 Justin Squirek <squirek@adacore.com>
8363
8364 * sem_eval.adb (Eval_Integer_Literal): Add special
8365 case to avoid optimizing out check if the literal appears in
8366 an if-expression.
8367
8368 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8369
8370 * sem_ch4.adb (Try_Primitive_Operations,
8371 Is_Valid_First_Argument_Of): argument is valid if it is a derived
8372 type with unknown discriminants that matches its underlying
8373 record view.
8374 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
8375 expression if its type is derived from a limited type with
8376 unknown discriminants, because the expansion (which is a call)
8377 must be expanded in the enclosing context to add the proper build-
8378 in-place parameters to the call.
8379 * lib.ads, exp_ch9.adb: Minor fixes in comments.
8380
8381 2017-01-23 Yannick Moy <moy@adacore.com>
8382
8383 * frontend.adb (Frontend): Do not load runtime
8384 unit for GNATprove when parsing failed.
8385 * exp_ch9.adb: minor removal of extra whitespace
8386 * exp_ch6.adb: minor typo in comment
8387 * sem_util.adb: Code cleanup.
8388 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
8389 * a-ngcefu.adb: minor style fix in whitespace
8390
8391 2017-01-23 Thomas Quinot <quinot@adacore.com>
8392
8393 * scos.ads: Document usage of 'd' as default SCO kind for
8394 declarations.
8395 * par_sco.adb (Traverse_Declarations_Or_Statements.
8396 Traverse_Degenerate_Subprogram): New supporting routine for expression
8397 functions and null procedures.
8398 (Traverse_Declarations_Or_Statements.Traverse_One): Add
8399 N_Expression_Function to the subprogram case; add required
8400 support for null procedures and expression functions.
8401
8402 2017-01-23 Bob Duff <duff@adacore.com>
8403
8404 * namet.ads (Bounded_String): Decrease the size of type
8405 Bounded_String to avoid running out of stack space.
8406 * namet.ads (Append): Don't ignore buffer overflow; raise
8407 Program_Error instead.
8408
8409 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8410
8411 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
8412 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
8413 reformatting.
8414 * exp_ch9.adb: minor style fix in comment.
8415
8416 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8417
8418 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
8419 for a limited record extension with unknown discriminants whose
8420 full view has no discriminants.
8421
8422 2017-01-23 Yannick Moy <moy@adacore.com>
8423
8424 * exp_spark.adb: Alphabetize with clauses.
8425
8426 2017-01-23 Yannick Moy <moy@adacore.com>
8427
8428 * sem_util.adb (Has_Enabled_Property): Treat
8429 protected objects and variables differently from other variables.
8430
8431 2017-01-23 Thomas Quinot <quinot@adacore.com>
8432
8433 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
8434 Split original Ada 95 part off into new subprogram
8435 below. Call that subprogram (instead of proceeding with
8436 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
8437 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
8438 * debug.adb Document new switch -gnatd.p
8439 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
8440 record for reverse bit order if an error has already been posted
8441 on the record type. This avoids generating extraneous "info:"
8442 messages for illegal code.
8443
8444 2017-01-23 Justin Squirek <squirek@adacore.com>
8445
8446 * sem_ch3.adb (Analyze_Declarations): Correct comments
8447 * freeze.adb (Find_Constant): Add detection of deferred constants
8448 so they are not incorrectly flagged as premature.
8449
8450 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8451
8452 * scans.ads: New token At_Sign. Remove '@' from list of illegal
8453 characters for future version of the language. '@' is legal name.
8454 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
8455 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
8456 denotes a Target_Name.
8457 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
8458 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
8459 (Has_Target_Names): New flag on N_Assignment_Statement, to
8460 indicate that RHS has occurrences of N_Target_Name.
8461 * sem.adb: Call Analyze_Target_Name.
8462 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
8463 (urrent_LHS): Global variable that denotes LHS of assignment,
8464 used in the analysis of Target_Name nodes.
8465 * sem_res.adb (Resolve_Target_Name): New procedure.
8466 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
8467 N is an assignment statement whose RHS contains occurences of @
8468 that designate the value of the LHS of the assignment. If the
8469 LHS is side-effect free the target names can be replaced with
8470 a copy of the LHS; otherwise the semantics of the assignment
8471 is described in terms of a procedure with an in-out parameter,
8472 and expanded as such.
8473 (Expand_N_Assignment_Statement): Call
8474 Expand_Assign_With_Target_Names when needed.
8475 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
8476 * sprint.adb: Handle N_Target_Name.
8477
8478 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
8479
8480 * checks.adb: Minor fix in comment.
8481
8482 2017-01-23 Philippe Gil <gil@adacore.com>
8483
8484 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
8485 count in Sort = Memory_Usage or Allocations_Count
8486
8487 2017-01-23 Justin Squirek <squirek@adacore.com>
8488
8489 * sem_ch3.adb: Code cleanup.
8490
8491 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8492
8493 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
8494 variables to the local variable section. Update the profile
8495 of various nested routine that previously had visibility
8496 of those globals. One the matching phase has completed,
8497 remove certain classes of clauses which are considered noise.
8498 (Check_Dependency_Clause): Properly detect a match between two
8499 'Result attributes. Update the various post-match cases to use
8500 Is_Already_Matched as this routine now automatically recognizes
8501 a previously matched 'Result attribute.
8502 (Is_Already_Matched): New routine.
8503 (Remove_Extra_Clauses): New routine.
8504 (Report_Extra_Clauses): Remove the detection of ... => null
8505 clauses as this is now done in Remove_Extra_Clauses.
8506
8507 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8508
8509 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
8510 report on spurious overlaps between values involving a subtype
8511 with a static predicate, because the expansion of such a subtype
8512 into individual ranges in inhibited in ASIS mode.
8513
8514 2017-01-23 Justin Squirek <squirek@adacore.com>
8515
8516 * sem_ch3.adb (Analyze_Declarations): Add detection
8517 of an edge case and delay freezing if it is present.
8518
8519 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8520
8521 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
8522 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
8523
8524 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8525
8526 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
8527 access-to-subprogram types inherit the convention of the
8528 associated subprogram. (Set_Profile_Convention): New routine.
8529 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
8530 of the two entities directly, use Conventions_Match to account
8531 for anonymous access-to-subprogram and subprogram types.
8532 (Conventions_Match): New routine.
8533
8534 2017-01-23 Claire Dross <dross@adacore.com>
8535
8536 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
8537 which return Universal_Integer, force the overflow check flag for
8538 Length and Range_Length for types as big as Long_Long_Integer.
8539
8540 2017-01-23 Claire Dross <dross@adacore.com>
8541
8542 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
8543 attributes which return Universal_Integer, introduce a conversion
8544 to the expected type with the appropriate check flags set.
8545 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
8546 base type if the range is null. It may still be invalid if it
8547 is higher than the lower bound. This is checked later in the
8548 context in which the range appears.
8549
8550 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
8551
8552 * scos.ads: Introduce a constant to represent ignored
8553 dependencies in SCO_Unit_Table_Entry.
8554
8555 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8556
8557 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
8558 spaces from error messages.
8559
8560 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8561
8562 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
8563 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
8564 an object declaration for an array type with a modular index type
8565 with the size of Long_Long_Integer. Special processing is needed
8566 in this case to compute reliably the size of the object, and
8567 eventually to raise Storage_Error, when wrap-around arithmetic
8568 might compute a meangingless size for the object.
8569
8570 2017-01-23 Justin Squirek <squirek@adacore.com>
8571
8572 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
8573 sem_type.adb: Code cleanups.
8574
8575 2017-01-23 Bob Duff <duff@adacore.com>
8576
8577 * sem_res.adb (Resolve_Call): In the part of the code where
8578 it is deciding whether to turn the call into an indexed
8579 component, avoid doing so if the call is to an instance of
8580 Unchecked_Conversion. Otherwise, the compiler turns it into an
8581 indexed component, and resolution of that turns it back into a
8582 function call, and so on, resulting in infinite recursion.
8583 * sem_util.adb (Needs_One_Actual): If the first formal has a
8584 default, then return False.
8585
8586 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
8587
8588 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
8589 optimizations when the type is modular and the offsets are equal.
8590
8591 2017-01-20 Thomas Quinot <quinot@adacore.com>
8592
8593 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
8594 message.
8595
8596 2017-01-20 Nicolas Roche <roche@adacore.com>
8597
8598 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
8599
8600 2017-01-20 Bob Duff <duff@adacore.com>
8601
8602 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
8603 (etc) optimizations when the type is modular.
8604
8605 2017-01-20 Yannick Moy <moy@adacore.com>
8606
8607 * sem_ch6.adb (Move_Pragmas): move some pragmas,
8608 but copy the SPARK_Mode pragma instead of moving it.
8609 (Build_Subprogram_Declaration): Ensure that the generated spec
8610 and original body share the same SPARK_Pragma aspect/pragma.
8611 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
8612 procedure to copy SPARK_Mode aspect.
8613
8614 2017-01-20 Bob Duff <duff@adacore.com>
8615
8616 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
8617 even in ASIS mode.
8618 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
8619 Empty even in ASIS mode.
8620
8621 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8622
8623 * exp_ch9.adb: minor style fixes in comments.
8624 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
8625 relative statement introduces an implicit dependency on
8626 Ada.Real_Time.Clock_Time.
8627 * sem_util.adb: Minor reformatting.
8628
8629 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8630
8631 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
8632 must be treated as delayed aspect even if the expression is
8633 a literal, because the aspect affects the freezing and the
8634 elaboration of the object to which it applies.
8635
8636 2017-01-20 Tristan Gingold <gingold@adacore.com>
8637
8638 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
8639
8640 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8641
8642 * lib-xref.adb (Generate_Reference): Do not warn about the
8643 presence of a pragma Unreferenced if the entity appears as the
8644 actual in a procedure call that does not come from source.
8645
8646 2017-01-20 Pascal Obry <obry@adacore.com>
8647
8648 * expect.c, terminals.c: Fix some warnings about unused variables.
8649 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
8650 of the runtime.
8651
8652 2017-01-20 Bob Duff <duff@adacore.com>
8653
8654 * exp_attr.adb (Constrained): Apply an access check (check that
8655 the prefix is not null) when the prefix denotes an object of an
8656 access type; that is, when there is an implicit dereference.
8657
8658 2017-01-20 Gary Dismukes <dismukes@adacore.com>
8659
8660 * s-rident.ads (constant Profile_Info): Remove
8661 No_Calendar from GNAT_Extended_Ravenscar restrictions.
8662
8663 2017-01-20 Tristan Gingold <gingold@adacore.com>
8664
8665 * s-maccod.ads: Add pragma No_Elaboration_Code_All
8666
8667 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8668
8669 * ghost.adb (Mark_Ghost_Clause): New routine.
8670 (Prune_Node): Do not prune compilation unit nodes.
8671 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
8672 This does not touch the node itself, but does prune all its fields.
8673 * ghost.ads (Mark_Ghost_Clause): New routine.
8674 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
8675 package clause mentions Ghost and non-Ghost packages. Mark a
8676 use package clause as Ghost when it mentions a Ghost package.
8677 (Analyze_Use_Type): Emit an error when a use type clause mentions
8678 Ghost and non-Ghost types. Mark a use type clause as Ghost when
8679 it mentions a Ghost type.
8680 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
8681 Ghost when it withs a Ghost unit.
8682
8683 2017-01-20 Javier Miranda <miranda@adacore.com>
8684
8685 * sem_res.adb (Resolve_Call): If a function call
8686 returns a limited view of a type and at the point of the call the
8687 function is not declared in the extended main unit then replace
8688 it with the non-limited view, which must be available. If the
8689 called function is in the extended main unit then no action is
8690 needed since the back-end handles this case.
8691
8692 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
8693
8694 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
8695 (Contains_Subprograms_Refs): ...this. Adjust comment
8696 for constants. (Is_Subp_Or_Const_Ref): Rename into...
8697 (Is_Subprogram_Ref): ...this.
8698 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
8699 Has_Non_Subprograms_Referencer and adjust comment. Remove
8700 incorrect shortcut for package declarations and bodies.
8701
8702 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8703
8704 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
8705 base type differs from that of the completion and the private
8706 subtype is an itype (created for a constraint on an access
8707 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
8708 anomalies in gigi.
8709
8710 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8711
8712 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8713 When inheriting the SPARK_Mode of a prior expression function,
8714 look at the properly resolved entity rather than the initial
8715 candidate which may denote a homonym.
8716
8717 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8718
8719 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
8720 Precondition or Postcondition, and the context is pragma
8721 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
8722 and suggest the standard names Assertion_Policy /Pre /Post
8723 instead.
8724
8725 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8726
8727 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
8728
8729 2017-01-20 Javier Miranda <miranda@adacore.com>
8730
8731 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
8732 Entity attribute.
8733 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
8734 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
8735 malformed trees.
8736
8737 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8738
8739 * sem_ch13.adb (Analyze_Aspect_Specification, case
8740 Dynamic_Predicate): If the entity E is a subtype that inherits
8741 a static predicate for its parent P,, the inherited and the
8742 new predicate combine in the generated predicate function,
8743 and E only has a dynamic predicate.
8744
8745 2017-01-20 Tristan Gingold <gingold@adacore.com>
8746
8747 * s-boustr.ads, s-boustr.adb: New package.
8748 * Makefile.rtl: Add s-boustr.
8749
8750 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8751
8752 * inline.adb (Process_Formals): Qualify the
8753 expression of a return statement when it yields a universal type.
8754
8755 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8756
8757 * freeze.adb (Freeze_All): Freeze the default
8758 expressions of all eligible formal parameters that appear in
8759 entries, entry families, and protected subprograms.
8760
8761 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8762
8763 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
8764 for illegal inherited Implicit_Dereference aspects with renamed
8765 discriminants.
8766
8767 2017-01-20 Javier Miranda <miranda@adacore.com>
8768
8769 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
8770 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
8771 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
8772 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
8773 Set_Prev, Tree_Read): Adding assertion.
8774 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
8775 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
8776 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
8777 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
8778 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
8779 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
8780 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
8781 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
8782 Set_ListN_With_Parent): Adding assertion.
8783
8784 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8785
8786 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
8787 import that applies to several homograph subprograms. when one
8788 of them is declared by a subprogram body.
8789
8790 2017-01-20 Justin Squirek <squirek@adacore.com>
8791
8792 * exp_ch6.adb (Expand_Call): Remove optimization
8793 that nulls out calls to null procedures.
8794
8795 2017-01-20 Yannick Moy <moy@adacore.com>
8796
8797 * inline.adb (Expand_Inlined_Call): Keep more
8798 precise type of actual for inlining whenever possible. In
8799 particular, do not switch to the formal type in GNATprove mode in
8800 some case where the GNAT backend might require it for visibility.
8801
8802 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8803
8804 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
8805 aspect Implicit_Dereference can be inherited by a full view if
8806 the partial view has no discriminants, because there is no way
8807 to apply the aspect to the partial view.
8808 (Build_Derived_Record_Type): If derived type renames discriminants
8809 of the parent, the new discriminant inherits the aspect from
8810 the old one.
8811 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
8812 call through an access discriminant designating a subprogram.
8813 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
8814 properly a parameterless call through an access discriminant on
8815 the left-hand side of an assignment.
8816 * sem_res.adb (resolve): If an interpreation involves a
8817 discriminant with an implicit dereference and the expression is an
8818 entity, resolution takes place later in the appropriate routine.
8819 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
8820 access discriminants that designate a subprogram type.
8821
8822 2017-01-20 Pascal Obry <obry@adacore.com>
8823
8824 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
8825
8826 2017-01-20 Yannick Moy <moy@adacore.com>
8827
8828 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
8829 on implicitly with'ed units in GNATprove mode.
8830 * sinfo.ads (Implicit_With): Document use of flag for implicitly
8831 with'ed units in GNATprove mode.
8832
8833 2017-01-20 Ed Schonberg <schonberg@adacore.com>
8834
8835 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
8836 unit Do not report an error on a non-static entity that appears
8837 in the context of a spec expression, such as an aspect expression.
8838
8839 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8840
8841 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
8842 (Is_Underlying_Full_View): New routine.
8843 (Set_Is_Underlying_Full_View): New routine.
8844 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
8845 * einfo.ads Add new attribute Is_Underlying_Full_View.
8846 (Is_Underlying_Full_View): New routine along with pragma Inline.
8847 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
8848 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
8849 class-wide types and underlying full views. The first subtype
8850 is used as the working type for all Itypes, not just array base types.
8851 (Build_DIC_Procedure_Declaration): Do not consider
8852 class-wide types and underlying full views. The first subtype
8853 is used as the working type for all Itypes, not just array
8854 base types.
8855 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
8856 view or an underlying full view without clobbering the attributes
8857 of a previous freeze node.
8858 (Inherit_Freeze_Node): New routine.
8859 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
8860 full view as such.
8861 (Build_Underlying_Full_View): Mark an underlying full view as such.
8862 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
8863 full view as such.
8864
8865 2017-01-20 Yannick Moy <moy@adacore.com>
8866
8867 * sinfo.ads: Document lack of Do_Division_Check flag
8868 on float exponentiation.
8869
8870 2017-01-19 Javier Miranda <miranda@adacore.com>
8871
8872 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
8873 identifier attribute of a block-statement node. Required to avoid
8874 assertion failure when building the new containers library.
8875
8876 2017-01-19 Bob Duff <duff@adacore.com>
8877
8878 * exp_ch3.adb: Update comment.
8879
8880 2017-01-19 Vincent Celier <celier@adacore.com>
8881
8882 * gprep.adb (Gnatprep): Parse the definition file without
8883 "replace in comments" even when switch -C is used.
8884
8885 2017-01-19 Justin Squirek <squirek@adacore.com>
8886
8887 * exp_ch9.adb (Is_Pure_Barrier): Create function
8888 Is_Count_Attribute to identify an expansion of the 'Count
8889 attribute.
8890
8891 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8892
8893 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
8894 statements within an element iterator loop are only analyzed
8895 agter the loop is rewritten. Within a generic the analysis must
8896 be performed in any case to complete name capture.
8897
8898 2017-01-19 Bob Duff <duff@adacore.com>
8899
8900 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
8901 before checking for unrecognized pragmas.
8902 Initialize Pname on its declarations; that's always good style.
8903
8904 2017-01-19 Claire Dross <dross@adacore.com>
8905
8906 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
8907 body into the tree for GNATprove by setting its Parent field. The
8908 components invariants of composite types are not checked by
8909 the composite type's invariant procedure in GNATprove mode.
8910 (Build_Invariant_Procedure_Declaration): Semi-insert the
8911 declaration into the tree for GNATprove by setting its Parent
8912 field.
8913 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
8914 the component invariants to the array type invariant procedure
8915 so that the procedure can be used to check the array type
8916 invariants if any.
8917 (Freeze_Record_Type): In GNATprove mode, do
8918 not add the component invariants to the record type invariant
8919 procedure so that the procedure can be used to check the record
8920 type invariants if any.
8921
8922 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
8923
8924 * lib-xref-spark_specific.adb: Minor reformatting.
8925 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
8926
8927 2017-01-19 Javier Miranda <miranda@adacore.com>
8928
8929 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
8930 Build_Back_End_Aggregate.
8931 (Generate_Aggregate_For_Derived_Type): Code cleanup.
8932 (Prepend_Stored_Values): Code cleanup.
8933
8934 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8935
8936 * sem_ch6.adb (Analyze_Expression_Function): Check for an
8937 incomplete return type after attempting to freeze it, so that
8938 other freeze actiona are generated in the proper order.
8939
8940 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8941
8942 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
8943 type, ie. a type whose component is a character type, and the
8944 aggregate is positional, do not convert into a string literal
8945 if the index type is not an integer type, because the original
8946 type may be required in an enclosing operation.
8947
8948 2017-01-19 Bob Duff <duff@adacore.com>
8949
8950 * binde.adb, debug.adb: Enable new elaboration order algorithm
8951 by default. -dp switch reverts to the old algorithm.
8952
8953 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
8954
8955 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
8956 (Analyze_Declarations): Create the DIC and Invariant
8957 procedure bodies s after all freezing has taken place.
8958 (Build_Assertion_Bodies): New routine.
8959 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
8960 and Exp_Util.
8961 (Analyze_Package_Specification): Remove the
8962 generation of the DIC and Invariant procedure bodies. This is
8963 now done by Analyze_Declarations.
8964 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
8965 procedures are never treated as primitives.
8966
8967 2017-01-19 Yannick Moy <moy@adacore.com>
8968
8969 * frontend.adb: Analyze inlined bodies and check elaboration
8970 rules in GNATprove mode too.
8971 * sem_elab.adb (Delay_Element): Add Boolean component to save
8972 indication that call is in SPARK code. (Check_Elab_Calls):
8973 Check elaboration rules in GNATprove mode, and correctly set
8974 the current value of SPARK_Mode.
8975 * lib-xref-spark_specific.adb
8976 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
8977
8978 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8979
8980 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
8981 checks on the expression for the high bound of concatenation
8982 when checks are disabled, to suppress warnings about potential
8983 constraint errors in restricted runtimes.
8984
8985 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
8986
8987 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
8988 representation-to-position function as inlined.
8989 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
8990 the purity of an internally generated entity if it has been
8991 explicitly marked as pure for optimization purposes.
8992 * exp_aggr.adb: Minor reformatting.
8993
8994 2017-01-19 Javier Miranda <miranda@adacore.com>
8995
8996 * exp_ch6.adb (Expand_Call): Remove side effects on
8997 actuals that are allocators with qualified expression since the
8998 initialization of the object is performed by means of individual
8999 statements (and hence it must be done before the call).
9000
9001 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9002
9003 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
9004 (Build_Derived_Enumeration_Type): If the derived type inherits a
9005 dynamic predicate from its parent, the bounds of the type must
9006 freeze because an explicit constraint is constructed for the
9007 type and the corresponding range is elaborated now.
9008
9009 2017-01-19 Arnaud Charlet <charlet@adacore.com>
9010
9011 * sem_attr.ads: minor fix of inconsistent casing in comment
9012 * lib-writ.ads: minor align comments in columns
9013 * sem_ch3.adb: Minor reformatting.
9014 * spark_xrefs.ads: minor fix typo in SPARK-related comment
9015 * table.ads: minor style fix in comment
9016 * lib-xref-spark_specific.adb
9017 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
9018 * sem_ch12.adb: minor whitespace fix
9019 * freeze.adb: Add comment.
9020 * sem_util.adb (Unique_Name): for instances of
9021 generic subprograms ignore the name of the wrapper package.
9022
9023 2017-01-19 Javier Miranda <miranda@adacore.com>
9024
9025 * exp_aggr.adb (Resolve_Record_Aggregate):
9026 Factorize code needed for aggregates of limited and unlimited
9027 types in a new routine.
9028 (Pass_Aggregate_To_Back_End): New subprogram.
9029
9030 2017-01-19 Yannick Moy <moy@adacore.com>
9031
9032 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
9033
9034 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9035
9036 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
9037 public, for use elsewhere.
9038 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
9039 an Inlined_body, recognize a call that uses object notation
9040 and has not been rewritten as a regular call because regular
9041 expansion has not taken place.
9042
9043 2017-01-19 Bob Duff <duff@adacore.com>
9044
9045 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
9046 in case of generic formal discrete types, because it causes crashes in
9047 the compiler when built with assertions on.
9048
9049 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9050
9051 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
9052 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
9053
9054 2017-01-19 Bob Duff <duff@adacore.com>
9055
9056 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
9057 Increment Warnings_Detected. It was decrementing, which is
9058 wrong since we just issued a warning message.
9059 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
9060 these variables to be of subtype Nat instead of Int, because
9061 they should never be negative.
9062
9063 2017-01-19 Javier Miranda <miranda@adacore.com>
9064
9065 * contracts.adb (Build_Postconditions_Procedure): Replace
9066 Generate_C_Code by Modify_Tree_For_C.
9067 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
9068 Replace Generate_C_Code by Modify_Tree_For_C.
9069 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
9070 Modify_Tree_For_C.
9071 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
9072 Generate_C_Code by Modify_Tree_For_C.
9073 * exp_ch4.adb (Expand_Allocator_Expression): Replace
9074 Generate_C_Code by Modify_Tree_For_C.
9075 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
9076 by Modify_Tree_For_C.
9077 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
9078 Generate_C_Code by Modify_Tree_For_C.
9079 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
9080 by Modify_Tree_For_C.
9081 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
9082
9083 2017-01-19 Javier Miranda <miranda@adacore.com>
9084
9085 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
9086 subprogram.
9087 (Is_Inlinable_Expression_Function): New subprogram.
9088 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
9089 to Sem_Util.
9090 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
9091
9092 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9093
9094 * sem_ch4.adb (Diagnose_Call): Improve error message when a
9095 selected component has a prefix that might be interpreted
9096 as a parameterless function call, but none of the candidate
9097 interpretations is parameterless, and there is a hidden homonym
9098 of the prefix that is a package.
9099 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
9100 interpreted as a parameterless function call and its analysis
9101 fails, do not call Analyze_Selected_Component.
9102
9103 2017-01-19 Steve Baird <baird@adacore.com>
9104
9105 * sem_util.ads: Add new Use_Full_View Boolean parameter to
9106 Get_Index_Bounds.
9107 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
9108 calls to a newly-defined Scalar_Range_Of_Right_View function.
9109
9110 2017-01-19 Arnaud Charlet <charlet@adacore.com>
9111
9112 * gnat1drv.adb: minor fix of unbalanced parens in comment
9113 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
9114 to visible part of the package to allow re-use in GNATprove.
9115 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
9116 from repeated code of Traverse_Compilation_Unit.
9117 (Traverse_Declaration_Or_Statement): fixed detection of
9118 generic subprograms and packages; also, iteration over case
9119 statement alternatives rewritten to avoid testing if the first
9120 alternative is present (since it must be present due to Ada
9121 syntax restrictions).
9122
9123 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9124
9125 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
9126 returning by reference not just for subprogram body stubs,
9127 but for all subprogram cases.
9128 * sem_util.adb: Code reformatting.
9129 (Requires_Transient_Scope): Update the call to Results_Differ.
9130 (Results_Differ): Update the parameter profile and the associated
9131 comment on usage.
9132
9133 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9134
9135 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
9136 identifier nodes that do not come from source, to handle properly
9137 dimensionality check within an inlined body which inclddes both
9138 original operands and rewritten operands. This removes spurious
9139 dimensionality errors in the presence of front-end inlining,
9140 as well as in SPARK mode.
9141
9142 2017-01-16 Jakub Jelinek <jakub@redhat.com>
9143
9144 PR driver/49726
9145 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
9146
9147 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9148
9149 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
9150
9151 2017-01-13 Arnaud Charlet <charlet@adacore.com>
9152
9153 * doc/gnat_ugn/getting_started_with_gnat.rst,
9154 doc/gnat_ugn/inline_assembler.rst,
9155 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
9156 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
9157 doc/gnat_ugn/about_this_guide.rst,
9158 doc/gnat_ugn/platform_specific_information.rst,
9159 doc/gnat_ugn/example_of_binder_output.rst,
9160 doc/gnat_ugn/gnat_and_program_execution.rst,
9161 doc/gnat_ugn/gnat_utility_programs.rst,
9162 doc/gnat_ugn/the_gnat_compilation_model.rst,
9163 doc/gnat_rm/implementation_defined_attributes.rst,
9164 doc/gnat_rm/compatibility_and_porting_guide.rst,
9165 doc/gnat_rm/standard_library_routines.rst,
9166 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
9167 doc/gnat_rm/implementation_defined_pragmas.rst,
9168 doc/gnat_rm/the_gnat_library.rst,
9169 doc/gnat_rm/obsolescent_features.rst,
9170 doc/gnat_rm/about_this_guide.rst,
9171 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
9172 doc/gnat_rm/implementation_of_ada_2012_features.rst,
9173 doc/gnat_rm/interfacing_to_other_languages.rst,
9174 doc/gnat_rm/implementation_defined_aspects.rst,
9175 doc/gnat_rm.rst: Update documentation.
9176 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
9177
9178 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9179
9180 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
9181 * scil_ll.adb: Minor style fix in comment.
9182 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
9183 even if entity is already set, because the node may be renalyzed
9184 after inlining transformations.
9185
9186 2017-01-13 Javier Miranda <miranda@adacore.com>
9187
9188 * sem_res.adb (Resolve_Call): Do not establish a transient scope
9189 for a call to inlinable expression function (since the call will
9190 be replaced by its returned object).
9191 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
9192 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
9193 (Expand_Call): For inlinable expression function call replace the
9194 call by its returned object.
9195 (Is_Inlinable_Expression_Function): New subprogram.
9196
9197 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9198
9199 * checks.adb: Minor typo fix and reformatting.
9200
9201 2017-01-13 Javier Miranda <miranda@adacore.com>
9202
9203 * contracts.adb (Contract_Only_Subprograms): Remove formal.
9204 (Copy_Original_Specification): Removed.
9205 (Skip_Contract_Only_Subprogram): Move here checks previously
9206 located in the caller of this routine (to leave the code more clean).
9207 (Build_Contract_Only_Subprogram): Code cleanup.
9208 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
9209 (Get_Contract_Only_Missing_Body_Name): Removed.
9210
9211 2017-01-13 Javier Miranda <miranda@adacore.com>
9212
9213 * sem_ch6.adb (Cloned_Expression): New subprogram.
9214 (Freeze_Expr_Types): Complete previous patch since the expression
9215 of an expression-function may have iterators and loops with
9216 defining identifiers which, as part of the preanalysis of the
9217 expression, may be left decorated with itypes that will not be
9218 available in the tree passed to the backend.
9219
9220 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9221
9222 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
9223 conversion to Integer of an expression that is an attribute
9224 reference 'Pos on an enumeration type.
9225
9226 2017-01-13 Bob Duff <duff@adacore.com>
9227
9228 * atree.ads: Minor comment fix.
9229
9230 2017-01-13 Justin Squirek <squirek@adacore.com>
9231
9232 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
9233 calls in accessibility check on return statement.
9234
9235 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9236
9237 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
9238 Ensure that the input body is a subprogram body before trying to
9239 determine whether it denoted an expression function. Note that
9240 subprogram body stubs cannot denote expression functions.
9241
9242 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9243
9244 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
9245 and typo fixes.
9246
9247 2017-01-13 Javier Miranda <miranda@adacore.com>
9248
9249 * einfo.ads (Component_Bit_Offset): Fix documentation.
9250 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
9251 on record holes for components with unknown compile-time offsets.
9252
9253 2017-01-13 Bob Duff <duff@adacore.com>
9254
9255 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
9256 * g-locfil.ads: Minor comment fix.
9257
9258 2017-01-13 Bob Duff <duff@adacore.com>
9259
9260 * binde.adb (Elab_New): New elaboration order algorithm
9261 that is expected to cause fewer ABE issues. This is a work in
9262 progress. The new algorithm is currently disabled, and can be
9263 enable by the -dp switch, or by modifying the Do_Old and Do_New
9264 etc. flags and rebuilding. Experimental code is included to
9265 compare the results of the old and new algorithms.
9266 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
9267 can have multiple of these tables, so the old and new algorithms
9268 can coexist.
9269 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
9270 parameter of type array. This avoids the global variable, and
9271 allows bounds checking (which is normally defeated by the tables
9272 packages). It also ensures that the Elab_Order is read-only
9273 to Bindgen.
9274 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
9275 subprograms that need it, as above.
9276 * debug.adb: Document new -dp switch. Modify doc of old -do
9277 switch.
9278 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
9279 and Bindgen. Move writing of closure (-R and -Ra switches)
9280 to Binde; that's more convenient.
9281
9282 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9283
9284 * sem_ch6.adb (Analyze_Expression_Function): If the expression
9285 function is a completion, all entities referenced in the
9286 expression are frozen. As a consequence, a reference to an
9287 uncompleted private type from an enclosing scope is illegal.
9288
9289 2017-01-13 Javier Miranda <miranda@adacore.com>
9290
9291 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
9292 (Analyze_Subprogram_Body_Helper): At the occurrence of an
9293 expression function declaration that is a completion, its
9294 expression causes freezing (AI12-0103).
9295
9296 2017-01-13 Vadim Godunko <godunko@adacore.com>
9297
9298 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
9299 Reference functions of Ada.Containers.Indefinite_Holders.
9300
9301 2017-01-13 Bob Duff <duff@adacore.com>
9302
9303 * s-os_lib.ads: Minor comment fixes.
9304
9305 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9306
9307 * exp_ch3.adb (Default_Initialize_Object): Do not default
9308 initialize an object when it is of a task type and restriction
9309 No_Tasking is in effect because the initialization is obsolete.
9310 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
9311 restriction No_Tasking is in effect.
9312 (Build_Master_Renaming): Do not rename a master when restriction
9313 No_Tasking is in effect.
9314
9315 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9316
9317 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
9318 the legality of An others clause applies as well to a choice in
9319 an Iterated_component_ association.
9320 (Resolve_Iterated_Component_Association): An others choice
9321 is legal.
9322 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
9323 Iterated_Component_Association is not static.
9324
9325 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9326
9327 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
9328 control is passed to the expresion handler before the new mode
9329 is set.
9330 * sem_ch12.adb (Analyze_Package_Instantiation,
9331 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
9332 in case control is passed to the expresion handler before the
9333 new mode is set.
9334
9335 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9336
9337 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
9338 exp_aggr.adb: Minor reformatting.
9339
9340 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9341
9342 * inline.adb: Minor reformatting and typo fix.
9343
9344 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9345
9346 * sem_util.ads, sem_util.adb (Choice_List): Move function here
9347 from sem_aggr.adb, for use elsewhere.
9348 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
9349 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
9350 Iterated_Component_Present.
9351 * exp_aggr.adb: Use Choice_List throughout, to handle
9352 Iterated_Component_Associations.
9353 (Gen_Loop): Generate proper loop for an
9354 Iterated_Component_Association: loop variable has the identifier
9355 of the original association. Generate a loop even for a single
9356 component choice, in order to make loop parameter visible in
9357 expression.
9358 (Flatten): An Iterated_Component_Association is not static.
9359
9360 2017-01-13 Yannick Moy <moy@adacore.com>
9361
9362 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
9363 float exponentiation for statically known small negative values
9364 is the reciprocal of the exponentiation for the opposite value
9365 of the exponent.
9366 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
9367 Ensure that the value of float exponentiation for negative values
9368 is the reciprocal of the exponentiation for the opposite value
9369 of the exponent.
9370 * inline.adb (Expand_Inlined_Call): Fix the count
9371 for the number of generated gotos.
9372
9373 2017-01-13 Yannick Moy <moy@adacore.com>
9374
9375 * inline.adb: Code cleanup.
9376 * sem_util.adb (Is_OK_Volatile_Context): Add
9377 expression in delay statement as OK for volatile context.
9378
9379 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9380
9381 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
9382 mode a choice that is a subtype with a static predicate is
9383 replaced by the values it covers. This transformation must not
9384 be performed in ASIS mode, to preserve the source for analysis.
9385
9386 2017-01-13 Justin Squirek <squirek@adacore.com>
9387
9388 * nlists.ads: Correct minor typo.
9389
9390 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9391
9392 * sem_ch13.adb: Minor reformatting and typo fix.
9393
9394 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9395
9396 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
9397 Iterated_Component_Association is a named association in an
9398 array aggregate.
9399 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
9400 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
9401 and resolve the discrete choices and the expression of the
9402 new construct.
9403 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
9404 Loop_Actions and Box_Present are attributes of
9405 N_Iterated_Component_Association nodes. Box_Present is always
9406 False in this case.
9407 * sprint.adb (Sprint_Node): An Iterated_Component_Association
9408 has a Discrete_Choices list, as specified in the RM. A
9409 Component_Association for aggregate uses instead a Choices list.
9410 We have to live with this small inconsistency because the new
9411 construct also has a defining identifier, and there is no way
9412 to merge the two node structures.
9413
9414 2017-01-13 Yannick Moy <moy@adacore.com>
9415
9416 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
9417 list of pragmas to remove. Remove pragmas from the list of
9418 statements in the body to inline.
9419 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
9420
9421 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9422
9423 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
9424 Analyze_Declarations, to analyze and resolve the expressions of
9425 aspect specifications in the current declarative list, so that
9426 the expressions have proper entity and type info. This is needed
9427 for ASIS when there is no subsequent expansion to generate this
9428 semantic information.
9429 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
9430 original expression, to suppress cascaded errors when expression
9431 has been constant-folded.
9432 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
9433 ASIS mode, because there is no subsequent expansion to decorate
9434 the tree.
9435
9436 2017-01-13 Yannick Moy <moy@adacore.com>
9437
9438 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
9439 New function to detect when a call may be inlined or not in
9440 GNATprove mode.
9441 (Expand_Inlined_Call): Ensure that a temporary
9442 is always created in the cases where a type conversion may be
9443 needed on an input parameter in GNATprove mode, so that GNATprove
9444 sees the check to perform.
9445 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
9446 when not applicable due to actual requiring type conversion
9447 with possible check but no temporary value can be copied for
9448 GNATprove to see the check.
9449
9450 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9451
9452 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
9453 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
9454 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
9455 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
9456 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
9457 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
9458 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
9459 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
9460 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
9461 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
9462 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
9463 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
9464 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
9465 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
9466 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
9467 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
9468 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
9469 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
9470 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
9471 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
9472 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
9473 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
9474 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
9475 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
9476 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
9477 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
9478 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
9479 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
9480 statements to reflect the new style for case alternatives. Various
9481 code clean up and reformatting.
9482
9483 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9484
9485 * exp_util.adb: Minor reformatting.
9486
9487 2017-01-13 Yannick Moy <moy@adacore.com>
9488
9489 * exp_spark.adb: Code cleanup.
9490 * sem_ch9.adb (Analyze_Delay_Until): Resolve
9491 expression so that calls are identified as such inside delay
9492 until.
9493
9494 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9495
9496 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
9497 * par-ch3.adb (P_Discrete_Choice_List): An
9498 Iterated_Component_Association is an array aggregate component.
9499 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
9500 (Is_Quantified_Expression): New function that performs a lookahead
9501 to distinguish quantified expressions from iterated component
9502 associations.
9503 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
9504 associations.
9505 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
9506 * sem.adb (Analyze): Handle Iterated_Component_Association.
9507 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
9508 component associations.
9509 * sinfo.ads, sinfo.adb: Entries for for
9510 N_Iterated_Component_Association and its fields.
9511 * sprint.adb (Sprint_Node_Actual): Handle
9512 N_Iterated_Component_Association.
9513
9514 2017-01-13 Justin Squirek <squirek@adacore.com>
9515
9516 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
9517 of the style check until after preanalysis of acutals.
9518
9519 2017-01-13 Yannick Moy <moy@adacore.com>
9520
9521 * sem_ch13.adb: Minor reformatting.
9522 * par-ch11.adb: minor style fix in whitespace
9523 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
9524 reduced to Add_Artificial_ALI_File; style fix in declaration of
9525 Text; grammar fix in comment.
9526 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
9527 * freeze.adb: Cleanup to pass pragma instead of
9528 expression to call.
9529 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
9530 replace System'To_Address by equivalent call.
9531
9532 2017-01-13 Arnaud Charlet <charlet@adacore.com>
9533
9534 * bindusg.adb: Improve usage output for -f switch.
9535
9536 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9537
9538 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
9539 Minor reformatting.
9540
9541 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9542
9543 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
9544 treat comparisons on strings as legal in a Static_Predicate.
9545 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
9546 a function call that is the expansion of a string comparison.The
9547 function call is built when compiling the corresponding predicate
9548 function, but the expression has been found legal as a static
9549 predicate during earlier analysis.
9550 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
9551 properly a function call that is the expansion of a string
9552 comparison operation, in order to recover the Static_Predicate
9553 expression and apply it to a static argument when needed.
9554
9555 2017-01-13 Tristan Gingold <gingold@adacore.com>
9556
9557 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
9558 (Open_Read): Re-implement using Open_Read_No_Exception.
9559 (Open_Write): Raise exception in case of error.
9560 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
9561 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
9562 reaise exception.
9563 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
9564
9565 2017-01-13 Yannick Moy <moy@adacore.com>
9566
9567 * checks.adb: Code cleanup.
9568
9569 2017-01-13 Yannick Moy <moy@adacore.com>
9570
9571 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
9572 expression instead of unanalyzed aspect expression for checking
9573 the validity of inheriting an operation. Also copy the expression
9574 being passing it to Build_Class_Wide_Expression, as this call
9575 modifies its argument.
9576 * sem_util.ads Fix comment to reference correct function name
9577 New_Copy_Tree.
9578
9579 2017-01-13 Javier Miranda <miranda@adacore.com>
9580
9581 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
9582 when we propagate information about the indexes back to the original
9583 indexing mode and the prefix of the index is a function call, do not
9584 remove any parameter from such call.
9585
9586 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9587
9588 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
9589 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
9590 a build-in-place function whose result type is tagged.
9591
9592 2017-01-13 Yannick Moy <moy@adacore.com>
9593
9594 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
9595 Do not generate a wrapper when the only candidate is a class-wide
9596 subprogram.
9597 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
9598 inside a generic context.
9599
9600 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9601
9602 * exp_util.adb (Add_Inherited_Tagged_DIC):
9603 Pass the object parameters of both the parent and the derived
9604 type DIC procedure to the reference replacement circuitry.
9605 (Find_DIC_Type): Modify the circuitry to present the partial
9606 view of a private type in case the private type defines its own
9607 DIC pragma.
9608 (Replace_Object_And_Primitive_References): Add two
9609 optional formal parameters. Update the comment on usage. Update
9610 the replacement of references to object parameters.
9611
9612 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9613
9614 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
9615
9616 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9617
9618 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
9619 an out parameter that is a type conversion, independently of th
9620 range check that may apply to the expression of the conversion,
9621 for use in GNATProve.
9622
9623 2017-01-13 Yannick Moy <moy@adacore.com>
9624
9625 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
9626 GNATprove_Mode here to Frontend.
9627 * frontend.adb (Frontend): Move the implicit with for System
9628 in GNATprove_Mode here as it ismore correct this way; the old
9629 place only worked by chance, since there were no overloaded names.
9630 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
9631 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
9632 four attributes identified in SRM 9(18), add an implicit with
9633 to Ada.Task_Identification.
9634 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
9635 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
9636 mode.
9637 * checks.adb (Apply_Discriminant_Check,
9638 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
9639 In GNATprove mode, we do not apply the checks, but we still
9640 analyze the expression to possibly issue errors on SPARK
9641 code when a run-time error can be detected at compile time.
9642 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
9643 in GNATprove mode.
9644
9645 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9646
9647 * expander.adb (Expand): Add a warning about using return
9648 statements in Ghost management code.
9649 * exp_ch3.adb (Freeze_Type): Add a warning about using return
9650 statements in Ghost management code.
9651 * exp_ch7.adb (Build_Invariant_Procedure_Body,
9652 Build_Invariant_Procedure_Declaration): Add a warning about
9653 using return statements in Ghost management code.
9654 * exp_disp.adb (Make_DT): Add a warning about using return
9655 statements in Ghost management code.
9656 * exp_util.adb (Build_DIC_Procedure_Body,
9657 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
9658 warning about using return statements in Ghost management code.
9659 * freeze.adb (Freeze_Entity): Add a warning about using return
9660 statements in Ghost management code.
9661 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
9662 statements in Ghost management code.
9663 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
9664 a warning about using return statements in Ghost management code.
9665 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
9666 return statements in Ghost management code.
9667 * sem_ch6.adb (Analyze_Procedure_Call,
9668 Analyze_Subprogram_Body_Helper): Add a warning about using return
9669 statements in Ghost management code.
9670 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
9671 using return statements in Ghost management code.
9672 * sem_ch12.adb (Analyze_Package_Instantiation,
9673 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
9674 Instantiate_Subprogram_Body): Add a warning about using return
9675 statements in Ghost management code.
9676 * sem_ch13.adb (Build_Predicate_Functions,
9677 Build_Predicate_Function_Declarations): Add a warning about
9678 using return statements in Ghost management code.
9679 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
9680 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
9681 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
9682 using return statements in Ghost management code.
9683
9684 2017-01-13 Tristan Gingold <gingold@adacore.com>
9685
9686 * s-mmosin-mingw.adb: Fix pragma import.
9687
9688 2017-01-13 Arnaud Charlet <charlet@adacore.com>
9689
9690 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
9691 codepeer mode.
9692
9693 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9694
9695 * atree.adb (Allocate_Initialize_Node): A newly created node is
9696 no longer marked as Ghost at this level.
9697 (Mark_New_Ghost_Node): New routine.
9698 (New_Copy): Mark the copy as Ghost.
9699 (New_Entity): Mark the entity as Ghost.
9700 (New_Node): Mark the node as Ghost.
9701 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
9702 apply to unanalyzed entities.
9703 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
9704 entities.
9705 (Set_Is_Checked_Ghost_Entity): This attribute now
9706 applies to all entities as well as unanalyzed entities.
9707 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
9708 all entities as well as unanalyzed entities.
9709 * expander.adb Add with and use clauses for Ghost.
9710 (Expand): Install and revert the Ghost region associated with the node
9711 being expanded.
9712 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
9713 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
9714 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
9715 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
9716 (Freeze_Type): Install and revert the Ghost region associated
9717 with the type being frozen.
9718 * exp_ch5.adb Remove with and use clauses for Ghost.
9719 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
9720 * exp_ch6.adb Remove with and use clauses for Ghost.
9721 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
9722 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
9723 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
9724 Ghost region of the working type.
9725 (Build_Invariant_Procedure_Declaration): Install and revert
9726 the Ghost region of the working type.
9727 (Expand_N_Package_Body): Remove all Ghost-related code.
9728 * exp_ch8.adb Remove with and use clauses for Ghost.
9729 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
9730 code.
9731 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
9732 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
9733 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
9734 code.
9735 * exp_ch13.adb Remove with and use clauses for Ghost.
9736 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
9737 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
9738 the tagged type. Move the generation of various entities within
9739 the Ghost region of the type.
9740 * exp_prag.adb Remove with and use clauses for Ghost.
9741 (Expand_Pragma_Check): Remove all Ghost-related code.
9742 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
9743 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
9744 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
9745 * exp_util.adb (Build_DIC_Procedure_Body): Install
9746 and revert the Ghost region of the working types.
9747 (Build_DIC_Procedure_Declaration): Install and revert the
9748 Ghost region of the working type.
9749 (Make_Invariant_Call): Install and revert the Ghost region of the
9750 associated type.
9751 (Make_Predicate_Call): Reimplemented. Install and revert the
9752 Ghost region of the associated type.
9753 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
9754 of the entity being frozen.
9755 (New_Freeze_Node): Removed.
9756 * ghost.adb Remove with and use clauses for Opt.
9757 (Check_Ghost_Completion): Update the parameter profile
9758 and all references to formal parameters.
9759 (Ghost_Entity): Update the comment on usage.
9760 (Install_Ghost_Mode): New routines.
9761 (Is_Ghost_Assignment): New routine.
9762 (Is_Ghost_Declaration): New routine.
9763 (Is_Ghost_Pragma): New routine.
9764 (Is_Ghost_Procedure_Call): New routine.
9765 (Is_Ghost_Renaming): Removed.
9766 (Is_OK_Declaration): Reimplemented.
9767 (Is_OK_Pragma): Reimplemented.
9768 (Is_OK_Statement): Reimplemented.
9769 (Is_Subject_To_Ghost): Update the comment on usage.
9770 (Mark_And_Set_Ghost_Assignment): New routine.
9771 (Mark_And_Set_Ghost_Body): New routine.
9772 (Mark_And_Set_Ghost_Completion): New routine.
9773 (Mark_And_Set_Ghost_Declaration): New routine.
9774 (Mark_And_Set_Ghost_Instantiation): New routine.
9775 (Mark_And_Set_Ghost_Procedure_Call): New routine.
9776 (Mark_Full_View_As_Ghost): Removed.
9777 (Mark_Ghost_Declaration_Or_Body): New routine.
9778 (Mark_Ghost_Pragma): New routine.
9779 (Mark_Ghost_Renaming): New routine.
9780 (Mark_Pragma_As_Ghost): Removed.
9781 (Mark_Renaming_As_Ghost): Removed.
9782 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
9783 (Prune_Node): Freeze nodes no longer need special pruning, they
9784 are processed by the general ignored Ghost code mechanism.
9785 (Restore_Ghost_Mode): New routine.
9786 (Set_Ghost_Mode): Reimplemented.
9787 (Set_Ghost_Mode_From_Entity): Removed.
9788 * ghost.ads Add with and use clauses for Ghost.
9789 (Check_Ghost_Completion): Update the parameter profile
9790 along with the comment on usage.
9791 (Install_Ghost_Mode): New routine.
9792 (Is_Ghost_Assignment): New routine.
9793 (Is_Ghost_Declaration): New routine.
9794 (Is_Ghost_Pragma): New routine.
9795 (Is_Ghost_Procedure_Call): New routine.
9796 (Mark_And_Set_Ghost_Assignment): New routine.
9797 (Mark_And_Set_Ghost_Body): New routine.
9798 (Mark_And_Set_Ghost_Completion): New routine.
9799 (Mark_And_Set_Ghost_Declaration): New routine.
9800 (Mark_And_Set_Ghost_Instantiation): New routine.
9801 (Mark_And_Set_Ghost_Procedure_Call): New routine.
9802 (Mark_Full_View_As_Ghost): Removed.
9803 (Mark_Ghost_Pragma): New routine.
9804 (Mark_Ghost_Renaming): New routine.
9805 (Mark_Pragma_As_Ghost): Removed.
9806 (Mark_Renaming_As_Ghost): Removed.
9807 (Restore_Ghost_Mode): New routine.
9808 (Set_Ghost_Mode): Redefined.
9809 (Set_Ghost_Mode_From_Entity): Removed.
9810 * sem.adb (Analyze): Install and revert the Ghost region of the
9811 node being analyzed.
9812 (Do_Analyze): Change the way a clean Ghost
9813 region is installed and reverted.
9814 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
9815 all Ghost-related code.
9816 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
9817 (Analyze_Number_Declaration): Remove all Ghost-related code.
9818 (Analyze_Object_Declaration): Install and revert the Ghost region of
9819 a deferred object declaration's completion.
9820 (Array_Type_Declaration): Remove all Ghost-related code.
9821 (Build_Derived_Type): Update the comment on
9822 the propagation of Ghost attributes from a parent to a derived type.
9823 (Derive_Subprogram): Remove all Ghost-related code.
9824 (Make_Class_Wide_Type): Remove all Ghost-related code.
9825 (Make_Implicit_Base): Remove all Ghost-related code.
9826 (Process_Full_View): Install and revert the Ghost region of
9827 the partial view. There is no longer need to check the Ghost
9828 completion here.
9829 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
9830 region of the left hand side.
9831 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
9832 all Ghost-related code.
9833 (Analyze_Expression_Function): Remove all Ghost-related code.
9834 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
9835 (Analyze_Procedure_Call): Install and revert the Ghost region of
9836 the procedure being called.
9837 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
9838 region of the spec or body.
9839 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
9840 (Build_Subprogram_Declaration): Remove all Ghost-related code.
9841 (Find_Corresponding_Spec): Remove all Ghost-related code.
9842 (Process_Formals): Remove all Ghost-related code.
9843 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
9844 the Ghost region of the spec.
9845 (Analyze_Package_Declaration): Remove all Ghost-related code.
9846 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
9847 Ghost when it aliases a Ghost entity.
9848 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
9849 a Ghost entity.
9850 (Analyze_Object_Renaming): Mark a renaming as Ghost when
9851 it aliases a Ghost entity.
9852 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
9853 a Ghost entity.
9854 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
9855 aliases a Ghost entity.
9856 * sem_ch11.adb Remove with and use clauses for Ghost.
9857 (Analyze_Exception_Declaration): Remove all Ghost-related code.
9858 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
9859 Ghost-related code.
9860 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
9861 code.
9862 (Analyze_Package_Instantiation): Install and revert the Ghost region
9863 of the package instantiation.
9864 (Analyze_Subprogram_Instantiation): Install
9865 and revert the Ghost region of the subprogram instantiation.
9866 (Instantiate_Package_Body): Code clean up. Install and revert the
9867 Ghost region of the package body.
9868 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
9869 Ghost region of the subprogram body.
9870 * sem_ch13.adb (Build_Predicate_Functions): Install
9871 and revert the Ghost region of the related type.
9872 (Build_Predicate_Function_Declaration): Code clean up. Install
9873 and rever the Ghost region of the related type.
9874 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
9875 Install and revert the Ghost region of the pragma.
9876 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
9877 Ghost region of the pragma.
9878 (Analyze_Pragma): Install and revert the Ghost region of various
9879 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
9880 or encloses a Ghost entity.
9881 (Analyze_Pre_Post_Condition): Install and revert the Ghost
9882 region of the pragma.
9883 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
9884 Ghost region of the pragma.
9885 * sem_res.adb (Resolve): Remove all Ghost-related code.
9886 * sem_util.adb (Is_Declaration): Reimplemented.
9887 (Is_Declaration_Other_Than_Renaming): New routine.
9888 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
9889 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
9890 (Is_Ghost_Pragma): Removed.
9891 (Is_Ignored_Ghost_Pragma): New routine.
9892 (Set_Is_Checked_Ghost_Pragma): New routine.
9893 (Set_Is_Ghost_Pragma): Removed.
9894 (Set_Is_Ignored_Ghost_Pragma): New routine.
9895 * sinfo.ads: Update the documentation on Ghost mode and
9896 Ghost regions. New attributes Is_Checked_Ghost_Pragma
9897 and Is_Ignored_Ghost_Pragma along with usages in nodes.
9898 Remove attribute Is_Ghost_Pragma along with usages in nodes.
9899 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
9900 (Is_Ghost_Pragma): Removed along with pragma Inline.
9901 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
9902 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
9903 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
9904 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
9905
9906 2017-01-12 Tristan Gingold <gingold@adacore.com>
9907
9908 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
9909 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
9910
9911 2017-01-12 Yannick Moy <moy@adacore.com>
9912
9913 * errout.adb, errout.ads (Initialize): Factor common treatment
9914 in Reset_Warnings.
9915 (Reset_Warnings): New procedure to reset counts related to warnings.
9916 (Record_Compilation_Errors): New variable to store the presence of an
9917 error, used in gnat2why to allow changing the Warning_Mode.
9918 (Compilation_Errors): Use new variable Record_Compilation_Errors to
9919 store the presence of an error.
9920
9921 2017-01-12 Javier Miranda <miranda@adacore.com>
9922
9923 * sem_ch13.adb (Analyze_Aspect_Specifications):
9924 For Interrupt_Handler and Attach_ Handler aspects, decorate the
9925 internally built reference to the protected procedure as coming
9926 from sources and force its analysis.
9927
9928 2017-01-12 Ed Schonberg <schonberg@adacore.com>
9929
9930 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
9931 inherit predicates if any from the first_subtype of the parent,
9932 not from the anonymous parent type.
9933 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
9934 predicate is not a static subtype.
9935
9936 2017-01-12 Gary Dismukes <dismukes@adacore.com>
9937
9938 * freeze.adb (Check_Suspicious_Convention): New procedure
9939 performing a warning check on discriminated record types with
9940 convention C or C++. Factored out of procedure Freeze_Record_Type,
9941 and changed to only apply to base types (to avoid spurious
9942 warnings on subtypes). Minor improvement of warning messages
9943 to refer to discriminated rather than variant record types.
9944 (Freeze_Record_Type): Remove code for performing a suspicious
9945 convention check.
9946 (Freeze_Entity): Only call Freeze_Record_Type
9947 on types that aren't declared within any enclosing generic units
9948 (rather than just excluding the type when the innermost scope
9949 is generic). Call Check_Suspicious_Convention whether or not
9950 the type is declared within a generic unit.
9951 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
9952 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
9953 from Sem_Ch8).
9954
9955 2017-01-12 Tristan Gingold <gingold@adacore.com>
9956
9957 * sysdep.c, adaint.c, rtinit.c, ming32.h:
9958 (__gnat_current_codepage): Renamed from CurrentCodePage
9959 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
9960
9961 2017-01-12 Ed Schonberg <schonberg@adacore.com>
9962
9963 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
9964 quantified expressions, following AI12-050: the loop parameters
9965 of two quantified expressions are conformant if they have the
9966 same identifier.
9967
9968 2017-01-12 Arnaud Charlet <charlet@adacore.com>
9969
9970 * gcc-interface/Makefile.in: Clean up VxWorks targets.
9971
9972 2017-01-12 Ed Schonberg <schonberg@adacore.com>
9973
9974 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
9975 Hnadle properly the attribute reference when it appears as part
9976 of an expression in another loop aspect.
9977
9978 2017-01-12 Ed Schonberg <schonberg@adacore.com>
9979
9980 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
9981 subsidiary of Build_Initialization_Call, to complete generation
9982 of predicate checks on discriminants whose (sub)types have
9983 predicates, and to add checks on variants that do not have an
9984 others clause.
9985 * sem_util.adb (Gather_Components): A missing Others alternative is
9986 not an error when the type of the discriminant is a static predicate
9987 (and coverage has been checked when analyzing the case statement). A
9988 runtime check is generated to verify that a given discriminant
9989 satisfies the predicate (RM 3.8.1. (21.1/2)).
9990
9991 2017-01-12 Yannick Moy <moy@adacore.com>
9992
9993 * gnat1drv.adb (Adjust_Global_Switches): Only
9994 perform checking of exception mechanism when generating code.
9995
9996 2017-01-12 Justin Squirek <squirek@adacore.com>
9997
9998 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
9999 Remove handling of access component with invariant.
10000 (Build_Invariant_Procedure_Declaration): Remove return on class
10001 wide type.
10002 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
10003 conditional exception for component or array so Has_Own_Invariants
10004 flag is not falsly set.
10005 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
10006 wide type to have no invariant flags.
10007
10008 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10009
10010 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
10011 sem_ch13.adb: Minor reformatting.
10012
10013 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10014
10015 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
10016 adjustment primitive when the ancestor type was not properly frozen.
10017 (Gen_Assign): Guard against a missing initialization
10018 primitive when the component type was not properly frozen.
10019 (Initialize_Array_Component): Guard against a missing adjustment
10020 primitive when the component type was not properly frozen.
10021 (Initialize_Record_Component): Guard against a missing adjustment
10022 primitive when the component type was not properly frozen.
10023 (Process_Transient_Component_Completion): The transient object may
10024 not be finalized when its associated type was not properly frozen.
10025 * exp_ch3.adb (Build_Assignment): Guard against a missing
10026 adjustment primitive when the component type was not properly frozen.
10027 (Build_Initialization_Call): Guard against a missing
10028 initialization primitive when the associated type was not properly
10029 frozen.
10030 (Expand_N_Object_Declaration): Guard against a missing
10031 adjustment primitive when the base type was not properly frozen.
10032 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
10033 body when there is no adjustment primitive available. Create an
10034 empty Deep_Finalize body when there is no finalization primitive
10035 available.
10036 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
10037 missing finalization primitive when the designated type was
10038 not properly frozen.
10039 (Expand_N_Allocator): Guard against a missing initialization primitive
10040 when the designated type was not properly frozen.
10041 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
10042 only when the corresponding adjustment primitive is available.
10043 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
10044 adjustment/finalization statements only when there is an available
10045 primitive to carry out the action.
10046 (Build_Initialize_Statements): Generate the initialization/finalization
10047 statements only when there is an available primitive to carry out the
10048 action.
10049 (Make_Adjust_Call): Do not generate a call when the underlying
10050 type is not present due to a possible missing full view.
10051 (Make_Final_Call): Do not generate a call when the underlying
10052 type is not present due to a possible missing full view.
10053 (Make_Finalize_Address_Stmts): Generate an empty body when the
10054 designated type lacks a finalization primitive.
10055 (Make_Init_Call): Do not generate a call when the underlying type is
10056 not present due to a possible missing full view.
10057 (Process_Component_For_Adjust): Add the adjustment call only when the
10058 corresponding adjustment primitive is available.
10059 (Process_Component_For_Finalize): Add the finalization call only when
10060 the corresponding finalization primitive is available.
10061 (Process_Object_Declaration): Use a null statement to emulate a
10062 missing call to the finalization primitive of the object type.
10063 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
10064 (Make_Final_Call): Update the comment on usage.
10065 (Make_Init_Call): Update the comment on usage.
10066 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
10067
10068 2017-01-12 Arnaud Charlet <charlet@adacore.com>
10069
10070 * einfo.ads: Update documentation of Address_Taken.
10071 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
10072 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
10073 for subprograms when setting Address_Taken flag.
10074
10075 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
10076
10077 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
10078 Configurable_Run_Time_Mode off when analysing with'ed predefined
10079 libraries.
10080
10081 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10082
10083 * sem_prag.adb: Minor reformatting.
10084 * sem_util.adb (Unique_Entity): fix result for
10085 bodies of entry families.
10086
10087 2017-01-12 Justin Squirek <squirek@adacore.com>
10088
10089 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
10090 Resolve_Suppressible in the pragma Assertion_Policy case.
10091 (Resolve_Suppressible): Created this function to factor out
10092 common code used to resolve Suppress to either Ignore or Check
10093 * snames.ads-tmpl: Add name for Suppressible.
10094
10095 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10096
10097 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
10098 reformatting.
10099 * debug.adb: Minor comment fixes.
10100
10101 2017-01-12 Arnaud Charlet <charlet@adacore.com>
10102
10103 * sem_util.adb (Unique_Entity): For concurrent
10104 bodies that are defined with stubs and complete a declaration
10105 of a single concurrent object return the entity of an implicit
10106 concurrent type, not the entity of the anonymous concurrent
10107 object.
10108 * debug.adb: -gnatd.J is no longer used.
10109 * make.adb (Globalize): Removed, no longer used.
10110 * sem_ch9.adb: minor typo in comment for entry index
10111
10112 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
10113
10114 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
10115 * exp_ch3.adb (Build_Init_Statements): As part of initialising
10116 the value record of a task, set its _Secondary_Stack_Size field
10117 if present.
10118 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
10119 a _Secondary_Stack_Size field in the value record of
10120 the task if a Secondary_Stack_Size rep item is present.
10121 (Make_Task_Create_Call): Include secondary stack size
10122 parameter. If No_Secondary_Stack restriction is in place, passes
10123 stack size of 0.
10124 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
10125 Secondary_Stack_Size.
10126 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
10127 function to define the overhead of the secondary stack.
10128 * s-tarest.adb (Create_Restricted_Task,
10129 Create_Restricted_Task_Sequential): Functions now include
10130 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
10131 * s-tarest.adb (Create_Restricted_Task,
10132 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
10133 include Secondary_Stack_Size parameter.
10134 (Task_Wrapper): Secondary stack now allocated to the size specified by
10135 the Secondary_Stack_Size parameter in the task's ATCB.
10136 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
10137 Secondary_Stack_Size component.
10138 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
10139 Create_Restricted_Task_Sequential): Function now include
10140 Secondary_Stack_Size parameter.
10141 (Task_Wrapper): Secondary stack now allocated to the size
10142 specified by the Secondary_Stack_Size parameter in the task's
10143 ATCB.
10144 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
10145 to include Secondary_Stack_Size parameter.
10146 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
10147 Secondary_Stack_Size aspect, turning the aspect into its corresponding
10148 internal attribute.
10149 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
10150 * snames.adb-tmpl, snames.ads-tmpl: Added names
10151 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
10152 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
10153
10154 2017-01-12 Yannick Moy <moy@adacore.com>
10155
10156 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
10157 subtree.
10158
10159 2017-01-12 Justin Squirek <squirek@adacore.com>
10160
10161 * exp_attr.adb (Expand_N_Attribute_Reference):
10162 Fix Finalization_Size case by properly resolving the type after
10163 rewritting the node.
10164
10165 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10166
10167 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
10168 the tree.
10169 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
10170 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
10171 exp_sel.ads: Minor reformatting.
10172
10173 2017-01-12 Justin Squirek <squirek@adacore.com>
10174
10175 * exp_ch6.adb (Expand_Call): Add guard to prevent
10176 invariant checks from being created for internally generated
10177 subprograms.
10178
10179 2017-01-12 Bob Duff <duff@adacore.com>
10180
10181 * lib-writ.ads: Remove incorrect comment.
10182
10183 2017-01-12 Javier Miranda <miranda@adacore.com>
10184
10185 * debug.adb (-gnatd.K): Enable generation of contract-only
10186 procedures in CodePeer mode.
10187 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
10188 New subprogram.
10189 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
10190 set.
10191 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
10192 subprogram.
10193 (Get_Contract_Only_Missing_Body_Name): New subprogram.
10194 (Get_Contract_Only_Body): New subprogram.
10195 (Set_Contract_Only_Body): New subprogram.
10196 (Is_Contract_Only_Body): New subprogram.
10197 (Set_Is_Contract_Only_Body): New subprogram.
10198 (SCIL_Nodes): Replace table by hash-table.
10199
10200 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10201
10202 * exp_ch6.adb: Minor reformatting.
10203 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
10204
10205 2017-01-12 Bob Duff <duff@adacore.com>
10206
10207 * binde.adb (Forced): New reason for a dependence.
10208 (Force_Elab_Order): Implementation of the new switch.
10209 * binde.ads: Minor comment fixes.
10210 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
10211 long ago that is no longer supported; removed comment about that.
10212 * opt.ads (Force_Elab_Order_File): Name of file specified for
10213 -f switch.
10214 * switch-b.adb: Parse -f switch.
10215
10216 2017-01-12 Justin Squirek <squirek@adacore.com>
10217
10218 * exp_ch6.adb (Check_View_Conversion): Created this function
10219 to properly chain calls to check type invariants that may be
10220 present in a subprogram call after the subprogram.
10221 (Expand_Call): Add a conditional to identify when a view conversion
10222 needs to be checked.
10223 * nlists.adb, nlists.ads (Prepend_New): New routine.
10224 (Prepend_New_To): New routine.
10225
10226 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10227
10228 * sinfo.ads: Minor reformatting.
10229
10230 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10231
10232 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
10233 reformatting.
10234
10235 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10236
10237 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
10238 variable Definite. Create a local object and pass its 'Access to the
10239 BIP function when the result type is either definite or it does not
10240 require any finalization or secondary stack management.
10241
10242 2017-01-12 Bob Duff <duff@adacore.com>
10243
10244 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
10245 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
10246 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
10247 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
10248 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
10249 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
10250 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
10251 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
10252 Change name to Pragma_Name_Unmapped.
10253 (Pragma_Name_Mapped): Change name to Pragma_Name.
10254 This is because the "mapped" version should be the usual case.
10255
10256 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
10257
10258 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
10259 Is_Default_Init_Cond_Procedure, and
10260 Has_Inherited_Default_Init_Cond. Add uses of flags
10261 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
10262 (Default_Init_Cond_Procedure): Removed.
10263 (DIC_Procedure): New routine.
10264 (Has_Default_Init_Cond): Removed.
10265 (Has_DIC): New routine.
10266 (Has_Inheritable_Invariants): The attribute applies to the base type.
10267 (Has_Inherited_Default_Init_Cond): Removed.
10268 (Has_Inherited_DIC): New routine.
10269 (Has_Inherited_Invariants): The attribute applies to the base type.
10270 (Has_Own_DIC): New routine.
10271 (Has_Own_Invariants): The attribute applies to the base type.
10272 (Is_Default_Init_Cond_Procedure): Removed.
10273 (Is_DIC_Procedure): New routine.
10274 (Set_Default_Init_Cond_Procedure): Removed.
10275 (Set_DIC_Procedure): New routine.
10276 (Set_Has_Default_Init_Cond): Removed.
10277 (Set_Has_Inheritable_Invariants): The attribute applies
10278 to the base type.
10279 (Set_Has_Inherited_Default_Init_Cond): Removed.
10280 (Set_Has_Inherited_DIC): New routine.
10281 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
10282 (Set_Has_Own_DIC): New routine.
10283 (Set_Has_Own_Invariants): The attribute applies to the base type.
10284 (Set_Is_Default_Init_Cond_Procedure): Removed.
10285 (Set_Is_DIC_Procedure): New routine.
10286 (Write_Entity_Flags): Update the output of all flags related to
10287 default initial condition.
10288 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
10289 of the call to the DIC procedure.
10290 (Freeze_Type): Generate the body of the DIC procedure.
10291 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
10292 all occurrences of Create_Append with Append_New_To. Do
10293 not generate an invariant procedure for a class-wide type.
10294 The generated body acts as a freeze action of the working type.
10295 (Build_Invariant_Procedure_Declaration): Do not generate an
10296 invariant procedure for a class-wide type.
10297 (Create_Append): Removed.
10298 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
10299 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
10300 class-wide pre/postcondition description and data structures from
10301 Sem_Prag.
10302 (Build_Class_Wide_Expression): Moved from Sem_Prag.
10303 (Build_DIC_Call): New routine.
10304 (Build_DIC_Procedure_Body): New routine.
10305 (Build_DIC_Procedure_Declaration): New routine.
10306 (Entity_Hash): Moved from Sem_Prag.
10307 (Find_DIC_Type): New routine.
10308 (Update_Primitives_Mapping): Reimplemented.
10309 (Update_Primitives_Mapping_Of_Types): New routine.
10310 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
10311 (Build_DIC_Call): New routine.
10312 (Build_DIC_Procedure_Body): New routine.
10313 (Build_DIC_Procedure_Declaration): New routine.
10314 (Update_Primitives_Mapping): Moved from Sem_Prag.
10315 (Update_Primitives_Mapping_Of_Types): New routine.
10316 * nlists.adb (Append_New): New routine.
10317 (Append_New_To): New routine.
10318 * nlists.ads (Append_New): New routine.
10319 (Append_New_To): New routine.
10320 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
10321 of DIC procedures here. This is now done at the end of the
10322 visible declarations, private declarations, and at the freeze
10323 point of a type.
10324 (Analyze_Private_Extension_Declaration):
10325 A private extension inherits the DIC pragma of a parent type.
10326 (Analyze_Subtype_Declaration): No need to propagate invariant
10327 attributes to a subtype as those apply to the base type.
10328 (Build_Derived_Record_Type): No need to inherit invariants here
10329 as this is now done in Build_Derived_Type.
10330 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
10331 a parent type.
10332 (Process_Full_View): Update the propagation of DIC attributes.
10333 (Propagate_Default_Init_Cond_Attributes): Removed.
10334 * sem_ch7.adb Add with and use clauses for Exp_Util.
10335 (Analyze_Package_Specification): Create the body of the DIC
10336 procedure at the end of the visible and private declarations.
10337 (Preserve_Full_Attributes): Propagate DIC attributes.
10338 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
10339 DIC attributes.
10340 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
10341 * sem_elab.adb (Check_A_Call): Update the call to
10342 Is_Nontrivial_Default_Init_Cond_Procedure.
10343 * sem_prag.adb Remove the with and use clauses for
10344 GNAT.HTable. Move the handling of class- wide pre/postcondition
10345 description and data structures to Exp_Util.
10346 (Analyze_Pragma): Create the declaration of the DIC procedure. There
10347 is no need to propagate invariant-related attributes at this point
10348 as this is done in Build_Invariant_Procedure_Declaration.
10349 (Build_Class_Wide_Expression): Moved to Exp_Util.
10350 (Entity_Hash): Moved to Exp_Util.
10351 (Update_Primitives_Mapping): Moved to Exp_Util.
10352 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
10353 (Update_Primitives_Mapping): Moved to Exp_Util.
10354 * sem_util.adb: Remove with and use clauses for Ghost
10355 and Sem_Ch13.
10356 (Build_Default_Init_Cond_Call): Removed.
10357 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
10358 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
10359 (Get_Views): Reimplemented.
10360 (Has_Full_Default_Initialization): Reimplement the section on DIC.
10361 (Inherit_Default_Init_Cond_Procedure): Removed.
10362 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
10363 (Is_Nontrivial_DIC_Procedure): New routine.
10364 (Is_Verifiable_DIC_Pragma): New routine.
10365 (Propagate_DIC_Attributes): New routine.
10366 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
10367 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
10368 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
10369 (Inherit_Default_Init_Cond_Procedure): Removed.
10370 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
10371 (Is_Nontrivial_DIC_Procedure): New routine.
10372 (Is_Verifiable_DIC_Pragma): New routine.
10373 (Propagate_DIC_Attributes): New routine.
10374 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
10375 on DIC.
10376 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
10377 usage in nodes.
10378 (Expression_Copy): New routine along with pragma Inline.
10379 (Set_Expression_Copy): New routine along with pragma Inline.
10380
10381 2017-01-06 Bob Duff <duff@adacore.com>
10382
10383 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
10384 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
10385 we won't generate the call to s_stalib_adafinal when the main
10386 is not written in Ada.
10387
10388 2017-01-06 Bob Duff <duff@adacore.com>
10389
10390 * sem_prag.adb: Minor: remove pragma Warnings.
10391
10392 2017-01-06 Tristan Gingold <gingold@adacore.com>
10393
10394 * Makefile.rtl: Do not compile s-stchop by default.
10395
10396 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
10397
10398 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
10399 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
10400 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
10401 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
10402 Reverted previous change for now.
10403
10404 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10405
10406 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
10407 check to default discriminant value if checks are enabled.
10408 (Build_Assignment): If type of component has static predicate,
10409 apply check to its default value, if any.
10410
10411 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
10412
10413 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
10414 * exp_ch3.adb (Build_Init_Statements): As part of initialising
10415 the value record of a task, set its _Secondary_Stack_Size field
10416 if present.
10417 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
10418 a _Secondary_Stack_Size field in the value record of
10419 the task if a Secondary_Stack_Size rep item is present.
10420 (Make_Task_Create_Call): Include secondary stack size
10421 parameter. If No_Secondary_Stack restriction is in place, passes
10422 stack size of 0.
10423 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
10424 Secondary_Stack_Size.
10425 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
10426 function to define the overhead of the secondary stack.
10427 * s-tarest.adb (Create_Restricted_Task,
10428 Create_Restricted_Task_Sequential): Functions now include
10429 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
10430 * s-tarest.adb (Create_Restricted_Task,
10431 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
10432 now include Secondary_Stack_Size parameter.
10433 (Task_Wrapper):
10434 Secondary stack now allocated to the size specified by the
10435 Secondary_Stack_Size parameter in the task's ATCB.
10436 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
10437 Secondary_Stack_Size component.
10438 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
10439 Create_Restricted_Task_Sequential): Function now include
10440 Secondary_Stack_Size parameter.
10441 (Task_Wrapper): Secondary stack
10442 now allocated to the size specified by the Secondary_Stack_Size
10443 parameter in the task's ATCB.
10444 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
10445 for Secondary_Stack_Size aspect, turning the aspect into its
10446 corresponding internal attribute.
10447 (Analyze_Attribute_Definition):
10448 Process Secondary_Stack_Size attribute.
10449 * snames.adb-tmpl, snames.ads-tmpl: Added names
10450 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
10451 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
10452
10453 2017-01-06 Pascal Obry <obry@adacore.com>
10454
10455 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
10456 Sequential_IO and Direct_IO.
10457
10458 2017-01-06 Bob Duff <duff@adacore.com>
10459
10460 * snames.ads-tmpl (Renamed): New name for the pragma argument.
10461 * par-ch2.adb: Allow the new pragma (with analysis deferred
10462 to Sem_Prag).
10463 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
10464 Keep a mapping from new pragma names to old names.
10465 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
10466 implement it by calling Map_Pragma_Name.
10467 * checks.adb, contracts.adb, einfo.adb, errout.adb,
10468 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
10469 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
10470 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
10471 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
10472 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
10473 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
10474 as appropriate.
10475
10476 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10477
10478 * exp_ch9.adb: Minor reformatting.
10479
10480 2017-01-06 Tristan Gingold <gingold@adacore.com>
10481
10482 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
10483 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
10484 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
10485 (unused).
10486 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
10487 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
10488 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
10489 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
10490
10491 2017-01-06 Bob Duff <duff@adacore.com>
10492
10493 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
10494 dummy implementation of Map_Pragma_Name.
10495
10496 2017-01-06 Tristan Gingold <gingold@adacore.com>
10497
10498 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
10499 entry_body variable constant.
10500 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
10501 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
10502 to constant.
10503 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
10504 now access to constant.
10505
10506 2017-01-06 Gary Dismukes <dismukes@adacore.com>
10507
10508 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
10509 reformatting and typo fixes.
10510
10511 2017-01-06 Bob Duff <duff@adacore.com>
10512
10513 * snames.ads-tmpl: New names for pragma renaming.
10514 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
10515 * par-prag.adb: Add new pragma name to case statement.
10516 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
10517 of the pragma.
10518 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
10519 Dummy implementation of Pragma_Name_Mapped.
10520
10521 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10522
10523 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
10524 better detect call within an entry_wrapper.
10525 * sem_res.adb (Resolve_Call): A protected call within an
10526 entity_wrapper is analyzed in the context of the protected
10527 object but corresponds to a pre-analysis and is not an access
10528 before elaboration.
10529 * sem_attr.adb: Minor reformatting.
10530
10531 2017-01-06 Justin Squirek <squirek@adacore.com>
10532
10533 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
10534 Finalization_Size to allow a prefix of any non-class-wide type.
10535 * sem_attr.ads Modify comment for Finalization_Size to include
10536 definite type use case.
10537
10538 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10539
10540 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
10541 on procedures that are wrappers created for entries that have
10542 preconditions.
10543 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
10544 body is an entry_wrapper, compile it in the context of the
10545 synchronized type, because a precondition may refer to funtions
10546 of the type.
10547 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
10548 body entity.
10549 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
10550 within an Entry_Wrapper this is an external call whose target
10551 is the synchronized object that is the actual in the call to
10552 the wrapper.
10553
10554 2017-01-06 Yannick Moy <moy@adacore.com>
10555
10556 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
10557 in tree, which means not analyzing the previous prefix if the node has
10558 been rewritten into its prefix.
10559
10560 2017-01-06 Gary Dismukes <dismukes@adacore.com>
10561
10562 * s-tpobop.adb: Minor reformatting.
10563
10564 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10565
10566 * checks.adb (Ensure_Valid): Do not generate a validity check
10567 within a generated predicate function, validity checks will have
10568 been applied earlier when required.
10569
10570 2017-01-06 Tristan Gingold <gingold@adacore.com>
10571
10572 * s-tpoben.ads (Protection_Entries): Add comment and reorder
10573 components for performances.
10574 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
10575 semantic.
10576
10577 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10578
10579 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
10580 If expression is compile-time known and obeys a static predicate
10581 it must be labelled as static, to prevent spurious warnings and
10582 run-time errors, e.g. in case statements. This is relevant when
10583 the expression is the result of constant-folding a type conversion
10584 whose expression is a variable with a known static value.
10585
10586 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10587
10588 * exp_attr.adb, sem_attr.ads: Minor reformatting.
10589
10590 2017-01-06 Justin Squirek <squirek@adacore.com>
10591
10592 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
10593 expansion of Finalization_Size attribute.
10594 * sem_attr.adb (Analyze_Attribute): Add entry to check the
10595 semantics of Finalization_Size.
10596 (Eval_Attribute): Add null entry for Finalization_Size.
10597 * sem_attr.ads: Add Finalization_Size to the implementation
10598 dependent attribute list.
10599 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
10600
10601 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10602
10603 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
10604 iterator specification with a serious syntactic error, transform
10605 construct into an infinite loop in order to continue analysis
10606 and prevent a compiler abort.
10607
10608 2017-01-06 Tristan Gingold <gingold@adacore.com>
10609
10610 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
10611 max_queue_lengths_array if unused.
10612
10613 2017-01-06 Bob Duff <duff@adacore.com>
10614
10615 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
10616 array access, in case "\" is at the end of Text.
10617 * stylesw.adb (Set_Style_Check_Options): Don't include input
10618 characters in the error message template, because they could
10619 be control characters such as "\", which Errout will try to
10620 interpret.
10621
10622 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10623
10624 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
10625 For a private type examine the visible declarations that follow
10626 the partial view, not just the private declarations that follow
10627 the full view.
10628
10629 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10630
10631 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
10632 code cleanup.
10633
10634 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10635
10636 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
10637 alias of the inherited op is the parent iterator, no need to
10638 examine dispatch table positions which might not be established
10639 yet if type is not frozen.
10640 * sem_disp.adb (Check_Controlling_Formals): The formal of a
10641 predicate function may be a subtype of a tagged type.
10642 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
10643 of representation items for the completion of a type extension
10644 where a predicate applies to the partial view.
10645 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
10646 parameter that designates function whose actual receives a
10647 predicate check, to improve warning message when the check will
10648 lead to infinite recursion.
10649 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
10650 Apply_Predicate_Check.
10651
10652 2017-01-06 Tristan Gingold <gingold@adacore.com>
10653
10654 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
10655 Gnat_Extended_Ravenscar.
10656 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
10657
10658 2017-01-06 Gary Dismukes <dismukes@adacore.com>
10659
10660 * sem_util.ads: Minor typo fix and reformatting.
10661
10662 2017-01-06 Yannick Moy <moy@adacore.com>
10663
10664 * ghost.adb Minor fixing of references to SPARK RM.
10665 (Check_Ghost_Context): Check whether reference is to a lvalue
10666 before issuing an error about violation of SPARK RM 6.9(13)
10667 when declaration has Ghost policy Check and reference has Ghost
10668 policy Ignore.
10669 * sem_util.adb Minor indentation.
10670 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
10671 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
10672 * sem_util.ads (Unique_Defining_Entity): Document the result
10673 for package body stubs.
10674
10675 2017-01-06 Tristan Gingold <gingold@adacore.com>
10676
10677 * raise-gcc.c (abort): Macro to call Abort_Propagation.
10678 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
10679 constant.
10680 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
10681 Do not generate the Entry_Max_Queue_Lengths_Array if all default
10682 values.
10683 * exp_util.adb (Corresponding_Runtime_Package): Consider
10684 Max_Queue_Length pragma.
10685
10686 2017-01-06 Justin Squirek <squirek@adacore.com>
10687
10688 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
10689 Remove declaration generation in the case of
10690 System_Tasking_Protected_Objects_Single_Entry being used,
10691 and add a warning message when this is detected to occur.
10692 (Make_Initialize_Protection): Remove reference pass in the case
10693 of System_Tasking_Protected_Objects_Single_Entry.
10694 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
10695 * s-tposen.adb (Initialize_Protection_Entry): Remove
10696 Entry_Queue_Max parameter.
10697 * s-tposen.ads: Remove the types use to store the entry queue
10698 maximum.
10699 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
10700
10701 2017-01-06 Yannick Moy <moy@adacore.com>
10702
10703 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
10704 behavior of function, to also accept out of range positions
10705 and raise Constraint_Error in such case, and to copy sloc from
10706 literal if No_Location passed as location.
10707 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
10708 of functions to raise Constraint_Error in case of value not in
10709 appropriate range.
10710
10711 2017-01-06 Tristan Gingold <gingold@adacore.com>
10712
10713 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
10714 Invalidate_Stack_Cache.
10715
10716 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
10717
10718 * s-os_lib.adb: Minor fix to the signature of Readlink.
10719
10720 2017-01-06 Javier Miranda <miranda@adacore.com>
10721
10722 * sem_ch6.adb (Conforming_Types): Handle another
10723 confusion between views in a nested instance with an actual
10724 private type whose full view is not in scope.
10725
10726 2017-01-06 Arnaud Charlet <charlet@adacore.com>
10727
10728 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
10729 mark a rewritten if statement as explicit (Comes_From_Source).
10730
10731 2017-01-06 Gary Dismukes <dismukes@adacore.com>
10732
10733 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
10734
10735 2017-01-06 Tristan Gingold <gingold@adacore.com>
10736
10737 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
10738
10739 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10740
10741 * sem_case.adb: Minor reformatting.
10742
10743 2017-01-06 Thomas Quinot <quinot@adacore.com>
10744
10745 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
10746
10747 2017-01-06 Justin Squirek <squirek@adacore.com>
10748
10749 * aspects.adb: Register aspect in Canonical_Aspect.
10750 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
10751 into respective tables.
10752 * einfo.ads, einfo.adb: Add a new attribute for
10753 handling the parameters for Pragma_Max_Entry_Queue
10754 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
10755 for accessing and setting were added as well.
10756 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
10757 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
10758 declaration for pramga arguments and store them in the protected
10759 type node.
10760 (Make_Initialize_Protection): Pass a reference to
10761 the Entry_Max_Queue_Lengths_Array in the protected type node to
10762 the runtime.
10763 * rtsfind.adb: Minor grammar fix.
10764 * rtsfind.ads: Register new types taken from the
10765 runtime libraries RE_Protected_Entry_Queue_Max and
10766 RE_Protected_Entry_Queue_Max_Array
10767 * s-tposen.adb, s-tpoben.adb
10768 (Initialize_Protection_Entry/Initialize_Protection_Entries):
10769 Add extra parameter and add assignment to local object.
10770 * s-tposen.ads, s-tpoben.ads: Add new types to
10771 store entry queue maximums and a field to the entry object record.
10772 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
10773 for Aspect_Max_Queue_Length.
10774 (Check_Aspect_At_Freeze_Point):
10775 Add aspect to list of aspects that don't require delayed analysis.
10776 * sem_prag.adb (Analyze_Pragma): Add case statement for
10777 Pragma_Max_Queue_Length, check semantics, and register arugments
10778 in the respective entry nodes.
10779 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
10780 and Has_Max_Queue_Length
10781 * snames.ads-tmpl: Add constant for the new aspect-name
10782 Name_Max_Queue_Length and corrasponding pragma.
10783
10784 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10785
10786 * exp_util.adb (Is_Controlled_Function_Call):
10787 Reimplemented. Consider any node which has an entity as the
10788 function call may appear in various ways.
10789
10790 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10791
10792 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
10793 an unchecked type conversion when performing a view conversion
10794 to/from a private type. In all other cases use a regular type
10795 conversion to ensure that any relevant checks are properly
10796 installed.
10797
10798 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10799
10800 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
10801
10802 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10803
10804 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
10805 error on case expression that is an entity, when coverage is
10806 incomplete and entity has a static value obtained by local
10807 propagation.
10808 (Handle_Static_Predicate): New procedure, subsidiary of
10809 Check_Choices, to handle case alternatives that are either
10810 subtype names or subtype indications involving subtypes that
10811 have static predicates.
10812
10813 2017-01-06 Thomas Quinot <quinot@adacore.com>
10814
10815 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
10816 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
10817
10818 2017-01-06 Bob Duff <duff@adacore.com>
10819
10820 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
10821 Elaborate_All(P) to P itself. That could happen in obscure cases,
10822 and always introduced a cycle (P body must be elaborated before
10823 P body).
10824 * lib-writ.ads: Comment clarification.
10825 * ali-util.ads: Minor comment fix.
10826 * ali.adb: Minor reformatting.
10827
10828 2017-01-06 Tristan Gingold <gingold@adacore.com>
10829
10830 * a-exexpr-gcc.adb: Improve comment.
10831
10832 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
10833
10834 * s-linux-mips.ads: Use correct signal and errno constants.
10835 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
10836
10837 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
10838
10839 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
10840 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
10841 sections.
10842
10843 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
10844
10845 * gnatvsn.ads: Bump copyright year.
10846
10847 2017-01-01 Jakub Jelinek <jakub@redhat.com>
10848
10849 * gnat_ugn.texi: Bump @copying's copyright year.
10850 * gnat_rm.texi: Likewise.
10851 \f
10852 Copyright (C) 2017 Free Software Foundation, Inc.
10853
10854 Copying and distribution of this file, with or without modification,
10855 are permitted in any medium without royalty provided the copyright
10856 notice and this notice are preserved.
This page took 0.490063 seconds and 4 git commands to generate.