decl.c (gnat_to_gnu_entity): Do not make a function returning an unconstrained type...
[gcc.git] / gcc / ada / ChangeLog
1 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2
3 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
4 a function returning an unconstrained type 'const' for the middle-end.
5
6 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
7 exact condition to detect Reason => "..." pattern.
8
9 2015-03-31 Tom de Vries <tom@codesourcery.com>
10
11 PR ada/65490
12 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
13 bzero call is the same expression as the destination'.
14
15 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
16
17 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
18
19 2015-03-24 Gary Dismukes <dismukes@adacore.com>
20
21 * sem_ch3.adb: Minor typo fix (missing paren).
22
23 2015-03-24 Robert Dewar <dewar@adacore.com>
24
25 * sinfo.ads: Update comment.
26
27 2015-03-24 Robert Dewar <dewar@adacore.com>
28
29 * exp_attr.adb: Add entry for typ'Deref.
30 * sem_attr.adb (Deref): New GNAT attribute.
31 * sem_attr.ads: Add entry for new GNAT attribute Deref.
32 * snames.ads-tmpl: Add entries for new attribute Deref.
33
34 2015-03-24 Ed Schonberg <schonberg@adacore.com>
35
36 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
37 on generic type.
38
39 2015-03-24 Gary Dismukes <dismukes@adacore.com>
40
41 * inline.adb: Minor typo fix.
42
43 2015-03-24 Arnaud Charlet <charlet@adacore.com>
44
45 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
46 doc/gnat_ugn/gnat_utility_programs.rst
47 doc/gnat_rm/implementation_defined_attributes.rst
48 doc/gnat_rm/implementation_defined_pragmas.rst
49 doc/gnat_rm/representation_clauses_and_pragmas.rst
50 doc/gnat_rm/about_this_guide.rst
51 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
52 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
53
54 2015-03-23 Jakub Jelinek <jakub@redhat.com>
55
56 PR bootstrap/65522
57 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
58
59 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
60
61 PR ada/65451
62 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
63 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
64
65 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
66
67 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
68
69 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
70 of the expression ends up being composite.
71
72 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
73
74 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
75 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
76 parameter types to detect circularities in ASIS mode.
77 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
78
79 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
80
81 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
82 short-circuit the regular handling.
83
84 2015-03-13 Robert Dewar <dewar@adacore.com>
85
86 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
87 references.
88 (Actual_Ref): New function.
89 (AREC_String): Minor reformatting.
90 (Unnest_Subprogram): Use Actual_Ref.
91 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
92 before call to Instantiate_Bodies.
93
94 2015-03-13 Ed Schonberg <schonberg@adacore.com>
95
96 * freeze.adb (Freeze_Profile): If the return type of a function
97 being frozen is an untagged limited view and the function is
98 abstract, mark the type as frozen because there is no later
99 point at which the profile of the subprogram will be elaborated.
100
101 2015-03-13 Robert Dewar <dewar@adacore.com>
102
103 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
104 component to entities. Add new fields Field36-41 and Node36-41.
105
106 2015-03-13 Claire Dross <dross@adacore.com>
107
108 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
109
110 2015-03-13 Robert Dewar <dewar@adacore.com>
111
112 * exp_util.adb (Is_Volatile_Reference): Compile time known
113 value is never considered to be a volatile reference.
114
115 2015-03-13 Robert Dewar <dewar@adacore.com>
116
117 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
118 cannot be volatile" for internally generated object (such as
119 FIRST and LAST constants).
120
121 2015-03-13 Ed Schonberg <schonberg@adacore.com>
122
123 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
124 convention is specified for the formal parameter, verify that
125 the actual has the same convention.
126 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
127 pragma to be set on a generic formal type.
128 * sem_util.adb (Set_Convention): Ignore within an instance,
129 as it has already been verified in the generic unit.
130
131 2015-03-13 Claire Dross <dross@adacore.com>
132
133 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
134 subprograms with unconstrained record parameters containing
135 Itype declarations.
136 * sinfo.ads Document GNATprove assumption that type should match
137 in the AST.
138 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
139 Do not check for Refined_Depends and Refined_Globals contracts
140 as they are optional.
141
142 2015-03-13 Ed Schonberg <schonberg@adacore.com>
143
144 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
145 capture dimension info if any, because the generated subtype
146 declaration does not come from source and will not process dimensions.
147 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
148 Do not analyze expressions with an initialization procedure
149 because aggregates will have been checked at the point of record
150 declaration.
151
152 2015-03-13 Robert Dewar <dewar@adacore.com>
153
154 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
155 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
156 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
157 * snames.ads-tmpl: Add entry for Name_Unimplemented.
158
159 2015-03-13 Gary Dismukes <dismukes@adacore.com>
160
161 * style.adb (Missing_Overriding): Apply the
162 Comes_From_Source test to the Original_Node of the subprogram
163 node, to handle the case of a null procedure declaration that
164 has been rewritten as an empty procedure body.
165
166 2015-03-13 Robert Dewar <dewar@adacore.com>
167
168 * exp_util.ads: Minor fix to comment.
169 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
170 change.
171
172 2015-03-13 Robert Dewar <dewar@adacore.com>
173
174 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
175 Is_Low/High_Bound params.
176 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
177 sequence to simplify generation of FIRST/LAST temps for bounds.
178
179 2015-03-12 Olivier Hainque <hainque@adacore.com>
180
181 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
182 On targets where a function symbol designates a function descriptor,
183 fetch the function code address from the descriptor.
184 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
185
186 2015-03-04 Robert Dewar <dewar@adacore.com>
187
188 * sem_warn.adb: Minor reformatting.
189 * init.c: Minor tweaks.
190
191 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
192
193 * a-coinho-shared.adb: Fix clear of already empty holder.
194
195 2015-03-04 Robert Dewar <dewar@adacore.com>
196
197 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
198 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
199 (Note_Uplevel_Reference): Ignore call inside generic.
200 (Note_Uplevel_Reference): Fix check for no entity field.
201 (Unnest_Subprogram): Ignore call inside generic.
202 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
203 (Visit_Node): Ignore calls to Imported subprograms.
204 (Visit_Node): Fix problem in finding subprogram body in some cases.
205 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
206
207 2015-03-04 Robert Dewar <dewar@adacore.com>
208
209 * einfo.adb (Is_ARECnF_Entity): Removed.
210 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
211 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
212 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
213 (Number_Entries): Minor reformatting.
214 * einfo.ads (Is_ARECnF_Entity): Removed.
215 * exp_unst.adb (Unnest_Subprogram): Remove setting of
216 Is_ARECnF_Entity.
217 (Add_Extra_Formal): Use normal Extra_Formal circuit.
218 * sprint.adb (Write_Param_Specs): Properly handle case where
219 there are no source formals, but we have at least one Extra_Formal
220 present.
221
222 2015-03-04 Ed Schonberg <schonberg@adacore.com>
223
224 * sem_aggr.adb (Resolve_Record_Aggregate,
225 Add_Discriminant_Values): If the value is a reference to the
226 current instance of an enclosing type, use its base type to check
227 against prefix of attribute reference, because the target type
228 may be otherwise constrained.
229
230 2015-03-04 Robert Dewar <dewar@adacore.com>
231
232 * atree.h: Add entries for Flag287-Flag309.
233 * einfo.adb: Add (unused) flags Flag287-Flag309.
234
235 2015-03-04 Ed Schonberg <schonberg@adacore.com>
236
237 * sem_util.adb (Collect_Interfaces, Collect): When gathering
238 interfaces of ancestors, handle properly a subtype of a private
239 extension.
240
241 2015-03-04 Robert Dewar <dewar@adacore.com>
242
243 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
244 (Next_Formal): Don't return ARECnF formal.
245 (Last_Formal): Don't consider ARECnF formal.
246 (Next_Formal_With_Extras): Do consider ARECnF formal.
247 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
248 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
249
250 2015-03-04 Javier Miranda <miranda@adacore.com>
251
252 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
253 object is a class-wide interface object and we generate the
254 accessibility described in RM 6.5(8/3) then displace the pointer
255 to the object to reference the base of the object (to get access
256 to the TSD of the object).
257
258 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
259
260 * sem_prag.adb (Analyze_Abstract_State): Use routine
261 Malformed_State_Error to issue general errors.
262 (Analyze_Pragma): Diagnose a syntax error related to a state
263 declaration with a simple option.
264 (Malformed_State_Error): New routine.
265
266 2015-03-04 Robert Dewar <dewar@adacore.com>
267
268 * a-strsup.adb (Super_Slice): Deal with super flat case.
269 * einfo.ads: Minor reformatting.
270 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
271 redundant code.
272
273 2015-03-04 Claire Dross <dross@adacore.com>
274
275 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
276 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
277 containers.
278
279 2015-03-04 Ed Schonberg <schonberg@adacore.com>
280
281 * sem_warn.adb (Check_References): When checking for an unused
282 in-out parameter of a class- wide type, use its type to determine
283 whether it is private, in order to avoid a spurious warning when
284 subprogram spec and body are in different units.
285
286 2015-03-04 Yannick Moy <moy@adacore.com>
287
288 * sem_attr.adb: Improve warning messages.
289
290 2015-03-04 Robert Dewar <dewar@adacore.com>
291
292 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
293 generic subprograms.
294 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
295 (Note_Uplevel_Reference): Ignore uplevel references to non-types
296 (Get_Level): Consider only subprograms, not blocks.
297 (Visit_Node): Set proper condition for generating ARECnF entity.
298 Ignore indirect calls. Ignore calls to subprograms
299 outside our nest.
300 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
301 (Add_Form_To_Spec): Properly set Last_Entity field.
302 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
303 Handle case of no uplevel refs in outer subprogram
304 Don't mark uplevel entities as aliased.
305 Don't deal with calls with no ARECnF requirement.
306
307 2015-03-04 Robert Dewar <dewar@adacore.com>
308
309 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
310 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
311 operation in computing LZ.
312 * sem_attr.adb: Minor typo fix
313
314 2015-03-04 Robert Dewar <dewar@adacore.com>
315
316 * exp_ch7.adb: Minor reformatting.
317 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
318 spec case.
319 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
320
321 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
322
323 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
324 references to formal parameters subject to pragma Unreferenced.
325 (Suppress_Reference): New routine.
326 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
327 of attribute 'Old. Attributes 'Old and 'Result now share
328 common processing.
329 (Analyze_Old_Result_Attribute): New routine.
330 (Check_Placement_In_Check): Removed.
331 (Check_Placement_In_Contract_Cases): Removed.
332 (Check_Placement_In_Test_Case): Removed.
333 (Check_Use_In_Contract_Cases): Removed.
334 (Check_Use_In_Test_Case): Removed.
335 (In_Refined_Post): Removed.
336 (Is_Within): Removed.
337 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
338 (Check_Low_Bound_Tested_For): New routine.
339
340 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
341
342 * exp_ch3.adb (Expand_N_Object_Declaration):
343 Generate a runtime check to test the expression of pragma
344 Default_Initial_Condition when the object is default initialized.
345
346 2015-03-02 Robert Dewar <dewar@adacore.com>
347
348 * scng.adb (Scan): Ignore illegal character in relaxed
349 semantics mode.
350
351 2015-03-02 Ed Schonberg <schonberg@adacore.com>
352
353 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
354 on left operand, so it can be properly resolved with type of
355 alternatives of right operand.
356 * sem_res.adb (Resolve_Set_Membership): Handle properly an
357 overloaded left-hand side when the alternatives on the right
358 hand side are literals of some universal type. Use first
359 non-overloaded alternative to find expected type.
360
361 2015-03-02 Ed Schonberg <schonberg@adacore.com>
362
363 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
364 type to retrieve designated type, because the purported access
365 type may be a partial (private) view, when it is declared in
366 the private part of a nested package, and finalization actions
367 are generated when completing compilation of enclosing unit.
368
369 2015-03-02 Robert Dewar <dewar@adacore.com>
370
371 * back_end.adb (Call_Back_End): Remove previous patch,
372 the back end now gets to see the result of -gnatd.1
373 (Unnest_Subprogram_Mode) processing.
374 * elists.ads, elists.adb (List_Length): New function.
375 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
376 * sem_util.adb (Check_Nested_Access): Handle formals in
377 Unnest_Subprogram_Mode.
378 (Adjust_Named_Associations): Minor reformatting.
379 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
380 for parameters.
381
382 2015-03-02 Robert Dewar <dewar@adacore.com>
383
384 * atree.ads, atree.adb (Uint24): New function
385 (Set_Uint24): New procedure.
386 * atree.h (Uint24): New macro for field access.
387 * back_end.adb (Call_Back_End): For now, don't call back end
388 if unnesting subprogs.
389 * einfo.adb (Activation_Record_Component): New field
390 (Subps_Index): New field.
391 * einfo.ads (Activation_Record_Component): New field
392 (Subps_Index): New field Minor reordering of comments into alpha order.
393 * exp_unst.ads, exp_unst.adb: Continued development.
394
395 2015-03-02 Gary Dismukes <dismukes@adacore.com>
396
397 * exp_disp.ads: Minor reformatting.
398
399 2015-03-02 Ed Schonberg <schonberg@adacore.com>
400
401 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
402 ancestor to list of use clauses active in descendant unit if we
403 are within the private part of an intervening parent, to prevent
404 circularities in use clause list.
405
406 2015-03-02 Javier Miranda <miranda@adacore.com>
407
408 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
409 invariants to the corresponding record type.
410 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
411 which sets the value of the DTC_Entity associated with a given
412 primitive of a tagged type and propagates the value to the
413 wrapped subprogram.
414 (Set_DTC_Entity_Value): Propagate the DTC
415 value to the wrapped entity.
416 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
417 associated with invariants of progenitors.
418 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
419 of parents and progenitors.
420 (Process_Full_View): Check hidden inheritance of class-wide type
421 invariants.
422 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
423 the invariant procedure for interface types; build the invariant
424 procedure for tagged types inheriting invariants from their
425 progenitors.
426 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
427 types but do not build their invariant procedure since their
428 invariants will be propagated to the invariant procedure of
429 types covering the interface.
430 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
431 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
432 by calls to Set_DT_Position_Value.
433
434 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
435
436 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
437 code in Denote_Same_Function. Do not analyze attribute 'Result
438 when it is inside procedure _Postconditions. Remove a misplaced
439 warning diagnostic. Code cleanup.
440 (Denote_Same_Function): New routine.
441 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
442 cleanup. Warn on pre/postconditions on an inlined subprogram.
443 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
444 an inlined subprogram.
445 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
446 pre/post condition on an inlined subprogram.
447 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
448 pre/postconditions on an inlined subprogram.
449 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
450
451 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
452
453 * sem_prag.adb (Ensure_Aggregate_Form):
454 Ensure that the name denoted by the Chars of a pragma argument
455 association has the proper Sloc when converted into an aggregate.
456
457 2015-03-02 Bob Duff <duff@adacore.com>
458
459 * sem_ch6.adb (Check_Private_Overriding): Capture
460 Incomplete_Or_Partial_View in a constant. This is cleaner and
461 more efficient.
462
463 2015-03-02 Gary Dismukes <dismukes@adacore.com>
464
465 * einfo.ads, exp_unst.ads: Minor reformatting.
466
467 2015-03-02 Ed Schonberg <schonberg@adacore.com>
468
469 * a-strsea.adb (Find_Token): Ensure that the range of iteration
470 does not perform any improper character access. This prevents
471 erroneous access in the unusual case of an empty string target
472 and a From parameter less than Source'First.
473
474 2015-03-02 Robert Dewar <dewar@adacore.com>
475
476 * elists.adb (List_Length): Fix incorrect result.
477
478 2015-03-02 Bob Duff <duff@adacore.com>
479
480 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
481 checks here. It used to check that the function is merely
482 overriding SOMEthing. Now it checks that the function is
483 overriding a corresponding public operation. This is a correction
484 to the implementation of the rule in RM-3.9.3(10).
485
486 2015-03-02 Robert Dewar <dewar@adacore.com>
487
488 * debug.adb: Document new debug flag -gnatd.1.
489 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
490 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
491 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
492 * elists.ads elists.adb (List_Length): New function.
493 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
494 when appropriate (Process_Preconditions): Minor code
495 reorganization and reformatting
496 * exp_unst.ads, exp_unst.adb: New files.
497 * gnat1drv.adb (Adjust_Global_Switches): Set
498 Unnest_Subprogram_Mode if -gnatd.1
499 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
500 string argument.
501 * opt.ads (Unnest_Subprogram_Mode): New flag.
502 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
503 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
504 Has_Nested_Subprogram flag.
505 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
506 Check_Nested_Access.
507 (Find_Selected_Component): Minor comment addition.
508 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
509 (Note_Possible_Modification): New calling sequence for
510 Check_Nested_Access.
511 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
512 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
513
514 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
515
516 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
517 types, preserve the original type and create copies just like the C
518 front-end does. For artificial ones, do not define a name for
519 the original type.
520 (create_type_decl): When gnat_pushdecl made the input type the
521 original type for the new declaration, do not define a stub
522 declaration for it.
523 * gcc-interface/utils2.c (build_binary_op): Accept two different
524 pointer types when they point to the same type.
525
526 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
527
528 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
529 an unanalyzed node.
530 * sem_util.adb (Kill_Current_Values): Do not invalidate and
531 de-null a constant.
532
533 2015-03-02 Robert Dewar <dewar@adacore.com>
534
535 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
536 reformatting.
537
538 2015-03-02 Ed Schonberg <schonberg@adacore.com>
539
540 * sem_ch8.adb: extend use of Available_Subtype.
541
542 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
543
544 * sem_prag.adb (Duplication_Error): Remove the special handling
545 of 'Class or _Class in the context of pre/postconditions.
546 (Process_Class_Wide_Condition): Remove the special handling of
547 'Class or _Class in the context of pre/postconditions.
548 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
549 and Post_Class no longer need to be converted to _Pre and _Post.
550 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
551 on usage.
552
553 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
554
555 * exp_ch6.adb (Process_Preconditions): Modify the
556 mechanism that find the first source declaration to correct exit
557 the loop once it has been found.
558
559 2015-03-02 Gary Dismukes <dismukes@adacore.com>
560
561 * a-strsea.adb: Minor typo fix.
562
563 2015-03-02 Bob Duff <duff@adacore.com>
564
565 * einfo.ads: Minor comment fixes.
566
567 2015-03-02 Gary Dismukes <dismukes@adacore.com>
568
569 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
570
571 2015-03-02 Ed Schonberg <schonberg@adacore.com>
572
573 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
574 is defined for the array type, use it instead of a Default_Value
575 specified for the component type itself.
576
577 2015-03-02 Thomas Quinot <quinot@adacore.com>
578
579 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
580 expanding a 'Input attribute reference for a class-wide type,
581 do not generate a separate object declaration for the controlling
582 tag dummy object; instead, generate the expression inline in the
583 dispatching call. Otherwise, the declaration (which involves a
584 call to String'Input, returning a dynamically sized value on the
585 secondary stack) will be expanded outside of proper secondary
586 stack mark/release operations, and will thus cause a secondary
587 stack leak.
588
589 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
590
591 * checks.adb (Add_Validity_Check): Change the names of all
592 formal parameters to better illustrate their purpose. Update
593 the subprogram documentation. Update all occurrences of the
594 formal parameters. Generate a pre/postcondition pragma by
595 calling Build_Pre_Post_Condition.
596 (Build_PPC_Pragma): Removed.
597 (Build_Pre_Post_Condition): New routine.
598 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
599 is now used as Postconditions_Proc. Flag240 is now renamed to
600 Has_Expanded_Contract. (First_Formal): The routine can now
601 operate on generic subprograms.
602 (First_Formal_With_Extras): The routine can now operate on generic
603 subprograms.
604 (Has_Expanded_Contract): New routine.
605 (Has_Postconditions): Removed.
606 (Postcondition_Proc): Removed.
607 (Postconditions_Proc): New routine.
608 (Set_Has_Expanded_Contract): New routine.
609 (Set_Has_Postconditions): Removed.
610 (Set_Postcondition_Proc): Removed.
611 (Set_Postconditions_Proc): New routine.
612 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
613 the output of Has_Expanded_Contract.
614 (Write_Field8_Name): Remove the output of Postcondition_Proc.
615 (Write_Field14_Name): Add the output of Postconditions_Proc.
616 * einfo.ads New attributes Has_Expanded_Contract and
617 Postconditions_Proc along with occurrences in entities.
618 Remove attributes Has_Postconditions and Postcondition_Proc
619 along with occurrences in entities.
620 (Has_Expanded_Contract): New routine along with pragma Inline.
621 (Has_Postconditions): Removed along with pragma Inline.
622 (Postcondition_Proc): Removed along with pragma Inline.
623 (Postconditions_Proc): New routine along with pragma Inline.
624 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
625 (Set_Has_Postconditions): Removed along with pragma Inline.
626 (Set_Postcondition_Proc): Removed along with pragma Inline.
627 (Set_Postconditions_Proc): New routine along with pragma Inline.
628 * exp_ch6.adb (Add_Return): Code cleanup. Update the
629 generation of the call to the _Postconditions routine of
630 the procedure. (Expand_Non_Function_Return): Reformat the
631 comment on usage. Code cleanup. Update the generation of
632 the call to the _Postconditions routine of the procedure or
633 entry [family].
634 (Expand_Simple_Function_Return): Update the
635 generation of the _Postconditions routine of the function.
636 (Expand_Subprogram_Contract): Reimplemented.
637 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
638 profile along the comment on usage.
639 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
640 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
641 wrapper when the entry [family] has a contract with
642 pre/postconditions.
643 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
644 (Expand_Contract_Cases): This routine and its subsidiaries now
645 analyze all generated code.
646 (Expand_Old_In_Consequence): Removed.
647 * sem_attr.adb Add with and use clause for Sem_Prag.
648 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
649 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
650 "Ensures".
651 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
652 a generic subprogram.
653 (Analyze_Object_Declaration): Do not create a contract node.
654 (Derive_Subprogram): Do not create a contract node.
655 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
656 not create a contract node.
657 (Analyze_Completion_Contract): New routine.
658 (Analyze_Function_Return): Alphabetize.
659 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
660 contract node. Do not copy pre/postconditions to the original
661 generic template.
662 (Analyze_Null_Procedure): Do not create a contract node.
663 (Analyze_Subprogram_Body_Contract): Reimplemented.
664 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
665 as having postconditions. Do not create a contract node. Analyze
666 the subprogram body contract of a body that acts as a compilation
667 unit. Expand the subprogram contract after the declarations have
668 been analyzed.
669 (Analyze_Subprogram_Contract): Reimplemented.
670 (Analyze_Subprogram_Specification): Do not create a contract node.
671 (List_Inherited_Pre_Post_Aspects): Code cleanup.
672 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
673 comment on usage.
674 (Analyze_Subprogram_Contract): Update the
675 parameter profile and the comment on usage.
676 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
677 contract node.
678 (Analyze_Package_Declaration): Do not create a
679 contract node.
680 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
681 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
682 contract node.
683 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
684 contract node.
685 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
686 their proper section and alphabetize them. Analyze the contract of
687 a [generic] subprogram after all Pragmas_After have been analyzed.
688 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
689 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
690 create a contract node.
691 (Analyze_Generic_Subprogram_Declaration):
692 Alphabetize local variables. Do not create a contract
693 node. Do not generate aspects out of pragmas for ASIS.
694 (Analyze_Subprogram_Instantiation): Instantiate
695 the contract of the subprogram. Do not create a
696 contract node. (Instantiate_Contract): New routine.
697 (Instantiate_Subprogram_Body): Alphabetize local variables.
698 (Save_Global_References_In_Aspects): New routine.
699 (Save_References): Do not save the global references found within
700 the aspects of a generic subprogram.
701 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
702 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
703 Original_Node for establishing linkages.
704 (Insert_Pragma): Insertion in a subprogram body takes precedence over
705 the case where the subprogram body is also a compilation unit.
706 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
707 Get_Argument to obtain the proper expression. Install the generic
708 formals when the related context is a generic subprogram.
709 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
710 the proper expression. Use Corresponding_Spec_Of to obtain
711 the spec. Install the generic formal when the related context
712 is a generic subprogram.
713 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
714 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
715 generic formal when the related context is a generic subprogram.
716 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
717 to obtain the proper expression. Remove the call to
718 Check_SPARK_Aspect_For_ASIS as the analysis is now done
719 automatically.
720 (Analyze_Pragma): Update all occurrences
721 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
722 Extensions_Visible, Global, Postcondition, Precondition and
723 Test_Case now carry generic templates when the related context
724 is a generic subprogram. The same pragmas are no longer
725 forcefully fully analyzed when the context is a subprogram
726 that acts as a compilation unit. Pragmas Abstract_State,
727 Initial_Condition, Initializes and Refined_State have been clean
728 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
729 and Precondition now use the same routine for analysis. Pragma
730 Refined_Post does not need to check the use of 'Result or
731 the lack of a post-state in its expression. Reimplement the
732 analysis of pragma Test_Case.
733 (Analyze_Pre_Post_Condition): New routine.
734 (Analyze_Pre_Post_Condition_In_Decl_Part):
735 Reimplemented.
736 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
737 proper expression.
738 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
739 the proper expression.
740 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
741 (Check_Pre_Post): Removed.
742 (Check_Precondition_Postcondition): Removed.
743 (Check_SPARK_Aspect_For_ASIS): Removed.
744 (Check_Test_Case): Removed.
745 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
746 to obtain the proper expression. Use Corresponding_Spec_Of to
747 find the proper spec.
748 (Create_Generic_Template): New routine.
749 (Duplication_Error): New routine.
750 (Expression_Function_Error): New routine.
751 (Find_Related_Subprogram_Or_Body): Moved to the spec
752 of Sem_Prag. Emit precise error messages. Account for cases of
753 rewritten expression functions, generic instantiations, handled
754 sequence of statements and pragmas from aspects.
755 (Get_Argument): New routine.
756 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
757 (Preanalyze_CTC_Args): Removed.
758 (Process_Class_Wide_Condition): New routine.
759 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
760 the parameter profile along with the comment on usage.
761 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
762 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
763 (Test_Case_Arg): New routine.
764 * sem_util.adb Add with and use clauses for Sem_Ch6.
765 (Add_Contract_Item): This routine now creates a contract
766 node the first time an item is added. Remove the duplicate
767 aspect/pragma checks.
768 (Check_Result_And_Post_State): Reimplemented.
769 (Corresponding_Spec_Of): New routine.
770 (Get_Ensures_From_CTC_Pragma): Removed.
771 (Get_Requires_From_CTC_Pragma): Removed.
772 (Has_Significant_Contract): New routine.
773 (Inherit_Subprogram_Contract): Inherit only if the source
774 has a contract.
775 (Install_Generic_Formals): New routine.
776 (Original_Aspect_Name): Removed.
777 (Original_Aspect_Pragma_Name): New routine.
778 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
779 (Corresponding_Spec_Of): New routine.
780 (Get_Ensures_From_CTC_Pragma): Removed.
781 (Get_Requires_From_CTC_Pragma): Removed.
782 (Has_Significant_Contract): New routine.
783 (Install_Generic_Formals): New routine.
784 (Original_Aspect_Name): Removed.
785 (Original_Aspect_Pragma_Name): New routine.
786 * sem_warn.adb Add with and use clauses for Sem_Prag.
787 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
788
789 2015-03-02 Ed Schonberg <schonberg@adacore.com>
790
791 * sem_ch8.adb (Available_Subtype): Optimization in
792 Find_Selected_Component: when safe, use existing subtype of
793 array component, possibly discriminant-dependent, rather than
794 creating new subtype declaration for it. In this fashion different
795 occurrences of the component have the same subtype, rather than
796 just equivalent ones. Simplifies value tracing in GNATProve.
797
798 2015-03-01 Arnaud Charlet <charlet@adacore.com>
799
800 PR ada/65259
801
802 * doc/gnat_ugn/gnat_project_manager.rst,
803 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
804 image, too troublesome with texi format.
805 * gnat_ugn.texi: Regenerate.
806
807 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
808
809 PR libgomp/64625
810 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
811 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
812 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
813
814 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
815
816 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
817 arguments parameter.
818 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
819
820 2015-02-22 Arnaud Charlet <charlet@adacore.com>
821
822 * doc/Makefile: postprocess texinfo files to update @dircategory
823 and update texi files under gcc/ada.
824 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
825
826 2015-02-22 Arnaud Charlet <charlet@adacore.com>
827
828 * doc/gnat_ugn/project-manager-figure.png,
829 doc/gnat_ugn/rtlibrary-structure.png: New.
830
831 2015-02-22 Tom de Vries <tom@codesourcery.com>
832
833 PR ada/65100
834 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
835 @item, and fix warning '@itemize has text but no @item'.
836
837 2015-02-20 Ed Schonberg <schonberg@adacore.com>
838
839 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
840 legally applies to an abstract subprogram declaration.
841 * freeze.adb: Minor comment addition.
842
843 2015-02-20 Robert Dewar <dewar@adacore.com>
844
845 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
846 * erroutc.adb (Set_Msg_Str): Replace _xxx.
847 (Pre/Post/Type_Invariant) by xxx'Class.
848 * erroutc.ads (Set_Msg_Str): Replace _xxx.
849 (Pre/Post/Type_Invariant) by xxx'Class.
850 * sem_prag.adb (Fix_Error): Remove special casing of
851 Name_uType_Invariant.
852 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
853 Name_uPre and Name_uPost in aspect case (done in Errout now).
854
855 2015-02-20 Robert Dewar <dewar@adacore.com>
856
857 * g-alveop.adb: Minor style fixes.
858
859 2015-02-20 Robert Dewar <dewar@adacore.com>
860
861 * freeze.adb (Warn_Overlay): Guard against blow up with address
862 clause.
863
864 2015-02-20 Bob Duff <duff@adacore.com>
865
866 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
867 for the compiler to guess whether the call is internal or external --
868 it is always external.
869 (Expand_Access_To_Protected_Op): For P'Access, where P
870 is a protected subprogram, always create a pointer to the
871 External_Subprogram.
872
873 2015-02-20 Robert Dewar <dewar@adacore.com>
874
875 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
876
877 2015-02-20 Robert Dewar <dewar@adacore.com>
878
879 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
880 predicate for non-static subtype.
881 (Build_Predicate_Functions): Do not assume subtype associated with a
882 static predicate must be static.
883
884 2015-02-20 Robert Dewar <dewar@adacore.com>
885
886 * errout.adb (Set_Msg_Node): Better handling of internal names
887 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
888 * errout.ads: Document additional case of message deletion.
889 * namet.adb (Is_Internal_Name): Refined to consider wide
890 strings in brackets notation and character literals not to be
891 internal names.
892 * sem_ch8.adb (Find_Selected_Component): Give additional error
893 when selector name is a subprogram whose first parameter has
894 the same type as the prefix, but that type is untagged.
895
896 2015-02-20 Robert Dewar <dewar@adacore.com>
897
898 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
899
900 2015-02-20 Tristan Gingold <gingold@adacore.com>
901
902 * opt.ads (GNAT_Mode_Config): New variable.
903 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
904 to set Assertions_Enabled.
905 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
906 for -gnatg.
907
908 2015-02-20 Robert Dewar <dewar@adacore.com>
909
910 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
911 comment regarding the handling of unterminated fixed-point
912 constants.
913 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
914 corresponding to those previously added for
915 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
916
917 2015-02-20 Olivier Hainque <hainque@adacore.com>
918
919 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
920
921 2015-02-20 Robert Dewar <dewar@adacore.com>
922
923 * sem_prag.adb: Minor comment clarification.
924
925 2015-02-20 Olivier Hainque <hainque@adacore.com>
926
927 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
928 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
929 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
930 (vec_ctf): Now renamings as well.
931
932 2015-02-20 Robert Dewar <dewar@adacore.com>
933
934 * switch-c.adb, bindgen.adb: Minor reformatting.
935
936 2015-02-20 Ed Schonberg <schonberg@adacore.com>
937
938 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
939 Invariant'class is allowed on an abstract type.
940
941 2015-02-20 Ed Schonberg <schonberg@adacore.com>
942
943 * sem_ch3.adb (Access_Definition): If the access definition is
944 for a protected component and defines an access to protected
945 subprogram, do not create an itype reference for it because a
946 full type declaration will be built in order to generate the
947 proper equivalent type.
948 (Analyze_Subtype_Declaration): Add information of incomplete
949 subtypes, for Ada 2012 extended uses of incomplete types.
950
951 2015-02-20 Gary Dismukes <dismukes@adacore.com>
952
953 * sem_res.adb: Minor reformatting.
954
955 2015-02-20 Vincent Celier <celier@adacore.com>
956
957 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
958 path name for several switches --RTS, use the normalized path
959 names.
960
961 2015-02-20 Vincent Celier <celier@adacore.com>
962
963 * bindgen.adb: Minor reformatting and code reorganization.
964
965 2015-02-20 Jose Ruiz <ruiz@adacore.com>
966
967 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
968 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
969 defined by Ada 2012.
970
971 2015-02-20 Arnaud Charlet <charlet@adacore.com>
972
973 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
974 obsolete references to RTX, nucleus, VMS.
975
976 2015-02-20 Ed Schonberg <schonberg@adacore.com>
977
978 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
979 aspect, use name that mentions Class explicitly, rather than
980 compiler-internal name.
981
982 2015-02-20 Robert Dewar <dewar@adacore.com>
983
984 * debug.adb: Add documentation for -gnatd.2 (allow statements
985 in decl sequences).
986 * par-ch3.adb (P_Identifier_Declarations): Handle
987 statement appearing where declaration expected more cleanly.
988 (Statement_When_Declaration_Expected): Implement debug flag
989 -gnatd.2.
990
991 2015-02-20 Jose Ruiz <ruiz@adacore.com>
992
993 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
994 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
995 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
996 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
997 defined by Ada 2005.
998 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
999 This is the correct name for the dispatching policy (FIFO was
1000 missing).
1001
1002 2015-02-20 Javier Miranda <miranda@adacore.com>
1003
1004 * sem_res.adb (Resolve_Type_Conversion): If the type of the
1005 operand is the limited-view of a class-wide type then recover
1006 the class-wide type of the non-limited view.
1007
1008 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1009
1010 * gcc-interface/Makefile.in: Remove references to nucleus.
1011 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
1012 extern_flag to true for Inline_Always subprograms with
1013 Intrinsic convention.
1014
1015 2015-02-20 Yannick Moy <moy@adacore.com>
1016
1017 * sem_prag.ads: Minor typo in comment.
1018
1019 2015-02-20 Pascal Obry <obry@adacore.com>
1020
1021 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
1022
1023 2015-02-20 Vincent Celier <celier@adacore.com>
1024
1025 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
1026 if it exists.
1027
1028 2015-02-20 Robert Dewar <dewar@adacore.com>
1029
1030 * sem_eval.ads: Minor reformatting.
1031
1032 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1033
1034 * freeze.adb (Size_Known): Do not set the packed size for
1035 independent type or component.
1036 (Freeze_Array_Type): Check for Independent[_Components] with packing
1037 or explicit component size clause.
1038 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
1039 of independence pragmas only for non-GCC back-ends.
1040 * sem_ch13.adb (Initialize): Likewise for the initialization.
1041 * sem_prag.adb (Record_Independence_Check): New procedure to record an
1042 independence check in the table.
1043 (Analyze_Pragma): Use it throughout instead of doing it manually.
1044 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
1045 independent type or component.
1046
1047 2015-02-20 Thomas Quinot <quinot@adacore.com>
1048
1049 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
1050 struct direct and readdir. This is required for NFS filesystems
1051 mounted from servers that use 64-bit cookies.
1052
1053 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1054
1055 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
1056 Build_Subprogram_Renaming, to create renaming of subprogram
1057 instance in the the declaration of the wrapper package rather
1058 than in its body, so that it is available for analysis of aspects
1059 propagated from generic to instantiation.
1060 (Check_Mismatch): An actual for a formal package that is an
1061 incomplete type matches a formal type that is incomplete.
1062 (Instantiate_Package_Body): Move code that builds subprogram
1063 renaming to Analyze_Subprogram_Instantiation.
1064 (Instantiate_Type): The generated subtype is a limited view if
1065 the actual is a limited view.
1066 (Load_Parent_Of_Generic): Retrieve instance declaration from
1067 its new position within wrapper package.
1068
1069 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1070
1071 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
1072
1073 2015-02-20 Robert Dewar <dewar@adacore.com>
1074
1075 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
1076 issue of negative arguments.
1077
1078 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1079
1080 * gnat1drv.adb: Minor consistency fix.
1081
1082 2015-02-20 Pascal Obry <obry@adacore.com>
1083
1084 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
1085 paths.
1086
1087 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1088
1089 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
1090 renamings.
1091 * exp_ch6.adb (Expand_Call): Use back-end inlining
1092 instead of expansion for simple subprogram renamings.
1093
1094 2015-02-20 Robert Dewar <dewar@adacore.com>
1095
1096 * exp_util.adb: Minor reformatting.
1097
1098 2015-02-20 Vincent Celier <celier@adacore.com>
1099
1100 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
1101 is specified several times with different values that indicates
1102 the same runtime directory.
1103
1104 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1105
1106 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
1107 handle properly illegal uses of attributes on prefixes on an
1108 incomplete type, both when the type of the prefix is locally
1109 incomplete, and when it is a limited view of a type whose
1110 non-limited view is not available.
1111 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
1112 'Address and others.
1113
1114 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1115
1116 * exp_ch6.adb: Fix minor typo in comment.
1117
1118 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1119
1120 * sinfo.ads: Add comment.
1121
1122 2015-02-20 Olivier Hainque <hainque@adacore.com>
1123
1124 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
1125 flags controlling the actual FE inlining out of pragma Inline
1126 and pragma Inline_Always.
1127 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
1128 on -fno-inline, which disables all inlining in compilers with
1129 an Ada back-end and without back-end inlining support.
1130 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
1131 flag to True on -fno-inline and leave Inline_Always alone for
1132 gcc back-ends.
1133 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
1134 names of the Opt flags it sets.
1135 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
1136 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
1137 * sem_prag.adb (Make_Inline): Remove early return conditioned
1138 on Opt.Suppress_All_Inlining.
1139 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
1140 disable the calls to Build_Body_To_Inline otherwise triggered
1141 by pragma Inline or Inline_Always. This will prevent actual
1142 front-end inlining of the subprogram on calls.
1143
1144 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1145
1146 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
1147 Abort_Undefer_Direct function.
1148 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
1149 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
1150 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
1151 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
1152 Add_Inlined_Body.
1153 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
1154 Remove call to Register_Backend_Call and move code resetting
1155 Needs_Debug_Info on inlined subprograms to...
1156 * inline.ads (Add_Inlined_Body): Add N parameter.
1157 (Register_Backend_Call): Delete.
1158 * inline.adb (Add_Inlined_Body): ...here and simplify.
1159 Register the call with Backend_Calls directly.
1160 (Register_Backend_Call): Delete.
1161 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
1162
1163 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1164
1165 * s-stalib.ads: Fix typo.
1166
1167 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1168
1169 * exp_ch3.adb (Default_Initialize_Object): If the object has a
1170 delayed freeze, the actions associated with default initialization
1171 must be part of the freeze actions, rather that being inserted
1172 directly after the object declaration.
1173
1174 2015-02-20 Robert Dewar <dewar@adacore.com>
1175
1176 * lib-load.adb: Minor comment update.
1177
1178 2015-02-20 Vincent Celier <celier@adacore.com>
1179
1180 * prj-proc.adb (Process_Case_Construction): When there are
1181 incomplete withed projects and the case variable is unknown,
1182 skip the case construction.
1183
1184 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1185
1186 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
1187 when an actual is a view conversion, either because the call is
1188 to an inherited operation, or because the actual is an explicit
1189 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
1190
1191 2015-02-20 Robert Dewar <dewar@adacore.com>
1192
1193 * einfo.ads: Minor comment updates Fix missing pragma Inline
1194 for Set_Partial_View_Has_Unknown_Discr.
1195 * einfo.adb (Write_Entity_Flags): Add missing entry for
1196 Partial_View_Has_Unknown_Discr.
1197 * sem_ch3.adb: Minor reformatting.
1198
1199 2015-02-20 Vincent Celier <celier@adacore.com>
1200
1201 * opt.ads: Minor cleanup: remove mention of gprmake.
1202 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
1203 * s-tataat.adb: Do not call System.Tasking.Self but directly
1204 System.Task_Primitives.Operations.Self.
1205
1206 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1207
1208 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
1209 sphinx in the doc directory.
1210 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
1211
1212 2015-02-20 Robert Dewar <dewar@adacore.com>
1213
1214 * sem_res.adb: Minor reformatting.
1215 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
1216 building spec.
1217 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
1218 aspects from circuitry setting delay required to false if the
1219 argument is an integer literal.
1220
1221 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1222
1223 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
1224 on type entities, to enforce AI12-0133: default initialization
1225 of types whose partial view has unknown discriminants does not
1226 get an invariant check, because clients of the unit can never
1227 declare objects of such types.
1228 * sem_ch3.adb (Find_Type_Name); Set new flag
1229 Partial_View_Has_Unknown_Discr when needed.
1230 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
1231 generation of invariant call on default-initialized object.
1232
1233 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1234
1235 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
1236 if the parameter either is passed by reference or if the alignment
1237 would be lowered.
1238
1239 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1240
1241 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
1242 detect primitive operations of tagged and untagged types.
1243
1244 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1245
1246 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
1247 sets in presence of derivation for subprogram types.
1248
1249 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1250
1251 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
1252 present in the same context as the declaration.
1253
1254 2015-02-07 Jakub Jelinek <jakub@redhat.com>
1255
1256 PR middle-end/64340
1257 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
1258 and optimization_current_node after tweaking global_options.
1259
1260 2015-02-05 Robert Dewar <dewar@adacore.com>
1261
1262 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
1263 prj-nmsc.adb: Minor reformatting.
1264
1265 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1266
1267 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
1268 of a protected type may not be available, so to check conformance
1269 with an interface type, examine the interface list in the type
1270 declaration directly.
1271 (Write_Overloads): Improve information for indirect calls,
1272 for debugger use.
1273
1274 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1275
1276 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
1277 expansion activity in ASIS mode.
1278
1279 2015-02-05 Javier Miranda <miranda@adacore.com>
1280
1281 * errout.adb (Error_Msg_PT): Add missing error.
1282 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
1283 RM rule. Code cleanup.
1284 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
1285 anonymous access types. Found working on the tests. Code cleanup.
1286
1287 2015-02-05 Vincent Celier <celier@adacore.com>
1288
1289 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
1290 when there are incomplete withs.
1291 * prj-nmsc.adb (Process_Naming): Do not try to get the value
1292 of an element when it is nil.
1293 (Check_Naming): Do not check a nil suffix for illegality
1294 * prj-proc.adb (Expression): Do not process an empty term.
1295 * prj-strt.adb (Attribute_Reference): If attribute cannot be
1296 found, parse a possible index to avoid cascading errors.
1297
1298 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1299
1300 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
1301 for an access_to_subprogram declaration is not a derived type.
1302
1303 2015-02-05 Robert Dewar <dewar@adacore.com>
1304
1305 * errout.adb (Error_Msg_Internal): For non-serious error set
1306 Fatal_Error to Ignored.
1307 * lib-load.adb (Load_Unit): Minor comment updates.
1308 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
1309 setting from with'ed unit to with'ing unit.
1310 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
1311 of ambiguity.
1312
1313 2015-02-05 Yannick Moy <moy@adacore.com>
1314
1315 * sem_prag.adb, par-prag.adb: Minor code clean up.
1316
1317 2015-02-05 Yannick Moy <moy@adacore.com>
1318
1319 * par-prag.adb (Pragma_Warnings): Update for extended form
1320 of pragma Warnings. The "one" argument case may now have 2 or
1321 3 arguments.
1322 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
1323 extended form of pragma Warnings. Pragma with tool name is either
1324 rewritten as null or as an equivalent form without tool name,
1325 before reanalysis.
1326 * snames.ads-tmpl (Name_Gnatprove): New name.
1327
1328 2015-02-05 Robert Dewar <dewar@adacore.com>
1329
1330 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
1331 standard Boolean.
1332 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
1333 condition is standard Boolean, it can be non-standard derived
1334 Boolean.
1335
1336 2015-02-05 Robert Dewar <dewar@adacore.com>
1337
1338 * checks.adb (Enable_Range_Check): Disconnect attempted
1339 optimization for the case of range check for subscript of
1340 unconstrained array.
1341
1342 2015-02-05 Robert Dewar <dewar@adacore.com>
1343
1344 * par-ch13.adb (With_Present): New function
1345 (Aspect_Specifications_Present): Handle WHEN in place of WITH
1346 (Get_Aspect_Specifications): Comment update.
1347 * par.adb: Comment updates.
1348
1349 2015-02-05 Robert Dewar <dewar@adacore.com>
1350
1351 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
1352 * frontend.adb (Frontend): New setting of Fatal_Error.
1353 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
1354 Fatal_Error.
1355 (Load_Main_Source): New setting of Fatal_Error
1356 (Load_Unit): New setting of Fatal_Error.
1357 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
1358 Fatal_Error.
1359 (Ensure_System_Dependency): New setting of Fatal_Error.
1360 * lib.adb (Fatal_Error): New setting of Fatal_Error
1361 (Set_Fatal_Error): New setting of Fatal_Error.
1362 * lib.ads: New definition of Fatal_Error and associated routines.
1363 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
1364 * par-load.adb (Load): New setting of Fatal_Error.
1365 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
1366 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
1367 Fatal_Error.
1368 (Optional_Subunit): New setting of Fatal_Error.
1369 (Analyze_Proper_Body): New setting of Fatal_Error.
1370 (Load_Needed_Body): New setting of Fatal_Error.
1371
1372 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1373
1374 * sem_res.adb (Resolve_Call): If the function being called has
1375 out parameters do not check for language version if the function
1376 comes from a predefined unit, as those are always compiled in
1377 Ada 2012 mode.
1378
1379 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1380
1381 * sem_ch3.adb (Process_Full_View): Verify that the full view
1382 of a type extension must carry an explicit limited keyword if
1383 the partial view does (RM 7.3 (10.1)).
1384
1385 2015-02-05 Robert Dewar <dewar@adacore.com>
1386
1387 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
1388 sem_warn.ads: Minor reformatting.
1389 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
1390 deleted by -gnatI.
1391 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
1392 error for abstract type.
1393
1394 2015-02-05 Yannick Moy <moy@adacore.com>
1395
1396 * opt.ads (Warn_On_Suspicious_Contract): Update comment
1397 describing use.
1398 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
1399 suspicious uses of 'Update.
1400 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
1401 function issues warning on suspicious uses of 'Update.
1402 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
1403 package spec and body as SPARK_Mode Off.
1404
1405 2015-02-05 Robert Dewar <dewar@adacore.com>
1406
1407 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
1408 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
1409 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
1410 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1411 for exported entity.
1412
1413 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
1414
1415 * sem_prag.adb (Check_Pragma_Conformance): Add
1416 local variable Arg. Ensure that all errors are associated with
1417 the pragma if it appears without an argument. Add comments on
1418 various cases.
1419
1420 2015-02-05 Robert Dewar <dewar@adacore.com>
1421
1422 * lib-xref.adb: Minor reformatting.
1423
1424 2015-02-05 Tristan Gingold <gingold@adacore.com>
1425
1426 PR ada/64349da/64349
1427 * env.c: Fix thinko: handle Darwin case before default one.
1428
1429 2015-01-30 Robert Dewar <dewar@adacore.com>
1430
1431 * a-assert.adb: Minor reformatting.
1432 * sem_ch13.adb: Minor comment clarification.
1433 * types.ads: Minor comment update.
1434 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
1435 when we have a predicate that is nothing but an inherited dynamic
1436 predicate.
1437
1438 2015-01-30 Jerome Guitton <guitton@adacore.com>
1439
1440 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
1441 include cert link spec.
1442
1443 2015-01-30 Robert Dewar <dewar@adacore.com>
1444
1445 * einfo.ads: Minor comment fix.
1446 * freeze.adb (Freeze_Profile): Add test for suspicious import
1447 in pure unit.
1448 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
1449 use in Pure unit is now moved to Freeze (to properly catch
1450 Pure_Function exemption).
1451
1452 2015-01-30 Bob Duff <duff@adacore.com>
1453
1454 * sem_res.ads: Minor comment fix.
1455 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
1456 check both operands of an operator.
1457
1458 2015-01-30 Yannick Moy <moy@adacore.com>
1459
1460 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
1461 policy for Pre to Ignore.
1462 (Assert): Add precondition.
1463
1464 2015-01-30 Robert Dewar <dewar@adacore.com>
1465
1466 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
1467 Pure unit.
1468 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
1469 documentation for some special cases of invalid attempts at
1470 based integers.
1471
1472 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1473
1474 * errout.ads: Minor reformatting.
1475
1476 2015-01-30 Yannick Moy <moy@adacore.com>
1477
1478 * inline.adb (Process_Formals): Use the sloc of
1479 the inlined node instead of the sloc of the actual parameter,
1480 when replacing formal parameters by the actual one.
1481
1482 2015-01-30 Arnaud Charlet <charlet@adacore.com>
1483
1484 * g-expect.adb (Get_Command_Output): Use infinite timeout when
1485 calling Expect.
1486
1487 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1488
1489 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
1490 defaulted in an instantiation, add an entry in the list of actuals
1491 to indicate the default value of the formal (as is already done
1492 for defaulted subprograms).
1493
1494 2015-01-30 Javier Miranda <miranda@adacore.com>
1495
1496 * errout.adb (Error_Msg_PT): Minor error phrasing update.
1497
1498 2015-01-30 Robert Dewar <dewar@adacore.com>
1499
1500 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
1501 for object case.
1502
1503 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
1504
1505 * exp_dbug.adb (Get_Encoded_Name): When
1506 -fgnat-encodings=minimal, do not generate names for biased types.
1507
1508 2015-01-30 Tristan Gingold <gingold@adacore.com>
1509
1510 PR ada/64349
1511 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
1512
1513 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1514
1515 * freeze.adb: Minor reformatting.
1516
1517 2015-01-30 Javier Miranda <miranda@adacore.com>
1518
1519 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
1520 improve its documentation.
1521 * errout.adb (Error_Msg_PT): Improve the error message.
1522 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
1523 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
1524 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
1525
1526 2015-01-30 Robert Dewar <dewar@adacore.com>
1527
1528 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
1529 message for False case.
1530
1531 2015-01-30 Doug Rupp <rupp@adacore.com>
1532
1533 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
1534 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
1535 kernel.
1536
1537 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1538
1539 * sem_attr.adb (Declared_Within_Generic_Unit):
1540 New function to test whether an entity is declared within the
1541 declarative region of a given generic unit.
1542 (Resolve_Attribute): For checking legality of subprogram'Access within
1543 a generic unit, call new Boolean function Declared_Within_Generic_Unit
1544 instead of simply comparing the results of Enclosing_Generic_Unit on
1545 the prefix and access type. Correct minor comment typos.
1546
1547 2015-01-30 Robert Dewar <dewar@adacore.com>
1548
1549 * freeze.adb, exp_util.ads: Update comment.
1550 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
1551 * sem_util.adb: Minor: fix typo.
1552
1553 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
1554
1555 * sem_attr.adb (Analyze_Attribute): Ensure that
1556 the check concerning Refined_Post takes precedence over the
1557 other cases.
1558
1559 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1560
1561 * sem_prag.adb: Minor typo fixes and reformatting.
1562
1563 2015-01-30 Yannick Moy <moy@adacore.com>
1564
1565 * sem_attr.adb: Code clean up.
1566
1567 2015-01-30 Robert Dewar <dewar@adacore.com>
1568
1569 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
1570 * ali.ads (Unit_Record): Add new field Serious_Errors.
1571 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
1572 attribute in U line.
1573 * lib-writ.ads: New attribute SE (serious erors) in unit line.
1574
1575 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
1576
1577 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
1578 Lit_Indexes, Scale_Value, Storage_Size_Variable,
1579 String_Literal_Low_Bound along associated routines and
1580 Write_FieldX_Name.
1581 (Pending_Access_Types): New routine.
1582 (Set_Pending_Access_Types): New routine.
1583 (Write_Field15_Name): Add an entry for Pending_Access_Types.
1584 * einfo.ads Add new attribute Pending_Access_Types along
1585 with usage in nodes. Update the usage of attributes
1586 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
1587 Storage_Size_Variable, String_Literal_Low_Bound.
1588 (Pending_Access_Types): New routine along with pragma Inline.
1589 (Set_Pending_Access_Types): New routine along with pragma Inline.
1590 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
1591 Ins_Node. Determine the insertion node for anonynous access type
1592 that acts as a component type of an array. Update the call to
1593 Build_Finalization_Master.
1594 (Expand_Freeze_Record_Type): Update
1595 the calls to Build_Finalization_Master.
1596 (Freeze_Type): Remove
1597 local variable RACW_Seen. Factor out the code that deals with
1598 remote access-to-class-wide types. Create a finalization master
1599 when the designated type contains a private component. Fully
1600 initialize all pending access types.
1601 (Process_RACW_Types): New routine.
1602 (Process_Pending_Access_Types): New routine.
1603 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
1604 needs to set primitive Finalize_Address.
1605 (Expand_N_Allocator): Allocation no longer sets primitive
1606 Finalize_Address.
1607 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1608 Update the call to Build_Finalization_Master.
1609 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
1610 needs to set primitive Finalize_Address.
1611 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
1612 (Build_Finalization_Master): New parameter profile. Associate
1613 primitive Finalize_Address with the finalization master if the
1614 designated type has been frozen, otherwise treat the access
1615 type as pending. Simplify the insertion of the master and
1616 related initialization code.
1617 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
1618 abstract types.
1619 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
1620 Simplify the implementation.
1621 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
1622 along with comment on usage.
1623 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
1624 the comment on usage.
1625 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
1626 Finalize_Address to retrieve the primitive.
1627 (Finalize_Address): New routine.
1628 (Find_Finalize_Address): Removed.
1629 * exp_util.ads (Finalize_Address): New routine.
1630 * freeze.adb (Freeze_All): Remove the generation of finalization
1631 masters.
1632 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
1633 pending access types from the partial to the full view.
1634
1635 2015-01-30 Robert Dewar <dewar@adacore.com>
1636
1637 * sem_disp.adb: Minor reformatting.
1638 * sem_disp.ads: Documentation update.
1639
1640 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1641
1642 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
1643 or a function call, return True if type is class-wide.
1644 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
1645 Apply RM 4.5.7 (17/3): all or none of the dependent expression
1646 of a conditional expression must be dynamically tagged.
1647
1648 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1649
1650 * sem_ch6.adb (Analyze_Function_Return): In an extended return
1651 statement, apply accessibility check to result object when there
1652 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
1653
1654 2015-01-30 Robert Dewar <dewar@adacore.com>
1655
1656 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
1657 Boolean for case where ELSE is omitted.
1658 * sem_res.adb: Minor reformatting.
1659
1660 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
1661
1662 Fix build under cygwin/64.
1663 * adaint.h: Add check for __CYGWIN__.
1664 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
1665
1666 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1667
1668 PR ada/64640
1669 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
1670 * mingw32.h: Don't include <tchar.h> under cygwin.
1671 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
1672
1673 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1674
1675 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
1676 (DEF_FUNCTION_TYPE_VAR_12): New macros.
1677
1678 2015-01-09 Michael Collison <michael.collison@linaro.org>
1679
1680 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
1681 vec.h, double-int.h, input.h, alias.h, symtab.h,
1682 fold-const.h, wide-int.h, and inchash.h due to
1683 flattening of tree.h.
1684 * gcc-interface/decl.c: Ditto.
1685 * gcc-interface/misc.c: Ditto.
1686 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
1687 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
1688 fold-const.h, wide-int.h, and inchash.h due to
1689 flattening of tree.h.
1690 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
1691 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
1692 fold-const.h, wide-int.h, inchash.h due to
1693 flattening of tree.h.
1694 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
1695 vec.h, double-int.h, input.h, alias.h, symtab.h,
1696 fold-const.h, wide-int.h, and inchash.h due to
1697 flattening of tree.h.
1698 * gcc-interface/utils2.c: Ditto.
1699
1700 2015-01-07 Robert Dewar <dewar@adacore.com>
1701
1702 * sem_warn.adb (Check_One_Unit): Don't give unused entities
1703 warning for a package which is used as a generic parameter.
1704
1705 2015-01-07 Bob Duff <duff@adacore.com>
1706
1707 * usage.adb (Usage): Correct documentation of
1708 -gnatw.f switches.
1709
1710 2015-01-07 Robert Dewar <dewar@adacore.com>
1711
1712 * s-fileio.adb: Minor reformatting.
1713
1714 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1715
1716 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
1717 access to subprogram, replace its formals with new entities when
1718 building the object declaration, both if actual is present and
1719 when it is defaulted.
1720
1721 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1722
1723 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
1724 conversion and type of expression has invariant, apply invariant
1725 check on expression.
1726
1727 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1728
1729 * sem_ch3.adb (Create_Constrained_Components): A call to
1730 Gather_Components may detect an error if an inherited discriminant
1731 that controls a variant is non-static.
1732 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
1733 Gather_Components may report an error if an inherited discriminant
1734 in a variant in non-static.
1735 * sem_util.adb (Gather_Components): If a non-static discriminant
1736 is inherited do not report error here, but let caller handle it.
1737 (Find_Actual): Small optimization.
1738
1739 2015-01-07 Bob Duff <duff@adacore.com>
1740
1741 * usage.adb (Usage): Document -gnatw.f switch.
1742
1743 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1744
1745 * sem_ch12.adb: Code clean up and minor reformatting.
1746
1747 2015-01-07 Robert Dewar <dewar@adacore.com>
1748
1749 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
1750 Raise_Accessibility_Error call.
1751 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
1752 on handling of invalid digits in based constants.
1753 * s-fatgen.ads: Minor reformatting.
1754 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
1755 Avoid noting bogus modification for Valid test.
1756 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
1757 * einfo.ads: Minor reformatting.
1758 * sem_warn.adb: Minor comment clarification.
1759 * sem_ch12.adb: Minor reformatting.
1760
1761 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1762
1763 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
1764 over static predicates when the loop parameter specification
1765 carries a Reverse indicator.
1766
1767 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1768
1769 * sem_ch12.adb (Instantiate_Object): If formal has a default,
1770 actual is missing and formal has an anonymous access type, copy
1771 access definition in full so that tree for instance is properly
1772 formatted for ASIS use.
1773
1774 2015-01-07 Bob Duff <duff@adacore.com>
1775
1776 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
1777 for P'Access, where P is a subprogram in the same package as
1778 the P'Access, and the P'Access is evaluated at elaboration
1779 time, and occurs before the body of P. For example, "X : T :=
1780 P'Access;" would allow a subsequent call to X.all to be an
1781 access-before-elaboration error; hence the warning. This warning
1782 is enabled by the -gnatw.f switch.
1783 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
1784 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
1785 * gnat_ugn.texi: Document the new warning.
1786
1787 2015-01-07 Johannes Kanig <kanig@adacore.com>
1788
1789 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
1790 cross ref files.
1791
1792 2015-01-07 Robert Dewar <dewar@adacore.com>
1793
1794 * s-taprop-linux.adb, clean.adb: Minor reformatting.
1795
1796 2015-01-07 Arnaud Charlet <charlet@adacore.com>
1797
1798 * s-tassta.adb: Relax some overzealous assertions.
1799
1800 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1801
1802 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
1803 view of a type is legal when context is a thunk generated for
1804 operation inherited from an interface.
1805 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
1806 a thunk and return type is an incomplete type do not continue
1807 expansion; thunk will be fully elaborated when generating code.
1808
1809 2015-01-07 Doug Rupp <rupp@adacore.com>
1810
1811 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
1812 (QueryPerformanceFrequency): New imported procedure.
1813 * s-taprop-mingw.adb (RT_Resolution): Call above and return
1814 resolution vice a hardcoded value.
1815 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
1816 resolution vice a hardcoded value.
1817 * s-linux-android.ads (clockid_t): New subtype.
1818 * s-osinte-aix.ads (clock_getres): New imported subprogram.
1819 * s-osinte-android.ads (clock_getres): Likewise.
1820 * s-osinte-freebsd.ads (clock_getres): Likewise.
1821 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
1822 * s-osinte-darwin.ads (clock_getres): New subprogram.
1823 * s-osinte-darwin.adb (clock_getres): New subprogram.
1824 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
1825 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
1826 calculate resolution vice hard coded value.
1827
1828 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1829
1830 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
1831 limited view, use non-limited view when available to create
1832 equivalent record type.
1833
1834 2015-01-07 Vincent Celier <celier@adacore.com>
1835
1836 * gnatcmd.adb: Remove command Sync and any data and processing
1837 related to this command. Remove project processing for gnatstack.
1838 * prj-attr.adb: Remove package Synchonize and its attributes.
1839
1840 2015-01-07 Vincent Celier <celier@adacore.com>
1841
1842 * clean.adb: Minor error message change.
1843
1844 2015-01-07 Tristan Gingold <gingold@adacore.com>
1845
1846 PR ada/64349
1847 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
1848
1849 2015-01-07 Javier Miranda <miranda@adacore.com>
1850
1851 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
1852 protect the frontend against never ending recursion caused by
1853 circularities in the sources.
1854
1855 2015-01-07 Robert Dewar <dewar@adacore.com>
1856
1857 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
1858 exp_ch3.adb: Minor reformatting.
1859
1860 2015-01-07 Doug Rupp <rupp@adacore.com>
1861
1862 * s-linux.ads (clockid_t): New subtype.
1863 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
1864 (clockid_t): New subtype.
1865 (clock_getres): Import system call.
1866 * s-taprop-linux.adb (System.OS_Constants): With and rename.
1867 (RT_Resolution): Remove
1868 hardcoded value and call clock_getres.
1869 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
1870 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
1871
1872 2015-01-07 Robert Dewar <dewar@adacore.com>
1873
1874 * sem_warn.adb (Check_One_Unit): Guard against context item
1875 with no Entity field.
1876
1877 2015-01-07 Vincent Celier <celier@adacore.com>
1878
1879 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
1880 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
1881
1882 2015-01-07 Vincent Celier <celier@adacore.com>
1883
1884 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
1885 errors/warnings in the first parsing of the project files,
1886 to display the warnings when there is no errors.
1887
1888 2015-01-07 Tristan Gingold <gingold@adacore.com>
1889
1890 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
1891
1892 2015-01-07 Doug Rupp <rupp@adacore.com>
1893
1894 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
1895 value from Int_Lock as parameter to Int_Unlock.
1896 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
1897 * s-vxwext.ads (Int_Unlock): Likewise.
1898 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
1899 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
1900 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
1901 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
1902
1903 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
1904
1905 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
1906 keep ___XP suffixes
1907
1908 2015-01-07 Tristan Gingold <gingold@adacore.com>
1909
1910 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
1911 handle overlap.
1912
1913 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
1914
1915 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
1916 automatically set No_Strict_Aliasing on access types.
1917 * fe.h (No_Strict_Aliasing_CP): Declare.
1918 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
1919 No_Strict_Aliasing_CP is set.
1920
1921 2015-01-07 Johannes Kanig <kanig@adacore.com>
1922
1923 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
1924 not build function wrapper in gnatprove mode when the package
1925 is externally axiomatized.
1926
1927 2015-01-07 Jose Ruiz <ruiz@adacore.com>
1928
1929 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
1930 intermediate computations when the parameters have different signs.
1931
1932 2015-01-07 Javier Miranda <miranda@adacore.com>
1933
1934 * exp_ch3.adb (Build_Init_Procedure): For derived types,
1935 improve the code which takes care of identifying and moving to
1936 the beginning of the init-proc the call to the init-proc of the
1937 parent type.
1938
1939 2015-01-07 Olivier Hainque <hainque@adacore.com>
1940
1941 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
1942 Elaborate the expression as part of the same stmt group as the actions.
1943
1944 2015-01-07 Robert Dewar <dewar@adacore.com>
1945
1946 * sem_ch3.adb: Minor error message change.
1947
1948 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1949
1950 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
1951 Following AI05-028, the pragam applies legally to any composite type.
1952
1953 2015-01-07 Arnaud Charlet <charlet@adacore.com>
1954
1955 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
1956 (sigwait, sigwaitinfo): Removed, not needed after all on any
1957 VxWorks configurations.
1958
1959 2015-01-07 Robert Dewar <dewar@adacore.com>
1960
1961 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
1962
1963 2015-01-07 Javier Miranda <miranda@adacore.com>
1964
1965 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
1966 generation of accessibility check.
1967
1968 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1969
1970 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
1971 illegal completion from a class- wide type, set etype of the
1972 derived type properly to prevent cascaded errors.
1973
1974 2015-01-07 Robert Dewar <dewar@adacore.com>
1975
1976 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
1977 reformatting.
1978
1979 2015-01-07 Robert Dewar <dewar@adacore.com>
1980
1981 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
1982 New procedure.
1983 (OK_No_Use_Of_Entity_Name): New function.
1984 (Set_Restriction_No_Use_Of_Entity): New procedure.
1985 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
1986 New procedure.
1987 (OK_No_Use_Of_Entity_Name): New function.
1988 (Set_Restriction_No_Use_Of_Entity): New procedure.
1989 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
1990 No_Use_Of_Entity.
1991 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1992 Add processing for new restriction No_Use_Of_Entity.
1993
1994 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
1995
1996 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
1997 component type as to Has_Atomic_Components type. Remove useless
1998 test on Is_Aliased component type.
1999
2000 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
2001
2002 * alloc.ads Alphabetize several declarations. Add constants
2003 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
2004 * atree.adb Add with and use clauses for Opt.
2005 (Allocate_Initialize_Node): Mark a node as ignored Ghost
2006 if it is created in an ignored Ghost region.
2007 (Ekind_In): New variant.
2008 (Is_Ignored_Ghost_Node): New routine.
2009 (Set_Is_Ignored_Ghost_Node): New routine.
2010 * atree.adb Aplhabetize several subprograms declarations. Flag
2011 Spare0 is now known as Is_Ignored_Ghost_Node.
2012 (Ekind_In): New variant.
2013 (Is_Ignored_Ghost_Node): New routine.
2014 (Set_Is_Ignored_Ghost_Node): New routine.
2015 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
2016 (Contains_Ignored_Ghost_Code): New routine.
2017 (Set_Contains_Ignored_Ghost_Code): New routine.
2018 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
2019 It is now possible to set this property on an unanalyzed entity.
2020 (Write_Entity_Flags): Output the status of flag
2021 Contains_Ignored_Ghost_Code.
2022 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
2023 usage in nodes.
2024 (Contains_Ignored_Ghost_Code): New routine
2025 along with pragma Inline.
2026 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
2027 * exp_ch3.adb Add with and use clauses for Ghost.
2028 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
2029 Set the Ghost_Mode in effect.
2030 (Restore_Globals): New routine.
2031 * exp_ch7.adb (Process_Declarations): Do not process a context
2032 that invoves an ignored Ghost entity.
2033 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
2034 construct that has been rewritten as a null statement.
2035 * exp_disp.adb Add with and use clauses for Ghost.
2036 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
2037 the Ghost_Mode in effect.
2038 (Restore_Globals): New routine.
2039 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
2040 does not require any clean up. Add two missing cases that deal
2041 with block statements.
2042 * freeze.adb Add with and use clauses for Ghost.
2043 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
2044 Set the Ghost_Mode in effect.
2045 (Restore_Globals): New routine.
2046 * frontend.adb Add with and use clauses for Ghost. Remove any
2047 ignored Ghost code from all units that qualify.
2048 * ghost.adb New unit.
2049 * ghost.ads New unit.
2050 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
2051 the table in package Ghost.
2052 * lib.ads: Alphabetize several subprogram declarations.
2053 * lib-xref.adb (Output_References): Do not generate reference
2054 information for ignored Ghost entities.
2055 * opt.ads Add new type Ghost_Mode_Type and new global variable
2056 Ghost_Mode.
2057 * rtsfind.adb (Load_RTU): Provide a clean environment when
2058 loading a runtime unit.
2059 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
2060 entry/exit as the node may set a different mode.
2061 (Do_Analyze):
2062 Capture/restore the value of Ghost_Mode on entry/exit as the
2063 unit may be withed from a unit with a different Ghost mode.
2064 * sem_ch3.adb Add with and use clauses for Ghost.
2065 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
2066 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
2067 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
2068 the entity as Ghost when there is a Ghost_Mode in effect.
2069 (Array_Type_Declaration): The implicit base type inherits the
2070 "ghostness" from the array type.
2071 (Derive_Subprogram): The
2072 alias inherits the "ghostness" from the parent subprogram.
2073 (Make_Implicit_Base): The implicit base type inherits the
2074 "ghostness" from the parent type.
2075 * sem_ch5.adb Add with and use clauses for Ghost.
2076 (Analyze_Assignment): Set the Ghost_Mode in effect.
2077 * sem_ch6.adb Add with and use clauses for Ghost.
2078 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
2079 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
2080 Set the Ghost_Mode in effect. Mark the entity as Ghost when
2081 there is a Ghost_Mode in effect.
2082 * sem_ch7.adb Add with and use clauses for Ghost.
2083 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
2084 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
2085 effect. Mark the entity as Ghost when there is a Ghost_Mode
2086 in effect.
2087 * sem_ch8.adb Add with and use clauses for Ghost.
2088 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2089 Analyze_Object_Renaming, Analyze_Package_Renaming,
2090 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
2091 the entity as Ghost when there is a Ghost_Mode in effect.
2092 (Find_Type): Check the Ghost context of a type.
2093 * sem_ch11.adb Add with and use clauses for Ghost.
2094 (Analyze_Exception_Declaration): Set the Ghost_Mode in
2095 effect. Mark the entity as Ghost when there is a Ghost_Mode
2096 in effect.
2097 * sem_ch12.adb Add with and use clauses for Ghost.
2098 (Analyze_Generic_Package_Declaration,
2099 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
2100 Mark the entity as Ghost when there is a Ghost_Mode in effect.
2101 * sem_prag.adb Add with and use clauses for Ghost.
2102 (Analyze_Pragma): Ghost-related checks are triggered when there
2103 is a Ghost mode in effect.
2104 (Create_Abstract_State): Mark the
2105 entity as Ghost when there is a Ghost_Mode in effect.
2106 * sem_res.adb Add with and use clauses for Ghost.
2107 (Check_Ghost_Context): Removed.
2108 * sem_util.adb (Check_Ghost_Completion): Removed.
2109 (Check_Ghost_Derivation): Removed.
2110 (Incomplete_Or_Partial_View):
2111 Add a guard in case the entity has not been analyzed yet
2112 and does carry a scope.
2113 (Is_Declaration): New routine.
2114 (Is_Ghost_Entity): Removed.
2115 (Is_Ghost_Statement_Or_Pragma):
2116 Removed.
2117 (Is_Subject_To_Ghost): Removed.
2118 (Set_Is_Ghost_Entity):
2119 Removed.
2120 (Within_Ghost_Scope): Removed.
2121 * sem_util.adb (Check_Ghost_Completion): Removed.
2122 (Check_Ghost_Derivation): Removed.
2123 (Is_Declaration): New routine.
2124 (Is_Ghost_Entity): Removed.
2125 (Is_Ghost_Statement_Or_Pragma): Removed.
2126 (Is_Subject_To_Ghost): Removed.
2127 (Set_Is_Ghost_Entity): Removed.
2128 (Within_Ghost_Scope): Removed.
2129 * sinfo.ads Add a section on Ghost mode.
2130 * treepr.adb (Print_Header_Flag): New routine.
2131 (Print_Node_Header): Factor out code. Output flag
2132 Is_Ignored_Ghost_Node.
2133 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
2134
2135 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2136
2137 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
2138 true test and unreachable 'else' arm.
2139
2140 2015-01-06 Vincent Celier <celier@adacore.com>
2141
2142 * prj-conf.adb (Check_Target): Improve error message when
2143 there are mismatched targets between the on in the configuration
2144 project file and the specified one, either in the main project
2145 file or in the --target= switch.
2146
2147 2015-01-06 Pascal Obry <obry@adacore.com>
2148
2149 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
2150 Install_Name attribute definitions.
2151
2152 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2153
2154 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
2155 generated Import pragma for the internal imported procedure does
2156 not come from an aspect, so that Is_Imported can be properly
2157 set for it.
2158
2159 2015-01-06 Gary Dismukes <dismukes@adacore.com>
2160
2161 * sem_ch12.adb (Might_Inline_Subp): Record whether
2162 any subprograms in the generic package are marked with
2163 pragma Inline_Always (setting flag Has_Inline_Always).
2164 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
2165 alongside existing test of Front_End_Inlining as alternative
2166 conditions for setting Inline_Now. Also add test of
2167 Has_Inline_Always along with Front_End_Inlining test as an
2168 alternative condition for setting Needs_Body to False.
2169
2170 2015-01-06 Tristan Gingold <gingold@adacore.com>
2171
2172 * i-cpoint.adb (Copy_Array): Handle overlap.
2173
2174 2015-01-06 Pascal Obry <obry@adacore.com>
2175
2176 * bindgen.adb: Minor style fix.
2177
2178 2015-01-06 Robert Dewar <dewar@adacore.com>
2179
2180 * sem_util.ads, sem_util.adb: Minor reformatting.
2181
2182 2015-01-06 Vincent Celier <celier@adacore.com>
2183
2184 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
2185 with flags before parsing the projects.
2186 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
2187 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
2188 to True in the flags, when Ignore_Missing_With is True and an
2189 imported project cannot be found.
2190 * prj-proc.adb (Expression): When there are incomplete withs and
2191 a variable or attribute is not found, set the variable/attribute
2192 to unknown.
2193 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
2194 defaulted to False.
2195
2196 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
2197
2198 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
2199 prj-err.adb: Add new switch --no-command-line.
2200
2201 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2202
2203 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
2204
2205 2015-01-06 Robert Dewar <dewar@adacore.com>
2206
2207 * sem_ch11.adb: Minor reformatting.
2208
2209 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2210
2211 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
2212 Build_Array_Aggr_Code, used to initialized components covered
2213 by a box association. If the component type is scalar and has
2214 a default aspect, use it to initialize such components.
2215
2216 2015-01-06 Pascal Obry <obry@adacore.com>
2217
2218 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
2219 control the setup of the exception handler.
2220 * initialize.c: Remove unused declaration.
2221 * bindgen.adb: Always call __gnat_runtime_initialize and pass
2222 whether the exeception handler must be set or not.
2223
2224 2015-01-06 Thomas Quinot <quinot@adacore.com>
2225
2226 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
2227 order to native from default, make sure to also adjust bit order.
2228 * exp_aggr.adb: Minor reformatting.
2229
2230 2015-01-06 Robert Dewar <dewar@adacore.com>
2231
2232 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
2233 s-valrea.adb, s-valrea.ads: Add some additional guards for
2234 Str'Last = Positive'Last.
2235
2236 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2237
2238 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
2239 subprograms.
2240
2241 2015-01-06 Javier Miranda <miranda@adacore.com>
2242
2243 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
2244
2245 2015-01-06 Thomas Quinot <quinot@adacore.com>
2246
2247 * sem_util.ads: Minor reformatting.
2248 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
2249 (In_RCI_Declaration) Return to old name, as proper checking of
2250 entity being in the visible part depends on entity kind and must
2251 be done by the caller.
2252
2253 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2254
2255 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
2256 for operators in SPARK.
2257
2258 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2259
2260 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
2261 expression in an others association before making copies for
2262 separate resolution and accessibility checks. This ensures that
2263 the type of the expression is available to ASIS in all cases,
2264 in particular if the expression is itself an aggregate.
2265
2266 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2267
2268 * einfo.ads (Has_Independent_Components): Document extended
2269 usage.
2270 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
2271 (Set_Has_Independent_Components): Adjust assertion.
2272 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
2273 for pragma Atomic_Components. Set Has_Independent_Components
2274 on the object instead of the type for an object declaration with
2275 pragma Independent_Components.
2276
2277 2015-01-06 Olivier Hainque <hainque@adacore.com>
2278
2279 * set_targ.adb (Read_Target_Dependent_Values): Set
2280 Long_Double_Index when "long double" is read.
2281 (elaboration code): Register_Back_End_Types only when not reading from
2282 config files. Doing otherwise is pointless and error prone.
2283
2284 2015-01-06 Robert Dewar <dewar@adacore.com>
2285
2286 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
2287
2288 2015-01-06 Robert Dewar <dewar@adacore.com>
2289
2290 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
2291 Str'Last = Positive'Last.
2292
2293 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2294
2295 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
2296 where the non-limited type is a generic actual and appears as
2297 a subtype of the non-limited view of the other.
2298 * freeze.adb (Build_Renamed_Body): If the return type of the
2299 declaration that is being completed is a limited view and the
2300 non-limited view is available, use it in the specification of
2301 the generated body.
2302
2303 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2304
2305 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
2306 incomplete view, the type of the classwide type common to both
2307 views is the type being declared.
2308
2309 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2310
2311 * einfo.ads (Is_Independent): Further document extended usage.
2312
2313 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2314
2315 * einfo.ads (Is_Independent): Document extended usage.
2316 * einfo.adb (Is_Independent): Remove obsolete assertion.
2317 (Set_Is_Independent): Likewise.
2318 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
2319 (Process_Atomic_Independent_Shared_Volatile): ...this.
2320 Deal with pragma Independent here.
2321 (Analyze_Pragma): Adjust
2322 to above renaming and also invoke it for pragma Independent.
2323 Adjust comment for Independent_Components.
2324
2325 2015-01-06 Robert Dewar <dewar@adacore.com>
2326
2327 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
2328 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
2329
2330 2015-01-06 Robert Dewar <dewar@adacore.com>
2331
2332 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
2333 = Positive'Last.
2334 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
2335 Str'Last = Positive'Last.
2336
2337 2015-01-06 Robert Dewar <dewar@adacore.com>
2338
2339 * sem_prag.adb (Process_Inline): Remove redundant construct
2340 warning (-gnatw.r) for an ineffective pragma Inline.
2341
2342 2015-01-06 Robert Dewar <dewar@adacore.com>
2343
2344 * s-valint.adb: Fix typo in last checkin.
2345 * s-valuns.adb (Value_Unsigned): More efficient fix for
2346 Positive'Last case.
2347 * sem_attr.adb (Analyze_Attribute): Minor reformatting
2348 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
2349
2350 2015-01-06 Robert Dewar <dewar@adacore.com>
2351
2352 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
2353 Str'Last = Positive'Last
2354
2355 2015-01-06 Thomas Quinot <quinot@adacore.com>
2356
2357 * xoscons.adb: Display exception information and return non-zero
2358 exit status in top level exception handler.
2359
2360 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2361
2362 * sem_ch8.adb: Code clean up.
2363
2364 2015-01-06 Tristan Gingold <gingold@adacore.com>
2365
2366 * targparm.ads: Remove obsolete comment.
2367
2368 2015-01-06 Olivier Hainque <hainque@adacore.com>
2369
2370 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
2371 constructing a ref to variable, update inner_const_flag from the
2372 variable TREE_READONLY attribute.
2373 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
2374 definition.
2375 (get_target_float_size): Remove.
2376 (get_target_double_size): Remove.
2377 (get_target_long_double_size): Remove.
2378
2379 2015-01-06 Pascal Obry <obry@adacore.com>
2380
2381 * adaint.c (ProcListEvt): Set to NULL.
2382 * rtinit.c: New file.
2383 (__gnat_rt_init_count): New reference counter set to 0.
2384 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
2385 this code is actually needed for the runtime initialization. This
2386 routine returns immediately if the initialization has already been done.
2387 * final.c: Revert previous change.
2388 * rtfinal.c: New file.
2389 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
2390 section and event. The default version of this routine is empty (except
2391 for the reference counting code). This routine returns immediately if
2392 some others libraries are referencing the runtime.
2393 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
2394 remove circuitry to initialize the signal handler as this is
2395 now done by the runtime initialization routine.
2396 (Gen_Adafinal): Generate call to Runtime_Finalize.
2397 * gnat_ugn.texi: Update documentation about concurrency and
2398 initialization/finalization of the run-time.
2399 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
2400 references to rtfinal.o and rtinit.o
2401
2402 2015-01-06 Robert Dewar <dewar@adacore.com>
2403
2404 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2405 for Enum_Image.
2406 * sem_attr.adb: Implement Enum_Image attribute.
2407 * snames.ads-tmpl: Add entries for Enum_Image attribute.
2408
2409 2015-01-06 Robert Dewar <dewar@adacore.com>
2410
2411 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
2412 * restrict.ads (No_Use_Of_Entity): New table.
2413 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2414 Ignore No_Use_Of_Entity (will be processed in parser).
2415 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
2416
2417 2015-01-06 Vincent Celier <celier@adacore.com>
2418
2419 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
2420 to check for an extended project, if a project does not have
2421 yet a project declaration.
2422
2423 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
2424
2425 * scos.ads: Update documentation about the SCO table build
2426 process and about table records format.
2427 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
2428 (SCO_Record_Filtered): New procedure.
2429 (Set_SCO_Logical_Operator): New procedure.
2430 (dsco): Update documentation.
2431 * par_sco.adb: Update library-level comments.
2432 (SCO_Generation_State_Type): New type.
2433 (SCO_Generation_State): New variable.
2434 (SCO_Raw_Table): New package instanciation.
2435 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
2436 ("<"): New.
2437 (Tristate): New type.
2438 (Is_Logical_Operator): Return Tristate and update documentation.
2439 (Has_Decision): Update call to Is_Logical_Operator and complete
2440 documentation.
2441 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
2442 comment, add an assertion for state checking and change
2443 references to SCO_Table into SCO_Raw_Table.
2444 (dsco): Refactor to dump the raw and the filtered tables.
2445 (Process_Decisions.Output_Decision_Operand): Handle putative
2446 short-circuit operators.
2447 (Process_Decisions.Output_Element): Update references
2448 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2449 (Process_Decisions.Process_Decision_Operand): Update call
2450 to Is_Logical_Operator.
2451 (Process_Decisions.Process_Node): Handle putative short-circuit
2452 operators and change references to
2453 SCO_Table into SCO_Raw_Table.
2454 (SCO_Output): Add an assertion
2455 for state checking and remove code that used to stamp out SCO entries.
2456 (SCO_Pragma_Disabled): Change reference to SCO_Table
2457 into SCO_Raw_Table.
2458 (SCO_Record): Rename to SCO_Record_Raw,
2459 add an assertion for state checking and change references
2460 to SCO_Table into SCO_Raw_Table.
2461 (Set_SCO_Condition): Add an assertion for state checking, update
2462 references to Condition_Pragma_Hash_Table and change references to
2463 SCO_Table into SCO_Raw_Table.
2464 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
2465 change references to SCO_Table into SCO_Raw_Table.
2466 (Set_SCO_Logical_Operator): New procedure.
2467 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
2468 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2469 (SCO_Record_Fildered): New procedure.
2470 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
2471 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
2472 output SCOs.
2473 * par-load.adb (Load): Update reference to SCO_Record.
2474 * par.adb (Par): Update reference to SCO_Record.
2475 * put_scos.adb (Put_SCOs): Add an assertion to check that no
2476 putative SCO condition reaches this end.
2477 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
2478 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
2479 when corresponding to an "and"/"or" operator affected by the
2480 Short_Circuit_And_Or pragma.
2481
2482 2015-01-06 Robert Dewar <dewar@adacore.com>
2483
2484 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
2485 msg for attempted USE of generic subprogram or subprogram.
2486
2487 2015-01-06 Robert Dewar <dewar@adacore.com>
2488
2489 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
2490 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
2491 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
2492
2493 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2494
2495 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
2496 that specify stream subprograms, if the prefix is a class-wide
2497 type then the generated attribute definition clause must apply
2498 to the same class-wide type.
2499 (Default_Iterator): An iterator defined by an aspect of some
2500 container type T must have a first parameter of type T, T'class,
2501 or an access to such (from code reading RM 5.5.1 (2/3)).
2502
2503 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2504
2505 * gnat1drv.adb: Minor: complete previous change.
2506
2507 2015-01-06 Olivier Hainque <hainque@adacore.com>
2508
2509 * set_targ.ads (C_Type_For): New function. Return the name of
2510 a C type supported by the back-end and suitable as a basis to
2511 construct the standard Ada floating point type identified by
2512 the T parameter. This is used as a common ground to feed both
2513 ttypes values and the GNAT tree nodes for the standard floating
2514 point types.
2515 * set_targ.adb (Long_Double_Index): The index at which "long
2516 double" gets registered in the FPT_Mode_Table. This is useful to
2517 know whether we have a "long double" available at all and get at
2518 it's characteristics without having to search the FPT_Mode_Table
2519 when we need to decide which C type should be used as the
2520 basis for Long_Long_Float in Ada.
2521 (Register_Float_Type): Fill Long_Double_Index.
2522 (FPT_Mode_Index_For): New function. Return the index in
2523 FPT_Mode_Table that designates the entry corresponding to the
2524 provided C type name.
2525 (FPT_Mode_Index_For): New function. Return the index in
2526 FPT_Mode_Table that designates the entry for a back-end type
2527 suitable as a basis to construct the standard Ada floating point
2528 type identified by the input T parameter.
2529 (elaboration code): Register_Back_End_Types unconditionally,
2530 so C_Type_For can operate regardless of -gnateT. Do it
2531 early so we can query it for the floating point sizes, via
2532 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
2533 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
2534 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
2535 which C type should be used as the basis for the construction
2536 of the Standard Ada floating point types.
2537 * get_targ.ads (Get_Float_Size, Get_Double_Size,
2538 Get_Long_Double_Size): Remove.
2539 * get_targ.adb: Likewise.
2540
2541 2015-01-06 Thomas Quinot <quinot@adacore.com>
2542
2543 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
2544 parameter and rename to...
2545 (In_RCI_Visible_Declarations): Fix handling of private part of nested
2546 package.
2547 (Validate_RCI_Subprogram_Declaration): Reject illegal function
2548 returning anonymous access in RCI unit.
2549
2550 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2551
2552 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
2553 function wrapper may be a homonym of another local declaration.
2554 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
2555 build function and operator wrappers after the actual subprogram
2556 has been resolved, and replace the standard renaming declaration
2557 with the declaration of wrapper.
2558 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
2559 make public for use elsewhere.
2560 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
2561 rewrite, now that actual is fully resolved when wrapper is
2562 constructed.
2563
2564 2015-01-06 Javier Miranda <miranda@adacore.com>
2565
2566 * exp_disp.adb: Revert previous change.
2567
2568 2015-01-06 Robert Dewar <dewar@adacore.com>
2569
2570 * exp_util.adb: Change name Name_Table_Boolean to
2571 Name_Table_Boolean1.
2572 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
2573 Introduce Name_Table_Boolean2/3.
2574 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
2575 Introduce Name_Table_Boolean2/3.
2576 * par-ch13.adb: Change name Name_Table_Boolean to
2577 Name_Table_Boolean1.
2578
2579 2015-01-06 Bob Duff <duff@adacore.com>
2580
2581 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
2582
2583 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2584
2585 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
2586 others choice that covers multiple components, analyze each
2587 copy with the type of the component even in compile-only mode,
2588 to detect potential accessibility errors.
2589
2590 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2591
2592 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
2593 (Resolve_Actuals): An effectively volatile out
2594 parameter cannot act as an in or in out actual in a call.
2595 (Resolve_Entity_Name): An effectively volatile out parameter
2596 cannot be read.
2597
2598 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2599
2600 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2601 the expansion of an expression function it may be pre-analyzed
2602 if a 'access attribute is applied to the function, in which case
2603 last_entity may have been assigned already.
2604
2605 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2606
2607 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
2608 type and actual has the corresponding full view, there is no
2609 error, but a case of use of incomplete type in a predicate or
2610 invariant expression.
2611
2612 2015-01-06 Vincent Celier <celier@adacore.com>
2613
2614 * makeutl.adb (Insert_No_Roots): Make sure that the same source
2615 in two different project tree is checked in both trees, if they
2616 are sources of two different projects, extended or not.
2617
2618 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2619
2620 * gnat1drv.adb: Minor code clean up.
2621 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
2622
2623 2015-01-06 Bob Duff <duff@adacore.com>
2624
2625 * osint.adb (Read_Source_File): Don't print out
2626 file name unless T = Source.
2627
2628 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2629
2630 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
2631 recognize improper uses of constant_reference types as actuals
2632 for in-out parameters.
2633 (Check_Function_Call): Do not collect identifiers if function
2634 name is missing because of previous error.
2635
2636 2015-01-06 Robert Dewar <dewar@adacore.com>
2637
2638 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
2639 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
2640 Minor change of name Name_Table_Info => Name_Table_Int.
2641
2642 2015-01-06 Robert Dewar <dewar@adacore.com>
2643
2644 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
2645 in previous checkin.
2646 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
2647 of bounds.
2648 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
2649
2650 2015-01-06 Vincent Celier <celier@adacore.com>
2651
2652 * a-strsup.adb (Times (Natural;String;Positive)): Raise
2653 Length_Error, not Index_Error, when the result is too long.
2654
2655 2015-01-06 Thomas Quinot <quinot@adacore.com>
2656
2657 * a-direct.adb (Create_Path): Minor error handling and
2658 performance improvement.
2659
2660 2015-01-06 Robert Dewar <dewar@adacore.com>
2661
2662 * checks.ads, sem_ch12.adb: Minor reformatting.
2663 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
2664 zero check for fixed-point case if Backend_Divide_Checks_On_Target
2665 is False.
2666
2667 2015-01-06 Robert Dewar <dewar@adacore.com>
2668
2669 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2670 Do not set restriction No_Elaboration_Code unless the pragma
2671 appears in the main unit).
2672
2673 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2674
2675 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
2676 that with clause has already been analyzed before checking kind
2677 of with_clause.
2678
2679 2015-01-06 Robert Dewar <dewar@adacore.com>
2680
2681 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
2682 (as required by RM).
2683
2684 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2685
2686 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
2687
2688 2015-01-06 Robert Dewar <dewar@adacore.com>
2689
2690 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
2691 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
2692
2693 2015-01-06 Javier Miranda <miranda@adacore.com>
2694
2695 * exp_disp.adb (Expand_Interface_Conversion): No displacement
2696 of the pointer to the object needed when the type of the operand
2697 is not an interface type and the interface is one of its parent
2698 types (since they share the primary dispatch table).
2699
2700 2015-01-06 Vincent Celier <celier@adacore.com>
2701
2702 * prj-env.adb: Minor comment update.
2703
2704 2015-01-06 Javier Miranda <miranda@adacore.com>
2705
2706 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
2707 access types whose target type is an interface type to operands
2708 that are access types; required to report an error when the
2709 operand is not an access type.
2710
2711 2015-01-06 Bob Duff <duff@adacore.com>
2712
2713 * a-cfinve.adb (Copy): Set the discriminant to the Length when
2714 Capacity = 0.
2715 * a-cofove.ads (Capacity): Add a postcondition.
2716 * a-cfinve.ads (Capacity): Add a postcondition.
2717 (Reserve_Capacity): Correct the postcondition in the case where
2718 Capacity = 0; that means "Capacity => Length (Container)".
2719 * a-cofove.adb (Elems[c]): Add a comment
2720 explaining the dangers and how to avoid them.
2721
2722 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2723
2724 * sem_ch12.adb: Code clean up.
2725
2726 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2727
2728 * gnatvsn.ads: Bump copyright year.
2729
2730 2015-01-06 Robert Dewar <dewar@adacore.com>
2731
2732 * s-taskin.ads, s-traces.ads: Minor reformatting.
2733 * exp_util.adb: Minor typo fix.
2734
2735 2015-01-06 Vincent Celier <celier@adacore.com>
2736
2737 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
2738 with the runtime name.
2739 * prj-env.adb (Initialize_Default_Project_Path): When both
2740 Target_Name and Runtime_Name are not empty string, add to the
2741 project path the two directories .../lib/gnat and .../share/gpr
2742 related to the runtime.
2743 * prj-env.ads (Initialize_Default_Project_Path): New String
2744 parameter Runtime_Name, defaulted to the empty string.
2745
2746 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2747
2748 * frontend.adb: Guard against the case where a configuration
2749 pragma may be split into multiple pragmas and the original
2750 rewritten as a null statement.
2751 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
2752 pragma using Insert_Before rather than Insert_Action. This
2753 takes care of the configuration pragma case where Insert_Action
2754 would fail.
2755
2756 2015-01-06 Bob Duff <duff@adacore.com>
2757
2758 * a-coboho.ads (Element_Access): Add "pragma
2759 No_Strict_Aliasing (Element_Access);". This is needed because
2760 we are unchecked-converting from Address to Element_Access.
2761 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
2762 result to be 1.
2763
2764 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2765
2766 * sem_res.adb (Resolve_Actuals): Remove the
2767 restriction which prohibits volatile actual parameters with
2768 enabled external propery Async_Writers to act appear in procedure
2769 calls where the corresponding formal is of mode OUT.
2770
2771 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2772
2773 * gnat_ugn.texi: Bump @copying's copyright year.
2774
2775 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
2776
2777 PR ada/64492
2778 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
2779
2780 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
2781
2782 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
2783 of unchecked asprintf.
2784
2785 \f
2786 Copyright (C) 2015 Free Software Foundation, Inc.
2787
2788 Copying and distribution of this file, with or without modification,
2789 are permitted in any medium without royalty provided the copyright
2790 notice and this notice are preserved.