1 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
4 properly type derived from generic formal types, to handle
5 properly modified version of ACATS 4.1B B611017.
7 2017-04-25 Javier Miranda <miranda@adacore.com>
9 * exp_unst.adb (Subp_Index): Adding missing
10 support for renamings and functions that return a constrained
11 array type (i.e. functions for which the frontend built a
12 procedure with an extra out parameter).
14 2017-04-25 Pascal Obry <obry@adacore.com>
16 * s-string.adb: Minor code clean-up.
18 2017-04-25 Bob Duff <duff@adacore.com>
20 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
22 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
23 function for Non_Blocking_Wait_Process.
25 2017-04-25 Bob Duff <duff@adacore.com>
27 * prep.adb (Preprocess): Remove incorrect
28 Assert. Current character can be ASCII.CR.
30 2017-04-25 Ed Schonberg <schonberg@adacore.com>
32 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
33 convention Stdcall, which has a number of exceptions. Convention
34 is legal on a component declaration whose type is an anonymous
37 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
39 * sem_ch4.adb: sem_ch4.adb Various reformattings.
40 (Try_One_Prefix_Interpretation): Use the base type when dealing
41 with a subtype created for purposes of constraining a private
42 type with discriminants.
44 2017-04-25 Javier Miranda <miranda@adacore.com>
46 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
47 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
48 dispatching primitives (Restore_Warnings): Restore warning on
49 late dispatching primitives (Save_Warnings): Save warning on late
50 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
51 to enable/disable this warning.
52 (WA_Warnings): Set warning on late dispatching primitives.
53 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
54 that its parent type has a private extension.
55 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
57 * usage.adb: Document -gnatw.j and -gnatw.J.
59 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
61 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
64 2017-04-25 Bob Duff <duff@adacore.com>
66 * binde.adb (Validate): Do not pass dynamic strings
67 to pragma Assert, because older compilers do not support that.
69 2017-04-25 Bob Duff <duff@adacore.com>
71 * s-fileio.adb (Close): When a temp file is
72 closed, delete it and clean up its Temp_File_Record immediately,
73 rather than waiting until later.
74 (Temp_File_Record): Add File
75 component, so Close can know which Temp_File_Record corresponds
76 to the file being closed.
77 (Delete): Don't delete temp files,
78 because they are deleted by Close.
79 (Open): Set the File component
80 of Temp_File_Record. This requires moving the creation of the
81 Temp_File_Record to the end, after the AFCB has been created.
83 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
85 * checks.adb (Insert_Valid_Check): Do not generate
86 a validity check when inside a generic.
88 2017-04-25 Yannick Moy <moy@adacore.com>
90 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
92 2017-04-25 Arnaud Charlet <charlet@adacore.com>
94 * snames.ads-tmpl (Snames): More names for detecting predefined
95 potentially blocking subprograms.
97 2017-04-25 Ed Schonberg <schonberg@adacore.com>
99 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
100 concerning inheritance of class-wide preconditions do not apply
103 2017-04-25 Bob Duff <duff@adacore.com>
105 * s-ficobl.ads: Minor comment fix.
107 2017-04-25 Yannick Moy <moy@adacore.com>
109 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
110 conversions from float to integer in GNATprove mode.
111 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
112 to call Apply_Type_Conversion_Checks, so that range checks
113 are properly positioned when needed on conversions, including
114 when converting from float to integer. (Determine_Range): In
115 GNATprove mode, take into account the possibility of conversion
116 from float to integer.
117 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
118 check on conversions from fixed-point to integer, not anymore
119 on conversions from floating-point to integer, when in GNATprove
122 2017-04-25 Yannick Moy <moy@adacore.com>
124 * checks.adb (Determine_Range_R): Special case type conversions
125 from integer to float in order to get bounds in that case too.
126 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
127 mode, for computations involved in interval checking.
129 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
131 * checks.adb (Insert_Valid_Check): Partially reimplement validity
133 * einfo.adb Node36 is now used as Validated_Object.
134 (Validated_Object): New routine.
135 (Set_Validated_Object): New routine.
136 (Write_Field36_Name): Add an entry for Validated_Object.
137 * einfo.ads Add new attribute Validated_Object along with
139 (Validated_Object): New routine along with pragma Inline.
140 (Set_Validated_Object): New routine along with pragma Inline.
141 * exp_attr.adb (Make_Range_Test): Add processing for validation
142 variables to avoid extra reads and copies of the prefix.
143 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
144 variables in order to reflect any changes done in the variable
145 back into the original object.
146 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
147 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
149 2017-04-25 Steve Baird <baird@adacore.com>
151 * exp_ch7.adb (Build_Array_Deep_Procs,
152 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
153 generate Finalize_Address routines for CodePeer.
155 2017-04-25 Ed Schonberg <schonberg@adacore.com>
157 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
158 Analyze_Pre_Post_Condition, to implement the legality checks
159 mandated by AI12-0131: Pre'Class shall not be specified for an
160 overriding primitive subprogram of a tagged type T unless the
161 Pre'Class aspect is specified for the corresponding primitive
162 subprogram of some ancestor of T.
164 2017-04-25 Bob Duff <duff@adacore.com>
166 * sem_ch8.adb (Use_One_Type): If a use_type_clause
167 is redundant, set its Used_Operations to empty. This is only
168 necessary for use clauses that appear in the parent of a generic
169 child unit, because those use clauses get reanalyzed when we
170 instantiate the generic, and we don't want the Used_Operations
171 carried over from the original context (where it was probably
174 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
176 * exp_ch6.adb: Minor reformatting.
178 2017-04-25 Bob Duff <duff@adacore.com>
180 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
181 Use Source_Index (Current_Sem_Unit) to find the correct casing.
182 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
183 (Current_Sem_Unit) to find the correct casing.
184 * par.adb (Par): Null out Current_Source_File, to ensure that
185 the above bugs won't rear their ugly heads again.
187 2017-04-25 Ed Schonberg <schonberg@adacore.com>
189 * sem_ch8.adb (Find_Type): For an attribute reference
190 'Class, if prefix type is synchronized and previous errors
191 have suppressed the creation of the corresponding record type,
192 create a spurious class-wide for the synchonized type itself,
193 to catch other misuses of the attribute
195 2017-04-25 Steve Baird <baird@adacore.com>
197 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
198 is True, then don't generate the accessibility check for the
199 tag of a tagged result.
200 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
201 if CodePeer_Mode is True, then don't generate the
202 tag checks for the result of call to an instance of
203 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
204 descendant of" check and the accessibility check).
206 2017-04-25 Ed Schonberg <schonberg@adacore.com>
208 * sem_ch13.adb: Code cleanups.
209 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
210 * sem_ch8.ads: Minor comment fix.
212 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
214 * exp_ch4.adb (Library_Level_Target): New function.
215 (Expand_Concatenate): When optimization is enabled, also expand
216 the operation out-of-line if the concatenation is present within
217 the expression of the declaration of a library-level object and
218 not only if it is the expression of the declaration.
220 2017-04-25 Bob Duff <duff@adacore.com>
222 * freeze.adb (Freeze_Object_Declaration): Do
223 not Remove_Side_Effects if there is a pragma Linker_Section,
224 because in that case we want static initialization in the
227 2017-04-25 Gary Dismukes <dismukes@adacore.com>
229 * exp_dbug.adb: Minor rewording and reformatting.
231 2017-04-25 Ed Schonberg <schonberg@adacore.com>
233 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
234 handle the proposed changes to rules concerning potentially
235 unevaluated expressions, to include selected components that
236 do not depend on discriminants, and indexed components with
238 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
239 predicate in quantified expression, and fix bugs in the handling
240 of case expressions and membership test.
241 (Analyze_Attribute_Old_Result): use new predicate.
242 (Analyze_Attribute, case Loop_Entry): ditto.
244 2017-04-25 Bob Duff <duff@adacore.com>
246 * s-secsta.adb (SS_Info): Add a comment
247 explaining why we don't need to walk all the chunks in order to
248 compute the total size.
250 2017-04-25 Bob Duff <duff@adacore.com>
252 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
253 of the global name buffer to 4*Max_Line_Length.
255 2017-04-25 Javier Miranda <miranda@adacore.com>
257 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
258 renaming entity for debug information, mark the entity as needing debug
259 info if it comes from sources.
261 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
263 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
264 restriction converning the use of 'Address where the prefix is
265 of a controlled type.
267 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
269 * exp_dbug.adb: In Debug_Renaming_Declaration,
270 skip slices that are made redundant by an indexed component
272 * atree.h: New definition for Original_Node.
274 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
276 * sem_prag.adb, sem_prag.ads: Minor reformatting.
278 2017-04-25 Ed Schonberg <schonberg@adacore.com>
280 * sem_ch3.adb (Check_Entry_Contract): Call
281 Preanalyze_Spec_Expression so that resolution takes place as well.
282 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
283 internal calls that appear in preconditions of protected
284 operations, in default values for same, and in contract guards
285 for contract cases in SPARK.
287 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
289 * a-numaux.ads: Fix description of a-numaux-darwin
291 (Double): Define to Long_Float.
292 * a-numaux-vxworks.ads (Double): Likewise.
293 * a-numaux-darwin.ads
295 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
296 * a-numaux-x86.ads: Fix package description.
297 * a-numaux-x86.adb (Is_Nan): Minor tweak.
298 (Reduce): Adjust and complete description. Call Is_Nan instead of
299 testing manually. Use an integer temporary to hold rounded value.
300 * a-numaux-darwin.adb (Reduce): Likewise.
301 (Is_Nan): New function.
303 2017-04-25 Ed Schonberg <schonberg@adacore.com>
305 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
306 on analysis of prefix whose type is a current instance of a
307 synchronized type, but where the prefix itself is an entity that
310 2017-04-25 Ed Schonberg <schonberg@adacore.com>
312 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
313 the identity of callable entities therein, because they have been
314 properly resolved, and prefixed calls may have been rewritten
317 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
319 * exp_ch3.adb (Build_Init_Statements): Convert
320 the expression of the pragma/aspect Secondary_Stack_Size to
321 internal type System.Parameters.Size_Type before assigning
322 it to the Secondary_Stack_Size component of the task type's
323 corresponding record.
325 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
327 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
328 (etc) optimizations when the type is modular and the offsets
331 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
333 * s-osinte-freebsd.ads: Minor comment tweaks
335 2017-04-25 Javier Miranda <miranda@adacore.com>
337 * urealp.adb (UR_Write): Reverse previous patch
338 adding documentation on why we generate multiplications instead
339 of divisions (needed to avoid expressions whose computation with
340 large numbers may cause division by 0).
342 2017-04-25 Bob Duff <duff@adacore.com>
344 * erroutc.adb (Set_Specific_Warning_Off,
345 Set_Warnings_Mode_Off): Use the correct source file for
346 Stop. Was using Current_Source_File, which is only valid during
347 parsing. Current_Source_File will have a leftover value from
348 whatever file happened to be parsed last, because of a with_clause
351 2017-04-25 Bob Duff <duff@adacore.com>
353 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
354 to In_Predefined_Unit, but including GNAT units.
355 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
356 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
357 because Should_Ignore_Pragma was not working reliably outside
358 the parser, because Current_Source_File is not valid.
359 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
360 * par-prag.adb: Call Should_Ignore_Pragma_Par.
362 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
364 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
367 2017-04-25 Javier Miranda <miranda@adacore.com>
369 * urealp.adb (UR_Write): Fix output of constants with a base other
372 2017-04-25 Justin Squirek <squirek@adacore.com>
374 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
375 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
376 Add extra parameter for Process_Interface_Name.
377 (Process_Interface_Name): Add parameter for pragma to analyze
378 corresponding aspect.
379 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
382 2017-04-25 Gary Dismukes <dismukes@adacore.com>
384 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
387 2017-04-25 Yannick Moy <moy@adacore.com>
389 * sem_res.adb (Resolve_Comparison_Op): Do not
390 attempt evaluation of relational operations inside assertions.
392 2017-04-25 Justin Squirek <squirek@adacore.com>
394 * exp_util.adb (Add_Interface_Invariants):
395 Restored, code moved back from Build_Invariant_Procedure_Body.
396 (Add_Parent_Invariants): Restored, code moved back from
397 Build_Invariant_Procedure_Body.
398 (Build_Invariant_Procedure_Body):
399 Remove refactored calls and integrated code from
400 Add_Parent_Invariants and Add_Interface_Invariants.
402 2017-04-25 Johannes Kanig <kanig@adacore.com>
404 * errout.adb (Output_Messages): Adjust computation of total
406 * erroutc.adb (Error_Msg): In statistics counts, deal
407 correctly with informational messages that are not warnings.
408 * errutil.adb (Finalize): adjust computation of total errors.
410 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
412 * terminals.c (__gnat_terminate_pid): New.
413 * g-exptty.ads (Terminate_Process): New. Update comments.
415 2017-04-25 Arnaud Charlet <charlet@adacore.com>
417 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
419 2017-04-25 Justin Squirek <squirek@adacore.com>
421 * sem_ch3.adb (Analyze_Declarations): Minor
422 correction to comments, move out large conditional and scope
423 traversal into a predicate.
424 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
427 2017-04-25 Ed Schonberg <schonberg@adacore.com>
429 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
430 of prefix whose type is a current instance of a synchronized
431 type. If the prefix is an object this is an external call (or
432 requeue) that can only access public operations of the object. The
433 previous predicate was too restrictive, and did not allow public
434 protected operations, only task entries.
436 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
438 * sem_ch5.adb, fname.adb: Minor reformatting.
440 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
442 * einfo.adb (Is_Anonymous_Access_Type): New routine.
443 * einfo.ads Update the placement of
444 E_Anonymous_Access_Subprogram_Type along with all subtypes that
446 (Is_Anonymous_Access_Type): New routine.
447 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
448 master for an access type subject to pragma No_Heap_Finalization.
449 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
450 allocated or deallocated does not finalization actions if the
451 associated access type is subject to pragma No_Heap_Finalization.
452 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
453 * par-prag.adb Pragma No_Heap_Finalization does not need special
454 processing from the parser.
455 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
456 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
457 * sem_prag.adb Add an entry in table Sig_Flags for pragma
458 No_Heap_Finalization.
459 (Analyze_Pragma): Add processing for
460 pragma No_Heap_Finalization. Update various error messages to
461 use Duplication_Error.
462 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
463 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
464 and corresponding pragma id.
466 2017-04-25 Bob Duff <duff@adacore.com>
468 * freeze.adb (Freeze_Record_Type): Use the
469 underlying type of the component type to determine whether it's
470 elementary. For representation clause purposes, a private type
471 should behave the same as its full type.
472 * fname.ads, fname.adb (Is_Predefined_File_Name):
473 Make sure things like "system.ali" are recognized as predefined.
475 2017-04-25 Javier Miranda <miranda@adacore.com>
477 * debug.adb: Update documentation of -gnatd.6.
479 2017-04-25 Ed Schonberg <schonberg@adacore.com>
481 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
482 element iterator when the name is an overloaded function call,
483 one of whose interpretations yields an array.
485 2017-04-25 Bob Duff <duff@adacore.com>
487 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
488 Is_Internal_Unit_Name): New functions for operating on unit
489 names, as opposed to file names. There's some duplicated code
490 with fname.adb, which is unfortunate, but it seems like we don't
491 want to add dependencies here.
492 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
493 to Is_Predefined_Unit_Name; the former was wrong, because Uname
494 is not a file name at all.
495 * fname.ads, fname.adb: Document the fact that
496 Is_Predefined_File_Name and Is_Internal_File_Name can be called
497 for ALI files, and fix the code so it works properly for ALI
498 files. E.g. these should return True for "system.ali".
500 2017-04-25 Justin Squirek <squirek@adacore.com>
502 * exp_util.adb (Add_Invariant): Removed,
503 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
504 and Add_Own_Invariant. (Add_Invariant_Check): Used
505 for adding runtime checks from any kind of invariant.
506 (Add_Inherited_Invariant): Generates invariant checks for
507 class-wide invariants (Add_Interface_Invariants): Removed, code
508 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
509 Create a types own invariant procedure (Add_Parent_Invariants):
510 Removed, code moved to Build_Invariant_Procedure_Body
511 (Build_Invariant_Procedure_Body): Add refactored calls
512 and integrated code from Add_Parent_Invariants and
513 Add_Interface_Invariants.
514 (Process_Type): Removed, the
515 relavant code was inlined into both Add_Own_Invariant and
516 Add_Inherited_Invariant.
518 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
520 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
521 scn.adb, osint.adb, fname.adb: Minor reformatting.
523 2017-04-25 Pascal Obry <obry@adacore.com>
525 * s-taprop-mingw.adb: Do not check for CloseHandle in
528 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
530 * sem_util.adb (Check_Part_Of_Reference):
531 Continue to examine the context if the reference appears within
532 an expression function.
534 2017-04-25 Justin Squirek <squirek@adacore.com>
536 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
537 and Build_Invariant_Procedure_Declaration.
538 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
539 and Build_Invariant_Procedure_Declaration from exp_ch7
540 and break-out Is_Untagged_Private_Derivation from
541 Build_Invariant_Procedure_Body.
542 (Replace_Type_References):
543 Append an extra parameter to allow for dispatching replacements
544 and add the corrasponding logic.
545 (Type_Invariant): Remove
546 Replace_Typ_Refs and replace its references with calls to
547 Replace_Type_References.
548 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
550 2017-04-25 Bob Duff <duff@adacore.com>
552 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
553 that returns True when appropriate.
554 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
555 when compiling predefined files.
556 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
557 "gnat.adc" should not be considered a predefined file name.
558 That required (or at least encouraged) a lot of cleanup of global
559 variable usage. We shouldn't be communicating information via
560 the global name buffer.
561 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
562 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
563 required by the above-mentioned cleanup.
565 2017-04-25 Ed Schonberg <schonberg@adacore.com>
567 * osint.adb (Find_File): Handle properly a request for a
568 configuration file whose name is a directory.
570 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
572 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
574 2017-04-25 Bob Duff <duff@adacore.com>
576 * types.ads: Minor: Fix '???' comment.
577 * sem_ch8.adb: Minor comment fix.
579 2017-04-25 Bob Duff <duff@adacore.com>
581 * sem_prag.adb: Remove suspicious uses of Name_Buf.
582 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
583 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
584 Add String_To_Name with no side effects.
586 2017-04-25 Justin Squirek <squirek@adacore.com>
588 * sem_ch3.adb (Analyze_Declarations): Add
589 additional condition for edge case.
591 2017-04-25 Bob Duff <duff@adacore.com>
593 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
594 reserved words inside pragmas. This is necessary to allow the
595 pragma name Interface to be used in pragma Ignore_Pragma.
596 * par.adb: Minor comment fix.
598 2017-04-25 Javier Miranda <miranda@adacore.com>
600 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
601 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
602 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
603 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
604 occurrences of RE_Type_Is_Abstract
606 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
608 * exp_util.adb (Build_Chain): Account for ancestor
609 subtypes while traversing the derivation chain.
611 2017-04-25 Ed Schonberg <schonberg@adacore.com>
613 * sem_attr.adb: minor reformatting.
615 2017-04-25 Doug Rupp <rupp@adacore.com>
617 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
619 2017-04-25 Ed Schonberg <schonberg@adacore.com>
621 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
622 the first pass over an assignment statement with target names,
623 to prevent the generation of subtypes (such as discriminated
624 record components)that may carry the target name outside of the
625 tree for the assignment. The subtypes will be generated when
626 the assignment is reanalyzed in full.
627 (Analyze_Target_Name): Handle properly class-wide types.
629 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
631 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
632 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
633 the purposes of freezing.
634 * exp_util.adb Update the documentation and structure of the
635 type map used in class-wide semantics of assertion expressions.
636 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
637 and resolve the triaged expression because all substitutions
638 refer to the proper entities. Update the replacement of
640 (Build_DIC_Procedure_Body): Add formal parameter
641 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
642 are now only processed when freezing occurs. Build a body only
644 (Entity_Hash): Removed.
645 (Map_Types): New routine.
646 (Replace_Object_And_Primitive_References): Removed.
647 (Replace_References): New routine.
648 (Replace_Type_References): Moved to the library level of Exp_Util.
649 (Type_Map_Hash): New routine.
650 (Update_Primitives_Mapping): Update the mapping call.
651 (Update_Primitives_Mapping_Of_Types): Removed.
652 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
653 parameter For_Freeze and update the comment on usage.
654 (Map_Types): New routine.
655 (Replace_References): New routine.
656 (Replace_Type_References): Moved to the library level of Exp_Util.
657 (Update_Primitives_Mapping_Of_Types): Removed.
658 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
659 properties of the private type to the full view in case the full
660 view derives from a parent type and inherits a DIC pragma.
661 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
662 DIC pragma is placed at the top of a declarative region.
664 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
666 * a-tasatt.adb: Complete previous change and use an unsigned
667 int to avoid overflow checks.
669 2017-04-25 Ed Schonberg <schonberg@adacore.com>
671 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
672 the error message when the attribute reference is an actual in
673 a call to a subprogram inherited from a generic formal type with
674 unknown discriminants, which makes the subprogram and its formal
675 parameters intrinsic (see RM 6.3.1 (8) and (13)).
677 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
679 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
680 sem_prag.adb: Minor reformatting.
682 2017-04-25 Bob Duff <duff@adacore.com>
684 * sem_attr.adb (Type_Key): Add code in the
685 recursive Compute_Type_Key to protect against fetching the source
686 code for Standard, in case a component of the type is declared
687 in Standard. There was already code to do this for the original
688 type, but not for its components.
690 2017-04-25 Javier Miranda <miranda@adacore.com>
692 * exp_ch3.adb (Build_Initialization_Call): Handle
693 subtypes of private types when searching for the underlying full
694 view of a private type.
696 2017-04-25 Javier Miranda <miranda@adacore.com>
698 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
699 real conditional expression can appear in a fixed-type context
700 and must be resolved with that context to facilitate the code
701 generation to the backend.
703 2017-04-25 Ed Schonberg <schonberg@adacore.com>
705 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
706 to indicate whether during inline processing, when some unit U1
707 appears in the context of a unit U2 compiled for instantiation
708 or inlining purposes, the body of U1 needs to be compiled as well.
709 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
710 context is a package declaration.
711 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
712 Analyze_Generic_Package_Declaration): ditto.
713 * inline.adb (Analyze_Inlined_Bodies): Check
714 Body_Needed_For_Inlining.
716 2017-04-25 Ed Schonberg <schonberg@adacore.com>
718 * par.adb (Current_Assign_Node): Global variable use to record
719 the presence of a target_name in the right hand side of the
720 assignment being parsed.
721 * par-ch4.adb (P_Name): If the name is a target_name, mark the
722 enclosing assignment node accordingly.
723 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
725 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
726 analyzing RHS if the statement has target_names.
727 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
728 properly choices that are subtype marks.
729 * exp_ch5.adb: Code cleanup.
731 2017-04-25 Bob Duff <duff@adacore.com>
733 * s-memory.adb: Add a comment regarding efficiency.
734 * atree.adb: Fix the assertion, and combine 2 assertions into one,
735 "the source has an extension if and only if the destination does."
736 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
738 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
740 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
743 2017-04-25 Doug Rupp <rupp@adacore.com>
745 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
746 handling for ppc64-vx7.
747 * sigtramp-vxworks-target.inc
748 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
750 2017-04-25 Arnaud Charlet <charlet@adacore.com>
752 * ada_get_targ.adb: New file.
754 2017-04-25 Bob Duff <duff@adacore.com>
756 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
757 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
758 (UI_GCD): Remove ??? comment involving possible efficiency
759 improvements. This just isn't important after all these years.
761 * uintp.ads: Minor cleanup.
763 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
765 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
766 Revert previous changes.
767 * scng.adb: Minor reformatting.
768 * s-stratt.ads: Fix unbalanced parens in comment.
770 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
772 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
775 2017-04-25 Ed Schonberg <schonberg@adacore.com>
777 * scng.adb (Scan): Handle '@' appropriately.
778 * sem_ch5.adb: Code cleanup.
780 2017-04-25 Ed Schonberg <schonberg@adacore.com>
782 * freeze.adb (Check_Expression_Function): Do not check for the
783 use of deferred constants if the freezing of the expression
784 function is triggered by its generated body, rather than a
787 2017-04-25 Javier Miranda <miranda@adacore.com>
789 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
790 subtypes of private types when performing the view conversion.
792 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
794 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
795 the purposes of freezing.
796 * exp_util.adb Update the documentation and structure of the
797 type map used in class-wide semantics of assertion expressions.
798 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
799 and resolve the triaged expression because all substitutions
800 refer to the proper entities. Update the replacement of
802 (Build_DIC_Procedure_Body): Add formal parameter
803 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
804 are now only processed when freezing occurs. Build a body only
806 (Entity_Hash): Removed.
807 (Map_Types): New routine.
808 (Replace_Object_And_Primitive_References): Removed.
809 (Replace_References): New routine.
810 (Replace_Type_References): Moved to the library level of Exp_Util.
811 (Type_Map_Hash): New routine.
812 (Update_Primitives_Mapping): Update the mapping call.
813 (Update_Primitives_Mapping_Of_Types): Removed.
814 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
815 parameter For_Freeze and update the comment on usage.
816 (Map_Types): New routine.
817 (Replace_References): New routine.
818 (Replace_Type_References): Moved to the library level of Exp_Util.
819 (Update_Primitives_Mapping_Of_Types): Removed.
820 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
821 properties of the private type to the full view in case the full
822 view derives from a parent type and inherits a DIC pragma.
823 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
824 DIC pragma is placed at the top of a declarative region.
826 2017-04-25 Tristan Gingold <gingold@adacore.com>
828 * s-mmap.ads (Data): Add pragma Inline.
830 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
832 * checks.adb (Insert_Valid_Check): Do not use
833 a renaming to alias a volatile name because this will lead to
834 multiple evaluations of the volatile name. Use a constant to
835 capture the value instead.
837 2017-04-25 Doug Rupp <rupp@adacore.com>
839 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
841 2017-04-25 Ed Schonberg <schonberg@adacore.com>
843 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
844 Add out parameter to indicate to caller that a wrapper must
845 be constructed for an inherited primitive whose inherited
846 pre/postcondition has called to overridden primitives.
847 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
848 for inherited primitive that requires it.
849 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
850 legal primitive operations and belong to the list of bodies
851 generated after the freeze point of a type.
852 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
853 of Build_Class_Wide_Expression.
854 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
855 to construct the specification of the wrapper subprogram created
856 for an inherited operation.
858 2017-04-25 Bob Duff <duff@adacore.com>
860 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
861 pthread_mutexattr_setprioceiling): Add new interfaces for these
863 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
864 protocols as appropriate for Locking_Policy 'C' and 'I'.
865 * s-taprop-posix.adb: Minor reformatting to make it more similar
866 to s-taprop-linux.adb.
868 2017-04-25 Ed Schonberg <schonberg@adacore.com>
870 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
871 Handle properly a multi- level derivation involving both renamed
872 and constrained parent discriminants, when the type to be
873 constrained has fewer discriminants that the ultimate ancestor.
875 2017-04-25 Bob Duff <duff@adacore.com>
877 * sem_util.adb (Is_Object_Reference): In the
878 case of N_Explicit_Dereference, return False if it came from a
879 conditional expression.
881 2017-04-25 Bob Duff <duff@adacore.com>
883 * par-ch4.adb (P_Case_Expression): If a semicolon
884 is followed by "when", assume that ";" was meant to be ",".
886 2017-04-25 Gary Dismukes <dismukes@adacore.com>
888 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
891 2017-04-25 Arnaud Charlet <charlet@adacore.com>
893 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
894 loading of an entity.
895 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
896 previously repeated in the analysis.
897 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
898 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
899 use new procedure SPARK_Implicit_Load.
900 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
903 2017-04-25 Javier Miranda <miranda@adacore.com>
905 * sem_util.adb (New_Copy_Tree): By default
906 copying of defining identifiers is prohibited because
907 this would introduce an entirely new entity into the
908 tree. This patch introduces an exception to this general
909 rule: the declaration of constants and variables located in
910 Expression_With_Action nodes.
911 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
912 (In_Map): New subprogram.
913 (Visit_Entity): New subprogram.
914 (Visit_Node): Handle EWA_Level,
915 EWA_Inner_Scope_Level, and take care of defining entities defined
916 in Expression_With_Action nodes.
918 2017-04-25 Thomas Quinot <quinot@adacore.com>
920 * exp_ch6.adb: minor comment edit.
921 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
922 procedure specifications that come from source.
923 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
924 Null_Statement attribute.
925 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
926 procedure, generate statement SCO for the generated NULL statement.
927 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
928 parser, if available.
930 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
932 * system-linux-s390.ads: Use Long_Integer'Size to define
935 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
937 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
939 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
941 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
942 * g-socket.adb (To_Host_Entry): Fix typo in comment.
943 * gnat_ugn.texi: Fix typo.
944 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
945 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
946 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
947 * sem_util.adb (Mark_Coextensions): Likewise.
948 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
950 2017-03-28 Andreas Schwab <schwab@suse.de>
953 * system-linux-aarch64-ilp32.ads: New file.
954 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
955 from LIBGNAT_TARGET_PAIRS.
956 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
957 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
958 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
959 or -mabi=ilp32, resp.
961 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
963 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
965 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
968 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
970 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
973 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
975 * system-linux-arm.ads (Default_Bit_Order): Likewise.
976 * system-linux-mips.ads (Default_Bit_Order): Likewise.
977 * system-linux-armeb.ads: Delete.
978 * system-linux-mipsel.ads: Likewise.
979 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
980 (ARM/Linux): Likewise.
982 2017-02-24 Jakub Jelinek <jakub@redhat.com>
985 * gcc-interface/misc.c (gnat_handle_option): Pass true to
986 handle_generated_option GENERATED_P.
988 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
990 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
991 around a justified modular type if it doesn't have the same scalar
992 storage order as the enclosing record type.
994 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
996 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
997 of boolean rvalues to function calls.
999 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1001 * gcc-interface/utils.c (fold_bit_position): New function.
1002 (rest_of_record_type_compilation): Call it instead of bit_position to
1003 compute the field position and remove the call to remove_conversions.
1004 (compute_related_constant): Factor out the multiplication in both
1005 operands, if any, and streamline the final test.
1007 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1009 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
1011 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1013 * gcc-interface/decl.c: Include demangle.h.
1014 (is_cplusplus_method): Return again true for a primitive operation
1015 only if it is dispatching. For a subprogram with an interface name,
1016 call the demangler to get the number of C++ parameters and compare it
1017 with the number of Ada parameters.
1019 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1021 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
1022 there is no end label, put the location of the At_End procedure on
1023 the call to the procedure.
1025 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1027 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
1028 value for array types with TYPE_INDEX_TYPE set on their domain type.
1029 * gcc-interface/utils.c (max_size): For operations and expressions, do
1030 not build a new node if the operands have not changed or are missing.
1032 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1034 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
1035 argument when recursing on TRUTH_NOT_EXPR.
1037 2017-02-12 John Marino <gnugcc@marino.st>
1039 * system-freebsd-x86.ads: Rename into...
1040 * system-freebsd.ads: ...this.
1041 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
1042 * gcc-interface/Makefile.in: Support aarch64-freebsd.
1043 (x86-64/FreeBSD): Adjust to above renaming.
1044 (i386/FreeBSD): Likewise.
1046 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
1048 * comperr.adb: Update FSF bug reporting URL.
1050 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
1051 Jakub Jelinek <jakub@redhat.com>
1054 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
1056 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1059 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
1060 to build_translation_unit_decl.
1062 2017-01-23 Javier Miranda <miranda@adacore.com>
1064 * sem_util.adb (New_Copy_Tree): Code cleanup:
1065 removal of the internal map (ie. variable Actual_Map, its
1066 associated local variables, and all the code handling it).
1067 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
1068 force loading of the System package when processing a task type.
1069 (Analyze_Protected_Type_Declaration): in GNATprove mode force
1070 loading of the System package when processing a protected type.
1071 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
1072 force loading of the System package when processing compilation
1073 unit with a main-like subprogram.
1074 * frontend.adb (Frontend): remove forced loading of the System
1077 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1079 * sem_prag.adb (Default_Initial_Condition): If the desired type
1080 declaration is a derived type declaration with discriminants,
1081 it is rewritten as a private type declaration.
1082 * sem_ch13.adb (Replace_Type_References_Generic,
1083 Visible_Component): A discriminated private type with descriminnts
1084 has components that must be rewritten as selected components
1085 if they appear as identifiers in an aspect expression such as
1086 a Default_Initial_Condition.
1087 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
1090 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1092 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
1093 * gnat1drv.adb Generate an empty object file for an ignored
1094 Ghost compilation unit.
1095 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
1097 2017-01-23 Yannick Moy <moy@adacore.com>
1099 * sem_ch4.adb (Analyze_Indexed_Component_Form):
1100 Adapt to inlined prefix with string literal subtype.
1101 * inline.adb (Expand_Inlined_Call): Keep unchecked
1102 conversion inside inlined call when formal type is constrained.
1104 2017-01-23 Javier Miranda <miranda@adacore.com>
1106 * sem_util.adb (New_Copy_Tree): Code cleanup:
1107 removal of global variables. All the global variables, global
1108 functions and tables of this subprogram are now declared locally.
1110 2017-01-23 Gary Dismukes <dismukes@adacore.com>
1112 * exp_strm.ads: Minor reformatting and typo fixes.
1114 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1116 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
1117 exp_aggr.adb: Minor reformatting.
1118 * g-diopit.adb: minor grammar/punctuation fix in comment.
1119 * g-byorma.ads: minor fix of unbalanced parens in comment.
1121 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1123 * par.adb: Update the documentation of component Labl.
1124 * par-ch6.adb (P_Return_Statement): Set the expected label of
1125 an extended return statement to Error.
1127 2017-01-23 Tristan Gingold <gingold@adacore.com>
1129 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
1131 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1133 * expander.adb: Handle N_Delta_Aggregate.
1135 2017-01-23 Javier Miranda <miranda@adacore.com>
1137 * exp_ch6.adb (Expand_Call): Improve the code that
1138 checks if some formal of the called subprogram is a class-wide
1139 interface, to handle subtypes of class-wide interfaces.
1141 2017-01-23 Javier Miranda <miranda@adacore.com>
1143 * checks.adb (Apply_Parameter_Aliasing_Checks):
1144 Remove side effects of the actuals before generating the overlap
1147 2017-01-23 Justin Squirek <squirek@adacore.com>
1149 * exp_strm.ads, exp_strm.ads
1150 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
1151 as to avoid getting the underlying type by default.
1152 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
1153 underlying type in the Iiput and output attribute cases when
1154 building their respective functions.
1156 2017-01-23 Gary Dismukes <dismukes@adacore.com>
1158 * scng.adb: Minor reformatting of error message.
1160 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1162 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
1163 to freeze the return type of an expression funxtion that is a
1164 completion, if the type is a limited view and the non-limited
1167 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1169 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
1170 aggregate construct.
1171 (P_Record_Or_Array_Component_Association): An array aggregate
1172 can start with an Iterated_Component_Association.
1173 * scng.adb: Modify error message on improper use of @ in earlier
1174 versions of the language.
1175 * sinfo.ads: New node kind N_Delta_Aggregate.
1176 * sinfo.adb: An N_Delta_Aggregate has component associations and
1178 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
1179 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
1180 Create a new index for each one of the choices in the association,
1181 to prevent spurious homonyms in the scope.
1182 (Resolve_Delta_Aggregate): New.
1183 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
1184 * exp_util.adb (Insert_Actions): Take into account
1186 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
1187 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
1188 and local procedures Expand_Delta_Array_Aggregate and
1189 expand_Delta_Record_Aggregate.
1190 * sprint.adb: Handle N_Delta_Aggregate.
1192 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1194 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
1195 empty name when the exception declaration is subject to pragma
1197 (Null_String): New routine.
1199 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1201 * par-ch9.adb (P_Protected_Definition): Parse
1202 any optional and potentially illegal pragmas which appear in
1203 a protected operation declaration list.
1204 (P_Task_Items): Parse
1205 any optional and potentially illegal pragmas which appear in a
1208 2017-01-23 Pascal Obry <obry@adacore.com>
1210 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
1211 is needed when a foreign thread call a Win32 API using a thread handle
1212 like GetThreadTimes() for example.
1214 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1216 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
1217 allow an 'Address clause to be specified on a prefix of a
1220 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1222 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
1223 attribute 'Valid is a renaming of the original expression when
1224 the expression denotes a name. For all other kinds of expression,
1225 use a constant to capture the value.
1226 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
1227 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
1229 2017-01-23 Justin Squirek <squirek@adacore.com>
1231 * sem_eval.adb (Eval_Integer_Literal): Add special
1232 case to avoid optimizing out check if the literal appears in
1235 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1237 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
1238 allow an 'Address clause to be specified on a prefix of a
1241 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1243 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
1244 attribute 'Valid is a renaming of the original expression when
1245 the expression denotes a name. For all other kinds of expression,
1246 use a constant to capture the value.
1247 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
1248 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
1250 2017-01-23 Justin Squirek <squirek@adacore.com>
1252 * sem_eval.adb (Eval_Integer_Literal): Add special
1253 case to avoid optimizing out check if the literal appears in
1256 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1258 * sem_ch4.adb (Try_Primitive_Operations,
1259 Is_Valid_First_Argument_Of): argument is valid if it is a derived
1260 type with unknown discriminants that matches its underlying
1262 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
1263 expression if its type is derived from a limited type with
1264 unknown discriminants, because the expansion (which is a call)
1265 must be expanded in the enclosing context to add the proper build-
1266 in-place parameters to the call.
1267 * lib.ads, exp_ch9.adb: Minor fixes in comments.
1269 2017-01-23 Yannick Moy <moy@adacore.com>
1271 * frontend.adb (Frontend): Do not load runtime
1272 unit for GNATprove when parsing failed.
1273 * exp_ch9.adb: minor removal of extra whitespace
1274 * exp_ch6.adb: minor typo in comment
1275 * sem_util.adb: Code cleanup.
1276 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
1277 * a-ngcefu.adb: minor style fix in whitespace
1279 2017-01-23 Thomas Quinot <quinot@adacore.com>
1281 * scos.ads: Document usage of 'd' as default SCO kind for
1283 * par_sco.adb (Traverse_Declarations_Or_Statements.
1284 Traverse_Degenerate_Subprogram): New supporting routine for expression
1285 functions and null procedures.
1286 (Traverse_Declarations_Or_Statements.Traverse_One): Add
1287 N_Expression_Function to the subprogram case; add required
1288 support for null procedures and expression functions.
1290 2017-01-23 Bob Duff <duff@adacore.com>
1292 * namet.ads (Bounded_String): Decrease the size of type
1293 Bounded_String to avoid running out of stack space.
1294 * namet.ads (Append): Don't ignore buffer overflow; raise
1295 Program_Error instead.
1297 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1299 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
1300 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
1302 * exp_ch9.adb: minor style fix in comment.
1304 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1306 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
1307 for a limited record extension with unknown discriminants whose
1308 full view has no discriminants.
1310 2017-01-23 Yannick Moy <moy@adacore.com>
1312 * exp_spark.adb: Alphabetize with clauses.
1314 2017-01-23 Yannick Moy <moy@adacore.com>
1316 * sem_util.adb (Has_Enabled_Property): Treat
1317 protected objects and variables differently from other variables.
1319 2017-01-23 Thomas Quinot <quinot@adacore.com>
1321 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
1322 Split original Ada 95 part off into new subprogram
1323 below. Call that subprogram (instead of proceeding with
1324 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
1325 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
1326 * debug.adb Document new switch -gnatd.p
1327 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
1328 record for reverse bit order if an error has already been posted
1329 on the record type. This avoids generating extraneous "info:"
1330 messages for illegal code.
1332 2017-01-23 Justin Squirek <squirek@adacore.com>
1334 * sem_ch3.adb (Analyze_Declarations): Correct comments
1335 * freeze.adb (Find_Constant): Add detection of deferred constants
1336 so they are not incorrectly flagged as premature.
1338 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1340 * scans.ads: New token At_Sign. Remove '@' from list of illegal
1341 characters for future version of the language. '@' is legal name.
1342 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
1343 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
1344 denotes a Target_Name.
1345 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
1346 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
1347 (Has_Target_Names): New flag on N_Assignment_Statement, to
1348 indicate that RHS has occurrences of N_Target_Name.
1349 * sem.adb: Call Analyze_Target_Name.
1350 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
1351 (urrent_LHS): Global variable that denotes LHS of assignment,
1352 used in the analysis of Target_Name nodes.
1353 * sem_res.adb (Resolve_Target_Name): New procedure.
1354 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
1355 N is an assignment statement whose RHS contains occurences of @
1356 that designate the value of the LHS of the assignment. If the
1357 LHS is side-effect free the target names can be replaced with
1358 a copy of the LHS; otherwise the semantics of the assignment
1359 is described in terms of a procedure with an in-out parameter,
1360 and expanded as such.
1361 (Expand_N_Assignment_Statement): Call
1362 Expand_Assign_With_Target_Names when needed.
1363 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
1364 * sprint.adb: Handle N_Target_Name.
1366 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
1368 * checks.adb: Minor fix in comment.
1370 2017-01-23 Philippe Gil <gil@adacore.com>
1372 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
1373 count in Sort = Memory_Usage or Allocations_Count
1375 2017-01-23 Justin Squirek <squirek@adacore.com>
1377 * sem_ch3.adb: Code cleanup.
1379 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1381 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
1382 variables to the local variable section. Update the profile
1383 of various nested routine that previously had visibility
1384 of those globals. One the matching phase has completed,
1385 remove certain classes of clauses which are considered noise.
1386 (Check_Dependency_Clause): Properly detect a match between two
1387 'Result attributes. Update the various post-match cases to use
1388 Is_Already_Matched as this routine now automatically recognizes
1389 a previously matched 'Result attribute.
1390 (Is_Already_Matched): New routine.
1391 (Remove_Extra_Clauses): New routine.
1392 (Report_Extra_Clauses): Remove the detection of ... => null
1393 clauses as this is now done in Remove_Extra_Clauses.
1395 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1397 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
1398 report on spurious overlaps between values involving a subtype
1399 with a static predicate, because the expansion of such a subtype
1400 into individual ranges in inhibited in ASIS mode.
1402 2017-01-23 Justin Squirek <squirek@adacore.com>
1404 * sem_ch3.adb (Analyze_Declarations): Add detection
1405 of an edge case and delay freezing if it is present.
1407 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1409 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
1410 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
1412 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1414 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
1415 access-to-subprogram types inherit the convention of the
1416 associated subprogram. (Set_Profile_Convention): New routine.
1417 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
1418 of the two entities directly, use Conventions_Match to account
1419 for anonymous access-to-subprogram and subprogram types.
1420 (Conventions_Match): New routine.
1422 2017-01-23 Claire Dross <dross@adacore.com>
1424 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
1425 which return Universal_Integer, force the overflow check flag for
1426 Length and Range_Length for types as big as Long_Long_Integer.
1428 2017-01-23 Claire Dross <dross@adacore.com>
1430 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
1431 attributes which return Universal_Integer, introduce a conversion
1432 to the expected type with the appropriate check flags set.
1433 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
1434 base type if the range is null. It may still be invalid if it
1435 is higher than the lower bound. This is checked later in the
1436 context in which the range appears.
1438 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
1440 * scos.ads: Introduce a constant to represent ignored
1441 dependencies in SCO_Unit_Table_Entry.
1443 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1445 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
1446 spaces from error messages.
1448 2017-01-23 Ed Schonberg <schonberg@adacore.com>
1450 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
1451 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
1452 an object declaration for an array type with a modular index type
1453 with the size of Long_Long_Integer. Special processing is needed
1454 in this case to compute reliably the size of the object, and
1455 eventually to raise Storage_Error, when wrap-around arithmetic
1456 might compute a meangingless size for the object.
1458 2017-01-23 Justin Squirek <squirek@adacore.com>
1460 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
1461 sem_type.adb: Code cleanups.
1463 2017-01-23 Bob Duff <duff@adacore.com>
1465 * sem_res.adb (Resolve_Call): In the part of the code where
1466 it is deciding whether to turn the call into an indexed
1467 component, avoid doing so if the call is to an instance of
1468 Unchecked_Conversion. Otherwise, the compiler turns it into an
1469 indexed component, and resolution of that turns it back into a
1470 function call, and so on, resulting in infinite recursion.
1471 * sem_util.adb (Needs_One_Actual): If the first formal has a
1472 default, then return False.
1474 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
1476 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
1477 optimizations when the type is modular and the offsets are equal.
1479 2017-01-20 Thomas Quinot <quinot@adacore.com>
1481 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
1484 2017-01-20 Nicolas Roche <roche@adacore.com>
1486 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
1488 2017-01-20 Bob Duff <duff@adacore.com>
1490 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
1491 (etc) optimizations when the type is modular.
1493 2017-01-20 Yannick Moy <moy@adacore.com>
1495 * sem_ch6.adb (Move_Pragmas): move some pragmas,
1496 but copy the SPARK_Mode pragma instead of moving it.
1497 (Build_Subprogram_Declaration): Ensure that the generated spec
1498 and original body share the same SPARK_Pragma aspect/pragma.
1499 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
1500 procedure to copy SPARK_Mode aspect.
1502 2017-01-20 Bob Duff <duff@adacore.com>
1504 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
1506 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
1507 Empty even in ASIS mode.
1509 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1511 * exp_ch9.adb: minor style fixes in comments.
1512 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
1513 relative statement introduces an implicit dependency on
1514 Ada.Real_Time.Clock_Time.
1515 * sem_util.adb: Minor reformatting.
1517 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1519 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
1520 must be treated as delayed aspect even if the expression is
1521 a literal, because the aspect affects the freezing and the
1522 elaboration of the object to which it applies.
1524 2017-01-20 Tristan Gingold <gingold@adacore.com>
1526 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
1528 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1530 * lib-xref.adb (Generate_Reference): Do not warn about the
1531 presence of a pragma Unreferenced if the entity appears as the
1532 actual in a procedure call that does not come from source.
1534 2017-01-20 Pascal Obry <obry@adacore.com>
1536 * expect.c, terminals.c: Fix some warnings about unused variables.
1537 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
1540 2017-01-20 Bob Duff <duff@adacore.com>
1542 * exp_attr.adb (Constrained): Apply an access check (check that
1543 the prefix is not null) when the prefix denotes an object of an
1544 access type; that is, when there is an implicit dereference.
1546 2017-01-20 Gary Dismukes <dismukes@adacore.com>
1548 * s-rident.ads (constant Profile_Info): Remove
1549 No_Calendar from GNAT_Extended_Ravenscar restrictions.
1551 2017-01-20 Tristan Gingold <gingold@adacore.com>
1553 * s-maccod.ads: Add pragma No_Elaboration_Code_All
1555 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1557 * ghost.adb (Mark_Ghost_Clause): New routine.
1558 (Prune_Node): Do not prune compilation unit nodes.
1559 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
1560 This does not touch the node itself, but does prune all its fields.
1561 * ghost.ads (Mark_Ghost_Clause): New routine.
1562 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
1563 package clause mentions Ghost and non-Ghost packages. Mark a
1564 use package clause as Ghost when it mentions a Ghost package.
1565 (Analyze_Use_Type): Emit an error when a use type clause mentions
1566 Ghost and non-Ghost types. Mark a use type clause as Ghost when
1567 it mentions a Ghost type.
1568 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
1569 Ghost when it withs a Ghost unit.
1571 2017-01-20 Javier Miranda <miranda@adacore.com>
1573 * sem_res.adb (Resolve_Call): If a function call
1574 returns a limited view of a type and at the point of the call the
1575 function is not declared in the extended main unit then replace
1576 it with the non-limited view, which must be available. If the
1577 called function is in the extended main unit then no action is
1578 needed since the back-end handles this case.
1580 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
1582 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
1583 (Contains_Subprograms_Refs): ...this. Adjust comment
1584 for constants. (Is_Subp_Or_Const_Ref): Rename into...
1585 (Is_Subprogram_Ref): ...this.
1586 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
1587 Has_Non_Subprograms_Referencer and adjust comment. Remove
1588 incorrect shortcut for package declarations and bodies.
1590 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1592 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
1593 base type differs from that of the completion and the private
1594 subtype is an itype (created for a constraint on an access
1595 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
1598 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1600 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1601 When inheriting the SPARK_Mode of a prior expression function,
1602 look at the properly resolved entity rather than the initial
1603 candidate which may denote a homonym.
1605 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1607 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
1608 Precondition or Postcondition, and the context is pragma
1609 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
1610 and suggest the standard names Assertion_Policy /Pre /Post
1613 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1615 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
1617 2017-01-20 Javier Miranda <miranda@adacore.com>
1619 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
1621 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
1622 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
1625 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1627 * sem_ch13.adb (Analyze_Aspect_Specification, case
1628 Dynamic_Predicate): If the entity E is a subtype that inherits
1629 a static predicate for its parent P,, the inherited and the
1630 new predicate combine in the generated predicate function,
1631 and E only has a dynamic predicate.
1633 2017-01-20 Tristan Gingold <gingold@adacore.com>
1635 * s-boustr.ads, s-boustr.adb: New package.
1636 * Makefile.rtl: Add s-boustr.
1638 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1640 * inline.adb (Process_Formals): Qualify the
1641 expression of a return statement when it yields a universal type.
1643 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1645 * freeze.adb (Freeze_All): Freeze the default
1646 expressions of all eligible formal parameters that appear in
1647 entries, entry families, and protected subprograms.
1649 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1651 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
1652 for illegal inherited Implicit_Dereference aspects with renamed
1655 2017-01-20 Javier Miranda <miranda@adacore.com>
1657 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
1658 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
1659 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
1660 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
1661 Set_Prev, Tree_Read): Adding assertion.
1662 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
1663 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
1664 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
1665 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
1666 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
1667 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
1668 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
1669 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
1670 Set_ListN_With_Parent): Adding assertion.
1672 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1674 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
1675 import that applies to several homograph subprograms. when one
1676 of them is declared by a subprogram body.
1678 2017-01-20 Justin Squirek <squirek@adacore.com>
1680 * exp_ch6.adb (Expand_Call): Remove optimization
1681 that nulls out calls to null procedures.
1683 2017-01-20 Yannick Moy <moy@adacore.com>
1685 * inline.adb (Expand_Inlined_Call): Keep more
1686 precise type of actual for inlining whenever possible. In
1687 particular, do not switch to the formal type in GNATprove mode in
1688 some case where the GNAT backend might require it for visibility.
1690 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1692 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
1693 aspect Implicit_Dereference can be inherited by a full view if
1694 the partial view has no discriminants, because there is no way
1695 to apply the aspect to the partial view.
1696 (Build_Derived_Record_Type): If derived type renames discriminants
1697 of the parent, the new discriminant inherits the aspect from
1699 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
1700 call through an access discriminant designating a subprogram.
1701 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
1702 properly a parameterless call through an access discriminant on
1703 the left-hand side of an assignment.
1704 * sem_res.adb (resolve): If an interpreation involves a
1705 discriminant with an implicit dereference and the expression is an
1706 entity, resolution takes place later in the appropriate routine.
1707 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
1708 access discriminants that designate a subprogram type.
1710 2017-01-20 Pascal Obry <obry@adacore.com>
1712 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
1714 2017-01-20 Yannick Moy <moy@adacore.com>
1716 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
1717 on implicitly with'ed units in GNATprove mode.
1718 * sinfo.ads (Implicit_With): Document use of flag for implicitly
1719 with'ed units in GNATprove mode.
1721 2017-01-20 Ed Schonberg <schonberg@adacore.com>
1723 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
1724 unit Do not report an error on a non-static entity that appears
1725 in the context of a spec expression, such as an aspect expression.
1727 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1729 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
1730 (Is_Underlying_Full_View): New routine.
1731 (Set_Is_Underlying_Full_View): New routine.
1732 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
1733 * einfo.ads Add new attribute Is_Underlying_Full_View.
1734 (Is_Underlying_Full_View): New routine along with pragma Inline.
1735 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
1736 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
1737 class-wide types and underlying full views. The first subtype
1738 is used as the working type for all Itypes, not just array base types.
1739 (Build_DIC_Procedure_Declaration): Do not consider
1740 class-wide types and underlying full views. The first subtype
1741 is used as the working type for all Itypes, not just array
1743 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
1744 view or an underlying full view without clobbering the attributes
1745 of a previous freeze node.
1746 (Inherit_Freeze_Node): New routine.
1747 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
1749 (Build_Underlying_Full_View): Mark an underlying full view as such.
1750 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
1753 2017-01-20 Yannick Moy <moy@adacore.com>
1755 * sinfo.ads: Document lack of Do_Division_Check flag
1756 on float exponentiation.
1758 2017-01-19 Javier Miranda <miranda@adacore.com>
1760 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
1761 identifier attribute of a block-statement node. Required to avoid
1762 assertion failure when building the new containers library.
1764 2017-01-19 Bob Duff <duff@adacore.com>
1766 * exp_ch3.adb: Update comment.
1768 2017-01-19 Vincent Celier <celier@adacore.com>
1770 * gprep.adb (Gnatprep): Parse the definition file without
1771 "replace in comments" even when switch -C is used.
1773 2017-01-19 Justin Squirek <squirek@adacore.com>
1775 * exp_ch9.adb (Is_Pure_Barrier): Create function
1776 Is_Count_Attribute to identify an expansion of the 'Count
1779 2017-01-19 Ed Schonberg <schonberg@adacore.com>
1781 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
1782 statements within an element iterator loop are only analyzed
1783 agter the loop is rewritten. Within a generic the analysis must
1784 be performed in any case to complete name capture.
1786 2017-01-19 Bob Duff <duff@adacore.com>
1788 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
1789 before checking for unrecognized pragmas.
1790 Initialize Pname on its declarations; that's always good style.
1792 2017-01-19 Claire Dross <dross@adacore.com>
1794 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
1795 body into the tree for GNATprove by setting its Parent field. The
1796 components invariants of composite types are not checked by
1797 the composite type's invariant procedure in GNATprove mode.
1798 (Build_Invariant_Procedure_Declaration): Semi-insert the
1799 declaration into the tree for GNATprove by setting its Parent
1801 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
1802 the component invariants to the array type invariant procedure
1803 so that the procedure can be used to check the array type
1805 (Freeze_Record_Type): In GNATprove mode, do
1806 not add the component invariants to the record type invariant
1807 procedure so that the procedure can be used to check the record
1808 type invariants if any.
1810 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
1812 * lib-xref-spark_specific.adb: Minor reformatting.
1813 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
1815 2017-01-19 Javier Miranda <miranda@adacore.com>
1817 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
1818 Build_Back_End_Aggregate.
1819 (Generate_Aggregate_For_Derived_Type): Code cleanup.
1820 (Prepend_Stored_Values): Code cleanup.
1822 2017-01-19 Ed Schonberg <schonberg@adacore.com>
1824 * sem_ch6.adb (Analyze_Expression_Function): Check for an
1825 incomplete return type after attempting to freeze it, so that
1826 other freeze actiona are generated in the proper order.
1828 2017-01-19 Ed Schonberg <schonberg@adacore.com>
1830 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
1831 type, ie. a type whose component is a character type, and the
1832 aggregate is positional, do not convert into a string literal
1833 if the index type is not an integer type, because the original
1834 type may be required in an enclosing operation.
1836 2017-01-19 Bob Duff <duff@adacore.com>
1838 * binde.adb, debug.adb: Enable new elaboration order algorithm
1839 by default. -dp switch reverts to the old algorithm.
1841 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
1843 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
1844 (Analyze_Declarations): Create the DIC and Invariant
1845 procedure bodies s after all freezing has taken place.
1846 (Build_Assertion_Bodies): New routine.
1847 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
1849 (Analyze_Package_Specification): Remove the
1850 generation of the DIC and Invariant procedure bodies. This is
1851 now done by Analyze_Declarations.
1852 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
1853 procedures are never treated as primitives.
1855 2017-01-19 Yannick Moy <moy@adacore.com>
1857 * frontend.adb: Analyze inlined bodies and check elaboration
1858 rules in GNATprove mode too.
1859 * sem_elab.adb (Delay_Element): Add Boolean component to save
1860 indication that call is in SPARK code. (Check_Elab_Calls):
1861 Check elaboration rules in GNATprove mode, and correctly set
1862 the current value of SPARK_Mode.
1863 * lib-xref-spark_specific.adb
1864 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
1866 2017-01-19 Ed Schonberg <schonberg@adacore.com>
1868 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
1869 checks on the expression for the high bound of concatenation
1870 when checks are disabled, to suppress warnings about potential
1871 constraint errors in restricted runtimes.
1873 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
1875 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
1876 representation-to-position function as inlined.
1877 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
1878 the purity of an internally generated entity if it has been
1879 explicitly marked as pure for optimization purposes.
1880 * exp_aggr.adb: Minor reformatting.
1882 2017-01-19 Javier Miranda <miranda@adacore.com>
1884 * exp_ch6.adb (Expand_Call): Remove side effects on
1885 actuals that are allocators with qualified expression since the
1886 initialization of the object is performed by means of individual
1887 statements (and hence it must be done before the call).
1889 2017-01-19 Ed Schonberg <schonberg@adacore.com>
1891 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
1892 (Build_Derived_Enumeration_Type): If the derived type inherits a
1893 dynamic predicate from its parent, the bounds of the type must
1894 freeze because an explicit constraint is constructed for the
1895 type and the corresponding range is elaborated now.
1897 2017-01-19 Arnaud Charlet <charlet@adacore.com>
1899 * sem_attr.ads: minor fix of inconsistent casing in comment
1900 * lib-writ.ads: minor align comments in columns
1901 * sem_ch3.adb: Minor reformatting.
1902 * spark_xrefs.ads: minor fix typo in SPARK-related comment
1903 * table.ads: minor style fix in comment
1904 * lib-xref-spark_specific.adb
1905 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
1906 * sem_ch12.adb: minor whitespace fix
1907 * freeze.adb: Add comment.
1908 * sem_util.adb (Unique_Name): for instances of
1909 generic subprograms ignore the name of the wrapper package.
1911 2017-01-19 Javier Miranda <miranda@adacore.com>
1913 * exp_aggr.adb (Resolve_Record_Aggregate):
1914 Factorize code needed for aggregates of limited and unlimited
1915 types in a new routine.
1916 (Pass_Aggregate_To_Back_End): New subprogram.
1918 2017-01-19 Yannick Moy <moy@adacore.com>
1920 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
1922 2017-01-19 Ed Schonberg <schonberg@adacore.com>
1924 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
1925 public, for use elsewhere.
1926 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
1927 an Inlined_body, recognize a call that uses object notation
1928 and has not been rewritten as a regular call because regular
1929 expansion has not taken place.
1931 2017-01-19 Bob Duff <duff@adacore.com>
1933 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
1934 in case of generic formal discrete types, because it causes crashes in
1935 the compiler when built with assertions on.
1937 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
1939 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
1940 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
1942 2017-01-19 Bob Duff <duff@adacore.com>
1944 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
1945 Increment Warnings_Detected. It was decrementing, which is
1946 wrong since we just issued a warning message.
1947 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
1948 these variables to be of subtype Nat instead of Int, because
1949 they should never be negative.
1951 2017-01-19 Javier Miranda <miranda@adacore.com>
1953 * contracts.adb (Build_Postconditions_Procedure): Replace
1954 Generate_C_Code by Modify_Tree_For_C.
1955 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
1956 Replace Generate_C_Code by Modify_Tree_For_C.
1957 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
1959 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
1960 Generate_C_Code by Modify_Tree_For_C.
1961 * exp_ch4.adb (Expand_Allocator_Expression): Replace
1962 Generate_C_Code by Modify_Tree_For_C.
1963 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
1964 by Modify_Tree_For_C.
1965 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
1966 Generate_C_Code by Modify_Tree_For_C.
1967 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
1968 by Modify_Tree_For_C.
1969 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
1971 2017-01-19 Javier Miranda <miranda@adacore.com>
1973 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
1975 (Is_Inlinable_Expression_Function): New subprogram.
1976 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
1978 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
1980 2017-01-19 Ed Schonberg <schonberg@adacore.com>
1982 * sem_ch4.adb (Diagnose_Call): Improve error message when a
1983 selected component has a prefix that might be interpreted
1984 as a parameterless function call, but none of the candidate
1985 interpretations is parameterless, and there is a hidden homonym
1986 of the prefix that is a package.
1987 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
1988 interpreted as a parameterless function call and its analysis
1989 fails, do not call Analyze_Selected_Component.
1991 2017-01-19 Steve Baird <baird@adacore.com>
1993 * sem_util.ads: Add new Use_Full_View Boolean parameter to
1995 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
1996 calls to a newly-defined Scalar_Range_Of_Right_View function.
1998 2017-01-19 Arnaud Charlet <charlet@adacore.com>
2000 * gnat1drv.adb: minor fix of unbalanced parens in comment
2001 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
2002 to visible part of the package to allow re-use in GNATprove.
2003 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
2004 from repeated code of Traverse_Compilation_Unit.
2005 (Traverse_Declaration_Or_Statement): fixed detection of
2006 generic subprograms and packages; also, iteration over case
2007 statement alternatives rewritten to avoid testing if the first
2008 alternative is present (since it must be present due to Ada
2009 syntax restrictions).
2011 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
2013 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
2014 returning by reference not just for subprogram body stubs,
2015 but for all subprogram cases.
2016 * sem_util.adb: Code reformatting.
2017 (Requires_Transient_Scope): Update the call to Results_Differ.
2018 (Results_Differ): Update the parameter profile and the associated
2021 2017-01-19 Ed Schonberg <schonberg@adacore.com>
2023 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
2024 identifier nodes that do not come from source, to handle properly
2025 dimensionality check within an inlined body which inclddes both
2026 original operands and rewritten operands. This removes spurious
2027 dimensionality errors in the presence of front-end inlining,
2028 as well as in SPARK mode.
2030 2017-01-16 Jakub Jelinek <jakub@redhat.com>
2033 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
2035 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2037 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
2039 2017-01-13 Arnaud Charlet <charlet@adacore.com>
2041 * doc/gnat_ugn/getting_started_with_gnat.rst,
2042 doc/gnat_ugn/inline_assembler.rst,
2043 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2044 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
2045 doc/gnat_ugn/about_this_guide.rst,
2046 doc/gnat_ugn/platform_specific_information.rst,
2047 doc/gnat_ugn/example_of_binder_output.rst,
2048 doc/gnat_ugn/gnat_and_program_execution.rst,
2049 doc/gnat_ugn/gnat_utility_programs.rst,
2050 doc/gnat_ugn/the_gnat_compilation_model.rst,
2051 doc/gnat_rm/implementation_defined_attributes.rst,
2052 doc/gnat_rm/compatibility_and_porting_guide.rst,
2053 doc/gnat_rm/standard_library_routines.rst,
2054 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2055 doc/gnat_rm/implementation_defined_pragmas.rst,
2056 doc/gnat_rm/the_gnat_library.rst,
2057 doc/gnat_rm/obsolescent_features.rst,
2058 doc/gnat_rm/about_this_guide.rst,
2059 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
2060 doc/gnat_rm/implementation_of_ada_2012_features.rst,
2061 doc/gnat_rm/interfacing_to_other_languages.rst,
2062 doc/gnat_rm/implementation_defined_aspects.rst,
2063 doc/gnat_rm.rst: Update documentation.
2064 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
2066 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2068 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
2069 * scil_ll.adb: Minor style fix in comment.
2070 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
2071 even if entity is already set, because the node may be renalyzed
2072 after inlining transformations.
2074 2017-01-13 Javier Miranda <miranda@adacore.com>
2076 * sem_res.adb (Resolve_Call): Do not establish a transient scope
2077 for a call to inlinable expression function (since the call will
2078 be replaced by its returned object).
2079 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
2080 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
2081 (Expand_Call): For inlinable expression function call replace the
2082 call by its returned object.
2083 (Is_Inlinable_Expression_Function): New subprogram.
2085 2017-01-13 Gary Dismukes <dismukes@adacore.com>
2087 * checks.adb: Minor typo fix and reformatting.
2089 2017-01-13 Javier Miranda <miranda@adacore.com>
2091 * contracts.adb (Contract_Only_Subprograms): Remove formal.
2092 (Copy_Original_Specification): Removed.
2093 (Skip_Contract_Only_Subprogram): Move here checks previously
2094 located in the caller of this routine (to leave the code more clean).
2095 (Build_Contract_Only_Subprogram): Code cleanup.
2096 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
2097 (Get_Contract_Only_Missing_Body_Name): Removed.
2099 2017-01-13 Javier Miranda <miranda@adacore.com>
2101 * sem_ch6.adb (Cloned_Expression): New subprogram.
2102 (Freeze_Expr_Types): Complete previous patch since the expression
2103 of an expression-function may have iterators and loops with
2104 defining identifiers which, as part of the preanalysis of the
2105 expression, may be left decorated with itypes that will not be
2106 available in the tree passed to the backend.
2108 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2110 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
2111 conversion to Integer of an expression that is an attribute
2112 reference 'Pos on an enumeration type.
2114 2017-01-13 Bob Duff <duff@adacore.com>
2116 * atree.ads: Minor comment fix.
2118 2017-01-13 Justin Squirek <squirek@adacore.com>
2120 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
2121 calls in accessibility check on return statement.
2123 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2125 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2126 Ensure that the input body is a subprogram body before trying to
2127 determine whether it denoted an expression function. Note that
2128 subprogram body stubs cannot denote expression functions.
2130 2017-01-13 Gary Dismukes <dismukes@adacore.com>
2132 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
2135 2017-01-13 Javier Miranda <miranda@adacore.com>
2137 * einfo.ads (Component_Bit_Offset): Fix documentation.
2138 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
2139 on record holes for components with unknown compile-time offsets.
2141 2017-01-13 Bob Duff <duff@adacore.com>
2143 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
2144 * g-locfil.ads: Minor comment fix.
2146 2017-01-13 Bob Duff <duff@adacore.com>
2148 * binde.adb (Elab_New): New elaboration order algorithm
2149 that is expected to cause fewer ABE issues. This is a work in
2150 progress. The new algorithm is currently disabled, and can be
2151 enable by the -dp switch, or by modifying the Do_Old and Do_New
2152 etc. flags and rebuilding. Experimental code is included to
2153 compare the results of the old and new algorithms.
2154 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
2155 can have multiple of these tables, so the old and new algorithms
2157 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
2158 parameter of type array. This avoids the global variable, and
2159 allows bounds checking (which is normally defeated by the tables
2160 packages). It also ensures that the Elab_Order is read-only
2162 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
2163 subprograms that need it, as above.
2164 * debug.adb: Document new -dp switch. Modify doc of old -do
2166 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
2167 and Bindgen. Move writing of closure (-R and -Ra switches)
2168 to Binde; that's more convenient.
2170 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2172 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2173 function is a completion, all entities referenced in the
2174 expression are frozen. As a consequence, a reference to an
2175 uncompleted private type from an enclosing scope is illegal.
2177 2017-01-13 Javier Miranda <miranda@adacore.com>
2179 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
2180 (Analyze_Subprogram_Body_Helper): At the occurrence of an
2181 expression function declaration that is a completion, its
2182 expression causes freezing (AI12-0103).
2184 2017-01-13 Vadim Godunko <godunko@adacore.com>
2186 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
2187 Reference functions of Ada.Containers.Indefinite_Holders.
2189 2017-01-13 Bob Duff <duff@adacore.com>
2191 * s-os_lib.ads: Minor comment fixes.
2193 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2195 * exp_ch3.adb (Default_Initialize_Object): Do not default
2196 initialize an object when it is of a task type and restriction
2197 No_Tasking is in effect because the initialization is obsolete.
2198 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
2199 restriction No_Tasking is in effect.
2200 (Build_Master_Renaming): Do not rename a master when restriction
2201 No_Tasking is in effect.
2203 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2205 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
2206 the legality of An others clause applies as well to a choice in
2207 an Iterated_component_ association.
2208 (Resolve_Iterated_Component_Association): An others choice
2210 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
2211 Iterated_Component_Association is not static.
2213 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2215 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
2216 control is passed to the expresion handler before the new mode
2218 * sem_ch12.adb (Analyze_Package_Instantiation,
2219 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
2220 in case control is passed to the expresion handler before the
2223 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2225 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
2226 exp_aggr.adb: Minor reformatting.
2228 2017-01-13 Gary Dismukes <dismukes@adacore.com>
2230 * inline.adb: Minor reformatting and typo fix.
2232 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2234 * sem_util.ads, sem_util.adb (Choice_List): Move function here
2235 from sem_aggr.adb, for use elsewhere.
2236 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
2237 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
2238 Iterated_Component_Present.
2239 * exp_aggr.adb: Use Choice_List throughout, to handle
2240 Iterated_Component_Associations.
2241 (Gen_Loop): Generate proper loop for an
2242 Iterated_Component_Association: loop variable has the identifier
2243 of the original association. Generate a loop even for a single
2244 component choice, in order to make loop parameter visible in
2246 (Flatten): An Iterated_Component_Association is not static.
2248 2017-01-13 Yannick Moy <moy@adacore.com>
2250 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
2251 float exponentiation for statically known small negative values
2252 is the reciprocal of the exponentiation for the opposite value
2254 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
2255 Ensure that the value of float exponentiation for negative values
2256 is the reciprocal of the exponentiation for the opposite value
2258 * inline.adb (Expand_Inlined_Call): Fix the count
2259 for the number of generated gotos.
2261 2017-01-13 Yannick Moy <moy@adacore.com>
2263 * inline.adb: Code cleanup.
2264 * sem_util.adb (Is_OK_Volatile_Context): Add
2265 expression in delay statement as OK for volatile context.
2267 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2269 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
2270 mode a choice that is a subtype with a static predicate is
2271 replaced by the values it covers. This transformation must not
2272 be performed in ASIS mode, to preserve the source for analysis.
2274 2017-01-13 Justin Squirek <squirek@adacore.com>
2276 * nlists.ads: Correct minor typo.
2278 2017-01-13 Gary Dismukes <dismukes@adacore.com>
2280 * sem_ch13.adb: Minor reformatting and typo fix.
2282 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2284 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
2285 Iterated_Component_Association is a named association in an
2287 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
2288 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
2289 and resolve the discrete choices and the expression of the
2291 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
2292 Loop_Actions and Box_Present are attributes of
2293 N_Iterated_Component_Association nodes. Box_Present is always
2295 * sprint.adb (Sprint_Node): An Iterated_Component_Association
2296 has a Discrete_Choices list, as specified in the RM. A
2297 Component_Association for aggregate uses instead a Choices list.
2298 We have to live with this small inconsistency because the new
2299 construct also has a defining identifier, and there is no way
2300 to merge the two node structures.
2302 2017-01-13 Yannick Moy <moy@adacore.com>
2304 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
2305 list of pragmas to remove. Remove pragmas from the list of
2306 statements in the body to inline.
2307 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
2309 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2311 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
2312 Analyze_Declarations, to analyze and resolve the expressions of
2313 aspect specifications in the current declarative list, so that
2314 the expressions have proper entity and type info. This is needed
2315 for ASIS when there is no subsequent expansion to generate this
2316 semantic information.
2317 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
2318 original expression, to suppress cascaded errors when expression
2319 has been constant-folded.
2320 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
2321 ASIS mode, because there is no subsequent expansion to decorate
2324 2017-01-13 Yannick Moy <moy@adacore.com>
2326 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
2327 New function to detect when a call may be inlined or not in
2329 (Expand_Inlined_Call): Ensure that a temporary
2330 is always created in the cases where a type conversion may be
2331 needed on an input parameter in GNATprove mode, so that GNATprove
2332 sees the check to perform.
2333 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
2334 when not applicable due to actual requiring type conversion
2335 with possible check but no temporary value can be copied for
2336 GNATprove to see the check.
2338 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2340 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
2341 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
2342 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
2343 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
2344 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
2345 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
2346 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
2347 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
2348 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
2349 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
2350 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
2351 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
2352 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
2353 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
2354 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
2355 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
2356 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
2357 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
2358 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
2359 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
2360 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
2361 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
2362 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
2363 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
2364 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
2365 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
2366 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
2367 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
2368 statements to reflect the new style for case alternatives. Various
2369 code clean up and reformatting.
2371 2017-01-13 Gary Dismukes <dismukes@adacore.com>
2373 * exp_util.adb: Minor reformatting.
2375 2017-01-13 Yannick Moy <moy@adacore.com>
2377 * exp_spark.adb: Code cleanup.
2378 * sem_ch9.adb (Analyze_Delay_Until): Resolve
2379 expression so that calls are identified as such inside delay
2382 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2384 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
2385 * par-ch3.adb (P_Discrete_Choice_List): An
2386 Iterated_Component_Association is an array aggregate component.
2387 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
2388 (Is_Quantified_Expression): New function that performs a lookahead
2389 to distinguish quantified expressions from iterated component
2391 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
2393 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
2394 * sem.adb (Analyze): Handle Iterated_Component_Association.
2395 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
2396 component associations.
2397 * sinfo.ads, sinfo.adb: Entries for for
2398 N_Iterated_Component_Association and its fields.
2399 * sprint.adb (Sprint_Node_Actual): Handle
2400 N_Iterated_Component_Association.
2402 2017-01-13 Justin Squirek <squirek@adacore.com>
2404 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
2405 of the style check until after preanalysis of acutals.
2407 2017-01-13 Yannick Moy <moy@adacore.com>
2409 * sem_ch13.adb: Minor reformatting.
2410 * par-ch11.adb: minor style fix in whitespace
2411 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
2412 reduced to Add_Artificial_ALI_File; style fix in declaration of
2413 Text; grammar fix in comment.
2414 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
2415 * freeze.adb: Cleanup to pass pragma instead of
2417 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
2418 replace System'To_Address by equivalent call.
2420 2017-01-13 Arnaud Charlet <charlet@adacore.com>
2422 * bindusg.adb: Improve usage output for -f switch.
2424 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2426 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
2429 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2431 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
2432 treat comparisons on strings as legal in a Static_Predicate.
2433 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
2434 a function call that is the expansion of a string comparison.The
2435 function call is built when compiling the corresponding predicate
2436 function, but the expression has been found legal as a static
2437 predicate during earlier analysis.
2438 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
2439 properly a function call that is the expansion of a string
2440 comparison operation, in order to recover the Static_Predicate
2441 expression and apply it to a static argument when needed.
2443 2017-01-13 Tristan Gingold <gingold@adacore.com>
2445 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
2446 (Open_Read): Re-implement using Open_Read_No_Exception.
2447 (Open_Write): Raise exception in case of error.
2448 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
2449 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
2451 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
2453 2017-01-13 Yannick Moy <moy@adacore.com>
2455 * checks.adb: Code cleanup.
2457 2017-01-13 Yannick Moy <moy@adacore.com>
2459 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
2460 expression instead of unanalyzed aspect expression for checking
2461 the validity of inheriting an operation. Also copy the expression
2462 being passing it to Build_Class_Wide_Expression, as this call
2463 modifies its argument.
2464 * sem_util.ads Fix comment to reference correct function name
2467 2017-01-13 Javier Miranda <miranda@adacore.com>
2469 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
2470 when we propagate information about the indexes back to the original
2471 indexing mode and the prefix of the index is a function call, do not
2472 remove any parameter from such call.
2474 2017-01-13 Gary Dismukes <dismukes@adacore.com>
2476 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
2477 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
2478 a build-in-place function whose result type is tagged.
2480 2017-01-13 Yannick Moy <moy@adacore.com>
2482 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
2483 Do not generate a wrapper when the only candidate is a class-wide
2485 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
2486 inside a generic context.
2488 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2490 * exp_util.adb (Add_Inherited_Tagged_DIC):
2491 Pass the object parameters of both the parent and the derived
2492 type DIC procedure to the reference replacement circuitry.
2493 (Find_DIC_Type): Modify the circuitry to present the partial
2494 view of a private type in case the private type defines its own
2496 (Replace_Object_And_Primitive_References): Add two
2497 optional formal parameters. Update the comment on usage. Update
2498 the replacement of references to object parameters.
2500 2017-01-13 Gary Dismukes <dismukes@adacore.com>
2502 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
2504 2017-01-13 Ed Schonberg <schonberg@adacore.com>
2506 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
2507 an out parameter that is a type conversion, independently of th
2508 range check that may apply to the expression of the conversion,
2509 for use in GNATProve.
2511 2017-01-13 Yannick Moy <moy@adacore.com>
2513 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
2514 GNATprove_Mode here to Frontend.
2515 * frontend.adb (Frontend): Move the implicit with for System
2516 in GNATprove_Mode here as it ismore correct this way; the old
2517 place only worked by chance, since there were no overloaded names.
2518 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
2519 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
2520 four attributes identified in SRM 9(18), add an implicit with
2521 to Ada.Task_Identification.
2522 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
2523 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
2525 * checks.adb (Apply_Discriminant_Check,
2526 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
2527 In GNATprove mode, we do not apply the checks, but we still
2528 analyze the expression to possibly issue errors on SPARK
2529 code when a run-time error can be detected at compile time.
2530 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
2533 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2535 * expander.adb (Expand): Add a warning about using return
2536 statements in Ghost management code.
2537 * exp_ch3.adb (Freeze_Type): Add a warning about using return
2538 statements in Ghost management code.
2539 * exp_ch7.adb (Build_Invariant_Procedure_Body,
2540 Build_Invariant_Procedure_Declaration): Add a warning about
2541 using return statements in Ghost management code.
2542 * exp_disp.adb (Make_DT): Add a warning about using return
2543 statements in Ghost management code.
2544 * exp_util.adb (Build_DIC_Procedure_Body,
2545 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
2546 warning about using return statements in Ghost management code.
2547 * freeze.adb (Freeze_Entity): Add a warning about using return
2548 statements in Ghost management code.
2549 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
2550 statements in Ghost management code.
2551 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
2552 a warning about using return statements in Ghost management code.
2553 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
2554 return statements in Ghost management code.
2555 * sem_ch6.adb (Analyze_Procedure_Call,
2556 Analyze_Subprogram_Body_Helper): Add a warning about using return
2557 statements in Ghost management code.
2558 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
2559 using return statements in Ghost management code.
2560 * sem_ch12.adb (Analyze_Package_Instantiation,
2561 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
2562 Instantiate_Subprogram_Body): Add a warning about using return
2563 statements in Ghost management code.
2564 * sem_ch13.adb (Build_Predicate_Functions,
2565 Build_Predicate_Function_Declarations): Add a warning about
2566 using return statements in Ghost management code.
2567 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
2568 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
2569 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
2570 using return statements in Ghost management code.
2572 2017-01-13 Tristan Gingold <gingold@adacore.com>
2574 * s-mmosin-mingw.adb: Fix pragma import.
2576 2017-01-13 Arnaud Charlet <charlet@adacore.com>
2578 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
2581 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
2583 * atree.adb (Allocate_Initialize_Node): A newly created node is
2584 no longer marked as Ghost at this level.
2585 (Mark_New_Ghost_Node): New routine.
2586 (New_Copy): Mark the copy as Ghost.
2587 (New_Entity): Mark the entity as Ghost.
2588 (New_Node): Mark the node as Ghost.
2589 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
2590 apply to unanalyzed entities.
2591 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
2593 (Set_Is_Checked_Ghost_Entity): This attribute now
2594 applies to all entities as well as unanalyzed entities.
2595 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
2596 all entities as well as unanalyzed entities.
2597 * expander.adb Add with and use clauses for Ghost.
2598 (Expand): Install and revert the Ghost region associated with the node
2600 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
2601 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
2602 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
2603 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
2604 (Freeze_Type): Install and revert the Ghost region associated
2605 with the type being frozen.
2606 * exp_ch5.adb Remove with and use clauses for Ghost.
2607 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
2608 * exp_ch6.adb Remove with and use clauses for Ghost.
2609 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
2610 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
2611 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
2612 Ghost region of the working type.
2613 (Build_Invariant_Procedure_Declaration): Install and revert
2614 the Ghost region of the working type.
2615 (Expand_N_Package_Body): Remove all Ghost-related code.
2616 * exp_ch8.adb Remove with and use clauses for Ghost.
2617 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
2619 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
2620 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
2621 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
2623 * exp_ch13.adb Remove with and use clauses for Ghost.
2624 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
2625 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
2626 the tagged type. Move the generation of various entities within
2627 the Ghost region of the type.
2628 * exp_prag.adb Remove with and use clauses for Ghost.
2629 (Expand_Pragma_Check): Remove all Ghost-related code.
2630 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
2631 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
2632 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
2633 * exp_util.adb (Build_DIC_Procedure_Body): Install
2634 and revert the Ghost region of the working types.
2635 (Build_DIC_Procedure_Declaration): Install and revert the
2636 Ghost region of the working type.
2637 (Make_Invariant_Call): Install and revert the Ghost region of the
2639 (Make_Predicate_Call): Reimplemented. Install and revert the
2640 Ghost region of the associated type.
2641 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
2642 of the entity being frozen.
2643 (New_Freeze_Node): Removed.
2644 * ghost.adb Remove with and use clauses for Opt.
2645 (Check_Ghost_Completion): Update the parameter profile
2646 and all references to formal parameters.
2647 (Ghost_Entity): Update the comment on usage.
2648 (Install_Ghost_Mode): New routines.
2649 (Is_Ghost_Assignment): New routine.
2650 (Is_Ghost_Declaration): New routine.
2651 (Is_Ghost_Pragma): New routine.
2652 (Is_Ghost_Procedure_Call): New routine.
2653 (Is_Ghost_Renaming): Removed.
2654 (Is_OK_Declaration): Reimplemented.
2655 (Is_OK_Pragma): Reimplemented.
2656 (Is_OK_Statement): Reimplemented.
2657 (Is_Subject_To_Ghost): Update the comment on usage.
2658 (Mark_And_Set_Ghost_Assignment): New routine.
2659 (Mark_And_Set_Ghost_Body): New routine.
2660 (Mark_And_Set_Ghost_Completion): New routine.
2661 (Mark_And_Set_Ghost_Declaration): New routine.
2662 (Mark_And_Set_Ghost_Instantiation): New routine.
2663 (Mark_And_Set_Ghost_Procedure_Call): New routine.
2664 (Mark_Full_View_As_Ghost): Removed.
2665 (Mark_Ghost_Declaration_Or_Body): New routine.
2666 (Mark_Ghost_Pragma): New routine.
2667 (Mark_Ghost_Renaming): New routine.
2668 (Mark_Pragma_As_Ghost): Removed.
2669 (Mark_Renaming_As_Ghost): Removed.
2670 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
2671 (Prune_Node): Freeze nodes no longer need special pruning, they
2672 are processed by the general ignored Ghost code mechanism.
2673 (Restore_Ghost_Mode): New routine.
2674 (Set_Ghost_Mode): Reimplemented.
2675 (Set_Ghost_Mode_From_Entity): Removed.
2676 * ghost.ads Add with and use clauses for Ghost.
2677 (Check_Ghost_Completion): Update the parameter profile
2678 along with the comment on usage.
2679 (Install_Ghost_Mode): New routine.
2680 (Is_Ghost_Assignment): New routine.
2681 (Is_Ghost_Declaration): New routine.
2682 (Is_Ghost_Pragma): New routine.
2683 (Is_Ghost_Procedure_Call): New routine.
2684 (Mark_And_Set_Ghost_Assignment): New routine.
2685 (Mark_And_Set_Ghost_Body): New routine.
2686 (Mark_And_Set_Ghost_Completion): New routine.
2687 (Mark_And_Set_Ghost_Declaration): New routine.
2688 (Mark_And_Set_Ghost_Instantiation): New routine.
2689 (Mark_And_Set_Ghost_Procedure_Call): New routine.
2690 (Mark_Full_View_As_Ghost): Removed.
2691 (Mark_Ghost_Pragma): New routine.
2692 (Mark_Ghost_Renaming): New routine.
2693 (Mark_Pragma_As_Ghost): Removed.
2694 (Mark_Renaming_As_Ghost): Removed.
2695 (Restore_Ghost_Mode): New routine.
2696 (Set_Ghost_Mode): Redefined.
2697 (Set_Ghost_Mode_From_Entity): Removed.
2698 * sem.adb (Analyze): Install and revert the Ghost region of the
2699 node being analyzed.
2700 (Do_Analyze): Change the way a clean Ghost
2701 region is installed and reverted.
2702 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
2703 all Ghost-related code.
2704 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
2705 (Analyze_Number_Declaration): Remove all Ghost-related code.
2706 (Analyze_Object_Declaration): Install and revert the Ghost region of
2707 a deferred object declaration's completion.
2708 (Array_Type_Declaration): Remove all Ghost-related code.
2709 (Build_Derived_Type): Update the comment on
2710 the propagation of Ghost attributes from a parent to a derived type.
2711 (Derive_Subprogram): Remove all Ghost-related code.
2712 (Make_Class_Wide_Type): Remove all Ghost-related code.
2713 (Make_Implicit_Base): Remove all Ghost-related code.
2714 (Process_Full_View): Install and revert the Ghost region of
2715 the partial view. There is no longer need to check the Ghost
2717 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
2718 region of the left hand side.
2719 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
2720 all Ghost-related code.
2721 (Analyze_Expression_Function): Remove all Ghost-related code.
2722 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
2723 (Analyze_Procedure_Call): Install and revert the Ghost region of
2724 the procedure being called.
2725 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
2726 region of the spec or body.
2727 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
2728 (Build_Subprogram_Declaration): Remove all Ghost-related code.
2729 (Find_Corresponding_Spec): Remove all Ghost-related code.
2730 (Process_Formals): Remove all Ghost-related code.
2731 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
2732 the Ghost region of the spec.
2733 (Analyze_Package_Declaration): Remove all Ghost-related code.
2734 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
2735 Ghost when it aliases a Ghost entity.
2736 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
2738 (Analyze_Object_Renaming): Mark a renaming as Ghost when
2739 it aliases a Ghost entity.
2740 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
2742 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
2743 aliases a Ghost entity.
2744 * sem_ch11.adb Remove with and use clauses for Ghost.
2745 (Analyze_Exception_Declaration): Remove all Ghost-related code.
2746 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
2748 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
2750 (Analyze_Package_Instantiation): Install and revert the Ghost region
2751 of the package instantiation.
2752 (Analyze_Subprogram_Instantiation): Install
2753 and revert the Ghost region of the subprogram instantiation.
2754 (Instantiate_Package_Body): Code clean up. Install and revert the
2755 Ghost region of the package body.
2756 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
2757 Ghost region of the subprogram body.
2758 * sem_ch13.adb (Build_Predicate_Functions): Install
2759 and revert the Ghost region of the related type.
2760 (Build_Predicate_Function_Declaration): Code clean up. Install
2761 and rever the Ghost region of the related type.
2762 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2763 Install and revert the Ghost region of the pragma.
2764 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
2765 Ghost region of the pragma.
2766 (Analyze_Pragma): Install and revert the Ghost region of various
2767 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
2768 or encloses a Ghost entity.
2769 (Analyze_Pre_Post_Condition): Install and revert the Ghost
2770 region of the pragma.
2771 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
2772 Ghost region of the pragma.
2773 * sem_res.adb (Resolve): Remove all Ghost-related code.
2774 * sem_util.adb (Is_Declaration): Reimplemented.
2775 (Is_Declaration_Other_Than_Renaming): New routine.
2776 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
2777 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
2778 (Is_Ghost_Pragma): Removed.
2779 (Is_Ignored_Ghost_Pragma): New routine.
2780 (Set_Is_Checked_Ghost_Pragma): New routine.
2781 (Set_Is_Ghost_Pragma): Removed.
2782 (Set_Is_Ignored_Ghost_Pragma): New routine.
2783 * sinfo.ads: Update the documentation on Ghost mode and
2784 Ghost regions. New attributes Is_Checked_Ghost_Pragma
2785 and Is_Ignored_Ghost_Pragma along with usages in nodes.
2786 Remove attribute Is_Ghost_Pragma along with usages in nodes.
2787 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
2788 (Is_Ghost_Pragma): Removed along with pragma Inline.
2789 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
2790 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
2791 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
2792 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
2794 2017-01-12 Tristan Gingold <gingold@adacore.com>
2796 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
2797 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
2799 2017-01-12 Yannick Moy <moy@adacore.com>
2801 * errout.adb, errout.ads (Initialize): Factor common treatment
2803 (Reset_Warnings): New procedure to reset counts related to warnings.
2804 (Record_Compilation_Errors): New variable to store the presence of an
2805 error, used in gnat2why to allow changing the Warning_Mode.
2806 (Compilation_Errors): Use new variable Record_Compilation_Errors to
2807 store the presence of an error.
2809 2017-01-12 Javier Miranda <miranda@adacore.com>
2811 * sem_ch13.adb (Analyze_Aspect_Specifications):
2812 For Interrupt_Handler and Attach_ Handler aspects, decorate the
2813 internally built reference to the protected procedure as coming
2814 from sources and force its analysis.
2816 2017-01-12 Ed Schonberg <schonberg@adacore.com>
2818 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
2819 inherit predicates if any from the first_subtype of the parent,
2820 not from the anonymous parent type.
2821 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
2822 predicate is not a static subtype.
2824 2017-01-12 Gary Dismukes <dismukes@adacore.com>
2826 * freeze.adb (Check_Suspicious_Convention): New procedure
2827 performing a warning check on discriminated record types with
2828 convention C or C++. Factored out of procedure Freeze_Record_Type,
2829 and changed to only apply to base types (to avoid spurious
2830 warnings on subtypes). Minor improvement of warning messages
2831 to refer to discriminated rather than variant record types.
2832 (Freeze_Record_Type): Remove code for performing a suspicious
2834 (Freeze_Entity): Only call Freeze_Record_Type
2835 on types that aren't declared within any enclosing generic units
2836 (rather than just excluding the type when the innermost scope
2837 is generic). Call Check_Suspicious_Convention whether or not
2838 the type is declared within a generic unit.
2839 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
2840 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
2843 2017-01-12 Tristan Gingold <gingold@adacore.com>
2845 * sysdep.c, adaint.c, rtinit.c, ming32.h:
2846 (__gnat_current_codepage): Renamed from CurrentCodePage
2847 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
2849 2017-01-12 Ed Schonberg <schonberg@adacore.com>
2851 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
2852 quantified expressions, following AI12-050: the loop parameters
2853 of two quantified expressions are conformant if they have the
2856 2017-01-12 Arnaud Charlet <charlet@adacore.com>
2858 * gcc-interface/Makefile.in: Clean up VxWorks targets.
2860 2017-01-12 Ed Schonberg <schonberg@adacore.com>
2862 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
2863 Hnadle properly the attribute reference when it appears as part
2864 of an expression in another loop aspect.
2866 2017-01-12 Ed Schonberg <schonberg@adacore.com>
2868 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
2869 subsidiary of Build_Initialization_Call, to complete generation
2870 of predicate checks on discriminants whose (sub)types have
2871 predicates, and to add checks on variants that do not have an
2873 * sem_util.adb (Gather_Components): A missing Others alternative is
2874 not an error when the type of the discriminant is a static predicate
2875 (and coverage has been checked when analyzing the case statement). A
2876 runtime check is generated to verify that a given discriminant
2877 satisfies the predicate (RM 3.8.1. (21.1/2)).
2879 2017-01-12 Yannick Moy <moy@adacore.com>
2881 * gnat1drv.adb (Adjust_Global_Switches): Only
2882 perform checking of exception mechanism when generating code.
2884 2017-01-12 Justin Squirek <squirek@adacore.com>
2886 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
2887 Remove handling of access component with invariant.
2888 (Build_Invariant_Procedure_Declaration): Remove return on class
2890 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
2891 conditional exception for component or array so Has_Own_Invariants
2892 flag is not falsly set.
2893 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
2894 wide type to have no invariant flags.
2896 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
2898 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
2899 sem_ch13.adb: Minor reformatting.
2901 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
2903 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
2904 adjustment primitive when the ancestor type was not properly frozen.
2905 (Gen_Assign): Guard against a missing initialization
2906 primitive when the component type was not properly frozen.
2907 (Initialize_Array_Component): Guard against a missing adjustment
2908 primitive when the component type was not properly frozen.
2909 (Initialize_Record_Component): Guard against a missing adjustment
2910 primitive when the component type was not properly frozen.
2911 (Process_Transient_Component_Completion): The transient object may
2912 not be finalized when its associated type was not properly frozen.
2913 * exp_ch3.adb (Build_Assignment): Guard against a missing
2914 adjustment primitive when the component type was not properly frozen.
2915 (Build_Initialization_Call): Guard against a missing
2916 initialization primitive when the associated type was not properly
2918 (Expand_N_Object_Declaration): Guard against a missing
2919 adjustment primitive when the base type was not properly frozen.
2920 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
2921 body when there is no adjustment primitive available. Create an
2922 empty Deep_Finalize body when there is no finalization primitive
2924 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
2925 missing finalization primitive when the designated type was
2926 not properly frozen.
2927 (Expand_N_Allocator): Guard against a missing initialization primitive
2928 when the designated type was not properly frozen.
2929 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
2930 only when the corresponding adjustment primitive is available.
2931 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
2932 adjustment/finalization statements only when there is an available
2933 primitive to carry out the action.
2934 (Build_Initialize_Statements): Generate the initialization/finalization
2935 statements only when there is an available primitive to carry out the
2937 (Make_Adjust_Call): Do not generate a call when the underlying
2938 type is not present due to a possible missing full view.
2939 (Make_Final_Call): Do not generate a call when the underlying
2940 type is not present due to a possible missing full view.
2941 (Make_Finalize_Address_Stmts): Generate an empty body when the
2942 designated type lacks a finalization primitive.
2943 (Make_Init_Call): Do not generate a call when the underlying type is
2944 not present due to a possible missing full view.
2945 (Process_Component_For_Adjust): Add the adjustment call only when the
2946 corresponding adjustment primitive is available.
2947 (Process_Component_For_Finalize): Add the finalization call only when
2948 the corresponding finalization primitive is available.
2949 (Process_Object_Declaration): Use a null statement to emulate a
2950 missing call to the finalization primitive of the object type.
2951 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
2952 (Make_Final_Call): Update the comment on usage.
2953 (Make_Init_Call): Update the comment on usage.
2954 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
2956 2017-01-12 Arnaud Charlet <charlet@adacore.com>
2958 * einfo.ads: Update documentation of Address_Taken.
2959 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
2960 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
2961 for subprograms when setting Address_Taken flag.
2963 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
2965 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
2966 Configurable_Run_Time_Mode off when analysing with'ed predefined
2969 2017-01-12 Gary Dismukes <dismukes@adacore.com>
2971 * sem_prag.adb: Minor reformatting.
2972 * sem_util.adb (Unique_Entity): fix result for
2973 bodies of entry families.
2975 2017-01-12 Justin Squirek <squirek@adacore.com>
2977 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
2978 Resolve_Suppressible in the pragma Assertion_Policy case.
2979 (Resolve_Suppressible): Created this function to factor out
2980 common code used to resolve Suppress to either Ignore or Check
2981 * snames.ads-tmpl: Add name for Suppressible.
2983 2017-01-12 Gary Dismukes <dismukes@adacore.com>
2985 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
2987 * debug.adb: Minor comment fixes.
2989 2017-01-12 Arnaud Charlet <charlet@adacore.com>
2991 * sem_util.adb (Unique_Entity): For concurrent
2992 bodies that are defined with stubs and complete a declaration
2993 of a single concurrent object return the entity of an implicit
2994 concurrent type, not the entity of the anonymous concurrent
2996 * debug.adb: -gnatd.J is no longer used.
2997 * make.adb (Globalize): Removed, no longer used.
2998 * sem_ch9.adb: minor typo in comment for entry index
3000 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
3002 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
3003 * exp_ch3.adb (Build_Init_Statements): As part of initialising
3004 the value record of a task, set its _Secondary_Stack_Size field
3006 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
3007 a _Secondary_Stack_Size field in the value record of
3008 the task if a Secondary_Stack_Size rep item is present.
3009 (Make_Task_Create_Call): Include secondary stack size
3010 parameter. If No_Secondary_Stack restriction is in place, passes
3012 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
3013 Secondary_Stack_Size.
3014 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
3015 function to define the overhead of the secondary stack.
3016 * s-tarest.adb (Create_Restricted_Task,
3017 Create_Restricted_Task_Sequential): Functions now include
3018 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
3019 * s-tarest.adb (Create_Restricted_Task,
3020 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
3021 include Secondary_Stack_Size parameter.
3022 (Task_Wrapper): Secondary stack now allocated to the size specified by
3023 the Secondary_Stack_Size parameter in the task's ATCB.
3024 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
3025 Secondary_Stack_Size component.
3026 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
3027 Create_Restricted_Task_Sequential): Function now include
3028 Secondary_Stack_Size parameter.
3029 (Task_Wrapper): Secondary stack now allocated to the size
3030 specified by the Secondary_Stack_Size parameter in the task's
3032 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
3033 to include Secondary_Stack_Size parameter.
3034 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
3035 Secondary_Stack_Size aspect, turning the aspect into its corresponding
3037 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
3038 * snames.adb-tmpl, snames.ads-tmpl: Added names
3039 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
3040 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
3042 2017-01-12 Yannick Moy <moy@adacore.com>
3044 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
3047 2017-01-12 Justin Squirek <squirek@adacore.com>
3049 * exp_attr.adb (Expand_N_Attribute_Reference):
3050 Fix Finalization_Size case by properly resolving the type after
3051 rewritting the node.
3053 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
3055 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
3057 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
3058 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
3059 exp_sel.ads: Minor reformatting.
3061 2017-01-12 Justin Squirek <squirek@adacore.com>
3063 * exp_ch6.adb (Expand_Call): Add guard to prevent
3064 invariant checks from being created for internally generated
3067 2017-01-12 Bob Duff <duff@adacore.com>
3069 * lib-writ.ads: Remove incorrect comment.
3071 2017-01-12 Javier Miranda <miranda@adacore.com>
3073 * debug.adb (-gnatd.K): Enable generation of contract-only
3074 procedures in CodePeer mode.
3075 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
3077 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
3079 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
3081 (Get_Contract_Only_Missing_Body_Name): New subprogram.
3082 (Get_Contract_Only_Body): New subprogram.
3083 (Set_Contract_Only_Body): New subprogram.
3084 (Is_Contract_Only_Body): New subprogram.
3085 (Set_Is_Contract_Only_Body): New subprogram.
3086 (SCIL_Nodes): Replace table by hash-table.
3088 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
3090 * exp_ch6.adb: Minor reformatting.
3091 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
3093 2017-01-12 Bob Duff <duff@adacore.com>
3095 * binde.adb (Forced): New reason for a dependence.
3096 (Force_Elab_Order): Implementation of the new switch.
3097 * binde.ads: Minor comment fixes.
3098 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
3099 long ago that is no longer supported; removed comment about that.
3100 * opt.ads (Force_Elab_Order_File): Name of file specified for
3102 * switch-b.adb: Parse -f switch.
3104 2017-01-12 Justin Squirek <squirek@adacore.com>
3106 * exp_ch6.adb (Check_View_Conversion): Created this function
3107 to properly chain calls to check type invariants that may be
3108 present in a subprogram call after the subprogram.
3109 (Expand_Call): Add a conditional to identify when a view conversion
3110 needs to be checked.
3111 * nlists.adb, nlists.ads (Prepend_New): New routine.
3112 (Prepend_New_To): New routine.
3114 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
3116 * sinfo.ads: Minor reformatting.
3118 2017-01-12 Gary Dismukes <dismukes@adacore.com>
3120 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
3123 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
3125 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
3126 variable Definite. Create a local object and pass its 'Access to the
3127 BIP function when the result type is either definite or it does not
3128 require any finalization or secondary stack management.
3130 2017-01-12 Bob Duff <duff@adacore.com>
3132 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
3133 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
3134 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
3135 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
3136 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
3137 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
3138 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
3139 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
3140 Change name to Pragma_Name_Unmapped.
3141 (Pragma_Name_Mapped): Change name to Pragma_Name.
3142 This is because the "mapped" version should be the usual case.
3144 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
3146 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
3147 Is_Default_Init_Cond_Procedure, and
3148 Has_Inherited_Default_Init_Cond. Add uses of flags
3149 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
3150 (Default_Init_Cond_Procedure): Removed.
3151 (DIC_Procedure): New routine.
3152 (Has_Default_Init_Cond): Removed.
3153 (Has_DIC): New routine.
3154 (Has_Inheritable_Invariants): The attribute applies to the base type.
3155 (Has_Inherited_Default_Init_Cond): Removed.
3156 (Has_Inherited_DIC): New routine.
3157 (Has_Inherited_Invariants): The attribute applies to the base type.
3158 (Has_Own_DIC): New routine.
3159 (Has_Own_Invariants): The attribute applies to the base type.
3160 (Is_Default_Init_Cond_Procedure): Removed.
3161 (Is_DIC_Procedure): New routine.
3162 (Set_Default_Init_Cond_Procedure): Removed.
3163 (Set_DIC_Procedure): New routine.
3164 (Set_Has_Default_Init_Cond): Removed.
3165 (Set_Has_Inheritable_Invariants): The attribute applies
3167 (Set_Has_Inherited_Default_Init_Cond): Removed.
3168 (Set_Has_Inherited_DIC): New routine.
3169 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
3170 (Set_Has_Own_DIC): New routine.
3171 (Set_Has_Own_Invariants): The attribute applies to the base type.
3172 (Set_Is_Default_Init_Cond_Procedure): Removed.
3173 (Set_Is_DIC_Procedure): New routine.
3174 (Write_Entity_Flags): Update the output of all flags related to
3175 default initial condition.
3176 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
3177 of the call to the DIC procedure.
3178 (Freeze_Type): Generate the body of the DIC procedure.
3179 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
3180 all occurrences of Create_Append with Append_New_To. Do
3181 not generate an invariant procedure for a class-wide type.
3182 The generated body acts as a freeze action of the working type.
3183 (Build_Invariant_Procedure_Declaration): Do not generate an
3184 invariant procedure for a class-wide type.
3185 (Create_Append): Removed.
3186 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
3187 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
3188 class-wide pre/postcondition description and data structures from
3190 (Build_Class_Wide_Expression): Moved from Sem_Prag.
3191 (Build_DIC_Call): New routine.
3192 (Build_DIC_Procedure_Body): New routine.
3193 (Build_DIC_Procedure_Declaration): New routine.
3194 (Entity_Hash): Moved from Sem_Prag.
3195 (Find_DIC_Type): New routine.
3196 (Update_Primitives_Mapping): Reimplemented.
3197 (Update_Primitives_Mapping_Of_Types): New routine.
3198 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
3199 (Build_DIC_Call): New routine.
3200 (Build_DIC_Procedure_Body): New routine.
3201 (Build_DIC_Procedure_Declaration): New routine.
3202 (Update_Primitives_Mapping): Moved from Sem_Prag.
3203 (Update_Primitives_Mapping_Of_Types): New routine.
3204 * nlists.adb (Append_New): New routine.
3205 (Append_New_To): New routine.
3206 * nlists.ads (Append_New): New routine.
3207 (Append_New_To): New routine.
3208 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
3209 of DIC procedures here. This is now done at the end of the
3210 visible declarations, private declarations, and at the freeze
3212 (Analyze_Private_Extension_Declaration):
3213 A private extension inherits the DIC pragma of a parent type.
3214 (Analyze_Subtype_Declaration): No need to propagate invariant
3215 attributes to a subtype as those apply to the base type.
3216 (Build_Derived_Record_Type): No need to inherit invariants here
3217 as this is now done in Build_Derived_Type.
3218 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
3220 (Process_Full_View): Update the propagation of DIC attributes.
3221 (Propagate_Default_Init_Cond_Attributes): Removed.
3222 * sem_ch7.adb Add with and use clauses for Exp_Util.
3223 (Analyze_Package_Specification): Create the body of the DIC
3224 procedure at the end of the visible and private declarations.
3225 (Preserve_Full_Attributes): Propagate DIC attributes.
3226 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
3228 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
3229 * sem_elab.adb (Check_A_Call): Update the call to
3230 Is_Nontrivial_Default_Init_Cond_Procedure.
3231 * sem_prag.adb Remove the with and use clauses for
3232 GNAT.HTable. Move the handling of class- wide pre/postcondition
3233 description and data structures to Exp_Util.
3234 (Analyze_Pragma): Create the declaration of the DIC procedure. There
3235 is no need to propagate invariant-related attributes at this point
3236 as this is done in Build_Invariant_Procedure_Declaration.
3237 (Build_Class_Wide_Expression): Moved to Exp_Util.
3238 (Entity_Hash): Moved to Exp_Util.
3239 (Update_Primitives_Mapping): Moved to Exp_Util.
3240 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
3241 (Update_Primitives_Mapping): Moved to Exp_Util.
3242 * sem_util.adb: Remove with and use clauses for Ghost
3244 (Build_Default_Init_Cond_Call): Removed.
3245 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
3246 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
3247 (Get_Views): Reimplemented.
3248 (Has_Full_Default_Initialization): Reimplement the section on DIC.
3249 (Inherit_Default_Init_Cond_Procedure): Removed.
3250 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
3251 (Is_Nontrivial_DIC_Procedure): New routine.
3252 (Is_Verifiable_DIC_Pragma): New routine.
3253 (Propagate_DIC_Attributes): New routine.
3254 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
3255 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
3256 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
3257 (Inherit_Default_Init_Cond_Procedure): Removed.
3258 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
3259 (Is_Nontrivial_DIC_Procedure): New routine.
3260 (Is_Verifiable_DIC_Pragma): New routine.
3261 (Propagate_DIC_Attributes): New routine.
3262 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
3264 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
3266 (Expression_Copy): New routine along with pragma Inline.
3267 (Set_Expression_Copy): New routine along with pragma Inline.
3269 2017-01-06 Bob Duff <duff@adacore.com>
3271 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
3272 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
3273 we won't generate the call to s_stalib_adafinal when the main
3274 is not written in Ada.
3276 2017-01-06 Bob Duff <duff@adacore.com>
3278 * sem_prag.adb: Minor: remove pragma Warnings.
3280 2017-01-06 Tristan Gingold <gingold@adacore.com>
3282 * Makefile.rtl: Do not compile s-stchop by default.
3284 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
3286 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
3287 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
3288 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
3289 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
3290 Reverted previous change for now.
3292 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3294 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
3295 check to default discriminant value if checks are enabled.
3296 (Build_Assignment): If type of component has static predicate,
3297 apply check to its default value, if any.
3299 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
3301 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
3302 * exp_ch3.adb (Build_Init_Statements): As part of initialising
3303 the value record of a task, set its _Secondary_Stack_Size field
3305 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
3306 a _Secondary_Stack_Size field in the value record of
3307 the task if a Secondary_Stack_Size rep item is present.
3308 (Make_Task_Create_Call): Include secondary stack size
3309 parameter. If No_Secondary_Stack restriction is in place, passes
3311 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
3312 Secondary_Stack_Size.
3313 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
3314 function to define the overhead of the secondary stack.
3315 * s-tarest.adb (Create_Restricted_Task,
3316 Create_Restricted_Task_Sequential): Functions now include
3317 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
3318 * s-tarest.adb (Create_Restricted_Task,
3319 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
3320 now include Secondary_Stack_Size parameter.
3322 Secondary stack now allocated to the size specified by the
3323 Secondary_Stack_Size parameter in the task's ATCB.
3324 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
3325 Secondary_Stack_Size component.
3326 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
3327 Create_Restricted_Task_Sequential): Function now include
3328 Secondary_Stack_Size parameter.
3329 (Task_Wrapper): Secondary stack
3330 now allocated to the size specified by the Secondary_Stack_Size
3331 parameter in the task's ATCB.
3332 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
3333 for Secondary_Stack_Size aspect, turning the aspect into its
3334 corresponding internal attribute.
3335 (Analyze_Attribute_Definition):
3336 Process Secondary_Stack_Size attribute.
3337 * snames.adb-tmpl, snames.ads-tmpl: Added names
3338 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
3339 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
3341 2017-01-06 Pascal Obry <obry@adacore.com>
3343 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
3344 Sequential_IO and Direct_IO.
3346 2017-01-06 Bob Duff <duff@adacore.com>
3348 * snames.ads-tmpl (Renamed): New name for the pragma argument.
3349 * par-ch2.adb: Allow the new pragma (with analysis deferred
3351 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
3352 Keep a mapping from new pragma names to old names.
3353 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
3354 implement it by calling Map_Pragma_Name.
3355 * checks.adb, contracts.adb, einfo.adb, errout.adb,
3356 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
3357 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
3358 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
3359 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
3360 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
3361 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
3364 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3366 * exp_ch9.adb: Minor reformatting.
3368 2017-01-06 Tristan Gingold <gingold@adacore.com>
3370 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
3371 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
3372 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
3374 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
3375 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
3376 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
3377 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
3379 2017-01-06 Bob Duff <duff@adacore.com>
3381 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
3382 dummy implementation of Map_Pragma_Name.
3384 2017-01-06 Tristan Gingold <gingold@adacore.com>
3386 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
3387 entry_body variable constant.
3388 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
3389 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
3391 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
3392 now access to constant.
3394 2017-01-06 Gary Dismukes <dismukes@adacore.com>
3396 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
3397 reformatting and typo fixes.
3399 2017-01-06 Bob Duff <duff@adacore.com>
3401 * snames.ads-tmpl: New names for pragma renaming.
3402 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
3403 * par-prag.adb: Add new pragma name to case statement.
3404 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
3406 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
3407 Dummy implementation of Pragma_Name_Mapped.
3409 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3411 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
3412 better detect call within an entry_wrapper.
3413 * sem_res.adb (Resolve_Call): A protected call within an
3414 entity_wrapper is analyzed in the context of the protected
3415 object but corresponds to a pre-analysis and is not an access
3417 * sem_attr.adb: Minor reformatting.
3419 2017-01-06 Justin Squirek <squirek@adacore.com>
3421 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
3422 Finalization_Size to allow a prefix of any non-class-wide type.
3423 * sem_attr.ads Modify comment for Finalization_Size to include
3424 definite type use case.
3426 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3428 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
3429 on procedures that are wrappers created for entries that have
3431 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
3432 body is an entry_wrapper, compile it in the context of the
3433 synchronized type, because a precondition may refer to funtions
3435 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
3437 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
3438 within an Entry_Wrapper this is an external call whose target
3439 is the synchronized object that is the actual in the call to
3442 2017-01-06 Yannick Moy <moy@adacore.com>
3444 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
3445 in tree, which means not analyzing the previous prefix if the node has
3446 been rewritten into its prefix.
3448 2017-01-06 Gary Dismukes <dismukes@adacore.com>
3450 * s-tpobop.adb: Minor reformatting.
3452 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3454 * checks.adb (Ensure_Valid): Do not generate a validity check
3455 within a generated predicate function, validity checks will have
3456 been applied earlier when required.
3458 2017-01-06 Tristan Gingold <gingold@adacore.com>
3460 * s-tpoben.ads (Protection_Entries): Add comment and reorder
3461 components for performances.
3462 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
3465 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3467 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
3468 If expression is compile-time known and obeys a static predicate
3469 it must be labelled as static, to prevent spurious warnings and
3470 run-time errors, e.g. in case statements. This is relevant when
3471 the expression is the result of constant-folding a type conversion
3472 whose expression is a variable with a known static value.
3474 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3476 * exp_attr.adb, sem_attr.ads: Minor reformatting.
3478 2017-01-06 Justin Squirek <squirek@adacore.com>
3480 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
3481 expansion of Finalization_Size attribute.
3482 * sem_attr.adb (Analyze_Attribute): Add entry to check the
3483 semantics of Finalization_Size.
3484 (Eval_Attribute): Add null entry for Finalization_Size.
3485 * sem_attr.ads: Add Finalization_Size to the implementation
3486 dependent attribute list.
3487 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
3489 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3491 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
3492 iterator specification with a serious syntactic error, transform
3493 construct into an infinite loop in order to continue analysis
3494 and prevent a compiler abort.
3496 2017-01-06 Tristan Gingold <gingold@adacore.com>
3498 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
3499 max_queue_lengths_array if unused.
3501 2017-01-06 Bob Duff <duff@adacore.com>
3503 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
3504 array access, in case "\" is at the end of Text.
3505 * stylesw.adb (Set_Style_Check_Options): Don't include input
3506 characters in the error message template, because they could
3507 be control characters such as "\", which Errout will try to
3510 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3512 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
3513 For a private type examine the visible declarations that follow
3514 the partial view, not just the private declarations that follow
3517 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3519 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
3522 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3524 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
3525 alias of the inherited op is the parent iterator, no need to
3526 examine dispatch table positions which might not be established
3527 yet if type is not frozen.
3528 * sem_disp.adb (Check_Controlling_Formals): The formal of a
3529 predicate function may be a subtype of a tagged type.
3530 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
3531 of representation items for the completion of a type extension
3532 where a predicate applies to the partial view.
3533 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
3534 parameter that designates function whose actual receives a
3535 predicate check, to improve warning message when the check will
3536 lead to infinite recursion.
3537 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
3538 Apply_Predicate_Check.
3540 2017-01-06 Tristan Gingold <gingold@adacore.com>
3542 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
3543 Gnat_Extended_Ravenscar.
3544 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
3546 2017-01-06 Gary Dismukes <dismukes@adacore.com>
3548 * sem_util.ads: Minor typo fix and reformatting.
3550 2017-01-06 Yannick Moy <moy@adacore.com>
3552 * ghost.adb Minor fixing of references to SPARK RM.
3553 (Check_Ghost_Context): Check whether reference is to a lvalue
3554 before issuing an error about violation of SPARK RM 6.9(13)
3555 when declaration has Ghost policy Check and reference has Ghost
3557 * sem_util.adb Minor indentation.
3558 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
3559 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
3560 * sem_util.ads (Unique_Defining_Entity): Document the result
3561 for package body stubs.
3563 2017-01-06 Tristan Gingold <gingold@adacore.com>
3565 * raise-gcc.c (abort): Macro to call Abort_Propagation.
3566 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
3568 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
3569 Do not generate the Entry_Max_Queue_Lengths_Array if all default
3571 * exp_util.adb (Corresponding_Runtime_Package): Consider
3572 Max_Queue_Length pragma.
3574 2017-01-06 Justin Squirek <squirek@adacore.com>
3576 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
3577 Remove declaration generation in the case of
3578 System_Tasking_Protected_Objects_Single_Entry being used,
3579 and add a warning message when this is detected to occur.
3580 (Make_Initialize_Protection): Remove reference pass in the case
3581 of System_Tasking_Protected_Objects_Single_Entry.
3582 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
3583 * s-tposen.adb (Initialize_Protection_Entry): Remove
3584 Entry_Queue_Max parameter.
3585 * s-tposen.ads: Remove the types use to store the entry queue
3587 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
3589 2017-01-06 Yannick Moy <moy@adacore.com>
3591 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
3592 behavior of function, to also accept out of range positions
3593 and raise Constraint_Error in such case, and to copy sloc from
3594 literal if No_Location passed as location.
3595 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
3596 of functions to raise Constraint_Error in case of value not in
3599 2017-01-06 Tristan Gingold <gingold@adacore.com>
3601 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
3602 Invalidate_Stack_Cache.
3604 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
3606 * s-os_lib.adb: Minor fix to the signature of Readlink.
3608 2017-01-06 Javier Miranda <miranda@adacore.com>
3610 * sem_ch6.adb (Conforming_Types): Handle another
3611 confusion between views in a nested instance with an actual
3612 private type whose full view is not in scope.
3614 2017-01-06 Arnaud Charlet <charlet@adacore.com>
3616 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
3617 mark a rewritten if statement as explicit (Comes_From_Source).
3619 2017-01-06 Gary Dismukes <dismukes@adacore.com>
3621 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
3623 2017-01-06 Tristan Gingold <gingold@adacore.com>
3625 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
3627 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3629 * sem_case.adb: Minor reformatting.
3631 2017-01-06 Thomas Quinot <quinot@adacore.com>
3633 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
3635 2017-01-06 Justin Squirek <squirek@adacore.com>
3637 * aspects.adb: Register aspect in Canonical_Aspect.
3638 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
3639 into respective tables.
3640 * einfo.ads, einfo.adb: Add a new attribute for
3641 handling the parameters for Pragma_Max_Entry_Queue
3642 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
3643 for accessing and setting were added as well.
3644 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
3645 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
3646 declaration for pramga arguments and store them in the protected
3648 (Make_Initialize_Protection): Pass a reference to
3649 the Entry_Max_Queue_Lengths_Array in the protected type node to
3651 * rtsfind.adb: Minor grammar fix.
3652 * rtsfind.ads: Register new types taken from the
3653 runtime libraries RE_Protected_Entry_Queue_Max and
3654 RE_Protected_Entry_Queue_Max_Array
3655 * s-tposen.adb, s-tpoben.adb
3656 (Initialize_Protection_Entry/Initialize_Protection_Entries):
3657 Add extra parameter and add assignment to local object.
3658 * s-tposen.ads, s-tpoben.ads: Add new types to
3659 store entry queue maximums and a field to the entry object record.
3660 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
3661 for Aspect_Max_Queue_Length.
3662 (Check_Aspect_At_Freeze_Point):
3663 Add aspect to list of aspects that don't require delayed analysis.
3664 * sem_prag.adb (Analyze_Pragma): Add case statement for
3665 Pragma_Max_Queue_Length, check semantics, and register arugments
3666 in the respective entry nodes.
3667 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
3668 and Has_Max_Queue_Length
3669 * snames.ads-tmpl: Add constant for the new aspect-name
3670 Name_Max_Queue_Length and corrasponding pragma.
3672 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3674 * exp_util.adb (Is_Controlled_Function_Call):
3675 Reimplemented. Consider any node which has an entity as the
3676 function call may appear in various ways.
3678 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3680 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
3681 an unchecked type conversion when performing a view conversion
3682 to/from a private type. In all other cases use a regular type
3683 conversion to ensure that any relevant checks are properly
3686 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3688 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
3690 2017-01-06 Ed Schonberg <schonberg@adacore.com>
3692 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
3693 error on case expression that is an entity, when coverage is
3694 incomplete and entity has a static value obtained by local
3696 (Handle_Static_Predicate): New procedure, subsidiary of
3697 Check_Choices, to handle case alternatives that are either
3698 subtype names or subtype indications involving subtypes that
3699 have static predicates.
3701 2017-01-06 Thomas Quinot <quinot@adacore.com>
3703 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
3704 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
3706 2017-01-06 Bob Duff <duff@adacore.com>
3708 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
3709 Elaborate_All(P) to P itself. That could happen in obscure cases,
3710 and always introduced a cycle (P body must be elaborated before
3712 * lib-writ.ads: Comment clarification.
3713 * ali-util.ads: Minor comment fix.
3714 * ali.adb: Minor reformatting.
3716 2017-01-06 Tristan Gingold <gingold@adacore.com>
3718 * a-exexpr-gcc.adb: Improve comment.
3720 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
3722 * s-linux-mips.ads: Use correct signal and errno constants.
3723 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
3725 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
3727 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
3728 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
3731 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
3733 * gnatvsn.ads: Bump copyright year.
3735 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3737 * gnat_ugn.texi: Bump @copying's copyright year.
3738 * gnat_rm.texi: Likewise.
3740 Copyright (C) 2017 Free Software Foundation, Inc.
3742 Copying and distribution of this file, with or without modification,
3743 are permitted in any medium without royalty provided the copyright
3744 notice and this notice are preserved.