1 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3 * aa_util.adb, aa_util.ads: Removed, no longer used.
5 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7 * sem_prag.adb (Analyze_Pragma): An object
8 renaming declaration resulting from the expansion of an object
9 declaration is a suitable context for pragma Ghost.
11 2016-04-27 Doug Rupp <rupp@adacore.com>
13 * init.c: Refine last checkin so the only requirement is the
14 signaling compilation unit is compiled with the same mode as
15 the compilation unit containing the initial landing pad.
17 2016-04-27 Ed Schonberg <schonberg@adacore.com>
19 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
20 specifications for Default_Iterator, including overloaded cases
21 where no interpretations are legal, and return types that are
24 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
26 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
27 an accessibility check when the left hand side of the assignment
28 denotes a container cursor.
29 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
30 * sem_ch4.adb (Find_Indexing_Operations): New routine.
31 (Try_Container_Indexing): Code cleanup.
33 2016-04-27 Arnaud Charlet <charlet@adacore.com>
35 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
37 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
39 * errout.adb, errutil.adb: Minor reformatting.
41 2016-04-27 Ed Schonberg <schonberg@adacore.com>
43 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
44 Check that the classwide version is illegal when the prefix is
45 an operation of an untagged synchronized type.
47 2016-04-27 Arnaud Charlet <charleT@adacore.com>
49 * sinput-l.ads, sem_ch13.adb: Minor editing.
51 2016-04-27 Doug Rupp <rupp@adacore.com>
53 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
54 Bump the pc so the lower order bit is set.
56 2016-04-27 Ed Schonberg <schonberg@adacore.com>
58 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
59 enabled, report an empty range in a case construct.
61 2016-04-27 Arnaud Charlet <charlet@adacore.com>
63 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
64 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
66 2016-04-27 Bob Duff <duff@adacore.com>
68 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
69 as is done for the other containers.
71 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
73 * ghost.adb (In_Subprogram_Body_Profile): New routine.
74 (Is_OK_Declaration): Treat an unanalyzed expression
75 function as an OK context. Treat a reference to a Ghost entity
76 as OK when it appears within the profile of a subprogram body.
78 2016-04-27 Bob Duff <duff@adacore.com>
80 * errout.ads: Document the fact that informational messages
81 don't have to be warnings.
82 * errout.adb (Error_Msg_Internal): In statistics counts, deal
83 correctly with informational messages that are not warnings.
84 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
85 Set_Posted already checks for errors and ignores others.
86 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
87 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
88 implies Is_Warning_Msg.
89 * errutil.adb (Error_Msg): In statistics counts, deal correctly
90 with informational messages that are not warnings.
92 2016-04-27 Ed Schonberg <schonberg@adacore.com>
94 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
95 to determine whether a record type is a null record.
96 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
97 null record and there is no expression in the declaration,
98 no predicate check applies to the object.
100 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
102 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
103 instantiated package should not cause freezing of previous contracts.
105 2016-04-27 Ed Schonberg <schonberg@adacore.com>
107 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
108 that do not come from source.
109 (Analyze_Dimension_Subtype_Declaration): Allow confirming
110 dimensions on subtype entity, either inherited from base type
111 or provided by aspect specification.
113 2016-04-27 Ed Schonberg <schonberg@adacore.com>
115 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
116 Add scalar formal object Zero, to allow detection and report
117 when the matrix is singular.
118 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
119 Raise Constraint_Error if the Forward_Eliminate pass has
120 determined that determinant is Zero.o
121 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
123 * s-ngcoar.adb (Solve): Ditto.
125 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
127 * sem_ch3.adb: Minor reformatting.
129 2016-04-27 Ed Schonberg <schonberg@adacore.com>
131 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
132 that identifier has a usable type before analysis, to handle
133 properly identifiers introduced after some lexical/syntactic
134 recovery that created new identifiers.
136 2016-04-27 Bob Duff <duff@adacore.com>
138 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
139 exp_util.adb: Remove assertions that can fail in obscure cases when
140 assertions are turned on but tampering checks are turned off.
142 2016-04-27 Javier Miranda <miranda@adacore.com>
144 * exp_ch6.adb (Add_Call_By_Copy_Code,
145 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
146 whose type comes from the limited view.
148 2016-04-27 Yannick Moy <moy@adacore.com>
150 * a-textio.adb: Complete previous patch.
152 2016-04-27 Yannick Moy <moy@adacore.com>
154 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
155 Error_Msg_N to issue message about impossibility to inline call,
156 with slight change of message.
158 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
160 * exp_spark.adb (Expand_Potential_Renaming): Removed.
161 (Expand_SPARK): Update the call to expand a potential renaming.
162 (Expand_SPARK_Potential_Renaming): New routine.
163 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
164 * sem.adb Add with and use clauses for Exp_SPARK.
165 (Analyze): Expand a non-overloaded potential renaming for SPARK.
167 2016-04-27 Ed Schonberg <schonberg@adacore.com>
169 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
170 check full view for the presence of defaulted discriminants,
171 even when the partial view of a private type has no visible and
172 no unknown discriminants.
174 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
176 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
178 2016-04-27 Nicolas Roche <roche@adacore.com>
180 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
182 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
184 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
185 cleanup. Check the original node when trying to determine the node kind
186 of pragma Volatile's argument to account for untagged derivations
187 where the type is transformed into a constrained subtype.
189 2016-04-27 Olivier Hainque <hainque@adacore.com>
191 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
192 consistent posix interface on the caller side.
194 2016-04-27 Ed Schonberg <schonberg@adacore.com>
196 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
197 is a limited view of a type, initialize the Limited_Dependents
198 field to catch misuses of the type in a client unit.
200 2016-04-27 Thomas Quinot <quinot@adacore.com>
202 * a-strunb-shared.adb (Finalize): add missing Reference call.
203 * s-strhas.adb: minor grammar fix and extension of comment
204 * sem_ch8.adb: minor whitespace fixes
206 2016-04-27 Ed Schonberg <schonberg@adacore.com>
208 * lib-xref.adb (Get_Type_Reference): Handle properly the case
209 of an object declaration whose type definition is a class-wide
210 subtype and whose expression is a function call that returns a
213 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
215 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
216 (Output_Name): New routine.
218 2016-04-27 Bob Duff <duff@adacore.com>
220 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
222 2016-04-27 Vincent Celier <celier@adacore.com>
224 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
225 --unchecked-shared-lib-imports and set the flag
226 Opt.Unchecked_Shared_Lib_Imports accordingly.
228 2016-04-27 Ed Schonberg <schonberg@adacore.com>
230 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
231 A generic subprogram is never a primitive operation, and thus
232 a classwide condition for it is not legal.
234 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
236 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
239 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
241 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
242 (Resolve_Actuals): Flag effectively volatile objects with enabled
243 property Async_Writers or Effective_Reads as illegal.
244 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
246 2016-04-27 Javier Miranda <miranda@adacore.com>
248 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
249 Do not generate the profile of the equality operator if it has
250 been explicitly defined as abstract in the parent type. Required
251 to avoid reporting an spurious error.
253 2016-04-27 Ed Schonberg <schonberg@adacore.com>
255 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
256 procedure to compute the dimension vector of a scalar expression
257 and compare it with the dimensions if its expected subtype. Used
258 for the ultimate components of a multidimensional aggregate,
259 whose components typically are themselves aggregates that are
260 expanded separately. Previous to this patch, dimensionality
261 checking on such aggregates generated spurious errors.
262 * sem_aggr.adb (Resolve_Array_Aggregate): Use
263 Check_Expression_Dimensions when needed.
265 2016-04-27 Javier Miranda <miranda@adacore.com>
267 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
268 (applicable to E_Procedure).
269 (Corresponding_Procedure): New attribute (applicable to E_Function).
270 * exp_util.adb (Build_Procedure_Form): Link the function with
271 its internally built proc and viceversa.
272 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
273 attribute Rewritten_For_C and Corresponding_Procedure to the body.
274 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
275 (Rewritten_For_C_Proc_Id): Removed.
276 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
277 locate the corresponding procedure.
279 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
281 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
282 corresponding pragma.
284 2016-04-27 Bob Duff <duff@adacore.com>
286 * exp_ch3.adb: Minor comment improvement.
288 2016-04-27 Ed Schonberg <schonberg@adacore.com>
290 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
291 return type is an untagged limited record with only access
292 discriminants and no controlled components, the return value does not
293 need to use the secondary stack.
295 2016-04-27 Javier Miranda <miranda@adacore.com>
297 * exp_util.adb (Remove_Side_Effects): When
298 generating C code handle object declarations that have
299 discriminants and are initialized by means of a call to a
302 2016-04-27 Ed Schonberg <schonberg@adacore.com>
304 * a-textio.adb (Get_Line function): Handle properly the case of
305 a line that has the same length as the buffer (or a multiple
306 thereof) and there is no line terminator.
307 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
308 in the string when there is no previous line terminator and we
309 need at most one additional character.
311 2016-04-27 Arnaud Charlet <charlet@adacore.com>
313 * s-rident.ads: Make No_Implicit_Loops non partition wide.
315 2016-04-27 Arnaud Charlet <charlet@adacore.com>
317 * sem_ch11.adb (Analyze_Handled_Statements): check useless
318 assignments also in entries and task bodies, not only in
319 procedures and declaration blocks.
320 * sem_ch5.adb (Analyze_Block_Statement): check useless
321 assignements in declaration blocks as part of processing their
322 handled statement sequence, just like it was done for procedures
323 and now is also done for entries and task bodies.
324 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
325 of entries and task bodies just like of procedures.
327 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
329 * sem_util.adb (Is_Volatile_Function): Recognize
330 a function declared within a protected type as well as the
331 protected/unprotected version of a function.
333 2016-04-27 Bob Duff <duff@adacore.com>
335 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
336 declaration of the form "X : T := Func (...);", where T is
337 controlled, as a renaming.
338 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
339 to be an empty string, instead of null-ing out the Reference.
340 * exp_util.adb (Needs_Finalization): Remove redundant code.
342 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
344 * aspects.ads Aspects Export and Import do not require delay. They
345 were classified as delayed aspects, but treated as non-delayed
346 by the analysis of aspects.
347 * freeze.adb (Copy_Import_Pragma): New routine.
348 (Wrap_Imported_Subprogram): Copy the import pragma by first
349 resetting all semantic fields to avoid an infinite loop when
351 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
352 comment on the processing of aspects Export and Import
354 (Analyze_Aspect_Convention: New routine.
355 (Analyze_Aspect_Export_Import): New routine.
356 (Analyze_Aspect_External_Link_Name): New routine.
357 (Analyze_Aspect_External_Or_Link_Name): Removed.
358 (Analyze_Aspect_Specifications): Factor out the analysis of
359 aspects Convention, Export, External_Name, Import, and Link_Name
360 in their respective routines. Aspects Export and Import should
361 not generate a Boolean pragma because their corresponding pragmas
362 have a very different syntax.
363 (Build_Export_Import_Pragma): New routine.
364 (Get_Interfacing_Aspects): New routine.
366 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
368 * inline.adb (Add_Inlined_Body): Overhaul implementation,
369 robustify handling of -gnatn1, add special treatment for
370 expression functions.
372 2016-04-27 Doug Rupp <rupp@adacore.com>
374 * g-traceb.ads: Update comment.
375 * exp_ch2.adb: minor style fix in object declaration
377 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
379 * sem_elab.adb (Check_Internal_Call): Do not
380 consider a call when it appears within pragma Initial_Condition
381 since the pragma is part of the elaboration statements of a
382 package body and may only call external subprograms or subprograms
383 whose body is already available.
384 (Within_Initial_Condition): New routine.
386 2016-04-27 Ed Schonberg <schonberg@adacore.com>
388 * exp_util.adb (Build_Procedure_Form): Prevent double generation
389 of the procedure form when dealing with an expression function
390 whose return type is an array.
391 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
392 * exp_ch6.adb: Proper conversion for inherited operation in C.
393 * sem_ch6.adb: Code cleanup.
395 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
397 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
398 * g-socket.adb: Minor reformatting.
399 * sinfo.ads: Minor comment correction.
400 * sem_warn.ads: minor grammar fix in comment
402 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
404 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
405 (maybe_pad_type): Adjust comment.
406 (finish_record_type): Likewise.
407 (rest_of_record_type_compilation): Likewise.
408 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
409 parameter from integer to boolean. Adjust recursive calls.
410 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
411 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
412 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
413 Pass false to finish_record_type. Set the debug type later.
414 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
415 (gnat_to_gnu_component_type): Fix formatting.
416 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
417 (gnat_to_gnu_type): Likewise.
418 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
419 (Loop_Statement_to_gnu): Likewise.
420 (Subprogram_Body_to_gnu): Likewise.
421 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
422 (Exception_Handler_to_gnu_gcc): Likewise.
423 (Compilation_Unit_to_gnu): Likewise.
424 (gnat_to_gnu): Likewise.
425 (push_exception_label_stack): Likewise.
426 (elaborate_all_entities_for_package): Likewise.
427 (process_freeze_entity): Likewise.
428 (process_decls): Likewise.
429 (process_type): Likewise.
430 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
431 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
432 call to rest_of_record_type_compilation.
433 (rest_of_record_type_compilation): Use copy_type.
434 (copy_type): Use correctly typed constants.
435 (gnat_signed_or_unsigned_type_for): Use copy_type.
436 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
437 (build_goto_raise): Adjust call tognat_to_gnu_entity.
439 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
441 * gcc-interface/misc.c (gnat_init): Do not call
442 internal_reference_types.
444 2016-04-27 Svante Signell <svante.signell@gmail.com>
446 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
447 * s-osinte-gnu.ads: Small tweaks.
448 * s-osinte-gnu.adb: New file.
450 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
452 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
453 constituent even if it is not to prevent spurious errors.
455 2016-04-21 Gary Dismukes <dismukes@adacore.com>
457 * sem_ch4.adb: Minor typo fixes and reformatting.
459 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
461 * g-calend.ads (No_Time): The same value in any timezone.
462 * g-socket.adb (Raise_Host_Error): Remove ending
463 dot from original error message before append colon delimited
466 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
468 * sem_ch3.adb: Code cleanup.
469 * sem_ch6.adb: Code cleanup.
470 (Is_Matching_Limited_View): New routine.
471 (Matches_Limited_With_View): Reimplemented.
472 * sem_ch10.adb (Decorate_Type): Code cleanup.
474 2016-04-21 Doug Rupp <rupp@adacore.com>
476 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
478 2016-04-21 Ed Schonberg <schonberg@adacore.com>
480 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
481 indexing functions, collect all overloadings of the call firts,
482 and then transfer them to indexing node, to prevent interleaving
483 of the set of interpretations of the nodes involved.
484 * sem_res.adb (Resolve): Suppress cascaded errors that report
485 ambiguities when one of the actuals in an overloaded generatlized
486 indexing operation is illegal and has type Any_Type, as is done
487 for similar cascaded errors in subprogram calls.
488 (Valid_Tagged_Conversion): Cleanup conversion checks when one
489 of the types involved is a class-wide subtype.
491 2016-04-21 Ed Schonberg <schonberg@adacore.com>
493 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
494 subprogram declaration within a wrapper package, skip pragmas
495 that may have been generated by aspect specifications on the
498 2016-04-21 Javier Miranda <miranda@adacore.com>
500 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
501 code return True for array identifiers since the backend needs
502 to initialize such component by means of memcpy().
504 2016-04-21 Arnaud Charlet <charlet@adacore.com>
506 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
507 potentially uninitialized memory.
508 * sem_ch3.adb: Minor style fix in comment.
510 2016-04-21 Arnaud Charlet <charlet@adacore.com>
512 * gnat_rm.texi, gnat_ugn.texi,
513 doc/gnat_ugn/gnat_project_manager.rst,
514 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
515 doc/gnat_ugn/gnat_and_program_execution.rst,
516 doc/gnat_ugn/gnat_utility_programs.rst,
517 doc/gnat_ugn/the_gnat_compilation_model.rst,
518 doc/gnat_rm/implementation_defined_attributes.rst,
519 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
520 doc/gnat_rm/implementation_defined_pragmas.rst,
521 doc/gnat_rm/the_gnat_library.rst,
522 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
523 * doc/Makefile: Cleanups.
525 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
527 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
529 2016-04-21 Ed Schonberg <schonberg@adacore.com>
531 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
532 disambiguate local variables that may be hidden from inner visibility
533 by nested block declarations or loop variables.
535 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
537 * s-soflin.adb: Initialize the Stack_Limit global variable.
539 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
541 * lib-writ.adb: Minor reformatting.
543 2016-04-21 Ed Schonberg <schonberg@adacore.com>
545 * exp_pakd.adb (Compute_Number_Components): New function to
546 build an expression that computes the number of a components of
547 an array that may be multidimensional.
548 (Expan_Packed_Eq): Use it.
550 2016-04-21 Arnaud Charlet <charlet@adacore.com>
552 * g-traceb.ads: Update list of supported platforms.
554 2016-04-21 Ed Schonberg <schonberg@adacore.com>
556 * sem_ch13.adb (Add_Predicates): if the type is declared in
557 an inner package it may be frozen outside of the package, and
558 the generated pragma has not been analyzed yet, the expression
559 for the predicate must be captured and added to the predicate
560 function at this point.
562 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
564 * contracts.adb (Analyze_Package_Body_Contract): Do not check
565 for a missing package refinement because 1) packages do not have
566 "refinement" and 2) the check for proper state refinement is
567 performed in a different place.
568 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
569 (Has_Null_Visible_Refinement): Reimplemented.
570 * sem_ch3.adb (Analyze_Declarations): Determine whether all
571 abstract states have received a refinement and if not, emit
573 * sem_ch7.adb (Analyze_Package_Declaration): Code
574 cleanup. Determine whether all abstract states of the
575 package and any nested packages have received a refinement
576 and if not, emit errors.
577 (Requires_Completion_In_Body): Add new formal parameter
578 Do_Abstract_States. Update the comment on usage. Propagate the
579 Do_Abstract_States flag to all Unit_Requires_Body calls.
580 (Unit_Requires_Body): Remove formal
581 parameter Ignore_Abstract_States. Add new formal paramter
582 Do_Abstract_States. Propagate the Do_Abstract_States flag to
583 all Requires_Completion_In calls.
584 * sem_ch7.ads (Unit_Requires_Body): Remove formal
585 parameter Ignore_Abstract_States. Add new formal paramter
586 Do_Abstract_States. Update the comment on usage.
587 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
588 not initialize the constituent list as this is now done on a
589 need-to-add-element basis.
590 (Analyze_Single_Task_Declaration):
591 Do not initialize the constituent list as this is now done on
592 a need-to-add-element basis.
593 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
594 lists as this is now done on a need-to-add-element basis.
595 * sem_prag.adb (Analyze_Constituent): Set the
596 refinement constituents when adding a new element.
597 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
598 adding a new element.
599 (Analyze_Part_Of_Option): Set the Part_Of
600 constituents when adding a new element.
601 (Analyze_Pragma): Set the Part_Of constituents when adding a new
603 (Check_Constituent_Usage (all versions)): Reimplemented.
604 (Collect_Constituent): Set the refinement constituents when adding
606 (Create_Abstract_State): Do not initialize the
607 constituent lists as this is now done on a need-to-add-element basis.
608 (Propagate_Part_Of): Set the Part_Of constituents when
609 adding a new element.
610 * sem_util.adb (Check_State_Refinements): New routine.
611 (Has_Non_Null_Refinement): Reimplemented.
612 (Has_Null_Refinement): Reimplemented.
613 (Requires_State_Refinement): Removed.
614 * sem_util.ads (Check_State_Refinements): New routine.
615 (Requires_State_Refinement): Removed.
617 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
619 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
620 * sem.adb: Fix comment.
622 2016-04-21 Ed Schonberg <schonberg@adacore.com>
624 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
625 declaration with no aspects, whose subtype_mark is a subtype
626 with predicates, inherits the list of subprograms for the type.
628 2016-04-21 Arnaud Charlet <charlet@adacore.com>
630 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
633 2016-04-21 Thomas Quinot <quinot@adacore.com>
635 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
637 2016-04-21 Ed Schonberg <schonberg@adacore.com>
639 * lib-writ.adb (Write_ALI): Do not record in ali file units
640 that are present in the files table but not analyzed. These
641 units are present because they appear in the context of units
642 named in limited_with clauses, and the unit being compiled does
643 not depend semantically on them.
645 2016-04-21 Ed Schonberg <schonberg@adacore.com>
647 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
648 create the procedure body for an function returning an array type,
649 when generating C code. Reuse the subprogram body rather than
650 creating a new one, both as an efficiency measure and because
651 in an instance the body may contain global references that must
654 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
656 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
659 2016-04-21 Javier Miranda <miranda@adacore.com>
661 * exp_aggr.adb (Component_Check): Extend
662 the check that verifies that the aggregate has no function
663 calls to handle transformations performed by the frontend.
664 (Ultimate_Original_Expression): New subprogram.
666 2016-04-21 Philippe Gil <gil@adacore.com>
668 * krunch.adb (Krunch): Fix krunching of i-java.
670 2016-04-21 Arnaud Charlet <charlet@adacore.com>
672 * exp_ch8.adb (Evaluation_Required): Always return
673 True when Modify_Tree_For_C.
675 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
677 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
678 * alloc.ads: Minor comment fixes.
679 * einfo.ads: Fix typo.
681 2016-04-21 Arnaud Charlet <charlet@adacore.com>
683 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
684 changes to handle all cases of components depending on the
685 discriminant, not just string literals.
687 2016-04-21 Ed Schonberg <schonberg@adacore.com>
689 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
690 declaration is the generated declaration for a generic actual,
691 inherit predicates from the actual if it is a predicated subtype.
693 2016-04-21 Ed Schonberg <schonberg@adacore.com>
695 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
696 inherited and its result is controlling, introduce a conversion
697 on the actual for the corresponding procedure call, to avoid
698 spurious type errors.
700 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
702 * krunch.adb (Krunch): Fix krunching of i-vxworks.
704 2016-04-21 Gary Dismukes <dismukes@adacore.com>
706 * exp_aggr.adb: Minor reformatting and code cleanup.
708 2016-04-21 Ed Schonberg <schonberg@adacore.com>
710 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
711 resolution, because they introduce local names. Full resolution
712 will take place when predicate function is constructed.
714 2016-04-21 Arnaud Charlet <charlet@adacore.com>
716 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
717 change to take into account Per_Object_Constraint field rather
718 than special casing strings.
719 * exp_ch6.adb: Fix typo in Replace_Returns.
721 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
723 * sem_ch5.adb: Minor reformatting.
725 2016-04-21 Arnaud Charlet <charlet@adacore.com>
727 * exp_aggr.adb (Backend_Processing_Possible): Return False
728 when generating C and aggregate contains function calls.
730 2016-04-21 Tristan Gingold <gingold@adacore.com>
732 * krunch.adb (Krunch): Only partially krunch children of
733 Interfaces that aren't known.
735 2016-04-21 Ed Schonberg <schonberg@adacore.com>
737 * sem_prag.adb (Make_Inline): Handle properly the instantiation
738 of a generic subpprogram that carries an Inline aspect. Place
739 inline info on the anonymous subprogram that is constructed in
741 (Analyze_Pragma, case Pure): Do not check placement if pragma
742 appears within an instantiation, which can be nested at any level.
743 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
744 node from anonymous subprogram to its visible renaming. The
745 freeze node will be constructed if the subprogram carries
747 (Set_Global): Preserve dimension information if present (from
750 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
752 * gnatlink.adb: Change wording of the warning message on
753 problematic filenames to be more neutral. Add a new substring
754 "patch" introduced on Windows 10.
756 2016-04-21 Philippe Gil <gil@adacore.com>
758 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
760 2016-04-21 Javier Miranda <miranda@adacore.com>
762 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
765 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
767 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
768 * einfo.ads New synthesized attribute
769 Has_Non_Null_Abstract_State along with occurrences in entities.
770 (Has_Non_Null_Abstract_State): New routine.
771 * sem_ch7.adb (Unit_Requires_Body): Add local variable
772 Requires_Body. A package declaring an abstract state requires
773 a body only when the state is non-null and the package contains
774 at least one other construct that requires completion in a body.
775 * sem_util.adb (Mode_Is_Off): Removed.
776 (Requires_State_Refinement): Remove an obsolete check. Code
779 2016-04-21 Bob Duff <duff@adacore.com>
781 * sem_attr.adb (Analyze_Attribute): In processing
782 the 'Old attribute, a warning is given for infinite recursion. Fix
783 the code to not crash when the prefix of 'Old denotes a protected
785 * sem_ch5.adb (Analyze_Iterator_Specification):
786 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
787 where the parameter would not be an object.
789 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
791 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
792 Etype or Underlying_Type of the operands.
794 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
796 * atree.adb (Print_Statistics): Protect against overflows and
797 print the memory consumption in bytes.
798 * table.adb (Reallocate): Do the intermediate calculation of the new
799 size using the Memory.size_t type.
801 2016-04-21 Gary Dismukes <dismukes@adacore.com>
803 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
804 expansion of Attribute_Machine and Attribute_Model for AAMP.
806 2016-04-21 Ed Schonberg <schonberg@adacore.com>
808 * freeze.adb: Disable previous change for now.
810 2016-04-21 Ed Schonberg <schonberg@adacore.com>
812 * sem_ch8.adb (Find_Selected_Component): If prefix has an
813 access type and designated type is a limited view, introduce
814 an explicit dereference before continuing the analysis, and
815 set its type to the non-limited view of the designated type,
816 if we are in context where it is available.
818 2016-04-21 Ed Schonberg <schonberg@adacore.com>
820 * freeze.adb: Freeze profile in ASIS mode.
822 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
824 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
825 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
827 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
829 * exp_ch6.adb: Minor reformatting.
831 2016-04-21 Ed Schonberg <schonberg@adacore.com>
833 * sem_ch13.adb: Minor comment update.
835 2016-04-21 Ed Schonberg <schonberg@adacore.com>
837 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
838 boolean parameter to determine whether freezing an overloadable
839 entity freezes its profile as well. This is required by
840 AI05-019. The call to Freeze_Profile within Freeze_Entity is
841 conditioned by the value of this flag, whose default is True.
842 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
843 reference freezes the prefix, but it the prefix is a subprogram
844 it does not freeze its profile.
846 2016-04-21 Javier Miranda <miranda@adacore.com>
848 * exp_util.adb (Build_Procedure_Form): No action needed for
849 subprogram renamings since the backend can generate the call
850 using the renamed subprogram. This leaves the tree more clean
852 * exp_ch6.adb (Expand_Call): Extend previous patch for
853 rewritten-for-c entities to handle subprogram renamings.
854 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
856 2016-04-21 Ed Schonberg <schonberg@adacore.com>
858 * sem_ch13.adb: Code cleanup.
860 2016-04-21 Ed Schonberg <schonberg@adacore.com>
862 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
863 created for SPARK_To_C, the entity must remain invisible so it
864 does not overload subsequent references to the original function.
865 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
866 Handle Extended_Return_Statements by replacing it with a block
867 with assignments and a simple return statement.
868 * exp_util.adb (Build_Procedure_Form): Make procedure entity
869 invisible after analyzing declaration, to prevent improper
872 2016-04-21 Javier Miranda <miranda@adacore.com>
874 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
875 attribute Rewritten_For_C to the body since since the expander
876 may generate calls using that entity.
877 * exp_ch6.adb (Expand_Call): For internally generated
878 calls ensure that they reference the entity of the spec
879 of the called function.
880 (Rewritten_For_C_Func_Id): New subprogram.
881 (Rewritten_For_C_Proc_Id): New subprogram.
882 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
883 ensure that we skip freezing entities.
884 * exp_util.adb (Build_Procedure_Form): No action needed if the
885 procedure was already built.
887 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
889 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
892 2016-04-21 Ed Schonberg <schonberg@adacore.com>
894 * sem_util.adb (Denotes_Iterator): Use root type to determine
895 whether the ultimate ancestor is the predefined iterator
897 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
898 and avoid reuse of Pack local variable.
900 2016-04-21 Olivier Hainque <hainque@adacore.com>
902 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
903 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
904 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
905 Executable_Extension to ".out".
907 2016-04-21 Javier Miranda <miranda@adacore.com>
909 * frontend.adb: Update call to Unnest_Subprograms.
910 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
911 (Unnest_Subprograms): Moved to package exp_unst.
912 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
914 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
915 enumeration literals when generating C code.
917 2016-04-21 Javier Miranda <miranda@adacore.com>
919 * frontend.adb: Remove call to initialize Exp_Ch6.
920 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
921 (Unest_Entry/Unest_Bodies): Removed.
922 (Unnest_Subprograms): Code cleanup.
924 2016-04-21 Arnaud Charlet <charlet@adacore.com>
926 * set_targ.adb (Read_Target_Dependent_Values):
927 close target description file once its contents is read.
928 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
929 and Stderr_File): Close local file descriptors before spawning
931 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
932 local variables to make the code easier to understand and avoid
933 duplicated calls to Parent and Generic_Parent.
935 2016-04-20 Bob Duff <duff@adacore.com>
937 * s-os_lib.ads: Minor comment fix.
939 2016-04-20 Ed Schonberg <schonberg@adacore.com>
941 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
942 a discriminant check for a type whose partial view has unknown
943 discriminants when the full view has discriminants with defaults.
945 2016-04-20 Javier Miranda <miranda@adacore.com>
947 * exp_util.adb (Remove_Side_Effects): When generating C code
948 remove side effect of type conversion of access to unconstrained
950 (Side_Effect_Free): Return false for the type
951 conversion of access to unconstrained array type when generating
953 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
954 of access to unconstrained array type conversion when generating
957 2016-04-20 Ed Schonberg <schonberg@adacore.com>
959 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
960 function, to construct the declaration of a predicate function
961 at the end of the current declarative part rather than at the
962 (possibly later) freeze point of the type. This also allows uses
963 of a type with predicates in instantiations elsewhere.
964 (Resolve_Aspect_Expression): New procedure to detect visiblity
965 errors in aspect expressions, at the end of the declarative part
966 that includes the type declaration.
967 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
968 predicate function from private to full view.
969 * einfo.adb (Predicate_Function): Refine search for predicate
970 function when type has a full view and predicate function may
971 be defined on either view.
973 2016-04-20 Javier Miranda <miranda@adacore.com>
975 * frontend.adb: Passing the root of the tree to
976 Unnest_Subprograms().
977 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
978 took care of adding subprograms to the Unest_Bodies table since
979 performing such action too early disables the ability to process
980 generic instantiations.
981 (Unnest_Subprograms): Adding parameter.
982 (Search_Unnesting_Subprograms): New subprogram.
983 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
985 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
987 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
989 2016-04-20 Ed Schonberg <schonberg@adacore.com>
991 * exp_unst.adb (Check_Static_Type): For a private type, check
994 2016-04-20 Ed Schonberg <schonberg@adacore.com>
996 * sem_attr.adb (Check_Type): Reject an attribute reference in
997 an aspect expression, when the prefix of the reference is the
998 current instance of the type to which the aspect applies.
1000 2016-04-20 Bob Duff <duff@adacore.com>
1002 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
1003 hiding unless we're actually hiding something. The previous
1004 code would (for example) warn about a "<" on a record type
1005 because it incorrectly thought it was hiding the "<" on Boolean
1006 in Standard. We need to check that the homonym S is in fact a
1007 homograph of a predefined operator.
1009 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1011 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
1012 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
1013 procedure equivalent to a function returning an array, when this
1014 construction is deferred to the freeze point of the function.
1015 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
1016 function that renames an instance of Unchecked_Conversion.
1017 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
1018 declaration for a function returning an array.
1019 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
1021 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1023 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
1024 New predicate to determine that in a context with full run-time,
1025 a function call is an expansion of a reference to attribute
1027 * sem_ch5.adb (Analyze_Function_Call): use it.
1028 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
1030 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1032 * einfo.adb Flag286 is now used as Is_Exception_Handler.
1033 (Is_Exception_Handler): New routine.
1034 (Set_Is_Exception_Handler): New routine.
1035 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
1036 * einfo.ads New attribute Is_Exception_Handler along with
1037 occurrences in entities.
1038 (Is_Exception_Handler): New routine along with pragma Inline.
1039 (Set_Is_Exception_Handler): New routine along with pragma Inline.
1040 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
1041 for exception handlers with a choice parameter.
1042 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
1043 generated for a choice parameter as an exception handler.
1045 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1047 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
1048 (Constrain_Discriminated_Type): In an instance, if the type has
1049 unknown discriminants, use its full view.
1050 (Process_Subtype): Check that the base type is private before
1051 adding subtype to Private_Dependents list.
1053 2016-04-20 Bob Duff <duff@adacore.com>
1055 * sem_ch13.adb: Minor comment fix.
1057 2016-04-20 Yannick Moy <moy@adacore.com>
1059 * sem_ch4.adb: Fix typos in comments.
1060 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
1062 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1064 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
1065 current instance of a task type is legal if the prefix is an
1066 expression of that task type and the selector is an entry or
1069 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1071 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
1072 varsize field at the end for efficiency.
1074 2016-04-20 Vincent Celier <celier@adacore.com>
1076 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
1077 ls" includes the switch -V.
1078 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
1080 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
1083 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1085 * sem_ch12.adb (Qualify_Type): Do not perform
1086 partial qualification when the immediate scope is a generic unit.
1088 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1090 * exp_unst.adb: Minor reformatting.
1092 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1094 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
1095 tag assignment and adjustment preceed the accessibility check.
1096 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
1098 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1100 * exp_prag.adb (Expand_Attributes): Ensure that
1101 the temporary used to capture the value of attribute 'Old's
1102 prefix is properly initialized.
1104 2016-04-20 Javier Miranda <miranda@adacore.com>
1106 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
1109 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1111 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
1114 2016-04-20 Vincent Celier <celier@adacore.com>
1116 * make.adb: Code cleanup.
1118 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1120 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
1123 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1125 * sem_ch12.adb (Copy_Generic_Node): Handle the special
1126 qualification installed for universal literals that act as
1127 operands in binary or unary operators. (Qualify_Operand): Mark
1128 the qualification to signal the instantiation mechanism how to
1129 handle global reference propagation.
1130 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
1131 (Set_Is_Qualified_Universal_Literal): New routine.
1132 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
1133 with occurrences in nodes.
1134 (Is_Qualified_Universal_Literal):
1135 New routine along with pragma Inline.
1136 (Set_Is_Qualified_Universal_Literal): New routine along with
1139 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1141 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
1142 so that the corresponding checks are preserved across compilations
1143 that include System.Constants in their context.
1145 2016-04-20 Gary Dismukes <dismukes@adacore.com>
1147 * sem_type.adb: Minor typo fix and reformatting.
1148 * a-conhel.ads: Update comment.
1150 2016-04-20 Bob Duff <duff@adacore.com>
1152 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
1153 code so it doesn't trigger an "uninit var" warning.
1155 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1157 * sem_attr.ads Add new table Universal_Type_Attribute.
1158 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
1159 checking attributes.
1161 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1163 * exp_aggr.adb (Init_Stored_Discriminants,
1164 Init_Visible_Discriminants): New procedures, subsidiary of
1165 Build_Record_Aggr_Code, to handle properly the construction
1166 of aggregates for a derived type that constrains some parent
1167 discriminants and renames others.
1169 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1171 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
1172 (Save_References_In_Operator): Add explicit qualifications in
1173 the generic template for all operands of universal type.
1174 * sem_type.adb (Disambiguate): Update the call to Matches.
1175 (Matches): Reimplemented.
1176 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
1178 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1180 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
1181 an illegal aspect that freezes the entity to which it applies.
1183 2016-04-20 Bob Duff <duff@adacore.com>
1185 * a-stwibo.ads, a-stzbou.ads
1186 ("="): Add overriding keyword before function to avoid crash when
1187 compiler is called with -gnatyO (check overriding indicators).
1189 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1191 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
1192 is a configuration pragma and it uses the ARG syntax, insert
1193 the rewritten pragma after the current one rather than using
1196 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1198 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
1201 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1203 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
1204 s-imglli.adb: Minor reformatting.
1206 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1208 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
1209 renamed operator when the associated node appears within a
1211 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
1213 2016-04-20 Yannick Moy <moy@adacore.com>
1215 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
1216 * einfo.adb (Set_Overridden_Operation): Add assertion.
1217 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
1220 2016-04-20 Javier Miranda <miranda@adacore.com>
1222 * exp_unst.adb (Append_Unique_Call): New subprogram.
1223 (Unnest_Subprogram): Replace the unique occurrence
1224 of Call.Append() by Append_Unique_Call() which protects us from
1225 adding to the Calls table duplicated entries.
1227 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1229 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
1230 * xref_lib.ads (Dependencies_Tables): instantiate
1231 Table package with types that guarantee its safe use.
1232 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
1235 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1237 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
1238 Disable expansion when generating C code.
1239 * sinfo.ads, inline.ads: Minor editing.
1241 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1243 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
1246 2016-04-20 Javier Miranda <miranda@adacore.com>
1248 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
1249 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
1250 declaration of the internally built _postcondition procedure.
1252 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1254 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
1256 * sem_util.adb (Is_Unchecked_Conversion_Instance):
1257 defense against library-level renamings of other functions,
1258 which are never instances of Unchecked_Conversion.
1259 * einfo.ads: minor fix of casing in comment
1261 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1263 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
1264 that has been analyzed and expanded already. Qualify the names
1265 in the proper body for use in the generation of C code.
1267 2016-04-20 Javier Miranda <miranda@adacore.com>
1269 * contracts.adb (Build_Postconditions_Procedure): Force its
1270 inlining when generating C code.
1271 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
1272 _postconditions when generating C code.
1273 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
1274 _postconditions when generating C code.
1275 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
1276 types of return value and argument changed from Node_Id to
1279 2016-04-20 Vincent Celier <celier@adacore.com>
1281 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
1283 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
1285 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
1286 the Has_Delayed_Freeze flag on the anonymous instance node.
1288 2016-04-20 Javier Miranda <miranda@adacore.com>
1290 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
1291 scope associated with the renaming object declaration.
1292 * exp_util.adb (Insert_Actions): Remove handling of iterator
1293 loop marked as requiring the secondary stack.
1295 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1297 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
1298 AI12-0124, which extends the functionality of the attribute so it
1299 reflects the semantics of GNAT 'Img when applied to scalar types.
1300 * lib-xref.adb: minor whitespace layout fix.
1302 2016-04-20 Vincent Celier <celier@adacore.com>
1304 * clean.adb (Gnatclean): Fail if project file specified and
1305 gprclean is not available.
1306 * gnatname.adb: Fail is -P is used and gprname is not available.
1307 * make.adb (Initialize): Fail if project file specified and
1308 gprbuild is not available.
1310 2016-04-20 Bob Duff <duff@adacore.com>
1312 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
1313 stack when possible.
1315 2016-04-20 Gary Dismukes <dismukes@adacore.com>
1317 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
1320 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1322 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1323 If the pragma comes from an aspect specification, verify that
1324 the aspect applies to an entity with a declarative part.
1325 * exp_ch5.adb: Code cleanup.
1327 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1329 * sem_res.adb (Resolve_If_Expression): If first expression is
1330 universal, resolve subsequent ones with the corresponding class
1331 type (Any_Integer or Any_Real).
1333 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1335 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
1336 disabled, complete the analysis of the iterator name to ensure
1337 that reference for entities within are properly generated.
1339 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1341 * a-dispat.ads (Yield): add Global contract.
1342 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
1343 * a-taside.adb: Added Initializes => Tasking_State.
1345 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1347 * sem_ch13.adb (Build_Invariant_Procedure):
1348 Reimplement the invariant procedure spec and body insertion.
1350 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1352 * sem_ch13.adb (Add_Invariant): Do not replace
1353 the saved expression of an invariatn aspect when inheriting
1354 a class-wide type invariant as this clobbers the existing
1355 expression. Do not use New_Copy_List as it is unnecessary
1356 and leaves the parent pointers referencing the wrong part of
1357 the tree. Do not replace the type references for ASIS when
1358 inheriting a class-wide type invariant as this clobbers the
1359 existing replacement.
1361 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1363 * sem_util.adb (Build_Explicit_Dereference): If the designated
1364 expression is an entity name, generate reference to the entity
1365 because it will not be resolved again.
1367 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1369 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1370 gnat_rm.texi: Update documentation.
1372 2016-04-19 Olivier Hainque <hainque@adacore.com>
1374 * par_sco.adb (Traverse_One, case N_Case_Statement):
1375 Skip pragmas before the first alternative.
1376 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
1378 2016-04-19 Tristan Gingold <gingold@adacore.com>
1380 * adaint.c (__gnat_lwp_self): New function (for darwin).
1381 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
1384 2016-04-19 Olivier Hainque <hainque@adacore.com>
1386 * sem_util.adb (Build_Elaboration_Entity): Always request an
1387 elab counter when preserving control-flow.
1389 2016-04-19 Olivier Hainque <hainque@adacore.com>
1391 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
1392 Needs_Debug_Info when producing SCOs.
1393 * par_sco.adb (Traverse_Aspects): Fix categorization of
1394 Type_Invariant to match actual processing as activated depending
1395 on pragma Assertion_Policy.
1396 * sem_prag.adb (Analyze_Pragma): Remove special case for
1397 Name_Invariant regarding SCO generation, which completely disabled
1398 the production of SCOs for Invariant pragmas and aspects.
1400 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1402 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1405 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1407 * freeze.adb (Freeze_Profile): Refine predicate that checks
1408 whether a function that returns a limited view is declared in
1409 another unit and cannot be frozen at this point.
1411 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1413 * exp_aggr.adb (Component_Count): Handle properly superflat
1414 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
1415 return value of the function is Natural, rather than leaving
1416 the handling of such arrays to the caller of this function.
1418 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1420 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
1421 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
1422 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
1423 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
1424 to publicly visible routine in Sem_Util.
1426 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1428 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
1429 the check if the type of the actual is By_Reference.
1431 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1433 * sem_res.adb (Within_Subprogram_Call): Detect
1434 also nodes that appear in entry calls.
1435 (Resolve_Actuals, Insert_Default): Propagate
1436 dimension information if any, from default expression to the
1437 copy that appears in the list of actuals.
1438 * uintp.ads: minor whitespace fix in comment.
1439 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
1441 * set_targ.adb (Set_Targ): convert directly from
1442 Natural to Pos, without intermediate conversion to Int.
1444 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1446 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
1447 SPARK RM in comment.
1448 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
1450 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
1451 to SPARK RM in both comment and error message.
1453 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
1455 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
1456 CW type, then the subprogram must have a delayed freeze. This
1457 ensures that the backend can properly recover the full view when
1458 elaborating the access subprogram declaration.
1460 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1462 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
1463 overloadable entity if originally overloaded.
1465 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1467 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
1468 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
1469 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
1470 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
1473 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1475 * sem_util.adb (Copy_Node_With_Replacement):
1476 use Set_Comes_From_Source instead of directly manipulating
1477 internals of the node table.
1478 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
1479 * sem_aux.adb (Get_Rep_Pragma,
1480 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
1481 do not change as constants and initialize them in the declaration.
1482 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
1483 variables that do not change as constants and initialize them
1486 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1488 * sem_res.adb (Resolve_Entry_Call): If the entry has
1489 preconditions it is rewritten by means of a wrapper that
1490 incorporates the original call. Before rewriting generate a
1491 reference to the entry being called to prevent spurious warnings
1492 and provide correct cross-reference information.
1494 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1496 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
1497 local constant Scop. Ignore any internally generated loops when
1498 performing the check concerning an abstract subprogram call
1499 without a controlling argument.
1500 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
1502 2016-04-19 Bob Duff <duff@adacore.com>
1504 * sem_elab.adb (Check_A_Call): There are cases where we have No
1505 (Ent) after the Alias loop, even when there was no previous error,
1506 so we can't assert that there was an error.
1508 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1510 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
1511 Reject use of type name as a prefix to 'access within an aggregate
1512 in a context that is not the declarative region of a type.
1514 2016-04-19 Vincent Celier <celier@adacore.com>
1516 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
1517 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
1518 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
1519 Remove anything related to project files
1520 * g-mbdira.adb: minor whitespace cleanup
1521 * g-spipat.adb: minor removal of extra spaces after closing paren
1523 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1525 * exp_ch6.adb (Expand_Actuals): If post-statements are present
1526 and the enclosing context is a function call or indexing, build
1527 an Expression_With_Actions for the call.
1529 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1531 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
1532 a with line for an ignored Ghost unit.
1533 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
1534 Par. A child package is Ghost when its parent is Ghost.
1535 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
1536 a subprogram declaration that acts as a compilation unit.
1538 2016-04-18 Michael Matz <matz@suse.de>
1540 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
1541 (gnat_to_gnu_field): Ditto.
1542 (components_to_record): Ditto.
1543 (create_variant_part_from): Ditto.
1544 (copy_and_substitute_in_size): Ditto.
1545 (substitute_in_type): Ditto.
1546 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
1547 (make_packable_type): Ditto.
1548 (maybe_pad_type): Ditto.
1549 (finish_fat_pointer_type): Ditto.
1550 (finish_record_type): Ditto and use SET_DECL_ALIGN.
1551 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
1552 (create_field_decl): Use SET_DECL_ALIGN.
1554 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1556 * einfo.adb (Overridden_Operation): assert that
1557 function is called for valid arguments.
1558 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
1559 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
1560 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
1561 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
1562 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
1563 No space after closing parenthesis except where required for
1565 * sem_res.adb: Minor reformatting.
1567 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1569 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
1570 statement when relevant.
1572 2016-04-18 Bob Duff <duff@adacore.com>
1574 * a-cuprqu.adb (Enqueue): Properly handle the
1575 case where the new element has a unique priority.
1577 2016-04-18 Tristan Gingold <gingold@adacore.com>
1579 * adaint.h: Define stat structures and functions for iOS
1582 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1584 * sem_res.adb (Resolve_Entry_Call): reset
1585 Is_Overloaded flag after resolving calls to overloaded protected
1587 * exp_spark.adb (Expand_SPARK): call
1588 Qualify_Entity_Names for tasking nodes, i.e. protected types,
1589 task types and entries.
1590 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
1591 in case of an unconstrained type.
1593 2016-04-18 Yannick Moy <moy@adacore.com>
1595 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
1596 comment to document usage of subprogram in GNATprove.
1598 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1600 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
1601 message for wrong placement of aspect Test_Case.
1603 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1605 * einfo.ads: Update the documentation of attribute Renamed_Object.
1606 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
1608 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1610 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
1611 in the case of AAMP (same as for use of the -gnatd.P switch) to
1612 suppress this optimization, which avoids creating a dependence
1613 on the 64-bit arithmetic package.
1615 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1617 * exp_ch4.adb: Update comment.
1619 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1621 * exp_ch6.adb (Expand_Call): Make sure instantiations are
1622 registered only once as pending here.
1624 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1626 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
1627 (Minimize_Expression_With_Actions): New flag.
1628 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
1630 (Resolve_Short_Circuit): Redo previous change
1631 using Minimize_Expression_With_Actions.
1632 (Expand_N_If_Expression,
1633 Expand_Short_Circuit_Operator): Restore old code to avoid
1634 Expression_With_Actions when Minimize_Expression_With_Actions
1637 2016-04-18 Vincent Celier <celier@adacore.com>
1639 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
1640 Stderr_File): Close local file descriptors when no longer needed.
1642 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1644 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
1645 mode check that the type of the cursor in an iteration over
1646 a formal container is not volatile. The proper check on the
1647 element type is done elsewhere.
1649 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1651 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
1652 a subprogram that returns a class-wide type, if the subprogram
1653 is a compilation unit, because otherwise gigi will treat the
1654 subprogram as external, leading to link errors.
1656 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1658 * sem_res.adb (Resolve_Short_Circuit): Do not use
1659 expression-with-actions when generating C.
1661 2016-04-18 Yannick Moy <moy@adacore.com>
1663 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
1664 raise node in GNATprove mode.
1666 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1668 * s-fileio.adb: Minor reformatting.
1669 * sem_prag.adb (Analyze_Input_Item): Add local
1670 variable Input_OK. Do not consider mappings of generic formal
1671 parameters to actuals.
1673 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1675 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
1676 type, the cursor is declared in the scope of the parent type.
1677 (Analyze_Parameter_Specification): A qualified expression with an
1678 iterator type indicates an iteration over a container (explicit
1681 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1683 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
1684 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
1685 * debug.adb: Reserve -gnatd.4 to force generation of C files.
1687 2016-04-18 Yannick Moy <moy@adacore.com>
1689 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
1690 division by zero, instead possibly issue a warning.
1691 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
1692 static division by zero, instead add check flag on original
1694 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
1695 Only issue error when both SPARK_Mode is On and Warn is False.
1697 2016-04-18 Yannick Moy <moy@adacore.com>
1699 * checks.adb (Apply_Scalar_Range_Check): Force
1700 warning instead of error when SPARK_Mode is On, on index out of
1701 bounds, and set check flag for GNATprove.
1703 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1705 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
1706 Update the comment on usage. Reimplemented.
1707 (Check_Input_States.Check_Constituent_Usage): Update the comment
1708 on usage. A Proof_In constituent can now refine an Input state
1709 as long as there is at least one Input constituent present.
1711 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1713 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
1714 body id as the sloc of the entity in the generated subprogram
1715 declaration, to avoid spurious conformance errors when style
1718 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1720 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
1721 Refine check on illegal calls to entities within a task body,
1722 when the entity is declared in an object of the same type. In
1723 a generic context there might be no explicit dereference but if
1724 the prefix includes an access type the construct is legal.
1726 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1728 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
1729 RE_Default_Priority.
1731 2016-04-18 Bob Duff <duff@adacore.com>
1733 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
1734 if the pragma came from an aspect specification.
1736 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1738 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
1740 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1742 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
1743 superfluous conformance check on an inlined body with a previous
1744 spec, use the fact that the generated declaration does not come
1745 from source. We must treat the entity as coming from source to
1746 enable some back-end inlining when pragma appears after the body.
1748 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1750 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
1751 exp_intr.adb: Minor reformatting and typo corrections.
1753 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1755 * sem_ch6.adb: Code cleanup.
1757 2016-04-18 Thomas Quinot <quinot@adacore.com>
1759 * sem_ch13.adb: Minor reformatting and error message tweaking
1760 (remove extraneous spaces).
1762 2016-04-18 Johannes Kanig <kanig@adacore.com>
1764 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
1766 2016-04-18 Bob Duff <duff@adacore.com>
1768 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
1769 exists, and it's a fifo, we use "w" as the open string instead of
1770 "r+". This is necessary to make a write to the fifo block until
1773 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1775 * sem_attr.adb (Denote_Same_Function): Account
1776 for a special case where a primitive of a tagged type inherits
1777 a class-wide postcondition from a parent type.
1779 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1781 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
1782 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
1783 of reserved words is OK.
1784 (Scan_Pragma_Argument_Association):
1785 Add new formal Reserved_Words_OK and update the comment on
1786 usage. Code cleanup. Parse an expression or a reserved word in
1787 identifier form for pragmas Restriction_Warnings and Restrictions
1788 No_Use_Of_Attribute.
1789 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
1790 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
1791 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
1793 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
1794 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
1795 Update the parameter profile.
1796 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
1798 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
1799 the comment on usage.
1800 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
1801 * sem_attr.adb (Analyze_Attribute): Check restriction
1802 No_Use_Of_Attribute.
1803 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
1804 restriction No_Use_Of_Attribute before any rewritings have
1806 * sem_prag.adb (Analyze_Pragma): Check restriction
1807 No_Use_Of_Pragma before any rewritings have taken place.
1809 2016-04-18 Bob Duff <duff@adacore.com>
1811 * sem_ch6.adb (Is_Inline_Pragma): The pragma
1812 argument can be a selected component, which has no Chars field,
1813 so we need to deal with that case (use the Selector_Name).
1814 (Check_Inline_Pragma): We need to test Is_List_Member before
1815 calling In_Same_List, because in case of a library unit, they're
1816 not in lists, so In_Same_List fails an assertion.
1818 2016-04-18 Bob Duff <duff@adacore.com>
1820 * namet.ads, namet.adb: Add an Append that appends a
1821 Bounded_String onto a Bounded_String. Probably a little more
1822 efficient than "Append(X, +Y);". Also minor cleanup.
1823 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
1824 Append_Unqualified_Decoded): Make sure these work with non-empty
1826 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
1827 parameter, defaulting to Global_Name_Buffer.
1828 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
1829 Bounded_String parameter, no default.
1830 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
1831 Bounded_String instead of Global_Name_Buffer.
1832 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
1833 to Append_Entity_Name, and pass a Bounded_String parameter,
1834 instead of using globals.
1835 (Add_Source_Info): Pass a Bounded_String parameter, instead of
1837 (Expand_Source_Info): Use local instead of globals.
1838 * stringt.ads, stringt.adb (Append): Add an Append procedure
1839 for appending a String_Id onto a Bounded_String.
1840 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
1842 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
1843 Adjust_Name_Case parameter.
1844 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
1845 Set_Casing; that's the default.
1846 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
1847 protected subprograms are entry calls; otherwise it is not possible to
1848 distinguish them from regular subprogram calls.
1850 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1852 * sem_ch13.adb (Has_Good_Profile): Improvement
1853 of error message. Now indicates subtype_mark of formal parameter
1854 rather than the formal's name, plus minor rewording.
1856 2016-04-18 Pascal Obry <obry@adacore.com>
1858 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
1860 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1862 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
1864 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1866 * par-ch4.adb, sem_prag.adb: Minor reformatting.
1868 2016-04-18 Bob Duff <duff@adacore.com>
1870 * sinput.ads, sinput.adb (Build_Location_String): Take a
1871 parameter instead of using a global variable. The function
1872 version no longer destroys the Name_Buffer.
1873 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
1874 parameter, which defaults to the Global_Name_Buffer, so some
1875 calls can avoid the global.
1876 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
1877 to avoid using globals. All but one call to Build_Location_String
1878 avoids the global. Only one call to String_From_Name_Buffer
1881 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1883 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
1885 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1887 * sem_eval.adb (Choice_Matches): Check the expression
1888 against the predicate values when the choice denotes a
1889 subtype with a static predicate.
1890 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
1891 tests for predicates.
1892 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
1893 is not static. (Is_Static_Subtype): A subtype with a dynamic
1894 predicate is not static.
1895 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
1896 (Is_Static_Subtype): Update the comment on usage.
1898 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1900 * sem_prag.adb (Analyze_Input_Item): Allow
1901 generic formals to appear as initialization items.
1903 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1905 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
1906 Has_Good_Profile): Additional error message to indicate that
1907 the second parameter of the subprogram must be a first subtype.
1909 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1911 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
1912 Use the pragma lookahead that determines whether a subprogram
1913 is to be inlined, when some level of backend optimization is
1915 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
1916 code used to create an instance body when needed for inlining.
1917 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
1918 call appears within an instantiation that is not a compilation
1919 unit, add a pending instantiation for the enclosing instance,
1920 so the backend can inline in turn the calls contained in the
1923 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1925 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
1926 that relates operations of the parent type to the operations of
1927 the derived type has three distinct sources:
1928 a) explicit operations of the derived type carry an
1929 Overridden_Operation that designates the operation in the
1931 b) Implicit operations that are inherited by the derived type
1932 carry an alias that may be an explicit subprogram (in which case
1933 it may have an Overridden_ Operation indicator) or may also be
1934 inherited and carry its own alias.
1935 c) If the parent type is an interface, the operation of the
1936 derived type does not override, but the interface operation
1937 indicates the operation that implements it.
1938 * sem_prag.adb: Minor reformatting.
1939 * sem_prag.adb (Check_External_Property): Update
1940 the comment on usage. Reimplement.
1942 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1944 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
1945 profiles such as ZFP, ceiling priority is not available.
1947 2016-04-18 Bob Duff <duff@adacore.com>
1949 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
1951 2016-04-18 Bob Duff <duff@adacore.com>
1953 * sem_elab.adb (Output_Calls): Use
1954 Get_Name_String, to clearly indicate that the global Name_Buffer
1955 is being used. The previous code used Is_Internal_Name, which
1956 returns a Boolean, but also has a side effect of setting the
1957 Name_Buffer. Then it called the other Is_Internal_Name, which uses
1958 the Name_Buffer for its input. And then it called Error_Msg_N,
1959 again using the Name_Buffer. We haven't eliminated the global
1960 usage here, but we've made it a bit clearer.
1961 This also allows us to have a side-effect-free version of
1963 * namet.ads, namet.adb: Provide a type Bounded_String, along with
1964 routines that can be used without using global variables. Provide
1965 Global_Name_Buffer so existing code can continue to use the
1966 global. Mark the routines that use globals as obsolete. New code
1967 shouldn't call the obsolete ones, and we should clean up existing
1968 code from time to time.
1969 Name_Find_Str is renamed as Name_Find.
1970 * namet.h: Changed as necessary to interface to the new version
1972 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
1975 2016-04-18 Yannick Moy <moy@adacore.com>
1977 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
1978 outside of GNATprove, hence it should not be removed.
1980 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1982 * sem_prag.adb (Analyze_Refinement_Clause):
1983 The refinement of an external abstract state can now mention
1984 non-external constituents.
1985 (Check_External_Property): Update all SPARK RM references.
1987 2016-04-18 Bob Duff <duff@adacore.com>
1989 * exp_intr.adb: Remove some duplicated code.
1991 2016-04-18 Yannick Moy <moy@adacore.com>
1993 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
1994 package spec and body out of SPARK.
1996 2016-04-18 Johannes Kanig <kanig@adacore.com>
1998 * spark_xrefs.ads: Minor comment update.
2000 2016-04-18 Johannes Kanig <kanig@adacore.com>
2002 * gnat1drv.adb (Gnat1drv): Force loading of System
2005 2016-04-18 Bob Duff <duff@adacore.com>
2007 * a-cuprqu.adb: Correction to previous change. If a new node
2008 is inserted at the front of the queue (because it is higher
2009 priority than the previous front node), we need to update
2010 Header.Next_Unequal -- not just in the case where the queue was
2013 2016-04-18 Bob Duff <duff@adacore.com>
2015 * a-cuprqu.ads: Change the representation of List_Type from a
2016 singly-linked list to a doubly-linked list. In addition, add a
2017 pointer Next_Unequal, which points past a possibly-long chain
2018 of equal-priority items. This increases efficiency, especially
2019 in the case of many equal-priority items.
2020 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
2021 advantage of new data structure.
2022 (Finalize): Rewrite in terms of Dequeue, for simplicity.
2024 2016-04-18 Yannick Moy <moy@adacore.com>
2026 * contracts.adb (Analyze_Object_Contract,
2027 Analyze_Protected_Contract): Remove tests performed in GNATprove.
2028 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
2029 Remove query for tests performed in GNATprove.
2031 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2033 * sem_aggr.adb (Resolve_Record_Aggregate): If
2034 Warn_On_Redundant_Constructs is enabled, report a redundant box
2035 association that does not cover any components, as it done for
2036 redundant others associations in case statements.
2038 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2040 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
2041 Analyze the generated Check pragma for an inherited condition so
2042 that it does not freeze the dispatching type of the primitive
2043 operation, because it is pre-analyzed at the point of the
2044 subprogram declaration (and not in the subprogram body, as is
2045 done during regular expansion).
2047 2016-04-18 Vincent Celier <celier@adacore.com>
2049 * ali.ads: Increase the range of all _Id types to 100 millions.
2051 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2053 * sem_warn.adb (Check_References): Change warning to suggest
2054 using pragma Export rather than saying "volatile has no effect".
2056 2016-04-18 Bob Duff <duff@adacore.com>
2058 * g-souinf.ads (Compilation_ISO_Date): New function to return
2059 the current date in ISO form.
2060 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
2061 a call to Compilation_ISO_Date into a string literal containing
2062 the current date in ISO form.
2063 * exp_intr.ads (Add_Source_Info): Improve documentation.
2064 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
2065 Compilation_ISO_Date.
2066 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
2068 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2070 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
2071 to subtypes that are not first subtypes.
2073 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2075 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
2077 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
2078 generated pragmas after subprogram declaration, rather than in
2079 the corresponding subprogram body.
2080 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
2081 mode, if the operation is overridding, call
2082 Collect_Inherited_Class_Wide_Conditions to generate the
2083 corresponding pragmas immediately after the corresponding
2084 subprogram declaration.
2086 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2088 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
2089 type to natural numbers.
2090 (Stype): document code characters for concurrent entities.
2092 2016-04-18 Olivier Hainque <hainque@adacore.com>
2094 * targparm.ads: Update the Frontend_Exceptions default internal
2096 (Frontend_Exceptions_On_Target): Change default value to True.
2098 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2100 * sem_ch4.adb (Analyze_Selected_Component): Refine error
2101 detection when a selected component in the body of a synchronized
2102 type is a reference to an object of the same type declared
2103 elsewhere. The construct is legal if the prefix of the selected
2104 component includes an explicit dereference at any point.
2106 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2108 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
2109 internally generated expressions when trying to determine whether
2110 a formal parameter of a tagged type subject to Extensions_Visible
2111 False is used to initialize an object.
2112 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
2113 internally generated expressions when trying to determine whether
2114 a formal parameter of a tagged type subject to Extensions_Visible
2115 False is used in a type conversion.
2117 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2119 * sem_res.adb (Is_Protected_Operation_Call):
2120 Add guards to account for a non-decorated selected component.
2122 2016-04-18 Yannick Moy <moy@adacore.com>
2124 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
2125 implementation of Body_Has_SPARK_Mode_On.
2126 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
2127 New function replacing previous Get_SPARK_Mode_From_Pragma, that
2128 deals also with aspects.
2129 (Get_SPARK_Mode_Type): Make function internal again.
2130 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
2131 Get_SPARK_Mode_From_Annotation.
2133 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2135 * contracts.adb (Analyze_Object_Contract): Update references to
2137 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
2138 * ghost.adb Add with and use clauses for Sem_Disp.
2139 (Check_Ghost_Derivation): Removed.
2140 (Check_Ghost_Overriding):
2141 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
2142 (Check_Ghost_Primitive): New routine.
2143 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
2144 Update references to SPARK RM. (Is_OK_Pragma): Update references
2145 to SPARK RM. Predicates are now a valid context for references
2147 * ghost.ads (Check_Ghost_Derivation): Removed.
2148 (Check_Ghost_Overriding): Update the comment on usage.
2149 (Check_Ghost_Primitive): New routine.
2150 (Check_Ghost_Refinement): New routine.
2151 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
2152 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
2153 related to Ghost derivations
2154 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
2155 related to the convention-like behavior of pragma Ghost.
2156 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
2157 of a tagged type and its primitive agree.
2158 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
2159 RM. Move the verification of pragma Assertion_Policy Ghost
2160 to the proper place. Remove the now obsolete check related
2161 to Ghost derivations.
2162 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
2163 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
2165 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2167 * layout.adb: Fix more minor typos in comments.
2169 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2171 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
2173 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2175 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
2176 mode, collect inherited class-wide conditions to generate the
2177 corresponding pragmas.
2178 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
2179 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
2180 procedure for overriding subprograms, used to generate the pragmas
2181 corresponding to an inherited class- wide pre- or postcondition.
2182 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
2183 from contracts.adb (Replace_Condition_Entities): Subsidiary
2184 Build_Pragma_Check_Equivalent, to implement the proper semantics
2185 of inherited class-wide conditions, as given in AI12-0113.
2186 (Process_Class_Wide_Condition): Removed.
2187 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
2188 in contract of subprogram, to collect inherited class-wide
2190 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
2192 2016-04-18 Yannick Moy <moy@adacore.com>
2194 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
2195 * a-calend.ads (Ada.Calendar): Mark package spec as
2196 SPARK_Mode and add synchronous external abstract state Clock_Time.
2198 2016-04-18 Yannick Moy <moy@adacore.com>
2200 * sem_res.adb (Resolve_Call): Prevent inlining of
2201 calls inside expression functions. Factor previous code issuing
2202 errors to call Cannot_Inline instead, which does appropriate
2203 processing of message for GNATprove.
2205 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2207 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
2208 osint-b.adb: Cleanups.
2210 2016-04-18 Yannick Moy <moy@adacore.com>
2212 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
2213 body to inline in GNATprove mode when SPARK_Mode On applies to
2215 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
2218 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2220 * layout.adb: Fix minor typo in comment.
2221 * inline.adb: Fix minor pasto.
2222 * sem_ch12.ads: Fix minor typos in comments.
2224 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2226 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
2227 handle some complex cases of tag indeterminate calls that are
2228 actuals in other dispatching calls that are themselves tag
2230 (Check_Dispatching_Context): Add parameter to support recursive
2231 check for an enclosing construct that may provide a tag for a
2232 tag-indeterminate call.
2234 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2236 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2237 Add global variables Task_Input_Seen and Task_Output_Seen.
2238 (Analyze_Global_Item): Detect an illegal use of the current
2239 instance of a single protected/task type in a global annotation.
2240 (Analyze_Input_Output): Inputs and output related to the current
2241 instance of a task unit are now tracked.
2242 (Check_Usage): Require
2243 the presence of the current instance of a task unit only when
2244 one input/output is available. (Current_Task_Instance_Seen):
2246 (Is_CCT_Instance): New parameter profile. Update
2247 the comment on usage. The routine now properly recognizes several
2248 cases related to single protected/task types.
2250 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2252 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
2253 to create a brand new freeze node. This handles a case where an
2254 ignored Ghost context is freezing something which is not ignored
2255 Ghost and whose freeze node should not be removed from the tree.
2256 (New_Freeze_Node): New routine.
2258 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2260 * sigtramp.h (__gnat_set_is_vxsim) New function to
2261 tell sigtramp-vxworks to handle vxsim signal contexts. *
2262 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
2263 differences in the sigcontext structure between the expected
2264 regular x86 or x86_64 ones and the ones received in case of
2265 exexution on the vxworks simulator.
2266 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
2267 this information to sigtramp-vxworks.c. Remove the old mechanism for
2269 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
2271 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2273 * exp_ch3.adb (Inline_Init_Proc): New function returning
2274 whether the initialization procedure of a type should be
2275 inlined. Return again True for controlled type themselves.
2276 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
2277 (Build_Record_Init_Proc): Likewise.
2279 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2281 * gnatvsn.ads (Library_Version): Bump to 7.
2283 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2285 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
2286 on the entity of a subprogram declaration that is completed by
2287 an expression function.
2289 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2291 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
2292 declaration can appear in an aspect specification for a dynamic
2293 predicate, and a pragma for aspect Predicate_Failure.
2294 * exp_util.adb (Replace_Subtype_References): Replace current
2295 occurrences of the subtype to which a dynamic predicate applies,
2296 byt the expression that triggers a predicate check. Needed to
2297 implement new aspect Predicate_Failure.
2299 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2301 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
2302 * Makefile.rtl: update accordingly.
2304 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2306 * sem_type.adb (Disambiguate): Call Covers only when necessary
2307 for standard operators.
2309 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2311 * atree.ads (Num_Extension_Nodes): Add couple of figures
2313 * atree.adb: Add GNAT.Heap_Sort_G dependency.
2314 (Print_Statistics): New exported procedure to print statistics.
2316 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2318 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
2319 as to be inlined if the type needs finalization.
2321 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2323 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
2324 alignment for x86_64.
2325 * init.c: Better fix for guard page reset on x86_64-vx7.
2326 Do not try to retrieve the page that actually raised
2327 the signal as the probing mechanism used on x86_64 do not allow
2328 such retrieval. We thus just test if the guard page is active,
2329 and re-activate it if not.
2331 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2333 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
2336 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2338 * affinity.c: Use the proper type for task id.
2339 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
2341 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2343 * sem_prag.adb (Process_Convention): Relax rule on exporting
2344 Intrinsic types if Relaxed_RM_Semantics is True.
2346 2016-04-18 Vincent Celier <celier@adacore.com>
2348 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
2349 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
2350 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
2351 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
2352 exp_ch3.ads, exp_unst.adb: Change "descendent" to
2353 "descendant" in comments, error messages and identifiers.
2354 * gcc-interface/decl.c: Ditto.
2356 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2358 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
2359 New_S only once at the beginning of the function.
2361 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
2363 * gcc-interface/decl.c (components_to_record): Restrict the previous
2364 change to fields with variable size.
2366 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
2368 * gcc-interface/decl.c (components_to_record): Add special case for
2369 single field with representation clause at offset 0.
2371 2016-03-16 Svante Signell <svante.signell@gmail.com>
2373 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
2374 * s-osinte-gnu.ads: New file.
2376 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
2378 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
2379 (Stack_Check_Limits): Set to False.
2380 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
2381 (Stack_Check_Limits): Set to False.
2382 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
2383 (Stack_Check_Limits): Set to False.
2384 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
2385 (Stack_Check_Limits): Set to False.
2386 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
2387 (Stack_Check_Limits): Set to False.
2389 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
2391 * gcc-interface/trans.c (statement_node_p): New predicate.
2392 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
2393 not return dummy results for expressions attached to packed array
2394 implementation types.
2396 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
2398 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
2399 the expression of a renaming manually in case #3.
2401 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
2403 * system-linux-s390.ads: Enable Stack_Check_Probes.
2404 * system-linux-s390.ads: Likewise.
2406 2016-02-29 Martin Liska <mliska@suse.cz>
2408 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
2409 Replace ENABLE_CHECKING macro with flag_checking.
2411 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2413 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
2414 handling of unconstrained array types as designated types into common
2415 processing. Also handle array types as incomplete designated types.
2417 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2419 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
2420 ASIS mode, fully lay out the minimal record type.
2422 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2424 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
2425 (build_return_expr): Likewise.
2426 (Call_to_gnu): If this is a function call and there is no target,
2427 create a temporary for the return value for all aggregate types,
2428 but never create it for a return statement. Push a binding level
2429 around the call in more cases. Remove obsolete code.
2431 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2433 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
2434 * gcc-interface/gigi.h (gigi): Remove useless attribute.
2435 (gnat_gimplify_expr): Likewise.
2436 (gnat_to_gnu_external): Declare.
2437 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
2438 code dealing with the expression of external constants into...
2439 Invoke gnat_to_gnu_external instead.
2440 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
2441 when not for a definition. Deal with COMPOUND_EXPR and variables with
2442 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
2443 'reference to a function call in a renaming. Remove obsolete test and
2444 adjust associated comment.
2445 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
2446 temporaries created to hold the return value, if any.
2447 (gnat_to_gnu_external): ...this. New function.
2448 * gcc-interface/utils.c (create_var_decl): Detect a constant created
2449 to hold 'reference to function call.
2450 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
2451 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
2453 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
2455 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
2456 the prefix denotes an entity which Has_Atomic_Components.
2457 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
2458 denotes an entity which Has_Atomic_Components.
2460 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
2462 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
2463 for fat pointer or scalar types.
2465 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
2467 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
2468 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
2469 Call maybe_character_value on the array bounds. Get to the base type
2470 of the index type and call maybe_debug_type on it.
2471 * gcc-interface/utils.c (finish_character_type): Add special treatment
2474 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
2476 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
2477 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
2479 2016-02-12 Jakub Jelinek <jakub@redhat.com>
2481 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
2482 neighbour -> neighbor.
2483 * prep.adb: Likewise.
2484 * prj.ads: Likewise.
2485 * prepcomp.adb: Likewise.
2486 * g-socket.ads: Likewise.
2487 * s-imgrea.adb: Likewise.
2488 * a-calend.adb: Likewise.
2489 * exp_disp.adb: Likewise.
2490 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
2491 * g-socket.adb: Likewise.
2492 * sem_ch12.adb: Likewise.
2493 * terminals.c: Likewise.
2495 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
2497 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
2498 build_common_tree_nodes.
2500 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
2502 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
2503 DECL_IGNORED_P last.
2505 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
2507 * gcc-interface/gigi.h (enum attr_type): Rename into...
2508 (enum attrib_type): ...this.
2509 (struct attrib): Adjust.
2510 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
2512 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
2514 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
2515 literal if the entity is of a character type.
2516 * gcc-interface/lang.opt (fsigned-char): New option.
2517 * gcc-interface/misc.c (gnat_handle_option): Accept it.
2518 (gnat_init): Adjust comment.
2519 * gcc-interface/gigi.h (finish_character_type): New prototype.
2520 (maybe_character_type): New inline function.
2521 (maybe_character_value): Likewise.
2522 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
2523 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
2524 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
2525 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
2526 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
2527 Copy TYPE_STRING_FLAG from type to subtype.
2528 <E_Array_Type>: Deal with character index types.
2529 <E_Array_Subtype>: Likewise.
2530 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
2531 char_type_node throughout.
2532 (build_raise_check): Likewise.
2533 (get_type_length): Deal with character types.
2534 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
2536 <Attr_Pred>: Likewise.
2537 (Loop_Statement_to_gnu): Likewise.
2538 (Raise_Error_to_gnu): Likewise.
2539 <N_Indexed_Component>: Deal with character index types. Remove
2541 <N_Slice>: Likewise.
2542 <N_Type_Conversion>: Deal with character types. Minor tweak.
2543 <N_Unchecked_Type_Conversion>: Likewise.
2545 <N_Op_Eq>: Likewise.
2546 (emit_index_check): Delete.
2547 * gcc-interface/utils.c (finish_character_type): New function.
2548 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
2549 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
2550 with char_type_node.
2551 (build_call_raise): Likewise.
2552 (build_call_raise_column): Likewise.
2553 (build_call_raise_range): Likewise.
2555 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2557 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
2558 (build_call_raise_range): Likewise.
2559 (gnat_unsigned_type): Delete.
2560 (gnat_signed_type): Likewise.
2561 (gnat_signed_or_unsigned_type_for): New prototype.
2562 (gnat_unsigned_type_for): New inline function.
2563 (gnat_signed_type_for): Likewise.
2564 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
2565 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
2566 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
2567 and compute their base type from that.
2568 <E_Array_Subtype>: Remove duplicate declaration.
2569 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
2570 * gcc-interface/trans.c (get_type_length): Likewise.
2571 (Attribute_to_gnu): Likewise.
2572 (Loop_Statement_to_gnu): Likewise.
2573 (Call_to_gnu): Likewise.
2574 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
2575 and gnat_signed_type_for. Minor tweaks.
2576 (build_binary_op_trapv): Likewise.
2577 (emit_check): Likewise.
2578 (convert_with_check): Likewise.
2579 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
2580 functions. Minor tweaks.
2581 (Case_Statement_to_gnu): Remove dead code.
2582 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
2583 (init_code_table): Minor reordering.
2584 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
2585 (gnat_signed_type): Likewise.
2586 (gnat_signed_or_unsigned_type_for): New function.
2587 (unchecked_convert): Use directly the size in the test for precision
2588 vs size adjustments.
2589 (install_builtin_elementary_types): Call gnat_signed_type_for.
2590 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
2592 (build_goto_raise): New function taken from...
2593 (build_call_raise): ...here. Call it.
2594 (build_call_raise_column): Add KIND parameter and call it.
2595 (build_call_raise_range): Likewise.
2597 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2599 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
2600 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
2601 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
2602 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
2603 and tweak gnat_encodings tests throughout.
2604 (initial_value_needs_conversion): Likewise.
2605 (intrin_arglists_compatible_p): Likewise.
2606 * gcc-interface/misc.c (gnat_print_type): Likewise.
2607 (gnat_get_debug_type): Likewise.
2608 (gnat_get_fixed_point_type_info): Likewise.
2609 (gnat_get_array_descr_info): Likewise.
2610 (get_array_bit_stride): Likewise.
2611 (gnat_get_type_bias): Fix formatting.
2612 (enumerate_modes): Likewise.
2613 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
2614 (add_decl_expr): Simplify NULL_TREE test.
2615 (end_stmt_group): Likewise.
2616 (build_binary_op_trapv): Fix formatting.
2617 (get_exception_label): Use switch statement.
2618 (init_code_table): Move around.
2619 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
2620 (gnat_poplevel): Likewise.
2621 (gnat_set_type_context): Likewise.
2622 (defer_or_set_type_context): Fix formatting.
2623 (gnat_pushdecl): Simplify NULL_TREE test.
2624 (maybe_pad_type): Likewise.
2625 (add_parallel_type): Likewise.
2626 (create_range_type): Likewise.
2627 (process_deferred_decl_context): Likewise.
2628 (convert): Likewise.
2629 (def_builtin_1): Likewise.
2630 * gcc-interface/utils2.c (find_common_type): Likewise.
2631 (build_binary_op): Likewise.
2632 (gnat_rewrite_reference): Likewise.
2633 (get_inner_constant_reference): Likewise.
2635 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2638 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
2639 the parent function instead of the current function in order to issue
2640 the warning or the error. Add guard for ignored functions.
2642 2016-01-17 Jakub Jelinek <jakub@redhat.com>
2644 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
2646 2016-01-15 Jakub Jelinek <jakub@redhat.com>
2648 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
2649 of char * for path_val to avoid warnings.
2651 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
2653 * gcc-interface/utils.c: Bump copyright year.
2654 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
2655 the current lexical scope.
2657 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2659 * gnat_ugn.texi: Bump @copying's copyright year.
2660 * gnat_rm.texi: Likewise.
2662 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
2664 * gnatvsn.ads: Bump copyright year.
2667 Copyright (C) 2016 Free Software Foundation, Inc.
2669 Copying and distribution of this file, with or without modification,
2670 are permitted in any medium without royalty provided the copyright
2671 notice and this notice are preserved.