sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
[gcc.git] / gcc / ada / ChangeLog
1 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2
3 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
4 * sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
5 of Check_Indexing_Functions, to verify that a derived type with an
6 Indexing aspect is not inheriting such an aspect from an ancestor.
7 (Check_Indexing_Functions): Call Check_Inherited_Indexing within
8 an instance.
9
10 2015-10-26 Gary Dismukes <dismukes@adacore.com>
11
12 * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
13 typo corrections.
14
15 2015-10-26 Ed Schonberg <schonberg@adacore.com>
16
17 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
18 recheck the consistency betwen the freeze point and the end of
19 declarations for the expression in an aspect specification,
20 because it was done already in the analysis of the generic.
21 Furthermore, the delayed analysis of an aspect of the instance
22 may produce spurious errors when the generic is a child unit
23 that references entities in the parent (which might not be in
24 scope at the freeze point of the instance).
25
26 2015-10-26 Yannick Moy <moy@adacore.com>
27
28 * sem_res.adb (Resolve_Call): Issue info message
29 instead of warning when call cannot be inlined in GNATprove mode.
30
31 2015-10-26 Arnaud Charlet <charlet@adacore.com>
32
33 * exp_ch6.adb (Build_Procedure_Form): Use _result as the
34 name of the extra parameter, cleaner than a random temp name.
35 * gnat1drv.adb (Gnat1drv): Code clean up.
36
37 2015-10-24 Eric Botcazou <ebotcazou@adacore.com>
38
39 * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
40 (build_unary_op): Likewise.
41
42 2015-10-23 Arnaud Charlet <charlet@adacore.com>
43
44 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
45 * doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
46 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
47 doc/gnat_ugn/gnat_and_program_execution.rst,
48 doc/gnat_rm/implementation_defined_attributes.rst,
49 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
50 doc/gnat_rm/representation_clauses_and_pragmas.rst,
51 doc/gnat_rm/implementation_defined_pragmas.rst,
52 doc/gnat_rm/about_this_guide.rst,
53 doc/gnat_rm/implementation_of_ada_2012_features.rst,
54 doc/gnat_rm/implementation_of_specific_ada_features.rst,
55 doc/gnat_rm/implementation_defined_aspects.rst,
56 doc/gnat_rm/implementation_advice.rst: Update documentation.
57
58 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
59
60 * contracts.ads, contracts.adb: New unit.
61 * exp_ch6.adb Add with and use clauses for Contracts.
62 (Expand_Subprogram_Contract): Moved to Contracts.
63 * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
64 * sem_ch3.adb Add with and use clauses for Contracts.
65 (Analyze_Object_Contract): Moved to Contracts.
66 (Analyze_Declarations): Remove local variable Pack_Decl. Do not
67 capture global references in contracts. Check the hidden states
68 of a package body.
69 * sem_ch6.adb Add with and use clauses in Contracts.
70 (Analyze_Generic_Subprogram_Body): Do not capture global
71 references in contracts.
72 (Analyze_Subprogram_Body_Contract):
73 Moved to Contracts.
74 (Analyze_Subprogram_Body_Helper): Freeze the
75 contract of the nearest enclosing package body. Always analyze
76 the subprogram body contract. Do not expand the subprogram
77 body contract.
78 (Analyze_Subprogram_Contract): Moved to Contracts.
79 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
80 (Analyze_Subprogram_Contract): Moved to Contracts.
81 * sem_ch7.adb Add with and use clauses for Contracts.
82 (Analyze_Package_Body_Contract): Moved to Contracts.
83 (Analyze_Package_Body_Helper): Freeze the contract of the
84 nearest enclosing package body.
85 (Analyze_Package_Contract): Moved to Contracts.
86 * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
87 (Analyze_Package_Contract): Moved to Contracts.
88 * sem_ch10.adb Add with and use clauses for Contracts.
89 (Analyze_Compilation_Unit): Do not capture global references
90 in contracts.
91 (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
92 * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
93 to Contracts.
94 * sem_ch12.adb Add with and use clauses for Contracts.
95 (Analyze_Subprogram_Instantiation): Update the call to
96 Instantiate_Subprogram_Contract.
97 (Instantiate_Package_Body):
98 Do not copy the entity of the spec when creating an entity
99 for the body. Construct a brand new defining identifier for
100 the body and inherit the Comes_From_Source flag from the spec.
101 (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
102 and update all occurrences. Construct a brand new defining
103 identifier for the body and inherit the Comes_From_Source
104 flag from the spec.
105 (Instantiate_Subprogram_Contract): Moved
106 to Contracts.
107 (Save_Global_References_In_Aspects): Moved to
108 the spec of Sem_Ch12.
109 (Save_Global_References_In_Contract):
110 Moved to Contracts.
111 * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
112 the body of Sem_Ch12.
113 (Save_Global_References_In_Contract):
114 Moved to Contracts.
115 * sem_prag.adb Add with and use clauses for Contracts.
116 (Add_Item): Removed. All references to this routine have been
117 replaced with calls to Append_New_Elmt.
118 (Analyze_Constituent):
119 Add special diagnostics for errors caused by freezing of
120 contracts.
121 (Analyze_Refined_State_In_Decl_Part): Add formal
122 parameter Freeze_Id. Add new global variable Freeze_Posted.
123 (Collect_Body_States): Removed.
124 (Report_Unused_States): Removed.
125 * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
126 parameter Freeze_Id and update comment on usage.
127 * sem_util.adb Remove with and use clauses for
128 Sem_Ch12.
129 (Add_Contract_Item): Moved to Contracts.
130 (Check_Unused_Body_States): New routine.
131 (Collect_Body_States):
132 New routine.
133 (Create_Generic_Contract): Moved to Contracts.
134 (Inherit_Subprogram_Contract): Moved to Contracts.
135 (Report_Unused_Body_States): New routine.
136 * sem_util.ads (Add_Contract_Item): Moved to Contracts.
137 (Check_Unused_Body_States): New routine.
138 (Collect_Body_States): New routine.
139 (Create_Generic_Contract): Moved to Contracts.
140 (Inherit_Subprogram_Contract): Moved to Contracts.
141 (Report_Unused_Body_States): New routine.
142 * sinfo.adb (Is_Expanded_Contract): New routine.
143 (Set_Is_Expanded_Contract): New routine.
144 * sinfo.ads New attribute Is_Expanded_Contract along with
145 placement in nodes.
146 (Is_Expanded_Contract): New routine along
147 with pragma Inline.
148 (Set_Is_Expanded_Contract): New routine
149 along with pragma Inline.
150 * gcc-interface/Make-lang.in: Add entry for contracts.o
151
152 2015-10-23 Bob Duff <duff@adacore.com>
153
154 * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
155 -Es switches.
156 * switch-b.ads: Minor comment fix.
157 * bindusg.adb: Document new -Ea and -Es switches.
158 * s-exctra.ads: Use -Es instead of -E.
159
160 2015-10-23 Tristan Gingold <gingold@adacore.com>
161
162 * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
163 task and protected object restrictions.
164
165 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
166
167 * sem_ch12.adb, exp_ch6.adb: Minor reformatting.
168
169 2015-10-23 Gary Dismukes <dismukes@adacore.com>
170
171 * exp_ch6.adb: Minor reformatting.
172
173 2015-10-23 Ed Schonberg <schonberg@adacore.com>
174
175 * sem_ch12.adb (Check_Formal_Packages): A formal package whose
176 actual part is (others => <>) os identical to a formal package
177 with an actual part written as (<>).
178
179 2015-10-23 Arnaud Charlet <charlet@adacore.com>
180
181 * a-reatim.adb ("/"): For Time_Span division convert the operands
182 to integers and then use integer division, which conforms to
183 the rounding required by Ada RM.
184
185 2015-10-23 Ed Schonberg <schonberg@adacore.com>
186
187 * sem_ch6.adb (Check_Missing_Return): Do not report a missing
188 return statement on a function body constructed to complete a
189 package body for a premature instantiation.
190
191 2015-10-23 Ed Schonberg <schonberg@adacore.com>
192
193 * exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
194 original function with that of generated procedure, to simplify
195 processing and avoid scoping problems with local declarations.
196 (Rewrite_Function_Call_For_C): Handle properly the case of a
197 parameterless function.
198
199 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
200
201 * a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
202
203 2015-10-23 Arnaud Charlet <charlet@adacore.com>
204
205 * s-taskin.ads: Minor code clean up.
206 (Ada_Task_Control_Block): Move fixed size field before variable sized
207 ones.
208 * einfo.ads: Minor editing.
209
210 2015-10-23 Ed Schonberg <schonberg@adacore.com>
211
212 * sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
213 6.5 (8.3) to verify that access discriminants in an aggregate
214 in a return statement have the proper accessibility, i.e. do
215 not lead to dangling references.
216
217 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
218
219 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
220 test on Address_Clause_Overlay_Warnings to the "constant overlays
221 variable" warning. For the reverse case, also issue a warning if
222 the modification is potentially made through the initialization
223 of the variable.
224
225 2015-10-23 Jose Ruiz <ruiz@adacore.com>
226
227 * a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
228 function to have access to CPU clocks for tasks other than the
229 calling task.
230
231 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
232
233 * debug.adb: Switch -gnatd.5 is no longer in use, remove the
234 associated documentation.
235 * exp_dbug.adb (Get_External_Name): Do not add a special prefix
236 for ignored Ghost entities or when switch -gnatd.5 is enabled.
237 * exp_dbug.ads Remove the documentation concerning the encoding
238 of ignored Ghost entities.
239
240 2015-10-23 Bob Duff <duff@adacore.com>
241
242 * a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
243 mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
244 print "Exception raised".
245 * s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
246 Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.
247
248 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
249
250 * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
251 gnatname.adb: Minor reformatting.
252
253 2015-10-23 Steve Baird <baird@adacore.com>
254
255 * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
256 a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
257 a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
258 a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
259 a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
260 a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
261 a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
262 a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
263 a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
264 a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
265 pragmas.
266 * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
267 a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
268 a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
269 a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
270 a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
271 a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
272 a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
273 a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
274 a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
275 a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
276 pragmas.
277
278 2015-10-23 Vincent Celier <celier@adacore.com>
279
280 * gnatname.adb: When gnatname is invoked with a project file,
281 specified with switch -P, if gprname is available, gnatname will
282 invoke gprname, with the target if it is a cross gnatname.
283
284 2015-10-23 Arnaud Charlet <charlet@adacore.com>
285
286 * exp_ch4.adb: Fix typo.
287 * exp_ch6.adb: Update comment.
288 * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
289 * exp_aggr.adb (Convert_To_Positional): Only convert to
290 positional when generating C in case of an object declaration.
291 (In_Object_Declaration): New.
292 (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
293 * sinfo.ads: Update documentation.
294
295 2015-10-23 Joel Brobecker <brobecker@adacore.com brobecker>
296
297 * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
298 and replace them by include of corresponding header file.
299
300 2015-10-23 Bob Duff <duff@adacore.com>
301
302 * a-convec.adb (Copy): Make sure C is initialized
303 on all paths, including when Checks is False.
304
305 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
306
307 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
308 error as unreachable.
309
310 2015-10-23 Arnaud Charlet <charlet@adacore.com>
311
312 * gnat1drv.adb (Adjust_Global_Switches): Adjust.
313
314 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
315
316 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
317 ignored Ghost entities is now ___ghost_.
318
319 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
320
321 * ghost.adb (Is_Subject_To_Ghost): Check the
322 original node when searching for pragma Ghost to catch cases
323 where a source construct has been rewritten into something else.
324
325 2015-10-23 Ed Schonberg <schonberg@adacore.com>
326
327 * einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
328 that return a constrained array type. When generating C these
329 functions are rewritten as procedures with an out parameter,
330 and calls to such functions are rewritten accordingly.
331 * exp_ch6.adb (Expand_N_Subprogram_Declaration): When
332 Modify_Tree_For_C is set and the function returns a constrained
333 array type, generate a procedure declaration with an additional
334 out parameter. Mark original function as Rewritten_For_C.
335 The new declaration is inserted in tree immediately after
336 current declaration.
337 (Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
338 generate body of corresponding procedure using declarations
339 and statements for function body. Replace return statements
340 with assignments to the out parameter, followed by a simple
341 return statement.
342 (Rewrite_Function_Call_For_C): New procedure to replace a function
343 call that returns an array by a procedure call.
344
345 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
346
347 * sem_util.adb (Denotes_Iterator): New routine.
348 (Is_Iterator): Code cleanup. Factor out the detection of a
349 predefined iterator. As a result this fixes a missing case
350 where a tagged type implements interface Reversible_Iterator.
351
352 2015-10-23 Ed Schonberg <schonberg@adacore.com>
353
354 * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
355 not within a generic unit, even if expander is not active, so
356 that instances of container packages remain preelaborable in
357 -gnatc mode.
358
359 2015-10-23 Tristan Gingold <gingold@adacore.com>
360
361 * init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
362 (__gnat_error_handler): Use trampoline for arm64.
363
364 2015-10-23 Ed Schonberg <schonberg@adacore.com>
365
366 * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
367 object is a class-wide limited interface type, the expression
368 is not restricted to the forms specified for limited types.
369
370 2015-10-23 Vincent Celier <celier@adacore.com>
371
372 * gnatname.adb: Code clean up.
373 * s-taasde.ads: Fix comment.
374
375 2015-10-23 Ed Schonberg <schonberg@adacore.com>
376
377 * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
378 root type to determine whether the type is a descendant of the
379 corresponding interface type, so take into account multiple
380 levels of subtypes and derivations.
381
382 2015-10-23 Olivier Hainque <hainque@adacore.com>
383
384 * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
385 tracebacks on x86 & x86_64.
386 (x86 & x86_64): If !SJLJ, always pick the
387 GCC_UNWINDER for x86_64 (not only on linux).
388 * sem_util.ads: Minor fix in comment.
389
390 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
391
392 * sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
393 not apply to a function instantiation.
394 * sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
395 (Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
396 is a volatile function when its profile contains an effectively
397 volatile type.
398 * sem_util.ads (Has_Effectively_Volatile_Profile): New routine.
399
400 2015-10-23 Arnaud Charlet <charlet@adacore.com>
401
402 * exp_unst.adb (Unnest_Subprogram): Complete previous
403 change and update comments.
404
405 2015-10-23 Ed Schonberg <schonberg@adacore.com>
406
407 * sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
408 A subprogram that has an Address parameter and is declared in a Pure
409 package is not considered Pure, because the parameter may be used as a
410 pointer and the referenced data may change even if the address value
411 itself does not.
412 * freeze.adb (Freeze_Subprogram): use it.
413 * exp_ch6.adb (Expand_N_Subprogram_Body): Use it.
414
415 2015-10-23 Olivier Hainque <hainque@adacore.com>
416
417 * tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
418 x86_64 linux
419 * tracebak.c: Rework x86 & x86_64 sections to resort to the
420 generic unwinder if __USING_SJLJ_EXCEPTIONS__.
421
422 2015-10-23 Javier Miranda <miranda@adacore.com>
423
424 * sem_util.adb (Check_Function_Writable_Actuals): For function
425 calls restrict the check to elementary types, as requested by
426 RM 6.4.1(6.15/3)
427
428 2015-10-23 Arnaud Charlet <charlet@adacore.com>
429
430 * exp_unst.adb (Unnest_Subprogram): Suppress initialization on
431 Decl_ARECnT since we are taking care of all initializations in
432 the generated code.
433
434 2015-10-23 Ed Schonberg <schonberg@adacore.com>
435
436 * sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
437 Handle properly a box-initialized aggregate component.
438
439 2015-10-23 Yannick Moy <moy@adacore.com>
440
441 * sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
442 on a function.
443
444 2015-10-23 Yannick Moy <moy@adacore.com>
445
446 * a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
447 a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
448 contract on subprograms.
449 * lib-xref-spark_specific.adb: collect scopes for stubs of
450 protected objects
451
452 2015-10-23 Arnaud Charlet <charlet@adacore.com>
453
454 * gnat1drv.adb (Adjust_Global_Switches): Enable
455 Back_Annotate_Rep_Info to get size information from gigi.
456 (Gnat1drv): Code clean ups.
457 * frontend.adb (Frontend): Ditto.
458
459 2015-10-23 Arnaud Charlet <charlet@adacore.com>
460
461 * gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
462 * sem.adb (Semantics): Remove special case.
463
464 2015-10-23 Gary Dismukes <dismukes@adacore.com>
465
466 * bindgen.adb, restrict.adb: Minor spelling/grammar fixes.
467
468 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
469
470 * sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
471 elaboration issues in SPARK when the name denotes a source variable.
472
473 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
474
475 * exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
476 handle restriction No_Exception_Propagation.
477 * exp_ch11.adb (Expand_At_End_Handler): Update the parameter
478 profile and all references to Block.
479 * exp_ch11.ads (Expand_At_End_Handler): Update the parameter
480 profile and comment on usage.
481 * exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
482 handle restriction No_Exception_Propagation.
483 * gnat1drv.adb, restrict.adb: Update comment.
484
485 2015-10-23 Bob Duff <duff@adacore.com>
486
487 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
488 SS_Release for a block statement enclosing the return statement in the
489 case where a build-in-place function return is returning
490 the result on the secondary stack. This is accomplished by
491 setting the Sec_Stack_Needed_For_Return flag on such blocks.
492 It was already being set for the function itself, and it was
493 already set correctly for blocks in the non-build-in-place case
494 (in Expand_Simple_Function_Return).
495 (Set_Enclosing_Sec_Stack_Return): New procedure to perform
496 the Set_Sec_Stack_Needed_For_Return calls. Called in the
497 build-in-place and non-build-in-place cases.
498 (Expand_Simple_Function_Return): Call
499 Set_Enclosing_Sec_Stack_Return instead of performing the loop
500 in line.
501
502 2015-10-23 Bob Duff <duff@adacore.com>
503
504 * scng.adb (Char_Literal_Case): If an apostrophe
505 follows a reserved word, treat it as a lone apostrophe, rather
506 than the start of a character literal. This was already done for
507 "all", but it needs to be done also for (e.g.) "Delta".
508
509 2015-10-23 Bob Duff <duff@adacore.com>
510
511 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
512 Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
513 unknown discriminants.
514 * g-awk.ads: Minor style fix in comment
515
516 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
517
518 * debug.adb: Document the use of debug switch -gnatd.5.
519 * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
520 * einfo.ads New synthesized attribute Is_Ghost_Enity along
521 with usage in nodes and pragma Inline.
522 (Is_Ghost_Entity: Moved from ghost.ads.
523 * exp_ch3.adb Code reformatting.
524 (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
525 (Expand_Freeze_Class_Wide_Type): Capture, set and restore the
526 Ghost mode.
527 (Expand_Freeze_Enumeration_Type): Capture, set and
528 restore the Ghost mode.
529 (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
530 * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
531 contract of an ignored Ghost subprogram.
532 * exp_ch13.adb Add with and use clauses for Ghost.
533 (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
534 * exp_dbug.adb (Get_External_Name): Code reformatting. Add a
535 special prefix for ignored Ghost entities or when requested by
536 -gnatd.5 for any Ghost entity.
537 * exp_dbug.ads Document the use of prefix "_ghost_" for ignored
538 Ghost entities.
539 * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
540 Ghost mode.
541 (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
542 to signal the original context.
543 * ghost.adb (Check_Ghost_Overriding): Code cleanup.
544 (Is_Ghost_Entity): Moved to einfo.adb. (Is_OK_Declaration):
545 Move the assertion expression check to the outer level.
546 (Is_OK_Ghost_Context): An assertion expression is a valid Ghost
547 context.
548 * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
549 * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
550 cannot be imported or exported. Mark internally generated objects
551 as Ghost when applicable.
552 (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
553 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
554 a stand alone subprogram body as Ghost when applicable.
555 (Analyze_Subprogram_Declaration): Mark internally generated
556 subprograms as Ghost when applicable.
557 * sem_ch7.adb: Code cleanup.
558 * sem_ch13.adb (Add_Invariants): Add various formal
559 parameters to break dependency on global variables.
560 (Build_Invariant_Procedure): Code cleanup. Capture, set and
561 restore the Ghost mode.
562 * sem_res.adb (Resolve_Actuals): The actual parameter of a source
563 Ghost subprogram whose formal is of mode IN OUT or OUT must be
564 a Ghost variable.
565
566 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
567
568 * sem_ch8.adb Code cleanup.
569 (Find_Expanded_Name): Replace
570 the call to In_Pragmas_Depends_Or_Global with a call to
571 In_Abstract_View_Pragma.
572 (In_Abstract_View_Pragma): New routine.
573 (In_Pragmas_Depends_Or_Global): Removed.
574 * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
575 Part_Of denotes the abstract view of a variable.
576
577 2015-10-23 Arnaud Charlet <charlet@adacore.com>
578
579 * sem_util.ads (Unique_Defining_Entity): Document the result
580 for tasks and entries.
581 * sem_util.adb (Unique_Entity): Return declaration entity for task and
582 entry bodies
583
584 2015-10-22 Mikhail Maltsev <maltsevm@gmail.com>
585
586 * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
587 * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
588 * gcc-interface/utils.c (relate_alias_sets): Likewise.
589 * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
590 gcc_checking_assert
591
592 2015-10-21 Martin Sebor <msebor@redhat.com>
593
594 PR driver/68043
595 * gcc-interface/lang.opt: End each sentence that describes
596 an option with a period.
597
598 2015-10-20 Yannick Moy <moy@adacore.com>
599
600 * fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
601 a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
602 sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
603 style for marking start of processing of subprograms.
604
605 2015-10-20 Yannick Moy <moy@adacore.com>
606
607 * lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
608 by requesting info from stubs. (Traverse_All_Compilation_Units):
609 Remove unused procedure.
610 (Traverse_Declarations_Or_Statements): Handle protected and task units.
611 * lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
612 procedure.
613 * restrict.adb (Check_Restriction): Do not ignore
614 restrictions in GNATprove_Mode.
615
616 2015-10-20 Arnaud Charlet <charlet@adacore.com>
617
618 * s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
619 make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
620 sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
621 sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
622 exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
623 sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
624 a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.
625
626 2015-10-20 Arnaud Charlet <charlet@adacore.com>
627
628 * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
629 freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
630 par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
631 sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
632 typos.
633
634 2015-10-20 Ed Schonberg <schonberg@adacore.com>
635
636 * sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
637 postcondition subprogram, do not check for useless assignments
638 because there are no source references in such a body, and the
639 call will lose deferred references from the enclosing subprogram.
640
641 2015-10-20 Ed Schonberg <schonberg@adacore.com>
642
643 * sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
644 'Address): If either object is controlled the overlay is
645 erroneous, but analysis must be completed so that back-end sees
646 address clause and completes code generation. Improve text
647 of warning.
648
649 2015-10-20 Thomas Quinot <quinot@adacore.com>
650
651 * exp_ch4.adb: Minor reformatting.
652
653 2015-10-20 Bob Duff <duff@adacore.com>
654
655 * s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
656 arrays.
657
658 2015-10-20 Arnaud Charlet <charlet@adacore.com>
659
660 * sinfo.ads, g-pehage.adb, par-ch12.adb,
661 layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
662 sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
663 switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
664 lib-xref.adb: Fix typos.
665
666 2015-10-20 Tristan Gingold <gingold@adacore.com>
667
668 * exp_ch4.adb (Expand_Array_Comparison): Use
669 generic code if runtime routine is not available.
670
671 2015-10-20 Yannick Moy <moy@adacore.com>
672
673 * a-sytaco.ads (Ada.Synchronous_Task_Control): Package
674 now withs System.Task_Identification. The visible part
675 of the spec has SPARK_Mode. The private part has pragma
676 SPARK_Mode (Off).
677 (Set_True): Added Global and Depends aspects
678 (Set_False): Added Global and Depends aspects (Current_State):
679 Added Volatile_Function aspect and added external state
680 Ada.Task_Identification.Tasking_State as a Global input.
681 (Suspend_Until_True): Added Global and Depends aspects
682 * a-sytaco.adb (Ada.Synchronous_Task_Control):
683 Package body has SPARK_Mode => Off
684 * a-extiin.ads (Ada.Execution_Time.Interrupts):
685 Package now withs Ada.Real_Time and has SPARK_Mode.
686 (Clock): Added Volatile_Function aspect and added external state
687 Ada.Real_Time.Clock_Time as a Global input.
688 * a-reatim.ads (Ada.Real_Time): The visible part of the spec has
689 SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
690 declares external state Clock_Time with properties Async_Readers and
691 Async_Writers.
692 (Clock): Added Volatile_Function aspect and
693 added external state Clock_Time as a Global input.
694 * a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
695 * a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
696 The visible part of the spec has SPARK_Mode. The private part
697 has pragma SPARK_Mode (Off).
698 (Clock): Added Volatile_Function
699 aspect and added external state Clock_Time as a Global input.
700 (Clock_For_Interrupts): Added Volatile_Function aspect and added
701 external state Ada.Real_Time.Clock_Time as a Global input.
702 * a-exetim-mingw.adb (Ada.Execution_Time): Package body has
703 SPARK_Mode => Off
704 * a-interr.ads (Ada.Interrupts): Package now
705 withs Ada.Task_Identification (Is_Reserved): Added
706 SPARK_Mode, Volatile_Function and external state
707 Ada.Task_Identification.Tasking_State as a Global input.
708 (Is_Attached): Added SPARK_Mode, Volatile_Function and external
709 state Ada.Task_Identification.Tasking_State as a Global input.
710 (Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
711 Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
712 and external state Ada.Task_Identification.Tasking_State as a
713 Global In_Out. (Reference): Added SPARK_Mode => Off
714 * a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
715 and external state Ada.Task_Identification.Tasking_State as a
716 Global input.
717 * a-taside.ads (Ada.Task_Identification): The visible part of
718 the spec has SPARK_Mode. The private part has pragma SPARK_Mode
719 (Off). The package declares external state Tasking_State with
720 properties Async_Readers and Async_Writers.
721 (Current_Task): Added
722 Volatile_Function aspect and added external state Tasking_State
723 as a Global input.
724 (Environment_Task): Added SPARK_Mode => Off
725 (Is_Terminated): Added Volatile_Function aspect and added external
726 state Tasking_State as a Global input. (Is_Callable): Added
727 Volatile_Function aspect and added external state Tasking_State as
728 a Global input.
729 (Activation_Is_Complete): Added Volatile_Function
730 aspect and added external state Tasking_State as a Global input.
731 * a-taside.adb (Ada.Task_Identification): Package body has
732 SPARK_Mode => Off.
733
734 2015-10-20 Ed Schonberg <schonberg@adacore.com>
735
736 * atree.ads, atree.adb: Enable List38 and List39 on entities.
737 * einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
738 on subprograms. Holds the list of class-wide precondition
739 functions inherited from ancestors. Each such function is an
740 instantiation of the generic function generated from an explicit
741 aspect specification for a class-wide precondition. A type is
742 an ancestor of itself, and therefore a root type has such an
743 instance on its own list.
744 (Class_Wide_Postconds): ditto for postconditions.
745
746 2015-10-20 Vincent Celier <celier@adacore.com>
747
748 * prj-attr.adb: Add packages Prove and GnatTest.
749
750 2015-10-20 Steve Baird <baird@adacore.com>
751
752 * a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
753 analysis of internals of container generic instances. This pragma
754 has no other effect.
755 * a-conhel.adb (Generic_Implementation) Add "pragma Annotate
756 (CodePeer, Skip_Analysis);".
757
758 2015-10-20 Steve Baird <baird@adacore.com>
759
760 * pprint.adb: Code clean up.
761
762 2015-10-20 Bob Duff <duff@adacore.com>
763
764 * a-cfinve.ads, a-coboho.ads: Improve comments.
765 * a-coboho.adb (Size_In_Storage_Elements): Improve error message
766 in case of "Size is too big" exception.
767
768 2015-10-20 Bob Duff <duff@adacore.com>
769
770 * a-contai.ads: Remove check names (moved to snames.ads-tmpl).
771 * snames.ads-tmpl: Add check names that were previously in
772 a-contai.ads, so they are now visible in configuration files.
773 * types.ads: Add checks corresponding to snames.ads-tmpl.
774
775 2015-10-20 Ed Schonberg <schonberg@adacore.com>
776
777 * sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
778 identifier to the tree, because it may be the root of a tree
779 traversal in Pop_Scope when freeze actions are pending.
780
781 2015-10-20 Steve Baird <baird@adacore.com>
782
783 * pprint.ads (Expression_Image) Add new generic formal flag
784 Hide_Parameter_Blocks.
785 * pprint.adb (Expression_Image) If new flag is set, then display
786 dereferences of parameter block components accordingly.
787
788 2015-10-20 Ed Schonberg <schonberg@adacore.com>
789
790 * sem_prag.adb: Code clean up.
791
792 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
793
794 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
795 (Make_Build_In_Place_Call_In_Object_Declaration): Update the
796 parameter profile. Code cleanup. Request debug info for the
797 object renaming declaration.
798 (Move_Activation_Chain): Add new formal parameter and update the
799 comment on usage.
800 * exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
801 Update the parameter profile and comment on usage.
802 * sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
803 currently unused.
804
805 2015-10-20 Ed Schonberg <schonberg@adacore.com>
806
807 * sem_ch13.adb (Analyze_One_Aspect, case
808 Aspect_Disable_Controlled): If expander is not active, pre-analyze
809 expression anyway for ASIS and other tools use.
810 * sem_prag.adb (Build_Generic_Class_Condition): Handle properly
811 anonymous access types in parameter specifications. Make the
812 formal type a formal derived type of the controlling type of
813 the subprogram.
814
815 2015-10-20 Tristan Gingold <gingold@adacore.com>
816
817 * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
818 * sem_prag.adb (Analyze_Pragma): Check the restriction.
819 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
820 Check the restriction (for aspects).
821
822 2015-10-20 Gary Dismukes <dismukes@adacore.com>
823
824 * sem_prag.adb: Minor reformatting.
825
826 2015-10-20 Tristan Gingold <gingold@adacore.com>
827
828 * sem_util.adb (Is_Protected_Self_Reference): Remove reference to
829 UET_Address in comment.
830 * sem_attr.adb (Check_Unit_Name): Adjust comment.
831 (Analyze_Attribute): Remove handling of UET_Address.
832 * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
833 * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
834 * exp_attr.adb (Expand_N_Attribute_Reference): Remove
835 Attribute_UET_Address.
836
837 2015-10-20 Bob Duff <duff@adacore.com>
838
839 * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
840 * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
841 modifying the tampering counts unnecessarily.
842 (Adjust): Zero tampering counts unconditionally.
843
844 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
845
846 * init.c: Fix build issue on arm-vx6 when building the RTP
847 run-time.
848
849 2015-10-20 Ed Schonberg <schonberg@adacore.com>
850
851 * sem_ch3.adb (Analyze_Object_Declaration): If the expression
852 is an aggregate and compilation is in -gnatI mode (ignore rep
853 clauses) do not delay resolution of aggregate, to prevent freeze
854 actions out of order in the backend.
855
856 2015-10-20 Ed Schonberg <schonberg@adacore.com>
857
858 * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
859 New procedure to construct a generic function for a class-wide
860 precondition, to implement AI12-0113 concerning the new semantics
861 of class-wide preconditions for overriding uperations.
862
863 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
864
865 * sem_util.adb (Find_Actual): The routine is
866 now capable of operating on entry calls.
867
868 2015-10-20 Ed Schonberg <schonberg@adacore.com>
869
870 * sem_res.adb: Remove redundant check.
871
872 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
873
874 * init.c (__gnat_vxsim_error_handler): Completely disable on
875 VxWorks-7 as the VSBs used to build gcc do not support vxsim
876 architecture.
877
878 2015-10-20 Claire Dross <dross@adacore.com>
879
880 * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
881 SPARK_Mode.
882 * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.
883
884 2015-10-20 Tristan Gingold <gingold@adacore.com>
885
886 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
887 Check for No_Implicit_Protected_Object_Allocations.
888 * fe.h (Check_No_Implicit_Task_Alloc,
889 Check_No_Implicit_Protected_Alloc): Define and declare.
890 * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
891 Check_No_Implicit_Protected_Alloc): New procedures to check the
892 restrictions.
893 * s-rident.ads (No_Implicit_Task_Allocations)
894 (No_Implicit_Protected_Object_Allocations): Declare new
895 restrictions.
896
897 2015-10-20 Yannick Moy <moy@adacore.com>
898
899 * sem_res.adb (Resolve_Selected_Component): Only set flag
900 when component is defined in a variant part.
901 * sem_util.adb,
902 * sem_util.ads (Is_Declared_Within_Variant): Promote local query
903 as publicy visible one for use in Resolve_Selected_Component.
904
905 2015-10-20 Philippe Gil <gil@adacore.com>
906
907 * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
908 from foreign threads.
909 * g-debpoo.adb (Print_Traceback): NEW print traceback if available
910 added to support Stack_Trace_Depth = 0.
911 (Print_Address): NEW print System.Address without no secondary
912 stack use (Address_Image uses secondary stack)
913
914 2015-10-20 Yannick Moy <moy@adacore.com>
915
916 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
917 Func.
918
919 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
920
921 * init.c (__gnat_error_handler for vxworks): Force
922 SPE bit in the MSR when handling signals
923
924 2015-10-20 Arnaud Charlet <charlet@adacore.com>
925
926 * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
927 g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.
928
929 2015-10-20 Ed Schonberg <schonberg@adacore.com>
930
931 * sem_ch5.adb (Analyze_Loop_Statement): Element iterators
932 over multidimensional arrays create additional loops during
933 expansion. For such loops we create a label as a scope
934 name. Attach this label properly to tree, for use in GNATProve
935 over such element iterators.
936 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
937 which the attribute applies comes from source, not from expansion
938 of an element iterator or a quantified expression.
939 * exp_attr.adb (Expand_N_Attribute_Reference): Ditto.
940
941 2015-10-20 Ed Schonberg <schonberg@adacore.com>
942
943 * exp_ch6.adb (Expand_Call): Check for a call to a function
944 declared in a Dimension I/O package, to handle the new Image
945 function.
946
947 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
948
949 * inline.ads: Minor comment fixes.
950
951 2015-10-20 Bob Duff <duff@adacore.com>
952
953 * a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
954 we're doing unchecked conversions with this pointer.
955
956 2015-10-20 Ed Schonberg <schonberg@adacore.com>
957
958 * exp_ch9.adb (Next_Protected_Operation): An expression function
959 used as a completion can be the next protected operation in a
960 protected body.
961
962 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
963
964 * sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
965 possible call to an instance of Ada.Unchecked_Conversion to avoid
966 testing protected function calls. Allow references to protected objects
967 in prefixed protected calls.
968 (Is_Protected_Operation_Call): New routine.
969
970 2015-10-20 Yannick Moy <moy@adacore.com>
971
972 * exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
973 query public. Remove code handling with iterator loop over array
974 of the 'in' form, which is not allowed in Ada. * exp_spark.adb
975 (Expand_SPARK): Expand loop statements that take the form of an
976 iterator over an array.
977 * sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
978 that take the form of an iterator over an array, so that the rewritten
979 form gets analyzed instead.
980 * sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
981 to recognize iterators over arrays.
982
983 2015-10-20 Arnaud Charlet <charlet@adacore.com>
984
985 * s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
986 parameter Message.
987 * a-except.adb (Raise_Current_Excep): Update call to
988 Debug_Raise_Exception.
989 * a-except-2005.adb (Complete_Occurrence): Ditto.
990 * sem_ch12.adb: Whitespace fix.
991
992 2015-10-20 Yannick Moy <moy@adacore.com>
993
994 * sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
995 fully default initialized.
996 * sem_ch6.adb: minor style fix in comment
997
998 2015-10-20 Ed Schonberg <schonberg@adacore.com>
999
1000 * s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
1001 quantities, to produce a string that includes the dimension
1002 synbol for the quantity, or the vector of dimensions in standard
1003 notation.
1004 * sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
1005 Image, to include dimension information in the generated string,
1006 identical to the string produced by the Put procedure on a string
1007 for a dimensioned quantity.
1008
1009 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1010
1011 * exp_ch7.adb (Process_Declarations): A loop
1012 parameter does not require finalization actions.
1013
1014 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1015
1016 * exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
1017 actual subtype for a mutable record return type if the expression
1018 is itself a function call.
1019
1020 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
1021
1022 * s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
1023 related to new type support.
1024
1025 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1026
1027 * sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
1028 to propagate dimension information from prefix.
1029 * sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
1030 * inline.ads: minor whitespace fix in comment
1031 * sem_ch6.adb: minor gramar fix in comment
1032
1033 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1034
1035 * sem_ch3.adb (Analyze_Object_Contract):
1036 A protected type or a protected object is allowed to have a
1037 discriminated part.
1038
1039 2015-10-20 Bob Duff <duff@adacore.com>
1040
1041 * sem_util.adb (Requires_Transient_Scope):
1042 Return true for mutable records if the maximum size is very large.
1043
1044 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1045
1046 * a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
1047 the same signature as in System.IO.Put.
1048
1049 2015-10-20 Bob Duff <duff@adacore.com>
1050
1051 * a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
1052 and then" on the check.
1053
1054 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1055
1056 * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
1057 a misplaced "constant" keyword in a discriminant specification.
1058
1059 2015-10-20 Steve Baird <baird@adacore.com>
1060
1061 * einfo.ads (Is_Param_Block_Component_Type): New function decl
1062 for querying the flag.
1063 (Set_Is_Param_Block_Component_Type): New procedure decl for setting
1064 the flag.
1065 * einfo.adb (Is_Param_Block_Component_Type): New function body.
1066 (Set_Is_Param_Block_Component_Type): New procedure body.
1067 (Write_Entity_Flags): Display the new flag.
1068 * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
1069 block component types.
1070 (Expand_N_Entry_Declaration): Set flag on parameter block component
1071 types.
1072
1073 2015-10-20 Steve Baird <baird@adacore.com>
1074
1075 * sem_elab.adb: Do not pass an N_Attribute_Reference node to
1076 Sinfo.Set_No_Elaboration_Check.
1077 * sem_elab.adb (Check_Elab_Call) Do not pass a non-call
1078 node (specifically, an N_Attribute_Reference node) to
1079 Sinfo.Set_No_Elaboration_Check.
1080
1081 2015-10-20 Tristan Gingold <gingold@adacore.com>
1082
1083 * adaint.c: File names are case sensitive on aarch64-ios.
1084
1085 2015-10-20 Bob Duff <duff@adacore.com>
1086
1087 * a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
1088 * a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
1089 * a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
1090 * a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.
1091
1092 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1093
1094 * exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
1095 require finalization actions.
1096
1097 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1098
1099 * par-ch3.adb (P_Declarative_Items): In case of misplaced
1100 aspect specifications, ensure that flag Done is properly set to
1101 continue parse.
1102
1103 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1104
1105 * rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
1106 and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
1107 * sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
1108 the comment on usage. Use routine Is_Suspension_Object to detect
1109 whether a type matches Suspension_Object.
1110 (Is_Suspension_Object): New routine.
1111 * snames.ads-tmpl: Add predefined names for Suspension_Object
1112 and Synchronous_Task_Control.
1113
1114 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1115
1116 * sem_smem.adb (Check_Shared_Var): Clean up code that handles
1117 type declarations with discriminants, remove obsolete check.
1118
1119 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1120
1121 * par_sco.adb: Minor style fixes.
1122
1123 2015-10-20 Vincent Celier <celier@adacore.com>
1124
1125 * debug.adb: Update documentation of -gnatdu.
1126
1127 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1128
1129 * aspects.adb Add aspect Volatile_Function to table
1130 Canonical_Aspect.
1131 * aspect.ads Add aspect Volatile_Function to tables
1132 Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
1133 and Implementation_Defined_Aspect. Aspects Async_Readers,
1134 Async_Writers, Effective_Reads and Effective_Writes are no
1135 longer Boolean.
1136 * einfo.adb (Get_Pragma): Add an entry for pragma
1137 Volatile_Function.
1138 * par-prag.adb (Prag): Pragma Volatile_Function does not need
1139 special processing by the parser.
1140 * rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
1141 table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
1142 * sem_ch3.adb Fix SPARK RM references.
1143 (Analyze_Object_Contract): Update the error guard.
1144 * sem_ch5.adb Fix SPARK RM references.
1145 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
1146 that a non-volatile function does not contain an effectively
1147 volatile parameter.
1148 (Analyze_Subprogram_Contract): Ensure
1149 that a non-volatile function does not contain an effectively
1150 volatile parameter.
1151 * sem_ch12.adb (Instantiate_Object): Remove the reference to
1152 the SPARK RM from the error message.
1153 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
1154 processing for aspects Async_Readers, Async_Writers,
1155 Effective_Reads, Effective_Writes and Volatile_Function.
1156 (Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
1157 Async_Writers, Effective_Reads, Effective_Writes and
1158 Volatile_Function do not need special processing at the freeze
1159 point.
1160 * sem_prag.adb Add an entry for pragma Volatile_Function in
1161 table Sig_Flags.
1162 (Analyze_External_Property_In_Decl_Part):
1163 Reimplemented as Async_Readers, Async_Writers, Effective_Reads
1164 and Effective_Writes are no longer Boolean pragmas.
1165 (Analyze_Global_Item): An external state or effectively
1166 volatile object cannot appear as an item in pragma
1167 [Refined_]Global.
1168 (Analyze_Pragma): Change the implementation
1169 of Async_Readers, Async_Writers, Effective_Reads and
1170 Effective_Writes as these are no longer Boolean pragmas.
1171 Use routine Check_Static_Boolean_Expression to verify the
1172 optional Boolean expression of Async_Readers, Async_Writers,
1173 Constant_After_Elaboration, Effective_Reads, Effective_Writes,
1174 Extensions_Visible and Volatile_Function. Add processing for
1175 pragma Volatile_Function.
1176 (Check_Static_Boolean_Expression): New routine.
1177 (Find_Related_Context): Update the comment on usage.
1178 (Is_Enabled_Pragma): New routine.
1179 * sem_prag.ads (Is_Enabled_Pragma): New routine.
1180 * sem_res.adb Fix SPARK RM references.
1181 (Is_OK_Volatile_Context): Add detection for return statements.
1182 (Resolve_Actuals): Remove the check concerning an effectively volatile
1183 OUT actual parameter as this is now done by the SPARK flow analyzer.
1184 (Resolve_Entity_Name): Remove the check concerning an effectively
1185 volatile OUT formal parameter as this is now done by the SPARK
1186 flow analyzer. (Within_Volatile_Function): New routine.
1187 * sem_util.adb (Add_Contract_Item): Add processing for pragma
1188 Volatile_Function.
1189 (Check_Nonvolatile_Function_Profile): New routine.
1190 (Is_Descendant_Of_Suspension_Object): New routine.
1191 (Is_Effectively_Volatile): Protected types and descendants of
1192 Suspension_Object are now treated as effectively volatile.
1193 (Is_Enabled): The optional Boolean expression of pragmas
1194 Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
1195 now appears as the first argument.
1196 (Is_Volatile_Function): New routine.
1197 * sem_util.ads Add SPARK RM references.
1198 (Add_Contract_Item): Update the comment on usage.
1199 (Check_Nonvolatile_Function_Profile): New routine.
1200 (Is_Effectively_Volatile): Update the comment on usage.
1201 (Is_Volatile_Function): New routine.
1202 * snames.ads-tmpl Add a predefined name and pragma id for
1203 Volatile_Function.
1204
1205 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1206
1207 * gnat_ugn.texi, gnat_rm.texi: Regenerate.
1208 * doc/gnat_ugn/gnat_project_manager.rst,
1209 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1210 doc/gnat_ugn/the_gnat_compilation_model.rst,
1211 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1212 doc/gnat_rm/implementation_defined_pragmas.rst,
1213 doc/gnat_rm/the_gnat_library.rst,
1214 doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.
1215
1216 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1217
1218 * gcc-interface/Makefile.in: Update targets.
1219
1220 2015-10-20 Bob Duff <duff@adacore.com>
1221
1222 * sem_ch13.adb (Analyze_One_Aspect): Avoid
1223 analyzing the expression in a 'Disable_Controlled attribute when
1224 Expander_Active is False, because otherwise, we get errors about
1225 nonstatic expressions in pragma-Preelaborate generic packages.
1226 * restrict.ads: minor whitespace cleanup in comment
1227
1228 2015-10-20 Bob Duff <duff@adacore.com>
1229
1230 * a-conhel.adb: Remove "use SAC;", because otherwise the compiler
1231 complains about use clauses in run-time units. Use "use type"
1232 instead.
1233 * a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
1234 * a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
1235 * a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
1236 * a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
1237 * a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
1238 * a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
1239 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1240 * a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
1241 * a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
1242 * a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
1243 * a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
1244 * a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
1245 * a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
1246 * a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
1247 * a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
1248 * a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
1249 * a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
1250 to share the tampering machinery in Ada.Containers.Helpers. This
1251 reduces the amount of duplicated code, and takes advantage of
1252 efficiency improvements in Helpers.
1253 Protect all run-time checks and supporting machinery with "if
1254 Checks" or "if T_Check", so this code can be suppressed with
1255 pragma Suppress or -gnatp.
1256 Add Pseudo_Reference and Get_Element_Access to remaining
1257 containers, so that the compiler can optimize "for ... of" loops.
1258
1259 2015-10-20 Bob Duff <duff@adacore.com>
1260
1261 * a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
1262 Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
1263 new package Ada.Containers.Helpers, because otherwise it's not
1264 visible everywhere it needs to be (e.g. in the package
1265 Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
1266 a component of type Tamper_Counts).
1267
1268 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1269
1270 * sem_type.adb (Intersect_Types): Specialize error message when
1271 one operand is a limited view which is a priori incompatible
1272 with all other named types.
1273 * sem_prag.adb: minor fix in comment
1274 * sem_ch13.adb: Code clean up.
1275
1276 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1277
1278 * sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
1279 for a subprogram nested in an inlined subprogram.
1280
1281 2015-10-20 Bob Duff <duff@adacore.com>
1282
1283 * a-coinve.adb, a-contai.adb: Update comments.
1284 * pprint.ads: Minor reformatting.
1285
1286 2015-10-20 Tristan Gingold <gingold@adacore.com>
1287
1288 * env.c, init.c: Handle arm64-darwin like arm-darwin.
1289 * tracebak.c: Handle arm64-darwin.
1290
1291 2015-10-20 Bob Duff <duff@adacore.com>
1292
1293 * s-trasym.adb (Symbolic_Traceback): When giving the traceback
1294 as hexadecimal code addresses, separate by blanks instead of LF.
1295
1296 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1297
1298 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
1299 node for subprogram in Compile_Only mode.
1300
1301 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
1302
1303 * s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
1304 s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
1305 iterations.
1306
1307 2015-10-20 Philippe Gil <gil@adacore.com>
1308
1309 * g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
1310 contributors.
1311 (Dump_Stdout): NEW print to stdout Debug_Pool statistics &
1312 main contributors.
1313 (Reset): NEW reset counters to 0.
1314 (Get_Size): NEW return size allocated at parameter.
1315 (High_Water_Mark): NEW.
1316 (Current_Water_Mark): NEW.
1317 (System_Memory_Debug_Pool): NEW tell Debug_Pools that
1318 System.Memory uses it.
1319 * g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
1320 components.
1321 (Find_Or_Create_Traceback): don't manage in System.Memory
1322 Debug_Pool Deallocate Traceback's.
1323 (Validity): add optional Handled table when System.Memory asked
1324 for Allow_Unhandled_Memory.
1325 (Allocate): handle Allocate reentrancy occuring when System.Memory
1326 uses Debug_Pools.
1327 (Deallocate): handle when Allow_Unhandled_Memory
1328 is set deallocation of unhandled memory. Dont't check
1329 Size_In_Storage_Elements if equal to Storage_Count'Last. update
1330 Frees, Total_Frees new components.
1331
1332 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1333
1334 * fe.h: Minor tweak.
1335
1336 2015-10-20 Vincent Celier <celier@adacore.com>
1337
1338 * sem_cat.adb (Check_Categorization_Dependencies): Do nothing
1339 when -gnatdu is specified.
1340
1341 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1342
1343 * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
1344 formal abstract subprogram must have a controlling type.
1345 * stand.ads: Minor whitespace cleanup.
1346
1347 2015-10-20 Gary Dismukes <dismukes@adacore.com>
1348
1349 * sem_ch13.adb: Minor reference change (RM => AARM).
1350
1351 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1352
1353 * make.adb (Check): Skip multilib switches reinstated by the
1354 compiler only when counting the number of switches, since it is
1355 what really matters in the regular operating mode.
1356
1357 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1358
1359 * einfo.adb: Add extra assertion for small clause.
1360 * cstand.adb: Minor style fix in comment.
1361 * debug.adb: Minor reformatting.
1362 * exp_util.adb: Fix minor typo.
1363
1364 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1365
1366 * sem_ch12.adb (Same_Instantiated_Function): New predicate in
1367 Check_Formal_Package_Instance, used to verify that the formal
1368 and the actual of an actual package match when both are functions
1369 given as attribute references.
1370
1371 2015-10-20 Bob Duff <duff@adacore.com>
1372
1373 * a-coinve.ads, a-coinve.adb: Do the same efficiency
1374 improvements that were already done in the definite case
1375 (Ada.Containers.Vectors, i.e. a-convec). This includes the
1376 ability to suppress checks, the fast path for Append, inlining
1377 as appropriate, and special-casing of "for ... of" loops. Reuse
1378 the tampering machinery that is now in Ada.Containers. Simplify
1379 many operations.
1380 * a-convec.ads, a-convec.adb: Change the code to be more similar
1381 to a-coinve.
1382 * a-finali.ads, a-finali.adb: Expose the "null"-ness of the
1383 operations. This may enable optimizations in the future, and
1384 seems cleaner anyway.
1385
1386 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1387
1388 * sem_ch13.adb (Is_Operational_Item): Attributes related to
1389 Ada 2012 iterators are operational items, and can be specified
1390 on partial views.
1391
1392 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1393
1394 * sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
1395 (Usage_Error): Remove formal parameter Item. Emit a clearer message
1396 concerning a missing dependency item and place it on the related pragma.
1397
1398 2015-10-20 Bob Duff <duff@adacore.com>
1399
1400 * debug.adb, expander.adb: Implement -gnatd.B switch, which
1401 triggers a bug box when an abort_statement is seen. This is
1402 useful for testing Comperr.Compiler_Abort.
1403 * gnat1drv.adb: Trigger bug box on all exceptions other than
1404 Unrecoverable_Error.
1405
1406 2015-10-20 Thomas Quinot <quinot@adacore.com>
1407
1408 * Makefile.rtl: add the following...
1409 * g-binenv.ads, g-binenv.adb: New unit providing runtime access
1410 to bind time captured values ("bind environment")
1411 * init.c: declare new global variable __gl_bind_env_addr.
1412 * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
1413 environment key=value pair.
1414 (Gen_Bind_Env_String): helper to produce the bind environment data
1415 called in the binder generated file.
1416 (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
1417 __gl_bind_env_addr accordingly.
1418 * switch-b.adb: Support for command line switch -V (user interface
1419 to set a build environment key=value pair)
1420 * bindusg.adb: Document the above
1421
1422 2015-10-20 Vincent Celier <celier@adacore.com>
1423
1424 * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
1425 entity as Pure if Debug_Flag_U is set.
1426
1427 2015-10-20 Bob Duff <duff@adacore.com>
1428
1429 * output.adb (Write_Int): Work with negative numbers in order to avoid
1430 negating Int'First and thereby causing overflow.
1431 * sem_util.adb: Minor comment fix.
1432
1433 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1434
1435 * make.adb (Check): Skip multilib switches reinstated by the
1436 compiler when doing the comparison with switches passed to
1437 gnatmake.
1438
1439 2015-10-20 Yannick Moy <moy@adacore.com>
1440
1441 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
1442 False for procedures marked No_Return.
1443 * sem_util.ads (Enclosing_Declaration): Improve comment.
1444 * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
1445
1446 2015-10-20 Thomas Quinot <quinot@adacore.com>
1447
1448 * types.ads: Minor reformatting.
1449
1450 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1451
1452 * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
1453 Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
1454 classification pragmas.
1455
1456 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1457
1458 * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
1459 perform name resolution on the expressions in aspects of visible
1460 entities.
1461 * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
1462 expressions in aspects independently of whether corresponding
1463 entity is frozen. Used to complete name resolution of aspect
1464 expressions for entities declared in the visible part of a
1465 package or generic package declaration.
1466
1467 2015-10-20 Vincent Celier <celier@adacore.com>
1468
1469 * prj-attr.adb: Add package Codepeer and its attributes.
1470
1471 2015-10-20 Thomas Quinot <quinot@adacore.com>
1472
1473 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
1474
1475 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1476
1477 * gnatlink.adb (Gnatlink): Do not translate --RTS switch
1478 for the linker and instead pass the switches that were
1479 reinstated by the compiler.
1480
1481 2015-10-20 Bob Duff <duff@adacore.com>
1482
1483 * a-contai.ads, a-convec.ads: Move Count_Type_Last from
1484 a-convec.ads to a-contai.ads, so other containers can refer to it.
1485
1486 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1487
1488 * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
1489 Analyze_Full_Type_ Declaration, used to apply legality rules in
1490 13,1,1 (18.3.3) concerning aspects that cannot be overridden in
1491 a type extension.
1492 (Check_Duplicate_Aspects): It is not legal to specify the
1493 Implicit_Dereference aspect on a full view if partial view has
1494 known discriminants.
1495 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
1496 the specification of the aspect on a derived type confirms the
1497 value of the inherited one.
1498 * sem_util.adb (Reference_Discriminant): Return empty if none
1499 specified.
1500
1501 2015-10-20 Thomas Quinot <quinot@adacore.com>
1502
1503 * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
1504
1505 2015-10-20 Vincent Celier <celier@adacore.com>
1506
1507 * a-strsup.adb (Super_Trim): Remove statements that put NUL
1508 characters in unused portion of the Data string.
1509
1510 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
1511
1512 * aspects.adb Add an entry for Constant_After_Elaboration in
1513 table Canonical_Aspect.
1514 * aspects.ads Add entries for Constant_After_Elaboration in
1515 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
1516 and Implementation_Defined_Aspect.
1517 * par-prag.adb Pragma Constant_After_Elaboration does not require
1518 special processing by the parser.
1519 * sem_ch13.adb Add an entry for Constant_After_Elaboration
1520 in table Sig_Flags.
1521 (Analyze_Aspect_Specifications):
1522 Add processing for aspect Constant_After_Elaboration.
1523 (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
1524 does not require special processing at freeze time.
1525 * sem_prag.adb (Analyze_Pragma): Add processing for pragma
1526 Constant_After_Elaboration. Use routine Find_Related_Context to
1527 retrieve the context of pragma Part_Of.
1528 (Duplication_Error): Update comment on usage.
1529 (Find_Related_Context): New routine.
1530 * sem_prag.ads Add an entry for Constant_After_Elaboration
1531 in table Aspect_Specifying_Pragma.
1532 (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
1533 * sem_util.adb (Add_Contract_Item): Add processing for pragma
1534 Constant_After_Elaboration.
1535 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1536 * snames.ads-tmpl Add new predefined name and aspect id for
1537 Constant_After_Elaboration.
1538
1539 2015-10-16 Vincent Celier <celier@adacore.com>
1540
1541 * prj-pp.adb (Pretty_Print.Print): Correctly display extending
1542 packages, instead of making them renamed packages.
1543
1544 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
1545
1546 * sem_ch12.adb (Analyze_Package_Instantiation):
1547 Treat a missing SPARK_Mode annotation as having mode "Off".
1548 (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
1549 annotation as having mode "Off".
1550 (Instantiate_Package_Body): Code
1551 reformatting. Treat a missing SPARK_Mode annotation as having mode
1552 "Off".
1553 (Instantiate_Subprogram_Body): Code reformatting. Treat
1554 a missing SPARK_Mode annotation as having mode "Off".
1555
1556 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1557
1558 * exp_ch5.adb: Code clean up.
1559 * sem_ch13.adb: Minor fix in comment.
1560
1561 2015-10-16 Bob Duff <duff@adacore.com>
1562
1563 * a-exexda.adb: Change format of Exception_Information to be
1564 more like what we print for unhandled exceptions.
1565 * a-exstat.adb: Parse new format.
1566 * a-except-2005.adb, a-except.adb: Document new format.
1567
1568 2015-10-16 Javier Miranda <miranda@adacore.com>
1569
1570 * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
1571 transient scope with the renaming object declararation.
1572 * exp_util.adb (Insert_Actions): if the enclosing interator
1573 loop is marked as requiring the secondary stack then attach the
1574 actions to the transient scope.
1575
1576 2015-10-16 Bob Duff <duff@adacore.com>
1577
1578 * exp_ch7.adb: Minor spelling fixes.
1579
1580 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1581
1582 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1583 If anonymous type is component type of array type declaration,
1584 analyze its declaration in the current scope, not the enclosing
1585 one.
1586
1587 2015-10-16 Gary Dismukes <dismukes@adacore.com>
1588
1589 * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
1590
1591 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1592
1593 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
1594 expansion to allow element iteration over formal containers
1595 whose elements are indefinite types.
1596
1597 2015-10-16 Doug Rupp <rupp@adacore.com>
1598
1599 * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
1600 instead of gettimeofday.
1601 * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
1602 (clock_gettime): New imported subprogram.
1603
1604 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
1605
1606 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1607 Indefinite or limited library level objects are now returned on
1608 the heap.
1609 * exp_ch7.adb (Build_Finalization_Master): Add formal
1610 parameter For_Lib_Level. Add context specific insertion for a
1611 finalization master created for an access result type related
1612 to a build-in-place function call used to initialize a library
1613 level object.
1614 * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
1615 For_Lib_Level. Update the comment on usage.
1616 * sem_util.adb (Mark_Coextensions): Code cleanup.
1617
1618 2015-10-16 Emmanuel Briot <briot@adacore.com>
1619
1620 * prj.adb (For_Every_Project_Imported_Context): Fix handling
1621 of aggregated projects with duplicate names.
1622 * a-ngelfu.ads: Minor whitespace fix.
1623
1624 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1625
1626 * sem_ch13.adb (Build_Predicate_Functions): The expression for
1627 the predicate is side-effect free if it does not contain any
1628 variable references.
1629
1630 2015-10-16 Bob Duff <duff@adacore.com>
1631
1632 * a-convec.adb ("="): Previous version depended
1633 on "=" composing, but that doesn't quite work -- we want the "="
1634 operator passed in to the generic. So we need a loop after all.
1635
1636 2015-10-16 Yannick Moy <moy@adacore.com>
1637
1638 * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
1639 an object.
1640 * sem_ch6.adb: Minor fix in comment.
1641
1642 2015-10-16 Bob Duff <duff@adacore.com>
1643
1644 * a-contai.ads: Add two check names: Container_Checks and
1645 Tampering_Check. Move the tampering check machinery from
1646 Ada.Containers.Vectors to Ada.Containers. Later we can share it
1647 with other containers.
1648 Disable the tampering machinery in the presence of
1649 Suppress(Tampering_Check).
1650 Simplify the implementation of tampering checks. E.g. use RAII
1651 to make incrementing/decrementing of the counts more concise.
1652 * a-contai.adb: New package body, implementing the above.
1653 * a-convec.ads, a-convec.adb: Use tampering check machinery
1654 in Ada.Containers.
1655 Disable all checking code when checks are suppressed.
1656 Simplify many of the operations. Implement "&" in terms of Append,
1657 rather than "by hand".
1658 Remove: function "=" (L, R : Elements_Array) return Boolean is
1659 abstract; so we can call the predefined "=" on Elements_Array.
1660 For "=" on Vectors: Previously, we returned True immediately if
1661 Left'Address = Right'Address. That seems like a non-optimization
1662 ("if X = X" is unusual), so removed that. Simplify by using
1663 slice comparison ("=" on Element_Array will automatically call
1664 "=" on the components, even if user defined).
1665
1666 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1667
1668 * sem_ch13.adb (Chek_Record_Representation_Clause): When
1669 iterating over components, skip anonymous subtypes created for
1670 constrained array components.
1671
1672 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
1673
1674 * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
1675 * s-finmas.ads (Header_Offset): Delete.
1676 * s-finmas.adb (Header_Offset): Likewise.
1677 (Finalize): Call Header_Size instead of Header_Offset.
1678 * s-stposu.adb (Allocate_Any_Controlled): Likewise.
1679 (Deallocate_Any_Controlled): Likewise.
1680
1681 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1682
1683 * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
1684 cleanup.
1685 * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
1686 sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
1687 s-taprop-posix.adb: Minor reformatting.
1688
1689 2015-10-16 Bob Duff <duff@adacore.com>
1690
1691 * adadecode.h, adadecode.c (ada_demangle): Remove
1692 ada_demangle, no longer used.
1693 * a-except-2005.adb: Bring System.Traceback.Symbolic into the
1694 closure.
1695
1696 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1697
1698 * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
1699 locate the access discriminant that supports implicit dereference on a
1700 record type.
1701 (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
1702 of Implicit_Dereference on an access_to_constant when actual
1703 parameter is a rewritten variable or function call.
1704
1705 2015-10-16 Bob Duff <duff@adacore.com>
1706
1707 * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
1708 elaboration circularities when polling is turned on.
1709
1710 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1711
1712 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1713 When creating a full declaration for a formal parameter, the
1714 entity is labelled as an Itype, so set Associated_Node_For_Itype
1715 accordingly.
1716 * einfo.ads: Clarify use of Associated_Node_For_Itype.
1717
1718 2015-10-16 Bob Duff <duff@adacore.com>
1719
1720 * bindgen: Move pragmas Warnings earlier, otherwise
1721 we can get warnings on with_clauses.
1722
1723 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1724
1725 * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
1726 s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
1727 Remove remaining references to OS_Primitives.Monotonic_Clock.
1728 Keep it only on windows which is a special case.
1729
1730 2015-10-16 Javier Miranda <miranda@adacore.com>
1731
1732 * a-textio.adb (Get_Line): Fix documentation.
1733 * einfo.ads (Interface_Name): Fix documentation.
1734 * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
1735 * exp_ch4.adb (Expand_N_In): Fix documentation.
1736
1737 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
1738
1739 * inline.adb (Subp_Info): Remove Listed component.
1740 (Add_Inlined_Subprogram): Take an entity instead of an index.
1741 Do not set Listed component to True.
1742 (New_Entry): Do not initialize Listed component to False.
1743 (Analyze_Inlined_Bodies): Do not test Listed component
1744 (Must_Inline): Add calls not in the main unit only
1745 if they are in a subprogram that can be inlined outside its unit.
1746 (Add_Inlined_Body): Move test around and add comment.
1747
1748 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1749
1750 * sinfo.ads, einfo.ads: monir clean ups.
1751
1752 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1753
1754 * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
1755 a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
1756 jgnat/dotnet removal.
1757
1758 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1759
1760 * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
1761 s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
1762 s-osprim.ads (Monotonic_Clock): Removed, unused.
1763
1764 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1765
1766 * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
1767 Do not reset the Obj_Type of the prefix if an interpretation
1768 involves an untagged type, to prevent a crash when analyzing an
1769 illegal program in All_Errors mode.
1770
1771 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
1772
1773 * exp_ch4.adb (Expand_N_Expression_With_Actions):
1774 Force the evaluation of the expression when its type is Boolean.
1775 (Force_Boolean_Evaluation): New routine.
1776
1777 2015-10-16 Bob Duff <duff@adacore.com>
1778
1779 * sem_util.adb (Has_Discrim_Dep_Array): Remove
1780 this function, and the call. No longer needed now that the back
1781 end can handle such things. Should result in further speedups
1782 in some cases.
1783
1784 2015-10-16 Ed Schonberg <schonberg@adacore.com>
1785
1786 * sem_ch13.adb (Build_Predicate_Functions): If expression for
1787 predicate is side-effect free, indicate that the predicate
1788 function is pure, to allow for optimization of redundant
1789 predicate checks.
1790
1791 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1792
1793 * checks.adb: Fix typo.
1794 * s-osinte-linux.ads: Add header.
1795 * projects.texi: Removed, no longer used.
1796 * gcc-interface/Make-lang.in: Update dependencies
1797 * s-multip.adb: Minor: fix header.
1798 * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
1799 a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
1800 a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
1801 .NET.
1802 * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
1803 updates.
1804
1805 2015-10-16 Gary Dismukes <dismukes@adacore.com>
1806
1807 * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
1808 the temporary object used for a by-copy entry parameter, to
1809 ensure that the object doesn't get its No_Initialization flag
1810 reset later in Default_Initialize_Object. Also, generate the
1811 assignment of the actual to the temporary in the additional case
1812 of a scalar out parameter whose type has a Default_Value aspect.
1813 * exp_ch3.adb: Fix minor typo in comment.
1814
1815 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
1816
1817 * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
1818 Minor reformatting.
1819 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
1820 SPARK_Mode from the context.
1821
1822 2015-10-16 Bob Duff <duff@adacore.com>
1823
1824 * sem_util.adb (Requires_Transient_Scope):
1825 If Typ is a generic formal incomplete type, look at the actual
1826 type. Otherwise, we don't notice that the actual type is tagged,
1827 has a variant part, etc, causing a mismatch of calling conventions
1828 between caller and callee.
1829
1830 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
1831
1832 * einfo.ads: Move the declaration of enumeration
1833 literal E_Abstract_State above E_Entry. Update the upper bound
1834 of subtype Overloadable_Kind.
1835
1836 2015-10-16 Gary Dismukes <dismukes@adacore.com>
1837
1838 * exp_attr.adb: Minor editorial changes.
1839
1840 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1841
1842 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
1843 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
1844 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
1845 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
1846 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
1847 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
1848 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
1849 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
1850 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
1851 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
1852 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
1853 Code clean up: remove special handling for .NET and JVM.
1854
1855 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1856
1857 * sem_ch12.adb: Minor punctuation fix in comment
1858 * s-rident.ads: Minor consistency fix in comment
1859 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
1860 * restrict.ads: Style fix in comments.
1861 * sem_prag.adb: Minor grammar fix in comment
1862
1863 2015-10-16 Gary Dismukes <dismukes@adacore.com>
1864
1865 * sem_ch12.adb: Minor reformatting/rewording.
1866
1867 2015-10-16 Arnaud Charlet <charlet@adacore.com>
1868
1869 * einfo.ads: Minor fix of duplicate words
1870 * rident.ads: Minor style fix in comment
1871
1872 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
1873
1874 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
1875 set and restore the Ghost mode.
1876 (Expand_N_Object_Declaration): Do not capture, set and restore the
1877 Ghost mode.
1878 (Freeze_Type): Redo the capture and restore of the Ghost mode.
1879 (Restore_Globals): Removed.
1880 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
1881 and restore of the Ghost mode.
1882 (Restore_Globals): Removed.
1883 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
1884 Redo the capture and restore of the Ghost mode.
1885 (Expand_N_Subprogram_Body): Redo the capture, set and restore
1886 of the Ghost mode.
1887 (Expand_N_Subprogram_Declaration): Do not
1888 capture, set and restore the Ghost mode.
1889 (Restore_Globals): Removed.
1890 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
1891 and restore of the Ghost mode.
1892 (Expand_N_Package_Declaration): Do not capture, set and restore the
1893 Ghost mode.
1894 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
1895 Redo the capture and restore of the Ghost mode.
1896 (Expand_N_Object_Renaming_Declaration): Redo
1897 the capture and restore of the Ghost mode.
1898 (Expand_N_Package_Renaming_Declaration):
1899 Redo the capture and restore of the Ghost mode.
1900 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
1901 and restore of the Ghost mode.
1902 * exp_ch11.adb Remove with and use clauses for Ghost.
1903 (Expand_N_Exception_Declaration): Do not capture, set and restore
1904 the Ghost mode.
1905 * exp_disp.adb (Make_DT): Redo the capture and restore of the
1906 Ghost mode.
1907 (Restore_Globals): Removed.
1908 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
1909 and restore the Ghost mode.
1910 (Expand_Pragma_Contract_Cases):
1911 Redo the capture and restore of the Ghost mode. Preserve the
1912 original context of contract cases by setting / resetting the
1913 In_Assertion_Expr counter.
1914 (Expand_Pragma_Initial_Condition):
1915 Redo the capture and restore of the Ghost mode.
1916 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
1917 the Ghost mode.
1918 (Restore_Globals): Removed.
1919 * exp_util.adb (Make_Predicate_Call): Redo the capture and
1920 restore of the Ghost mode.
1921 (Restore_Globals): Removed.
1922 * freeze.adb (Freeze_Entity): Redo the capture and restore of
1923 the Ghost mode.
1924 (Restore_Globals): Removed.
1925 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
1926 the error message.
1927 (Is_OK_Statement): Account for statements
1928 that appear in assertion expressions.
1929 (Is_Subject_To_Ghost):
1930 Moved from spec.
1931 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
1932 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
1933 Ghost mode.
1934 * sem.adb Add with and use clauses for Ghost.
1935 (Analyze): Redo
1936 the capture and restore of the Ghost mode. Set the Ghost mode
1937 when analyzing a declaration.
1938 (Do_Analyze): Redo the capture
1939 and restore of the Ghost mode.
1940 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
1941 and restore the Ghost mode.
1942 (Analyze_Incomplete_Type_Decl):
1943 Do not capture, set and restore the Ghost mode.
1944 (Analyze_Number_Declaration): Do not capture, set and restore the
1945 Ghost mode.
1946 (Analyze_Object_Declaration): Do not capture, set and
1947 restore the Ghost mode.
1948 (Analyze_Private_Extension_Declaration):
1949 Do not capture, set and restore the Ghost mode.
1950 (Analyze_Subtype_Declaration): Do not capture, set and restore
1951 the Ghost mode.
1952 (Restore_Globals): Removed.
1953 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
1954 of the Ghost mode.
1955 (Restore_Globals): Removed.
1956 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
1957 Do not capture, set and restore the Ghost mode.
1958 (Analyze_Procedure_Call): Redo the capture and restore of the
1959 Ghost mode.
1960 (Analyze_Subprogram_Body_Helper): Redo the capture
1961 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
1962 Do not capture, set and restore the Ghost mode.
1963 (Restore_Globals): Removed.
1964 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
1965 restore of the Ghost mode.
1966 (Analyze_Package_Declaration):
1967 Do not capture, set and restore the Ghost mode.
1968 (Analyze_Private_Type_Declaration): Do not capture, set and
1969 restore the Ghost mode.
1970 (Restore_Globals): Removed.
1971 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
1972 set and restore the Ghost mode.
1973 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
1974 mode.
1975 (Analyze_Object_Renaming): Do not capture, set and restore the
1976 Ghost mode.
1977 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
1978 mode.
1979 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
1980 Ghost mode.
1981 (Restore_Globals): Removed.
1982 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
1983 set and restore the Ghost mode.
1984 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
1985 Do not capture, set and restore the Ghost mode.
1986 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
1987 and restore the Ghost mode.
1988 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
1989 the capture and restore of the Ghost mode.
1990 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1991 Redo the capture and restore of the Ghost mode.
1992 (Analyze_External_Property_In_Decl_Part):
1993 Redo the capture and restore of the Ghost mode.
1994 (Analyze_Initial_Condition_In_Decl_Part): Redo the
1995 capture and restore of the Ghost mode. (Analyze_Pragma):
1996 Do not capture, set and restore the Ghost mode for Assert.
1997 Redo the capture and restore of the Ghost mode for Check. Do
1998 not capture and restore the Ghost mode for Invariant.
1999 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
2000 restore of the Ghost mode.
2001 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
2002 when resolving a declaration.
2003 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
2004 Redo the capture and restore of the Ghost mode.
2005 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
2006 and restore of the Ghost mode.
2007
2008 2015-10-16 Bob Duff <duff@adacore.com>
2009
2010 * debug.adb: Document -gnatdQ switch.
2011
2012 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2013
2014 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
2015 a formal abstract subprogram cannot have a null default: RM 12.6
2016 (4 1.2).
2017
2018 2015-10-16 Bob Duff <duff@adacore.com>
2019
2020 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
2021
2022 2015-10-16 Javier Miranda <miranda@adacore.com>
2023
2024 * inline.adb (Add_Inlined_Body): Ensure that
2025 Analyze_Inlined_Bodies will be invoked after completing the
2026 analysis of the current unit.
2027
2028 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2029
2030 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
2031 message for bad last bit position.
2032 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
2033
2034 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2035
2036 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
2037 compile-time known but does not obey a static predicate on
2038 its type, replace the case statement with a raise statement,
2039 as with other statically detected constraint violations.
2040
2041 2015-10-16 Bob Duff <duff@adacore.com>
2042
2043 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
2044 Reinstate code.
2045 * opt.ads: Minor typo.
2046
2047 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2048
2049 * sem_util.adb (Gather_Components): When gathering components
2050 of a nested variant, the record type used in legality checks is
2051 the enclosing record type.
2052
2053 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2054
2055 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2056 DEF_FUNCTION_TYPE_11): Define.
2057
2058 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
2059
2060 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
2061 GNAT1_ADA_OBJS are compiled only after generated files are created.
2062
2063 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2064
2065 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
2066 instead of REAL_ARITHMETIC.
2067
2068 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2069
2070 * gcc-interface/trans.c (convert_with_check): Use real_less instead
2071 of REAL_VALUES_LESS.
2072
2073 2015-10-02 Doug Rupp <rupp@adacore.com>
2074 Olivier Hainque <hainque@adacore.com>
2075
2076 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
2077 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
2078 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
2079 flags as -g* and -m* flags past -gnatez.
2080
2081 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
2082
2083 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
2084 linear search with call to find_opt and issue warnings if the -W
2085 switch is not appropriate.
2086
2087 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
2088
2089 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
2090 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
2091 reference but whose type isn't by-ref and whose mechanism hasn't been
2092 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
2093 them instead of changing their type.
2094 * gcc-interface/trans.c (scan_rhs_r): New helper function.
2095 (independent_iterations_p): New predicate.
2096 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
2097 ivdep pragma if the iterations are independent.
2098
2099 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
2100
2101 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
2102 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
2103 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
2104 (build_stmt_group): Add blank lines.
2105
2106 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
2107
2108 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
2109
2110 2015-09-28 Tom de Vries <tom@codesourcery.com>
2111
2112 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
2113
2114 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
2115
2116 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
2117
2118 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
2119
2120 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
2121 generating STABS debugging information when not the default.
2122
2123 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
2124
2125 * gcc-interface/gigi.h (ref_filename): Delete.
2126 (Sloc_to_locus): Add clean_column parameter defaulting to false.
2127 (build_call_raise): Adjust comment.
2128 (build_call_raise_range): Move around.
2129 * gcc-interface/trans.c (ref_filename): Delete.
2130 (gigi): Fix formatting.
2131 (block_end_locus_sink): Delete.
2132 (Sloc_to_locus1): Tidy up and reformat. Rename into...
2133 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
2134 (set_expr_location_from_node1): Rename into...
2135 (set_expr_location_from_node): ...this.
2136 (set_end_locus_from_node): Move around. Adjust for renaming.
2137 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2138 (add_cleanup): Likewise.
2139 * gcc-interface/utils2.c (expand_sloc): New static function.
2140 (build_call_raise): Call it.
2141 (build_call_raise_column): Likewise.
2142 (build_call_raise_range): Likewise. Move around.
2143
2144 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
2145
2146 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
2147 another acceptable pattern for the RHS.
2148
2149 2015-07-24 Micahel Darling <darlingm@gmail.com>
2150
2151 PR other/66259
2152 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
2153 * gcc-interface/Makefile.in: Likewise
2154
2155 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
2156
2157 * gcc-interface/utils.c: Fix double word typos.
2158 * gnat_ugn.texi: Same.
2159 * init.c: Same.
2160 * par.adb: Same.
2161 * projects.texi: Same.
2162 * sem_ch4.adb: Same.
2163 * sem_ch6.adb: Same.
2164 * sem_dim.adb: Same.
2165 * sem_eval.adb: Same.
2166 * sem_prag.adb: Same.
2167 * sem_warn.adb: Same.
2168
2169 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2170
2171 * gcc-interface/cuintp.c: Adjust includes.
2172 * gcc-interface/decl.c: Likewise.
2173 * gcc-interface/misc.c: Likewise.
2174 * gcc-interface/targtyps.c: Likewise.
2175 * gcc-interface/trans.c: Likewise.
2176 * gcc-interface/utils.c: Likewise.
2177 * gcc-interface/utils2.c: Likewise.
2178
2179 2015-07-06 John Marino <gnugcc@marino.st>
2180
2181 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
2182
2183 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
2184
2185 PR ada/63310
2186 * gcc-interface/utils.c (gnat_write_global_declarations): Always
2187 build the dummy global variable if code was generated.
2188
2189 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2190
2191 PR fortran/66605
2192 * gcc-interface/misc.c (gnat_post_options): No need to disable
2193 warn_unused_parameter anymore.
2194
2195 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2196
2197 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
2198 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
2199 at-end procedures.
2200
2201 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2202
2203 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
2204 (gnat_write_global_declarations): New prototype.
2205 * gcc-interface/utils.c (type_decls): Rename back to...
2206 (global_decls): ...this.
2207 (gnat_pushdecls): Revert previous change.
2208 (create_var_decl): Do not output global variables.
2209 (note_types_used_by_globals): Rename back to...
2210 (gnat_write_global_declarations): ...this. Output variables on the
2211 global_decls vector.
2212 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
2213
2214 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2215
2216 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
2217 (create_var_decl): ...this. Add default value for last parameter.
2218 (create_type_stub_decl): Adjust.
2219 (create_type_decl): Likewise.
2220 (create_field_decl): Likewise.
2221 (create_param_decl): Likewise.
2222 (create_label_decl): Likewise.
2223 (create_subprog_decl): Likewise.
2224 * gcc-interface/utils.c (create_var_decl_1): Rename into...
2225 (create_var_decl): ...this. Rename var_name into name and var_init
2226 into init, move const_decl_allowed_p last and adjust accordingly.
2227 (create_type_stub_decl): Rename type_name into name and adjust.
2228 (create_type_decl): Likewise.
2229 (create_field_decl): Likewise for field_name and field_type.
2230 (create_param_decl): Likewise for param_name and param_type.
2231 (create_label_decl): Likewise for label_name.
2232 (create_subprog_decl): Likewise for subprog_name and subprog_type.
2233 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
2234 to create_var_decl_1.
2235
2236 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2237
2238 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
2239 artificial, has_checks and warned_aggressive_loop_optimizations.
2240 (gigi): Set warn_aggressive_loop_optimizations to 0.
2241 (inside_loop_p): New inline predicate.
2242 (push_range_check_info): Rename into...
2243 (find_loop_for): ...this and do not push range_check_info_d object.
2244 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
2245 fields of gnu_loop_info. Adjust detection of checks enabled by
2246 -funswitch-loops and adds one for -faggressive-loop-optimizations.
2247 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
2248 are enabled, warn for loops overrunning an array of size 1 not at the
2249 end of a record.
2250
2251 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2252
2253 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
2254 list.
2255 * gcc-interface/utils.c: Likewise.
2256
2257 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2258
2259 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
2260 ggc_cache_ptr_hash rather than ggc_cache_hasher.
2261 * gcc-interface/utils.c (pad_type_hasher): Likewise.
2262
2263 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2264
2265 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
2266 Delete.
2267 (value_annotation_hasher::keep_cache_entry): New function.
2268 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
2269 Delete.
2270 (pad_type_hasher::keep_cache_entry): New function.
2271
2272 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2273
2274 * gcc-interface/misc.c: Include calls.h not function.h.
2275
2276 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
2277
2278 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
2279 (tree create_type_decl): Likewise.
2280 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
2281 (create_var_decl): Likewise.
2282 (create_true_var_decl): Delete.
2283 (create_subprog_decl): Add debug_info_p parameter.
2284 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
2285 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
2286 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
2287 Remove DECL_IGNORED_P settings.
2288 <E_Enumeration_Type>: Likewise.
2289 <E_Record_Type>: Likewise.
2290 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
2291 Adjust call to create_subprog_decl.
2292 (get_minimal_subprog_decl): Likewise.
2293 (elaborate_expression_1): Adjust call to create_var_decl.
2294 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
2295 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
2296 * gcc-interface/utils.c (maybe_pad_type): Likewise.
2297 (record_builtin_type): Adjust comment.
2298 (create_type_stub_decl): Remove obsolete comment.
2299 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
2300 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
2301 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
2302 accordingly.
2303
2304 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
2305
2306 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
2307
2308 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
2309
2310 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
2311 the size of a padding type built around the return type is positive.
2312 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
2313 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
2314
2315 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2316
2317 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
2318 * gcc-interface/decl.c: Likewise.
2319 * gcc-interface/misc.c: Likewise.
2320 * gcc-interface/targtyps.c: Likewise.
2321 * gcc-interface/trans.c: Likewise.
2322 * gcc-interface/utils.c: Likewise.
2323 * gcc-interface/utils2.c: Likewise.
2324
2325 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2326
2327 * gcc-interface/utils.c (get_global_context): Register the main
2328 translation unit through the new debug hook.
2329
2330 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
2331
2332 * gcc-interface/misc.c: Remove duplicate include directives.
2333 * gcc-interface/trans.c: Likewise.
2334 * gcc-interface/utils.c: Likewise.
2335
2336 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2337
2338 * gcc-interface/cuintp.c : Adjust include files.
2339 * gcc-interface/decl.c : Likewise.
2340 * gcc-interface/misc.c : Likewise.
2341 * gcc-interface/targtyps.c : Likewise.
2342 * gcc-interface/trans.c : Likewise.
2343 * gcc-interface/utils.c : Likewise.
2344 * gcc-interface/utils2.c : Likewise.
2345
2346 2015-06-08 John Marino <gnugcc@marino.st>
2347
2348 * a-intnam-dragonfly.ads: New.
2349 * s-osinte-dragonfly.adb: Likewise.
2350 * s-osinte-dragonfly.ads: Likewise.
2351 * system-dragonfly-x86_64.ads: Likewise.
2352 * adaint.c: Add BSD macros.
2353 * cstreams.c: Likewise.
2354 * gsocket.h: Likewise.
2355 * link.c: Likewise.
2356 * socket.c: Likewise.
2357 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
2358 * init.c: Add __DragonFly__, change __gnat_install_handler
2359 prototype from empty to void.
2360 * initialize.c: Add __DragonFly__.
2361 * sysdep.c: Likewise.
2362 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
2363 * tracebak.c: Set unwinder for i386 BSD.
2364 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
2365 x86_64 FreeBSD and x86 FreeBSD.
2366
2367 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
2368
2369 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
2370 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
2371
2372 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2373
2374 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
2375 gnat_write_global_declarations.
2376 * gcc-interface/misc.c (gnat_parse_file): Call
2377 note_types_used_by_globals.
2378 Remove LANG_HOOKS_WRITE_GLOBALS.
2379 * gcc-interface/utils.c: Rename global_decls to type_decls.
2380 (gnat_write_global_declarations): Rename
2381 to note_types_used_by_globals.
2382 Remove call to finalize_compilation_unit.
2383 Remove call to debug_hooks->global_decl for globals.
2384 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
2385
2386 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2387
2388 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
2389 * gcc-interface/decl.c: Likewise.
2390 * gcc-interface/misc.c: Likewise.
2391 * gcc-interface/targtyps.c: Likewise.
2392 * gcc-interface/trans.c: Likewise.
2393 * gcc-interface/utils.c: Likewise.
2394 * gcc-interface/utils2.c: Likewise.
2395
2396 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
2397
2398 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
2399 processing a definition, create definitions for padding types
2400 around return types.
2401
2402 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
2403
2404 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
2405
2406 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
2407
2408 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
2409 typo in latest change.
2410
2411 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2412
2413 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
2414
2415 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
2416
2417 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
2418 call expression, process the corresponding function body. Also handle
2419 potential addends.
2420
2421 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
2422
2423 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
2424 references ones for functions that return references.
2425
2426 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2427
2428 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
2429 definition of a type coming from a limited_with, get to the full view
2430 if it is not in the main code unit.
2431
2432 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2433
2434 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
2435 specified, let the target mangle it before settting.
2436 (create_subprog_decl): Likewise and move this treatment last.
2437
2438 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2439
2440 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
2441 before first -gnatez switch. Simplify and add trailing space.
2442
2443 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2444
2445 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
2446 record has a parent field and a representation clause, make sure that
2447 it is properly aligned.
2448
2449 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2450
2451 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
2452 with character and enumeration literals as index values.
2453
2454 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2455
2456 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
2457 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
2458 address clause on aliased object with unconstrained nominal subtype.
2459 Mark the aligning variable as artificial, do not convert the address
2460 expression immediately but mark it as constant instead.
2461 * gcc-interface/utils.c (convert): If the target type contains a
2462 template, be prepared for an empty array.
2463 (maybe_unconstrained_array): Likewise.
2464 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
2465 with the pattern built for aligning types.
2466 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
2467 (build_simple_component_ref): Make public.
2468 If the base object is a constructor that contains a template, fold the
2469 result field by field.
2470
2471 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
2472
2473 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
2474
2475 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
2476
2477 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
2478 of sun. Add missing leading underscore to AIX. Remove #elif 0.
2479 * adaint.h: Likewise.
2480 * cio.c: Likewise.
2481 * cstreams.c: Likewise.
2482 * env.c: Likewise.
2483 * gsocket.h: Likewise.
2484 * init.c: Likewise. Test for __i386__ instead of i386.
2485 * link.c: Likewise.
2486 * s-oscons-tmplt.c: Likewise.
2487 * sysdep.c: Likewise.
2488 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
2489 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
2490
2491 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
2492
2493 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
2494 deal with the subtraction of a "negative" value in an unsigned type.
2495
2496 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
2497
2498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
2499 not error out on a return type which has a size that overflows if the
2500 return is done by invisible reference.
2501
2502 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
2503
2504 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
2505 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
2506
2507 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
2508
2509 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
2510 (rewrite_fn): Remove third parameter.
2511 (type_is_padding_self_referential): New inline predicate.
2512 (return_type_with_variable_size_p): Likewise.
2513 * gcc-interface/decl.c (allocatable_size_p): More around.
2514 (cannot_be_superflat_p): Rename into...
2515 (cannot_be_superflat ): ...this.
2516 (initial_value_needs_conversion): New predicate.
2517 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
2518 initial_value_needs_conversion and adjust to above renaming.
2519 For a renaming, force the materialization if the inner expression
2520 is compound. Adjust calls to elaborate_reference and build a
2521 compound expression if needed.
2522 (struct er_dat): Add N field.
2523 (elaborate_reference_1): Remove N parameter and adjust.
2524 (elaborate_reference): Add INIT parameter and pass it in the call to
2525 gnat_rewrite_reference. Adjust initial expression.
2526 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
2527 regular object declarations when it comes to creating a temporary.
2528 Adjust call to gnat_stabilize_reference and build a compound expression
2529 if needed. Invoke return_type_with_variable_size_p.
2530 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
2531 return a call to a function unmodified if it returns with variable size
2532 and is also the initial expression in an object declaration.
2533 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
2534 type if it is a call to a function that returns with variable size.
2535 (build_unary_op): Invoke type_is_padding_self_referential.
2536 (gnat_stabilize_reference_1): Remove N parameter and adjust.
2537 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
2538 to gnat_rewrite_reference.
2539 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
2540 <COMPOUND_EXPR>: New case.
2541
2542 2015-05-28 Ed Schonberg <schonberg@adacore.com>
2543
2544 * sem_ch3.adb (Is_Visible_Component): Component is visible
2545 in a derived type if inherited through an ancestor that has a
2546 partial view of the original type holding the component, if the
2547 full view of that original type is in scope.
2548 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
2549
2550 2015-05-28 Bob Duff <duff@adacore.com>
2551
2552 * sem_util.adb (Requires_Transient_Scope): For definite untagged
2553 subtypes, we should never have to use the secondary stack. This moves
2554 toward that goal. But there are still cases that don't work.
2555 Here, we move the check for Is_Definite first, but add a
2556 special-purpose check for Has_Discrim_Dep_Array.
2557
2558 2015-05-28 Bob Duff <duff@adacore.com>
2559
2560 * sem_util.adb (Requires_Transient_Scope): Avoid returning
2561 function results on the secondary stack in so many cases.
2562
2563 2015-05-28 Ed Schonberg <schonberg@adacore.com>
2564
2565 * sem_util.adb (Wrong_Type): In any instance, do not emit error
2566 if type of expression is the partial view of the expected type.
2567
2568 2015-05-28 Ed Schonberg <schonberg@adacore.com>
2569
2570 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
2571 names in named associations only needs to be done within an
2572 instance, on a call to a primitive of a formal derived type,
2573 where the actual subprogram may have different formal names than
2574 those of the primitive operation of the formal type.
2575 b) Defaulted parameters must be taken into account when obtaining
2576 the names of the formals of the actual subprogram being called.
2577
2578 2015-05-28 Robert Dewar <dewar@adacore.com>
2579
2580 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
2581
2582 2015-05-28 Ed Schonberg <schonberg@adacore.com>
2583
2584 * sem_util.adb (Set_Debug_Info_Needed): For a private type
2585 whose full view is itself a derived private type, set flag on
2586 underlying full view as well, for proper gdb display.
2587
2588 2015-05-28 Bob Duff <duff@adacore.com>
2589
2590 * exp_tss.ads: Minor comment fix.
2591 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
2592 Inline init_procs when the type has controlled parts. Remove
2593 obsolete comments about those init_procs -- init_procs for
2594 such types are no longer complex. A typical init_proc just
2595 initializes the 'Tag field, and calls the parent init_proc
2596 (e.g. for Limited_Controlled), which calls the grandparent
2597 (for Root_Controlled), which does nothing. This all boils down
2598 to one instruction when inlined.
2599 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
2600
2601 2015-05-28 Ed Schonberg <schonberg@adacore.com>
2602
2603 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
2604 is a derived type and is a generic actual, the selected component
2605 appears within an instance body, and the check over the type
2606 has failed, examine ancestor types for the desired component.
2607 (Find_Component_In_Instance): If record type is a derived type,
2608 examine all ancestors in order to locate desired component.
2609
2610 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
2611
2612 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
2613
2614 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
2615
2616 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
2617 incomplete type coming from a limited_with and whose non-limited view
2618 comes from the main unit.
2619
2620 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
2621
2622 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
2623 code applying atomic checks to the object.
2624
2625 2015-05-27 Robert Dewar <dewar@adacore.com>
2626
2627 * sem_aux.adb: Minor rewording.
2628
2629 2015-05-27 Bob Duff <duff@adacore.com>
2630
2631 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
2632 pragma Abort_Defer do nothing if Abort_Allowed is False.
2633
2634 2015-05-27 Arnaud Charlet <charlet@adacore.com>
2635
2636 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
2637 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
2638 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
2639 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
2640
2641 2015-05-27 Doug Rupp <rupp@adacore.com>
2642
2643 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
2644 well as kernel.
2645
2646 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
2647
2648 * par_sco.adb (Process_Decision): Store sloc to
2649 condition/pragmas SCOs associations into a temporary table before
2650 moving them to the SCO_Raw_Hash_Table so that we can back them
2651 out just like we do for SCO entries that are simple decisions
2652 in an expression context.
2653
2654 2015-05-27 Ed Schonberg <schonberg@adacore.com>
2655
2656 * sem_ch6.adb (Process_Formals): A non-private formal type that
2657 is a limited view does not have a list of private dependents.
2658
2659 2015-05-27 Ed Schonberg <schonberg@adacore.com>
2660
2661 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
2662 the case statement is a compile-time known value, we look for a
2663 corresponding alternative to optimize the case statement into a
2664 single case. If the type has a static predicate and the expression
2665 does not satisfy the predicate, there is no legal alternative and
2666 this optimization is not applicable. Excecution is erroneous,
2667 or else if assertions are enabled, an exception will be raised
2668 earlier, at the point the expression is elaborated.
2669
2670 2015-05-27 Robert Dewar <dewar@adacore.com>
2671
2672 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
2673 warning on Finalize, Adjust, or Initialize if type involved has
2674 Warnings_Off set.
2675
2676 2015-05-27 Ed Schonberg <schonberg@adacore.com>
2677
2678 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
2679 applied to a type with no known discriminants.
2680
2681 2015-05-26 Robert Dewar <dewar@adacore.com>
2682
2683 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2684
2685 2015-05-26 Bob Duff <duff@adacore.com>
2686
2687 * sem_elab.adb (Check_A_Call): In the case where we're
2688 calling something in an instance of a generic package that is
2689 within this same unit (as the call), make sure we treat it
2690 as a call to an entity within the same unit. That is, call
2691 Check_Internal_Call, rather than putting "Elaborate_All(X)"
2692 on X, which would necessarily result in an elaboration cycle in
2693 static-elaboration mode.
2694
2695 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2696
2697 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
2698 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
2699 parameter into Node parameter and remove Type parameter.
2700 Look at Is_Atomic_Or_VFA both on the type and on the object.
2701 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
2702 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
2703 (Process_Atomic_Independent_Shared_Volatile): Remove code
2704 propagating Atomic or VFA from object to locally-defined type.
2705
2706 2015-05-26 Bob Duff <duff@adacore.com>
2707
2708 * exp_ch7.adb: Minor comment fix.
2709
2710 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2711
2712 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
2713 bother about NaN's if Machine_Overflows is true.
2714
2715 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2716
2717 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
2718 force evaluation of the expression, if any, when the object has its
2719 elaboration delayed. Do not create a variable at global level.
2720
2721 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2722
2723 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
2724 extra-precision trick to literals. Build SAVE_EXPR manually.
2725
2726 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
2727
2728 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2729
2730 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
2731 (DECL_RENAMED_OBJECT): Adjust comment.
2732 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
2733 (invalidate_global_nonconstant_renamings): Likewise.
2734 (gnat_constant_reference_p): Likewise.
2735 (rewrite_fn): New function type.
2736 (gnat_rewrite_reference): Declare.
2737 (call_is_atomic_load): New inline predicate.
2738 * gcc-interface/decl.c (elaborate_reference_1): New function.
2739 (elaborate_reference): Likewise.
2740 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
2741 and simplify associated code. Set const_flag to true consistently in
2742 conjunction with used_by_ref.
2743 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
2744 pointers by renamed objects.
2745 (outer_atomic_access_required_p): Deal with renamings.
2746 (Compilation_Unit_to_gnu): Do not call
2747 invalidate_global_nonconstant_renamings.
2748 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
2749 (gnat_gimplify_expr): Deal with atomic loads.
2750 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
2751 (destroy_gnat_utils): Do not call
2752 invalidate_global_nonconstant_renamings.
2753 (record_global_nonconstant_renaming): Delete.
2754 (invalidate_global_nonconstant_renamings): Likewise.
2755 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
2756 (build_load_modify_store): Build a copy of the destination.
2757 (gnat_stabilize_reference_1): Adjust.
2758 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
2759 gnat_rewrite_reference and move bulk of code to...
2760 (gnat_rewrite_reference): ...here. New global function.
2761 (gnat_constant_reference_p): Delete.
2762
2763 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2764
2765 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
2766 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
2767 to detect constant renamings. Be prepared for specific pattern of
2768 renamed object based on function calls. Create a constant object
2769 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
2770 to gnat_stabilize_reference and tidy up. Remove redundant tests.
2771 (elaborate_expression_1): Remove obsolete test and tidy up.
2772 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
2773 parameters passed by reference.
2774 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
2775 side-effects.
2776 Use gnat_protect_expr instead of gnat_stabilize_reference for general
2777 protection against side-effects.
2778 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
2779 (gnat_save_expr): Invoke it.
2780 (gnat_protect_expr): Likewise.
2781 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
2782 of TREE_THIS_NOTRAP.
2783 (gnat_stabilize_reference): Remove parameter and adjust throughout.
2784 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
2785 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
2786
2787 2015-05-26 Ed Schonberg <schonberg@adacore.com>
2788
2789 * sinfo.ads: Minor reformatting.
2790 * sem_aux.ads: Clarify use of First_Discriminant.
2791 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
2792 view is replaced with the non-limited view in an instance body,
2793 where the enclosing unit must have a regular with_clause on the
2794 relevant unit.
2795 * sem_ch12.adb (Install_Body): Freeze instantation after its
2796 body. Remove useless freeze nodes for incomplete actuals to
2797 prevent multiple generation of internal operations.
2798 (Instantiate_Package_Body): Set sloc of body appropriately when
2799 there are incomplete actuals and the instance body is placed in
2800 the body of the enclosing unit.
2801 * errout.ads: Consistent punctuation, better alignment and trivial
2802 typos in comments.
2803 * err_vars.ads: Fix typo.
2804
2805 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2806
2807 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
2808 components of Volatile_Full_Access objects.
2809
2810 2015-05-26 Ed Schonberg <schonberg@adacore.com>
2811
2812 * sem_ch6.adb (Is_Non_Overriding_Operation,
2813 Get_Generic_Parent_Type): Handle properly the case of a derived
2814 scalar type by using the first subtype rather than its generated
2815 anonymous base type.
2816
2817 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
2818
2819 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
2820 case to...
2821 (Write_Field19_Name): ...here.
2822
2823 2015-05-26 Ed Schonberg <schonberg@adacore.com>
2824
2825 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
2826 of original expression in ASIS mode: does not solve the ASIS
2827 problem of a usable type information, and crashes the back-end
2828 when performing type annotations.
2829
2830 2015-05-26 Robert Dewar <dewar@adacore.com>
2831
2832 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
2833 (Is_Overriding_Subprogram): Use One_Only_Parameter.
2834 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
2835
2836 2015-05-26 Robert Dewar <dewar@adacore.com>
2837
2838 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
2839 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
2840 exp_ch3.adb: Minor reformatting.
2841
2842 2015-05-26 Bob Duff <duff@adacore.com>
2843
2844 * treepr.adb: Minor improvement to debugging routines (pp, pn)
2845 robustness. Rearrange the code so passing a nonexistent Node_Id
2846 prints "No such node" rather than crashing, and causing gdb to
2847 generate confusing messages.
2848
2849 2015-05-26 Gary Dismukes <dismukes@adacore.com>
2850
2851 * sem_util.adb: Minor typo fix.
2852
2853 2015-05-26 Yannick Moy <moy@adacore.com>
2854
2855 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
2856
2857 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
2858
2859 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
2860 restore the Ghost mode.
2861 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
2862 (Freeze_Type): Update the call to Set_Ghost_Mode.
2863 (Restore_Globals): New routine.
2864 * exp_ch5.adb Add with and use clauses for Ghost.
2865 (Expand_N_Assignment_Statement): Capture, set and restore the
2866 Ghost mode.
2867 (Restore_Globals): New routine.
2868 * exp_ch6.adb Add with and use clauses for Ghost.
2869 (Expand_N_Procedure_Call_Statement): Capture, set and
2870 restore the Ghost mode.
2871 (Expand_N_Subprogram_Body):
2872 Code cleanup. Capture, set and restore the Ghost mode.
2873 (Expand_N_Subprogram_Declaration): Capture, set and restore the
2874 Ghost mode.
2875 (Restore_Globals): New routine.
2876 * exp_ch7.adb Add with and use clauses for Ghost.
2877 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
2878 (Expand_N_Package_Declaration): Capture, set and restore the
2879 Ghost mode.
2880 (Wrap_HSS_In_Block): Create a proper identifier for the block.
2881 * exp_ch8.adb Add with and use clauses for Ghost.
2882 (Expand_N_Exception_Renaming_Declaration): Code
2883 cleanup. Capture, set and restore the Ghost mode.
2884 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
2885 the Ghost mode.
2886 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
2887 Ghost mode.
2888 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
2889 restore the Ghost mode.
2890 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
2891 cleanup. Capture, set and restore the Ghost mode.
2892 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
2893 not initialize the dispatch table slot of a Ghost subprogram.
2894 * exp_prag.adb Add with and use clauses for Ghost.
2895 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
2896 (Expand_Pragma_Contract_Cases): Capture, set and restore the
2897 Ghost mode.
2898 (Expand_Pragma_Initial_Condition): Capture, set and
2899 restore the Ghost mode.
2900 (Expand_Pragma_Loop_Variant): Capture,
2901 set and restore the Ghost mode.
2902 (Restore_Globals): New routine.
2903 * exp_util.adb Add with and use clauses for Ghost.
2904 (Make_Predicate_Call): Code cleanup. Capture, set and restore
2905 the Ghost mode.
2906 (Restore_Globals): New routine.
2907 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
2908 to Set_Ghost_Mode.
2909 * ghost.adb Add with and use clause for Sem_Prag.
2910 (Check_Ghost_Completion): Code cleanup.
2911 (Check_Ghost_Overriding): New routine.
2912 (Check_Ghost_Policy): Code cleanup.
2913 (Ghost_Entity): New routine.
2914 (Is_Ghost_Declaration): Removed.
2915 (Is_Ghost_Statement_Or_Pragma): Removed.
2916 (Is_OK_Context): Reimplemented.
2917 (Is_OK_Declaration): New routine.
2918 (Is_OK_Pragma): New routine.
2919 (Is_OK_Statement): New routine.
2920 (Mark_Full_View_As_Ghost): New routine.
2921 (Mark_Pragma_As_Ghost): New routine.
2922 (Mark_Renaming_As_Ghost): New routine.
2923 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
2924 (Set_From_Entity): New routine.
2925 (Set_From_Policy): New routine.
2926 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
2927 (Set_Ghost_Mode_For_Freeze): Removed.
2928 (Set_Ghost_Mode_From_Entity): New routine.
2929 (Set_Ghost_Mode_From_Policy): Removed.
2930 * ghost.ads (Check_Ghost_Overriding): New routine.
2931 (Mark_Full_View_As_Ghost): New routine.
2932 (Mark_Pragma_As_Ghost): New routine.
2933 (Mark_Renaming_As_Ghost): New routine.
2934 (Set_Ghost_Mode): Update the parameter profile. Update the
2935 comment on usage.
2936 (Set_Ghost_Mode_For_Freeze): Removed.
2937 (Set_Ghost_Mode_From_Entity): New routine.
2938 * sem_ch3.adb (Analyze_Full_Type_Declaration):
2939 Capture and restore the Ghost mode. Mark a type
2940 as Ghost regardless of whether it comes from source.
2941 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
2942 Ghost mode.
2943 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
2944 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
2945 (Analyze_Private_Extension_Declaration): Capture and
2946 restore the Ghost mode.
2947 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
2948 (Process_Full_View): The full view inherits all Ghost-related
2949 attributes from the private view.
2950 (Restore_Globals): New routine.
2951 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
2952 Ghost mode.
2953 (Restore_Globals): New routine.
2954 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
2955 Code cleanup. Capture and restore the Ghost mode. Mark a
2956 subprogram as Ghost regarless of whether it comes from source.
2957 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
2958 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
2959 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
2960 (New_Overloaded_Entity): Ensure that a
2961 parent subprogram and an overriding subprogram have compatible
2962 Ghost policies.
2963 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
2964 the Ghost mode.
2965 (Analyze_Package_Declaration): Capture and
2966 restore the Ghost mode. Mark a package as Ghost when it is
2967 declared in a Ghost region.
2968 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
2969 (Restore_Globals): New routine.
2970 * sem_ch8.adb (Analyze_Exception_Renaming): Code
2971 reformatting. Capture and restore the Ghost mode. A renaming
2972 becomes Ghost when its name references a Ghost entity.
2973 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
2974 renaming becomes Ghost when its name references a Ghost entity.
2975 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
2976 renaming becomes Ghost when its name references a Ghost entity.
2977 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
2978 renaming becomes Ghost when its name references a Ghost entity.
2979 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
2980 mode. A renaming becomes Ghost when its name references a
2981 Ghost entity.
2982 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
2983 and restore the Ghost mode.
2984 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
2985 restore the Ghost mode.
2986 (Analyze_Generic_Subprogram_Declaration):
2987 Capture and restore the Ghost mode.
2988 * sem_ch13.adb Add with and use clauses for Ghost.
2989 (Add_Invariant): New routine.
2990 (Add_Invariants): Factor out code.
2991 (Add_Predicate): New routine.
2992 (Add_Predicates): Factor out code.
2993 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
2994 set and restore the Ghost mode.
2995 (Build_Invariant_Procedure): Code cleanup.
2996 (Build_Predicate_Functions): Capture, set and
2997 restore the Ghost mode. Mark the generated functions as Ghost.
2998 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2999 Capture, set and restore the Ghost mode.
3000 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
3001 the Ghost mode.
3002 (Analyze_Initial_Condition_In_Decl_Part):
3003 Capture, set and restore the Ghost mode.
3004 (Analyze_Pragma):
3005 Code cleanup. Capture, set and restore the Ghost mode. Flag
3006 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
3007 Unreferenced_Objects as illegal when it applies to both Ghost
3008 and living arguments. Pragma Ghost cannot apply to synchronized
3009 objects.
3010 (Check_Kind): Moved to the spec of Sem_Prag.
3011 (Process_Inline): Flag the pragma as illegal when it applies to
3012 both Ghost and living arguments.
3013 (Restore_Globals): New routine.
3014 * sem_prag.ads Add pragma Default_Initial_Condition
3015 to table Assertion_Expression_Pragma. Add new table
3016 Is_Aspect_Specifying_Pragma.
3017 (Check_Kind): Moved from body of Sem_Prag.
3018 * sem_util.adb Add with and use clauses for Ghost.
3019 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
3020 the Ghost mode.
3021 (Build_Default_Init_Cond_Procedure_Declaration):
3022 Capture, set and restore the Ghost mode. Mark the default
3023 initial condition procedure as Ghost when it is declared
3024 in a Ghost region.
3025 (Is_Renaming_Declaration): New routine.
3026 (Policy_In_List): Account for the single argument version of
3027 Check_Pragma.
3028 * sem_util.ads (Is_Renaming_Declaration): New routine.
3029 * sinfo.adb (Is_Ghost_Pragma): New routine.
3030 (Set_Is_Ghost_Pragma): New routine.
3031 * sinfo.ads New attribute Is_Ghost_Pragma.
3032 (Is_Ghost_Pragma): New routine along with pragma Inline.
3033 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
3034
3035 2015-05-26 Robert Dewar <dewar@adacore.com>
3036
3037 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
3038 Minor reformatting.
3039
3040 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3041
3042 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
3043 reformatting and typo fixes in comments.
3044
3045 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3046
3047 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
3048 the two views of a private dependent in two separate steps,
3049 to ensure proper visibility in parent units analyzed for inlining.
3050
3051 2015-05-26 Yannick Moy <moy@adacore.com>
3052
3053 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
3054 (Package_Body, Package_Spec): New queries moved
3055 here from GNATprove.
3056 (Package_Specification): Simplify query to remove use of loop.
3057 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
3058 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
3059 queries moved here from GNATprove.
3060
3061 2015-05-26 Bob Duff <duff@adacore.com>
3062
3063 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
3064 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
3065 redundant assertions.
3066
3067 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3068
3069 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
3070
3071 2015-05-26 Doug Rupp <rupp@adacore.com>
3072
3073 * init.c [vxworks]: Refine previous checkin.
3074
3075 2015-05-26 Robert Dewar <dewar@adacore.com>
3076
3077 * exp_ch4.adb (Wrap_MA): New function.
3078 (Expand_N_Op_Expon): Use Wrap_MA.
3079
3080 2015-05-26 Bob Duff <duff@adacore.com>
3081
3082 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3083 Do not use secondary stack to return limited records with
3084 defaulted discriminants. This is an efficiency improvement.
3085 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
3086 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
3087 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
3088 Is_Definite_Subtype. This is an improvement to readability (the double
3089 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
3090 disallow passing non-[sub]type entities, an unnecessary and slightly
3091 bug-prone flexibility.
3092
3093 2015-05-26 Robert Dewar <dewar@adacore.com>
3094
3095 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
3096 bad bounds.
3097 * debug.adb: Document -gnatd.k.
3098 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
3099
3100 2015-05-26 Robert Dewar <dewar@adacore.com>
3101
3102 * gnat1drv.adb (Gnat1drv): Provide new arguments for
3103 Get_Target_Parameters.
3104 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
3105 new procedure.
3106 (Set_Restriction_No_Use_Of_Attribute): new procedure.
3107 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
3108 new procedure.
3109 (Set_Restriction_No_Use_Of_Attribute): new procedure.
3110 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
3111 * targparm.adb (Get_Target_Parameters): Allow new restriction
3112 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
3113 No_Use_Of_Pragma.
3114 * targparm.ads: New parameters for Get_Target_Parameters.
3115 * tbuild.adb (Set_NOD): New name for Set_RND.
3116 (Set_NSA): New procedure.
3117 (Set_NUA): New procedure.
3118 (Set_NUP): New procedure.
3119 * tbuild.ads (Make_SC): Minor reformatting.
3120 (Set_NOD): New name for Set_RND.
3121 (Set_NSA, Set_NUA, Set_NUP): New procedure.
3122
3123 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3124
3125 * a-stwise.adb (Find_Token): If source'first is not positive,
3126 an exception must be raised, as specified by RM 2005 A.4.3
3127 (68/1). This must be checked explicitly, given that run-time
3128 files are normally compiled without constraint checks.
3129 * a-stzsea.adb (Find_Token): Ditto.
3130
3131 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3132
3133 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
3134 to fully implement RM 8.6 (17/3). which earlier only applied
3135 to synchronized types. Used to preanalyze aspects that include
3136 current instances of types, such as Predicate and Invariant.
3137 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
3138 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
3139 expression of aspect and analyze it to provide proper type
3140 information.
3141
3142 2015-05-26 Robert Dewar <dewar@adacore.com>
3143
3144 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
3145 * s-exnllf.adb (Exn_Float): New function.
3146 (Exn_Long_Float): New function.
3147 (Exn_Long_Long_Float): Rewritten interface.
3148 (Exp): New name for what used to be Exn_Long_Long_Float.
3149 * s-exnllf.ads (Exn_Float): New function.
3150 (Exn_Long_Float): New function.
3151
3152 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3153
3154 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
3155 on a selected component when the prefix is a type name that is
3156 a Current_Instance.
3157 * einfo.ads: Minor grammar fix.
3158
3159 2015-05-26 Doug Rupp <rupp@adacore.com>
3160
3161 * init.c [vxworks] (sysLib.h): Only for x86.
3162
3163 2015-05-26 Doug Rupp <rupp@adacore.com>
3164
3165 * init-vxsim.c (CPU): define as __VXSIM_CPU__
3166 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
3167 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
3168 * sigtramp.h: Likewise.
3169
3170 2015-05-26 Robert Dewar <dewar@adacore.com>
3171
3172 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
3173 * sem_util.adb: Minor reformatting
3174
3175 2015-05-26 Yannick Moy <moy@adacore.com>
3176
3177 * inline.adb (Has_Initialized_Type): Adapt to new names.
3178 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
3179 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
3180 Subprogram_Specification): New query functions used in GNATprove.
3181 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
3182 query functions used in GNATprove.
3183 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
3184 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
3185 Is_Double_Precision_Floating_Point_Type,
3186 Is_Single_Precision_Floating_Point_Type): New query functions
3187 used in GNATprove.
3188
3189 2015-05-26 Bob Duff <duff@adacore.com>
3190
3191 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
3192 some huge number.
3193 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
3194 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
3195
3196 2015-05-26 Robert Dewar <dewar@adacore.com>
3197
3198 * sinfo.adb: Minor comment addition.
3199 * einfo.adb: Minor whitespace and punctuation fix.
3200 * sem_util.adb: Minor editing of comments.
3201
3202 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3203
3204 * sem_ch7.adb (Install_Private_Declarations,
3205 Swap_Private_Dependents): Ensure that both views of the dependent
3206 subtype are immediately visible if we are within their scope. This
3207 may be needed when a procedure body is both the parent of an
3208 instantiated child unit, and is itself used to inline a local
3209 function.
3210
3211 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3212
3213 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
3214
3215 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3216
3217 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
3218 detecting exceptions to the rewriting, deal with implicit
3219 dereferences in the selected component case.
3220
3221 2015-05-26 Bob Duff <duff@adacore.com>
3222
3223 * sem_ch13.adb (Analyze_One_Aspect): Do not
3224 require the expression of the Disable_Controlled aspect to be
3225 static in a generic template, because 'Enabled is not known
3226 until the instance.
3227
3228 2015-05-26 Doug Rupp <rupp@adacore.com>
3229
3230 * init-vxsim.c: New file for vxsim ZCX
3231 * sigtramp-vxworks-vxsim.c: Likewise.
3232 * sigtramp-vxworks.c: Factor out target dependent bits into ...
3233 * sigtramp-vxworks-target.inc: ... here.
3234 * sigtramp.h: Add vxsim zcx protos.
3235 * init.c [vxworks...] (sysLib.h): Include.
3236 (__gnat_map_signal): Make global.
3237 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
3238 on vxsim.
3239 [...i386] (__gnat_install_handler): Test if on vxsim.
3240
3241 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3242
3243 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
3244 iterator over an array, if the component is aliased, the loop
3245 variable is aliased as well.
3246
3247 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3248
3249 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
3250 parameters that is rewritten as an expression_with_actions,
3251 we preserve the original function call node for further use by
3252 the caller (typically Expand_Call). In the presence of validity
3253 checks, that function call, though it is labelled Analyzed to
3254 prevent an infinite recursion, may be rewritten as a temporary
3255 by Remove_Side_Effects. Ensure that the caller has access to
3256 the original function call to continue expansion.
3257 * atree.ads: Minor typo in comment.
3258
3259 2015-05-26 Javier Miranda <miranda@adacore.com>
3260
3261 * sem_util.adb (Check_Function_Writable_Actuals):
3262 Add missing support to check the violation of writable actuals
3263 in array aggregates that have a nonstatic range.
3264
3265 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
3266
3267 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
3268 Expand_Pragma_Contract_Cases.
3269 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
3270 Expand_Pragma_Contract_Cases.
3271 * sem_ch13.adb (Add_Invariants): Use the original aspect name
3272 when creating the arguments of pragma Check. This ensures that
3273 'Class is properly recognized and handled.
3274
3275 2015-05-26 Arnaud Charlet <charlet@adacore.com>
3276
3277 * gnat1drv.adb: Minor adjustments.
3278 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
3279 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
3280 Stop_Subtree_Climbind): Code cleanup.
3281 * einfo.ads: Minor comment change.
3282
3283 2015-05-26 Javier Miranda <miranda@adacore.com>
3284
3285 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
3286 Code cleanup.
3287 * sem_ch3.adb (Build_Derived_Record_Type,
3288 Record_Type_Declaration): Code cleanup.
3289 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
3290 Stop_Subtree_Climbind): Tables which speed up the identification
3291 of dangerous calls to Ada 2012 functions with writable actuals
3292 (AI05-0144).
3293 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
3294 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
3295 Analyze_Range): Code cleanup.
3296 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
3297 (Check_Writable_Actuals): Code cleanup using the added tables.
3298 * sem_util.adb (Check_Function_Writable_Actuals): Return
3299 immediately if the node does not have the flag Check_Actuals
3300 set to True.
3301
3302 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3303
3304 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
3305 condition in the detection of the effects of Remove_Side_Effects.
3306 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
3307 * exp_util.adb (Is_Name_Reference): New predicate.
3308 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
3309 in order to decide whether to use the renaming to capture the
3310 side effects of the subexpression.
3311 (Side_Effect_Free): Remove obsolete test.
3312
3313 2015-05-26 Robert Dewar <dewar@adacore.com>
3314
3315 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
3316 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
3317 (Is_Controlled_Active): New function.
3318 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
3319 Is_Controlled_Active.
3320 * exp_util.adb (Needs_Finalization): Finalization not needed
3321 if Disable_Controlled set.
3322 * freeze.adb (Freeze_Array_Type): Do not set
3323 Has_Controlled_Component if the component has Disable_Controlled.
3324 (Freeze_Record_Type): ditto.
3325 * sem_ch13.adb (Decorate): Minor reformatting.
3326 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
3327 * sem_ch3.adb (Analyze_Object_Declaration): Handle
3328 Disable_Controlled.
3329 (Array_Type_Declaration): ditto.
3330 (Build_Derived_Private_Type): ditto.
3331 (Build_Derived_Type): ditto.
3332 (Record_Type_Definition): ditto.
3333 * snames.ads-tmpl: Add Name_Disable_Controlled.
3334
3335 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3336
3337 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
3338 of a renaming to capture the return value of a function call.
3339 (Expand_Simple_Function_Return): Call Remove_Side_Effects
3340 instead of removing side effects manually before the call to
3341 _Postconditions.
3342
3343 2015-05-26 Robert Dewar <dewar@adacore.com>
3344
3345 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
3346 order in calling Duplicate_Subexpr.
3347 * einfo.ads: Fix documentation of Object/Value size for scalar types.
3348
3349 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3350
3351 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
3352 If a component is default-initialized and its type has an
3353 invariant procedure, insert an invariant test after code for
3354 default-initialization of the component.
3355
3356 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3357
3358 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
3359
3360 2015-05-26 Robert Dewar <dewar@adacore.com>
3361
3362 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
3363 making AREC entity names unique.
3364
3365 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3366
3367 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
3368 has aspect specifications, examine the corresponding list of
3369 representation items to determine whether there is a visible
3370 stream operation. The attribute definition clause generated from
3371 the aspect will be inserted at the freeze point of the type,
3372 which may be in the private part and not directly visible,
3373 but the aspect makes the operation available to a client.
3374
3375 2015-05-26 Robert Dewar <dewar@adacore.com>
3376
3377 * sem_util.adb: Minor code reorganization.
3378 * sem_ch6.adb: Minor reformatting.
3379
3380 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3381
3382 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
3383 original size for elementary types before issuing the size warning.
3384
3385 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3386
3387 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
3388 (C_Get_Words_BE): Likewise.
3389 (C_Get_Bytes_BE): Likewise.
3390 (C_Get_Bits_BE): Likewise.
3391 (Width_From_Size): Remove superfluous space.
3392 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
3393 (get_target_float_words_be): ...this.
3394 (get_words_be): Rename into...
3395 (get_target_words_be): ...this.
3396 (get_bytes_be): Rename into...
3397 (get_target_bytes_be): ...this.
3398 (get_bits_be): Rename into...
3399 (get_target_bits_be): ...this.
3400 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
3401 (ptr_void_type_node): Delete.
3402 (get_target_float_size): Likewise.
3403 (get_target_double_size): Likewise.
3404 (get_target_long_double_size): Likewise.
3405 (get_float_words_be): Likewise.
3406 (get_words_be): Likewise.
3407 (get_bytes_be): Likewise.
3408 (get_bits_be): Likewise.
3409 (get_target_float_words_be): Declare.
3410 (get_target_words_be): Likewise.
3411 (get_target_bytes_be): Likewise.
3412 (get_target_bits_be): Likewise.
3413 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
3414 with ptr_type_node.
3415 (intrin_return_compatible_p): Likewise.
3416 * gcc-interface/trans.c (gigi): Likewise.
3417 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
3418 (maybe_wrap_free): Likewise.
3419 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
3420 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
3421
3422 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3423
3424 * gcc-interface/decl.c (elaborate_expression): Take a const string
3425 suffix instead of a tree.
3426 (elaborate_expression_1): Likewise.
3427 (elaborate_expression_2): Likewise.
3428 (gnat_to_gnu_entity): Adjust to above changes.
3429 (build_subst_list): Likewise.
3430 (get_entity_char): New static function.
3431
3432 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3433
3434 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
3435 <E_Exception>: Merge with E_Variable case.
3436 <E_Variable>: Remove 'object' label.
3437
3438 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3439
3440 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
3441 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
3442 * gcc-interface/utils.c (convert): Likewise and simplify.
3443 (remove_conversions): Likewise.
3444 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
3445 (build_unary_op): Likewise and simplify.
3446
3447 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3448
3449 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
3450 (build_atomic_store): Likewise.
3451 (build_load_modify_store): Declare.
3452 (VECTOR_TYPE_P): Delete.
3453 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
3454 Is_Atomic_Or_VFA throughout.
3455 <E_Array_Type>: Build a variant of the XUA type instead of forcing
3456 TYPE_VOLATILE on it.
3457 <E_Array_Subtype>: Use the main variant of the base type.
3458 Do not force TYPE_VOLATILE on the type being built.
3459 <E_Record_Type>: Likewise.
3460 <E_Array_Subtype>: Likewise.
3461 <E_Subprogram_Type>: Rename local variable.
3462 Add Atomic qualifier in conjunction with Volatile on types if needed.
3463 Force BLKmode for by-ref types only at the end of the processing.
3464 Change qualifiers only after changing the mode of the type. Set
3465 TYPE_UNIVERSAL_ALIASING_P on the type directly.
3466 (check_ok_for_atomic_type): Issue specific error message for VFA.
3467 (gnat_to_gnu_component_type): Replace Is_Atomic with
3468 Is_Atomic_Or_VFA throughout.
3469 * gcc-interface/misc.c (gnat_get_alias_set): Test
3470 TYPE_UNIVERSAL_ALIASING_P on the type directly.
3471 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
3472 Is_Atomic_Or_VFA throughout. Add missing guard.
3473 (node_is_atomic): New predicate.
3474 (node_has_volatile_full_access): Likewise.
3475 (gnat_strip_type_conversion): New function.
3476 (outer_atomic_access_required_p): New predicate.
3477 (atomic_sync_required_p): Rename into...
3478 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
3479 parent node first and then look for the atomic setting. Add support
3480 for Volatile_Full_Access.
3481 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
3482 and adjusts calls to above functions. Use load-modify-store sequence
3483 for updates of In/Out and Out parameters if required, as well as for
3484 moving the result to the target if required. Add couple of missing
3485 guards.
3486 (gnat_to_gnu): Adjust calls to above functions.
3487 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
3488 evaluate only its address.
3489 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
3490 store sequence if required.
3491 <N_Function_Call>: Adjust call to Call_to_gnu.
3492 (extract_values): Adjust comment.
3493 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
3494 use relaxed memory model if it is not set.
3495 (build_atomic_store): Likewise.
3496 (call_is_atomic_load): New predicate.
3497 (build_load_modify_store): New function.
3498 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
3499 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
3500
3501 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3502
3503 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
3504 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
3505 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
3506 (invalidate_global_renaming_pointers): Likewise.
3507 (record_global_nonconstant_renaming): New.
3508 (invalidate_global_nonconstant_renamings): Likewise.
3509 (get_inner_constant_reference): Likewise.
3510 (gnat_constant_reference_p): Likewise.
3511 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
3512 and register the renaming pointer only if the object is non-constant.
3513 (elaborate_expression_1): Call get_inner_constant_reference instead
3514 of get_inner_reference.
3515 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
3516 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
3517 object before substituting it.
3518 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
3519 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
3520 result at the global level.
3521 (N_Exception_Renaming_Declaration): Likewise.
3522 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
3523 (global_nonconstant_renamings): ...this.
3524 (destroy_gnat_utils): Adjust to above renaming.
3525 (record_global_renaming_pointer): Rename into...
3526 (record_global_nonconstant_renaming): ...this.
3527 (invalidate_global_renaming_pointers): Rename into...
3528 (invalidate_global_nonconstant_renamings): ...this and do not recheck
3529 the renamed object before invalidating.
3530 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
3531 (get_inner_constant_reference): New public function.
3532 (gnat_constant_reference_p): New predicate.
3533
3534 2015-05-25 Javier Miranda <miranda@adacore.com>
3535
3536 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
3537 is now present in subprograms, generic subprograms, entries and
3538 entry families.
3539 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
3540 on entries, entry families, subprograms and generic subprograms.
3541 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
3542 Minor code reorganization to ensure that the Ekind attribute
3543 of the subprogram entity is set before its formals are
3544 processed. Required to allow the use of the attribute
3545 Has_Out_Or_In_Out_Parameter on the subprogram entity.
3546 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
3547 Perform the check on writable actuals only if the value of some
3548 component of the aggregate involves calling a function with
3549 out-mode parameters.
3550 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
3551 internally built aggregate.
3552 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
3553 Perform the check on writable actuals only if the initialization of
3554 some component involves calling a function with out-mode parameters.
3555 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
3556 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
3557 Analyze_Range): Check writable actuals only if the
3558 subtrees have a call to a function with out-mode parameters
3559 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
3560 has out or in-out parameters then mark its outermost enclosing
3561 construct as a node on which the writable actuals check must
3562 be performed.
3563 (Analyze_Call): Check if the flag must be set and if the outermost
3564 enclosing construct.
3565 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
3566 and reorganization. We skip processing aggregate discriminants
3567 since their precise analysis involves two phases traversal.
3568 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
3569 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
3570 check_writable_actuals.
3571
3572 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3573
3574 * sem_ch3.adb (Constrain_Concurrent): If the context is a
3575 type declaration, generate an Itype_Reference for the anonymous
3576 subtype, to force elaboration at this point in gigi.
3577
3578 2015-05-22 Gary Dismukes <dismukes@adacore.com>
3579
3580 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
3581 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
3582
3583 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3584
3585 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
3586 operation, replace the names of the actuals in named associations
3587 with the names of the actuals of the subprogram that is eventually
3588 executed. The names of the formals and the defaults can differ
3589 between the two operations when they are operations of a formal
3590 derived type.
3591
3592 2015-05-22 Bob Duff <duff@adacore.com>
3593
3594 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
3595 out slow path into separate procedure. Inline Append. Fast path
3596 now avoids calling Insert.
3597 (Finalize): Do the busy checking last, so the container gets emptied.
3598 (Insert, Insert_Space): Remove redundancy.
3599
3600 2015-05-22 Robert Dewar <dewar@adacore.com>
3601
3602 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
3603 for -gnatd.V.
3604
3605 2015-05-22 Arnaud Charlet <charlet@adacore.com>
3606
3607 * gnatvsn.ads: Minor code reorg to remember more easily to update
3608 variables.
3609
3610 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3611
3612 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
3613 limited_with clause on a predefined unit is not transformed into
3614 a regular with_clause, to preserve the original tree structure.
3615 * sinfo.ads (N_With_Clause): Add comment on handling of
3616 Limited_With.
3617 * sem_ch10.adb: Minor reformatting.
3618
3619 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3620
3621 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
3622 the profile of a subprogram renaming does not require freezing,
3623 because it is declared in a different unit.
3624
3625 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3626
3627 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
3628 composite type) is private, go to full view. This was previously
3629 done only in an instance context, but is happen whenever a chain
3630 of private extensions includes one inherited discriminant.
3631
3632 2015-05-22 Robert Dewar <dewar@adacore.com>
3633
3634 * einfo.ads: Minor comment updates.
3635 * exp_unst.adb: Move Subps table to spec Don't remove old entries
3636 from table Add Last field to record last entry used.
3637 * exp_unst.ads: Move Subps table here from body So that Cprint
3638 can access saved values.
3639
3640 2015-05-22 Bob Duff <duff@adacore.com>
3641
3642 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
3643 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
3644 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
3645 (Pseudo_Reference, Element_Access, Get_Element_Access): New
3646 declarations added for use by performance improvements in exp_ch5.adb.
3647 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
3648 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
3649 Instead of doing literally what the RM calls for, we do something
3650 equivalent that avoids expensive operations inside the loop. If the
3651 container package has appropriate Next, Pseudo_Reference,
3652 Element_Access, Get_Element_Access declarations, we invoke the
3653 optimization.
3654 * snames.ads-tmpl: Note speed improvement.
3655
3656 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
3657
3658 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
3659 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
3660 Add pattern to translate "or else" into "||".
3661
3662 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
3663
3664 * einfo.ads (Has_Volatile_Full_Access): Rename into...
3665 (Is_Volatile_Full_Access): ...this.
3666 (Set_Has_Volatile_Full_Access): Rename into...
3667 (Set_Is_Volatile_Full_Access): ...this.
3668 * einfo.adb (Has_Volatile_Full_Access): Rename into...
3669 (Is_Volatile_Full_Access): ...this.
3670 (Set_Has_Volatile_Full_Access): Rename into...
3671 (Set_Is_Volatile_Full_Access): ...this.
3672 (Is_Atomic_Or_VFA): Adjust to above renaming.
3673 * errout.adb (Special_Msg_Delete): Likewise.
3674 * exp_pakd.adb (Install_PAT): Likewise.
3675 * freeze.adb (Freeze_Array_Type): Likewise.
3676 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
3677 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
3678 (Inherit_Aspects_At_Freeze_Point): Likewise.
3679 * sem_prag.adb (Set_Atomic_VFA): Likewise.
3680 (Process_Atomic_Independent_Shared_Volatile): Likewise.
3681 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
3682
3683 2015-05-22 Robert Dewar <dewar@adacore.com>
3684
3685 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
3686 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
3687 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
3688 change that deals with the fact that most of the special coding for
3689 Atomic should also apply to the case of Volatile_Full_Access.
3690 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
3691 references to Is_Atomic now use this new attribute.
3692
3693 2015-05-22 Robert Dewar <dewar@adacore.com>
3694
3695 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
3696 comparison.
3697
3698 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
3699
3700 * sprint.adb (Source_Dump): When generating debug files, deal
3701 with the case of a stand-alone package instantiation by dumping
3702 together the spec and the body in the common debug file.
3703
3704 2015-05-22 Robert Dewar <dewar@adacore.com>
3705
3706 * sem_ch13.adb (Minimum_Size): Size is zero for null range
3707 discrete subtype.
3708
3709 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3710
3711 * einfo.adb (Anonymous_Master): This attribute now applies
3712 to package and subprogram bodies.
3713 (Set_Anonymous_Master): This attribute now applies to package and
3714 subprogram bodies.
3715 (Write_Field36_Name): Add output for package and subprogram bodies.
3716 * einfo.ads Update the documentation on attribute Anonymous_Master
3717 along with occurrences in entities.
3718 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
3719 handle spec and body anonymous masters of the same unit.
3720 (Current_Anonymous_Master): Reimplemented. Handle a
3721 package instantiation that acts as a compilation unit.
3722 (Insert_And_Analyze): Reimplemented.
3723
3724 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3725
3726 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
3727 predefined unit is treated as a regular with_clause.
3728
3729 2015-05-22 Robert Dewar <dewar@adacore.com>
3730
3731 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
3732 prj-conf.adb, sem_disp.adb: Minor reformatting.
3733
3734 2015-05-22 Vincent Celier <celier@adacore.com>
3735
3736 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
3737 for switch -P and, if found and gprclean is available, invoke
3738 silently gprclean.
3739 * make.adb (Initialize): For native gnatmake, check for switch -P
3740 and, if found and gprbuild is available, invoke silently gprbuild.
3741
3742 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
3743
3744 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
3745 specific warning for discrete types when the source is larger
3746 than the target.
3747
3748 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3749
3750 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
3751 package instantiations. Holds the list of actuals in the instance
3752 that are incomplete types, to determine where the corresponding
3753 instance body must be placed.
3754 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
3755 actual in an instance matches an incomplete formal.
3756 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
3757 explicit dereference.
3758 (Inherited_Subprograms): In the presence of a limited view there
3759 are no subprograms to inherit.
3760 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
3761 actuals of instance, for later placement of instance body and
3762 freeze nodes for actuals.
3763 (Install_Body): In the presence of actuals that incomplete types
3764 from a limited view, the instance body cannot be placed after
3765 the declaration because full views have not been seen yet. Any
3766 use of the non-limited views in the instance body requires
3767 the presence of a regular with_clause in the enclosing unit,
3768 and will fail if this with_clause is missing. We place the
3769 instance body at the beginning of the enclosing body, which is
3770 the unit being compiled, and ensure that freeze nodes for the
3771 full views of the incomplete types appear before the instance.
3772
3773 2015-05-22 Pascal Obry <obry@adacore.com>
3774
3775 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
3776 (In_Place_Option): Removed.
3777 (Relocate_Build_Tree_Option): New constant.
3778 (Root_Dir_Option): New constant.
3779 (Obj_Root_Dir): Removed.
3780 (Build_Tree_Dir): New variable.
3781 (Root_Src_Tree): Removed.
3782 (Root_Dir): New variable.
3783 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
3784 for improper relocation.
3785 * prj-nmsc.adb (Locate_Directory): Add check for improper
3786 relocation.
3787
3788 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3789
3790 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
3791 attribute now applies to the base type.
3792 (Has_Default_Init_Cond): Now applies to the base type.
3793 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
3794 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
3795 applies to the base type.
3796 (Set_Has_Default_Init_Cond): Now applies to the base type.
3797 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
3798 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
3799 base type when adding a call to the Default_Initial_Condition.
3800
3801 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3802
3803 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
3804 is now unused.
3805 (Anonymous_Master): New routine.
3806 (Has_Anonymous_Master): Removed.
3807 (Set_Anonymous_Master): New routine.
3808 (Set_Has_Anonymous_Master): Removed.
3809 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
3810 (Write_Field36_Name): Add output for Anonymous_Master.
3811 * einfo.ads Add new attribute Anonymous_Master along with
3812 occurrences in nodes. Remove attribute Has_Anonymous_Master along
3813 with occurrences in nodes.
3814 (Anonymous_Master): New routine along with pragma Inline.
3815 (Has_Anonymous_Master): Removed along with pragma Inline.
3816 (Set_Anonymous_Master): New routine along with pragma Inline.
3817 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
3818 * exp_ch4.adb (Create_Anonymous_Master): New routine.
3819 (Current_Anonymous_Master): Reimplemented.
3820
3821 2015-05-22 Bob Duff <duff@adacore.com>
3822
3823 * freeze.adb (Freeze_Profile): Suppress warning if imported
3824 subprogram is not at library level.
3825
3826 2015-05-22 Robert Dewar <dewar@adacore.com>
3827
3828 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
3829 component of an object to which Volatile_Full_Access applies.
3830
3831 2015-05-22 Jerome Guitton <guitton@adacore.com>
3832
3833 * exp_dbug.ads: Add note about non bit-packed arrays.
3834
3835 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
3836
3837 * sem_prag.adb: Fix typo.
3838 * einfo.ads: Grammar fixes in comments.
3839
3840 2015-05-22 Bob Duff <duff@adacore.com>
3841
3842 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
3843 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3844 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
3845 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
3846 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
3847 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
3848 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
3849 Add an initialization expression "raise Program_Error". See,
3850 for example, RM-A.18.2(148.4).
3851
3852 2015-05-22 Robert Dewar <dewar@adacore.com>
3853
3854 * debug.adb: Update documentation.
3855 * einfo.ads, einfo.adb (Needs_Typedef): New flag
3856 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
3857 typedef's in C.
3858 * frontend.adb: Update comments.
3859 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
3860 for -gnatd.V
3861 * opt.ads (Generate_C_Code): New switch.
3862 * osint-c.adb (Write_C_File_Info): Removed, not used
3863 (Write_H_File_Info): Removed, not used
3864 * osint-c.ads (Write_C_File_Info): Removed, not used
3865 (Write_H_File_Info): Removed, not used
3866 * osint.ads (Write_Info): Minor comment updates.
3867 (Output_FD): Moved from private part to public part of spec.
3868 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
3869 mode.
3870 * atree.ads: minor typo in comment.
3871 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
3872 Do not allow VFA on composite object with aliased component.
3873
3874 2015-05-22 Arnaud Charlet <charlet@adacore.com>
3875
3876 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
3877
3878 2015-05-22 Pascal Obry <obry@adacore.com>
3879
3880 * prj-util.adb: Minor comment editing.
3881
3882 2015-05-22 Pascal Obry <obry@adacore.com>
3883
3884 * makeutl.ads (In_Place_Option): New constant.
3885 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
3886 objects).
3887 (Root_Src_Tree): New variable (absolute path of root source tree).
3888 * prj-conf.adb (Do_Autoconf): Take into account the object root
3889 directory (if defined) to generate configuration project.
3890 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
3891 is defined.
3892 (Locate_Directory): Likewise.
3893
3894 2015-05-22 Pascal Obry <obry@adacore.com>
3895
3896 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
3897
3898 2015-05-22 Bob Duff <duff@adacore.com>
3899
3900 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
3901 interface to return Empty when not found, so we can avoid handling
3902 Program_Error in that case.
3903 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
3904 primitives.
3905 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
3906 code is expecting Empty.
3907 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
3908 Program_Error.
3909
3910 2015-05-22 Robert Dewar <dewar@adacore.com>
3911
3912 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
3913 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
3914 non-binary.
3915 * exp_util.adb: Add comment.
3916 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
3917 body.
3918 (Set_File_Name): New name for the above.
3919 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
3920 Close_C_File, Close_H_File): New procedure.
3921 * osint.adb: Minor reformatting.
3922 * osint.ads: Minor comment updates.
3923
3924 2015-05-22 Robert Dewar <dewar@adacore.com>
3925
3926 * exp_ch4.adb: Minor rewording.
3927 * exp_util.ads: Clarify that Find_Prim_Op is only for
3928 tagged types.
3929
3930 2015-05-22 Robert Dewar <dewar@adacore.com>
3931
3932 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
3933 Check_Actuals.
3934 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
3935 and overflow cases.
3936
3937 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
3938
3939 * exp_pakd.adb (Install_PAT): Propagate representation aspects
3940 from the original array type to the PAT.
3941
3942 2015-05-22 Robert Dewar <dewar@adacore.com>
3943
3944 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
3945
3946 2015-05-22 Robert Dewar <dewar@adacore.com>
3947
3948 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
3949
3950 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3951
3952 * sem_prag.adb (Analyze_Pragma): Remove the detection
3953 of a useless Part_Of indicator when the related item is a constant.
3954 (Check_Matching_Constituent): Do not emit an error on a constant.
3955 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
3956 when the related item is a constant.
3957 (Collect_Body_States): Code cleanup.
3958 (Collect_Visible_States): Code cleanup.
3959 (Report_Unused_States): Do not emit an error on a constant.
3960 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
3961
3962 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
3963
3964 * sem_ch8.adb (Analyze_Object_Renaming): Copy
3965 Has_Volatile_Full_Access from renamed to renaming entities.
3966 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
3967 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
3968
3969 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3970
3971 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
3972 RM 6.9 rules.
3973 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
3974 * sem_ch3.adb (Analyze_Object_Declaration): Update references
3975 to SPARK RM 6.9 rules.
3976 (Check_Completion): Ghost entities do not require a special form of
3977 completion.
3978 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
3979 to SPARK RM 6.9 rules.
3980 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
3981 rules.
3982 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
3983 to SPARK RM 6.9 rules.
3984 (Requires_Completion_In_Body): Ghost entities do not require a special
3985 form of completion.
3986
3987 2015-05-22 Robert Dewar <dewar@adacore.com>
3988
3989 * a-csquin.ads: Use Ada 2012 notation.
3990 * sem_ch8.adb: Minor reformatting.
3991
3992 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3993
3994 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
3995 acts as a completion.
3996
3997 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3998
3999 * sem_ch13.adb: Minor reformatting.
4000
4001 2015-05-22 Jose Ruiz <ruiz@adacore.com>
4002
4003 * a-reatim.adb: Minor change, fix typo.
4004
4005 2015-05-22 Robert Dewar <dewar@adacore.com>
4006
4007 * sem_util.ads: Minor addition of ??? comment.
4008 * sem_prag.adb, sem_util.adb: Minor reformatting.
4009 * sem_ch13.adb: minor reformatting.
4010
4011 2015-05-22 Robert Dewar <dewar@adacore.com>
4012
4013 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
4014 is 64-bits.
4015 * sem_ch13.adb: Improve error message.
4016 * exp_ch4.adb: Minor reformatting.
4017
4018 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4019
4020 * sem_prag.adb (Analyze_Pragma): Constants without variable
4021 input do not require indicator Part_Of.
4022 (Check_Missing_Part_Of): Constants without variable input do not
4023 requrie indicator Part_Of.
4024 (Collect_Visible_States): Constants without variable input are
4025 not part of the hidden state of a package.
4026 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
4027
4028 2015-05-22 Robert Dewar <dewar@adacore.com>
4029
4030 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
4031 Atomic_Sync_Required for an object renaming declaration.
4032 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
4033 Is_Independent to renaming object.
4034
4035 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4036
4037 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
4038 various illegalities in iterators over arrays and containers:
4039 a) New function Get_Cursor_Type, to verify that the cursor is
4040 not a limited type at the point of iteration.
4041 b) If the container is a constant, an element_iterator is illegal
4042 if the container type does not have a Constant_Indexing aspect.
4043 c) If the iterate function has an in-out controlling parameter,
4044 the container cannot be a constant object.
4045 d) Reject additional cases of iterators over a
4046 discriminant-dependent component of a mutable object.
4047
4048 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4049
4050 * einfo.adb (Contract): This attribute now applies to constants.
4051 (Set_Contract): This attribute now applies to constants.
4052 (Write_Field34_Name): Add output for constants.
4053 * einfo.ads Attribute Contract now applies to constants.
4054 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
4055 their Part_Of indicator verified.
4056 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
4057 constituent.
4058 (Analyze_Global_Item): A constant cannot act as an output.
4059 (Analyze_Initialization_Item): Constants are now a valid
4060 initialization item.
4061 (Analyze_Initializes_In_Decl_Part): Rename
4062 global variable States_And_Vars to States_And_Objs and update
4063 all its occurrences.
4064 (Analyze_Input_Item): Constants are now a
4065 valid initialization item. Remove SPARM RM references from error
4066 messages.
4067 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
4068 (Collect_Body_States): Collect both source constants
4069 and variables.
4070 (Collect_States_And_Objects): Collect both source constants and
4071 variables.
4072 (Collect_States_And_Variables): Rename
4073 to Collect_States_And_Objects and update all its occurrences.
4074 (Collect_Visible_States): Do not collect constants and variables
4075 used to map generic formals to actuals.
4076 (Find_Role): The role of a constant is that of an input. Separate the
4077 role of a variable from that of a constant.
4078 (Report_Unused_Constituents): Add specialized wording for constants.
4079 (Report_Unused_States): Add specialized wording for constants.
4080 * sem_util.adb (Add_Contract_Item): Add processing for constants.
4081 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
4082 (Find_Placement_In_State_Space): Update the comment on usage.
4083
4084 2015-05-21 Ed Schonberg <schonberg@adacore.com>
4085
4086 * sem_ch5.adb: minor reformatting.
4087
4088 2015-05-21 Robert Dewar <dewar@adacore.com>
4089
4090 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
4091
4092 2015-05-21 Robert Dewar <dewar@adacore.com>
4093
4094 * freeze.adb: Minor reformatting.
4095 * cstand.adb (Print_Standard): Fix bad printing of Duration
4096 low bound.
4097 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
4098 out of range args.
4099
4100 2015-05-21 Ed Schonberg <schonberg@adacore.com>
4101
4102 * sem_ch5.adb: add (useless) initial value.
4103 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4104 Check whether the procedure has parameters before processing
4105 formals in ASIS mode.
4106
4107 2015-05-21 Ed Schonberg <schonberg@adacore.com>
4108
4109 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
4110 aspect as well when indexing function is illegal.
4111 (Valid_Default_Iterator): Handle properly somme illegal cases
4112 to prevent compilation abandoned messages.
4113 (Check_Primitive_Function): Verify that type and indexing function
4114 are in the same scope.
4115 * freeze.adb (Freeze_Record): Extend patch on the presence of
4116 indexing aspects to aspect Default_Iterator.
4117
4118 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4119
4120 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
4121 from line_map * to line_map_ordinary *.
4122
4123 2015-05-12 Jason Merrill <jason@redhat.com>
4124
4125 * sigtramp-vxworks.c: Add space between string literal and macro
4126 name.
4127
4128 2015-05-12 Arnaud Charlet <charlet@adacore.com>
4129
4130 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
4131
4132 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4133
4134 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
4135 legality checks for array and container iterators:
4136 a) The domain of iteration cannot be a component that depends
4137 on discriminants of a mutable object. The check was recently
4138 added for element iterators.
4139 b) The cursor type cannot be a limited type at the point of the
4140 iteration, because the cursor will be assigned to in the body
4141 of the loop.
4142
4143 2015-05-12 Robert Dewar <dewar@adacore.com>
4144
4145 * freeze.adb (Freeze_Record_Type): Make sure that if we have
4146 aspect Iterator_Element, then we have either Constant_Indexing
4147 or Variable_Indexing.
4148
4149 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4150
4151 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
4152 and Reference_Control_Type to support element iterators over
4153 ordered multisets.
4154 * a-ciormu.ads, a-ciormu.adb: Ditto for
4155 indefinite_ordered_multisets.
4156
4157 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4158
4159 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
4160 the evaluation of the EWA expression. Code cleanup.
4161 (Process_Transient_Object): Code cleanup.
4162 * exp_util.adb (Is_Aliased): Controlled transient objects found
4163 within EWA nodes are not aliased.
4164 (Is_Finalizable_Transient): Iterators are not finalizable transients.
4165
4166 2015-05-12 Robert Dewar <dewar@adacore.com>
4167
4168 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
4169 Don't allow Atomic and Volatile_Full_Access for the same entity.
4170
4171 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4172
4173 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
4174 semantics and safety checks specified in AI12-0151.
4175
4176 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
4177
4178 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
4179 for subunit in generic units.
4180
4181 2015-05-12 Robert Dewar <dewar@adacore.com>
4182
4183 * sem_elab.adb (Check_A_Call): Avoid checking internal call
4184 from Valid_Scalars
4185
4186 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4187
4188 * sem_ch6.adb (Process_Formals): An untagged incomplete type
4189 is legal in the profile of a null procedure.
4190
4191 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4192
4193 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
4194 the checks on a derived formal whose parent type is a previous
4195 formal that is not a derived type.
4196
4197 2015-05-12 Robert Dewar <dewar@adacore.com>
4198
4199 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
4200 * einfo.adb (Has_Volatile_Full_Access): New flag.
4201 (Has_Volatile_Full_Access): New flag.
4202 * einfo.ads (Has_Volatile_Full_Access): New flag.
4203 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
4204 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
4205 Implement new pragma.
4206 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
4207
4208 2015-05-12 Robert Dewar <dewar@adacore.com>
4209
4210 * targparm.ads: Minor reformatting.
4211
4212 2015-05-12 Robert Dewar <dewar@adacore.com>
4213
4214 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
4215 * a-reatim.ads: Minor reformatting.
4216
4217 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4218
4219 * einfo.ads: Update the documentation of flags
4220 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
4221
4222 2015-05-12 Robert Dewar <dewar@adacore.com>
4223
4224 * impunit.adb: Add entry for a-dhfina.ads
4225 * a-dhfina.ads: New file.
4226
4227 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4228
4229 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
4230 type has convention Fortran, a multidimensional iterator varies
4231 the first dimension fastest.
4232
4233 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4234
4235 * einfo.adb: Node32 is now used as Encapsulating_State.
4236 Node37 is now used as Associated_Entity.
4237 (Associated_Entity): New routine.
4238 (Encapsulating_State): Update the assertion guard to include constants.
4239 (Set_Associated_Entity): New routine.
4240 (Set_Encapsulating_State): Update the assertion guard to
4241 include constants.
4242 (Write_Field10_Name): Remove the output for Encapsulating_State.
4243 (Write_Field32_Name): Add output for Encapsulating_State.
4244 (Write_Field37_Name): Add output for Associated_Entity.
4245 * einfo.ads New attribute Associated_Entity along with placement
4246 in entities. Attribute Encapsulating_State now uses Node32.
4247 (Associated_Entity): New routine along with pragma Inline.
4248 (Set_Associated_Entity): New routine along with pragma Inline.
4249 * inline.ads Code reformatting.
4250 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
4251 attribute 'Result when the context is a generic instantiation.
4252 (Analyze_Attribute_Old_Result): Pragmas Depends and
4253 Refined_Depends are a valid context for attribute 'Result.
4254 (Denote_Same_Function): Allow attribute 'Result to denote
4255 generic functions.
4256 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
4257 (Analyze_Declarations): Capture global references within the
4258 contracts of packages, subprograms and their respective bodies.
4259 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
4260 (Analyze_Completion_Contract): Removed.
4261 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
4262 creating the generic copy. Create a generic contract for the
4263 template. Analyze the aspects of the generic body. Analyze the
4264 contract of the generic body when it is a compilation unit and
4265 capture global references.
4266 (Analyze_Subprogram_Body_Contract): Code cleanup.
4267 (Analyze_Subprogram_Contract): Do not save global references here.
4268 (Save_Global_References_In_List): Removed.
4269 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
4270 (Analyze_Package_Body_Helper): Create a generic contract for
4271 the template.
4272 (Analyze_Package_Contract): Code cleanup.
4273 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
4274 (Analyze_Compilation_Unit): Capture global references in a
4275 generic subprogram declaration that acts as a compilation unit.
4276 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
4277 the implementation of generic contracts. Alphabetize various
4278 subprograms.
4279 (Analyze_Generic_Package_Declaration):
4280 Create a generic contract for the template.
4281 (Analyze_Generic_Subprogram_Declaration): Create a generic
4282 contract for the template.
4283 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
4284 subprogram.
4285 (Copy_Generic_Node): Link defining entities of the generic template
4286 with the corresponding defining entities of the generic copy. Update
4287 the processing of pragmas.
4288 (Instantiate_Contract): Removed.
4289 (Instantiate_Subprogram_Contract): New routine.
4290 (Requires_Delayed_Save): New routine.
4291 (Save_Global_References): Rename formal parameter N to Templ. Various
4292 cleanups.
4293 (Save_Global_References_In_Aspects): Moved from the spec.
4294 (Save_Global_References_In_Contract): New routine.
4295 (Save_References_In_Aggregate): New routine.
4296 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
4297 (Save_References_In_Descendants): New routine.
4298 (Save_References_In_Identifier): New routine.
4299 (Save_References_In_Operator): New routine.
4300 (Save_References_In_Pragma): New routine.
4301 * sem_ch12.ads (Save_Global_References): Rename formal
4302 parameter N to Templ. Update the comment on usage.
4303 (Save_Global_References_In_Aspects): Moved to the body.
4304 (Save_Global_References_In_Contract): New routine.
4305 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
4306 New routine.
4307 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
4308 New routine.
4309 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
4310 generic parameters.
4311 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
4312 (Analyze_Depends_Global): New routine.
4313 (Analyze_Depends_In_Decl_Part): Code cleanup.
4314 (Analyze_Global_In_Decl_Part): Code cleanup.
4315 (Analyze_Global_Item): Constants are now valid global items. Do
4316 not perform state-related checks in an instance. Change the way
4317 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
4318 Code cleanup.
4319 (Analyze_Initializes_In_Decl_Part): Code cleanup.
4320 (Analyze_Input_Output): The analysis of attribute 'Result in
4321 the context of pragmas Depends or Refined_Depends now reuses
4322 the existing attribute analysis machinery. Constants and
4323 generic parameters are now valid dependency items. Do not
4324 perform state-related checks in an instance. Change the way
4325 renamings are handled. (Analyze_Pragma): Add a "characteristics"
4326 section for pragmas Abstract_State, Contract_Cases, Depends,
4327 Extensions_Visible, Global, Initial_Condition, Initializes,
4328 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
4329 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
4330 (Analyze_Pre_Post_Condition): Do not create a generic
4331 template here.
4332 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
4333 (Analyze_Refined_Depends_Global_Post): New routine.
4334 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
4335 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
4336 (Analyze_Refined_Pragma): Removed.
4337 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
4338 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
4339 (Check_Dependency_Clause): Do not perform this check in an instance.
4340 (Check_Function_Return): Add support for generic functions.
4341 (Check_In_Out_States): Do not perform this check in an instance.
4342 (Check_Input_States): Do not perform this check in an instance.
4343 (Check_Mode_Restriction_In_Function): Add support for generic functions.
4344 (Check_Output_States): Do not perform this check in an instance.
4345 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
4346 parameter Subp_Id to Spec_Id and update comment on usage.
4347 (Check_Proof_In_States): Do not perform this check in an instance.
4348 (Check_Refined_Global_Item): Add support for constants.
4349 (Check_Refined_Global_List): Do not perform this check in an instance.
4350 (Collect_Global_Items): Reimplemented.
4351 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
4352 (Create_Generic_Template): Removed.
4353 (Find_Related_Package_Or_Body): Moved to spec.
4354 (Find_Role): Add support for generic parameters and constants.
4355 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
4356 (Match_Item): Add support for constants.
4357 (Preanalyze_Test_Case_Arg): Reimplemented.
4358 (Report_Extra_Clauses): Do not perform this check in an instance.
4359 (Report_Extra_Constituents): Do not perform this check in an instance.
4360 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
4361 the comment on usage.
4362 (Find_Related_Package_Or_Body): Moved from body.
4363 (Get_Argument): Moved from body.
4364 * sem_util.adb Add with and use clauses for Sem_Ch12.
4365 (Corresponding_Spec_Of): Add support for packages and package bodies.
4366 (Create_Generic_Contract): New routine.
4367 (Is_Contract_Annotation): Reimplemented.
4368 (Is_Generic_Declaration_Or_Body): New routine.
4369 (Is_Package_Contract_Annotation): New routine.
4370 (Is_Subprogram_Contract_Annotation): New routine.
4371 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
4372 (Create_Generic_Contract): New routine.
4373 (Is_Generic_Declaration_Or_Body): New routine.
4374 (Is_Package_Contract_Annotation): New routine.
4375 (Is_Subprogram_Contract_Annotation): New routine.
4376 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
4377 (Set_Is_Generic_Contract_Pragma): New routine.
4378 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
4379 with occurrences in nodes.
4380 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
4381 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
4382 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
4383
4384 2015-05-12 Robert Dewar <dewar@adacore.com>
4385
4386 * a-taster.ads: Minor comment fix: fix bad header, this is a
4387 pure RM unit.
4388
4389 2015-05-12 Robert Dewar <dewar@adacore.com>
4390
4391 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
4392
4393 2015-05-12 Robert Dewar <dewar@adacore.com>
4394
4395 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
4396 Alignment_Checks on non-strict alignment machine.
4397 * sem_ch13.adb (Validate_Address_Clauses): Don't give
4398 compile-time alignment warnings if run time Alignment_Check
4399 is suppressed.
4400
4401 2015-05-12 Thomas Quinot <quinot@adacore.com>
4402
4403 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
4404 Data_Rate): New literals B75, B110, B150, B300, B600.
4405
4406 2015-05-12 Doug Rupp <rupp@adacore.com>
4407
4408 * init.c (__gnat_init_float) [vxworks]: For e500v2,
4409 do nothing and leave the responsibility to install the handler
4410 and enable the exceptions to the BSP.
4411
4412 2015-05-12 Robert Dewar <dewar@adacore.com>
4413
4414 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
4415 * sem_disp.adb: Minor code reorganization (remove junk redundant
4416 null statement).
4417 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
4418 references to bounds of types coming from original type reference.
4419 * checks.ads: Minor reformatting.
4420 * checks.adb: Minor reformatting.
4421 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
4422 assertion, then make sure we do not drag in bignum stuff.
4423
4424 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4425
4426 * sem_ch9.adb (Collect_Interfaces): Initialize
4427 Direct_Primitive_Operations for a tagged synchronized type,
4428 so it can used in ASIS mode.
4429 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
4430 disabled, attach subprogram to list of Direct_Primitive_Operations
4431 of synchronized type itself, for ASIS use, because in this case
4432 Corresponding_Record_Type is not built.
4433 * einfo.ads: Indicate use of Direct_Primitive_Operations on
4434 synchronized type.
4435
4436 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
4437
4438 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
4439 ___XP suffixes.
4440
4441 2015-05-12 Robert Dewar <dewar@adacore.com>
4442
4443 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
4444
4445 2015-05-12 Robert Dewar <dewar@adacore.com>
4446
4447 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
4448
4449 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4450
4451 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
4452 tag to be retrieved for the generated call is the first entry
4453 in the dispatch table for the return type of the instantiated
4454 constructor.
4455
4456 2015-05-12 Bob Duff <duff@adacore.com>
4457
4458 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
4459 exp_util.ads: Update comments.
4460
4461 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4462
4463 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
4464 freeze nodes for these in ASIS mode, because they lead to
4465 elaoration order issues in gigi.
4466
4467 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4468
4469 * sem_ch6.adb (Analyze_Expression_Function): Code
4470 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
4471 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
4472 prepare a stand alone body for inlining in GNATprove mode
4473 when inside a generic. (Body_Has_Contract): Reimplemented.
4474 (Build_Subprogram_Declaration): New routine.
4475 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
4476 references within generic bodies by loading them.
4477 * sem_util.adb (Copy_Parameter_List): Code cleanup.
4478 (Copy_Subprogram_Spec): New routine.
4479 (Is_Contract_Annotation): New routine.
4480 * sem_util.ads (Copy_Subprogram_Spec): New routine.
4481 (Is_Contract_Annotation): New routine.
4482
4483 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4484
4485 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
4486 body of an expression function when the prefix of attribute
4487 'Access is the body.
4488
4489 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4490
4491 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
4492 created for a derived enumeration type is not a first subtype,
4493 even though it is defined through a full type declaration.
4494 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
4495 aspects for the anonymous base type constructed for a derived
4496 scalar type, because they will be set when the first subtype
4497 is frozen.
4498 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
4499 Default_Value and Default_Component_Value, that prevented the
4500 proper inheritance of these aspects.
4501
4502 2015-05-12 Gary Dismukes <dismukes@adacore.com>
4503
4504 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
4505
4506 2015-05-12 Robert Dewar <dewar@adacore.com>
4507
4508 * sem_ch3.adb: Minor reformatting.
4509
4510 2015-05-12 Vincent Celier <celier@adacore.com>
4511
4512 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
4513 -P, then check if gprbuild (gprclean) is available; if it is,
4514 use gprbuild (gprclean) instead of gnatmake (gnatclean).
4515
4516 2015-05-12 Robert Dewar <dewar@adacore.com>
4517
4518 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
4519 Exp_Unst.
4520 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
4521 Exp_Unst.
4522 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
4523 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
4524 for later call instead of calling Unnest_Subprogram directly
4525 (Initialize): New procedure (Unnest_Subprograms): New procedure
4526 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
4527 alpha order.
4528 (Initialize): New procedure.
4529 (Unnest_Subprograms): New procedure.
4530 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
4531 all processing to this routine which is now called late
4532 after instantiating bodies. Fully handles the case of generic
4533 instantiations now.
4534 * exp_unst.ads: Major rewrite, moving all processing to
4535 Unnest_Subprogram.
4536 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
4537 (Frontend): Add call to Unnest_Subprograms.
4538 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
4539 for Check_Nested_Access.
4540 * sem_util.adb (Build_Default_Subtype): Minor reformatting
4541 (Check_Nested_Access): Back to original VM-only form (we
4542 now do all the processing for Unnest_Subprogram at the time
4543 it is called.
4544 (Denotes_Same_Object): Minor reformatting
4545 (Note_Possible_Modification): Old calling sequence for
4546 Check_Nested_Access.
4547 * sem_util.ads (Check_Nested_Access): Back to original VM-only
4548 form (we now do all the processing for Unnest_Subprogram at the
4549 time it is called.
4550
4551 2015-05-12 Robert Dewar <dewar@adacore.com>
4552
4553 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
4554
4555 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4556
4557 * sem_ch3.adb (Analyze_Object_Declaration): New function
4558 Has_Delayed_Aspect, used to defer resolution of an aggregate
4559 expression when the object declaration carries aspects Address
4560 and/or Alignment.
4561 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
4562 to Freeze_Entity. In addition to the previous processing steps
4563 at the freeze point of an object, this procedure also handles
4564 aggregates in object declarations, when the declaration carries
4565 delayed aspects that require that the initialization of the
4566 object be attached to its freeze actions.
4567
4568 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4569
4570 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
4571 AI12-0147, null procedures and expression functions are allowed
4572 in protected bodies.
4573
4574 2015-05-12 Tristan Gingold <gingold@adacore.com>
4575
4576 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
4577
4578 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4579
4580 * sem_ch3.adb (Complete_Private_Subtype): Propagate
4581 Has_Delayed_Aspects flag from private to full view, to ensure
4582 that predicate functions are constructed.
4583
4584 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4585
4586 * sem_ch6.adb (Process_Formals): If a tagged formal is an
4587 incomplete class-wide type, the subprogram must have a delayed
4588 freeze even though the opertation is not a primitive of the
4589 type. THis ensures that the backend can recover the full view
4590 when elaborating the subprogram declaration.
4591
4592 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4593
4594 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
4595 done if an elsif part has been rewritten so that it is not part
4596 of an enclosing if_statement.
4597
4598 2015-05-12 Robert Dewar <dewar@adacore.com>
4599
4600 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
4601 Minor reformatting.
4602
4603 2015-05-12 Bob Duff <duff@adacore.com>
4604
4605 * exp_attr.adb (Size): Remove unnecessary check for types with
4606 unknown discriminants. That was causing the compiler to build
4607 a function call _size(T), where T is a type, not an object.
4608
4609 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4610
4611 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
4612 primitive operations of a type extension declared in the package
4613 body, to prevent duplicates in extended list.
4614
4615 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4616
4617 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
4618 an unconstrained synchronized type with discriminants, create a
4619 constrained default subtype for it, so that the enclosing record
4620 can be given the proper size.
4621 * sem_util.adb (Build_Default_Subtype): If the subtype is created
4622 for a record discriminant, do not analyze the declarztion at
4623 once because it is added to the freezing actions of the enclosing
4624 record type.
4625
4626 2015-05-12 Robert Dewar <dewar@adacore.com>
4627
4628 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
4629 Null statements.
4630 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
4631 * par-prag.adb (Prag): Implement Ignore_Pragma.
4632 * sem_prag.adb: Implement Ignore_Pragma.
4633 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
4634
4635 2015-05-12 Javier Miranda <miranda@adacore.com>
4636
4637 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
4638 entity with its corresponding real entity.
4639 (Decorate_Type): Unconditionally build the class-wide shadow entity of
4640 tagged types.
4641 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
4642 attribute.
4643 (Non_Limited_View): Moved from field 17 to field 19 be available
4644 in class-wide entities.
4645 * exp_attr.adb (Access_Cases): Code cleanup.
4646 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
4647 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
4648 * freeze.adb (Build_Renamed_Bdody): Ditto.
4649 * sem_aux.adb (Available_View): Ditto.
4650 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4651 (Try_One_Prefix_Interpretation): Ditto.
4652 * sem_ch5.adb (Analyze_Assignment): Ditto.
4653 * sem_ch6.adb (Detect_And_Exchange): Ditto.
4654 * sem_ch8.adb (Find_Expanded_Name): Ditto.
4655 * sem_disp.adb (Check_Controlling_Type): Ditto.
4656 * sem_res.adb (Resolve_Type_Conversion): Ditto.
4657 (Full_Designated_Type): Ditto.
4658 * sem_type.adb (Covers): Ditto.
4659 * sem_util.adb: Fix typo in comment.
4660
4661 2015-05-12 Robert Dewar <dewar@adacore.com>
4662
4663 * exp_unst.adb (Get_Real_Subp): New subprogram.
4664 (Unnest_Subprogram): Use Get_Real_Subp.
4665 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
4666 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
4667
4668 2015-05-12 Robert Dewar <dewar@adacore.com>
4669
4670 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
4671
4672 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4673
4674 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
4675 auxiliary to Try_Primitive_Operation to handle properly prefixed
4676 calls where the operation is not a primitive of the type, but
4677 is declared in the package body that is in the immediate scope
4678 of the type.
4679
4680 2015-05-12 Robert Dewar <dewar@adacore.com>
4681
4682 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
4683
4684 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4685
4686 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
4687 qualified name for an instance of a generic grand-child unit in
4688 the body its parent.
4689
4690 2015-05-12 Robert Dewar <dewar@adacore.com>
4691
4692 * exp_unst.adb (Upref_Name): New subprogram.
4693 (Unnest_Subprogram): Use Upref_Name.
4694 (Unnest_Subprogram): Use new Deref attribute.
4695 * exp_unst.ads: Doc updates.
4696
4697 2015-05-12 Thomas Quinot <quinot@adacore.com>
4698
4699 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
4700 can access files on filesystems mounted from servers that use large
4701 NFS file handles.
4702
4703 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
4704
4705 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
4706 method instead of global_decl for TYPE_DECLs.
4707
4708 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
4709
4710 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
4711 and gnat1.
4712
4713 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
4714
4715 * gnatvsn.ads (Library_Version): Bump to 6.
4716
4717 2015-04-09 Iain Sandoe <iain@codesourcery.com>
4718
4719 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
4720
4721 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
4722
4723 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
4724 a function returning an unconstrained type 'const' for the middle-end.
4725
4726 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
4727 exact condition to detect Reason => "..." pattern.
4728
4729 2015-03-31 Tom de Vries <tom@codesourcery.com>
4730
4731 PR ada/65490
4732 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
4733 bzero call is the same expression as the destination'.
4734
4735 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
4736
4737 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
4738
4739 2015-03-24 Gary Dismukes <dismukes@adacore.com>
4740
4741 * sem_ch3.adb: Minor typo fix (missing paren).
4742
4743 2015-03-24 Robert Dewar <dewar@adacore.com>
4744
4745 * sinfo.ads: Update comment.
4746
4747 2015-03-24 Robert Dewar <dewar@adacore.com>
4748
4749 * exp_attr.adb: Add entry for typ'Deref.
4750 * sem_attr.adb (Deref): New GNAT attribute.
4751 * sem_attr.ads: Add entry for new GNAT attribute Deref.
4752 * snames.ads-tmpl: Add entries for new attribute Deref.
4753
4754 2015-03-24 Ed Schonberg <schonberg@adacore.com>
4755
4756 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
4757 on generic type.
4758
4759 2015-03-24 Gary Dismukes <dismukes@adacore.com>
4760
4761 * inline.adb: Minor typo fix.
4762
4763 2015-03-24 Arnaud Charlet <charlet@adacore.com>
4764
4765 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4766 doc/gnat_ugn/gnat_utility_programs.rst
4767 doc/gnat_rm/implementation_defined_attributes.rst
4768 doc/gnat_rm/implementation_defined_pragmas.rst
4769 doc/gnat_rm/representation_clauses_and_pragmas.rst
4770 doc/gnat_rm/about_this_guide.rst
4771 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
4772 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
4773
4774 2015-03-23 Jakub Jelinek <jakub@redhat.com>
4775
4776 PR bootstrap/65522
4777 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
4778
4779 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
4780
4781 PR ada/65451
4782 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
4783 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
4784
4785 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
4786
4787 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
4788
4789 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
4790 of the expression ends up being composite.
4791
4792 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
4793
4794 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
4795 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
4796 parameter types to detect circularities in ASIS mode.
4797 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
4798
4799 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
4800
4801 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
4802 short-circuit the regular handling.
4803
4804 2015-03-13 Robert Dewar <dewar@adacore.com>
4805
4806 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
4807 references.
4808 (Actual_Ref): New function.
4809 (AREC_String): Minor reformatting.
4810 (Unnest_Subprogram): Use Actual_Ref.
4811 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
4812 before call to Instantiate_Bodies.
4813
4814 2015-03-13 Ed Schonberg <schonberg@adacore.com>
4815
4816 * freeze.adb (Freeze_Profile): If the return type of a function
4817 being frozen is an untagged limited view and the function is
4818 abstract, mark the type as frozen because there is no later
4819 point at which the profile of the subprogram will be elaborated.
4820
4821 2015-03-13 Robert Dewar <dewar@adacore.com>
4822
4823 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
4824 component to entities. Add new fields Field36-41 and Node36-41.
4825
4826 2015-03-13 Claire Dross <dross@adacore.com>
4827
4828 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
4829
4830 2015-03-13 Robert Dewar <dewar@adacore.com>
4831
4832 * exp_util.adb (Is_Volatile_Reference): Compile time known
4833 value is never considered to be a volatile reference.
4834
4835 2015-03-13 Robert Dewar <dewar@adacore.com>
4836
4837 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
4838 cannot be volatile" for internally generated object (such as
4839 FIRST and LAST constants).
4840
4841 2015-03-13 Ed Schonberg <schonberg@adacore.com>
4842
4843 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
4844 convention is specified for the formal parameter, verify that
4845 the actual has the same convention.
4846 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
4847 pragma to be set on a generic formal type.
4848 * sem_util.adb (Set_Convention): Ignore within an instance,
4849 as it has already been verified in the generic unit.
4850
4851 2015-03-13 Claire Dross <dross@adacore.com>
4852
4853 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
4854 subprograms with unconstrained record parameters containing
4855 Itype declarations.
4856 * sinfo.ads Document GNATprove assumption that type should match
4857 in the AST.
4858 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
4859 Do not check for Refined_Depends and Refined_Globals contracts
4860 as they are optional.
4861
4862 2015-03-13 Ed Schonberg <schonberg@adacore.com>
4863
4864 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
4865 capture dimension info if any, because the generated subtype
4866 declaration does not come from source and will not process dimensions.
4867 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
4868 Do not analyze expressions with an initialization procedure
4869 because aggregates will have been checked at the point of record
4870 declaration.
4871
4872 2015-03-13 Robert Dewar <dewar@adacore.com>
4873
4874 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
4875 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
4876 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
4877 * snames.ads-tmpl: Add entry for Name_Unimplemented.
4878
4879 2015-03-13 Gary Dismukes <dismukes@adacore.com>
4880
4881 * style.adb (Missing_Overriding): Apply the
4882 Comes_From_Source test to the Original_Node of the subprogram
4883 node, to handle the case of a null procedure declaration that
4884 has been rewritten as an empty procedure body.
4885
4886 2015-03-13 Robert Dewar <dewar@adacore.com>
4887
4888 * exp_util.ads: Minor fix to comment.
4889 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
4890 change.
4891
4892 2015-03-13 Robert Dewar <dewar@adacore.com>
4893
4894 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
4895 Is_Low/High_Bound params.
4896 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
4897 sequence to simplify generation of FIRST/LAST temps for bounds.
4898
4899 2015-03-12 Olivier Hainque <hainque@adacore.com>
4900
4901 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
4902 On targets where a function symbol designates a function descriptor,
4903 fetch the function code address from the descriptor.
4904 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
4905
4906 2015-03-04 Robert Dewar <dewar@adacore.com>
4907
4908 * sem_warn.adb: Minor reformatting.
4909 * init.c: Minor tweaks.
4910
4911 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
4912
4913 * a-coinho-shared.adb: Fix clear of already empty holder.
4914
4915 2015-03-04 Robert Dewar <dewar@adacore.com>
4916
4917 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
4918 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
4919 (Note_Uplevel_Reference): Ignore call inside generic.
4920 (Note_Uplevel_Reference): Fix check for no entity field.
4921 (Unnest_Subprogram): Ignore call inside generic.
4922 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
4923 (Visit_Node): Ignore calls to Imported subprograms.
4924 (Visit_Node): Fix problem in finding subprogram body in some cases.
4925 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
4926
4927 2015-03-04 Robert Dewar <dewar@adacore.com>
4928
4929 * einfo.adb (Is_ARECnF_Entity): Removed.
4930 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
4931 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
4932 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
4933 (Number_Entries): Minor reformatting.
4934 * einfo.ads (Is_ARECnF_Entity): Removed.
4935 * exp_unst.adb (Unnest_Subprogram): Remove setting of
4936 Is_ARECnF_Entity.
4937 (Add_Extra_Formal): Use normal Extra_Formal circuit.
4938 * sprint.adb (Write_Param_Specs): Properly handle case where
4939 there are no source formals, but we have at least one Extra_Formal
4940 present.
4941
4942 2015-03-04 Ed Schonberg <schonberg@adacore.com>
4943
4944 * sem_aggr.adb (Resolve_Record_Aggregate,
4945 Add_Discriminant_Values): If the value is a reference to the
4946 current instance of an enclosing type, use its base type to check
4947 against prefix of attribute reference, because the target type
4948 may be otherwise constrained.
4949
4950 2015-03-04 Robert Dewar <dewar@adacore.com>
4951
4952 * atree.h: Add entries for Flag287-Flag309.
4953 * einfo.adb: Add (unused) flags Flag287-Flag309.
4954
4955 2015-03-04 Ed Schonberg <schonberg@adacore.com>
4956
4957 * sem_util.adb (Collect_Interfaces, Collect): When gathering
4958 interfaces of ancestors, handle properly a subtype of a private
4959 extension.
4960
4961 2015-03-04 Robert Dewar <dewar@adacore.com>
4962
4963 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
4964 (Next_Formal): Don't return ARECnF formal.
4965 (Last_Formal): Don't consider ARECnF formal.
4966 (Next_Formal_With_Extras): Do consider ARECnF formal.
4967 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
4968 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
4969
4970 2015-03-04 Javier Miranda <miranda@adacore.com>
4971
4972 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
4973 object is a class-wide interface object and we generate the
4974 accessibility described in RM 6.5(8/3) then displace the pointer
4975 to the object to reference the base of the object (to get access
4976 to the TSD of the object).
4977
4978 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
4979
4980 * sem_prag.adb (Analyze_Abstract_State): Use routine
4981 Malformed_State_Error to issue general errors.
4982 (Analyze_Pragma): Diagnose a syntax error related to a state
4983 declaration with a simple option.
4984 (Malformed_State_Error): New routine.
4985
4986 2015-03-04 Robert Dewar <dewar@adacore.com>
4987
4988 * a-strsup.adb (Super_Slice): Deal with super flat case.
4989 * einfo.ads: Minor reformatting.
4990 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
4991 redundant code.
4992
4993 2015-03-04 Claire Dross <dross@adacore.com>
4994
4995 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4996 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
4997 containers.
4998
4999 2015-03-04 Ed Schonberg <schonberg@adacore.com>
5000
5001 * sem_warn.adb (Check_References): When checking for an unused
5002 in-out parameter of a class- wide type, use its type to determine
5003 whether it is private, in order to avoid a spurious warning when
5004 subprogram spec and body are in different units.
5005
5006 2015-03-04 Yannick Moy <moy@adacore.com>
5007
5008 * sem_attr.adb: Improve warning messages.
5009
5010 2015-03-04 Robert Dewar <dewar@adacore.com>
5011
5012 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
5013 generic subprograms.
5014 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
5015 (Note_Uplevel_Reference): Ignore uplevel references to non-types
5016 (Get_Level): Consider only subprograms, not blocks.
5017 (Visit_Node): Set proper condition for generating ARECnF entity.
5018 Ignore indirect calls. Ignore calls to subprograms
5019 outside our nest.
5020 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
5021 (Add_Form_To_Spec): Properly set Last_Entity field.
5022 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
5023 Handle case of no uplevel refs in outer subprogram
5024 Don't mark uplevel entities as aliased.
5025 Don't deal with calls with no ARECnF requirement.
5026
5027 2015-03-04 Robert Dewar <dewar@adacore.com>
5028
5029 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
5030 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
5031 operation in computing LZ.
5032 * sem_attr.adb: Minor typo fix
5033
5034 2015-03-04 Robert Dewar <dewar@adacore.com>
5035
5036 * exp_ch7.adb: Minor reformatting.
5037 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
5038 spec case.
5039 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
5040
5041 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
5042
5043 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
5044 references to formal parameters subject to pragma Unreferenced.
5045 (Suppress_Reference): New routine.
5046 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
5047 of attribute 'Old. Attributes 'Old and 'Result now share
5048 common processing.
5049 (Analyze_Old_Result_Attribute): New routine.
5050 (Check_Placement_In_Check): Removed.
5051 (Check_Placement_In_Contract_Cases): Removed.
5052 (Check_Placement_In_Test_Case): Removed.
5053 (Check_Use_In_Contract_Cases): Removed.
5054 (Check_Use_In_Test_Case): Removed.
5055 (In_Refined_Post): Removed.
5056 (Is_Within): Removed.
5057 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
5058 (Check_Low_Bound_Tested_For): New routine.
5059
5060 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
5061
5062 * exp_ch3.adb (Expand_N_Object_Declaration):
5063 Generate a runtime check to test the expression of pragma
5064 Default_Initial_Condition when the object is default initialized.
5065
5066 2015-03-02 Robert Dewar <dewar@adacore.com>
5067
5068 * scng.adb (Scan): Ignore illegal character in relaxed
5069 semantics mode.
5070
5071 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5072
5073 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
5074 on left operand, so it can be properly resolved with type of
5075 alternatives of right operand.
5076 * sem_res.adb (Resolve_Set_Membership): Handle properly an
5077 overloaded left-hand side when the alternatives on the right
5078 hand side are literals of some universal type. Use first
5079 non-overloaded alternative to find expected type.
5080
5081 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5082
5083 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
5084 type to retrieve designated type, because the purported access
5085 type may be a partial (private) view, when it is declared in
5086 the private part of a nested package, and finalization actions
5087 are generated when completing compilation of enclosing unit.
5088
5089 2015-03-02 Robert Dewar <dewar@adacore.com>
5090
5091 * back_end.adb (Call_Back_End): Remove previous patch,
5092 the back end now gets to see the result of -gnatd.1
5093 (Unnest_Subprogram_Mode) processing.
5094 * elists.ads, elists.adb (List_Length): New function.
5095 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
5096 * sem_util.adb (Check_Nested_Access): Handle formals in
5097 Unnest_Subprogram_Mode.
5098 (Adjust_Named_Associations): Minor reformatting.
5099 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
5100 for parameters.
5101
5102 2015-03-02 Robert Dewar <dewar@adacore.com>
5103
5104 * atree.ads, atree.adb (Uint24): New function
5105 (Set_Uint24): New procedure.
5106 * atree.h (Uint24): New macro for field access.
5107 * back_end.adb (Call_Back_End): For now, don't call back end
5108 if unnesting subprogs.
5109 * einfo.adb (Activation_Record_Component): New field
5110 (Subps_Index): New field.
5111 * einfo.ads (Activation_Record_Component): New field
5112 (Subps_Index): New field Minor reordering of comments into alpha order.
5113 * exp_unst.ads, exp_unst.adb: Continued development.
5114
5115 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5116
5117 * exp_disp.ads: Minor reformatting.
5118
5119 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5120
5121 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
5122 ancestor to list of use clauses active in descendant unit if we
5123 are within the private part of an intervening parent, to prevent
5124 circularities in use clause list.
5125
5126 2015-03-02 Javier Miranda <miranda@adacore.com>
5127
5128 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
5129 invariants to the corresponding record type.
5130 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
5131 which sets the value of the DTC_Entity associated with a given
5132 primitive of a tagged type and propagates the value to the
5133 wrapped subprogram.
5134 (Set_DTC_Entity_Value): Propagate the DTC
5135 value to the wrapped entity.
5136 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
5137 associated with invariants of progenitors.
5138 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
5139 of parents and progenitors.
5140 (Process_Full_View): Check hidden inheritance of class-wide type
5141 invariants.
5142 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
5143 the invariant procedure for interface types; build the invariant
5144 procedure for tagged types inheriting invariants from their
5145 progenitors.
5146 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
5147 types but do not build their invariant procedure since their
5148 invariants will be propagated to the invariant procedure of
5149 types covering the interface.
5150 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
5151 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
5152 by calls to Set_DT_Position_Value.
5153
5154 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5155
5156 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
5157 code in Denote_Same_Function. Do not analyze attribute 'Result
5158 when it is inside procedure _Postconditions. Remove a misplaced
5159 warning diagnostic. Code cleanup.
5160 (Denote_Same_Function): New routine.
5161 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
5162 cleanup. Warn on pre/postconditions on an inlined subprogram.
5163 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
5164 an inlined subprogram.
5165 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
5166 pre/post condition on an inlined subprogram.
5167 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
5168 pre/postconditions on an inlined subprogram.
5169 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
5170
5171 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5172
5173 * sem_prag.adb (Ensure_Aggregate_Form):
5174 Ensure that the name denoted by the Chars of a pragma argument
5175 association has the proper Sloc when converted into an aggregate.
5176
5177 2015-03-02 Bob Duff <duff@adacore.com>
5178
5179 * sem_ch6.adb (Check_Private_Overriding): Capture
5180 Incomplete_Or_Partial_View in a constant. This is cleaner and
5181 more efficient.
5182
5183 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5184
5185 * einfo.ads, exp_unst.ads: Minor reformatting.
5186
5187 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5188
5189 * a-strsea.adb (Find_Token): Ensure that the range of iteration
5190 does not perform any improper character access. This prevents
5191 erroneous access in the unusual case of an empty string target
5192 and a From parameter less than Source'First.
5193
5194 2015-03-02 Robert Dewar <dewar@adacore.com>
5195
5196 * elists.adb (List_Length): Fix incorrect result.
5197
5198 2015-03-02 Bob Duff <duff@adacore.com>
5199
5200 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
5201 checks here. It used to check that the function is merely
5202 overriding SOMEthing. Now it checks that the function is
5203 overriding a corresponding public operation. This is a correction
5204 to the implementation of the rule in RM-3.9.3(10).
5205
5206 2015-03-02 Robert Dewar <dewar@adacore.com>
5207
5208 * debug.adb: Document new debug flag -gnatd.1.
5209 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
5210 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
5211 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
5212 * elists.ads elists.adb (List_Length): New function.
5213 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
5214 when appropriate (Process_Preconditions): Minor code
5215 reorganization and reformatting
5216 * exp_unst.ads, exp_unst.adb: New files.
5217 * gnat1drv.adb (Adjust_Global_Switches): Set
5218 Unnest_Subprogram_Mode if -gnatd.1
5219 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
5220 string argument.
5221 * opt.ads (Unnest_Subprogram_Mode): New flag.
5222 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
5223 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
5224 Has_Nested_Subprogram flag.
5225 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
5226 Check_Nested_Access.
5227 (Find_Selected_Component): Minor comment addition.
5228 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
5229 (Note_Possible_Modification): New calling sequence for
5230 Check_Nested_Access.
5231 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
5232 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
5233
5234 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
5235
5236 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
5237 types, preserve the original type and create copies just like the C
5238 front-end does. For artificial ones, do not define a name for
5239 the original type.
5240 (create_type_decl): When gnat_pushdecl made the input type the
5241 original type for the new declaration, do not define a stub
5242 declaration for it.
5243 * gcc-interface/utils2.c (build_binary_op): Accept two different
5244 pointer types when they point to the same type.
5245
5246 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5247
5248 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
5249 an unanalyzed node.
5250 * sem_util.adb (Kill_Current_Values): Do not invalidate and
5251 de-null a constant.
5252
5253 2015-03-02 Robert Dewar <dewar@adacore.com>
5254
5255 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
5256 reformatting.
5257
5258 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5259
5260 * sem_ch8.adb: extend use of Available_Subtype.
5261
5262 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5263
5264 * sem_prag.adb (Duplication_Error): Remove the special handling
5265 of 'Class or _Class in the context of pre/postconditions.
5266 (Process_Class_Wide_Condition): Remove the special handling of
5267 'Class or _Class in the context of pre/postconditions.
5268 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
5269 and Post_Class no longer need to be converted to _Pre and _Post.
5270 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
5271 on usage.
5272
5273 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5274
5275 * exp_ch6.adb (Process_Preconditions): Modify the
5276 mechanism that find the first source declaration to correct exit
5277 the loop once it has been found.
5278
5279 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5280
5281 * a-strsea.adb: Minor typo fix.
5282
5283 2015-03-02 Bob Duff <duff@adacore.com>
5284
5285 * einfo.ads: Minor comment fixes.
5286
5287 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5288
5289 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
5290
5291 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5292
5293 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
5294 is defined for the array type, use it instead of a Default_Value
5295 specified for the component type itself.
5296
5297 2015-03-02 Thomas Quinot <quinot@adacore.com>
5298
5299 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
5300 expanding a 'Input attribute reference for a class-wide type,
5301 do not generate a separate object declaration for the controlling
5302 tag dummy object; instead, generate the expression inline in the
5303 dispatching call. Otherwise, the declaration (which involves a
5304 call to String'Input, returning a dynamically sized value on the
5305 secondary stack) will be expanded outside of proper secondary
5306 stack mark/release operations, and will thus cause a secondary
5307 stack leak.
5308
5309 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5310
5311 * checks.adb (Add_Validity_Check): Change the names of all
5312 formal parameters to better illustrate their purpose. Update
5313 the subprogram documentation. Update all occurrences of the
5314 formal parameters. Generate a pre/postcondition pragma by
5315 calling Build_Pre_Post_Condition.
5316 (Build_PPC_Pragma): Removed.
5317 (Build_Pre_Post_Condition): New routine.
5318 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
5319 is now used as Postconditions_Proc. Flag240 is now renamed to
5320 Has_Expanded_Contract. (First_Formal): The routine can now
5321 operate on generic subprograms.
5322 (First_Formal_With_Extras): The routine can now operate on generic
5323 subprograms.
5324 (Has_Expanded_Contract): New routine.
5325 (Has_Postconditions): Removed.
5326 (Postcondition_Proc): Removed.
5327 (Postconditions_Proc): New routine.
5328 (Set_Has_Expanded_Contract): New routine.
5329 (Set_Has_Postconditions): Removed.
5330 (Set_Postcondition_Proc): Removed.
5331 (Set_Postconditions_Proc): New routine.
5332 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
5333 the output of Has_Expanded_Contract.
5334 (Write_Field8_Name): Remove the output of Postcondition_Proc.
5335 (Write_Field14_Name): Add the output of Postconditions_Proc.
5336 * einfo.ads New attributes Has_Expanded_Contract and
5337 Postconditions_Proc along with occurrences in entities.
5338 Remove attributes Has_Postconditions and Postcondition_Proc
5339 along with occurrences in entities.
5340 (Has_Expanded_Contract): New routine along with pragma Inline.
5341 (Has_Postconditions): Removed along with pragma Inline.
5342 (Postcondition_Proc): Removed along with pragma Inline.
5343 (Postconditions_Proc): New routine along with pragma Inline.
5344 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
5345 (Set_Has_Postconditions): Removed along with pragma Inline.
5346 (Set_Postcondition_Proc): Removed along with pragma Inline.
5347 (Set_Postconditions_Proc): New routine along with pragma Inline.
5348 * exp_ch6.adb (Add_Return): Code cleanup. Update the
5349 generation of the call to the _Postconditions routine of
5350 the procedure. (Expand_Non_Function_Return): Reformat the
5351 comment on usage. Code cleanup. Update the generation of
5352 the call to the _Postconditions routine of the procedure or
5353 entry [family].
5354 (Expand_Simple_Function_Return): Update the
5355 generation of the _Postconditions routine of the function.
5356 (Expand_Subprogram_Contract): Reimplemented.
5357 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
5358 profile along the comment on usage.
5359 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
5360 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
5361 wrapper when the entry [family] has a contract with
5362 pre/postconditions.
5363 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
5364 (Expand_Contract_Cases): This routine and its subsidiaries now
5365 analyze all generated code.
5366 (Expand_Old_In_Consequence): Removed.
5367 * sem_attr.adb Add with and use clause for Sem_Prag.
5368 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
5369 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
5370 "Ensures".
5371 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
5372 a generic subprogram.
5373 (Analyze_Object_Declaration): Do not create a contract node.
5374 (Derive_Subprogram): Do not create a contract node.
5375 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
5376 not create a contract node.
5377 (Analyze_Completion_Contract): New routine.
5378 (Analyze_Function_Return): Alphabetize.
5379 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
5380 contract node. Do not copy pre/postconditions to the original
5381 generic template.
5382 (Analyze_Null_Procedure): Do not create a contract node.
5383 (Analyze_Subprogram_Body_Contract): Reimplemented.
5384 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
5385 as having postconditions. Do not create a contract node. Analyze
5386 the subprogram body contract of a body that acts as a compilation
5387 unit. Expand the subprogram contract after the declarations have
5388 been analyzed.
5389 (Analyze_Subprogram_Contract): Reimplemented.
5390 (Analyze_Subprogram_Specification): Do not create a contract node.
5391 (List_Inherited_Pre_Post_Aspects): Code cleanup.
5392 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
5393 comment on usage.
5394 (Analyze_Subprogram_Contract): Update the
5395 parameter profile and the comment on usage.
5396 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
5397 contract node.
5398 (Analyze_Package_Declaration): Do not create a
5399 contract node.
5400 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
5401 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
5402 contract node.
5403 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
5404 contract node.
5405 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
5406 their proper section and alphabetize them. Analyze the contract of
5407 a [generic] subprogram after all Pragmas_After have been analyzed.
5408 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
5409 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
5410 create a contract node.
5411 (Analyze_Generic_Subprogram_Declaration):
5412 Alphabetize local variables. Do not create a contract
5413 node. Do not generate aspects out of pragmas for ASIS.
5414 (Analyze_Subprogram_Instantiation): Instantiate
5415 the contract of the subprogram. Do not create a
5416 contract node. (Instantiate_Contract): New routine.
5417 (Instantiate_Subprogram_Body): Alphabetize local variables.
5418 (Save_Global_References_In_Aspects): New routine.
5419 (Save_References): Do not save the global references found within
5420 the aspects of a generic subprogram.
5421 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
5422 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
5423 Original_Node for establishing linkages.
5424 (Insert_Pragma): Insertion in a subprogram body takes precedence over
5425 the case where the subprogram body is also a compilation unit.
5426 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
5427 Get_Argument to obtain the proper expression. Install the generic
5428 formals when the related context is a generic subprogram.
5429 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
5430 the proper expression. Use Corresponding_Spec_Of to obtain
5431 the spec. Install the generic formal when the related context
5432 is a generic subprogram.
5433 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
5434 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
5435 generic formal when the related context is a generic subprogram.
5436 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
5437 to obtain the proper expression. Remove the call to
5438 Check_SPARK_Aspect_For_ASIS as the analysis is now done
5439 automatically.
5440 (Analyze_Pragma): Update all occurrences
5441 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
5442 Extensions_Visible, Global, Postcondition, Precondition and
5443 Test_Case now carry generic templates when the related context
5444 is a generic subprogram. The same pragmas are no longer
5445 forcefully fully analyzed when the context is a subprogram
5446 that acts as a compilation unit. Pragmas Abstract_State,
5447 Initial_Condition, Initializes and Refined_State have been clean
5448 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
5449 and Precondition now use the same routine for analysis. Pragma
5450 Refined_Post does not need to check the use of 'Result or
5451 the lack of a post-state in its expression. Reimplement the
5452 analysis of pragma Test_Case.
5453 (Analyze_Pre_Post_Condition): New routine.
5454 (Analyze_Pre_Post_Condition_In_Decl_Part):
5455 Reimplemented.
5456 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
5457 proper expression.
5458 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
5459 the proper expression.
5460 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
5461 (Check_Pre_Post): Removed.
5462 (Check_Precondition_Postcondition): Removed.
5463 (Check_SPARK_Aspect_For_ASIS): Removed.
5464 (Check_Test_Case): Removed.
5465 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
5466 to obtain the proper expression. Use Corresponding_Spec_Of to
5467 find the proper spec.
5468 (Create_Generic_Template): New routine.
5469 (Duplication_Error): New routine.
5470 (Expression_Function_Error): New routine.
5471 (Find_Related_Subprogram_Or_Body): Moved to the spec
5472 of Sem_Prag. Emit precise error messages. Account for cases of
5473 rewritten expression functions, generic instantiations, handled
5474 sequence of statements and pragmas from aspects.
5475 (Get_Argument): New routine.
5476 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
5477 (Preanalyze_CTC_Args): Removed.
5478 (Process_Class_Wide_Condition): New routine.
5479 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
5480 the parameter profile along with the comment on usage.
5481 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
5482 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
5483 (Test_Case_Arg): New routine.
5484 * sem_util.adb Add with and use clauses for Sem_Ch6.
5485 (Add_Contract_Item): This routine now creates a contract
5486 node the first time an item is added. Remove the duplicate
5487 aspect/pragma checks.
5488 (Check_Result_And_Post_State): Reimplemented.
5489 (Corresponding_Spec_Of): New routine.
5490 (Get_Ensures_From_CTC_Pragma): Removed.
5491 (Get_Requires_From_CTC_Pragma): Removed.
5492 (Has_Significant_Contract): New routine.
5493 (Inherit_Subprogram_Contract): Inherit only if the source
5494 has a contract.
5495 (Install_Generic_Formals): New routine.
5496 (Original_Aspect_Name): Removed.
5497 (Original_Aspect_Pragma_Name): New routine.
5498 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
5499 (Corresponding_Spec_Of): New routine.
5500 (Get_Ensures_From_CTC_Pragma): Removed.
5501 (Get_Requires_From_CTC_Pragma): Removed.
5502 (Has_Significant_Contract): New routine.
5503 (Install_Generic_Formals): New routine.
5504 (Original_Aspect_Name): Removed.
5505 (Original_Aspect_Pragma_Name): New routine.
5506 * sem_warn.adb Add with and use clauses for Sem_Prag.
5507 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
5508
5509 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5510
5511 * sem_ch8.adb (Available_Subtype): Optimization in
5512 Find_Selected_Component: when safe, use existing subtype of
5513 array component, possibly discriminant-dependent, rather than
5514 creating new subtype declaration for it. In this fashion different
5515 occurrences of the component have the same subtype, rather than
5516 just equivalent ones. Simplifies value tracing in GNATProve.
5517
5518 2015-03-01 Arnaud Charlet <charlet@adacore.com>
5519
5520 PR ada/65259
5521
5522 * doc/gnat_ugn/gnat_project_manager.rst,
5523 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
5524 image, too troublesome with texi format.
5525 * gnat_ugn.texi: Regenerate.
5526
5527 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5528
5529 PR libgomp/64625
5530 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
5531 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
5532 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5533
5534 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
5535
5536 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
5537 arguments parameter.
5538 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
5539
5540 2015-02-22 Arnaud Charlet <charlet@adacore.com>
5541
5542 * doc/Makefile: postprocess texinfo files to update @dircategory
5543 and update texi files under gcc/ada.
5544 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
5545
5546 2015-02-22 Arnaud Charlet <charlet@adacore.com>
5547
5548 * doc/gnat_ugn/project-manager-figure.png,
5549 doc/gnat_ugn/rtlibrary-structure.png: New.
5550
5551 2015-02-22 Tom de Vries <tom@codesourcery.com>
5552
5553 PR ada/65100
5554 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
5555 @item, and fix warning '@itemize has text but no @item'.
5556
5557 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5558
5559 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
5560 legally applies to an abstract subprogram declaration.
5561 * freeze.adb: Minor comment addition.
5562
5563 2015-02-20 Robert Dewar <dewar@adacore.com>
5564
5565 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
5566 * erroutc.adb (Set_Msg_Str): Replace _xxx.
5567 (Pre/Post/Type_Invariant) by xxx'Class.
5568 * erroutc.ads (Set_Msg_Str): Replace _xxx.
5569 (Pre/Post/Type_Invariant) by xxx'Class.
5570 * sem_prag.adb (Fix_Error): Remove special casing of
5571 Name_uType_Invariant.
5572 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
5573 Name_uPre and Name_uPost in aspect case (done in Errout now).
5574
5575 2015-02-20 Robert Dewar <dewar@adacore.com>
5576
5577 * g-alveop.adb: Minor style fixes.
5578
5579 2015-02-20 Robert Dewar <dewar@adacore.com>
5580
5581 * freeze.adb (Warn_Overlay): Guard against blow up with address
5582 clause.
5583
5584 2015-02-20 Bob Duff <duff@adacore.com>
5585
5586 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
5587 for the compiler to guess whether the call is internal or external --
5588 it is always external.
5589 (Expand_Access_To_Protected_Op): For P'Access, where P
5590 is a protected subprogram, always create a pointer to the
5591 External_Subprogram.
5592
5593 2015-02-20 Robert Dewar <dewar@adacore.com>
5594
5595 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
5596
5597 2015-02-20 Robert Dewar <dewar@adacore.com>
5598
5599 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
5600 predicate for non-static subtype.
5601 (Build_Predicate_Functions): Do not assume subtype associated with a
5602 static predicate must be static.
5603
5604 2015-02-20 Robert Dewar <dewar@adacore.com>
5605
5606 * errout.adb (Set_Msg_Node): Better handling of internal names
5607 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
5608 * errout.ads: Document additional case of message deletion.
5609 * namet.adb (Is_Internal_Name): Refined to consider wide
5610 strings in brackets notation and character literals not to be
5611 internal names.
5612 * sem_ch8.adb (Find_Selected_Component): Give additional error
5613 when selector name is a subprogram whose first parameter has
5614 the same type as the prefix, but that type is untagged.
5615
5616 2015-02-20 Robert Dewar <dewar@adacore.com>
5617
5618 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
5619
5620 2015-02-20 Tristan Gingold <gingold@adacore.com>
5621
5622 * opt.ads (GNAT_Mode_Config): New variable.
5623 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
5624 to set Assertions_Enabled.
5625 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
5626 for -gnatg.
5627
5628 2015-02-20 Robert Dewar <dewar@adacore.com>
5629
5630 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
5631 comment regarding the handling of unterminated fixed-point
5632 constants.
5633 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
5634 corresponding to those previously added for
5635 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
5636
5637 2015-02-20 Olivier Hainque <hainque@adacore.com>
5638
5639 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
5640
5641 2015-02-20 Robert Dewar <dewar@adacore.com>
5642
5643 * sem_prag.adb: Minor comment clarification.
5644
5645 2015-02-20 Olivier Hainque <hainque@adacore.com>
5646
5647 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
5648 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
5649 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
5650 (vec_ctf): Now renamings as well.
5651
5652 2015-02-20 Robert Dewar <dewar@adacore.com>
5653
5654 * switch-c.adb, bindgen.adb: Minor reformatting.
5655
5656 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5657
5658 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
5659 Invariant'class is allowed on an abstract type.
5660
5661 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5662
5663 * sem_ch3.adb (Access_Definition): If the access definition is
5664 for a protected component and defines an access to protected
5665 subprogram, do not create an itype reference for it because a
5666 full type declaration will be built in order to generate the
5667 proper equivalent type.
5668 (Analyze_Subtype_Declaration): Add information of incomplete
5669 subtypes, for Ada 2012 extended uses of incomplete types.
5670
5671 2015-02-20 Gary Dismukes <dismukes@adacore.com>
5672
5673 * sem_res.adb: Minor reformatting.
5674
5675 2015-02-20 Vincent Celier <celier@adacore.com>
5676
5677 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
5678 path name for several switches --RTS, use the normalized path
5679 names.
5680
5681 2015-02-20 Vincent Celier <celier@adacore.com>
5682
5683 * bindgen.adb: Minor reformatting and code reorganization.
5684
5685 2015-02-20 Jose Ruiz <ruiz@adacore.com>
5686
5687 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
5688 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
5689 defined by Ada 2012.
5690
5691 2015-02-20 Arnaud Charlet <charlet@adacore.com>
5692
5693 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
5694 obsolete references to RTX, nucleus, VMS.
5695
5696 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5697
5698 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
5699 aspect, use name that mentions Class explicitly, rather than
5700 compiler-internal name.
5701
5702 2015-02-20 Robert Dewar <dewar@adacore.com>
5703
5704 * debug.adb: Add documentation for -gnatd.2 (allow statements
5705 in decl sequences).
5706 * par-ch3.adb (P_Identifier_Declarations): Handle
5707 statement appearing where declaration expected more cleanly.
5708 (Statement_When_Declaration_Expected): Implement debug flag
5709 -gnatd.2.
5710
5711 2015-02-20 Jose Ruiz <ruiz@adacore.com>
5712
5713 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
5714 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
5715 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
5716 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
5717 defined by Ada 2005.
5718 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
5719 This is the correct name for the dispatching policy (FIFO was
5720 missing).
5721
5722 2015-02-20 Javier Miranda <miranda@adacore.com>
5723
5724 * sem_res.adb (Resolve_Type_Conversion): If the type of the
5725 operand is the limited-view of a class-wide type then recover
5726 the class-wide type of the non-limited view.
5727
5728 2015-02-20 Arnaud Charlet <charlet@adacore.com>
5729
5730 * gcc-interface/Makefile.in: Remove references to nucleus.
5731 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
5732 extern_flag to true for Inline_Always subprograms with
5733 Intrinsic convention.
5734
5735 2015-02-20 Yannick Moy <moy@adacore.com>
5736
5737 * sem_prag.ads: Minor typo in comment.
5738
5739 2015-02-20 Pascal Obry <obry@adacore.com>
5740
5741 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
5742
5743 2015-02-20 Vincent Celier <celier@adacore.com>
5744
5745 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
5746 if it exists.
5747
5748 2015-02-20 Robert Dewar <dewar@adacore.com>
5749
5750 * sem_eval.ads: Minor reformatting.
5751
5752 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
5753
5754 * freeze.adb (Size_Known): Do not set the packed size for
5755 independent type or component.
5756 (Freeze_Array_Type): Check for Independent[_Components] with packing
5757 or explicit component size clause.
5758 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
5759 of independence pragmas only for non-GCC back-ends.
5760 * sem_ch13.adb (Initialize): Likewise for the initialization.
5761 * sem_prag.adb (Record_Independence_Check): New procedure to record an
5762 independence check in the table.
5763 (Analyze_Pragma): Use it throughout instead of doing it manually.
5764 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
5765 independent type or component.
5766
5767 2015-02-20 Thomas Quinot <quinot@adacore.com>
5768
5769 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
5770 struct direct and readdir. This is required for NFS filesystems
5771 mounted from servers that use 64-bit cookies.
5772
5773 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5774
5775 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
5776 Build_Subprogram_Renaming, to create renaming of subprogram
5777 instance in the the declaration of the wrapper package rather
5778 than in its body, so that it is available for analysis of aspects
5779 propagated from generic to instantiation.
5780 (Check_Mismatch): An actual for a formal package that is an
5781 incomplete type matches a formal type that is incomplete.
5782 (Instantiate_Package_Body): Move code that builds subprogram
5783 renaming to Analyze_Subprogram_Instantiation.
5784 (Instantiate_Type): The generated subtype is a limited view if
5785 the actual is a limited view.
5786 (Load_Parent_Of_Generic): Retrieve instance declaration from
5787 its new position within wrapper package.
5788
5789 2015-02-20 Arnaud Charlet <charlet@adacore.com>
5790
5791 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
5792
5793 2015-02-20 Robert Dewar <dewar@adacore.com>
5794
5795 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
5796 issue of negative arguments.
5797
5798 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
5799
5800 * gnat1drv.adb: Minor consistency fix.
5801
5802 2015-02-20 Pascal Obry <obry@adacore.com>
5803
5804 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
5805 paths.
5806
5807 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
5808
5809 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
5810 renamings.
5811 * exp_ch6.adb (Expand_Call): Use back-end inlining
5812 instead of expansion for simple subprogram renamings.
5813
5814 2015-02-20 Robert Dewar <dewar@adacore.com>
5815
5816 * exp_util.adb: Minor reformatting.
5817
5818 2015-02-20 Vincent Celier <celier@adacore.com>
5819
5820 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
5821 is specified several times with different values that indicates
5822 the same runtime directory.
5823
5824 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5825
5826 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
5827 handle properly illegal uses of attributes on prefixes on an
5828 incomplete type, both when the type of the prefix is locally
5829 incomplete, and when it is a limited view of a type whose
5830 non-limited view is not available.
5831 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
5832 'Address and others.
5833
5834 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
5835
5836 * exp_ch6.adb: Fix minor typo in comment.
5837
5838 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
5839
5840 * sinfo.ads: Add comment.
5841
5842 2015-02-20 Olivier Hainque <hainque@adacore.com>
5843
5844 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
5845 flags controlling the actual FE inlining out of pragma Inline
5846 and pragma Inline_Always.
5847 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
5848 on -fno-inline, which disables all inlining in compilers with
5849 an Ada back-end and without back-end inlining support.
5850 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
5851 flag to True on -fno-inline and leave Inline_Always alone for
5852 gcc back-ends.
5853 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
5854 names of the Opt flags it sets.
5855 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
5856 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
5857 * sem_prag.adb (Make_Inline): Remove early return conditioned
5858 on Opt.Suppress_All_Inlining.
5859 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
5860 disable the calls to Build_Body_To_Inline otherwise triggered
5861 by pragma Inline or Inline_Always. This will prevent actual
5862 front-end inlining of the subprogram on calls.
5863
5864 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
5865
5866 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
5867 Abort_Undefer_Direct function.
5868 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
5869 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
5870 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
5871 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
5872 Add_Inlined_Body.
5873 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
5874 Remove call to Register_Backend_Call and move code resetting
5875 Needs_Debug_Info on inlined subprograms to...
5876 * inline.ads (Add_Inlined_Body): Add N parameter.
5877 (Register_Backend_Call): Delete.
5878 * inline.adb (Add_Inlined_Body): ...here and simplify.
5879 Register the call with Backend_Calls directly.
5880 (Register_Backend_Call): Delete.
5881 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
5882
5883 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
5884
5885 * s-stalib.ads: Fix typo.
5886
5887 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5888
5889 * exp_ch3.adb (Default_Initialize_Object): If the object has a
5890 delayed freeze, the actions associated with default initialization
5891 must be part of the freeze actions, rather that being inserted
5892 directly after the object declaration.
5893
5894 2015-02-20 Robert Dewar <dewar@adacore.com>
5895
5896 * lib-load.adb: Minor comment update.
5897
5898 2015-02-20 Vincent Celier <celier@adacore.com>
5899
5900 * prj-proc.adb (Process_Case_Construction): When there are
5901 incomplete withed projects and the case variable is unknown,
5902 skip the case construction.
5903
5904 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5905
5906 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
5907 when an actual is a view conversion, either because the call is
5908 to an inherited operation, or because the actual is an explicit
5909 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
5910
5911 2015-02-20 Robert Dewar <dewar@adacore.com>
5912
5913 * einfo.ads: Minor comment updates Fix missing pragma Inline
5914 for Set_Partial_View_Has_Unknown_Discr.
5915 * einfo.adb (Write_Entity_Flags): Add missing entry for
5916 Partial_View_Has_Unknown_Discr.
5917 * sem_ch3.adb: Minor reformatting.
5918
5919 2015-02-20 Vincent Celier <celier@adacore.com>
5920
5921 * opt.ads: Minor cleanup: remove mention of gprmake.
5922 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
5923 * s-tataat.adb: Do not call System.Tasking.Self but directly
5924 System.Task_Primitives.Operations.Self.
5925
5926 2015-02-20 Arnaud Charlet <charlet@adacore.com>
5927
5928 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
5929 sphinx in the doc directory.
5930 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
5931
5932 2015-02-20 Robert Dewar <dewar@adacore.com>
5933
5934 * sem_res.adb: Minor reformatting.
5935 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
5936 building spec.
5937 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
5938 aspects from circuitry setting delay required to false if the
5939 argument is an integer literal.
5940
5941 2015-02-20 Ed Schonberg <schonberg@adacore.com>
5942
5943 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
5944 on type entities, to enforce AI12-0133: default initialization
5945 of types whose partial view has unknown discriminants does not
5946 get an invariant check, because clients of the unit can never
5947 declare objects of such types.
5948 * sem_ch3.adb (Find_Type_Name); Set new flag
5949 Partial_View_Has_Unknown_Discr when needed.
5950 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
5951 generation of invariant call on default-initialized object.
5952
5953 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
5954
5955 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
5956 if the parameter either is passed by reference or if the alignment
5957 would be lowered.
5958
5959 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
5960
5961 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
5962 detect primitive operations of tagged and untagged types.
5963
5964 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
5965
5966 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
5967 sets in presence of derivation for subprogram types.
5968
5969 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
5970
5971 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
5972 present in the same context as the declaration.
5973
5974 2015-02-07 Jakub Jelinek <jakub@redhat.com>
5975
5976 PR middle-end/64340
5977 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
5978 and optimization_current_node after tweaking global_options.
5979
5980 2015-02-05 Robert Dewar <dewar@adacore.com>
5981
5982 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
5983 prj-nmsc.adb: Minor reformatting.
5984
5985 2015-02-05 Ed Schonberg <schonberg@adacore.com>
5986
5987 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
5988 of a protected type may not be available, so to check conformance
5989 with an interface type, examine the interface list in the type
5990 declaration directly.
5991 (Write_Overloads): Improve information for indirect calls,
5992 for debugger use.
5993
5994 2015-02-05 Ed Schonberg <schonberg@adacore.com>
5995
5996 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
5997 expansion activity in ASIS mode.
5998
5999 2015-02-05 Javier Miranda <miranda@adacore.com>
6000
6001 * errout.adb (Error_Msg_PT): Add missing error.
6002 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
6003 RM rule. Code cleanup.
6004 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
6005 anonymous access types. Found working on the tests. Code cleanup.
6006
6007 2015-02-05 Vincent Celier <celier@adacore.com>
6008
6009 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
6010 when there are incomplete withs.
6011 * prj-nmsc.adb (Process_Naming): Do not try to get the value
6012 of an element when it is nil.
6013 (Check_Naming): Do not check a nil suffix for illegality
6014 * prj-proc.adb (Expression): Do not process an empty term.
6015 * prj-strt.adb (Attribute_Reference): If attribute cannot be
6016 found, parse a possible index to avoid cascading errors.
6017
6018 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6019
6020 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
6021 for an access_to_subprogram declaration is not a derived type.
6022
6023 2015-02-05 Robert Dewar <dewar@adacore.com>
6024
6025 * errout.adb (Error_Msg_Internal): For non-serious error set
6026 Fatal_Error to Ignored.
6027 * lib-load.adb (Load_Unit): Minor comment updates.
6028 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
6029 setting from with'ed unit to with'ing unit.
6030 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
6031 of ambiguity.
6032
6033 2015-02-05 Yannick Moy <moy@adacore.com>
6034
6035 * sem_prag.adb, par-prag.adb: Minor code clean up.
6036
6037 2015-02-05 Yannick Moy <moy@adacore.com>
6038
6039 * par-prag.adb (Pragma_Warnings): Update for extended form
6040 of pragma Warnings. The "one" argument case may now have 2 or
6041 3 arguments.
6042 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
6043 extended form of pragma Warnings. Pragma with tool name is either
6044 rewritten as null or as an equivalent form without tool name,
6045 before reanalysis.
6046 * snames.ads-tmpl (Name_Gnatprove): New name.
6047
6048 2015-02-05 Robert Dewar <dewar@adacore.com>
6049
6050 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
6051 standard Boolean.
6052 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
6053 condition is standard Boolean, it can be non-standard derived
6054 Boolean.
6055
6056 2015-02-05 Robert Dewar <dewar@adacore.com>
6057
6058 * checks.adb (Enable_Range_Check): Disconnect attempted
6059 optimization for the case of range check for subscript of
6060 unconstrained array.
6061
6062 2015-02-05 Robert Dewar <dewar@adacore.com>
6063
6064 * par-ch13.adb (With_Present): New function
6065 (Aspect_Specifications_Present): Handle WHEN in place of WITH
6066 (Get_Aspect_Specifications): Comment update.
6067 * par.adb: Comment updates.
6068
6069 2015-02-05 Robert Dewar <dewar@adacore.com>
6070
6071 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
6072 * frontend.adb (Frontend): New setting of Fatal_Error.
6073 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
6074 Fatal_Error.
6075 (Load_Main_Source): New setting of Fatal_Error
6076 (Load_Unit): New setting of Fatal_Error.
6077 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
6078 Fatal_Error.
6079 (Ensure_System_Dependency): New setting of Fatal_Error.
6080 * lib.adb (Fatal_Error): New setting of Fatal_Error
6081 (Set_Fatal_Error): New setting of Fatal_Error.
6082 * lib.ads: New definition of Fatal_Error and associated routines.
6083 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
6084 * par-load.adb (Load): New setting of Fatal_Error.
6085 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
6086 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
6087 Fatal_Error.
6088 (Optional_Subunit): New setting of Fatal_Error.
6089 (Analyze_Proper_Body): New setting of Fatal_Error.
6090 (Load_Needed_Body): New setting of Fatal_Error.
6091
6092 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6093
6094 * sem_res.adb (Resolve_Call): If the function being called has
6095 out parameters do not check for language version if the function
6096 comes from a predefined unit, as those are always compiled in
6097 Ada 2012 mode.
6098
6099 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6100
6101 * sem_ch3.adb (Process_Full_View): Verify that the full view
6102 of a type extension must carry an explicit limited keyword if
6103 the partial view does (RM 7.3 (10.1)).
6104
6105 2015-02-05 Robert Dewar <dewar@adacore.com>
6106
6107 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
6108 sem_warn.ads: Minor reformatting.
6109 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
6110 deleted by -gnatI.
6111 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
6112 error for abstract type.
6113
6114 2015-02-05 Yannick Moy <moy@adacore.com>
6115
6116 * opt.ads (Warn_On_Suspicious_Contract): Update comment
6117 describing use.
6118 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
6119 suspicious uses of 'Update.
6120 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
6121 function issues warning on suspicious uses of 'Update.
6122 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
6123 package spec and body as SPARK_Mode Off.
6124
6125 2015-02-05 Robert Dewar <dewar@adacore.com>
6126
6127 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
6128 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
6129 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
6130 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
6131 for exported entity.
6132
6133 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
6134
6135 * sem_prag.adb (Check_Pragma_Conformance): Add
6136 local variable Arg. Ensure that all errors are associated with
6137 the pragma if it appears without an argument. Add comments on
6138 various cases.
6139
6140 2015-02-05 Robert Dewar <dewar@adacore.com>
6141
6142 * lib-xref.adb: Minor reformatting.
6143
6144 2015-02-05 Tristan Gingold <gingold@adacore.com>
6145
6146 PR ada/64349
6147 * env.c: Fix thinko: handle Darwin case before default one.
6148
6149 2015-01-30 Robert Dewar <dewar@adacore.com>
6150
6151 * a-assert.adb: Minor reformatting.
6152 * sem_ch13.adb: Minor comment clarification.
6153 * types.ads: Minor comment update.
6154 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
6155 when we have a predicate that is nothing but an inherited dynamic
6156 predicate.
6157
6158 2015-01-30 Jerome Guitton <guitton@adacore.com>
6159
6160 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
6161 include cert link spec.
6162
6163 2015-01-30 Robert Dewar <dewar@adacore.com>
6164
6165 * einfo.ads: Minor comment fix.
6166 * freeze.adb (Freeze_Profile): Add test for suspicious import
6167 in pure unit.
6168 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
6169 use in Pure unit is now moved to Freeze (to properly catch
6170 Pure_Function exemption).
6171
6172 2015-01-30 Bob Duff <duff@adacore.com>
6173
6174 * sem_res.ads: Minor comment fix.
6175 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
6176 check both operands of an operator.
6177
6178 2015-01-30 Yannick Moy <moy@adacore.com>
6179
6180 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
6181 policy for Pre to Ignore.
6182 (Assert): Add precondition.
6183
6184 2015-01-30 Robert Dewar <dewar@adacore.com>
6185
6186 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
6187 Pure unit.
6188 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
6189 documentation for some special cases of invalid attempts at
6190 based integers.
6191
6192 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6193
6194 * errout.ads: Minor reformatting.
6195
6196 2015-01-30 Yannick Moy <moy@adacore.com>
6197
6198 * inline.adb (Process_Formals): Use the sloc of
6199 the inlined node instead of the sloc of the actual parameter,
6200 when replacing formal parameters by the actual one.
6201
6202 2015-01-30 Arnaud Charlet <charlet@adacore.com>
6203
6204 * g-expect.adb (Get_Command_Output): Use infinite timeout when
6205 calling Expect.
6206
6207 2015-01-30 Ed Schonberg <schonberg@adacore.com>
6208
6209 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
6210 defaulted in an instantiation, add an entry in the list of actuals
6211 to indicate the default value of the formal (as is already done
6212 for defaulted subprograms).
6213
6214 2015-01-30 Javier Miranda <miranda@adacore.com>
6215
6216 * errout.adb (Error_Msg_PT): Minor error phrasing update.
6217
6218 2015-01-30 Robert Dewar <dewar@adacore.com>
6219
6220 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
6221 for object case.
6222
6223 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
6224
6225 * exp_dbug.adb (Get_Encoded_Name): When
6226 -fgnat-encodings=minimal, do not generate names for biased types.
6227
6228 2015-01-30 Tristan Gingold <gingold@adacore.com>
6229
6230 PR ada/64349
6231 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
6232
6233 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6234
6235 * freeze.adb: Minor reformatting.
6236
6237 2015-01-30 Javier Miranda <miranda@adacore.com>
6238
6239 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
6240 improve its documentation.
6241 * errout.adb (Error_Msg_PT): Improve the error message.
6242 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
6243 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
6244 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
6245
6246 2015-01-30 Robert Dewar <dewar@adacore.com>
6247
6248 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
6249 message for False case.
6250
6251 2015-01-30 Doug Rupp <rupp@adacore.com>
6252
6253 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
6254 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
6255 kernel.
6256
6257 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6258
6259 * sem_attr.adb (Declared_Within_Generic_Unit):
6260 New function to test whether an entity is declared within the
6261 declarative region of a given generic unit.
6262 (Resolve_Attribute): For checking legality of subprogram'Access within
6263 a generic unit, call new Boolean function Declared_Within_Generic_Unit
6264 instead of simply comparing the results of Enclosing_Generic_Unit on
6265 the prefix and access type. Correct minor comment typos.
6266
6267 2015-01-30 Robert Dewar <dewar@adacore.com>
6268
6269 * freeze.adb, exp_util.ads: Update comment.
6270 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
6271 * sem_util.adb: Minor: fix typo.
6272
6273 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
6274
6275 * sem_attr.adb (Analyze_Attribute): Ensure that
6276 the check concerning Refined_Post takes precedence over the
6277 other cases.
6278
6279 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6280
6281 * sem_prag.adb: Minor typo fixes and reformatting.
6282
6283 2015-01-30 Yannick Moy <moy@adacore.com>
6284
6285 * sem_attr.adb: Code clean up.
6286
6287 2015-01-30 Robert Dewar <dewar@adacore.com>
6288
6289 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
6290 * ali.ads (Unit_Record): Add new field Serious_Errors.
6291 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
6292 attribute in U line.
6293 * lib-writ.ads: New attribute SE (serious erors) in unit line.
6294
6295 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
6296
6297 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
6298 Lit_Indexes, Scale_Value, Storage_Size_Variable,
6299 String_Literal_Low_Bound along associated routines and
6300 Write_FieldX_Name.
6301 (Pending_Access_Types): New routine.
6302 (Set_Pending_Access_Types): New routine.
6303 (Write_Field15_Name): Add an entry for Pending_Access_Types.
6304 * einfo.ads Add new attribute Pending_Access_Types along
6305 with usage in nodes. Update the usage of attributes
6306 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
6307 Storage_Size_Variable, String_Literal_Low_Bound.
6308 (Pending_Access_Types): New routine along with pragma Inline.
6309 (Set_Pending_Access_Types): New routine along with pragma Inline.
6310 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
6311 Ins_Node. Determine the insertion node for anonynous access type
6312 that acts as a component type of an array. Update the call to
6313 Build_Finalization_Master.
6314 (Expand_Freeze_Record_Type): Update
6315 the calls to Build_Finalization_Master.
6316 (Freeze_Type): Remove
6317 local variable RACW_Seen. Factor out the code that deals with
6318 remote access-to-class-wide types. Create a finalization master
6319 when the designated type contains a private component. Fully
6320 initialize all pending access types.
6321 (Process_RACW_Types): New routine.
6322 (Process_Pending_Access_Types): New routine.
6323 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
6324 needs to set primitive Finalize_Address.
6325 (Expand_N_Allocator): Allocation no longer sets primitive
6326 Finalize_Address.
6327 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
6328 Update the call to Build_Finalization_Master.
6329 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
6330 needs to set primitive Finalize_Address.
6331 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
6332 (Build_Finalization_Master): New parameter profile. Associate
6333 primitive Finalize_Address with the finalization master if the
6334 designated type has been frozen, otherwise treat the access
6335 type as pending. Simplify the insertion of the master and
6336 related initialization code.
6337 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
6338 abstract types.
6339 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
6340 Simplify the implementation.
6341 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
6342 along with comment on usage.
6343 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
6344 the comment on usage.
6345 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
6346 Finalize_Address to retrieve the primitive.
6347 (Finalize_Address): New routine.
6348 (Find_Finalize_Address): Removed.
6349 * exp_util.ads (Finalize_Address): New routine.
6350 * freeze.adb (Freeze_All): Remove the generation of finalization
6351 masters.
6352 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
6353 pending access types from the partial to the full view.
6354
6355 2015-01-30 Robert Dewar <dewar@adacore.com>
6356
6357 * sem_disp.adb: Minor reformatting.
6358 * sem_disp.ads: Documentation update.
6359
6360 2015-01-30 Ed Schonberg <schonberg@adacore.com>
6361
6362 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
6363 or a function call, return True if type is class-wide.
6364 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
6365 Apply RM 4.5.7 (17/3): all or none of the dependent expression
6366 of a conditional expression must be dynamically tagged.
6367
6368 2015-01-30 Ed Schonberg <schonberg@adacore.com>
6369
6370 * sem_ch6.adb (Analyze_Function_Return): In an extended return
6371 statement, apply accessibility check to result object when there
6372 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
6373
6374 2015-01-30 Robert Dewar <dewar@adacore.com>
6375
6376 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
6377 Boolean for case where ELSE is omitted.
6378 * sem_res.adb: Minor reformatting.
6379
6380 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6381
6382 Fix build under cygwin/64.
6383 * adaint.h: Add check for __CYGWIN__.
6384 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
6385
6386 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6387
6388 PR ada/64640
6389 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
6390 * mingw32.h: Don't include <tchar.h> under cygwin.
6391 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
6392
6393 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6394
6395 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
6396 (DEF_FUNCTION_TYPE_VAR_12): New macros.
6397
6398 2015-01-09 Michael Collison <michael.collison@linaro.org>
6399
6400 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
6401 vec.h, double-int.h, input.h, alias.h, symtab.h,
6402 fold-const.h, wide-int.h, and inchash.h due to
6403 flattening of tree.h.
6404 * gcc-interface/decl.c: Ditto.
6405 * gcc-interface/misc.c: Ditto.
6406 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
6407 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
6408 fold-const.h, wide-int.h, and inchash.h due to
6409 flattening of tree.h.
6410 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
6411 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
6412 fold-const.h, wide-int.h, inchash.h due to
6413 flattening of tree.h.
6414 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
6415 vec.h, double-int.h, input.h, alias.h, symtab.h,
6416 fold-const.h, wide-int.h, and inchash.h due to
6417 flattening of tree.h.
6418 * gcc-interface/utils2.c: Ditto.
6419
6420 2015-01-07 Robert Dewar <dewar@adacore.com>
6421
6422 * sem_warn.adb (Check_One_Unit): Don't give unused entities
6423 warning for a package which is used as a generic parameter.
6424
6425 2015-01-07 Bob Duff <duff@adacore.com>
6426
6427 * usage.adb (Usage): Correct documentation of
6428 -gnatw.f switches.
6429
6430 2015-01-07 Robert Dewar <dewar@adacore.com>
6431
6432 * s-fileio.adb: Minor reformatting.
6433
6434 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6435
6436 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
6437 access to subprogram, replace its formals with new entities when
6438 building the object declaration, both if actual is present and
6439 when it is defaulted.
6440
6441 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6442
6443 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
6444 conversion and type of expression has invariant, apply invariant
6445 check on expression.
6446
6447 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6448
6449 * sem_ch3.adb (Create_Constrained_Components): A call to
6450 Gather_Components may detect an error if an inherited discriminant
6451 that controls a variant is non-static.
6452 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
6453 Gather_Components may report an error if an inherited discriminant
6454 in a variant in non-static.
6455 * sem_util.adb (Gather_Components): If a non-static discriminant
6456 is inherited do not report error here, but let caller handle it.
6457 (Find_Actual): Small optimization.
6458
6459 2015-01-07 Bob Duff <duff@adacore.com>
6460
6461 * usage.adb (Usage): Document -gnatw.f switch.
6462
6463 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6464
6465 * sem_ch12.adb: Code clean up and minor reformatting.
6466
6467 2015-01-07 Robert Dewar <dewar@adacore.com>
6468
6469 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
6470 Raise_Accessibility_Error call.
6471 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
6472 on handling of invalid digits in based constants.
6473 * s-fatgen.ads: Minor reformatting.
6474 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
6475 Avoid noting bogus modification for Valid test.
6476 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
6477 * einfo.ads: Minor reformatting.
6478 * sem_warn.adb: Minor comment clarification.
6479 * sem_ch12.adb: Minor reformatting.
6480
6481 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6482
6483 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
6484 over static predicates when the loop parameter specification
6485 carries a Reverse indicator.
6486
6487 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6488
6489 * sem_ch12.adb (Instantiate_Object): If formal has a default,
6490 actual is missing and formal has an anonymous access type, copy
6491 access definition in full so that tree for instance is properly
6492 formatted for ASIS use.
6493
6494 2015-01-07 Bob Duff <duff@adacore.com>
6495
6496 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
6497 for P'Access, where P is a subprogram in the same package as
6498 the P'Access, and the P'Access is evaluated at elaboration
6499 time, and occurs before the body of P. For example, "X : T :=
6500 P'Access;" would allow a subsequent call to X.all to be an
6501 access-before-elaboration error; hence the warning. This warning
6502 is enabled by the -gnatw.f switch.
6503 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
6504 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
6505 * gnat_ugn.texi: Document the new warning.
6506
6507 2015-01-07 Johannes Kanig <kanig@adacore.com>
6508
6509 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
6510 cross ref files.
6511
6512 2015-01-07 Robert Dewar <dewar@adacore.com>
6513
6514 * s-taprop-linux.adb, clean.adb: Minor reformatting.
6515
6516 2015-01-07 Arnaud Charlet <charlet@adacore.com>
6517
6518 * s-tassta.adb: Relax some overzealous assertions.
6519
6520 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6521
6522 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
6523 view of a type is legal when context is a thunk generated for
6524 operation inherited from an interface.
6525 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
6526 a thunk and return type is an incomplete type do not continue
6527 expansion; thunk will be fully elaborated when generating code.
6528
6529 2015-01-07 Doug Rupp <rupp@adacore.com>
6530
6531 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
6532 (QueryPerformanceFrequency): New imported procedure.
6533 * s-taprop-mingw.adb (RT_Resolution): Call above and return
6534 resolution vice a hardcoded value.
6535 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
6536 resolution vice a hardcoded value.
6537 * s-linux-android.ads (clockid_t): New subtype.
6538 * s-osinte-aix.ads (clock_getres): New imported subprogram.
6539 * s-osinte-android.ads (clock_getres): Likewise.
6540 * s-osinte-freebsd.ads (clock_getres): Likewise.
6541 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
6542 * s-osinte-darwin.ads (clock_getres): New subprogram.
6543 * s-osinte-darwin.adb (clock_getres): New subprogram.
6544 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
6545 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
6546 calculate resolution vice hard coded value.
6547
6548 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6549
6550 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
6551 limited view, use non-limited view when available to create
6552 equivalent record type.
6553
6554 2015-01-07 Vincent Celier <celier@adacore.com>
6555
6556 * gnatcmd.adb: Remove command Sync and any data and processing
6557 related to this command. Remove project processing for gnatstack.
6558 * prj-attr.adb: Remove package Synchonize and its attributes.
6559
6560 2015-01-07 Vincent Celier <celier@adacore.com>
6561
6562 * clean.adb: Minor error message change.
6563
6564 2015-01-07 Tristan Gingold <gingold@adacore.com>
6565
6566 PR ada/64349
6567 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
6568
6569 2015-01-07 Javier Miranda <miranda@adacore.com>
6570
6571 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
6572 protect the frontend against never ending recursion caused by
6573 circularities in the sources.
6574
6575 2015-01-07 Robert Dewar <dewar@adacore.com>
6576
6577 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
6578 exp_ch3.adb: Minor reformatting.
6579
6580 2015-01-07 Doug Rupp <rupp@adacore.com>
6581
6582 * s-linux.ads (clockid_t): New subtype.
6583 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
6584 (clockid_t): New subtype.
6585 (clock_getres): Import system call.
6586 * s-taprop-linux.adb (System.OS_Constants): With and rename.
6587 (RT_Resolution): Remove
6588 hardcoded value and call clock_getres.
6589 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
6590 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
6591
6592 2015-01-07 Robert Dewar <dewar@adacore.com>
6593
6594 * sem_warn.adb (Check_One_Unit): Guard against context item
6595 with no Entity field.
6596
6597 2015-01-07 Vincent Celier <celier@adacore.com>
6598
6599 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
6600 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
6601
6602 2015-01-07 Vincent Celier <celier@adacore.com>
6603
6604 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
6605 errors/warnings in the first parsing of the project files,
6606 to display the warnings when there is no errors.
6607
6608 2015-01-07 Tristan Gingold <gingold@adacore.com>
6609
6610 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
6611
6612 2015-01-07 Doug Rupp <rupp@adacore.com>
6613
6614 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
6615 value from Int_Lock as parameter to Int_Unlock.
6616 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
6617 * s-vxwext.ads (Int_Unlock): Likewise.
6618 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
6619 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
6620 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
6621 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
6622
6623 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
6624
6625 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
6626 keep ___XP suffixes
6627
6628 2015-01-07 Tristan Gingold <gingold@adacore.com>
6629
6630 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
6631 handle overlap.
6632
6633 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
6634
6635 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
6636 automatically set No_Strict_Aliasing on access types.
6637 * fe.h (No_Strict_Aliasing_CP): Declare.
6638 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
6639 No_Strict_Aliasing_CP is set.
6640
6641 2015-01-07 Johannes Kanig <kanig@adacore.com>
6642
6643 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
6644 not build function wrapper in gnatprove mode when the package
6645 is externally axiomatized.
6646
6647 2015-01-07 Jose Ruiz <ruiz@adacore.com>
6648
6649 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
6650 intermediate computations when the parameters have different signs.
6651
6652 2015-01-07 Javier Miranda <miranda@adacore.com>
6653
6654 * exp_ch3.adb (Build_Init_Procedure): For derived types,
6655 improve the code which takes care of identifying and moving to
6656 the beginning of the init-proc the call to the init-proc of the
6657 parent type.
6658
6659 2015-01-07 Olivier Hainque <hainque@adacore.com>
6660
6661 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
6662 Elaborate the expression as part of the same stmt group as the actions.
6663
6664 2015-01-07 Robert Dewar <dewar@adacore.com>
6665
6666 * sem_ch3.adb: Minor error message change.
6667
6668 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6669
6670 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
6671 Following AI05-028, the pragam applies legally to any composite type.
6672
6673 2015-01-07 Arnaud Charlet <charlet@adacore.com>
6674
6675 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
6676 (sigwait, sigwaitinfo): Removed, not needed after all on any
6677 VxWorks configurations.
6678
6679 2015-01-07 Robert Dewar <dewar@adacore.com>
6680
6681 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
6682
6683 2015-01-07 Javier Miranda <miranda@adacore.com>
6684
6685 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
6686 generation of accessibility check.
6687
6688 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6689
6690 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
6691 illegal completion from a class- wide type, set etype of the
6692 derived type properly to prevent cascaded errors.
6693
6694 2015-01-07 Robert Dewar <dewar@adacore.com>
6695
6696 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
6697 reformatting.
6698
6699 2015-01-07 Robert Dewar <dewar@adacore.com>
6700
6701 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
6702 New procedure.
6703 (OK_No_Use_Of_Entity_Name): New function.
6704 (Set_Restriction_No_Use_Of_Entity): New procedure.
6705 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
6706 New procedure.
6707 (OK_No_Use_Of_Entity_Name): New function.
6708 (Set_Restriction_No_Use_Of_Entity): New procedure.
6709 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
6710 No_Use_Of_Entity.
6711 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
6712 Add processing for new restriction No_Use_Of_Entity.
6713
6714 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
6715
6716 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
6717 component type as to Has_Atomic_Components type. Remove useless
6718 test on Is_Aliased component type.
6719
6720 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
6721
6722 * alloc.ads Alphabetize several declarations. Add constants
6723 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
6724 * atree.adb Add with and use clauses for Opt.
6725 (Allocate_Initialize_Node): Mark a node as ignored Ghost
6726 if it is created in an ignored Ghost region.
6727 (Ekind_In): New variant.
6728 (Is_Ignored_Ghost_Node): New routine.
6729 (Set_Is_Ignored_Ghost_Node): New routine.
6730 * atree.adb Aplhabetize several subprograms declarations. Flag
6731 Spare0 is now known as Is_Ignored_Ghost_Node.
6732 (Ekind_In): New variant.
6733 (Is_Ignored_Ghost_Node): New routine.
6734 (Set_Is_Ignored_Ghost_Node): New routine.
6735 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
6736 (Contains_Ignored_Ghost_Code): New routine.
6737 (Set_Contains_Ignored_Ghost_Code): New routine.
6738 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
6739 It is now possible to set this property on an unanalyzed entity.
6740 (Write_Entity_Flags): Output the status of flag
6741 Contains_Ignored_Ghost_Code.
6742 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
6743 usage in nodes.
6744 (Contains_Ignored_Ghost_Code): New routine
6745 along with pragma Inline.
6746 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
6747 * exp_ch3.adb Add with and use clauses for Ghost.
6748 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
6749 Set the Ghost_Mode in effect.
6750 (Restore_Globals): New routine.
6751 * exp_ch7.adb (Process_Declarations): Do not process a context
6752 that invoves an ignored Ghost entity.
6753 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
6754 construct that has been rewritten as a null statement.
6755 * exp_disp.adb Add with and use clauses for Ghost.
6756 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
6757 the Ghost_Mode in effect.
6758 (Restore_Globals): New routine.
6759 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
6760 does not require any clean up. Add two missing cases that deal
6761 with block statements.
6762 * freeze.adb Add with and use clauses for Ghost.
6763 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
6764 Set the Ghost_Mode in effect.
6765 (Restore_Globals): New routine.
6766 * frontend.adb Add with and use clauses for Ghost. Remove any
6767 ignored Ghost code from all units that qualify.
6768 * ghost.adb New unit.
6769 * ghost.ads New unit.
6770 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
6771 the table in package Ghost.
6772 * lib.ads: Alphabetize several subprogram declarations.
6773 * lib-xref.adb (Output_References): Do not generate reference
6774 information for ignored Ghost entities.
6775 * opt.ads Add new type Ghost_Mode_Type and new global variable
6776 Ghost_Mode.
6777 * rtsfind.adb (Load_RTU): Provide a clean environment when
6778 loading a runtime unit.
6779 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
6780 entry/exit as the node may set a different mode.
6781 (Do_Analyze):
6782 Capture/restore the value of Ghost_Mode on entry/exit as the
6783 unit may be withed from a unit with a different Ghost mode.
6784 * sem_ch3.adb Add with and use clauses for Ghost.
6785 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
6786 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
6787 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
6788 the entity as Ghost when there is a Ghost_Mode in effect.
6789 (Array_Type_Declaration): The implicit base type inherits the
6790 "ghostness" from the array type.
6791 (Derive_Subprogram): The
6792 alias inherits the "ghostness" from the parent subprogram.
6793 (Make_Implicit_Base): The implicit base type inherits the
6794 "ghostness" from the parent type.
6795 * sem_ch5.adb Add with and use clauses for Ghost.
6796 (Analyze_Assignment): Set the Ghost_Mode in effect.
6797 * sem_ch6.adb Add with and use clauses for Ghost.
6798 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
6799 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
6800 Set the Ghost_Mode in effect. Mark the entity as Ghost when
6801 there is a Ghost_Mode in effect.
6802 * sem_ch7.adb Add with and use clauses for Ghost.
6803 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
6804 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
6805 effect. Mark the entity as Ghost when there is a Ghost_Mode
6806 in effect.
6807 * sem_ch8.adb Add with and use clauses for Ghost.
6808 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6809 Analyze_Object_Renaming, Analyze_Package_Renaming,
6810 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
6811 the entity as Ghost when there is a Ghost_Mode in effect.
6812 (Find_Type): Check the Ghost context of a type.
6813 * sem_ch11.adb Add with and use clauses for Ghost.
6814 (Analyze_Exception_Declaration): Set the Ghost_Mode in
6815 effect. Mark the entity as Ghost when there is a Ghost_Mode
6816 in effect.
6817 * sem_ch12.adb Add with and use clauses for Ghost.
6818 (Analyze_Generic_Package_Declaration,
6819 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
6820 Mark the entity as Ghost when there is a Ghost_Mode in effect.
6821 * sem_prag.adb Add with and use clauses for Ghost.
6822 (Analyze_Pragma): Ghost-related checks are triggered when there
6823 is a Ghost mode in effect.
6824 (Create_Abstract_State): Mark the
6825 entity as Ghost when there is a Ghost_Mode in effect.
6826 * sem_res.adb Add with and use clauses for Ghost.
6827 (Check_Ghost_Context): Removed.
6828 * sem_util.adb (Check_Ghost_Completion): Removed.
6829 (Check_Ghost_Derivation): Removed.
6830 (Incomplete_Or_Partial_View):
6831 Add a guard in case the entity has not been analyzed yet
6832 and does carry a scope.
6833 (Is_Declaration): New routine.
6834 (Is_Ghost_Entity): Removed.
6835 (Is_Ghost_Statement_Or_Pragma):
6836 Removed.
6837 (Is_Subject_To_Ghost): Removed.
6838 (Set_Is_Ghost_Entity):
6839 Removed.
6840 (Within_Ghost_Scope): Removed.
6841 * sem_util.adb (Check_Ghost_Completion): Removed.
6842 (Check_Ghost_Derivation): Removed.
6843 (Is_Declaration): New routine.
6844 (Is_Ghost_Entity): Removed.
6845 (Is_Ghost_Statement_Or_Pragma): Removed.
6846 (Is_Subject_To_Ghost): Removed.
6847 (Set_Is_Ghost_Entity): Removed.
6848 (Within_Ghost_Scope): Removed.
6849 * sinfo.ads Add a section on Ghost mode.
6850 * treepr.adb (Print_Header_Flag): New routine.
6851 (Print_Node_Header): Factor out code. Output flag
6852 Is_Ignored_Ghost_Node.
6853 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
6854
6855 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
6856
6857 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
6858 true test and unreachable 'else' arm.
6859
6860 2015-01-06 Vincent Celier <celier@adacore.com>
6861
6862 * prj-conf.adb (Check_Target): Improve error message when
6863 there are mismatched targets between the on in the configuration
6864 project file and the specified one, either in the main project
6865 file or in the --target= switch.
6866
6867 2015-01-06 Pascal Obry <obry@adacore.com>
6868
6869 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
6870 Install_Name attribute definitions.
6871
6872 2015-01-06 Ed Schonberg <schonberg@adacore.com>
6873
6874 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
6875 generated Import pragma for the internal imported procedure does
6876 not come from an aspect, so that Is_Imported can be properly
6877 set for it.
6878
6879 2015-01-06 Gary Dismukes <dismukes@adacore.com>
6880
6881 * sem_ch12.adb (Might_Inline_Subp): Record whether
6882 any subprograms in the generic package are marked with
6883 pragma Inline_Always (setting flag Has_Inline_Always).
6884 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
6885 alongside existing test of Front_End_Inlining as alternative
6886 conditions for setting Inline_Now. Also add test of
6887 Has_Inline_Always along with Front_End_Inlining test as an
6888 alternative condition for setting Needs_Body to False.
6889
6890 2015-01-06 Tristan Gingold <gingold@adacore.com>
6891
6892 * i-cpoint.adb (Copy_Array): Handle overlap.
6893
6894 2015-01-06 Pascal Obry <obry@adacore.com>
6895
6896 * bindgen.adb: Minor style fix.
6897
6898 2015-01-06 Robert Dewar <dewar@adacore.com>
6899
6900 * sem_util.ads, sem_util.adb: Minor reformatting.
6901
6902 2015-01-06 Vincent Celier <celier@adacore.com>
6903
6904 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
6905 with flags before parsing the projects.
6906 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
6907 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
6908 to True in the flags, when Ignore_Missing_With is True and an
6909 imported project cannot be found.
6910 * prj-proc.adb (Expression): When there are incomplete withs and
6911 a variable or attribute is not found, set the variable/attribute
6912 to unknown.
6913 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
6914 defaulted to False.
6915
6916 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
6917
6918 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
6919 prj-err.adb: Add new switch --no-command-line.
6920
6921 2015-01-06 Ed Schonberg <schonberg@adacore.com>
6922
6923 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
6924
6925 2015-01-06 Robert Dewar <dewar@adacore.com>
6926
6927 * sem_ch11.adb: Minor reformatting.
6928
6929 2015-01-06 Ed Schonberg <schonberg@adacore.com>
6930
6931 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
6932 Build_Array_Aggr_Code, used to initialized components covered
6933 by a box association. If the component type is scalar and has
6934 a default aspect, use it to initialize such components.
6935
6936 2015-01-06 Pascal Obry <obry@adacore.com>
6937
6938 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
6939 control the setup of the exception handler.
6940 * initialize.c: Remove unused declaration.
6941 * bindgen.adb: Always call __gnat_runtime_initialize and pass
6942 whether the exeception handler must be set or not.
6943
6944 2015-01-06 Thomas Quinot <quinot@adacore.com>
6945
6946 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
6947 order to native from default, make sure to also adjust bit order.
6948 * exp_aggr.adb: Minor reformatting.
6949
6950 2015-01-06 Robert Dewar <dewar@adacore.com>
6951
6952 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
6953 s-valrea.adb, s-valrea.ads: Add some additional guards for
6954 Str'Last = Positive'Last.
6955
6956 2015-01-06 Ed Schonberg <schonberg@adacore.com>
6957
6958 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
6959 subprograms.
6960
6961 2015-01-06 Javier Miranda <miranda@adacore.com>
6962
6963 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
6964
6965 2015-01-06 Thomas Quinot <quinot@adacore.com>
6966
6967 * sem_util.ads: Minor reformatting.
6968 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
6969 (In_RCI_Declaration) Return to old name, as proper checking of
6970 entity being in the visible part depends on entity kind and must
6971 be done by the caller.
6972
6973 2015-01-06 Ed Schonberg <schonberg@adacore.com>
6974
6975 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
6976 for operators in SPARK.
6977
6978 2015-01-06 Ed Schonberg <schonberg@adacore.com>
6979
6980 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
6981 expression in an others association before making copies for
6982 separate resolution and accessibility checks. This ensures that
6983 the type of the expression is available to ASIS in all cases,
6984 in particular if the expression is itself an aggregate.
6985
6986 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
6987
6988 * einfo.ads (Has_Independent_Components): Document extended
6989 usage.
6990 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
6991 (Set_Has_Independent_Components): Adjust assertion.
6992 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
6993 for pragma Atomic_Components. Set Has_Independent_Components
6994 on the object instead of the type for an object declaration with
6995 pragma Independent_Components.
6996
6997 2015-01-06 Olivier Hainque <hainque@adacore.com>
6998
6999 * set_targ.adb (Read_Target_Dependent_Values): Set
7000 Long_Double_Index when "long double" is read.
7001 (elaboration code): Register_Back_End_Types only when not reading from
7002 config files. Doing otherwise is pointless and error prone.
7003
7004 2015-01-06 Robert Dewar <dewar@adacore.com>
7005
7006 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
7007
7008 2015-01-06 Robert Dewar <dewar@adacore.com>
7009
7010 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
7011 Str'Last = Positive'Last.
7012
7013 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7014
7015 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
7016 where the non-limited type is a generic actual and appears as
7017 a subtype of the non-limited view of the other.
7018 * freeze.adb (Build_Renamed_Body): If the return type of the
7019 declaration that is being completed is a limited view and the
7020 non-limited view is available, use it in the specification of
7021 the generated body.
7022
7023 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7024
7025 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
7026 incomplete view, the type of the classwide type common to both
7027 views is the type being declared.
7028
7029 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
7030
7031 * einfo.ads (Is_Independent): Further document extended usage.
7032
7033 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
7034
7035 * einfo.ads (Is_Independent): Document extended usage.
7036 * einfo.adb (Is_Independent): Remove obsolete assertion.
7037 (Set_Is_Independent): Likewise.
7038 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
7039 (Process_Atomic_Independent_Shared_Volatile): ...this.
7040 Deal with pragma Independent here.
7041 (Analyze_Pragma): Adjust
7042 to above renaming and also invoke it for pragma Independent.
7043 Adjust comment for Independent_Components.
7044
7045 2015-01-06 Robert Dewar <dewar@adacore.com>
7046
7047 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
7048 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
7049
7050 2015-01-06 Robert Dewar <dewar@adacore.com>
7051
7052 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
7053 = Positive'Last.
7054 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
7055 Str'Last = Positive'Last.
7056
7057 2015-01-06 Robert Dewar <dewar@adacore.com>
7058
7059 * sem_prag.adb (Process_Inline): Remove redundant construct
7060 warning (-gnatw.r) for an ineffective pragma Inline.
7061
7062 2015-01-06 Robert Dewar <dewar@adacore.com>
7063
7064 * s-valint.adb: Fix typo in last checkin.
7065 * s-valuns.adb (Value_Unsigned): More efficient fix for
7066 Positive'Last case.
7067 * sem_attr.adb (Analyze_Attribute): Minor reformatting
7068 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
7069
7070 2015-01-06 Robert Dewar <dewar@adacore.com>
7071
7072 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
7073 Str'Last = Positive'Last
7074
7075 2015-01-06 Thomas Quinot <quinot@adacore.com>
7076
7077 * xoscons.adb: Display exception information and return non-zero
7078 exit status in top level exception handler.
7079
7080 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7081
7082 * sem_ch8.adb: Code clean up.
7083
7084 2015-01-06 Tristan Gingold <gingold@adacore.com>
7085
7086 * targparm.ads: Remove obsolete comment.
7087
7088 2015-01-06 Olivier Hainque <hainque@adacore.com>
7089
7090 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
7091 constructing a ref to variable, update inner_const_flag from the
7092 variable TREE_READONLY attribute.
7093 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
7094 definition.
7095 (get_target_float_size): Remove.
7096 (get_target_double_size): Remove.
7097 (get_target_long_double_size): Remove.
7098
7099 2015-01-06 Pascal Obry <obry@adacore.com>
7100
7101 * adaint.c (ProcListEvt): Set to NULL.
7102 * rtinit.c: New file.
7103 (__gnat_rt_init_count): New reference counter set to 0.
7104 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
7105 this code is actually needed for the runtime initialization. This
7106 routine returns immediately if the initialization has already been done.
7107 * final.c: Revert previous change.
7108 * rtfinal.c: New file.
7109 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
7110 section and event. The default version of this routine is empty (except
7111 for the reference counting code). This routine returns immediately if
7112 some others libraries are referencing the runtime.
7113 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
7114 remove circuitry to initialize the signal handler as this is
7115 now done by the runtime initialization routine.
7116 (Gen_Adafinal): Generate call to Runtime_Finalize.
7117 * gnat_ugn.texi: Update documentation about concurrency and
7118 initialization/finalization of the run-time.
7119 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
7120 references to rtfinal.o and rtinit.o
7121
7122 2015-01-06 Robert Dewar <dewar@adacore.com>
7123
7124 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
7125 for Enum_Image.
7126 * sem_attr.adb: Implement Enum_Image attribute.
7127 * snames.ads-tmpl: Add entries for Enum_Image attribute.
7128
7129 2015-01-06 Robert Dewar <dewar@adacore.com>
7130
7131 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
7132 * restrict.ads (No_Use_Of_Entity): New table.
7133 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
7134 Ignore No_Use_Of_Entity (will be processed in parser).
7135 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
7136
7137 2015-01-06 Vincent Celier <celier@adacore.com>
7138
7139 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
7140 to check for an extended project, if a project does not have
7141 yet a project declaration.
7142
7143 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
7144
7145 * scos.ads: Update documentation about the SCO table build
7146 process and about table records format.
7147 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
7148 (SCO_Record_Filtered): New procedure.
7149 (Set_SCO_Logical_Operator): New procedure.
7150 (dsco): Update documentation.
7151 * par_sco.adb: Update library-level comments.
7152 (SCO_Generation_State_Type): New type.
7153 (SCO_Generation_State): New variable.
7154 (SCO_Raw_Table): New package instanciation.
7155 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
7156 ("<"): New.
7157 (Tristate): New type.
7158 (Is_Logical_Operator): Return Tristate and update documentation.
7159 (Has_Decision): Update call to Is_Logical_Operator and complete
7160 documentation.
7161 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
7162 comment, add an assertion for state checking and change
7163 references to SCO_Table into SCO_Raw_Table.
7164 (dsco): Refactor to dump the raw and the filtered tables.
7165 (Process_Decisions.Output_Decision_Operand): Handle putative
7166 short-circuit operators.
7167 (Process_Decisions.Output_Element): Update references
7168 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
7169 (Process_Decisions.Process_Decision_Operand): Update call
7170 to Is_Logical_Operator.
7171 (Process_Decisions.Process_Node): Handle putative short-circuit
7172 operators and change references to
7173 SCO_Table into SCO_Raw_Table.
7174 (SCO_Output): Add an assertion
7175 for state checking and remove code that used to stamp out SCO entries.
7176 (SCO_Pragma_Disabled): Change reference to SCO_Table
7177 into SCO_Raw_Table.
7178 (SCO_Record): Rename to SCO_Record_Raw,
7179 add an assertion for state checking and change references
7180 to SCO_Table into SCO_Raw_Table.
7181 (Set_SCO_Condition): Add an assertion for state checking, update
7182 references to Condition_Pragma_Hash_Table and change references to
7183 SCO_Table into SCO_Raw_Table.
7184 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
7185 change references to SCO_Table into SCO_Raw_Table.
7186 (Set_SCO_Logical_Operator): New procedure.
7187 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
7188 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
7189 (SCO_Record_Fildered): New procedure.
7190 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
7191 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
7192 output SCOs.
7193 * par-load.adb (Load): Update reference to SCO_Record.
7194 * par.adb (Par): Update reference to SCO_Record.
7195 * put_scos.adb (Put_SCOs): Add an assertion to check that no
7196 putative SCO condition reaches this end.
7197 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
7198 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
7199 when corresponding to an "and"/"or" operator affected by the
7200 Short_Circuit_And_Or pragma.
7201
7202 2015-01-06 Robert Dewar <dewar@adacore.com>
7203
7204 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
7205 msg for attempted USE of generic subprogram or subprogram.
7206
7207 2015-01-06 Robert Dewar <dewar@adacore.com>
7208
7209 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
7210 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
7211 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
7212
7213 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7214
7215 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
7216 that specify stream subprograms, if the prefix is a class-wide
7217 type then the generated attribute definition clause must apply
7218 to the same class-wide type.
7219 (Default_Iterator): An iterator defined by an aspect of some
7220 container type T must have a first parameter of type T, T'class,
7221 or an access to such (from code reading RM 5.5.1 (2/3)).
7222
7223 2015-01-06 Arnaud Charlet <charlet@adacore.com>
7224
7225 * gnat1drv.adb: Minor: complete previous change.
7226
7227 2015-01-06 Olivier Hainque <hainque@adacore.com>
7228
7229 * set_targ.ads (C_Type_For): New function. Return the name of
7230 a C type supported by the back-end and suitable as a basis to
7231 construct the standard Ada floating point type identified by
7232 the T parameter. This is used as a common ground to feed both
7233 ttypes values and the GNAT tree nodes for the standard floating
7234 point types.
7235 * set_targ.adb (Long_Double_Index): The index at which "long
7236 double" gets registered in the FPT_Mode_Table. This is useful to
7237 know whether we have a "long double" available at all and get at
7238 it's characteristics without having to search the FPT_Mode_Table
7239 when we need to decide which C type should be used as the
7240 basis for Long_Long_Float in Ada.
7241 (Register_Float_Type): Fill Long_Double_Index.
7242 (FPT_Mode_Index_For): New function. Return the index in
7243 FPT_Mode_Table that designates the entry corresponding to the
7244 provided C type name.
7245 (FPT_Mode_Index_For): New function. Return the index in
7246 FPT_Mode_Table that designates the entry for a back-end type
7247 suitable as a basis to construct the standard Ada floating point
7248 type identified by the input T parameter.
7249 (elaboration code): Register_Back_End_Types unconditionally,
7250 so C_Type_For can operate regardless of -gnateT. Do it
7251 early so we can query it for the floating point sizes, via
7252 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
7253 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
7254 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
7255 which C type should be used as the basis for the construction
7256 of the Standard Ada floating point types.
7257 * get_targ.ads (Get_Float_Size, Get_Double_Size,
7258 Get_Long_Double_Size): Remove.
7259 * get_targ.adb: Likewise.
7260
7261 2015-01-06 Thomas Quinot <quinot@adacore.com>
7262
7263 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
7264 parameter and rename to...
7265 (In_RCI_Visible_Declarations): Fix handling of private part of nested
7266 package.
7267 (Validate_RCI_Subprogram_Declaration): Reject illegal function
7268 returning anonymous access in RCI unit.
7269
7270 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7271
7272 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
7273 function wrapper may be a homonym of another local declaration.
7274 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
7275 build function and operator wrappers after the actual subprogram
7276 has been resolved, and replace the standard renaming declaration
7277 with the declaration of wrapper.
7278 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
7279 make public for use elsewhere.
7280 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
7281 rewrite, now that actual is fully resolved when wrapper is
7282 constructed.
7283
7284 2015-01-06 Javier Miranda <miranda@adacore.com>
7285
7286 * exp_disp.adb: Revert previous change.
7287
7288 2015-01-06 Robert Dewar <dewar@adacore.com>
7289
7290 * exp_util.adb: Change name Name_Table_Boolean to
7291 Name_Table_Boolean1.
7292 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
7293 Introduce Name_Table_Boolean2/3.
7294 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
7295 Introduce Name_Table_Boolean2/3.
7296 * par-ch13.adb: Change name Name_Table_Boolean to
7297 Name_Table_Boolean1.
7298
7299 2015-01-06 Bob Duff <duff@adacore.com>
7300
7301 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
7302
7303 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7304
7305 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
7306 others choice that covers multiple components, analyze each
7307 copy with the type of the component even in compile-only mode,
7308 to detect potential accessibility errors.
7309
7310 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
7311
7312 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
7313 (Resolve_Actuals): An effectively volatile out
7314 parameter cannot act as an in or in out actual in a call.
7315 (Resolve_Entity_Name): An effectively volatile out parameter
7316 cannot be read.
7317
7318 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7319
7320 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
7321 the expansion of an expression function it may be pre-analyzed
7322 if a 'access attribute is applied to the function, in which case
7323 last_entity may have been assigned already.
7324
7325 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7326
7327 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
7328 type and actual has the corresponding full view, there is no
7329 error, but a case of use of incomplete type in a predicate or
7330 invariant expression.
7331
7332 2015-01-06 Vincent Celier <celier@adacore.com>
7333
7334 * makeutl.adb (Insert_No_Roots): Make sure that the same source
7335 in two different project tree is checked in both trees, if they
7336 are sources of two different projects, extended or not.
7337
7338 2015-01-06 Arnaud Charlet <charlet@adacore.com>
7339
7340 * gnat1drv.adb: Minor code clean up.
7341 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
7342
7343 2015-01-06 Bob Duff <duff@adacore.com>
7344
7345 * osint.adb (Read_Source_File): Don't print out
7346 file name unless T = Source.
7347
7348 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7349
7350 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
7351 recognize improper uses of constant_reference types as actuals
7352 for in-out parameters.
7353 (Check_Function_Call): Do not collect identifiers if function
7354 name is missing because of previous error.
7355
7356 2015-01-06 Robert Dewar <dewar@adacore.com>
7357
7358 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
7359 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
7360 Minor change of name Name_Table_Info => Name_Table_Int.
7361
7362 2015-01-06 Robert Dewar <dewar@adacore.com>
7363
7364 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
7365 in previous checkin.
7366 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
7367 of bounds.
7368 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
7369
7370 2015-01-06 Vincent Celier <celier@adacore.com>
7371
7372 * a-strsup.adb (Times (Natural;String;Positive)): Raise
7373 Length_Error, not Index_Error, when the result is too long.
7374
7375 2015-01-06 Thomas Quinot <quinot@adacore.com>
7376
7377 * a-direct.adb (Create_Path): Minor error handling and
7378 performance improvement.
7379
7380 2015-01-06 Robert Dewar <dewar@adacore.com>
7381
7382 * checks.ads, sem_ch12.adb: Minor reformatting.
7383 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
7384 zero check for fixed-point case if Backend_Divide_Checks_On_Target
7385 is False.
7386
7387 2015-01-06 Robert Dewar <dewar@adacore.com>
7388
7389 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
7390 Do not set restriction No_Elaboration_Code unless the pragma
7391 appears in the main unit).
7392
7393 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7394
7395 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
7396 that with clause has already been analyzed before checking kind
7397 of with_clause.
7398
7399 2015-01-06 Robert Dewar <dewar@adacore.com>
7400
7401 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
7402 (as required by RM).
7403
7404 2015-01-06 Arnaud Charlet <charlet@adacore.com>
7405
7406 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
7407
7408 2015-01-06 Robert Dewar <dewar@adacore.com>
7409
7410 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
7411 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
7412
7413 2015-01-06 Javier Miranda <miranda@adacore.com>
7414
7415 * exp_disp.adb (Expand_Interface_Conversion): No displacement
7416 of the pointer to the object needed when the type of the operand
7417 is not an interface type and the interface is one of its parent
7418 types (since they share the primary dispatch table).
7419
7420 2015-01-06 Vincent Celier <celier@adacore.com>
7421
7422 * prj-env.adb: Minor comment update.
7423
7424 2015-01-06 Javier Miranda <miranda@adacore.com>
7425
7426 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
7427 access types whose target type is an interface type to operands
7428 that are access types; required to report an error when the
7429 operand is not an access type.
7430
7431 2015-01-06 Bob Duff <duff@adacore.com>
7432
7433 * a-cfinve.adb (Copy): Set the discriminant to the Length when
7434 Capacity = 0.
7435 * a-cofove.ads (Capacity): Add a postcondition.
7436 * a-cfinve.ads (Capacity): Add a postcondition.
7437 (Reserve_Capacity): Correct the postcondition in the case where
7438 Capacity = 0; that means "Capacity => Length (Container)".
7439 * a-cofove.adb (Elems[c]): Add a comment
7440 explaining the dangers and how to avoid them.
7441
7442 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7443
7444 * sem_ch12.adb: Code clean up.
7445
7446 2015-01-06 Arnaud Charlet <charlet@adacore.com>
7447
7448 * gnatvsn.ads: Bump copyright year.
7449
7450 2015-01-06 Robert Dewar <dewar@adacore.com>
7451
7452 * s-taskin.ads, s-traces.ads: Minor reformatting.
7453 * exp_util.adb: Minor typo fix.
7454
7455 2015-01-06 Vincent Celier <celier@adacore.com>
7456
7457 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
7458 with the runtime name.
7459 * prj-env.adb (Initialize_Default_Project_Path): When both
7460 Target_Name and Runtime_Name are not empty string, add to the
7461 project path the two directories .../lib/gnat and .../share/gpr
7462 related to the runtime.
7463 * prj-env.ads (Initialize_Default_Project_Path): New String
7464 parameter Runtime_Name, defaulted to the empty string.
7465
7466 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
7467
7468 * frontend.adb: Guard against the case where a configuration
7469 pragma may be split into multiple pragmas and the original
7470 rewritten as a null statement.
7471 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
7472 pragma using Insert_Before rather than Insert_Action. This
7473 takes care of the configuration pragma case where Insert_Action
7474 would fail.
7475
7476 2015-01-06 Bob Duff <duff@adacore.com>
7477
7478 * a-coboho.ads (Element_Access): Add "pragma
7479 No_Strict_Aliasing (Element_Access);". This is needed because
7480 we are unchecked-converting from Address to Element_Access.
7481 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
7482 result to be 1.
7483
7484 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
7485
7486 * sem_res.adb (Resolve_Actuals): Remove the
7487 restriction which prohibits volatile actual parameters with
7488 enabled external propery Async_Writers to act appear in procedure
7489 calls where the corresponding formal is of mode OUT.
7490
7491 2015-01-05 Jakub Jelinek <jakub@redhat.com>
7492
7493 * gnat_ugn.texi: Bump @copying's copyright year.
7494
7495 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
7496
7497 PR ada/64492
7498 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
7499
7500 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
7501
7502 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
7503 of unchecked asprintf.
7504
7505 \f
7506 Copyright (C) 2015 Free Software Foundation, Inc.
7507
7508 Copying and distribution of this file, with or without modification,
7509 are permitted in any medium without royalty provided the copyright
7510 notice and this notice are preserved.