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