1 2016-05-02 Thomas Quinot <quinot@adacore.com>
3 * freeze.adb (Check_Component_Storage_Order): Get full view of
6 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
8 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
11 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
13 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
14 of the container base type in case the container is a subtype.
15 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
16 the selector has an entity when checking for a component of a
19 2016-05-02 Arnaud Charlet <charlet@adacore.com>
22 * opt.ads (Latest_Ada_Only): New flag.
23 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
24 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
25 * einfo.ads (Has_Predicates, Predicate_Function):
26 Clarify that Has_Predicates does not imply that Predicate_Function
27 will return a non-empty entity.
29 2016-05-02 Ed Schonberg <schonberg@adacore.com>
31 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
32 check if type requires it.
33 * checks.adb (Apply_Predicate_Check): Disable checks in the
34 object declaration created for an expression with side-effects
35 that requires a predicate check to prevent infinite recursion
38 2016-05-02 Ed Schonberg <schonberg@adacore.com>
40 * sem_ch6.adb (Process_Formals): Check properly the type of a
41 formal to determine whether a given convention applies to it.
43 2016-05-02 Doug Rupp <rupp@adacore.com>
45 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
47 2016-05-02 Thomas Quinot <quinot@adacore.com>
49 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
50 error, to have a component with implicit SSO within a composite type
51 that has explicit SSO.
53 2016-05-02 Bob Duff <duff@adacore.com>
55 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
57 2016-05-02 Ed Schonberg <schonberg@adacore.com>
59 * repinfo.adb (List_Entities): Make procedure recursive, to
60 provide representation information for subprograms declared
61 within subprogram bodies.
63 2016-05-02 Arnaud Charlet <charlet@adacore.com>
65 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
66 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
67 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
68 osint.adb: Remove dead code.
70 2016-05-02 Yannick Moy <moy@adacore.com>
72 * a-tigeli.adb (Get_Line): Fix bound for test to
73 decide when to compensate for character 0 added by call to fgets.
75 2016-05-02 Ed Schonberg <schonberg@adacore.com>
77 * sem_ch4.adb (Analyze_Allocator): If the expression does not
78 have a subtype indication and the type is an unconstrained tagged
79 type with defaulted discriminants, create an explicit constraint
80 for it during analysis to prevent out-of-order freezing actions
81 on generated classwide types.
83 2016-05-02 Javier Miranda <miranda@adacore.com>
85 * exp_ch5.adb (Expand_N_Assignment_Statement):
86 In the runtime check that ensures that the tags of source an
87 target match, add missing displacement of the pointer to the
88 objects if they cover interface types.
90 2016-05-02 Ed Schonberg <schonberg@adacore.com>
92 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
93 base type for attribute when type is discrete: transformation
94 is not needed for such types, and leads to spurious errors if
95 the context is a case construct.
97 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
99 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
100 operand #2 for COMPONENT_REF.
101 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
102 (gnat_protect_expr): Likewise.
103 (gnat_stabilize_reference_1): Likewise.
104 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
105 (get_inner_constant_reference): Likewise.
106 (gnat_invariant_expr): Likewise.
107 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
109 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
111 * gcc-interface/trans.c (Range_to_gnu): New static function.
112 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
113 (gnat_to_gnu) <N_In>: Likewise.
115 2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
117 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
118 (check-acats): Use it.
119 (check_acats_targets): Likewise.
121 2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
124 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
126 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
128 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
129 incomplete type without full view.
130 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
131 return the list of changes.
132 (Restore_Limited_Views): New procedure to undo the transformation made
133 by Exchange_Limited_Views.
134 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
135 and call Restore_Limited_Views at the end, if need be.
136 (Possible_Freeze): Do not delay freezing because of incomplete types.
137 (Process_Formals): Remove kludges for class-wide types.
138 * types.h (By_Copy_Return): Delete.
139 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
140 (TYPE_DUMMY_IN_PROFILE_P): New macro.
141 * gcc-interface/gigi.h (update_profiles_with): Declare.
142 (finish_subprog_decl): Likewise.
143 (get_minimal_subprog_decl): Delete.
144 (create_subprog_type): Likewise.
145 (create_param_decl): Adjust prototype.
146 (create_subprog_decl): Likewise.
147 * gcc-interface/decl.c (defer_limited_with): Rename into...
148 (defer_limited_with_list): ...this.
149 (gnat_to_gnu_entity): Adjust to above renaming.
150 (finalize_from_limited_with): Likewise.
151 (tree_entity_vec_map): New structure.
152 (gt_pch_nx): New helpers.
153 (dummy_to_subprog_map): New hash table.
154 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
155 add FIRST parameter. Deal with the mechanism here instead of...
156 Do not make read-only variant of types. Simplify expressions.
157 In the by-ref case, test the mechanism before must_pass_by_ref
158 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
159 (gnat_to_gnu_subprog_type): New static function extracted from...
160 Do not special-case the type_annotate_only mode. Call
161 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
162 Deal with dummy return types. Likewise for parameter types. Deal
163 with by-reference types explicitly and add a kludge for null procedures
164 with untagged incomplete types. Remove assertion on the types and be
165 prepared for multiple elaboration of the declarations. Skip the whole
166 CICO processing if the profile is incomplete. Handle the completion of
167 a previously incomplete profile.
168 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
169 Adjust couple of calls to create_param_decl.
170 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
171 Remove specific deferring code.
172 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
173 Simplify handling of dummy types and remove obsolete comment.
174 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
176 <E_Access_Subtype>: Tweak comment and simplify condition.
177 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
178 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
180 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
181 inner break statements. Tidy up condition guarding direct use of the
183 (get_minimal_subprog_decl): Delete.
184 (finalize_from_limited_with): Call update_profiles_with on dummy types
185 with TYPE_DUMMY_IN_PROFILE_P set.
186 (is_from_limited_with_of_main): Delete.
187 (associate_subprog_with_dummy_type): New function.
188 (update_profile): Likewise.
189 (update_profiles_with): Likewise.
190 (gnat_to_gnu_profile_type): Likewise.
191 (init_gnat_decl): Initialize dummy_to_subprog_map.
192 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
193 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
194 TYPE_UNIVERSAL_ALIASING_P.
195 (gnat_get_array_descr_info): Minor tweak.
196 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
197 (build_raise_check): Likewise.
198 (Compilation_Unit_to_gnu): Likewise.
199 (Identifier_to_gnu): Accept mismatches coming from a limited context.
200 (Attribute_to_gnu): Remove kludge for dispatch table entities.
201 (process_freeze_entity): Do not retrieve old definition if there is an
202 address clause on the entity. Call update_profiles_with on dummy types
203 with TYPE_DUMMY_IN_PROFILE_P set.
204 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
205 TYPE_REFERENCE_TO to the fat pointer type.
206 (create_subprog_type): Delete.
207 (create_param_decl): Remove READONLY parameter.
208 (finish_subprog_decl): New function extracted from...
209 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
210 VOLATILE_FLAG parameters and adjust.
211 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
214 2016-04-27 Arnaud Charlet <charlet@adacore.com>
216 * aa_util.adb, aa_util.ads: Removed, no longer used.
218 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
220 * sem_prag.adb (Analyze_Pragma): An object
221 renaming declaration resulting from the expansion of an object
222 declaration is a suitable context for pragma Ghost.
224 2016-04-27 Doug Rupp <rupp@adacore.com>
226 * init.c: Refine last checkin so the only requirement is the
227 signaling compilation unit is compiled with the same mode as
228 the compilation unit containing the initial landing pad.
230 2016-04-27 Ed Schonberg <schonberg@adacore.com>
232 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
233 specifications for Default_Iterator, including overloaded cases
234 where no interpretations are legal, and return types that are
237 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
239 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
240 an accessibility check when the left hand side of the assignment
241 denotes a container cursor.
242 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
243 * sem_ch4.adb (Find_Indexing_Operations): New routine.
244 (Try_Container_Indexing): Code cleanup.
246 2016-04-27 Arnaud Charlet <charlet@adacore.com>
248 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
250 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
252 * errout.adb, errutil.adb: Minor reformatting.
254 2016-04-27 Ed Schonberg <schonberg@adacore.com>
256 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
257 Check that the classwide version is illegal when the prefix is
258 an operation of an untagged synchronized type.
260 2016-04-27 Arnaud Charlet <charleT@adacore.com>
262 * sinput-l.ads, sem_ch13.adb: Minor editing.
264 2016-04-27 Doug Rupp <rupp@adacore.com>
266 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
267 Bump the pc so the lower order bit is set.
269 2016-04-27 Ed Schonberg <schonberg@adacore.com>
271 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
272 enabled, report an empty range in a case construct.
274 2016-04-27 Arnaud Charlet <charlet@adacore.com>
276 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
277 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
279 2016-04-27 Bob Duff <duff@adacore.com>
281 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
282 as is done for the other containers.
284 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
286 * ghost.adb (In_Subprogram_Body_Profile): New routine.
287 (Is_OK_Declaration): Treat an unanalyzed expression
288 function as an OK context. Treat a reference to a Ghost entity
289 as OK when it appears within the profile of a subprogram body.
291 2016-04-27 Bob Duff <duff@adacore.com>
293 * errout.ads: Document the fact that informational messages
294 don't have to be warnings.
295 * errout.adb (Error_Msg_Internal): In statistics counts, deal
296 correctly with informational messages that are not warnings.
297 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
298 Set_Posted already checks for errors and ignores others.
299 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
300 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
301 implies Is_Warning_Msg.
302 * errutil.adb (Error_Msg): In statistics counts, deal correctly
303 with informational messages that are not warnings.
305 2016-04-27 Ed Schonberg <schonberg@adacore.com>
307 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
308 to determine whether a record type is a null record.
309 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
310 null record and there is no expression in the declaration,
311 no predicate check applies to the object.
313 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
315 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
316 instantiated package should not cause freezing of previous contracts.
318 2016-04-27 Ed Schonberg <schonberg@adacore.com>
320 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
321 that do not come from source.
322 (Analyze_Dimension_Subtype_Declaration): Allow confirming
323 dimensions on subtype entity, either inherited from base type
324 or provided by aspect specification.
326 2016-04-27 Ed Schonberg <schonberg@adacore.com>
328 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
329 Add scalar formal object Zero, to allow detection and report
330 when the matrix is singular.
331 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
332 Raise Constraint_Error if the Forward_Eliminate pass has
333 determined that determinant is Zero.o
334 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
336 * s-ngcoar.adb (Solve): Ditto.
338 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
340 * sem_ch3.adb: Minor reformatting.
342 2016-04-27 Ed Schonberg <schonberg@adacore.com>
344 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
345 that identifier has a usable type before analysis, to handle
346 properly identifiers introduced after some lexical/syntactic
347 recovery that created new identifiers.
349 2016-04-27 Bob Duff <duff@adacore.com>
351 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
352 exp_util.adb: Remove assertions that can fail in obscure cases when
353 assertions are turned on but tampering checks are turned off.
355 2016-04-27 Javier Miranda <miranda@adacore.com>
357 * exp_ch6.adb (Add_Call_By_Copy_Code,
358 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
359 whose type comes from the limited view.
361 2016-04-27 Yannick Moy <moy@adacore.com>
363 * a-textio.adb: Complete previous patch.
365 2016-04-27 Yannick Moy <moy@adacore.com>
367 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
368 Error_Msg_N to issue message about impossibility to inline call,
369 with slight change of message.
371 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
373 * exp_spark.adb (Expand_Potential_Renaming): Removed.
374 (Expand_SPARK): Update the call to expand a potential renaming.
375 (Expand_SPARK_Potential_Renaming): New routine.
376 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
377 * sem.adb Add with and use clauses for Exp_SPARK.
378 (Analyze): Expand a non-overloaded potential renaming for SPARK.
380 2016-04-27 Ed Schonberg <schonberg@adacore.com>
382 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
383 check full view for the presence of defaulted discriminants,
384 even when the partial view of a private type has no visible and
385 no unknown discriminants.
387 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
389 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
391 2016-04-27 Nicolas Roche <roche@adacore.com>
393 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
395 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
397 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
398 cleanup. Check the original node when trying to determine the node kind
399 of pragma Volatile's argument to account for untagged derivations
400 where the type is transformed into a constrained subtype.
402 2016-04-27 Olivier Hainque <hainque@adacore.com>
404 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
405 consistent posix interface on the caller side.
407 2016-04-27 Ed Schonberg <schonberg@adacore.com>
409 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
410 is a limited view of a type, initialize the Limited_Dependents
411 field to catch misuses of the type in a client unit.
413 2016-04-27 Thomas Quinot <quinot@adacore.com>
415 * a-strunb-shared.adb (Finalize): add missing Reference call.
416 * s-strhas.adb: minor grammar fix and extension of comment
417 * sem_ch8.adb: minor whitespace fixes
419 2016-04-27 Ed Schonberg <schonberg@adacore.com>
421 * lib-xref.adb (Get_Type_Reference): Handle properly the case
422 of an object declaration whose type definition is a class-wide
423 subtype and whose expression is a function call that returns a
426 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
428 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
429 (Output_Name): New routine.
431 2016-04-27 Bob Duff <duff@adacore.com>
433 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
435 2016-04-27 Vincent Celier <celier@adacore.com>
437 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
438 --unchecked-shared-lib-imports and set the flag
439 Opt.Unchecked_Shared_Lib_Imports accordingly.
441 2016-04-27 Ed Schonberg <schonberg@adacore.com>
443 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
444 A generic subprogram is never a primitive operation, and thus
445 a classwide condition for it is not legal.
447 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
449 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
452 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
454 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
455 (Resolve_Actuals): Flag effectively volatile objects with enabled
456 property Async_Writers or Effective_Reads as illegal.
457 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
459 2016-04-27 Javier Miranda <miranda@adacore.com>
461 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
462 Do not generate the profile of the equality operator if it has
463 been explicitly defined as abstract in the parent type. Required
464 to avoid reporting an spurious error.
466 2016-04-27 Ed Schonberg <schonberg@adacore.com>
468 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
469 procedure to compute the dimension vector of a scalar expression
470 and compare it with the dimensions if its expected subtype. Used
471 for the ultimate components of a multidimensional aggregate,
472 whose components typically are themselves aggregates that are
473 expanded separately. Previous to this patch, dimensionality
474 checking on such aggregates generated spurious errors.
475 * sem_aggr.adb (Resolve_Array_Aggregate): Use
476 Check_Expression_Dimensions when needed.
478 2016-04-27 Javier Miranda <miranda@adacore.com>
480 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
481 (applicable to E_Procedure).
482 (Corresponding_Procedure): New attribute (applicable to E_Function).
483 * exp_util.adb (Build_Procedure_Form): Link the function with
484 its internally built proc and viceversa.
485 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
486 attribute Rewritten_For_C and Corresponding_Procedure to the body.
487 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
488 (Rewritten_For_C_Proc_Id): Removed.
489 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
490 locate the corresponding procedure.
492 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
494 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
495 corresponding pragma.
497 2016-04-27 Bob Duff <duff@adacore.com>
499 * exp_ch3.adb: Minor comment improvement.
501 2016-04-27 Ed Schonberg <schonberg@adacore.com>
503 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
504 return type is an untagged limited record with only access
505 discriminants and no controlled components, the return value does not
506 need to use the secondary stack.
508 2016-04-27 Javier Miranda <miranda@adacore.com>
510 * exp_util.adb (Remove_Side_Effects): When
511 generating C code handle object declarations that have
512 discriminants and are initialized by means of a call to a
515 2016-04-27 Ed Schonberg <schonberg@adacore.com>
517 * a-textio.adb (Get_Line function): Handle properly the case of
518 a line that has the same length as the buffer (or a multiple
519 thereof) and there is no line terminator.
520 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
521 in the string when there is no previous line terminator and we
522 need at most one additional character.
524 2016-04-27 Arnaud Charlet <charlet@adacore.com>
526 * s-rident.ads: Make No_Implicit_Loops non partition wide.
528 2016-04-27 Arnaud Charlet <charlet@adacore.com>
530 * sem_ch11.adb (Analyze_Handled_Statements): check useless
531 assignments also in entries and task bodies, not only in
532 procedures and declaration blocks.
533 * sem_ch5.adb (Analyze_Block_Statement): check useless
534 assignements in declaration blocks as part of processing their
535 handled statement sequence, just like it was done for procedures
536 and now is also done for entries and task bodies.
537 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
538 of entries and task bodies just like of procedures.
540 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
542 * sem_util.adb (Is_Volatile_Function): Recognize
543 a function declared within a protected type as well as the
544 protected/unprotected version of a function.
546 2016-04-27 Bob Duff <duff@adacore.com>
548 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
549 declaration of the form "X : T := Func (...);", where T is
550 controlled, as a renaming.
551 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
552 to be an empty string, instead of null-ing out the Reference.
553 * exp_util.adb (Needs_Finalization): Remove redundant code.
555 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
557 * aspects.ads Aspects Export and Import do not require delay. They
558 were classified as delayed aspects, but treated as non-delayed
559 by the analysis of aspects.
560 * freeze.adb (Copy_Import_Pragma): New routine.
561 (Wrap_Imported_Subprogram): Copy the import pragma by first
562 resetting all semantic fields to avoid an infinite loop when
564 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
565 comment on the processing of aspects Export and Import
567 (Analyze_Aspect_Convention: New routine.
568 (Analyze_Aspect_Export_Import): New routine.
569 (Analyze_Aspect_External_Link_Name): New routine.
570 (Analyze_Aspect_External_Or_Link_Name): Removed.
571 (Analyze_Aspect_Specifications): Factor out the analysis of
572 aspects Convention, Export, External_Name, Import, and Link_Name
573 in their respective routines. Aspects Export and Import should
574 not generate a Boolean pragma because their corresponding pragmas
575 have a very different syntax.
576 (Build_Export_Import_Pragma): New routine.
577 (Get_Interfacing_Aspects): New routine.
579 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
581 * inline.adb (Add_Inlined_Body): Overhaul implementation,
582 robustify handling of -gnatn1, add special treatment for
583 expression functions.
585 2016-04-27 Doug Rupp <rupp@adacore.com>
587 * g-traceb.ads: Update comment.
588 * exp_ch2.adb: minor style fix in object declaration
590 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
592 * sem_elab.adb (Check_Internal_Call): Do not
593 consider a call when it appears within pragma Initial_Condition
594 since the pragma is part of the elaboration statements of a
595 package body and may only call external subprograms or subprograms
596 whose body is already available.
597 (Within_Initial_Condition): New routine.
599 2016-04-27 Ed Schonberg <schonberg@adacore.com>
601 * exp_util.adb (Build_Procedure_Form): Prevent double generation
602 of the procedure form when dealing with an expression function
603 whose return type is an array.
604 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
605 * exp_ch6.adb: Proper conversion for inherited operation in C.
606 * sem_ch6.adb: Code cleanup.
608 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
610 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
611 * g-socket.adb: Minor reformatting.
612 * sinfo.ads: Minor comment correction.
613 * sem_warn.ads: minor grammar fix in comment
615 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
617 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
618 (maybe_pad_type): Adjust comment.
619 (finish_record_type): Likewise.
620 (rest_of_record_type_compilation): Likewise.
621 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
622 parameter from integer to boolean. Adjust recursive calls.
623 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
624 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
625 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
626 Pass false to finish_record_type. Set the debug type later.
627 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
628 (gnat_to_gnu_component_type): Fix formatting.
629 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
630 (gnat_to_gnu_type): Likewise.
631 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
632 (Loop_Statement_to_gnu): Likewise.
633 (Subprogram_Body_to_gnu): Likewise.
634 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
635 (Exception_Handler_to_gnu_gcc): Likewise.
636 (Compilation_Unit_to_gnu): Likewise.
637 (gnat_to_gnu): Likewise.
638 (push_exception_label_stack): Likewise.
639 (elaborate_all_entities_for_package): Likewise.
640 (process_freeze_entity): Likewise.
641 (process_decls): Likewise.
642 (process_type): Likewise.
643 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
644 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
645 call to rest_of_record_type_compilation.
646 (rest_of_record_type_compilation): Use copy_type.
647 (copy_type): Use correctly typed constants.
648 (gnat_signed_or_unsigned_type_for): Use copy_type.
649 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
650 (build_goto_raise): Adjust call tognat_to_gnu_entity.
652 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
654 * gcc-interface/misc.c (gnat_init): Do not call
655 internal_reference_types.
657 2016-04-27 Svante Signell <svante.signell@gmail.com>
659 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
660 * s-osinte-gnu.ads: Small tweaks.
661 * s-osinte-gnu.adb: New file.
663 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
665 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
666 constituent even if it is not to prevent spurious errors.
668 2016-04-21 Gary Dismukes <dismukes@adacore.com>
670 * sem_ch4.adb: Minor typo fixes and reformatting.
672 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
674 * g-calend.ads (No_Time): The same value in any timezone.
675 * g-socket.adb (Raise_Host_Error): Remove ending
676 dot from original error message before append colon delimited
679 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
681 * sem_ch3.adb: Code cleanup.
682 * sem_ch6.adb: Code cleanup.
683 (Is_Matching_Limited_View): New routine.
684 (Matches_Limited_With_View): Reimplemented.
685 * sem_ch10.adb (Decorate_Type): Code cleanup.
687 2016-04-21 Doug Rupp <rupp@adacore.com>
689 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
691 2016-04-21 Ed Schonberg <schonberg@adacore.com>
693 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
694 indexing functions, collect all overloadings of the call firts,
695 and then transfer them to indexing node, to prevent interleaving
696 of the set of interpretations of the nodes involved.
697 * sem_res.adb (Resolve): Suppress cascaded errors that report
698 ambiguities when one of the actuals in an overloaded generatlized
699 indexing operation is illegal and has type Any_Type, as is done
700 for similar cascaded errors in subprogram calls.
701 (Valid_Tagged_Conversion): Cleanup conversion checks when one
702 of the types involved is a class-wide subtype.
704 2016-04-21 Ed Schonberg <schonberg@adacore.com>
706 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
707 subprogram declaration within a wrapper package, skip pragmas
708 that may have been generated by aspect specifications on the
711 2016-04-21 Javier Miranda <miranda@adacore.com>
713 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
714 code return True for array identifiers since the backend needs
715 to initialize such component by means of memcpy().
717 2016-04-21 Arnaud Charlet <charlet@adacore.com>
719 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
720 potentially uninitialized memory.
721 * sem_ch3.adb: Minor style fix in comment.
723 2016-04-21 Arnaud Charlet <charlet@adacore.com>
725 * gnat_rm.texi, gnat_ugn.texi,
726 doc/gnat_ugn/gnat_project_manager.rst,
727 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
728 doc/gnat_ugn/gnat_and_program_execution.rst,
729 doc/gnat_ugn/gnat_utility_programs.rst,
730 doc/gnat_ugn/the_gnat_compilation_model.rst,
731 doc/gnat_rm/implementation_defined_attributes.rst,
732 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
733 doc/gnat_rm/implementation_defined_pragmas.rst,
734 doc/gnat_rm/the_gnat_library.rst,
735 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
736 * doc/Makefile: Cleanups.
738 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
740 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
742 2016-04-21 Ed Schonberg <schonberg@adacore.com>
744 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
745 disambiguate local variables that may be hidden from inner visibility
746 by nested block declarations or loop variables.
748 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
750 * s-soflin.adb: Initialize the Stack_Limit global variable.
752 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
754 * lib-writ.adb: Minor reformatting.
756 2016-04-21 Ed Schonberg <schonberg@adacore.com>
758 * exp_pakd.adb (Compute_Number_Components): New function to
759 build an expression that computes the number of a components of
760 an array that may be multidimensional.
761 (Expan_Packed_Eq): Use it.
763 2016-04-21 Arnaud Charlet <charlet@adacore.com>
765 * g-traceb.ads: Update list of supported platforms.
767 2016-04-21 Ed Schonberg <schonberg@adacore.com>
769 * sem_ch13.adb (Add_Predicates): if the type is declared in
770 an inner package it may be frozen outside of the package, and
771 the generated pragma has not been analyzed yet, the expression
772 for the predicate must be captured and added to the predicate
773 function at this point.
775 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
777 * contracts.adb (Analyze_Package_Body_Contract): Do not check
778 for a missing package refinement because 1) packages do not have
779 "refinement" and 2) the check for proper state refinement is
780 performed in a different place.
781 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
782 (Has_Null_Visible_Refinement): Reimplemented.
783 * sem_ch3.adb (Analyze_Declarations): Determine whether all
784 abstract states have received a refinement and if not, emit
786 * sem_ch7.adb (Analyze_Package_Declaration): Code
787 cleanup. Determine whether all abstract states of the
788 package and any nested packages have received a refinement
789 and if not, emit errors.
790 (Requires_Completion_In_Body): Add new formal parameter
791 Do_Abstract_States. Update the comment on usage. Propagate the
792 Do_Abstract_States flag to all Unit_Requires_Body calls.
793 (Unit_Requires_Body): Remove formal
794 parameter Ignore_Abstract_States. Add new formal paramter
795 Do_Abstract_States. Propagate the Do_Abstract_States flag to
796 all Requires_Completion_In calls.
797 * sem_ch7.ads (Unit_Requires_Body): Remove formal
798 parameter Ignore_Abstract_States. Add new formal paramter
799 Do_Abstract_States. Update the comment on usage.
800 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
801 not initialize the constituent list as this is now done on a
802 need-to-add-element basis.
803 (Analyze_Single_Task_Declaration):
804 Do not initialize the constituent list as this is now done on
805 a need-to-add-element basis.
806 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
807 lists as this is now done on a need-to-add-element basis.
808 * sem_prag.adb (Analyze_Constituent): Set the
809 refinement constituents when adding a new element.
810 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
811 adding a new element.
812 (Analyze_Part_Of_Option): Set the Part_Of
813 constituents when adding a new element.
814 (Analyze_Pragma): Set the Part_Of constituents when adding a new
816 (Check_Constituent_Usage (all versions)): Reimplemented.
817 (Collect_Constituent): Set the refinement constituents when adding
819 (Create_Abstract_State): Do not initialize the
820 constituent lists as this is now done on a need-to-add-element basis.
821 (Propagate_Part_Of): Set the Part_Of constituents when
822 adding a new element.
823 * sem_util.adb (Check_State_Refinements): New routine.
824 (Has_Non_Null_Refinement): Reimplemented.
825 (Has_Null_Refinement): Reimplemented.
826 (Requires_State_Refinement): Removed.
827 * sem_util.ads (Check_State_Refinements): New routine.
828 (Requires_State_Refinement): Removed.
830 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
832 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
833 * sem.adb: Fix comment.
835 2016-04-21 Ed Schonberg <schonberg@adacore.com>
837 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
838 declaration with no aspects, whose subtype_mark is a subtype
839 with predicates, inherits the list of subprograms for the type.
841 2016-04-21 Arnaud Charlet <charlet@adacore.com>
843 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
846 2016-04-21 Thomas Quinot <quinot@adacore.com>
848 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
850 2016-04-21 Ed Schonberg <schonberg@adacore.com>
852 * lib-writ.adb (Write_ALI): Do not record in ali file units
853 that are present in the files table but not analyzed. These
854 units are present because they appear in the context of units
855 named in limited_with clauses, and the unit being compiled does
856 not depend semantically on them.
858 2016-04-21 Ed Schonberg <schonberg@adacore.com>
860 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
861 create the procedure body for an function returning an array type,
862 when generating C code. Reuse the subprogram body rather than
863 creating a new one, both as an efficiency measure and because
864 in an instance the body may contain global references that must
867 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
869 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
872 2016-04-21 Javier Miranda <miranda@adacore.com>
874 * exp_aggr.adb (Component_Check): Extend
875 the check that verifies that the aggregate has no function
876 calls to handle transformations performed by the frontend.
877 (Ultimate_Original_Expression): New subprogram.
879 2016-04-21 Philippe Gil <gil@adacore.com>
881 * krunch.adb (Krunch): Fix krunching of i-java.
883 2016-04-21 Arnaud Charlet <charlet@adacore.com>
885 * exp_ch8.adb (Evaluation_Required): Always return
886 True when Modify_Tree_For_C.
888 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
890 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
891 * alloc.ads: Minor comment fixes.
892 * einfo.ads: Fix typo.
894 2016-04-21 Arnaud Charlet <charlet@adacore.com>
896 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
897 changes to handle all cases of components depending on the
898 discriminant, not just string literals.
900 2016-04-21 Ed Schonberg <schonberg@adacore.com>
902 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
903 declaration is the generated declaration for a generic actual,
904 inherit predicates from the actual if it is a predicated subtype.
906 2016-04-21 Ed Schonberg <schonberg@adacore.com>
908 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
909 inherited and its result is controlling, introduce a conversion
910 on the actual for the corresponding procedure call, to avoid
911 spurious type errors.
913 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
915 * krunch.adb (Krunch): Fix krunching of i-vxworks.
917 2016-04-21 Gary Dismukes <dismukes@adacore.com>
919 * exp_aggr.adb: Minor reformatting and code cleanup.
921 2016-04-21 Ed Schonberg <schonberg@adacore.com>
923 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
924 resolution, because they introduce local names. Full resolution
925 will take place when predicate function is constructed.
927 2016-04-21 Arnaud Charlet <charlet@adacore.com>
929 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
930 change to take into account Per_Object_Constraint field rather
931 than special casing strings.
932 * exp_ch6.adb: Fix typo in Replace_Returns.
934 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
936 * sem_ch5.adb: Minor reformatting.
938 2016-04-21 Arnaud Charlet <charlet@adacore.com>
940 * exp_aggr.adb (Backend_Processing_Possible): Return False
941 when generating C and aggregate contains function calls.
943 2016-04-21 Tristan Gingold <gingold@adacore.com>
945 * krunch.adb (Krunch): Only partially krunch children of
946 Interfaces that aren't known.
948 2016-04-21 Ed Schonberg <schonberg@adacore.com>
950 * sem_prag.adb (Make_Inline): Handle properly the instantiation
951 of a generic subpprogram that carries an Inline aspect. Place
952 inline info on the anonymous subprogram that is constructed in
954 (Analyze_Pragma, case Pure): Do not check placement if pragma
955 appears within an instantiation, which can be nested at any level.
956 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
957 node from anonymous subprogram to its visible renaming. The
958 freeze node will be constructed if the subprogram carries
960 (Set_Global): Preserve dimension information if present (from
963 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
965 * gnatlink.adb: Change wording of the warning message on
966 problematic filenames to be more neutral. Add a new substring
967 "patch" introduced on Windows 10.
969 2016-04-21 Philippe Gil <gil@adacore.com>
971 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
973 2016-04-21 Javier Miranda <miranda@adacore.com>
975 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
978 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
980 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
981 * einfo.ads New synthesized attribute
982 Has_Non_Null_Abstract_State along with occurrences in entities.
983 (Has_Non_Null_Abstract_State): New routine.
984 * sem_ch7.adb (Unit_Requires_Body): Add local variable
985 Requires_Body. A package declaring an abstract state requires
986 a body only when the state is non-null and the package contains
987 at least one other construct that requires completion in a body.
988 * sem_util.adb (Mode_Is_Off): Removed.
989 (Requires_State_Refinement): Remove an obsolete check. Code
992 2016-04-21 Bob Duff <duff@adacore.com>
994 * sem_attr.adb (Analyze_Attribute): In processing
995 the 'Old attribute, a warning is given for infinite recursion. Fix
996 the code to not crash when the prefix of 'Old denotes a protected
998 * sem_ch5.adb (Analyze_Iterator_Specification):
999 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
1000 where the parameter would not be an object.
1002 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1004 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
1005 Etype or Underlying_Type of the operands.
1007 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1009 * atree.adb (Print_Statistics): Protect against overflows and
1010 print the memory consumption in bytes.
1011 * table.adb (Reallocate): Do the intermediate calculation of the new
1012 size using the Memory.size_t type.
1014 2016-04-21 Gary Dismukes <dismukes@adacore.com>
1016 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
1017 expansion of Attribute_Machine and Attribute_Model for AAMP.
1019 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1021 * freeze.adb: Disable previous change for now.
1023 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1025 * sem_ch8.adb (Find_Selected_Component): If prefix has an
1026 access type and designated type is a limited view, introduce
1027 an explicit dereference before continuing the analysis, and
1028 set its type to the non-limited view of the designated type,
1029 if we are in context where it is available.
1031 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1033 * freeze.adb: Freeze profile in ASIS mode.
1035 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1037 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
1038 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
1040 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1042 * exp_ch6.adb: Minor reformatting.
1044 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1046 * sem_ch13.adb: Minor comment update.
1048 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1050 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
1051 boolean parameter to determine whether freezing an overloadable
1052 entity freezes its profile as well. This is required by
1053 AI05-019. The call to Freeze_Profile within Freeze_Entity is
1054 conditioned by the value of this flag, whose default is True.
1055 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
1056 reference freezes the prefix, but it the prefix is a subprogram
1057 it does not freeze its profile.
1059 2016-04-21 Javier Miranda <miranda@adacore.com>
1061 * exp_util.adb (Build_Procedure_Form): No action needed for
1062 subprogram renamings since the backend can generate the call
1063 using the renamed subprogram. This leaves the tree more clean
1065 * exp_ch6.adb (Expand_Call): Extend previous patch for
1066 rewritten-for-c entities to handle subprogram renamings.
1067 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
1069 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1071 * sem_ch13.adb: Code cleanup.
1073 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1075 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
1076 created for SPARK_To_C, the entity must remain invisible so it
1077 does not overload subsequent references to the original function.
1078 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
1079 Handle Extended_Return_Statements by replacing it with a block
1080 with assignments and a simple return statement.
1081 * exp_util.adb (Build_Procedure_Form): Make procedure entity
1082 invisible after analyzing declaration, to prevent improper
1085 2016-04-21 Javier Miranda <miranda@adacore.com>
1087 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1088 attribute Rewritten_For_C to the body since since the expander
1089 may generate calls using that entity.
1090 * exp_ch6.adb (Expand_Call): For internally generated
1091 calls ensure that they reference the entity of the spec
1092 of the called function.
1093 (Rewritten_For_C_Func_Id): New subprogram.
1094 (Rewritten_For_C_Proc_Id): New subprogram.
1095 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
1096 ensure that we skip freezing entities.
1097 * exp_util.adb (Build_Procedure_Form): No action needed if the
1098 procedure was already built.
1100 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1102 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
1105 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1107 * sem_util.adb (Denotes_Iterator): Use root type to determine
1108 whether the ultimate ancestor is the predefined iterator
1110 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
1111 and avoid reuse of Pack local variable.
1113 2016-04-21 Olivier Hainque <hainque@adacore.com>
1115 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1116 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1117 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
1118 Executable_Extension to ".out".
1120 2016-04-21 Javier Miranda <miranda@adacore.com>
1122 * frontend.adb: Update call to Unnest_Subprograms.
1123 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
1124 (Unnest_Subprograms): Moved to package exp_unst.
1125 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
1127 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
1128 enumeration literals when generating C code.
1130 2016-04-21 Javier Miranda <miranda@adacore.com>
1132 * frontend.adb: Remove call to initialize Exp_Ch6.
1133 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
1134 (Unest_Entry/Unest_Bodies): Removed.
1135 (Unnest_Subprograms): Code cleanup.
1137 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1139 * set_targ.adb (Read_Target_Dependent_Values):
1140 close target description file once its contents is read.
1141 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
1142 and Stderr_File): Close local file descriptors before spawning
1144 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
1145 local variables to make the code easier to understand and avoid
1146 duplicated calls to Parent and Generic_Parent.
1148 2016-04-20 Bob Duff <duff@adacore.com>
1150 * s-os_lib.ads: Minor comment fix.
1152 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1154 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
1155 a discriminant check for a type whose partial view has unknown
1156 discriminants when the full view has discriminants with defaults.
1158 2016-04-20 Javier Miranda <miranda@adacore.com>
1160 * exp_util.adb (Remove_Side_Effects): When generating C code
1161 remove side effect of type conversion of access to unconstrained
1163 (Side_Effect_Free): Return false for the type
1164 conversion of access to unconstrained array type when generating
1166 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
1167 of access to unconstrained array type conversion when generating
1170 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1172 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
1173 function, to construct the declaration of a predicate function
1174 at the end of the current declarative part rather than at the
1175 (possibly later) freeze point of the type. This also allows uses
1176 of a type with predicates in instantiations elsewhere.
1177 (Resolve_Aspect_Expression): New procedure to detect visiblity
1178 errors in aspect expressions, at the end of the declarative part
1179 that includes the type declaration.
1180 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
1181 predicate function from private to full view.
1182 * einfo.adb (Predicate_Function): Refine search for predicate
1183 function when type has a full view and predicate function may
1184 be defined on either view.
1186 2016-04-20 Javier Miranda <miranda@adacore.com>
1188 * frontend.adb: Passing the root of the tree to
1189 Unnest_Subprograms().
1190 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
1191 took care of adding subprograms to the Unest_Bodies table since
1192 performing such action too early disables the ability to process
1193 generic instantiations.
1194 (Unnest_Subprograms): Adding parameter.
1195 (Search_Unnesting_Subprograms): New subprogram.
1196 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
1198 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1200 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
1202 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1204 * exp_unst.adb (Check_Static_Type): For a private type, check
1207 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1209 * sem_attr.adb (Check_Type): Reject an attribute reference in
1210 an aspect expression, when the prefix of the reference is the
1211 current instance of the type to which the aspect applies.
1213 2016-04-20 Bob Duff <duff@adacore.com>
1215 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
1216 hiding unless we're actually hiding something. The previous
1217 code would (for example) warn about a "<" on a record type
1218 because it incorrectly thought it was hiding the "<" on Boolean
1219 in Standard. We need to check that the homonym S is in fact a
1220 homograph of a predefined operator.
1222 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1224 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
1225 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
1226 procedure equivalent to a function returning an array, when this
1227 construction is deferred to the freeze point of the function.
1228 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
1229 function that renames an instance of Unchecked_Conversion.
1230 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
1231 declaration for a function returning an array.
1232 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
1234 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1236 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
1237 New predicate to determine that in a context with full run-time,
1238 a function call is an expansion of a reference to attribute
1240 * sem_ch5.adb (Analyze_Function_Call): use it.
1241 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
1243 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1245 * einfo.adb Flag286 is now used as Is_Exception_Handler.
1246 (Is_Exception_Handler): New routine.
1247 (Set_Is_Exception_Handler): New routine.
1248 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
1249 * einfo.ads New attribute Is_Exception_Handler along with
1250 occurrences in entities.
1251 (Is_Exception_Handler): New routine along with pragma Inline.
1252 (Set_Is_Exception_Handler): New routine along with pragma Inline.
1253 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
1254 for exception handlers with a choice parameter.
1255 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
1256 generated for a choice parameter as an exception handler.
1258 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1260 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
1261 (Constrain_Discriminated_Type): In an instance, if the type has
1262 unknown discriminants, use its full view.
1263 (Process_Subtype): Check that the base type is private before
1264 adding subtype to Private_Dependents list.
1266 2016-04-20 Bob Duff <duff@adacore.com>
1268 * sem_ch13.adb: Minor comment fix.
1270 2016-04-20 Yannick Moy <moy@adacore.com>
1272 * sem_ch4.adb: Fix typos in comments.
1273 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
1275 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1277 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
1278 current instance of a task type is legal if the prefix is an
1279 expression of that task type and the selector is an entry or
1282 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1284 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
1285 varsize field at the end for efficiency.
1287 2016-04-20 Vincent Celier <celier@adacore.com>
1289 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
1290 ls" includes the switch -V.
1291 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
1293 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
1296 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1298 * sem_ch12.adb (Qualify_Type): Do not perform
1299 partial qualification when the immediate scope is a generic unit.
1301 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1303 * exp_unst.adb: Minor reformatting.
1305 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1307 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
1308 tag assignment and adjustment preceed the accessibility check.
1309 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
1311 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1313 * exp_prag.adb (Expand_Attributes): Ensure that
1314 the temporary used to capture the value of attribute 'Old's
1315 prefix is properly initialized.
1317 2016-04-20 Javier Miranda <miranda@adacore.com>
1319 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
1322 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1324 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
1327 2016-04-20 Vincent Celier <celier@adacore.com>
1329 * make.adb: Code cleanup.
1331 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1333 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
1336 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1338 * sem_ch12.adb (Copy_Generic_Node): Handle the special
1339 qualification installed for universal literals that act as
1340 operands in binary or unary operators. (Qualify_Operand): Mark
1341 the qualification to signal the instantiation mechanism how to
1342 handle global reference propagation.
1343 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
1344 (Set_Is_Qualified_Universal_Literal): New routine.
1345 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
1346 with occurrences in nodes.
1347 (Is_Qualified_Universal_Literal):
1348 New routine along with pragma Inline.
1349 (Set_Is_Qualified_Universal_Literal): New routine along with
1352 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1354 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
1355 so that the corresponding checks are preserved across compilations
1356 that include System.Constants in their context.
1358 2016-04-20 Gary Dismukes <dismukes@adacore.com>
1360 * sem_type.adb: Minor typo fix and reformatting.
1361 * a-conhel.ads: Update comment.
1363 2016-04-20 Bob Duff <duff@adacore.com>
1365 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
1366 code so it doesn't trigger an "uninit var" warning.
1368 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1370 * sem_attr.ads Add new table Universal_Type_Attribute.
1371 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
1372 checking attributes.
1374 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1376 * exp_aggr.adb (Init_Stored_Discriminants,
1377 Init_Visible_Discriminants): New procedures, subsidiary of
1378 Build_Record_Aggr_Code, to handle properly the construction
1379 of aggregates for a derived type that constrains some parent
1380 discriminants and renames others.
1382 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1384 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
1385 (Save_References_In_Operator): Add explicit qualifications in
1386 the generic template for all operands of universal type.
1387 * sem_type.adb (Disambiguate): Update the call to Matches.
1388 (Matches): Reimplemented.
1389 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
1391 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1393 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
1394 an illegal aspect that freezes the entity to which it applies.
1396 2016-04-20 Bob Duff <duff@adacore.com>
1398 * a-stwibo.ads, a-stzbou.ads
1399 ("="): Add overriding keyword before function to avoid crash when
1400 compiler is called with -gnatyO (check overriding indicators).
1402 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1404 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
1405 is a configuration pragma and it uses the ARG syntax, insert
1406 the rewritten pragma after the current one rather than using
1409 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1411 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
1414 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1416 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
1417 s-imglli.adb: Minor reformatting.
1419 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1421 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
1422 renamed operator when the associated node appears within a
1424 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
1426 2016-04-20 Yannick Moy <moy@adacore.com>
1428 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
1429 * einfo.adb (Set_Overridden_Operation): Add assertion.
1430 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
1433 2016-04-20 Javier Miranda <miranda@adacore.com>
1435 * exp_unst.adb (Append_Unique_Call): New subprogram.
1436 (Unnest_Subprogram): Replace the unique occurrence
1437 of Call.Append() by Append_Unique_Call() which protects us from
1438 adding to the Calls table duplicated entries.
1440 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1442 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
1443 * xref_lib.ads (Dependencies_Tables): instantiate
1444 Table package with types that guarantee its safe use.
1445 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
1448 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1450 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
1451 Disable expansion when generating C code.
1452 * sinfo.ads, inline.ads: Minor editing.
1454 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1456 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
1459 2016-04-20 Javier Miranda <miranda@adacore.com>
1461 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
1462 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
1463 declaration of the internally built _postcondition procedure.
1465 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1467 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
1469 * sem_util.adb (Is_Unchecked_Conversion_Instance):
1470 defense against library-level renamings of other functions,
1471 which are never instances of Unchecked_Conversion.
1472 * einfo.ads: minor fix of casing in comment
1474 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1476 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
1477 that has been analyzed and expanded already. Qualify the names
1478 in the proper body for use in the generation of C code.
1480 2016-04-20 Javier Miranda <miranda@adacore.com>
1482 * contracts.adb (Build_Postconditions_Procedure): Force its
1483 inlining when generating C code.
1484 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
1485 _postconditions when generating C code.
1486 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
1487 _postconditions when generating C code.
1488 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
1489 types of return value and argument changed from Node_Id to
1492 2016-04-20 Vincent Celier <celier@adacore.com>
1494 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
1496 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
1498 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
1499 the Has_Delayed_Freeze flag on the anonymous instance node.
1501 2016-04-20 Javier Miranda <miranda@adacore.com>
1503 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
1504 scope associated with the renaming object declaration.
1505 * exp_util.adb (Insert_Actions): Remove handling of iterator
1506 loop marked as requiring the secondary stack.
1508 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1510 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
1511 AI12-0124, which extends the functionality of the attribute so it
1512 reflects the semantics of GNAT 'Img when applied to scalar types.
1513 * lib-xref.adb: minor whitespace layout fix.
1515 2016-04-20 Vincent Celier <celier@adacore.com>
1517 * clean.adb (Gnatclean): Fail if project file specified and
1518 gprclean is not available.
1519 * gnatname.adb: Fail is -P is used and gprname is not available.
1520 * make.adb (Initialize): Fail if project file specified and
1521 gprbuild is not available.
1523 2016-04-20 Bob Duff <duff@adacore.com>
1525 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
1526 stack when possible.
1528 2016-04-20 Gary Dismukes <dismukes@adacore.com>
1530 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
1533 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1535 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1536 If the pragma comes from an aspect specification, verify that
1537 the aspect applies to an entity with a declarative part.
1538 * exp_ch5.adb: Code cleanup.
1540 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1542 * sem_res.adb (Resolve_If_Expression): If first expression is
1543 universal, resolve subsequent ones with the corresponding class
1544 type (Any_Integer or Any_Real).
1546 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1548 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
1549 disabled, complete the analysis of the iterator name to ensure
1550 that reference for entities within are properly generated.
1552 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1554 * a-dispat.ads (Yield): add Global contract.
1555 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
1556 * a-taside.adb: Added Initializes => Tasking_State.
1558 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1560 * sem_ch13.adb (Build_Invariant_Procedure):
1561 Reimplement the invariant procedure spec and body insertion.
1563 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1565 * sem_ch13.adb (Add_Invariant): Do not replace
1566 the saved expression of an invariatn aspect when inheriting
1567 a class-wide type invariant as this clobbers the existing
1568 expression. Do not use New_Copy_List as it is unnecessary
1569 and leaves the parent pointers referencing the wrong part of
1570 the tree. Do not replace the type references for ASIS when
1571 inheriting a class-wide type invariant as this clobbers the
1572 existing replacement.
1574 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1576 * sem_util.adb (Build_Explicit_Dereference): If the designated
1577 expression is an entity name, generate reference to the entity
1578 because it will not be resolved again.
1580 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1582 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1583 gnat_rm.texi: Update documentation.
1585 2016-04-19 Olivier Hainque <hainque@adacore.com>
1587 * par_sco.adb (Traverse_One, case N_Case_Statement):
1588 Skip pragmas before the first alternative.
1589 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
1591 2016-04-19 Tristan Gingold <gingold@adacore.com>
1593 * adaint.c (__gnat_lwp_self): New function (for darwin).
1594 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
1597 2016-04-19 Olivier Hainque <hainque@adacore.com>
1599 * sem_util.adb (Build_Elaboration_Entity): Always request an
1600 elab counter when preserving control-flow.
1602 2016-04-19 Olivier Hainque <hainque@adacore.com>
1604 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
1605 Needs_Debug_Info when producing SCOs.
1606 * par_sco.adb (Traverse_Aspects): Fix categorization of
1607 Type_Invariant to match actual processing as activated depending
1608 on pragma Assertion_Policy.
1609 * sem_prag.adb (Analyze_Pragma): Remove special case for
1610 Name_Invariant regarding SCO generation, which completely disabled
1611 the production of SCOs for Invariant pragmas and aspects.
1613 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1615 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1618 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1620 * freeze.adb (Freeze_Profile): Refine predicate that checks
1621 whether a function that returns a limited view is declared in
1622 another unit and cannot be frozen at this point.
1624 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1626 * exp_aggr.adb (Component_Count): Handle properly superflat
1627 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
1628 return value of the function is Natural, rather than leaving
1629 the handling of such arrays to the caller of this function.
1631 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1633 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
1634 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
1635 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
1636 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
1637 to publicly visible routine in Sem_Util.
1639 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1641 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
1642 the check if the type of the actual is By_Reference.
1644 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1646 * sem_res.adb (Within_Subprogram_Call): Detect
1647 also nodes that appear in entry calls.
1648 (Resolve_Actuals, Insert_Default): Propagate
1649 dimension information if any, from default expression to the
1650 copy that appears in the list of actuals.
1651 * uintp.ads: minor whitespace fix in comment.
1652 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
1654 * set_targ.adb (Set_Targ): convert directly from
1655 Natural to Pos, without intermediate conversion to Int.
1657 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1659 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
1660 SPARK RM in comment.
1661 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
1663 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
1664 to SPARK RM in both comment and error message.
1666 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
1668 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
1669 CW type, then the subprogram must have a delayed freeze. This
1670 ensures that the backend can properly recover the full view when
1671 elaborating the access subprogram declaration.
1673 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1675 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
1676 overloadable entity if originally overloaded.
1678 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1680 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
1681 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
1682 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
1683 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
1686 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1688 * sem_util.adb (Copy_Node_With_Replacement):
1689 use Set_Comes_From_Source instead of directly manipulating
1690 internals of the node table.
1691 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
1692 * sem_aux.adb (Get_Rep_Pragma,
1693 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
1694 do not change as constants and initialize them in the declaration.
1695 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
1696 variables that do not change as constants and initialize them
1699 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1701 * sem_res.adb (Resolve_Entry_Call): If the entry has
1702 preconditions it is rewritten by means of a wrapper that
1703 incorporates the original call. Before rewriting generate a
1704 reference to the entry being called to prevent spurious warnings
1705 and provide correct cross-reference information.
1707 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1709 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
1710 local constant Scop. Ignore any internally generated loops when
1711 performing the check concerning an abstract subprogram call
1712 without a controlling argument.
1713 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
1715 2016-04-19 Bob Duff <duff@adacore.com>
1717 * sem_elab.adb (Check_A_Call): There are cases where we have No
1718 (Ent) after the Alias loop, even when there was no previous error,
1719 so we can't assert that there was an error.
1721 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1723 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
1724 Reject use of type name as a prefix to 'access within an aggregate
1725 in a context that is not the declarative region of a type.
1727 2016-04-19 Vincent Celier <celier@adacore.com>
1729 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
1730 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
1731 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
1732 Remove anything related to project files
1733 * g-mbdira.adb: minor whitespace cleanup
1734 * g-spipat.adb: minor removal of extra spaces after closing paren
1736 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1738 * exp_ch6.adb (Expand_Actuals): If post-statements are present
1739 and the enclosing context is a function call or indexing, build
1740 an Expression_With_Actions for the call.
1742 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1744 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
1745 a with line for an ignored Ghost unit.
1746 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
1747 Par. A child package is Ghost when its parent is Ghost.
1748 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
1749 a subprogram declaration that acts as a compilation unit.
1751 2016-04-18 Michael Matz <matz@suse.de>
1753 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
1754 (gnat_to_gnu_field): Ditto.
1755 (components_to_record): Ditto.
1756 (create_variant_part_from): Ditto.
1757 (copy_and_substitute_in_size): Ditto.
1758 (substitute_in_type): Ditto.
1759 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
1760 (make_packable_type): Ditto.
1761 (maybe_pad_type): Ditto.
1762 (finish_fat_pointer_type): Ditto.
1763 (finish_record_type): Ditto and use SET_DECL_ALIGN.
1764 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
1765 (create_field_decl): Use SET_DECL_ALIGN.
1767 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1769 * einfo.adb (Overridden_Operation): assert that
1770 function is called for valid arguments.
1771 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
1772 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
1773 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
1774 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
1775 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
1776 No space after closing parenthesis except where required for
1778 * sem_res.adb: Minor reformatting.
1780 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1782 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
1783 statement when relevant.
1785 2016-04-18 Bob Duff <duff@adacore.com>
1787 * a-cuprqu.adb (Enqueue): Properly handle the
1788 case where the new element has a unique priority.
1790 2016-04-18 Tristan Gingold <gingold@adacore.com>
1792 * adaint.h: Define stat structures and functions for iOS
1795 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1797 * sem_res.adb (Resolve_Entry_Call): reset
1798 Is_Overloaded flag after resolving calls to overloaded protected
1800 * exp_spark.adb (Expand_SPARK): call
1801 Qualify_Entity_Names for tasking nodes, i.e. protected types,
1802 task types and entries.
1803 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
1804 in case of an unconstrained type.
1806 2016-04-18 Yannick Moy <moy@adacore.com>
1808 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
1809 comment to document usage of subprogram in GNATprove.
1811 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1813 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
1814 message for wrong placement of aspect Test_Case.
1816 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1818 * einfo.ads: Update the documentation of attribute Renamed_Object.
1819 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
1821 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1823 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
1824 in the case of AAMP (same as for use of the -gnatd.P switch) to
1825 suppress this optimization, which avoids creating a dependence
1826 on the 64-bit arithmetic package.
1828 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1830 * exp_ch4.adb: Update comment.
1832 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1834 * exp_ch6.adb (Expand_Call): Make sure instantiations are
1835 registered only once as pending here.
1837 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1839 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
1840 (Minimize_Expression_With_Actions): New flag.
1841 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
1843 (Resolve_Short_Circuit): Redo previous change
1844 using Minimize_Expression_With_Actions.
1845 (Expand_N_If_Expression,
1846 Expand_Short_Circuit_Operator): Restore old code to avoid
1847 Expression_With_Actions when Minimize_Expression_With_Actions
1850 2016-04-18 Vincent Celier <celier@adacore.com>
1852 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
1853 Stderr_File): Close local file descriptors when no longer needed.
1855 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1857 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
1858 mode check that the type of the cursor in an iteration over
1859 a formal container is not volatile. The proper check on the
1860 element type is done elsewhere.
1862 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1864 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
1865 a subprogram that returns a class-wide type, if the subprogram
1866 is a compilation unit, because otherwise gigi will treat the
1867 subprogram as external, leading to link errors.
1869 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1871 * sem_res.adb (Resolve_Short_Circuit): Do not use
1872 expression-with-actions when generating C.
1874 2016-04-18 Yannick Moy <moy@adacore.com>
1876 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
1877 raise node in GNATprove mode.
1879 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1881 * s-fileio.adb: Minor reformatting.
1882 * sem_prag.adb (Analyze_Input_Item): Add local
1883 variable Input_OK. Do not consider mappings of generic formal
1884 parameters to actuals.
1886 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1888 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
1889 type, the cursor is declared in the scope of the parent type.
1890 (Analyze_Parameter_Specification): A qualified expression with an
1891 iterator type indicates an iteration over a container (explicit
1894 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1896 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
1897 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
1898 * debug.adb: Reserve -gnatd.4 to force generation of C files.
1900 2016-04-18 Yannick Moy <moy@adacore.com>
1902 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
1903 division by zero, instead possibly issue a warning.
1904 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
1905 static division by zero, instead add check flag on original
1907 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
1908 Only issue error when both SPARK_Mode is On and Warn is False.
1910 2016-04-18 Yannick Moy <moy@adacore.com>
1912 * checks.adb (Apply_Scalar_Range_Check): Force
1913 warning instead of error when SPARK_Mode is On, on index out of
1914 bounds, and set check flag for GNATprove.
1916 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1918 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
1919 Update the comment on usage. Reimplemented.
1920 (Check_Input_States.Check_Constituent_Usage): Update the comment
1921 on usage. A Proof_In constituent can now refine an Input state
1922 as long as there is at least one Input constituent present.
1924 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1926 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
1927 body id as the sloc of the entity in the generated subprogram
1928 declaration, to avoid spurious conformance errors when style
1931 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1933 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
1934 Refine check on illegal calls to entities within a task body,
1935 when the entity is declared in an object of the same type. In
1936 a generic context there might be no explicit dereference but if
1937 the prefix includes an access type the construct is legal.
1939 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1941 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
1942 RE_Default_Priority.
1944 2016-04-18 Bob Duff <duff@adacore.com>
1946 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
1947 if the pragma came from an aspect specification.
1949 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1951 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
1953 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1955 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
1956 superfluous conformance check on an inlined body with a previous
1957 spec, use the fact that the generated declaration does not come
1958 from source. We must treat the entity as coming from source to
1959 enable some back-end inlining when pragma appears after the body.
1961 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1963 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
1964 exp_intr.adb: Minor reformatting and typo corrections.
1966 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1968 * sem_ch6.adb: Code cleanup.
1970 2016-04-18 Thomas Quinot <quinot@adacore.com>
1972 * sem_ch13.adb: Minor reformatting and error message tweaking
1973 (remove extraneous spaces).
1975 2016-04-18 Johannes Kanig <kanig@adacore.com>
1977 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
1979 2016-04-18 Bob Duff <duff@adacore.com>
1981 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
1982 exists, and it's a fifo, we use "w" as the open string instead of
1983 "r+". This is necessary to make a write to the fifo block until
1986 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1988 * sem_attr.adb (Denote_Same_Function): Account
1989 for a special case where a primitive of a tagged type inherits
1990 a class-wide postcondition from a parent type.
1992 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1994 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
1995 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
1996 of reserved words is OK.
1997 (Scan_Pragma_Argument_Association):
1998 Add new formal Reserved_Words_OK and update the comment on
1999 usage. Code cleanup. Parse an expression or a reserved word in
2000 identifier form for pragmas Restriction_Warnings and Restrictions
2001 No_Use_Of_Attribute.
2002 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2003 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
2004 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
2006 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
2007 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
2008 Update the parameter profile.
2009 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
2011 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
2012 the comment on usage.
2013 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
2014 * sem_attr.adb (Analyze_Attribute): Check restriction
2015 No_Use_Of_Attribute.
2016 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
2017 restriction No_Use_Of_Attribute before any rewritings have
2019 * sem_prag.adb (Analyze_Pragma): Check restriction
2020 No_Use_Of_Pragma before any rewritings have taken place.
2022 2016-04-18 Bob Duff <duff@adacore.com>
2024 * sem_ch6.adb (Is_Inline_Pragma): The pragma
2025 argument can be a selected component, which has no Chars field,
2026 so we need to deal with that case (use the Selector_Name).
2027 (Check_Inline_Pragma): We need to test Is_List_Member before
2028 calling In_Same_List, because in case of a library unit, they're
2029 not in lists, so In_Same_List fails an assertion.
2031 2016-04-18 Bob Duff <duff@adacore.com>
2033 * namet.ads, namet.adb: Add an Append that appends a
2034 Bounded_String onto a Bounded_String. Probably a little more
2035 efficient than "Append(X, +Y);". Also minor cleanup.
2036 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
2037 Append_Unqualified_Decoded): Make sure these work with non-empty
2039 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
2040 parameter, defaulting to Global_Name_Buffer.
2041 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
2042 Bounded_String parameter, no default.
2043 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
2044 Bounded_String instead of Global_Name_Buffer.
2045 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
2046 to Append_Entity_Name, and pass a Bounded_String parameter,
2047 instead of using globals.
2048 (Add_Source_Info): Pass a Bounded_String parameter, instead of
2050 (Expand_Source_Info): Use local instead of globals.
2051 * stringt.ads, stringt.adb (Append): Add an Append procedure
2052 for appending a String_Id onto a Bounded_String.
2053 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
2055 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
2056 Adjust_Name_Case parameter.
2057 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
2058 Set_Casing; that's the default.
2059 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
2060 protected subprograms are entry calls; otherwise it is not possible to
2061 distinguish them from regular subprogram calls.
2063 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2065 * sem_ch13.adb (Has_Good_Profile): Improvement
2066 of error message. Now indicates subtype_mark of formal parameter
2067 rather than the formal's name, plus minor rewording.
2069 2016-04-18 Pascal Obry <obry@adacore.com>
2071 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
2073 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2075 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
2077 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2079 * par-ch4.adb, sem_prag.adb: Minor reformatting.
2081 2016-04-18 Bob Duff <duff@adacore.com>
2083 * sinput.ads, sinput.adb (Build_Location_String): Take a
2084 parameter instead of using a global variable. The function
2085 version no longer destroys the Name_Buffer.
2086 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
2087 parameter, which defaults to the Global_Name_Buffer, so some
2088 calls can avoid the global.
2089 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
2090 to avoid using globals. All but one call to Build_Location_String
2091 avoids the global. Only one call to String_From_Name_Buffer
2094 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2096 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2098 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2100 * sem_eval.adb (Choice_Matches): Check the expression
2101 against the predicate values when the choice denotes a
2102 subtype with a static predicate.
2103 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
2104 tests for predicates.
2105 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
2106 is not static. (Is_Static_Subtype): A subtype with a dynamic
2107 predicate is not static.
2108 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
2109 (Is_Static_Subtype): Update the comment on usage.
2111 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2113 * sem_prag.adb (Analyze_Input_Item): Allow
2114 generic formals to appear as initialization items.
2116 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2118 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
2119 Has_Good_Profile): Additional error message to indicate that
2120 the second parameter of the subprogram must be a first subtype.
2122 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2124 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
2125 Use the pragma lookahead that determines whether a subprogram
2126 is to be inlined, when some level of backend optimization is
2128 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
2129 code used to create an instance body when needed for inlining.
2130 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
2131 call appears within an instantiation that is not a compilation
2132 unit, add a pending instantiation for the enclosing instance,
2133 so the backend can inline in turn the calls contained in the
2136 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2138 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
2139 that relates operations of the parent type to the operations of
2140 the derived type has three distinct sources:
2141 a) explicit operations of the derived type carry an
2142 Overridden_Operation that designates the operation in the
2144 b) Implicit operations that are inherited by the derived type
2145 carry an alias that may be an explicit subprogram (in which case
2146 it may have an Overridden_ Operation indicator) or may also be
2147 inherited and carry its own alias.
2148 c) If the parent type is an interface, the operation of the
2149 derived type does not override, but the interface operation
2150 indicates the operation that implements it.
2151 * sem_prag.adb: Minor reformatting.
2152 * sem_prag.adb (Check_External_Property): Update
2153 the comment on usage. Reimplement.
2155 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2157 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
2158 profiles such as ZFP, ceiling priority is not available.
2160 2016-04-18 Bob Duff <duff@adacore.com>
2162 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
2164 2016-04-18 Bob Duff <duff@adacore.com>
2166 * sem_elab.adb (Output_Calls): Use
2167 Get_Name_String, to clearly indicate that the global Name_Buffer
2168 is being used. The previous code used Is_Internal_Name, which
2169 returns a Boolean, but also has a side effect of setting the
2170 Name_Buffer. Then it called the other Is_Internal_Name, which uses
2171 the Name_Buffer for its input. And then it called Error_Msg_N,
2172 again using the Name_Buffer. We haven't eliminated the global
2173 usage here, but we've made it a bit clearer.
2174 This also allows us to have a side-effect-free version of
2176 * namet.ads, namet.adb: Provide a type Bounded_String, along with
2177 routines that can be used without using global variables. Provide
2178 Global_Name_Buffer so existing code can continue to use the
2179 global. Mark the routines that use globals as obsolete. New code
2180 shouldn't call the obsolete ones, and we should clean up existing
2181 code from time to time.
2182 Name_Find_Str is renamed as Name_Find.
2183 * namet.h: Changed as necessary to interface to the new version
2185 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
2188 2016-04-18 Yannick Moy <moy@adacore.com>
2190 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
2191 outside of GNATprove, hence it should not be removed.
2193 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2195 * sem_prag.adb (Analyze_Refinement_Clause):
2196 The refinement of an external abstract state can now mention
2197 non-external constituents.
2198 (Check_External_Property): Update all SPARK RM references.
2200 2016-04-18 Bob Duff <duff@adacore.com>
2202 * exp_intr.adb: Remove some duplicated code.
2204 2016-04-18 Yannick Moy <moy@adacore.com>
2206 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
2207 package spec and body out of SPARK.
2209 2016-04-18 Johannes Kanig <kanig@adacore.com>
2211 * spark_xrefs.ads: Minor comment update.
2213 2016-04-18 Johannes Kanig <kanig@adacore.com>
2215 * gnat1drv.adb (Gnat1drv): Force loading of System
2218 2016-04-18 Bob Duff <duff@adacore.com>
2220 * a-cuprqu.adb: Correction to previous change. If a new node
2221 is inserted at the front of the queue (because it is higher
2222 priority than the previous front node), we need to update
2223 Header.Next_Unequal -- not just in the case where the queue was
2226 2016-04-18 Bob Duff <duff@adacore.com>
2228 * a-cuprqu.ads: Change the representation of List_Type from a
2229 singly-linked list to a doubly-linked list. In addition, add a
2230 pointer Next_Unequal, which points past a possibly-long chain
2231 of equal-priority items. This increases efficiency, especially
2232 in the case of many equal-priority items.
2233 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
2234 advantage of new data structure.
2235 (Finalize): Rewrite in terms of Dequeue, for simplicity.
2237 2016-04-18 Yannick Moy <moy@adacore.com>
2239 * contracts.adb (Analyze_Object_Contract,
2240 Analyze_Protected_Contract): Remove tests performed in GNATprove.
2241 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
2242 Remove query for tests performed in GNATprove.
2244 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2246 * sem_aggr.adb (Resolve_Record_Aggregate): If
2247 Warn_On_Redundant_Constructs is enabled, report a redundant box
2248 association that does not cover any components, as it done for
2249 redundant others associations in case statements.
2251 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2253 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
2254 Analyze the generated Check pragma for an inherited condition so
2255 that it does not freeze the dispatching type of the primitive
2256 operation, because it is pre-analyzed at the point of the
2257 subprogram declaration (and not in the subprogram body, as is
2258 done during regular expansion).
2260 2016-04-18 Vincent Celier <celier@adacore.com>
2262 * ali.ads: Increase the range of all _Id types to 100 millions.
2264 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2266 * sem_warn.adb (Check_References): Change warning to suggest
2267 using pragma Export rather than saying "volatile has no effect".
2269 2016-04-18 Bob Duff <duff@adacore.com>
2271 * g-souinf.ads (Compilation_ISO_Date): New function to return
2272 the current date in ISO form.
2273 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
2274 a call to Compilation_ISO_Date into a string literal containing
2275 the current date in ISO form.
2276 * exp_intr.ads (Add_Source_Info): Improve documentation.
2277 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
2278 Compilation_ISO_Date.
2279 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
2281 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2283 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
2284 to subtypes that are not first subtypes.
2286 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2288 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
2290 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
2291 generated pragmas after subprogram declaration, rather than in
2292 the corresponding subprogram body.
2293 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
2294 mode, if the operation is overridding, call
2295 Collect_Inherited_Class_Wide_Conditions to generate the
2296 corresponding pragmas immediately after the corresponding
2297 subprogram declaration.
2299 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2301 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
2302 type to natural numbers.
2303 (Stype): document code characters for concurrent entities.
2305 2016-04-18 Olivier Hainque <hainque@adacore.com>
2307 * targparm.ads: Update the Frontend_Exceptions default internal
2309 (Frontend_Exceptions_On_Target): Change default value to True.
2311 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2313 * sem_ch4.adb (Analyze_Selected_Component): Refine error
2314 detection when a selected component in the body of a synchronized
2315 type is a reference to an object of the same type declared
2316 elsewhere. The construct is legal if the prefix of the selected
2317 component includes an explicit dereference at any point.
2319 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2321 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
2322 internally generated expressions when trying to determine whether
2323 a formal parameter of a tagged type subject to Extensions_Visible
2324 False is used to initialize an object.
2325 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
2326 internally generated expressions when trying to determine whether
2327 a formal parameter of a tagged type subject to Extensions_Visible
2328 False is used in a type conversion.
2330 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2332 * sem_res.adb (Is_Protected_Operation_Call):
2333 Add guards to account for a non-decorated selected component.
2335 2016-04-18 Yannick Moy <moy@adacore.com>
2337 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
2338 implementation of Body_Has_SPARK_Mode_On.
2339 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
2340 New function replacing previous Get_SPARK_Mode_From_Pragma, that
2341 deals also with aspects.
2342 (Get_SPARK_Mode_Type): Make function internal again.
2343 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
2344 Get_SPARK_Mode_From_Annotation.
2346 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2348 * contracts.adb (Analyze_Object_Contract): Update references to
2350 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
2351 * ghost.adb Add with and use clauses for Sem_Disp.
2352 (Check_Ghost_Derivation): Removed.
2353 (Check_Ghost_Overriding):
2354 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
2355 (Check_Ghost_Primitive): New routine.
2356 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
2357 Update references to SPARK RM. (Is_OK_Pragma): Update references
2358 to SPARK RM. Predicates are now a valid context for references
2360 * ghost.ads (Check_Ghost_Derivation): Removed.
2361 (Check_Ghost_Overriding): Update the comment on usage.
2362 (Check_Ghost_Primitive): New routine.
2363 (Check_Ghost_Refinement): New routine.
2364 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
2365 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
2366 related to Ghost derivations
2367 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
2368 related to the convention-like behavior of pragma Ghost.
2369 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
2370 of a tagged type and its primitive agree.
2371 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
2372 RM. Move the verification of pragma Assertion_Policy Ghost
2373 to the proper place. Remove the now obsolete check related
2374 to Ghost derivations.
2375 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
2376 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
2378 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2380 * layout.adb: Fix more minor typos in comments.
2382 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2384 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
2386 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2388 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
2389 mode, collect inherited class-wide conditions to generate the
2390 corresponding pragmas.
2391 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
2392 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
2393 procedure for overriding subprograms, used to generate the pragmas
2394 corresponding to an inherited class- wide pre- or postcondition.
2395 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
2396 from contracts.adb (Replace_Condition_Entities): Subsidiary
2397 Build_Pragma_Check_Equivalent, to implement the proper semantics
2398 of inherited class-wide conditions, as given in AI12-0113.
2399 (Process_Class_Wide_Condition): Removed.
2400 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
2401 in contract of subprogram, to collect inherited class-wide
2403 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
2405 2016-04-18 Yannick Moy <moy@adacore.com>
2407 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
2408 * a-calend.ads (Ada.Calendar): Mark package spec as
2409 SPARK_Mode and add synchronous external abstract state Clock_Time.
2411 2016-04-18 Yannick Moy <moy@adacore.com>
2413 * sem_res.adb (Resolve_Call): Prevent inlining of
2414 calls inside expression functions. Factor previous code issuing
2415 errors to call Cannot_Inline instead, which does appropriate
2416 processing of message for GNATprove.
2418 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2420 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
2421 osint-b.adb: Cleanups.
2423 2016-04-18 Yannick Moy <moy@adacore.com>
2425 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
2426 body to inline in GNATprove mode when SPARK_Mode On applies to
2428 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
2431 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2433 * layout.adb: Fix minor typo in comment.
2434 * inline.adb: Fix minor pasto.
2435 * sem_ch12.ads: Fix minor typos in comments.
2437 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2439 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
2440 handle some complex cases of tag indeterminate calls that are
2441 actuals in other dispatching calls that are themselves tag
2443 (Check_Dispatching_Context): Add parameter to support recursive
2444 check for an enclosing construct that may provide a tag for a
2445 tag-indeterminate call.
2447 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2449 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2450 Add global variables Task_Input_Seen and Task_Output_Seen.
2451 (Analyze_Global_Item): Detect an illegal use of the current
2452 instance of a single protected/task type in a global annotation.
2453 (Analyze_Input_Output): Inputs and output related to the current
2454 instance of a task unit are now tracked.
2455 (Check_Usage): Require
2456 the presence of the current instance of a task unit only when
2457 one input/output is available. (Current_Task_Instance_Seen):
2459 (Is_CCT_Instance): New parameter profile. Update
2460 the comment on usage. The routine now properly recognizes several
2461 cases related to single protected/task types.
2463 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2465 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
2466 to create a brand new freeze node. This handles a case where an
2467 ignored Ghost context is freezing something which is not ignored
2468 Ghost and whose freeze node should not be removed from the tree.
2469 (New_Freeze_Node): New routine.
2471 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2473 * sigtramp.h (__gnat_set_is_vxsim) New function to
2474 tell sigtramp-vxworks to handle vxsim signal contexts. *
2475 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
2476 differences in the sigcontext structure between the expected
2477 regular x86 or x86_64 ones and the ones received in case of
2478 exexution on the vxworks simulator.
2479 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
2480 this information to sigtramp-vxworks.c. Remove the old mechanism for
2482 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
2484 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2486 * exp_ch3.adb (Inline_Init_Proc): New function returning
2487 whether the initialization procedure of a type should be
2488 inlined. Return again True for controlled type themselves.
2489 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
2490 (Build_Record_Init_Proc): Likewise.
2492 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2494 * gnatvsn.ads (Library_Version): Bump to 7.
2496 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2498 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
2499 on the entity of a subprogram declaration that is completed by
2500 an expression function.
2502 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2504 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
2505 declaration can appear in an aspect specification for a dynamic
2506 predicate, and a pragma for aspect Predicate_Failure.
2507 * exp_util.adb (Replace_Subtype_References): Replace current
2508 occurrences of the subtype to which a dynamic predicate applies,
2509 byt the expression that triggers a predicate check. Needed to
2510 implement new aspect Predicate_Failure.
2512 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2514 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
2515 * Makefile.rtl: update accordingly.
2517 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2519 * sem_type.adb (Disambiguate): Call Covers only when necessary
2520 for standard operators.
2522 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2524 * atree.ads (Num_Extension_Nodes): Add couple of figures
2526 * atree.adb: Add GNAT.Heap_Sort_G dependency.
2527 (Print_Statistics): New exported procedure to print statistics.
2529 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2531 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
2532 as to be inlined if the type needs finalization.
2534 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2536 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
2537 alignment for x86_64.
2538 * init.c: Better fix for guard page reset on x86_64-vx7.
2539 Do not try to retrieve the page that actually raised
2540 the signal as the probing mechanism used on x86_64 do not allow
2541 such retrieval. We thus just test if the guard page is active,
2542 and re-activate it if not.
2544 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2546 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
2549 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2551 * affinity.c: Use the proper type for task id.
2552 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
2554 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2556 * sem_prag.adb (Process_Convention): Relax rule on exporting
2557 Intrinsic types if Relaxed_RM_Semantics is True.
2559 2016-04-18 Vincent Celier <celier@adacore.com>
2561 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
2562 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
2563 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
2564 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
2565 exp_ch3.ads, exp_unst.adb: Change "descendent" to
2566 "descendant" in comments, error messages and identifiers.
2567 * gcc-interface/decl.c: Ditto.
2569 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2571 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
2572 New_S only once at the beginning of the function.
2574 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
2576 * gcc-interface/decl.c (components_to_record): Restrict the previous
2577 change to fields with variable size.
2579 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
2581 * gcc-interface/decl.c (components_to_record): Add special case for
2582 single field with representation clause at offset 0.
2584 2016-03-16 Svante Signell <svante.signell@gmail.com>
2586 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
2587 * s-osinte-gnu.ads: New file.
2589 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
2591 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
2592 (Stack_Check_Limits): Set to False.
2593 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
2594 (Stack_Check_Limits): Set to False.
2595 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
2596 (Stack_Check_Limits): Set to False.
2597 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
2598 (Stack_Check_Limits): Set to False.
2599 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
2600 (Stack_Check_Limits): Set to False.
2602 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
2604 * gcc-interface/trans.c (statement_node_p): New predicate.
2605 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
2606 not return dummy results for expressions attached to packed array
2607 implementation types.
2609 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
2611 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
2612 the expression of a renaming manually in case #3.
2614 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
2616 * system-linux-s390.ads: Enable Stack_Check_Probes.
2617 * system-linux-s390.ads: Likewise.
2619 2016-02-29 Martin Liska <mliska@suse.cz>
2621 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
2622 Replace ENABLE_CHECKING macro with flag_checking.
2624 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2626 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
2627 handling of unconstrained array types as designated types into common
2628 processing. Also handle array types as incomplete designated types.
2630 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2632 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
2633 ASIS mode, fully lay out the minimal record type.
2635 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2637 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
2638 (build_return_expr): Likewise.
2639 (Call_to_gnu): If this is a function call and there is no target,
2640 create a temporary for the return value for all aggregate types,
2641 but never create it for a return statement. Push a binding level
2642 around the call in more cases. Remove obsolete code.
2644 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2646 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
2647 * gcc-interface/gigi.h (gigi): Remove useless attribute.
2648 (gnat_gimplify_expr): Likewise.
2649 (gnat_to_gnu_external): Declare.
2650 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
2651 code dealing with the expression of external constants into...
2652 Invoke gnat_to_gnu_external instead.
2653 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
2654 when not for a definition. Deal with COMPOUND_EXPR and variables with
2655 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
2656 'reference to a function call in a renaming. Remove obsolete test and
2657 adjust associated comment.
2658 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
2659 temporaries created to hold the return value, if any.
2660 (gnat_to_gnu_external): ...this. New function.
2661 * gcc-interface/utils.c (create_var_decl): Detect a constant created
2662 to hold 'reference to function call.
2663 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
2664 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
2666 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
2668 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
2669 the prefix denotes an entity which Has_Atomic_Components.
2670 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
2671 denotes an entity which Has_Atomic_Components.
2673 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
2675 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
2676 for fat pointer or scalar types.
2678 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
2680 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
2681 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
2682 Call maybe_character_value on the array bounds. Get to the base type
2683 of the index type and call maybe_debug_type on it.
2684 * gcc-interface/utils.c (finish_character_type): Add special treatment
2687 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
2689 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
2690 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
2692 2016-02-12 Jakub Jelinek <jakub@redhat.com>
2694 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
2695 neighbour -> neighbor.
2696 * prep.adb: Likewise.
2697 * prj.ads: Likewise.
2698 * prepcomp.adb: Likewise.
2699 * g-socket.ads: Likewise.
2700 * s-imgrea.adb: Likewise.
2701 * a-calend.adb: Likewise.
2702 * exp_disp.adb: Likewise.
2703 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
2704 * g-socket.adb: Likewise.
2705 * sem_ch12.adb: Likewise.
2706 * terminals.c: Likewise.
2708 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
2710 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
2711 build_common_tree_nodes.
2713 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
2715 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
2716 DECL_IGNORED_P last.
2718 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
2720 * gcc-interface/gigi.h (enum attr_type): Rename into...
2721 (enum attrib_type): ...this.
2722 (struct attrib): Adjust.
2723 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
2725 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
2727 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
2728 literal if the entity is of a character type.
2729 * gcc-interface/lang.opt (fsigned-char): New option.
2730 * gcc-interface/misc.c (gnat_handle_option): Accept it.
2731 (gnat_init): Adjust comment.
2732 * gcc-interface/gigi.h (finish_character_type): New prototype.
2733 (maybe_character_type): New inline function.
2734 (maybe_character_value): Likewise.
2735 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
2736 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
2737 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
2738 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
2739 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
2740 Copy TYPE_STRING_FLAG from type to subtype.
2741 <E_Array_Type>: Deal with character index types.
2742 <E_Array_Subtype>: Likewise.
2743 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
2744 char_type_node throughout.
2745 (build_raise_check): Likewise.
2746 (get_type_length): Deal with character types.
2747 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
2749 <Attr_Pred>: Likewise.
2750 (Loop_Statement_to_gnu): Likewise.
2751 (Raise_Error_to_gnu): Likewise.
2752 <N_Indexed_Component>: Deal with character index types. Remove
2754 <N_Slice>: Likewise.
2755 <N_Type_Conversion>: Deal with character types. Minor tweak.
2756 <N_Unchecked_Type_Conversion>: Likewise.
2758 <N_Op_Eq>: Likewise.
2759 (emit_index_check): Delete.
2760 * gcc-interface/utils.c (finish_character_type): New function.
2761 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
2762 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
2763 with char_type_node.
2764 (build_call_raise): Likewise.
2765 (build_call_raise_column): Likewise.
2766 (build_call_raise_range): Likewise.
2768 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2770 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
2771 (build_call_raise_range): Likewise.
2772 (gnat_unsigned_type): Delete.
2773 (gnat_signed_type): Likewise.
2774 (gnat_signed_or_unsigned_type_for): New prototype.
2775 (gnat_unsigned_type_for): New inline function.
2776 (gnat_signed_type_for): Likewise.
2777 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
2778 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
2779 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
2780 and compute their base type from that.
2781 <E_Array_Subtype>: Remove duplicate declaration.
2782 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
2783 * gcc-interface/trans.c (get_type_length): Likewise.
2784 (Attribute_to_gnu): Likewise.
2785 (Loop_Statement_to_gnu): Likewise.
2786 (Call_to_gnu): Likewise.
2787 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
2788 and gnat_signed_type_for. Minor tweaks.
2789 (build_binary_op_trapv): Likewise.
2790 (emit_check): Likewise.
2791 (convert_with_check): Likewise.
2792 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
2793 functions. Minor tweaks.
2794 (Case_Statement_to_gnu): Remove dead code.
2795 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
2796 (init_code_table): Minor reordering.
2797 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
2798 (gnat_signed_type): Likewise.
2799 (gnat_signed_or_unsigned_type_for): New function.
2800 (unchecked_convert): Use directly the size in the test for precision
2801 vs size adjustments.
2802 (install_builtin_elementary_types): Call gnat_signed_type_for.
2803 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
2805 (build_goto_raise): New function taken from...
2806 (build_call_raise): ...here. Call it.
2807 (build_call_raise_column): Add KIND parameter and call it.
2808 (build_call_raise_range): Likewise.
2810 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2812 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
2813 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
2814 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
2815 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
2816 and tweak gnat_encodings tests throughout.
2817 (initial_value_needs_conversion): Likewise.
2818 (intrin_arglists_compatible_p): Likewise.
2819 * gcc-interface/misc.c (gnat_print_type): Likewise.
2820 (gnat_get_debug_type): Likewise.
2821 (gnat_get_fixed_point_type_info): Likewise.
2822 (gnat_get_array_descr_info): Likewise.
2823 (get_array_bit_stride): Likewise.
2824 (gnat_get_type_bias): Fix formatting.
2825 (enumerate_modes): Likewise.
2826 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
2827 (add_decl_expr): Simplify NULL_TREE test.
2828 (end_stmt_group): Likewise.
2829 (build_binary_op_trapv): Fix formatting.
2830 (get_exception_label): Use switch statement.
2831 (init_code_table): Move around.
2832 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
2833 (gnat_poplevel): Likewise.
2834 (gnat_set_type_context): Likewise.
2835 (defer_or_set_type_context): Fix formatting.
2836 (gnat_pushdecl): Simplify NULL_TREE test.
2837 (maybe_pad_type): Likewise.
2838 (add_parallel_type): Likewise.
2839 (create_range_type): Likewise.
2840 (process_deferred_decl_context): Likewise.
2841 (convert): Likewise.
2842 (def_builtin_1): Likewise.
2843 * gcc-interface/utils2.c (find_common_type): Likewise.
2844 (build_binary_op): Likewise.
2845 (gnat_rewrite_reference): Likewise.
2846 (get_inner_constant_reference): Likewise.
2848 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2851 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
2852 the parent function instead of the current function in order to issue
2853 the warning or the error. Add guard for ignored functions.
2855 2016-01-17 Jakub Jelinek <jakub@redhat.com>
2857 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
2859 2016-01-15 Jakub Jelinek <jakub@redhat.com>
2861 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
2862 of char * for path_val to avoid warnings.
2864 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
2866 * gcc-interface/utils.c: Bump copyright year.
2867 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
2868 the current lexical scope.
2870 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2872 * gnat_ugn.texi: Bump @copying's copyright year.
2873 * gnat_rm.texi: Likewise.
2875 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
2877 * gnatvsn.ads: Bump copyright year.
2880 Copyright (C) 2016 Free Software Foundation, Inc.
2882 Copying and distribution of this file, with or without modification,
2883 are permitted in any medium without royalty provided the copyright
2884 notice and this notice are preserved.