1 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3 * sem_prag.adb (Analyze_Abstract_State): Use routine
4 Malformed_State_Error to issue general errors.
5 (Analyze_Pragma): Diagnose a syntax error related to a state
6 declaration with a simple option.
7 (Malformed_State_Error): New routine.
9 2015-03-04 Robert Dewar <dewar@adacore.com>
11 * a-strsup.adb (Super_Slice): Deal with super flat case.
12 * einfo.ads: Minor reformatting.
13 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
16 2015-03-04 Claire Dross <dross@adacore.com>
18 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
19 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
22 2015-03-04 Ed Schonberg <schonberg@adacore.com>
24 * sem_warn.adb (Check_References): When checking for an unused
25 in-out parameter of a class- wide type, use its type to determine
26 whether it is private, in order to avoid a spurious warning when
27 subprogram spec and body are in different units.
29 2015-03-04 Yannick Moy <moy@adacore.com>
31 * sem_attr.adb: Improve warning messages.
33 2015-03-04 Robert Dewar <dewar@adacore.com>
35 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
37 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
38 (Note_Uplevel_Reference): Ignore uplevel references to non-types
39 (Get_Level): Consider only subprograms, not blocks.
40 (Visit_Node): Set proper condition for generating ARECnF entity.
41 Ignore indirect calls. Ignore calls to subprograms
43 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
44 (Add_Form_To_Spec): Properly set Last_Entity field.
45 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
46 Handle case of no uplevel refs in outer subprogram
47 Don't mark uplevel entities as aliased.
48 Don't deal with calls with no ARECnF requirement.
50 2015-03-04 Robert Dewar <dewar@adacore.com>
52 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
53 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
54 operation in computing LZ.
55 * sem_attr.adb: Minor typo fix
57 2015-03-04 Robert Dewar <dewar@adacore.com>
59 * exp_ch7.adb: Minor reformatting.
60 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
62 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
64 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
66 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
67 references to formal parameters subject to pragma Unreferenced.
68 (Suppress_Reference): New routine.
69 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
70 of attribute 'Old. Attributes 'Old and 'Result now share
72 (Analyze_Old_Result_Attribute): New routine.
73 (Check_Placement_In_Check): Removed.
74 (Check_Placement_In_Contract_Cases): Removed.
75 (Check_Placement_In_Test_Case): Removed.
76 (Check_Use_In_Contract_Cases): Removed.
77 (Check_Use_In_Test_Case): Removed.
78 (In_Refined_Post): Removed.
80 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
81 (Check_Low_Bound_Tested_For): New routine.
83 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
85 * exp_ch3.adb (Expand_N_Object_Declaration):
86 Generate a runtime check to test the expression of pragma
87 Default_Initial_Condition when the object is default initialized.
89 2015-03-02 Robert Dewar <dewar@adacore.com>
91 * scng.adb (Scan): Ignore illegal character in relaxed
94 2015-03-02 Ed Schonberg <schonberg@adacore.com>
96 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
97 on left operand, so it can be properly resolved with type of
98 alternatives of right operand.
99 * sem_res.adb (Resolve_Set_Membership): Handle properly an
100 overloaded left-hand side when the alternatives on the right
101 hand side are literals of some universal type. Use first
102 non-overloaded alternative to find expected type.
104 2015-03-02 Ed Schonberg <schonberg@adacore.com>
106 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
107 type to retrieve designated type, because the purported access
108 type may be a partial (private) view, when it is declared in
109 the private part of a nested package, and finalization actions
110 are generated when completing compilation of enclosing unit.
112 2015-03-02 Robert Dewar <dewar@adacore.com>
114 * back_end.adb (Call_Back_End): Remove previous patch,
115 the back end now gets to see the result of -gnatd.1
116 (Unnest_Subprogram_Mode) processing.
117 * elists.ads, elists.adb (List_Length): New function.
118 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
119 * sem_util.adb (Check_Nested_Access): Handle formals in
120 Unnest_Subprogram_Mode.
121 (Adjust_Named_Associations): Minor reformatting.
122 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
125 2015-03-02 Robert Dewar <dewar@adacore.com>
127 * atree.ads, atree.adb (Uint24): New function
128 (Set_Uint24): New procedure.
129 * atree.h (Uint24): New macro for field access.
130 * back_end.adb (Call_Back_End): For now, don't call back end
131 if unnesting subprogs.
132 * einfo.adb (Activation_Record_Component): New field
133 (Subps_Index): New field.
134 * einfo.ads (Activation_Record_Component): New field
135 (Subps_Index): New field Minor reordering of comments into alpha order.
136 * exp_unst.ads, exp_unst.adb: Continued development.
138 2015-03-02 Gary Dismukes <dismukes@adacore.com>
140 * exp_disp.ads: Minor reformatting.
142 2015-03-02 Ed Schonberg <schonberg@adacore.com>
144 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
145 ancestor to list of use clauses active in descendant unit if we
146 are within the private part of an intervening parent, to prevent
147 circularities in use clause list.
149 2015-03-02 Javier Miranda <miranda@adacore.com>
151 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
152 invariants to the corresponding record type.
153 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
154 which sets the value of the DTC_Entity associated with a given
155 primitive of a tagged type and propagates the value to the
157 (Set_DTC_Entity_Value): Propagate the DTC
158 value to the wrapped entity.
159 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
160 associated with invariants of progenitors.
161 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
162 of parents and progenitors.
163 (Process_Full_View): Check hidden inheritance of class-wide type
165 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
166 the invariant procedure for interface types; build the invariant
167 procedure for tagged types inheriting invariants from their
169 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
170 types but do not build their invariant procedure since their
171 invariants will be propagated to the invariant procedure of
172 types covering the interface.
173 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
174 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
175 by calls to Set_DT_Position_Value.
177 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
179 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
180 code in Denote_Same_Function. Do not analyze attribute 'Result
181 when it is inside procedure _Postconditions. Remove a misplaced
182 warning diagnostic. Code cleanup.
183 (Denote_Same_Function): New routine.
184 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
185 cleanup. Warn on pre/postconditions on an inlined subprogram.
186 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
187 an inlined subprogram.
188 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
189 pre/post condition on an inlined subprogram.
190 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
191 pre/postconditions on an inlined subprogram.
192 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
194 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
196 * sem_prag.adb (Ensure_Aggregate_Form):
197 Ensure that the name denoted by the Chars of a pragma argument
198 association has the proper Sloc when converted into an aggregate.
200 2015-03-02 Bob Duff <duff@adacore.com>
202 * sem_ch6.adb (Check_Private_Overriding): Capture
203 Incomplete_Or_Partial_View in a constant. This is cleaner and
206 2015-03-02 Gary Dismukes <dismukes@adacore.com>
208 * einfo.ads, exp_unst.ads: Minor reformatting.
210 2015-03-02 Ed Schonberg <schonberg@adacore.com>
212 * a-strsea.adb (Find_Token): Ensure that the range of iteration
213 does not perform any improper character access. This prevents
214 erroneous access in the unusual case of an empty string target
215 and a From parameter less than Source'First.
217 2015-03-02 Robert Dewar <dewar@adacore.com>
219 * elists.adb (List_Length): Fix incorrect result.
221 2015-03-02 Bob Duff <duff@adacore.com>
223 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
224 checks here. It used to check that the function is merely
225 overriding SOMEthing. Now it checks that the function is
226 overriding a corresponding public operation. This is a correction
227 to the implementation of the rule in RM-3.9.3(10).
229 2015-03-02 Robert Dewar <dewar@adacore.com>
231 * debug.adb: Document new debug flag -gnatd.1.
232 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
233 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
234 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
235 * elists.ads elists.adb (List_Length): New function.
236 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
237 when appropriate (Process_Preconditions): Minor code
238 reorganization and reformatting
239 * exp_unst.ads, exp_unst.adb: New files.
240 * gnat1drv.adb (Adjust_Global_Switches): Set
241 Unnest_Subprogram_Mode if -gnatd.1
242 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
244 * opt.ads (Unnest_Subprogram_Mode): New flag.
245 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
246 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
247 Has_Nested_Subprogram flag.
248 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
250 (Find_Selected_Component): Minor comment addition.
251 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
252 (Note_Possible_Modification): New calling sequence for
254 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
255 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
257 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
259 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
260 types, preserve the original type and create copies just like the C
261 front-end does. For artificial ones, do not define a name for
263 (create_type_decl): When gnat_pushdecl made the input type the
264 original type for the new declaration, do not define a stub
266 * gcc-interface/utils2.c (build_binary_op): Accept two different
267 pointer types when they point to the same type.
269 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
271 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
273 * sem_util.adb (Kill_Current_Values): Do not invalidate and
276 2015-03-02 Robert Dewar <dewar@adacore.com>
278 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
281 2015-03-02 Ed Schonberg <schonberg@adacore.com>
283 * sem_ch8.adb: extend use of Available_Subtype.
285 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
287 * sem_prag.adb (Duplication_Error): Remove the special handling
288 of 'Class or _Class in the context of pre/postconditions.
289 (Process_Class_Wide_Condition): Remove the special handling of
290 'Class or _Class in the context of pre/postconditions.
291 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
292 and Post_Class no longer need to be converted to _Pre and _Post.
293 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
296 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
298 * exp_ch6.adb (Process_Preconditions): Modify the
299 mechanism that find the first source declaration to correct exit
300 the loop once it has been found.
302 2015-03-02 Gary Dismukes <dismukes@adacore.com>
304 * a-strsea.adb: Minor typo fix.
306 2015-03-02 Bob Duff <duff@adacore.com>
308 * einfo.ads: Minor comment fixes.
310 2015-03-02 Gary Dismukes <dismukes@adacore.com>
312 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
314 2015-03-02 Ed Schonberg <schonberg@adacore.com>
316 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
317 is defined for the array type, use it instead of a Default_Value
318 specified for the component type itself.
320 2015-03-02 Thomas Quinot <quinot@adacore.com>
322 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
323 expanding a 'Input attribute reference for a class-wide type,
324 do not generate a separate object declaration for the controlling
325 tag dummy object; instead, generate the expression inline in the
326 dispatching call. Otherwise, the declaration (which involves a
327 call to String'Input, returning a dynamically sized value on the
328 secondary stack) will be expanded outside of proper secondary
329 stack mark/release operations, and will thus cause a secondary
332 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
334 * checks.adb (Add_Validity_Check): Change the names of all
335 formal parameters to better illustrate their purpose. Update
336 the subprogram documentation. Update all occurrences of the
337 formal parameters. Generate a pre/postcondition pragma by
338 calling Build_Pre_Post_Condition.
339 (Build_PPC_Pragma): Removed.
340 (Build_Pre_Post_Condition): New routine.
341 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
342 is now used as Postconditions_Proc. Flag240 is now renamed to
343 Has_Expanded_Contract. (First_Formal): The routine can now
344 operate on generic subprograms.
345 (First_Formal_With_Extras): The routine can now operate on generic
347 (Has_Expanded_Contract): New routine.
348 (Has_Postconditions): Removed.
349 (Postcondition_Proc): Removed.
350 (Postconditions_Proc): New routine.
351 (Set_Has_Expanded_Contract): New routine.
352 (Set_Has_Postconditions): Removed.
353 (Set_Postcondition_Proc): Removed.
354 (Set_Postconditions_Proc): New routine.
355 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
356 the output of Has_Expanded_Contract.
357 (Write_Field8_Name): Remove the output of Postcondition_Proc.
358 (Write_Field14_Name): Add the output of Postconditions_Proc.
359 * einfo.ads New attributes Has_Expanded_Contract and
360 Postconditions_Proc along with occurrences in entities.
361 Remove attributes Has_Postconditions and Postcondition_Proc
362 along with occurrences in entities.
363 (Has_Expanded_Contract): New routine along with pragma Inline.
364 (Has_Postconditions): Removed along with pragma Inline.
365 (Postcondition_Proc): Removed along with pragma Inline.
366 (Postconditions_Proc): New routine along with pragma Inline.
367 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
368 (Set_Has_Postconditions): Removed along with pragma Inline.
369 (Set_Postcondition_Proc): Removed along with pragma Inline.
370 (Set_Postconditions_Proc): New routine along with pragma Inline.
371 * exp_ch6.adb (Add_Return): Code cleanup. Update the
372 generation of the call to the _Postconditions routine of
373 the procedure. (Expand_Non_Function_Return): Reformat the
374 comment on usage. Code cleanup. Update the generation of
375 the call to the _Postconditions routine of the procedure or
377 (Expand_Simple_Function_Return): Update the
378 generation of the _Postconditions routine of the function.
379 (Expand_Subprogram_Contract): Reimplemented.
380 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
381 profile along the comment on usage.
382 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
383 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
384 wrapper when the entry [family] has a contract with
386 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
387 (Expand_Contract_Cases): This routine and its subsidiaries now
388 analyze all generated code.
389 (Expand_Old_In_Consequence): Removed.
390 * sem_attr.adb Add with and use clause for Sem_Prag.
391 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
392 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
394 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
395 a generic subprogram.
396 (Analyze_Object_Declaration): Do not create a contract node.
397 (Derive_Subprogram): Do not create a contract node.
398 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
399 not create a contract node.
400 (Analyze_Completion_Contract): New routine.
401 (Analyze_Function_Return): Alphabetize.
402 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
403 contract node. Do not copy pre/postconditions to the original
405 (Analyze_Null_Procedure): Do not create a contract node.
406 (Analyze_Subprogram_Body_Contract): Reimplemented.
407 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
408 as having postconditions. Do not create a contract node. Analyze
409 the subprogram body contract of a body that acts as a compilation
410 unit. Expand the subprogram contract after the declarations have
412 (Analyze_Subprogram_Contract): Reimplemented.
413 (Analyze_Subprogram_Specification): Do not create a contract node.
414 (List_Inherited_Pre_Post_Aspects): Code cleanup.
415 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
417 (Analyze_Subprogram_Contract): Update the
418 parameter profile and the comment on usage.
419 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
421 (Analyze_Package_Declaration): Do not create a
423 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
424 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
426 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
428 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
429 their proper section and alphabetize them. Analyze the contract of
430 a [generic] subprogram after all Pragmas_After have been analyzed.
431 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
432 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
433 create a contract node.
434 (Analyze_Generic_Subprogram_Declaration):
435 Alphabetize local variables. Do not create a contract
436 node. Do not generate aspects out of pragmas for ASIS.
437 (Analyze_Subprogram_Instantiation): Instantiate
438 the contract of the subprogram. Do not create a
439 contract node. (Instantiate_Contract): New routine.
440 (Instantiate_Subprogram_Body): Alphabetize local variables.
441 (Save_Global_References_In_Aspects): New routine.
442 (Save_References): Do not save the global references found within
443 the aspects of a generic subprogram.
444 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
445 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
446 Original_Node for establishing linkages.
447 (Insert_Pragma): Insertion in a subprogram body takes precedence over
448 the case where the subprogram body is also a compilation unit.
449 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
450 Get_Argument to obtain the proper expression. Install the generic
451 formals when the related context is a generic subprogram.
452 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
453 the proper expression. Use Corresponding_Spec_Of to obtain
454 the spec. Install the generic formal when the related context
455 is a generic subprogram.
456 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
457 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
458 generic formal when the related context is a generic subprogram.
459 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
460 to obtain the proper expression. Remove the call to
461 Check_SPARK_Aspect_For_ASIS as the analysis is now done
463 (Analyze_Pragma): Update all occurrences
464 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
465 Extensions_Visible, Global, Postcondition, Precondition and
466 Test_Case now carry generic templates when the related context
467 is a generic subprogram. The same pragmas are no longer
468 forcefully fully analyzed when the context is a subprogram
469 that acts as a compilation unit. Pragmas Abstract_State,
470 Initial_Condition, Initializes and Refined_State have been clean
471 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
472 and Precondition now use the same routine for analysis. Pragma
473 Refined_Post does not need to check the use of 'Result or
474 the lack of a post-state in its expression. Reimplement the
475 analysis of pragma Test_Case.
476 (Analyze_Pre_Post_Condition): New routine.
477 (Analyze_Pre_Post_Condition_In_Decl_Part):
479 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
481 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
482 the proper expression.
483 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
484 (Check_Pre_Post): Removed.
485 (Check_Precondition_Postcondition): Removed.
486 (Check_SPARK_Aspect_For_ASIS): Removed.
487 (Check_Test_Case): Removed.
488 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
489 to obtain the proper expression. Use Corresponding_Spec_Of to
490 find the proper spec.
491 (Create_Generic_Template): New routine.
492 (Duplication_Error): New routine.
493 (Expression_Function_Error): New routine.
494 (Find_Related_Subprogram_Or_Body): Moved to the spec
495 of Sem_Prag. Emit precise error messages. Account for cases of
496 rewritten expression functions, generic instantiations, handled
497 sequence of statements and pragmas from aspects.
498 (Get_Argument): New routine.
499 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
500 (Preanalyze_CTC_Args): Removed.
501 (Process_Class_Wide_Condition): New routine.
502 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
503 the parameter profile along with the comment on usage.
504 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
505 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
506 (Test_Case_Arg): New routine.
507 * sem_util.adb Add with and use clauses for Sem_Ch6.
508 (Add_Contract_Item): This routine now creates a contract
509 node the first time an item is added. Remove the duplicate
510 aspect/pragma checks.
511 (Check_Result_And_Post_State): Reimplemented.
512 (Corresponding_Spec_Of): New routine.
513 (Get_Ensures_From_CTC_Pragma): Removed.
514 (Get_Requires_From_CTC_Pragma): Removed.
515 (Has_Significant_Contract): New routine.
516 (Inherit_Subprogram_Contract): Inherit only if the source
518 (Install_Generic_Formals): New routine.
519 (Original_Aspect_Name): Removed.
520 (Original_Aspect_Pragma_Name): New routine.
521 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
522 (Corresponding_Spec_Of): New routine.
523 (Get_Ensures_From_CTC_Pragma): Removed.
524 (Get_Requires_From_CTC_Pragma): Removed.
525 (Has_Significant_Contract): New routine.
526 (Install_Generic_Formals): New routine.
527 (Original_Aspect_Name): Removed.
528 (Original_Aspect_Pragma_Name): New routine.
529 * sem_warn.adb Add with and use clauses for Sem_Prag.
530 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
532 2015-03-02 Ed Schonberg <schonberg@adacore.com>
534 * sem_ch8.adb (Available_Subtype): Optimization in
535 Find_Selected_Component: when safe, use existing subtype of
536 array component, possibly discriminant-dependent, rather than
537 creating new subtype declaration for it. In this fashion different
538 occurrences of the component have the same subtype, rather than
539 just equivalent ones. Simplifies value tracing in GNATProve.
541 2015-03-01 Arnaud Charlet <charlet@adacore.com>
545 * doc/gnat_ugn/gnat_project_manager.rst,
546 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
547 image, too troublesome with texi format.
548 * gnat_ugn.texi: Regenerate.
550 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
553 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
554 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
555 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
557 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
559 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
561 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
563 2015-02-22 Arnaud Charlet <charlet@adacore.com>
565 * doc/Makefile: postprocess texinfo files to update @dircategory
566 and update texi files under gcc/ada.
567 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
569 2015-02-22 Arnaud Charlet <charlet@adacore.com>
571 * doc/gnat_ugn/project-manager-figure.png,
572 doc/gnat_ugn/rtlibrary-structure.png: New.
574 2015-02-22 Tom de Vries <tom@codesourcery.com>
577 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
578 @item, and fix warning '@itemize has text but no @item'.
580 2015-02-20 Ed Schonberg <schonberg@adacore.com>
582 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
583 legally applies to an abstract subprogram declaration.
584 * freeze.adb: Minor comment addition.
586 2015-02-20 Robert Dewar <dewar@adacore.com>
588 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
589 * erroutc.adb (Set_Msg_Str): Replace _xxx.
590 (Pre/Post/Type_Invariant) by xxx'Class.
591 * erroutc.ads (Set_Msg_Str): Replace _xxx.
592 (Pre/Post/Type_Invariant) by xxx'Class.
593 * sem_prag.adb (Fix_Error): Remove special casing of
594 Name_uType_Invariant.
595 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
596 Name_uPre and Name_uPost in aspect case (done in Errout now).
598 2015-02-20 Robert Dewar <dewar@adacore.com>
600 * g-alveop.adb: Minor style fixes.
602 2015-02-20 Robert Dewar <dewar@adacore.com>
604 * freeze.adb (Warn_Overlay): Guard against blow up with address
607 2015-02-20 Bob Duff <duff@adacore.com>
609 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
610 for the compiler to guess whether the call is internal or external --
611 it is always external.
612 (Expand_Access_To_Protected_Op): For P'Access, where P
613 is a protected subprogram, always create a pointer to the
616 2015-02-20 Robert Dewar <dewar@adacore.com>
618 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
620 2015-02-20 Robert Dewar <dewar@adacore.com>
622 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
623 predicate for non-static subtype.
624 (Build_Predicate_Functions): Do not assume subtype associated with a
625 static predicate must be static.
627 2015-02-20 Robert Dewar <dewar@adacore.com>
629 * errout.adb (Set_Msg_Node): Better handling of internal names
630 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
631 * errout.ads: Document additional case of message deletion.
632 * namet.adb (Is_Internal_Name): Refined to consider wide
633 strings in brackets notation and character literals not to be
635 * sem_ch8.adb (Find_Selected_Component): Give additional error
636 when selector name is a subprogram whose first parameter has
637 the same type as the prefix, but that type is untagged.
639 2015-02-20 Robert Dewar <dewar@adacore.com>
641 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
643 2015-02-20 Tristan Gingold <gingold@adacore.com>
645 * opt.ads (GNAT_Mode_Config): New variable.
646 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
647 to set Assertions_Enabled.
648 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
651 2015-02-20 Robert Dewar <dewar@adacore.com>
653 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
654 comment regarding the handling of unterminated fixed-point
656 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
657 corresponding to those previously added for
658 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
660 2015-02-20 Olivier Hainque <hainque@adacore.com>
662 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
664 2015-02-20 Robert Dewar <dewar@adacore.com>
666 * sem_prag.adb: Minor comment clarification.
668 2015-02-20 Olivier Hainque <hainque@adacore.com>
670 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
671 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
672 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
673 (vec_ctf): Now renamings as well.
675 2015-02-20 Robert Dewar <dewar@adacore.com>
677 * switch-c.adb, bindgen.adb: Minor reformatting.
679 2015-02-20 Ed Schonberg <schonberg@adacore.com>
681 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
682 Invariant'class is allowed on an abstract type.
684 2015-02-20 Ed Schonberg <schonberg@adacore.com>
686 * sem_ch3.adb (Access_Definition): If the access definition is
687 for a protected component and defines an access to protected
688 subprogram, do not create an itype reference for it because a
689 full type declaration will be built in order to generate the
690 proper equivalent type.
691 (Analyze_Subtype_Declaration): Add information of incomplete
692 subtypes, for Ada 2012 extended uses of incomplete types.
694 2015-02-20 Gary Dismukes <dismukes@adacore.com>
696 * sem_res.adb: Minor reformatting.
698 2015-02-20 Vincent Celier <celier@adacore.com>
700 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
701 path name for several switches --RTS, use the normalized path
704 2015-02-20 Vincent Celier <celier@adacore.com>
706 * bindgen.adb: Minor reformatting and code reorganization.
708 2015-02-20 Jose Ruiz <ruiz@adacore.com>
710 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
711 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
714 2015-02-20 Arnaud Charlet <charlet@adacore.com>
716 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
717 obsolete references to RTX, nucleus, VMS.
719 2015-02-20 Ed Schonberg <schonberg@adacore.com>
721 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
722 aspect, use name that mentions Class explicitly, rather than
723 compiler-internal name.
725 2015-02-20 Robert Dewar <dewar@adacore.com>
727 * debug.adb: Add documentation for -gnatd.2 (allow statements
729 * par-ch3.adb (P_Identifier_Declarations): Handle
730 statement appearing where declaration expected more cleanly.
731 (Statement_When_Declaration_Expected): Implement debug flag
734 2015-02-20 Jose Ruiz <ruiz@adacore.com>
736 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
737 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
738 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
739 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
741 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
742 This is the correct name for the dispatching policy (FIFO was
745 2015-02-20 Javier Miranda <miranda@adacore.com>
747 * sem_res.adb (Resolve_Type_Conversion): If the type of the
748 operand is the limited-view of a class-wide type then recover
749 the class-wide type of the non-limited view.
751 2015-02-20 Arnaud Charlet <charlet@adacore.com>
753 * gcc-interface/Makefile.in: Remove references to nucleus.
754 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
755 extern_flag to true for Inline_Always subprograms with
756 Intrinsic convention.
758 2015-02-20 Yannick Moy <moy@adacore.com>
760 * sem_prag.ads: Minor typo in comment.
762 2015-02-20 Pascal Obry <obry@adacore.com>
764 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
766 2015-02-20 Vincent Celier <celier@adacore.com>
768 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
771 2015-02-20 Robert Dewar <dewar@adacore.com>
773 * sem_eval.ads: Minor reformatting.
775 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
777 * freeze.adb (Size_Known): Do not set the packed size for
778 independent type or component.
779 (Freeze_Array_Type): Check for Independent[_Components] with packing
780 or explicit component size clause.
781 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
782 of independence pragmas only for non-GCC back-ends.
783 * sem_ch13.adb (Initialize): Likewise for the initialization.
784 * sem_prag.adb (Record_Independence_Check): New procedure to record an
785 independence check in the table.
786 (Analyze_Pragma): Use it throughout instead of doing it manually.
787 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
788 independent type or component.
790 2015-02-20 Thomas Quinot <quinot@adacore.com>
792 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
793 struct direct and readdir. This is required for NFS filesystems
794 mounted from servers that use 64-bit cookies.
796 2015-02-20 Ed Schonberg <schonberg@adacore.com>
798 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
799 Build_Subprogram_Renaming, to create renaming of subprogram
800 instance in the the declaration of the wrapper package rather
801 than in its body, so that it is available for analysis of aspects
802 propagated from generic to instantiation.
803 (Check_Mismatch): An actual for a formal package that is an
804 incomplete type matches a formal type that is incomplete.
805 (Instantiate_Package_Body): Move code that builds subprogram
806 renaming to Analyze_Subprogram_Instantiation.
807 (Instantiate_Type): The generated subtype is a limited view if
808 the actual is a limited view.
809 (Load_Parent_Of_Generic): Retrieve instance declaration from
810 its new position within wrapper package.
812 2015-02-20 Arnaud Charlet <charlet@adacore.com>
814 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
816 2015-02-20 Robert Dewar <dewar@adacore.com>
818 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
819 issue of negative arguments.
821 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
823 * gnat1drv.adb: Minor consistency fix.
825 2015-02-20 Pascal Obry <obry@adacore.com>
827 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
830 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
832 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
834 * exp_ch6.adb (Expand_Call): Use back-end inlining
835 instead of expansion for simple subprogram renamings.
837 2015-02-20 Robert Dewar <dewar@adacore.com>
839 * exp_util.adb: Minor reformatting.
841 2015-02-20 Vincent Celier <celier@adacore.com>
843 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
844 is specified several times with different values that indicates
845 the same runtime directory.
847 2015-02-20 Ed Schonberg <schonberg@adacore.com>
849 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
850 handle properly illegal uses of attributes on prefixes on an
851 incomplete type, both when the type of the prefix is locally
852 incomplete, and when it is a limited view of a type whose
853 non-limited view is not available.
854 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
857 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
859 * exp_ch6.adb: Fix minor typo in comment.
861 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
863 * sinfo.ads: Add comment.
865 2015-02-20 Olivier Hainque <hainque@adacore.com>
867 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
868 flags controlling the actual FE inlining out of pragma Inline
869 and pragma Inline_Always.
870 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
871 on -fno-inline, which disables all inlining in compilers with
872 an Ada back-end and without back-end inlining support.
873 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
874 flag to True on -fno-inline and leave Inline_Always alone for
876 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
877 names of the Opt flags it sets.
878 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
879 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
880 * sem_prag.adb (Make_Inline): Remove early return conditioned
881 on Opt.Suppress_All_Inlining.
882 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
883 disable the calls to Build_Body_To_Inline otherwise triggered
884 by pragma Inline or Inline_Always. This will prevent actual
885 front-end inlining of the subprogram on calls.
887 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
889 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
890 Abort_Undefer_Direct function.
891 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
892 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
893 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
894 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
896 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
897 Remove call to Register_Backend_Call and move code resetting
898 Needs_Debug_Info on inlined subprograms to...
899 * inline.ads (Add_Inlined_Body): Add N parameter.
900 (Register_Backend_Call): Delete.
901 * inline.adb (Add_Inlined_Body): ...here and simplify.
902 Register the call with Backend_Calls directly.
903 (Register_Backend_Call): Delete.
904 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
906 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
908 * s-stalib.ads: Fix typo.
910 2015-02-20 Ed Schonberg <schonberg@adacore.com>
912 * exp_ch3.adb (Default_Initialize_Object): If the object has a
913 delayed freeze, the actions associated with default initialization
914 must be part of the freeze actions, rather that being inserted
915 directly after the object declaration.
917 2015-02-20 Robert Dewar <dewar@adacore.com>
919 * lib-load.adb: Minor comment update.
921 2015-02-20 Vincent Celier <celier@adacore.com>
923 * prj-proc.adb (Process_Case_Construction): When there are
924 incomplete withed projects and the case variable is unknown,
925 skip the case construction.
927 2015-02-20 Ed Schonberg <schonberg@adacore.com>
929 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
930 when an actual is a view conversion, either because the call is
931 to an inherited operation, or because the actual is an explicit
932 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
934 2015-02-20 Robert Dewar <dewar@adacore.com>
936 * einfo.ads: Minor comment updates Fix missing pragma Inline
937 for Set_Partial_View_Has_Unknown_Discr.
938 * einfo.adb (Write_Entity_Flags): Add missing entry for
939 Partial_View_Has_Unknown_Discr.
940 * sem_ch3.adb: Minor reformatting.
942 2015-02-20 Vincent Celier <celier@adacore.com>
944 * opt.ads: Minor cleanup: remove mention of gprmake.
945 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
946 * s-tataat.adb: Do not call System.Tasking.Self but directly
947 System.Task_Primitives.Operations.Self.
949 2015-02-20 Arnaud Charlet <charlet@adacore.com>
951 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
952 sphinx in the doc directory.
953 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
955 2015-02-20 Robert Dewar <dewar@adacore.com>
957 * sem_res.adb: Minor reformatting.
958 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
960 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
961 aspects from circuitry setting delay required to false if the
962 argument is an integer literal.
964 2015-02-20 Ed Schonberg <schonberg@adacore.com>
966 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
967 on type entities, to enforce AI12-0133: default initialization
968 of types whose partial view has unknown discriminants does not
969 get an invariant check, because clients of the unit can never
970 declare objects of such types.
971 * sem_ch3.adb (Find_Type_Name); Set new flag
972 Partial_View_Has_Unknown_Discr when needed.
973 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
974 generation of invariant call on default-initialized object.
976 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
978 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
979 if the parameter either is passed by reference or if the alignment
982 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
984 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
985 detect primitive operations of tagged and untagged types.
987 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
989 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
990 sets in presence of derivation for subprogram types.
992 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
994 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
995 present in the same context as the declaration.
997 2015-02-07 Jakub Jelinek <jakub@redhat.com>
1000 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
1001 and optimization_current_node after tweaking global_options.
1003 2015-02-05 Robert Dewar <dewar@adacore.com>
1005 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
1006 prj-nmsc.adb: Minor reformatting.
1008 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1010 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
1011 of a protected type may not be available, so to check conformance
1012 with an interface type, examine the interface list in the type
1013 declaration directly.
1014 (Write_Overloads): Improve information for indirect calls,
1017 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1019 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
1020 expansion activity in ASIS mode.
1022 2015-02-05 Javier Miranda <miranda@adacore.com>
1024 * errout.adb (Error_Msg_PT): Add missing error.
1025 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
1026 RM rule. Code cleanup.
1027 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
1028 anonymous access types. Found working on the tests. Code cleanup.
1030 2015-02-05 Vincent Celier <celier@adacore.com>
1032 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
1033 when there are incomplete withs.
1034 * prj-nmsc.adb (Process_Naming): Do not try to get the value
1035 of an element when it is nil.
1036 (Check_Naming): Do not check a nil suffix for illegality
1037 * prj-proc.adb (Expression): Do not process an empty term.
1038 * prj-strt.adb (Attribute_Reference): If attribute cannot be
1039 found, parse a possible index to avoid cascading errors.
1041 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1043 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
1044 for an access_to_subprogram declaration is not a derived type.
1046 2015-02-05 Robert Dewar <dewar@adacore.com>
1048 * errout.adb (Error_Msg_Internal): For non-serious error set
1049 Fatal_Error to Ignored.
1050 * lib-load.adb (Load_Unit): Minor comment updates.
1051 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
1052 setting from with'ed unit to with'ing unit.
1053 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
1056 2015-02-05 Yannick Moy <moy@adacore.com>
1058 * sem_prag.adb, par-prag.adb: Minor code clean up.
1060 2015-02-05 Yannick Moy <moy@adacore.com>
1062 * par-prag.adb (Pragma_Warnings): Update for extended form
1063 of pragma Warnings. The "one" argument case may now have 2 or
1065 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
1066 extended form of pragma Warnings. Pragma with tool name is either
1067 rewritten as null or as an equivalent form without tool name,
1069 * snames.ads-tmpl (Name_Gnatprove): New name.
1071 2015-02-05 Robert Dewar <dewar@adacore.com>
1073 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
1075 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
1076 condition is standard Boolean, it can be non-standard derived
1079 2015-02-05 Robert Dewar <dewar@adacore.com>
1081 * checks.adb (Enable_Range_Check): Disconnect attempted
1082 optimization for the case of range check for subscript of
1083 unconstrained array.
1085 2015-02-05 Robert Dewar <dewar@adacore.com>
1087 * par-ch13.adb (With_Present): New function
1088 (Aspect_Specifications_Present): Handle WHEN in place of WITH
1089 (Get_Aspect_Specifications): Comment update.
1090 * par.adb: Comment updates.
1092 2015-02-05 Robert Dewar <dewar@adacore.com>
1094 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
1095 * frontend.adb (Frontend): New setting of Fatal_Error.
1096 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
1098 (Load_Main_Source): New setting of Fatal_Error
1099 (Load_Unit): New setting of Fatal_Error.
1100 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
1102 (Ensure_System_Dependency): New setting of Fatal_Error.
1103 * lib.adb (Fatal_Error): New setting of Fatal_Error
1104 (Set_Fatal_Error): New setting of Fatal_Error.
1105 * lib.ads: New definition of Fatal_Error and associated routines.
1106 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
1107 * par-load.adb (Load): New setting of Fatal_Error.
1108 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
1109 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
1111 (Optional_Subunit): New setting of Fatal_Error.
1112 (Analyze_Proper_Body): New setting of Fatal_Error.
1113 (Load_Needed_Body): New setting of Fatal_Error.
1115 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1117 * sem_res.adb (Resolve_Call): If the function being called has
1118 out parameters do not check for language version if the function
1119 comes from a predefined unit, as those are always compiled in
1122 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1124 * sem_ch3.adb (Process_Full_View): Verify that the full view
1125 of a type extension must carry an explicit limited keyword if
1126 the partial view does (RM 7.3 (10.1)).
1128 2015-02-05 Robert Dewar <dewar@adacore.com>
1130 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
1131 sem_warn.ads: Minor reformatting.
1132 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
1134 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
1135 error for abstract type.
1137 2015-02-05 Yannick Moy <moy@adacore.com>
1139 * opt.ads (Warn_On_Suspicious_Contract): Update comment
1141 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
1142 suspicious uses of 'Update.
1143 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
1144 function issues warning on suspicious uses of 'Update.
1145 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
1146 package spec and body as SPARK_Mode Off.
1148 2015-02-05 Robert Dewar <dewar@adacore.com>
1150 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
1151 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
1152 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
1153 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1154 for exported entity.
1156 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
1158 * sem_prag.adb (Check_Pragma_Conformance): Add
1159 local variable Arg. Ensure that all errors are associated with
1160 the pragma if it appears without an argument. Add comments on
1163 2015-02-05 Robert Dewar <dewar@adacore.com>
1165 * lib-xref.adb: Minor reformatting.
1167 2015-02-05 Tristan Gingold <gingold@adacore.com>
1169 PR ada/64349da/64349
1170 * env.c: Fix thinko: handle Darwin case before default one.
1172 2015-01-30 Robert Dewar <dewar@adacore.com>
1174 * a-assert.adb: Minor reformatting.
1175 * sem_ch13.adb: Minor comment clarification.
1176 * types.ads: Minor comment update.
1177 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
1178 when we have a predicate that is nothing but an inherited dynamic
1181 2015-01-30 Jerome Guitton <guitton@adacore.com>
1183 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
1184 include cert link spec.
1186 2015-01-30 Robert Dewar <dewar@adacore.com>
1188 * einfo.ads: Minor comment fix.
1189 * freeze.adb (Freeze_Profile): Add test for suspicious import
1191 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
1192 use in Pure unit is now moved to Freeze (to properly catch
1193 Pure_Function exemption).
1195 2015-01-30 Bob Duff <duff@adacore.com>
1197 * sem_res.ads: Minor comment fix.
1198 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
1199 check both operands of an operator.
1201 2015-01-30 Yannick Moy <moy@adacore.com>
1203 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
1204 policy for Pre to Ignore.
1205 (Assert): Add precondition.
1207 2015-01-30 Robert Dewar <dewar@adacore.com>
1209 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
1211 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
1212 documentation for some special cases of invalid attempts at
1215 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1217 * errout.ads: Minor reformatting.
1219 2015-01-30 Yannick Moy <moy@adacore.com>
1221 * inline.adb (Process_Formals): Use the sloc of
1222 the inlined node instead of the sloc of the actual parameter,
1223 when replacing formal parameters by the actual one.
1225 2015-01-30 Arnaud Charlet <charlet@adacore.com>
1227 * g-expect.adb (Get_Command_Output): Use infinite timeout when
1230 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1232 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
1233 defaulted in an instantiation, add an entry in the list of actuals
1234 to indicate the default value of the formal (as is already done
1235 for defaulted subprograms).
1237 2015-01-30 Javier Miranda <miranda@adacore.com>
1239 * errout.adb (Error_Msg_PT): Minor error phrasing update.
1241 2015-01-30 Robert Dewar <dewar@adacore.com>
1243 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
1246 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
1248 * exp_dbug.adb (Get_Encoded_Name): When
1249 -fgnat-encodings=minimal, do not generate names for biased types.
1251 2015-01-30 Tristan Gingold <gingold@adacore.com>
1254 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
1256 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1258 * freeze.adb: Minor reformatting.
1260 2015-01-30 Javier Miranda <miranda@adacore.com>
1262 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
1263 improve its documentation.
1264 * errout.adb (Error_Msg_PT): Improve the error message.
1265 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
1266 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
1267 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
1269 2015-01-30 Robert Dewar <dewar@adacore.com>
1271 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
1272 message for False case.
1274 2015-01-30 Doug Rupp <rupp@adacore.com>
1276 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
1277 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
1280 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1282 * sem_attr.adb (Declared_Within_Generic_Unit):
1283 New function to test whether an entity is declared within the
1284 declarative region of a given generic unit.
1285 (Resolve_Attribute): For checking legality of subprogram'Access within
1286 a generic unit, call new Boolean function Declared_Within_Generic_Unit
1287 instead of simply comparing the results of Enclosing_Generic_Unit on
1288 the prefix and access type. Correct minor comment typos.
1290 2015-01-30 Robert Dewar <dewar@adacore.com>
1292 * freeze.adb, exp_util.ads: Update comment.
1293 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
1294 * sem_util.adb: Minor: fix typo.
1296 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
1298 * sem_attr.adb (Analyze_Attribute): Ensure that
1299 the check concerning Refined_Post takes precedence over the
1302 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1304 * sem_prag.adb: Minor typo fixes and reformatting.
1306 2015-01-30 Yannick Moy <moy@adacore.com>
1308 * sem_attr.adb: Code clean up.
1310 2015-01-30 Robert Dewar <dewar@adacore.com>
1312 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
1313 * ali.ads (Unit_Record): Add new field Serious_Errors.
1314 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
1315 attribute in U line.
1316 * lib-writ.ads: New attribute SE (serious erors) in unit line.
1318 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
1320 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
1321 Lit_Indexes, Scale_Value, Storage_Size_Variable,
1322 String_Literal_Low_Bound along associated routines and
1324 (Pending_Access_Types): New routine.
1325 (Set_Pending_Access_Types): New routine.
1326 (Write_Field15_Name): Add an entry for Pending_Access_Types.
1327 * einfo.ads Add new attribute Pending_Access_Types along
1328 with usage in nodes. Update the usage of attributes
1329 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
1330 Storage_Size_Variable, String_Literal_Low_Bound.
1331 (Pending_Access_Types): New routine along with pragma Inline.
1332 (Set_Pending_Access_Types): New routine along with pragma Inline.
1333 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
1334 Ins_Node. Determine the insertion node for anonynous access type
1335 that acts as a component type of an array. Update the call to
1336 Build_Finalization_Master.
1337 (Expand_Freeze_Record_Type): Update
1338 the calls to Build_Finalization_Master.
1339 (Freeze_Type): Remove
1340 local variable RACW_Seen. Factor out the code that deals with
1341 remote access-to-class-wide types. Create a finalization master
1342 when the designated type contains a private component. Fully
1343 initialize all pending access types.
1344 (Process_RACW_Types): New routine.
1345 (Process_Pending_Access_Types): New routine.
1346 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
1347 needs to set primitive Finalize_Address.
1348 (Expand_N_Allocator): Allocation no longer sets primitive
1350 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1351 Update the call to Build_Finalization_Master.
1352 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
1353 needs to set primitive Finalize_Address.
1354 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
1355 (Build_Finalization_Master): New parameter profile. Associate
1356 primitive Finalize_Address with the finalization master if the
1357 designated type has been frozen, otherwise treat the access
1358 type as pending. Simplify the insertion of the master and
1359 related initialization code.
1360 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
1362 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
1363 Simplify the implementation.
1364 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
1365 along with comment on usage.
1366 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
1367 the comment on usage.
1368 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
1369 Finalize_Address to retrieve the primitive.
1370 (Finalize_Address): New routine.
1371 (Find_Finalize_Address): Removed.
1372 * exp_util.ads (Finalize_Address): New routine.
1373 * freeze.adb (Freeze_All): Remove the generation of finalization
1375 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
1376 pending access types from the partial to the full view.
1378 2015-01-30 Robert Dewar <dewar@adacore.com>
1380 * sem_disp.adb: Minor reformatting.
1381 * sem_disp.ads: Documentation update.
1383 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1385 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
1386 or a function call, return True if type is class-wide.
1387 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
1388 Apply RM 4.5.7 (17/3): all or none of the dependent expression
1389 of a conditional expression must be dynamically tagged.
1391 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1393 * sem_ch6.adb (Analyze_Function_Return): In an extended return
1394 statement, apply accessibility check to result object when there
1395 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
1397 2015-01-30 Robert Dewar <dewar@adacore.com>
1399 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
1400 Boolean for case where ELSE is omitted.
1401 * sem_res.adb: Minor reformatting.
1403 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
1405 Fix build under cygwin/64.
1406 * adaint.h: Add check for __CYGWIN__.
1407 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
1409 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1412 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
1413 * mingw32.h: Don't include <tchar.h> under cygwin.
1414 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
1416 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1418 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
1419 (DEF_FUNCTION_TYPE_VAR_12): New macros.
1421 2015-01-09 Michael Collison <michael.collison@linaro.org>
1423 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
1424 vec.h, double-int.h, input.h, alias.h, symtab.h,
1425 fold-const.h, wide-int.h, and inchash.h due to
1426 flattening of tree.h.
1427 * gcc-interface/decl.c: Ditto.
1428 * gcc-interface/misc.c: Ditto.
1429 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
1430 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
1431 fold-const.h, wide-int.h, and inchash.h due to
1432 flattening of tree.h.
1433 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
1434 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
1435 fold-const.h, wide-int.h, inchash.h due to
1436 flattening of tree.h.
1437 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
1438 vec.h, double-int.h, input.h, alias.h, symtab.h,
1439 fold-const.h, wide-int.h, and inchash.h due to
1440 flattening of tree.h.
1441 * gcc-interface/utils2.c: Ditto.
1443 2015-01-07 Robert Dewar <dewar@adacore.com>
1445 * sem_warn.adb (Check_One_Unit): Don't give unused entities
1446 warning for a package which is used as a generic parameter.
1448 2015-01-07 Bob Duff <duff@adacore.com>
1450 * usage.adb (Usage): Correct documentation of
1453 2015-01-07 Robert Dewar <dewar@adacore.com>
1455 * s-fileio.adb: Minor reformatting.
1457 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1459 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
1460 access to subprogram, replace its formals with new entities when
1461 building the object declaration, both if actual is present and
1462 when it is defaulted.
1464 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1466 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
1467 conversion and type of expression has invariant, apply invariant
1468 check on expression.
1470 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1472 * sem_ch3.adb (Create_Constrained_Components): A call to
1473 Gather_Components may detect an error if an inherited discriminant
1474 that controls a variant is non-static.
1475 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
1476 Gather_Components may report an error if an inherited discriminant
1477 in a variant in non-static.
1478 * sem_util.adb (Gather_Components): If a non-static discriminant
1479 is inherited do not report error here, but let caller handle it.
1480 (Find_Actual): Small optimization.
1482 2015-01-07 Bob Duff <duff@adacore.com>
1484 * usage.adb (Usage): Document -gnatw.f switch.
1486 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1488 * sem_ch12.adb: Code clean up and minor reformatting.
1490 2015-01-07 Robert Dewar <dewar@adacore.com>
1492 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
1493 Raise_Accessibility_Error call.
1494 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
1495 on handling of invalid digits in based constants.
1496 * s-fatgen.ads: Minor reformatting.
1497 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
1498 Avoid noting bogus modification for Valid test.
1499 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
1500 * einfo.ads: Minor reformatting.
1501 * sem_warn.adb: Minor comment clarification.
1502 * sem_ch12.adb: Minor reformatting.
1504 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1506 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
1507 over static predicates when the loop parameter specification
1508 carries a Reverse indicator.
1510 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1512 * sem_ch12.adb (Instantiate_Object): If formal has a default,
1513 actual is missing and formal has an anonymous access type, copy
1514 access definition in full so that tree for instance is properly
1515 formatted for ASIS use.
1517 2015-01-07 Bob Duff <duff@adacore.com>
1519 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
1520 for P'Access, where P is a subprogram in the same package as
1521 the P'Access, and the P'Access is evaluated at elaboration
1522 time, and occurs before the body of P. For example, "X : T :=
1523 P'Access;" would allow a subsequent call to X.all to be an
1524 access-before-elaboration error; hence the warning. This warning
1525 is enabled by the -gnatw.f switch.
1526 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
1527 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
1528 * gnat_ugn.texi: Document the new warning.
1530 2015-01-07 Johannes Kanig <kanig@adacore.com>
1532 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
1535 2015-01-07 Robert Dewar <dewar@adacore.com>
1537 * s-taprop-linux.adb, clean.adb: Minor reformatting.
1539 2015-01-07 Arnaud Charlet <charlet@adacore.com>
1541 * s-tassta.adb: Relax some overzealous assertions.
1543 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1545 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
1546 view of a type is legal when context is a thunk generated for
1547 operation inherited from an interface.
1548 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
1549 a thunk and return type is an incomplete type do not continue
1550 expansion; thunk will be fully elaborated when generating code.
1552 2015-01-07 Doug Rupp <rupp@adacore.com>
1554 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
1555 (QueryPerformanceFrequency): New imported procedure.
1556 * s-taprop-mingw.adb (RT_Resolution): Call above and return
1557 resolution vice a hardcoded value.
1558 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
1559 resolution vice a hardcoded value.
1560 * s-linux-android.ads (clockid_t): New subtype.
1561 * s-osinte-aix.ads (clock_getres): New imported subprogram.
1562 * s-osinte-android.ads (clock_getres): Likewise.
1563 * s-osinte-freebsd.ads (clock_getres): Likewise.
1564 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
1565 * s-osinte-darwin.ads (clock_getres): New subprogram.
1566 * s-osinte-darwin.adb (clock_getres): New subprogram.
1567 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
1568 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
1569 calculate resolution vice hard coded value.
1571 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1573 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
1574 limited view, use non-limited view when available to create
1575 equivalent record type.
1577 2015-01-07 Vincent Celier <celier@adacore.com>
1579 * gnatcmd.adb: Remove command Sync and any data and processing
1580 related to this command. Remove project processing for gnatstack.
1581 * prj-attr.adb: Remove package Synchonize and its attributes.
1583 2015-01-07 Vincent Celier <celier@adacore.com>
1585 * clean.adb: Minor error message change.
1587 2015-01-07 Tristan Gingold <gingold@adacore.com>
1590 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
1592 2015-01-07 Javier Miranda <miranda@adacore.com>
1594 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
1595 protect the frontend against never ending recursion caused by
1596 circularities in the sources.
1598 2015-01-07 Robert Dewar <dewar@adacore.com>
1600 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
1601 exp_ch3.adb: Minor reformatting.
1603 2015-01-07 Doug Rupp <rupp@adacore.com>
1605 * s-linux.ads (clockid_t): New subtype.
1606 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
1607 (clockid_t): New subtype.
1608 (clock_getres): Import system call.
1609 * s-taprop-linux.adb (System.OS_Constants): With and rename.
1610 (RT_Resolution): Remove
1611 hardcoded value and call clock_getres.
1612 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
1613 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
1615 2015-01-07 Robert Dewar <dewar@adacore.com>
1617 * sem_warn.adb (Check_One_Unit): Guard against context item
1618 with no Entity field.
1620 2015-01-07 Vincent Celier <celier@adacore.com>
1622 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
1623 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
1625 2015-01-07 Vincent Celier <celier@adacore.com>
1627 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
1628 errors/warnings in the first parsing of the project files,
1629 to display the warnings when there is no errors.
1631 2015-01-07 Tristan Gingold <gingold@adacore.com>
1633 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
1635 2015-01-07 Doug Rupp <rupp@adacore.com>
1637 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
1638 value from Int_Lock as parameter to Int_Unlock.
1639 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
1640 * s-vxwext.ads (Int_Unlock): Likewise.
1641 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
1642 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
1643 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
1644 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
1646 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
1648 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
1651 2015-01-07 Tristan Gingold <gingold@adacore.com>
1653 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
1656 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
1658 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
1659 automatically set No_Strict_Aliasing on access types.
1660 * fe.h (No_Strict_Aliasing_CP): Declare.
1661 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
1662 No_Strict_Aliasing_CP is set.
1664 2015-01-07 Johannes Kanig <kanig@adacore.com>
1666 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
1667 not build function wrapper in gnatprove mode when the package
1668 is externally axiomatized.
1670 2015-01-07 Jose Ruiz <ruiz@adacore.com>
1672 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
1673 intermediate computations when the parameters have different signs.
1675 2015-01-07 Javier Miranda <miranda@adacore.com>
1677 * exp_ch3.adb (Build_Init_Procedure): For derived types,
1678 improve the code which takes care of identifying and moving to
1679 the beginning of the init-proc the call to the init-proc of the
1682 2015-01-07 Olivier Hainque <hainque@adacore.com>
1684 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
1685 Elaborate the expression as part of the same stmt group as the actions.
1687 2015-01-07 Robert Dewar <dewar@adacore.com>
1689 * sem_ch3.adb: Minor error message change.
1691 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1693 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
1694 Following AI05-028, the pragam applies legally to any composite type.
1696 2015-01-07 Arnaud Charlet <charlet@adacore.com>
1698 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
1699 (sigwait, sigwaitinfo): Removed, not needed after all on any
1700 VxWorks configurations.
1702 2015-01-07 Robert Dewar <dewar@adacore.com>
1704 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
1706 2015-01-07 Javier Miranda <miranda@adacore.com>
1708 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
1709 generation of accessibility check.
1711 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1713 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
1714 illegal completion from a class- wide type, set etype of the
1715 derived type properly to prevent cascaded errors.
1717 2015-01-07 Robert Dewar <dewar@adacore.com>
1719 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
1722 2015-01-07 Robert Dewar <dewar@adacore.com>
1724 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
1726 (OK_No_Use_Of_Entity_Name): New function.
1727 (Set_Restriction_No_Use_Of_Entity): New procedure.
1728 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
1730 (OK_No_Use_Of_Entity_Name): New function.
1731 (Set_Restriction_No_Use_Of_Entity): New procedure.
1732 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
1734 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1735 Add processing for new restriction No_Use_Of_Entity.
1737 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
1739 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
1740 component type as to Has_Atomic_Components type. Remove useless
1741 test on Is_Aliased component type.
1743 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
1745 * alloc.ads Alphabetize several declarations. Add constants
1746 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
1747 * atree.adb Add with and use clauses for Opt.
1748 (Allocate_Initialize_Node): Mark a node as ignored Ghost
1749 if it is created in an ignored Ghost region.
1750 (Ekind_In): New variant.
1751 (Is_Ignored_Ghost_Node): New routine.
1752 (Set_Is_Ignored_Ghost_Node): New routine.
1753 * atree.adb Aplhabetize several subprograms declarations. Flag
1754 Spare0 is now known as Is_Ignored_Ghost_Node.
1755 (Ekind_In): New variant.
1756 (Is_Ignored_Ghost_Node): New routine.
1757 (Set_Is_Ignored_Ghost_Node): New routine.
1758 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
1759 (Contains_Ignored_Ghost_Code): New routine.
1760 (Set_Contains_Ignored_Ghost_Code): New routine.
1761 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
1762 It is now possible to set this property on an unanalyzed entity.
1763 (Write_Entity_Flags): Output the status of flag
1764 Contains_Ignored_Ghost_Code.
1765 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
1767 (Contains_Ignored_Ghost_Code): New routine
1768 along with pragma Inline.
1769 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
1770 * exp_ch3.adb Add with and use clauses for Ghost.
1771 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
1772 Set the Ghost_Mode in effect.
1773 (Restore_Globals): New routine.
1774 * exp_ch7.adb (Process_Declarations): Do not process a context
1775 that invoves an ignored Ghost entity.
1776 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
1777 construct that has been rewritten as a null statement.
1778 * exp_disp.adb Add with and use clauses for Ghost.
1779 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
1780 the Ghost_Mode in effect.
1781 (Restore_Globals): New routine.
1782 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
1783 does not require any clean up. Add two missing cases that deal
1784 with block statements.
1785 * freeze.adb Add with and use clauses for Ghost.
1786 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
1787 Set the Ghost_Mode in effect.
1788 (Restore_Globals): New routine.
1789 * frontend.adb Add with and use clauses for Ghost. Remove any
1790 ignored Ghost code from all units that qualify.
1791 * ghost.adb New unit.
1792 * ghost.ads New unit.
1793 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
1794 the table in package Ghost.
1795 * lib.ads: Alphabetize several subprogram declarations.
1796 * lib-xref.adb (Output_References): Do not generate reference
1797 information for ignored Ghost entities.
1798 * opt.ads Add new type Ghost_Mode_Type and new global variable
1800 * rtsfind.adb (Load_RTU): Provide a clean environment when
1801 loading a runtime unit.
1802 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
1803 entry/exit as the node may set a different mode.
1805 Capture/restore the value of Ghost_Mode on entry/exit as the
1806 unit may be withed from a unit with a different Ghost mode.
1807 * sem_ch3.adb Add with and use clauses for Ghost.
1808 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
1809 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
1810 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
1811 the entity as Ghost when there is a Ghost_Mode in effect.
1812 (Array_Type_Declaration): The implicit base type inherits the
1813 "ghostness" from the array type.
1814 (Derive_Subprogram): The
1815 alias inherits the "ghostness" from the parent subprogram.
1816 (Make_Implicit_Base): The implicit base type inherits the
1817 "ghostness" from the parent type.
1818 * sem_ch5.adb Add with and use clauses for Ghost.
1819 (Analyze_Assignment): Set the Ghost_Mode in effect.
1820 * sem_ch6.adb Add with and use clauses for Ghost.
1821 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
1822 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
1823 Set the Ghost_Mode in effect. Mark the entity as Ghost when
1824 there is a Ghost_Mode in effect.
1825 * sem_ch7.adb Add with and use clauses for Ghost.
1826 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
1827 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
1828 effect. Mark the entity as Ghost when there is a Ghost_Mode
1830 * sem_ch8.adb Add with and use clauses for Ghost.
1831 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
1832 Analyze_Object_Renaming, Analyze_Package_Renaming,
1833 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
1834 the entity as Ghost when there is a Ghost_Mode in effect.
1835 (Find_Type): Check the Ghost context of a type.
1836 * sem_ch11.adb Add with and use clauses for Ghost.
1837 (Analyze_Exception_Declaration): Set the Ghost_Mode in
1838 effect. Mark the entity as Ghost when there is a Ghost_Mode
1840 * sem_ch12.adb Add with and use clauses for Ghost.
1841 (Analyze_Generic_Package_Declaration,
1842 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
1843 Mark the entity as Ghost when there is a Ghost_Mode in effect.
1844 * sem_prag.adb Add with and use clauses for Ghost.
1845 (Analyze_Pragma): Ghost-related checks are triggered when there
1846 is a Ghost mode in effect.
1847 (Create_Abstract_State): Mark the
1848 entity as Ghost when there is a Ghost_Mode in effect.
1849 * sem_res.adb Add with and use clauses for Ghost.
1850 (Check_Ghost_Context): Removed.
1851 * sem_util.adb (Check_Ghost_Completion): Removed.
1852 (Check_Ghost_Derivation): Removed.
1853 (Incomplete_Or_Partial_View):
1854 Add a guard in case the entity has not been analyzed yet
1855 and does carry a scope.
1856 (Is_Declaration): New routine.
1857 (Is_Ghost_Entity): Removed.
1858 (Is_Ghost_Statement_Or_Pragma):
1860 (Is_Subject_To_Ghost): Removed.
1861 (Set_Is_Ghost_Entity):
1863 (Within_Ghost_Scope): Removed.
1864 * sem_util.adb (Check_Ghost_Completion): Removed.
1865 (Check_Ghost_Derivation): Removed.
1866 (Is_Declaration): New routine.
1867 (Is_Ghost_Entity): Removed.
1868 (Is_Ghost_Statement_Or_Pragma): Removed.
1869 (Is_Subject_To_Ghost): Removed.
1870 (Set_Is_Ghost_Entity): Removed.
1871 (Within_Ghost_Scope): Removed.
1872 * sinfo.ads Add a section on Ghost mode.
1873 * treepr.adb (Print_Header_Flag): New routine.
1874 (Print_Node_Header): Factor out code. Output flag
1875 Is_Ignored_Ghost_Node.
1876 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
1878 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
1880 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
1881 true test and unreachable 'else' arm.
1883 2015-01-06 Vincent Celier <celier@adacore.com>
1885 * prj-conf.adb (Check_Target): Improve error message when
1886 there are mismatched targets between the on in the configuration
1887 project file and the specified one, either in the main project
1888 file or in the --target= switch.
1890 2015-01-06 Pascal Obry <obry@adacore.com>
1892 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
1893 Install_Name attribute definitions.
1895 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1897 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
1898 generated Import pragma for the internal imported procedure does
1899 not come from an aspect, so that Is_Imported can be properly
1902 2015-01-06 Gary Dismukes <dismukes@adacore.com>
1904 * sem_ch12.adb (Might_Inline_Subp): Record whether
1905 any subprograms in the generic package are marked with
1906 pragma Inline_Always (setting flag Has_Inline_Always).
1907 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
1908 alongside existing test of Front_End_Inlining as alternative
1909 conditions for setting Inline_Now. Also add test of
1910 Has_Inline_Always along with Front_End_Inlining test as an
1911 alternative condition for setting Needs_Body to False.
1913 2015-01-06 Tristan Gingold <gingold@adacore.com>
1915 * i-cpoint.adb (Copy_Array): Handle overlap.
1917 2015-01-06 Pascal Obry <obry@adacore.com>
1919 * bindgen.adb: Minor style fix.
1921 2015-01-06 Robert Dewar <dewar@adacore.com>
1923 * sem_util.ads, sem_util.adb: Minor reformatting.
1925 2015-01-06 Vincent Celier <celier@adacore.com>
1927 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
1928 with flags before parsing the projects.
1929 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
1930 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
1931 to True in the flags, when Ignore_Missing_With is True and an
1932 imported project cannot be found.
1933 * prj-proc.adb (Expression): When there are incomplete withs and
1934 a variable or attribute is not found, set the variable/attribute
1936 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
1939 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
1941 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
1942 prj-err.adb: Add new switch --no-command-line.
1944 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1946 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
1948 2015-01-06 Robert Dewar <dewar@adacore.com>
1950 * sem_ch11.adb: Minor reformatting.
1952 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1954 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
1955 Build_Array_Aggr_Code, used to initialized components covered
1956 by a box association. If the component type is scalar and has
1957 a default aspect, use it to initialize such components.
1959 2015-01-06 Pascal Obry <obry@adacore.com>
1961 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
1962 control the setup of the exception handler.
1963 * initialize.c: Remove unused declaration.
1964 * bindgen.adb: Always call __gnat_runtime_initialize and pass
1965 whether the exeception handler must be set or not.
1967 2015-01-06 Thomas Quinot <quinot@adacore.com>
1969 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
1970 order to native from default, make sure to also adjust bit order.
1971 * exp_aggr.adb: Minor reformatting.
1973 2015-01-06 Robert Dewar <dewar@adacore.com>
1975 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
1976 s-valrea.adb, s-valrea.ads: Add some additional guards for
1977 Str'Last = Positive'Last.
1979 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1981 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
1984 2015-01-06 Javier Miranda <miranda@adacore.com>
1986 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
1988 2015-01-06 Thomas Quinot <quinot@adacore.com>
1990 * sem_util.ads: Minor reformatting.
1991 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
1992 (In_RCI_Declaration) Return to old name, as proper checking of
1993 entity being in the visible part depends on entity kind and must
1994 be done by the caller.
1996 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1998 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
1999 for operators in SPARK.
2001 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2003 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
2004 expression in an others association before making copies for
2005 separate resolution and accessibility checks. This ensures that
2006 the type of the expression is available to ASIS in all cases,
2007 in particular if the expression is itself an aggregate.
2009 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2011 * einfo.ads (Has_Independent_Components): Document extended
2013 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
2014 (Set_Has_Independent_Components): Adjust assertion.
2015 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
2016 for pragma Atomic_Components. Set Has_Independent_Components
2017 on the object instead of the type for an object declaration with
2018 pragma Independent_Components.
2020 2015-01-06 Olivier Hainque <hainque@adacore.com>
2022 * set_targ.adb (Read_Target_Dependent_Values): Set
2023 Long_Double_Index when "long double" is read.
2024 (elaboration code): Register_Back_End_Types only when not reading from
2025 config files. Doing otherwise is pointless and error prone.
2027 2015-01-06 Robert Dewar <dewar@adacore.com>
2029 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
2031 2015-01-06 Robert Dewar <dewar@adacore.com>
2033 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
2034 Str'Last = Positive'Last.
2036 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2038 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
2039 where the non-limited type is a generic actual and appears as
2040 a subtype of the non-limited view of the other.
2041 * freeze.adb (Build_Renamed_Body): If the return type of the
2042 declaration that is being completed is a limited view and the
2043 non-limited view is available, use it in the specification of
2046 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2048 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
2049 incomplete view, the type of the classwide type common to both
2050 views is the type being declared.
2052 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2054 * einfo.ads (Is_Independent): Further document extended usage.
2056 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2058 * einfo.ads (Is_Independent): Document extended usage.
2059 * einfo.adb (Is_Independent): Remove obsolete assertion.
2060 (Set_Is_Independent): Likewise.
2061 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
2062 (Process_Atomic_Independent_Shared_Volatile): ...this.
2063 Deal with pragma Independent here.
2064 (Analyze_Pragma): Adjust
2065 to above renaming and also invoke it for pragma Independent.
2066 Adjust comment for Independent_Components.
2068 2015-01-06 Robert Dewar <dewar@adacore.com>
2070 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
2071 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
2073 2015-01-06 Robert Dewar <dewar@adacore.com>
2075 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
2077 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
2078 Str'Last = Positive'Last.
2080 2015-01-06 Robert Dewar <dewar@adacore.com>
2082 * sem_prag.adb (Process_Inline): Remove redundant construct
2083 warning (-gnatw.r) for an ineffective pragma Inline.
2085 2015-01-06 Robert Dewar <dewar@adacore.com>
2087 * s-valint.adb: Fix typo in last checkin.
2088 * s-valuns.adb (Value_Unsigned): More efficient fix for
2090 * sem_attr.adb (Analyze_Attribute): Minor reformatting
2091 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
2093 2015-01-06 Robert Dewar <dewar@adacore.com>
2095 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
2096 Str'Last = Positive'Last
2098 2015-01-06 Thomas Quinot <quinot@adacore.com>
2100 * xoscons.adb: Display exception information and return non-zero
2101 exit status in top level exception handler.
2103 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2105 * sem_ch8.adb: Code clean up.
2107 2015-01-06 Tristan Gingold <gingold@adacore.com>
2109 * targparm.ads: Remove obsolete comment.
2111 2015-01-06 Olivier Hainque <hainque@adacore.com>
2113 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
2114 constructing a ref to variable, update inner_const_flag from the
2115 variable TREE_READONLY attribute.
2116 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
2118 (get_target_float_size): Remove.
2119 (get_target_double_size): Remove.
2120 (get_target_long_double_size): Remove.
2122 2015-01-06 Pascal Obry <obry@adacore.com>
2124 * adaint.c (ProcListEvt): Set to NULL.
2125 * rtinit.c: New file.
2126 (__gnat_rt_init_count): New reference counter set to 0.
2127 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
2128 this code is actually needed for the runtime initialization. This
2129 routine returns immediately if the initialization has already been done.
2130 * final.c: Revert previous change.
2131 * rtfinal.c: New file.
2132 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
2133 section and event. The default version of this routine is empty (except
2134 for the reference counting code). This routine returns immediately if
2135 some others libraries are referencing the runtime.
2136 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
2137 remove circuitry to initialize the signal handler as this is
2138 now done by the runtime initialization routine.
2139 (Gen_Adafinal): Generate call to Runtime_Finalize.
2140 * gnat_ugn.texi: Update documentation about concurrency and
2141 initialization/finalization of the run-time.
2142 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
2143 references to rtfinal.o and rtinit.o
2145 2015-01-06 Robert Dewar <dewar@adacore.com>
2147 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2149 * sem_attr.adb: Implement Enum_Image attribute.
2150 * snames.ads-tmpl: Add entries for Enum_Image attribute.
2152 2015-01-06 Robert Dewar <dewar@adacore.com>
2154 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
2155 * restrict.ads (No_Use_Of_Entity): New table.
2156 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2157 Ignore No_Use_Of_Entity (will be processed in parser).
2158 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
2160 2015-01-06 Vincent Celier <celier@adacore.com>
2162 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
2163 to check for an extended project, if a project does not have
2164 yet a project declaration.
2166 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
2168 * scos.ads: Update documentation about the SCO table build
2169 process and about table records format.
2170 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
2171 (SCO_Record_Filtered): New procedure.
2172 (Set_SCO_Logical_Operator): New procedure.
2173 (dsco): Update documentation.
2174 * par_sco.adb: Update library-level comments.
2175 (SCO_Generation_State_Type): New type.
2176 (SCO_Generation_State): New variable.
2177 (SCO_Raw_Table): New package instanciation.
2178 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
2180 (Tristate): New type.
2181 (Is_Logical_Operator): Return Tristate and update documentation.
2182 (Has_Decision): Update call to Is_Logical_Operator and complete
2184 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
2185 comment, add an assertion for state checking and change
2186 references to SCO_Table into SCO_Raw_Table.
2187 (dsco): Refactor to dump the raw and the filtered tables.
2188 (Process_Decisions.Output_Decision_Operand): Handle putative
2189 short-circuit operators.
2190 (Process_Decisions.Output_Element): Update references
2191 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2192 (Process_Decisions.Process_Decision_Operand): Update call
2193 to Is_Logical_Operator.
2194 (Process_Decisions.Process_Node): Handle putative short-circuit
2195 operators and change references to
2196 SCO_Table into SCO_Raw_Table.
2197 (SCO_Output): Add an assertion
2198 for state checking and remove code that used to stamp out SCO entries.
2199 (SCO_Pragma_Disabled): Change reference to SCO_Table
2201 (SCO_Record): Rename to SCO_Record_Raw,
2202 add an assertion for state checking and change references
2203 to SCO_Table into SCO_Raw_Table.
2204 (Set_SCO_Condition): Add an assertion for state checking, update
2205 references to Condition_Pragma_Hash_Table and change references to
2206 SCO_Table into SCO_Raw_Table.
2207 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
2208 change references to SCO_Table into SCO_Raw_Table.
2209 (Set_SCO_Logical_Operator): New procedure.
2210 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
2211 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2212 (SCO_Record_Fildered): New procedure.
2213 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
2214 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
2216 * par-load.adb (Load): Update reference to SCO_Record.
2217 * par.adb (Par): Update reference to SCO_Record.
2218 * put_scos.adb (Put_SCOs): Add an assertion to check that no
2219 putative SCO condition reaches this end.
2220 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
2221 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
2222 when corresponding to an "and"/"or" operator affected by the
2223 Short_Circuit_And_Or pragma.
2225 2015-01-06 Robert Dewar <dewar@adacore.com>
2227 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
2228 msg for attempted USE of generic subprogram or subprogram.
2230 2015-01-06 Robert Dewar <dewar@adacore.com>
2232 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
2233 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
2234 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
2236 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2238 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
2239 that specify stream subprograms, if the prefix is a class-wide
2240 type then the generated attribute definition clause must apply
2241 to the same class-wide type.
2242 (Default_Iterator): An iterator defined by an aspect of some
2243 container type T must have a first parameter of type T, T'class,
2244 or an access to such (from code reading RM 5.5.1 (2/3)).
2246 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2248 * gnat1drv.adb: Minor: complete previous change.
2250 2015-01-06 Olivier Hainque <hainque@adacore.com>
2252 * set_targ.ads (C_Type_For): New function. Return the name of
2253 a C type supported by the back-end and suitable as a basis to
2254 construct the standard Ada floating point type identified by
2255 the T parameter. This is used as a common ground to feed both
2256 ttypes values and the GNAT tree nodes for the standard floating
2258 * set_targ.adb (Long_Double_Index): The index at which "long
2259 double" gets registered in the FPT_Mode_Table. This is useful to
2260 know whether we have a "long double" available at all and get at
2261 it's characteristics without having to search the FPT_Mode_Table
2262 when we need to decide which C type should be used as the
2263 basis for Long_Long_Float in Ada.
2264 (Register_Float_Type): Fill Long_Double_Index.
2265 (FPT_Mode_Index_For): New function. Return the index in
2266 FPT_Mode_Table that designates the entry corresponding to the
2267 provided C type name.
2268 (FPT_Mode_Index_For): New function. Return the index in
2269 FPT_Mode_Table that designates the entry for a back-end type
2270 suitable as a basis to construct the standard Ada floating point
2271 type identified by the input T parameter.
2272 (elaboration code): Register_Back_End_Types unconditionally,
2273 so C_Type_For can operate regardless of -gnateT. Do it
2274 early so we can query it for the floating point sizes, via
2275 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
2276 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
2277 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
2278 which C type should be used as the basis for the construction
2279 of the Standard Ada floating point types.
2280 * get_targ.ads (Get_Float_Size, Get_Double_Size,
2281 Get_Long_Double_Size): Remove.
2282 * get_targ.adb: Likewise.
2284 2015-01-06 Thomas Quinot <quinot@adacore.com>
2286 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
2287 parameter and rename to...
2288 (In_RCI_Visible_Declarations): Fix handling of private part of nested
2290 (Validate_RCI_Subprogram_Declaration): Reject illegal function
2291 returning anonymous access in RCI unit.
2293 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2295 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
2296 function wrapper may be a homonym of another local declaration.
2297 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
2298 build function and operator wrappers after the actual subprogram
2299 has been resolved, and replace the standard renaming declaration
2300 with the declaration of wrapper.
2301 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
2302 make public for use elsewhere.
2303 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
2304 rewrite, now that actual is fully resolved when wrapper is
2307 2015-01-06 Javier Miranda <miranda@adacore.com>
2309 * exp_disp.adb: Revert previous change.
2311 2015-01-06 Robert Dewar <dewar@adacore.com>
2313 * exp_util.adb: Change name Name_Table_Boolean to
2314 Name_Table_Boolean1.
2315 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
2316 Introduce Name_Table_Boolean2/3.
2317 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
2318 Introduce Name_Table_Boolean2/3.
2319 * par-ch13.adb: Change name Name_Table_Boolean to
2320 Name_Table_Boolean1.
2322 2015-01-06 Bob Duff <duff@adacore.com>
2324 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
2326 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2328 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
2329 others choice that covers multiple components, analyze each
2330 copy with the type of the component even in compile-only mode,
2331 to detect potential accessibility errors.
2333 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2335 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
2336 (Resolve_Actuals): An effectively volatile out
2337 parameter cannot act as an in or in out actual in a call.
2338 (Resolve_Entity_Name): An effectively volatile out parameter
2341 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2343 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2344 the expansion of an expression function it may be pre-analyzed
2345 if a 'access attribute is applied to the function, in which case
2346 last_entity may have been assigned already.
2348 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2350 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
2351 type and actual has the corresponding full view, there is no
2352 error, but a case of use of incomplete type in a predicate or
2353 invariant expression.
2355 2015-01-06 Vincent Celier <celier@adacore.com>
2357 * makeutl.adb (Insert_No_Roots): Make sure that the same source
2358 in two different project tree is checked in both trees, if they
2359 are sources of two different projects, extended or not.
2361 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2363 * gnat1drv.adb: Minor code clean up.
2364 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
2366 2015-01-06 Bob Duff <duff@adacore.com>
2368 * osint.adb (Read_Source_File): Don't print out
2369 file name unless T = Source.
2371 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2373 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
2374 recognize improper uses of constant_reference types as actuals
2375 for in-out parameters.
2376 (Check_Function_Call): Do not collect identifiers if function
2377 name is missing because of previous error.
2379 2015-01-06 Robert Dewar <dewar@adacore.com>
2381 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
2382 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
2383 Minor change of name Name_Table_Info => Name_Table_Int.
2385 2015-01-06 Robert Dewar <dewar@adacore.com>
2387 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
2388 in previous checkin.
2389 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
2391 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
2393 2015-01-06 Vincent Celier <celier@adacore.com>
2395 * a-strsup.adb (Times (Natural;String;Positive)): Raise
2396 Length_Error, not Index_Error, when the result is too long.
2398 2015-01-06 Thomas Quinot <quinot@adacore.com>
2400 * a-direct.adb (Create_Path): Minor error handling and
2401 performance improvement.
2403 2015-01-06 Robert Dewar <dewar@adacore.com>
2405 * checks.ads, sem_ch12.adb: Minor reformatting.
2406 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
2407 zero check for fixed-point case if Backend_Divide_Checks_On_Target
2410 2015-01-06 Robert Dewar <dewar@adacore.com>
2412 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2413 Do not set restriction No_Elaboration_Code unless the pragma
2414 appears in the main unit).
2416 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2418 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
2419 that with clause has already been analyzed before checking kind
2422 2015-01-06 Robert Dewar <dewar@adacore.com>
2424 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
2425 (as required by RM).
2427 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2429 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
2431 2015-01-06 Robert Dewar <dewar@adacore.com>
2433 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
2434 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
2436 2015-01-06 Javier Miranda <miranda@adacore.com>
2438 * exp_disp.adb (Expand_Interface_Conversion): No displacement
2439 of the pointer to the object needed when the type of the operand
2440 is not an interface type and the interface is one of its parent
2441 types (since they share the primary dispatch table).
2443 2015-01-06 Vincent Celier <celier@adacore.com>
2445 * prj-env.adb: Minor comment update.
2447 2015-01-06 Javier Miranda <miranda@adacore.com>
2449 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
2450 access types whose target type is an interface type to operands
2451 that are access types; required to report an error when the
2452 operand is not an access type.
2454 2015-01-06 Bob Duff <duff@adacore.com>
2456 * a-cfinve.adb (Copy): Set the discriminant to the Length when
2458 * a-cofove.ads (Capacity): Add a postcondition.
2459 * a-cfinve.ads (Capacity): Add a postcondition.
2460 (Reserve_Capacity): Correct the postcondition in the case where
2461 Capacity = 0; that means "Capacity => Length (Container)".
2462 * a-cofove.adb (Elems[c]): Add a comment
2463 explaining the dangers and how to avoid them.
2465 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2467 * sem_ch12.adb: Code clean up.
2469 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2471 * gnatvsn.ads: Bump copyright year.
2473 2015-01-06 Robert Dewar <dewar@adacore.com>
2475 * s-taskin.ads, s-traces.ads: Minor reformatting.
2476 * exp_util.adb: Minor typo fix.
2478 2015-01-06 Vincent Celier <celier@adacore.com>
2480 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
2481 with the runtime name.
2482 * prj-env.adb (Initialize_Default_Project_Path): When both
2483 Target_Name and Runtime_Name are not empty string, add to the
2484 project path the two directories .../lib/gnat and .../share/gpr
2485 related to the runtime.
2486 * prj-env.ads (Initialize_Default_Project_Path): New String
2487 parameter Runtime_Name, defaulted to the empty string.
2489 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2491 * frontend.adb: Guard against the case where a configuration
2492 pragma may be split into multiple pragmas and the original
2493 rewritten as a null statement.
2494 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
2495 pragma using Insert_Before rather than Insert_Action. This
2496 takes care of the configuration pragma case where Insert_Action
2499 2015-01-06 Bob Duff <duff@adacore.com>
2501 * a-coboho.ads (Element_Access): Add "pragma
2502 No_Strict_Aliasing (Element_Access);". This is needed because
2503 we are unchecked-converting from Address to Element_Access.
2504 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
2507 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2509 * sem_res.adb (Resolve_Actuals): Remove the
2510 restriction which prohibits volatile actual parameters with
2511 enabled external propery Async_Writers to act appear in procedure
2512 calls where the corresponding formal is of mode OUT.
2514 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2516 * gnat_ugn.texi: Bump @copying's copyright year.
2518 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
2521 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
2523 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
2525 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
2526 of unchecked asprintf.
2529 Copyright (C) 2015 Free Software Foundation, Inc.
2531 Copying and distribution of this file, with or without modification,
2532 are permitted in any medium without royalty provided the copyright
2533 notice and this notice are preserved.