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