[multiple changes]
[gcc.git] / gcc / ada / ChangeLog
1 2017-09-08 Javier Miranda <miranda@adacore.com>
2
3 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
4 divisions with fixed point results to avoid generating twice
5 the runtime check on divide by zero.
6 * checks.adb (Apply_Divide_Checks): Ensure that operands are
7 not evaluated twice (once for their runtime checks and once for
8 their regular computation).
9
10 2017-09-08 Yannick Moy <moy@adacore.com>
11
12 * sem_prag.adb (Analyze_Part_Of): Add missing
13 return statements after issuing errors. Add detection of
14 out-of-order item and single concurrent type.
15
16 2017-09-08 Nicolas Roche <roche@adacore.com>
17
18 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
19 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
20 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
21 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
22 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
23 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
24 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
25 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
26 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
27 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
28 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
29 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
30 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
31 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
32 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
33 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
34 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
35 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
36 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
37 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
38 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
39 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
40 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
41 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
42 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
43 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
44 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
45 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
46 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
47 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
48 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
49 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
50 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
51 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
52 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
53 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
54 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
55 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
56 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
57 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
58 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
59 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
60 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
61 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
62 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
63 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
64 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
65 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
66 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
67 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
68 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
69 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
70 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
71 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
72
73 2017-09-08 Arnaud Charlet <charlet@adacore.com>
74
75 * doc/share/conf.py, doc/share/latex_elements.py,
76 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
77 highlighting.
78
79 2017-09-08 Arnaud Charlet <charlet@adacore.com>
80
81 * gnat_rm.texi, gnat_ugn.texi,
82 doc/gnat_ugn/the_gnat_compilation_model.rst,
83 doc/gnat_ugn/getting_started_with_gnat.rst,
84 doc/gnat_ugn/inline_assembler.rst,
85 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
86 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
87 doc/gnat_ugn/about_this_guide.rst,
88 doc/gnat_ugn/platform_specific_information.rst,
89 doc/gnat_ugn/example_of_binder_output.rst,
90 doc/gnat_ugn/gnat_and_program_execution.rst,
91 doc/gnat_ugn/gnat_utility_programs.rst,
92 doc/gnat_rm/implementation_of_specific_ada_features.rst,
93 doc/gnat_rm/interfacing_to_other_languages.rst,
94 doc/gnat_rm/implementation_defined_aspects.rst,
95 doc/gnat_rm/intrinsic_subprograms.rst,
96 doc/gnat_rm/implementation_defined_characteristics.rst,
97 doc/gnat_rm/implementation_advice.rst,
98 doc/gnat_rm/implementation_defined_attributes.rst,
99 doc/gnat_rm/compatibility_and_porting_guide.rst,
100 doc/gnat_rm/standard_library_routines.rst,
101 doc/gnat_rm/the_gnat_library.rst,
102 doc/gnat_rm/implementation_defined_pragmas.rst,
103 doc/gnat_rm/representation_clauses_and_pragmas.rst,
104 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
105 doc/gnat_rm/obsolescent_features.rst,
106 doc/gnat_rm/about_this_guide.rst,
107 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
108 doc/gnat_rm/implementation_of_ada_2012_features.rst,
109 doc/gnat_ugn.rst,
110 doc/gnat_rm.rst: Update documentation.
111
112 2017-09-08 Arnaud Charlet <charlet@adacore.com>
113
114 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
115 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
116 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
117
118 2017-09-08 Bob Duff <duff@adacore.com>
119
120 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
121 New routine to read the Tag robustly.
122 * exp_attr.adb (Input): Change the expansion of 'Input,
123 in the class-wide case, to call String_Input_Tag instead of
124 String_Input_Blk_IO.
125
126 2017-09-08 Arnaud Charlet <charlet@adacore.com>
127
128 * s-rident.ads (Restriction_Id): reorder enum
129 literals, so that Pure_Barriers is no longer in range of the
130 Cunit_Boolean_Restrictions subtype.
131
132 2017-09-08 Nicolas Roche <roche@adacore.com>
133
134 * a-taster.ads, a-taster.adb: Move to libgnarl
135 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
136 Add support for files in libgnarl.
137
138 2017-09-08 Ed Schonberg <schonberg@adacore.com>
139
140 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
141 accessibility check to an interface conversion, whose purpose
142 is to perform a pointer adjustment in a dispatching call.
143 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
144 when the actual is a construct that involves a dereference of an
145 expression that includes a formal of the enclosing subprogram,
146 In such cases, the accessibility level of the actual is that of
147 the corresponding formal, which is passed in as an additional
148 actual in the outer call.
149
150 2017-09-08 Bob Duff <duff@adacore.com>
151
152 * exp_intr.adb (Add_Source_Info): Do not decode
153 file names; they were not encoded in the first place.
154
155 2017-09-08 Bob Duff <duff@adacore.com>
156
157 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
158 exceptions instead of crashes. Check for absurdly long strings
159 and empty strings. Empty strings cause trouble because they can
160 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
161 be empty, which causes an array index out of bounds.
162 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
163 instead of crashes.
164
165 2017-09-08 Arnaud Charlet <charlet@adacore.com>
166
167 * sem_util.adb (Is_CCT_Instance): allow use in
168 the context of protected types.
169
170 2017-09-08 Arnaud Charlet <charlet@adacore.com>
171
172 * a-tigeli.adb: minor remove extra whitespace.
173
174 2017-09-08 Gary Dismukes <dismukes@adacore.com>
175
176 * par-ch4.adb: Reformatting of an error message.
177
178 2017-09-08 Javier Miranda <miranda@adacore.com>
179
180 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
181 identifiers to ensure their correct decoration of names on
182 aspect expressions.
183
184 2017-09-08 Yannick Moy <moy@adacore.com>
185
186 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
187 not skip a loop coming from source which is rewritten into a loop.
188
189 2017-09-08 Ed Schonberg <schonberg@adacore.com>
190
191 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
192 wrapper has convention Ada, to prevent spurious warnings on
193 unconstrained array parameters.
194
195 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
196
197 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
198 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
199
200 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
201
202 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
203
204 2017-09-08 Arnaud Charlet <charlet@adacore.com>
205
206 * exp_intr.adb (Append_Entity_Name): Move to ...
207 * sem_util.ads, sem_util.adb: ... here to share it.
208 (Subprogram_Name): New subprogram, to compute the name of the enclosing
209 subprogram/entity.
210 * errutil.adb (Error_Msg): Fill new field Node.
211 * erroutc.ads (Subprogram_Name_Ptr): New.
212 (Error_Msg_Object): New field Node.
213 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
214 * errout.adb (Error_Msg): New variant with node id parameter.
215 Fill new parameter Node when emitting messages. Revert previous
216 changes for Include_Subprogram_In_Messages.
217 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
218 generating warning message.
219
220 2017-09-08 Ed Schonberg <schonberg@adacore.com>
221
222 * par-ch4.adb (P_Iterated_Component_Association): Place construct
223 under -gnat2020 flag, given that it is a future feature of
224 the language.
225 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
226 defining identifier as referenced to prevent spurious warnings:
227 corresponding loop is expanded into one or more loops whose
228 variable has the same name, and the expression uses those names
229 and not the original one.
230
231 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
232
233 * sem_elab.adb (Check_A_Call): Do not consider
234 references to internal variables for SPARK semantics.
235
236 2017-09-08 Arnaud Charlet <charlet@adacore.com>
237
238 * inline.adb (In_Package_Spec): refine type of
239 the parameter from Node_Id to Entity_Id.
240
241 2017-09-08 Justin Squirek <squirek@adacore.com>
242
243 * exp_ch5.adb (Expand_Formal_Container_Loop):
244 Reset the scope of the loop parameter after it is reanalyzed.
245
246 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
247
248 * sem_util.ads (Set_Rep_Info): New inline procedure.
249 * sem_util.adb (Set_Rep_Info): Implement it.
250 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
251 always copy the representation aspects onto the subtype.
252
253 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
254
255 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
256 Correction of the return type from access type to option type.
257 (Simple_HTable): Moving the Instance_Data to ads file.
258
259 2017-09-08 Yannick Moy <moy@adacore.com>
260
261 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
262
263 2017-09-08 Arnaud Charlet <charlet@adacore.com>
264
265 * opt.ads (Include_Subprogram_In_Messages): New variable.
266 * errout.ads (Current_Subprogram_Ptr): New variable.
267 * errout.adb (Error_Msg): Prepend current subprogram info
268 in messages if Include_Subprogram_In_Messages is set.
269 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
270 Current_Subprogram.
271 * gnat1drv.adb (Adjust_Global_Switches): Set
272 Include_Subprogram_In_Messages when -gnatdJ is set.
273 * debug.adb: Document and reserve -gnatdJ.
274
275 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
276
277 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
278 functions to iterate over simple hastables.
279 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
280
281 2017-09-08 Javier Miranda <miranda@adacore.com>
282
283 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
284 missing checks on the presence of Entity() before checking the
285 entity attributes.
286
287 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
288
289 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
290 statements, use local variable and remove unnecessary processing.
291
292 2017-09-08 Javier Miranda <miranda@adacore.com>
293
294 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
295 subprogram.
296 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
297 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
298 subprogram.
299 (Unqual_BIP_Iface_Function_Call): New subprogram.
300 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
301 subprogram containing code that was previously inside
302 Make_Build_In_Place_Call_In_Object_Declaration since it is also
303 required for one of the new subprograms.
304 (Expand_Actuals):
305 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
306 (Expand_N_Extended_Return_Statement): Extend the
307 cases covered by an assertion on expected BIP object
308 declarations.
309 (Make_Build_In_Place_Call_In_Assignment):
310 Removing unused code; found working on this ticket.
311 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
312 that replaces the internal name of the renaming declaration
313 into the new subprogram Replace_Renaming_Declaration_Id.
314 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
315 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
316 New subprogram.
317 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
318 subprogram.
319 (Unqual_BIP_Iface_Function_Call): New subprogram.
320 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
321 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
322 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
323 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
324 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
325 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
326 (Expand_N_Indexed_Component): Invoke the new subprogram
327 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
328 (Expand_N_Selected_Component): Invoke the new subprogram
329 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
330 (Expand_N_Slice): Invoke the new subprogram
331 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
332 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
333 Invoke the new subprogram
334 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
335
336 2017-09-08 Javier Miranda <miranda@adacore.com>
337
338 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
339 access to interface types. Remove also the accessibility check.
340
341 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
342
343 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
344 all the types that are referenced by the expression.
345 (Analyze_Expression_Function): Call Freeze_Expr_Types for
346 a completion instead of manually freezing the type of the
347 expression.
348 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
349
350 2017-09-08 Ed Schonberg <schonberg@adacore.com>
351
352 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
353 New procedure, auxiliary to Expand_Pragma_Check, to handle
354 references to the discriminants of a protected type within a
355 precondition of a protected operation. This is needed because
356 the original precondition has been analyzed in the context of
357 the protected declaration, but in the body of the operation
358 references to the discriminants have been replaved by references
359 to the discriminants of the target object, and these references
360 are only created when expanding the protected body.
361
362 2017-09-08 Yannick Moy <moy@adacore.com>
363
364 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
365 Loop_Variant.
366
367 2017-09-08 Ed Schonberg <schonberg@adacore.com>
368
369 * exp_attr.adb (Build_Record_VS_Func): If the record is an
370 unchecked union, do not emit checks for its (non-existent)
371 discriminants, or for variant parts that depend on them.
372
373 2017-09-08 Justin Squirek <squirek@adacore.com>
374
375 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
376 Find_Comparison_Type.Try_One_Interp): Add check for generic
377 instances.
378
379 2017-09-08 Arnaud Charlet <charlet@adacore.com>
380
381 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
382 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
383 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
384 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
385 remaining references to AAMP_On_Target.
386
387 2017-09-08 Ed Schonberg <schonberg@adacore.com>
388
389 * style.adb: Fix typo.
390
391 2017-09-08 Javier Miranda <miranda@adacore.com>
392
393 * einfo.adb (Underlying_Type): Add missing support for class-wide
394 types that come from the limited view.
395 * exp_attr.adb (Attribute_Address): Check class-wide type
396 interfaces using the underlying type to handle limited-withed
397 types.
398 (Attribute_Tag): Check class-wide type interfaces using
399 the underlying type to handle limited-withed types.
400
401 2017-09-08 Ed Schonberg <schonberg@adacore.com>
402
403 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
404 over a subtype of a type with a static predicate, taking into
405 account the predicate function of the parent type and the bounds
406 given in the loop specification.
407 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
408 a loop specification that is a subtype indication whose type mark
409 is a type with a static predicate, inherit predicate function,
410 used to build case statement for rewritten loop.
411
412 2017-09-08 Justin Squirek <squirek@adacore.com>
413
414 * lib-load.adb: Modify printing of error message to exclude file
415 line number.
416
417 2017-09-08 Arnaud Charlet <charlet@adacore.com>
418
419 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
420 don't inline subprograms declared in both visible and private
421 parts of a package.
422 (In_Package_Spec): previously In_Package_Visible_Spec; now
423 detects subprograms declared both in visible and private parts
424 of a package spec.
425
426 2017-09-08 Ed Schonberg <schonberg@adacore.com>
427
428 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
429 the type is an anonymous array in an object declaration, whose
430 component type has an invariant, use the object declaration
431 as the insertion point for the invariant procedure, given that
432 there is no explicit type declaration for an anonymous array type.
433
434 2017-09-08 Bob Duff <duff@adacore.com>
435
436 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
437
438 2017-09-08 Bob Duff <duff@adacore.com>
439
440 * a-strfix.adb (Trim): Compute Low and High only if needed.
441
442 2017-09-08 Justin Squirek <squirek@adacore.com>
443
444 * lib-load.adb (Load_Main_Source): Add error output in the case a
445 source file is missing.
446
447 2017-09-08 Bob Duff <duff@adacore.com>
448
449 PR ada/80888
450 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
451 Default_WCEM by default (i.e. if the encoding is not specified
452 by the Form string).
453
454 2017-09-08 Bob Duff <duff@adacore.com>
455
456 * s-trasym.ads (Hexa_Traceback): If
457 Suppress_Hex is True, print "..." instead of a hexadecimal
458 address.
459 * s-trasym.adb: Ignore No_Hex in this version.
460 Misc cleanup.
461
462 2017-09-08 Bob Duff <duff@adacore.com>
463
464 * debug.adb: Minor reformatting.
465
466 2017-09-08 Bob Duff <duff@adacore.com>
467
468 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
469 code so it doesn't trigger an "uninit var" warning.
470
471 2017-09-08 Nicolas Roche <roche@adacore.com>
472
473 * s-hibaen.ads: Remove obsolete file.
474
475 2017-09-08 Arnaud Charlet <charlet@adacore.com>
476
477 * a-locale.ads: Add comment explaining the state of this package.
478
479 2017-09-08 Arnaud Charlet <charlet@adacore.com>
480
481 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
482 of packages.
483 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
484 allow calls in the context of package spec (for pragma
485 Initializes) and bodies (for pragma Refined_State).
486
487 2017-09-08 Bob Duff <duff@adacore.com>
488
489 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
490 new Exp.
491
492 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
493
494 * debug.adb (dA): Adjust comment.
495 * gnat1drv.adb (Gnat1drv): Likewise.
496 * opt.ads (List_Representation_Info_Extended): New variable.
497 * repinfo.adb (List_Record_Info): Split implementation into...
498 (Compute_Max_Length): ...this. Recurse on records if requested.
499 (List_Record_Layout): Likewise.
500 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
501 statement, accept '0' and set List_Representation_Info_Extended
502 on 'e'.
503 * usage.adb (Usage): Document new -gnatRe variant.
504
505 2017-09-08 Ed Schonberg <schonberg@adacore.com>
506
507 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
508 Do not save the given entity in the global variable Default_Pool
509 if the pragma appears within a generic unit.
510
511 2017-09-08 Bob Duff <duff@adacore.com>
512
513 * errout.adb (Delete_Warning): Do not
514 decrement Warnings_Treated_As_Errors. This is called before
515 Warnings_Treated_As_Errors has been incremented to account for
516 this warning. Decrementing it here can lead to negative values
517 of Warnings_Treated_As_Errors, raising Constraint_Error in
518 checks-on builds, and causing the compiler to return an error
519 code in checks-off builds.
520
521 2017-09-08 Arnaud Charlet <charlet@adacore.com>
522
523 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
524 entities of named concurrent types as Ref_Id and not of anonymous
525 concurrent objects (because callers already know when a conversion
526 is necessary and can easily do it); also, do not expect protected
527 types or protected objects as Context_Id (because no flow-related
528 SPARK pragmas are attached there); reflect these changes in a
529 more precise comment.
530
531 2017-09-08 Olivier Hainque <hainque@adacore.com>
532
533 * g-altive.ads: Add documentation.
534
535 2017-09-08 Bob Duff <duff@adacore.com>
536
537 * sem_util.ads, debug.adb: Minor comment fix.
538 * erroutc.ads: Comment fix.
539
540 2017-09-08 Ed Schonberg <schonberg@adacore.com>
541
542 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
543 for compatibility of component types of formal and actual in an
544 instantiation of a child unit, when the component type of the
545 formal is itself a formal of an enclosing generic.
546
547 2017-09-08 Arnaud Charlet <charlet@adacore.com>
548
549 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
550 sem_prag.adb to make it available for GNATprove; for concurrent
551 types replace custom scope climbing with Scope_Same_Or_Within; for
552 single concurrent objects add scope climbing (with Scope_Within),
553 which was not there (that's the primary semantic change of this
554 commit); also, when comparing a single concurrent object with
555 its corresponding concurrent type rely on equality of types,
556 not of objects (because that's simpler to code).
557 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
558 (Analyze_Global_Item): adjust special-casing of references to the
559 current instance of a concurrent unit in the Global contracts
560 of task types and single tasks objects; similar for references
561 in the protected operations and entries of protected types and
562 single protected objects (in all these cases the current instance
563 behaves as an implicit parameter and must not be mentioned in
564 the Global contract).
565
566 2017-09-08 Arnaud Charlet <charlet@adacore.com>
567
568 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
569 function calls returning a record within a subprogram call,
570 for C generation.
571
572 2017-09-08 Ed Schonberg <schonberg@adacore.com>
573
574 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
575 name that designates the current instance of a child unit in its
576 own body and appears as the prefix of a reference to an entity
577 local to the child unit.
578 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
579 Minor reformatting.
580
581 2017-09-08 Yannick Moy <moy@adacore.com>
582
583 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
584 may be intentional.
585
586 2017-09-08 Tristan Gingold <gingold@adacore.com>
587
588 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
589 warnings on internal units in configurable run time mode.
590
591 2017-09-08 Bob Duff <duff@adacore.com>
592
593 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
594 representation items from interfaces that the derived type
595 implements, not just from the parent type.
596 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
597 this to return an empty list when there are no interfaces.
598 * einfo.ads, sem_ch13.adb: Minor comment fixes.
599 * sem_attr.adb: Minor comment fix.
600
601 2017-09-08 Doug Rupp <rupp@adacore.com>
602
603 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
604 x86-vx7.
605
606 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
607
608 * exp_ch4.adb (Expand_N_Allocator): Generate a
609 call to Allocate_Any_Controlled when the allocation does not
610 require any initialization.
611
612 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
613
614 * sem_util.adb (Copy_Node_With_Replacement):
615 Update the Renamed_Object field of a replicated object renaming
616 declaration.
617
618 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
619
620 * exp_ch9.adb (Is_Pure_Barrier): Allow type
621 conversions and components of objects. Simplified the detection
622 of the Count attribute by identifying the corresponding run-time
623 calls.
624
625 2017-09-08 Yannick Moy <moy@adacore.com>
626
627 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
628 sem_type.adb, sinfo.ads: Minor reformatting.
629
630 2017-09-08 Ed Schonberg <schonberg@adacore.com>
631
632 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
633 of Freeze_Profile, used to inhibit the freezing of the profile
634 of an expression function declared within a nested package, when
635 some type in the profile depends on a private type declared in
636 an enclosing package.
637
638 2017-09-08 Bob Duff <duff@adacore.com>
639
640 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
641 the subunit case. It's still OK to set it in the "missing subunits"
642 case, because that won't cause the obsolete .ali files that cause
643 confusion.
644
645 2017-09-08 Bob Duff <duff@adacore.com>
646
647 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
648 unclear why this didn't cause a warning.
649 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
650 pragmas. It's unclear why this didn't cause an error.
651
652 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
653
654 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
655 Reimplemented.
656 (Expand_SPARK_Potential_Renaming): Code clean up.
657 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
658 the item does not have a proper entity.
659 (Analyze_Input_Item): Add a guard in case the item does not have a
660 proper entity.
661 (Collect_States_And_Objects): Include object renamings in the
662 items being collected.
663 (Resolve_State): Update the documentation of this routine.
664 * sem_util.adb (Entity_Of): Add circuitry to handle
665 renamings of function results.
666 (Remove_Entity): New routine.
667 (Remove_Overloaded_Entity): Take advantage of factorization.
668 * sem_util.ads (Entity_Of): Update the documentation
669 of this routine.
670 (Remove_Entity): New routine.
671 (Remove_Overloaded_Entity): Update the documentation of this
672 routine.
673
674 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
675
676 * repinfo.adb (List_Record_Info): During first loop,
677 do not override the normalized position and first bit
678 if they have already been set. Move fallback code
679 for the packed case to the case where it belongs.
680 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
681 Also adjust the normalized position of components.
682 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
683
684 2017-09-08 Ed Schonberg <schonberg@adacore.com>
685
686 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
687 the placement of a primitive operation O that renames an operation
688 R declared in an inner package, and which is thus not a primitive
689 of the dispatching type of O. In this case O is a new primitive
690 and does not inherit its dispatch table position from R (which
691 has none).
692
693 2017-09-08 Ed Schonberg <schonberg@adacore.com>
694
695 * sem_dim.adb (Analyze_Dimension_If_Expression,
696 Analyze_Dimension_Case_Expression): new subprograms to verify
697 the dimensional correctness of Ada2012 conditional expressions,
698 and set properly the dimensions of the construct.
699 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
700 call Analyze_Dimension.
701
702 2017-09-08 Ed Schonberg <schonberg@adacore.com>
703
704 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
705 loop on an interface declared as a private extension of another
706 synchronized interface.
707
708 2017-09-08 Ed Schonberg <schonberg@adacore.com>
709
710 * sem_ch12.adb (Check_Generic_Parent): New procedure within
711 Analyze_Associations, to handle actual packages that depend on
712 previous instances. If a package IAP that is an instantiation is
713 used as an actual in a subsequent instantiation SI in the same
714 scope, and IAP has a body, IAP must be frozen before SI. If
715 the generic parent of IAP is itself declared in a previous
716 instantiation in the same scope, that instantiation must also
717 be frozen before SI.
718 (Install_Body): Prevent double insertion of freeze node for
719 instance.
720
721 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
722
723 * sem_prag.adb (Resolve_State): Update the
724 comment on documentation. Generate a reference to the state once
725 resolution takes place.
726
727 2017-09-08 Ed Schonberg <schonberg@adacore.com>
728
729 * sem_ch13.adb (Analyze_Aspect_Specifications, case
730 Linker_Section): If the aspect applies to an object declaration
731 with explicit initialization, do not delay the freezing of the
732 object, to prevent access-before-elaboration in the generated
733 initialization code.
734
735 2017-09-08 Ed Schonberg <schonberg@adacore.com>
736
737 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
738 (Integer_Value (Item)) when the size of the fixed decimal type
739 is larger than Integer.
740
741 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
742
743 PR ada/82127
744 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
745 in order of increasing position in more cases.
746
747 2017-09-07 Yannick Moy <moy@adacore.com>
748
749 * a-exetim-mingw.ads: Add contract Global=>null
750 on all operations that are modeled as having no read or write
751 of global variables in SPARK.
752
753 2017-09-07 Raphael Amiard <amiard@adacore.com>
754
755 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
756 to Hmaps.Generic_Ops.
757 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
758 cursors.
759 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
760 cursors.
761 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
762 position in cursors.
763
764 2017-09-07 Javier Miranda <miranda@adacore.com>
765
766 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
767 allow disabling the generation of implicit pragma Elaborate_All
768 on task bodies.
769
770 2017-09-07 Javier Miranda <miranda@adacore.com>
771
772 * exp_disp.adb (Make_Tags): Avoid suffix counter
773 in the external name of the elaboration flag. Required to fix
774 the regressions introduced by the initial version of this patch.
775
776 2017-09-07 Bob Duff <duff@adacore.com>
777
778 * sem_ch6.adb (Analyze_Function_Return): Do not
779 insert an explicit conversion to force the displacement of the
780 "this" pointer to reference the secondary dispatch table in the
781 case where the return statement is returning a raise expression,
782 as in "return raise ...".
783
784 2017-09-07 Arnaud Charlet <charlet@adacore.com>
785
786 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
787 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
788 procedure from sem_disp.adb.
789 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
790 with Unit.
791 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
792 return the instantiation node for subprograms. Update references
793 to Get_Unit_Instantiation_Node.
794 * sem_ch7.adb (Install_Parent_Private_Declarations): update
795 reference to Get_Unit_Instantiation_Node.
796 * exp_dist.adb (Build_Package_Stubs): update reference to
797 Get_Unit_Instantiation_Node.
798 * sem_ch9.adb: minor typo in comment.
799 * lib-xref-spark_specific.adb
800 (Traverse_Declaration_Or_Statement): traverse into task type
801 definition.
802
803 2017-09-07 Ed Schonberg <schonberg@adacore.com>
804
805 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
806 to handle properly various cases of type conversions where the
807 target type and/or the expression carry dimension information.
808 (Dimension_System_Root); If a subtype carries dimension
809 information, obtain the source parent type that carries the
810 Dimension aspect.
811
812 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
813
814 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
815
816 2017-09-07 Ed Schonberg <schonberg@adacore.com>
817
818 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
819 If the prefix is a reference to an object, rewrite it as an
820 explicit dereference, as required by 3.7.2 (2) and as is done
821 with most other attributes whose prefix is an access value.
822
823 2017-09-07 Bob Duff <duff@adacore.com>
824
825 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
826 Refined_Depends aspect.
827 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
828 Refined_Depends pragma.
829 * scans.ads: Fix documentation of Inside_Depends flag.
830 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
831
832 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
833
834 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
835 Account for the case where the are no lists to insert, but the
836 secondary stack still requires management.
837 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
838 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
839 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
840 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
841 Minor reformatting.
842
843 2017-09-07 Vincent Celier <celier@adacore.com>
844
845 * clean.adb: Do not get the target parameters before calling
846 gprclean.
847
848 2017-09-07 Nicolas Roche <roche@adacore.com>
849
850 * s-osinte-solaris-posix.ads: Removed.
851
852 2017-09-07 Arnaud Charlet <charlet@adacore.com>
853
854 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
855 single concurrent objects.
856
857 2017-09-07 Javier Miranda <miranda@adacore.com>
858
859 * s-regexp.ads: Fix documentation of the globbing grammar.
860
861 2017-09-07 Gary Dismukes <dismukes@adacore.com>
862
863 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
864
865 2017-09-07 Arnaud Charlet <charlet@adacore.com>
866
867 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
868 in CodePeer mode, to support more legacy code automatically.
869
870 2017-09-07 Ed Schonberg <schonberg@adacore.com>
871
872 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
873 and thus not a controlling argument, preserve its type after
874 rewriting because it may appear in an nested call with a classwide
875 parameter.
876
877 2017-09-07 Arnaud Charlet <charlet@adacore.com>
878
879 * comperr.adb (Delete_SCIL_Files): Handle case of
880 N_Package_Instantiation.
881
882 2017-09-07 Ed Schonberg <schonberg@adacore.com>
883
884 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
885 clause for a unit U appears in a context that includes a regular
886 with_clause on U, rewrite the redundant private clause into a null
887 statement, rather than removing it altogether from the context,
888 so that ASIS tools can reconstruct the original source.
889
890 2017-09-07 Ed Schonberg <schonberg@adacore.com>
891
892 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
893 for aspect Small can be of any real type (not only a universal
894 real literal) as long as it is a static constant.
895
896 2017-09-07 Thomas Quinot <quinot@adacore.com>
897
898 * par_sco.adb: Minor reformatting.
899
900 2017-09-07 Arnaud Charlet <charlet@adacore.com>
901
902 * s-parame-ae653.ads: Removed.
903
904 2017-09-07 Nicolas Roche <roche@adacore.com>
905
906 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
907 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
908 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
909 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
910 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
911 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
912
913 2017-09-07 Yannick Moy <moy@adacore.com>
914
915 * a-ngelfu.ads Add preconditions to all functions
916 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
917
918 2017-09-07 Arnaud Charlet <charlet@adacore.com>
919
920 * lib-xref.adb (Generate_Reference): ignore
921 references to entities which are Part_Of single concurrent
922 objects.
923
924 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
925
926 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
927 comment.
928
929 2017-09-07 Arnaud Charlet <charlet@adacore.com>
930
931 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
932 Null_Task_Id is passed.
933
934 2017-09-07 Javier Miranda <miranda@adacore.com>
935
936 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
937 attribute. Defined for record types and subtypes.
938 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
939 (Init_Tags_List) to facilitate generating separate code in the
940 IP routine to initialize the object components and for completing
941 the elaboration of dispatch tables.
942 * exp_ch3.adb (Build_Init_Procedure): Improve the code
943 generated in the IP routines by means of keeping separate
944 the initialization of the object components from the
945 initialization of its dispatch tables. (Init_Secondary_Tags):
946 Adding new formal (Init_Tags_List) and adjusting calls to
947 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
948 adjusting also calls to Ada.Tags.Register_Interface_Offset
949 because the type of one of its formals has been changed.
950 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
951 modified. Instead of receiving a pointer to an object this
952 routine receives now a primary tag.
953 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
954 additional formal: the tag of the primary dispatch table.
955 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
956 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
957 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
958 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
959 formal in calls to Init_Secondary_Tags.
960
961 2017-09-07 Javier Miranda <miranda@adacore.com>
962
963 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
964 subprogram.
965 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
966 applied to generic subprograms.
967
968 2017-09-07 Arnaud Charlet <charlet@adacore.com>
969
970 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
971 (because it refers to the anonymous concurrent object, not its type);
972 fix condition for emitting error message about task/protected type,
973
974 2017-09-07 Bob Duff <duff@adacore.com>
975
976 * binde.adb (Debug_Flag_Old): If both -do and -dp
977 are specified, behave as if just -do was specified, rather than
978 using a mixture.
979
980 2017-09-07 Nicolas Roche <roche@adacore.com>
981
982 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
983 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
984
985 2017-09-07 Arnaud Charlet <charlet@adacore.com>
986
987 * sem_prag.adb (Find_Role): The Global_Seen flag
988 is now consulted not only for abstract states and variables,
989 but for all kinds of items.
990 (Collect_Subprogram_Inputs_Outputs): Do not process formal
991 generic parameters, because unlike ordinary formal parameters,
992 generic formals only act as input/ outputs if they are explicitly
993 mentioned in a Global contract.
994
995 2017-09-07 Yannick Moy <moy@adacore.com>
996
997 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
998 predicate procedure. Check predicate pragma/aspect with Ghost entity.
999 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
1000 reformatting.
1001
1002 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1003
1004 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
1005 (code cleanup);
1006 * sem_ch3.adb (Build_Derived_Record_Type):i Call
1007 Copy_Dimensions_Of_Components after creating the copy of the
1008 record declaration.
1009 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
1010 derived recor type, copy the dikensions if any of each component
1011 of the parent record to the corresponding component declarations
1012 of the derived record. These expressions are used among other
1013 things as default values in aggregates with box associations.
1014 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
1015 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
1016 Minor reformatting.
1017
1018 2017-09-07 Arnaud Charlet <charlet@adacore.com>
1019
1020 * sem_util.adb: Remove extra space after THEN.
1021
1022 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1023
1024 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
1025 also mark the renamed subprogram as referenced.
1026
1027 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1028
1029 * par-ch6.adb (P_Subprogram): Improve error message on null
1030 procedure with misplaced aspect specification, which the parser
1031 first attempts to interpret as a malformed expression function.
1032
1033 2017-09-07 Gary Dismukes <dismukes@adacore.com>
1034
1035 * sem_attr.adb (Analyze_Attribute_Old_Result):
1036 Allow attributes Result and Old in the case of an expression
1037 function.
1038
1039 2017-09-07 Justin Squirek <squirek@adacore.com>
1040
1041 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
1042 Volatile to subcomponents.
1043
1044 2017-09-07 Bob Duff <duff@adacore.com>
1045
1046 * exp_ch7.adb (Find_Last_Init): Check for the
1047 case where a build-in-place function call has been replaced by a
1048 'Reference attribute reference.
1049
1050 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1051
1052 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
1053 nodes.
1054
1055 2017-09-07 Bob Duff <duff@adacore.com>
1056
1057 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
1058 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
1059 secondary stack for all functions that return limited tagged
1060 types -- just do it for dispatching calls. Misc cleanup.
1061 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
1062 remove qualifications and type conversions. Fix various bugs
1063 where only a single level of qualification or conversion was
1064 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
1065 instead of "X".
1066 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
1067 cleanup.
1068
1069 2017-09-07 Ed Schonberg <schonberg@adacore.com>
1070
1071 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
1072 do not create actual subtypes that may generate further predicate
1073 functions.
1074 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
1075 of body is a predicate function as well.
1076 (Resolve_Aspect_Expressions, Resolve_Name): For a component
1077 association, only the expression needs resolution, not the name.
1078 (Resolve_Aspect_Expressions, case Predicates): Construct and
1079 analyze the predicate function declaration in the scope of the
1080 type, before making the type and its discriminants visible.
1081
1082 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1083
1084 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
1085 only if the record type itself comes from source.
1086
1087 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1088
1089 * sem_ch5.adb: Minor reformatting and a typo fix
1090
1091 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1092
1093 * sinput-l.ads: minor remove extra period at the end of comment
1094
1095 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1096
1097 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
1098 E_Discriminant.
1099 (Find_Role): remove support for E_Discriminant.
1100
1101 2017-09-06 Javier Miranda <miranda@adacore.com>
1102
1103 * exp_ch6.adb (Expand_Simple_Function_Return):
1104 Add missing implicit type conversion to force displacement of the
1105 "this" pointer.
1106
1107 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1108
1109 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
1110
1111 2017-09-06 Yannick Moy <moy@adacore.com>
1112
1113 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
1114 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
1115
1116 2017-09-06 Bob Duff <duff@adacore.com>
1117
1118 * sem_ch8.adb: Change Assert to be consistent with
1119 other similar ones.
1120
1121 2017-09-06 Bob Duff <duff@adacore.com>
1122
1123 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
1124 requested. Previously, the -do switch meant "run Elab_New and
1125 Elab_Old and use the order chosen by Elab_Old, possibly with
1126 debugging printouts comparing the two orders." Now it means
1127 "do not run Elab_New." This is of use if there are bugs that
1128 cause Elab_New to crash.
1129 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
1130 type conversions.
1131 * ali.ads (Elab_Position): Change type to Nat, to avoid various
1132 type conversions.
1133
1134 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1135
1136 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
1137 reference to SPARK RM.
1138
1139 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1140
1141 * layout.adb: Use SSU short hand consistently throughout the file.
1142
1143 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1144
1145 * freeze.adb (Freeze_Record_Type)
1146 <Sized_Component_Total_Round_RM_Size>: New local variable to
1147 accumulate the rounded RM_Size of components. Update it for
1148 every component whose RM_Size is statically known. Add missing
1149 guard to check that bit packing is really required before issuing
1150 the error about packing. Swap condition for clarity's sake.
1151 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
1152
1153 2017-09-06 Fedor Rybin <frybin@adacore.com>
1154
1155 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
1156 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
1157 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
1158 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
1159 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
1160 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
1161 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
1162 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
1163 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
1164 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
1165 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
1166 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
1167 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
1168 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
1169 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
1170 project manager sources.
1171
1172 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1173
1174 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
1175 entity of a mutable type and the right-hand side is a conditional
1176 expression, resolve the alternatives of the conditional using
1177 the base type of the target entity, because the alternatives
1178 may have distinct subtypes. This is particularly relevant if
1179 the alternatives are aggregates.
1180
1181 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1182
1183 * checks.adb (Apply_Predicate_Check): If the expression is an
1184 aggregate that is the RHS of an assignment, apply the check to
1185 the LHS after the assignment, rather than to the aggregate. This
1186 is more efficient than creating a temporary for the aggregate,
1187 and prevents back-end crashes when the aggregate includes a
1188 dynamic "others' association.
1189
1190 2017-09-06 Yannick Moy <moy@adacore.com>
1191
1192 * sem_ch12.adb (Analyze_Instance_And_Renamings):
1193 Set variable to ignore SPARK_Mode in instance before the analysis
1194 of the generated package declaration.
1195
1196 2017-09-06 Yannick Moy <moy@adacore.com>
1197
1198 * sem_res.adb (Resolve_Call): Do not issue a
1199 message for calls inside expression function, unless body was
1200 seen and is candidate for inlining.
1201
1202 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1203
1204 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
1205 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
1206 body. do not freeze the formals of the generic unit.
1207
1208 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1209
1210 * errout.adb (Error_Msg): Separate the
1211 treatment for warning vs. style messages in inlinings and
1212 instantiations. Prevents blowups on calls to Warn_Insertion for
1213 style messages, which should not be called in that case because
1214 Warning_Msg_Char is not set.
1215
1216 2017-09-06 Justin Squirek <squirek@adacore.com>
1217
1218 * sem_prag.adb (Check_VFA_Conflicts): Created
1219 to group all Volatile_Full_Access checks relating to other
1220 representation pragmas (Mark_Component_Or_Object): Created
1221 to centeralize the flagging of attributes for the record type
1222 component case, a pragma applied individually to a component, and
1223 the object case.
1224 (Process_Atomic_Independent_Shared_Volatile):
1225 Add propagation of certain pragmas to record components and move
1226 evaluation of VFA checks
1227
1228 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1229
1230 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
1231 Do not warn on conditions that are not obeyed for Inline_Always
1232 subprograms, when assertions are not enabled.
1233
1234 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1235
1236 * sem_util.adb (Unique_Entity): For abstract states return their
1237 non-limited view.
1238
1239 2017-09-06 Bob Duff <duff@adacore.com>
1240
1241 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
1242 that is a proper body corresponding to a stub, we defer the
1243 adjustment of the sloc until after the correct adjustment has
1244 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
1245 the adjustment, because it will be outside the range in (the old,
1246 incorrect) S_Adjustment.
1247 * inline.adb: Use named notation for readability and uniformity.
1248 * sinput-l.adb: Minor improvements to debugging output printed
1249 for Debug_Flag_L.
1250 * sinput-l.ads (Create_Instantiation_Source): Minor comment
1251 correction.
1252
1253 2017-09-06 Vincent Celier <celier@adacore.com>
1254
1255 * make.adb: Do not invoke gprbuild for -bargs -P.
1256
1257 2017-09-06 Sylvain Dailler <dailler@adacore.com>
1258
1259 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
1260 case when Op is of kind N_Qualified_Expression. In this case,
1261 the function is called recursively on the subexpression like in
1262 other cases.
1263 * make.adb: Minor reformatting
1264
1265 2017-09-06 Justin Squirek <squirek@adacore.com>
1266
1267 * einfo.adb (Set_Linker_Section_Pragma): Modify
1268 Set_Linker_Section_Pragma to be consistant with the "getter"
1269 Linker_Section_Pragma.
1270 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
1271 checking for container loops so that the index cursor is not
1272 directly changable by the user with the use of E_Loop_Parameter.
1273 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
1274 * sem_warn.adb (Check_References): Revert previous change.
1275
1276 2017-09-06 Bob Duff <duff@adacore.com>
1277
1278 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
1279 calls and the like.
1280
1281 2017-09-06 Yannick Moy <moy@adacore.com>
1282
1283 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
1284 declarations to only consider valid uses of Global/Depends those on
1285 single concurrent objects.
1286
1287 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1288
1289 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
1290 error as soon as one of the specified components overlaps the
1291 parent field.
1292
1293 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1294
1295 * sem_prag.ads: minor fix typo in comment.
1296
1297 2017-09-06 Justin Squirek <squirek@adacore.com>
1298
1299 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
1300 from source before checking source references.
1301 * sem_warn.adb (Check_References): Add check for internal block
1302 before recursing.
1303
1304 2017-09-06 Vincent Celier <celier@adacore.com>
1305
1306 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
1307 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
1308 gnatname.adb: Remove the Project Manager from the GNAT tools.
1309 * gcc-interface/Makefile.in: ditto.
1310
1311 2017-09-06 Bob Duff <duff@adacore.com>
1312
1313 * sem_util.ads: Minor comment fix.
1314
1315 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1316
1317 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
1318 Generate a freeze node for the actual of a formal package, if
1319 the actual is declared in the same unit and has a corresponding
1320 body, to prevent the current instance from being frozen before
1321 the actual is.
1322
1323 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1324
1325 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
1326
1327 2017-09-06 Yannick Moy <moy@adacore.com>
1328
1329 * sem_warn.adb: Minor refactoring.
1330
1331 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1332
1333 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
1334 to retrieve the inherited classwide precondition/postcondition
1335 of a subprogram.
1336 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
1337 freezing a subprogram, to complete the generation of the
1338 corresponding checking code.
1339
1340 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1341
1342 * exp_util.adb (Is_Controlled_Indexing): New routine.
1343 (Is_Displace_Call): Use routine Strip to remove indirections.
1344 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
1345 missing case of controlled generalized indexing.
1346 (Is_Source_Object): Use routine Strip to remove indirections.
1347 (Strip): New routine.
1348
1349 2017-09-06 Bob Duff <duff@adacore.com>
1350
1351 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
1352 we include the proper header. Otherwise, we just declare the necessary
1353 things from the capabilities library. This is so we can build on
1354 machines without that library, while still enabling that library.
1355 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
1356 simply return 0 if the library is not present, or not included
1357 in the link.
1358
1359 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
1360
1361 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
1362 for renamings that involve function calls in prefix form.
1363
1364 2017-09-06 Bob Duff <duff@adacore.com>
1365
1366 * sem_ch3.adb (Analyze_Subtype_Declaration):
1367 Set Has_Delayed_Freeze on a subtype of an incomplete type.
1368
1369 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
1370
1371 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
1372 has no parameter specification and no entry index, use the entry name
1373 as the end of the generated SCO statement.
1374
1375 2017-09-06 Steve Baird <baird@adacore.com>
1376
1377 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
1378 uses of 'Image and related attributes as having side effects in
1379 order to avoid replicating such uses.
1380 * pprint.ads (Expression_Image) Add new generic formal flag
1381 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
1382 (eventually) override the default.
1383 * pprint.adb (Expression_Image) If the new flag is set, then
1384 suppress the ".all" suffix when displaying a dereference whose
1385 prefix is a use of a value-capturing compiler temp of the sort
1386 generated by Expr_Util.Remove_Side_Effects .
1387 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
1388 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
1389 Minor reformatting.
1390 * inline.adb: Minor wording change.
1391
1392 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1393
1394 * sem_ch7.adb: Update comment.
1395
1396 2017-09-06 Yannick Moy <moy@adacore.com>
1397
1398 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
1399 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
1400 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
1401 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
1402 so that applies to any entity.
1403
1404 2017-09-06 Yannick Moy <moy@adacore.com>
1405
1406 * sem_ch3.adb (Derived_Type_Declaration): Use
1407 Incomplete_Or_Partial_View rather than local Find_Partial_View.
1408
1409 2017-09-06 Javier Miranda <miranda@adacore.com>
1410
1411 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
1412 following ISO-8861.
1413
1414 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1415
1416 * sem_dim.adb (Analyze_Dimension): In an instance, a type
1417 conversion takes its dimensions from the expression, not from
1418 the context type.
1419 (Dimensions_Of_Operand): Ditto.
1420
1421 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1422
1423 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
1424 null procedures when GNAT coverage is used, so that their (empty)
1425 bodies are properly covered.
1426
1427 2017-09-06 Bob Duff <duff@adacore.com>
1428
1429 * sem_ch13.adb (Resolve_Aspect_Expressions): If
1430 the entity is a type with discriminants, make the discriminants
1431 directly visible in aspect clauses.
1432
1433 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1434
1435 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
1436 Universal_Real and the context is a floating-point type, resolve
1437 both operands to the target type.
1438
1439 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1440
1441 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
1442 sem_ch3.adb, sem_util.adb: Minor reformatting.
1443
1444 2017-09-06 Yannick Moy <moy@adacore.com>
1445
1446 * freeze.adb (Check_Inherited_Conditions): Rewriting
1447 of inherited preconditions and postconditions should only occur
1448 in GNATprove mode, that is, when GNATprove_Mode is True, not to
1449 be confused with SPARK_Mode being On.
1450
1451 2017-09-06 Yannick Moy <moy@adacore.com>
1452
1453 * sem_warn.adb (Check_References): Take into
1454 account possibility of attribute reference as original node.
1455
1456 2017-09-06 Yannick Moy <moy@adacore.com>
1457
1458 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
1459 use of attribute.
1460
1461 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1462
1463 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
1464 on the procedure created to encapsulate the body.
1465 * sem_ch7.adb: Add with clause for GNAT.HTable.
1466 (Entity_Table_Size): New constant.
1467 (Entity_Hash): New function.
1468 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
1469 (Is_Subprogram_Ref): Rename into...
1470 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
1471 the table instead of bailing out on them. Scan the value of constants
1472 if it is not known at compile time.
1473 (Contains_Subprograms_Refs): Rename into...
1474 (Scan_Subprogram_Refs): ...this.
1475 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
1476 Is_Public flag on subprograms if they are not actually referenced.
1477 (Hide_Public_Entities): Beef up comment on the algorithm.
1478 Reset the table of subprograms on entry.
1479
1480 2017-09-06 Yannick Moy <moy@adacore.com>
1481
1482 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
1483
1484 2017-09-06 Javier Miranda <miranda@adacore.com>
1485
1486 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
1487 cannot handle a type conversion of an array as an aggregate
1488 component.
1489
1490 2017-09-06 Bob Duff <duff@adacore.com>
1491
1492 * g-comlin.adb (Try_Help): Remove ".exe" so we
1493 get the same results on windows and unix.
1494
1495 2017-09-06 Justin Squirek <squirek@adacore.com>
1496
1497 * exp_imgv.adb (Expand_Image_Attribute),
1498 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
1499 Added case to handle new-style 'Image expansion
1500 (Rewrite_Object_Image): Moved from exp_attr.adb
1501 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
1502 attribute cases so that the relevant subprograms in exp_imgv.adb
1503 handle all expansion.
1504 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
1505 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
1506 cases to call common function Analyze_Image_Attribute.
1507 (Analyze_Image_Attribute): Created as a common path for all
1508 image attributes (Check_Object_Reference_Image): Removed
1509 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
1510 Removed and refactored into Is_Object_Image (Is_Object_Image):
1511 Created as a replacement for Is_Image_Applied_To_Object
1512
1513 2017-09-06 Yannick Moy <moy@adacore.com>
1514
1515 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
1516 message for missing input.
1517
1518 2017-09-06 Yannick Moy <moy@adacore.com>
1519
1520 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
1521 of protected subprograms and entries.
1522 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
1523 New function to detect when a subprogram of entry is defined
1524 inside a protected object.
1525
1526 2017-09-06 Bob Duff <duff@adacore.com>
1527
1528 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
1529 whether the current process has the CAP_SYS_NICE capability.
1530 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
1531 ceiling priorities if the current process has the CAP_SYS_NICE
1532 capability.
1533
1534 2017-09-06 Bob Duff <duff@adacore.com>
1535
1536 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
1537 check back to the body, because SPARK is not yet ready for
1538 "or else raise Constraint_Error".
1539
1540 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1541
1542 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
1543 procedure by a single null statement, after evaluating the
1544 actuals that require it.
1545
1546 2017-09-06 Javier Miranda <miranda@adacore.com>
1547
1548 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
1549 Generating C code improve the code that checks the use of nested
1550 aggregates to initialize object declarations.
1551
1552 2017-09-06 Yannick Moy <moy@adacore.com>
1553
1554 * sem_ch3.adb (Derived_Type_Declaration): Detect
1555 violations of new rule SPARK RM 3.4(1). Also refactor existing
1556 check to use the new function Find_Partial_View.
1557
1558 2017-09-06 Vincent Celier <celier@adacore.com>
1559
1560 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
1561 from the Prj hierarchy has been removed from the GNAT driver.
1562
1563 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1564
1565 * sem_type.adb (Interface_Present_In_Ancestor): Within an
1566 expression function, or within a spec expression (default value,
1567 etc) a reference to an incomplete type is legal: legality of
1568 the operation will be checked when some related entity (type,
1569 object or subprogram) is frozen.
1570
1571 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1572
1573 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
1574 adjustments and a typo fix.
1575
1576 2017-09-06 Yannick Moy <moy@adacore.com>
1577
1578 * sem_res.adb (Resolve_Call): Do not issue info
1579 message about inlining of calls to functions in assertions,
1580 for functions whose body has not been seen yet.
1581
1582 2017-09-06 Bob Duff <duff@adacore.com>
1583
1584 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
1585 we can use modern Ada in this package.
1586 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
1587 Move Ada.Command_Line.Response_File to System.Response_File,
1588 and make Ada.Command_Line.Response_File into a rename of
1589 System.Response_File. This is to avoid having gnatbind depend
1590 Ada.Command_Line, which would damage the bootstrap process now
1591 that Ada.Command_Line contains modern Ada (the raise expression).
1592 * gnatbind.adb: Avoid dependence on
1593 Ada.Command_Line. Depend on System.Response_File instead
1594 of Ada.Command_Line.Response_File. Change one call to
1595 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
1596 to Ada.Command_Line.Argument_Count to use Arg_Count.
1597 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
1598
1599 2017-09-06 Bob Duff <duff@adacore.com>
1600
1601 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
1602 switch, because we've already read gnat.adc by default.
1603
1604 2017-09-06 Bob Duff <duff@adacore.com>
1605
1606 * exp_ch5.adb (Get_Default_Iterator): Replace
1607 "Assert(False)" with "return Iter", because if an iterable
1608 type is derived from a noniterable one, then we won't find an
1609 overriding or inherited default iterator.
1610
1611 2017-09-06 Yannick Moy <moy@adacore.com>
1612
1613 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
1614 literal index used to access a string is null or negative.
1615
1616 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1617
1618 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
1619 allowed on loop parameters.
1620 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
1621 on loop parameters.
1622 (Write_Field15_Name): Update the output for
1623 Status_Flag_Or_Transient_Decl.
1624 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
1625 to loop parameters. Update the documentation of the attribute
1626 and the E_Loop_Parameter entity.
1627 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
1628 which assumes that cursors can never be controlled.
1629 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
1630 guard which assumes that cursors can never be controlled.
1631
1632 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1633
1634 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
1635 sem_warn.adb: Minor reformatting.
1636
1637 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1638
1639 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
1640 fix and preserve older GNAT warning on overlapping actuals that
1641 are not elementary types.
1642
1643 2017-09-06 Justin Squirek <squirek@adacore.com>
1644
1645 * sem_attr.adb: Comment correction.
1646
1647 2017-09-06 Gary Dismukes <dismukes@adacore.com>
1648
1649 * sem_util.adb: Minor reformatting.
1650
1651 2017-09-06 Yannick Moy <moy@adacore.com>
1652
1653 * a-comlin.ads (Argument): Add precondition for analysis.
1654
1655 2017-09-06 Yannick Moy <moy@adacore.com>
1656
1657 * sem_res.adb (Resolve): Update message for function call as statement.
1658
1659 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1660
1661 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
1662 generated bodies for renamings that are completions, when renamed
1663 procedure is No_Return.
1664 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
1665 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
1666 with No_Return, the renamed entity must be No_Return as well.
1667
1668 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1669
1670 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
1671 Minor reformatting.
1672
1673 2017-09-06 Justin Squirek <squirek@adacore.com>
1674
1675 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
1676 attribute cases (Rewrite_Object_Reference_Image): Created to
1677 aid the rewriting of new-style 'Image attributes.
1678 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
1679 (Check_Object_Reference_Image): Created to handle verification of
1680 'Image with object-references as prefixes.
1681 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
1682 Create predicate to identify cases where an 'Image attribute's
1683 prefix applies to an object reference.
1684
1685 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1686
1687 * freeze.adb (Freeze_Entity): Do not generate a freeze
1688 node for a generic unit, even if it includes delayed aspect
1689 specifications. Freeze nodes for generic entities must never
1690 appear in the tree that reaches the back-end of the compiler.
1691
1692 2017-09-06 Yannick Moy <moy@adacore.com>
1693
1694 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
1695
1696 2017-09-06 Yannick Moy <moy@adacore.com>
1697
1698 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
1699 to subprograms in other units as possibly inlined.
1700
1701 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1702
1703 * freeze.adb (Freeze_Entity): For a derived type that has no
1704 explicit delayed aspects but may inherit delayed aspects from its
1705 parent type, analyze aspect at freeze point for proper capture
1706 of an inherited aspect.
1707
1708 2017-09-06 Arnaud Charlet <charlet@adacore.com>
1709
1710 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
1711 renamings; also, avoid repeated calls to Renamed_Object when getting
1712 through object renamings.
1713
1714 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1715
1716 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
1717 array type declaration in a private part, when an index is a
1718 subtype indication of a discrete type with a private partial view.
1719
1720 2017-09-06 Javier Miranda <miranda@adacore.com>
1721
1722 * exp_ch4.adb (Expand_Modular_Op): Force generating
1723 temporary to improve the generated code.
1724
1725 2017-09-06 Tristan Gingold <gingold@adacore.com>
1726
1727 * s-fatgen.adb: Minor typo fix in comment.
1728
1729 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1730
1731 * exp_ch5.adb (Make_Field_Assign): If the type
1732 of the right-hand side has stored constraint, use its values
1733 (except for those that are renamings of parent discriminants)
1734 to produce additional assignments for the discriminants of the
1735 left-hand side, which are invisible in the righ-hand side and
1736 not retrievable as selected components.
1737
1738 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1739
1740 * sem_util.adb (Needs_One_Formal): The first formal of such a
1741 function must be a controlling formal, so that Obj.F (X, Y)
1742 can have the interpretation F(Obj)(X, Y).
1743 * sem_util.ads: Clarify documentation.
1744
1745 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1746
1747 * table.ads, table.adb: Restore original implementation.
1748 * namet.h (Names_Ptr): Adjust back.
1749 (Name_Chars_Ptr): Likewise.
1750 * uintp.h (Uints_Ptr): Likewise.
1751 (Udigits_Ptr): Likewise.
1752 * g-table.ads: Remove pragma Compiler_Unit_Warning.
1753 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
1754 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
1755 * spark_xrefs.ads: Likewise.
1756 * scos.h: Undo latest changes.
1757
1758 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1759
1760 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
1761 No_Return flag to instance if pragma applies to generic unit. This
1762 must be done explicitly because the pragma does not appear
1763 directly in the generic declaration (unlike the corresponding
1764 aspect specification).
1765
1766 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1767
1768 * sem_ch7.adb (Has_Referencer): Move up and expand comment
1769 explaining the test used to detect inlining. Use same test
1770 in second occurrence.
1771 (Analyze_Package_Body_Helper): Minor formatting fixes.
1772
1773 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1774
1775 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
1776 derived type with a mixture of renamed and constrained parent
1777 discriminants, the constraint for the target must obtain the
1778 discriminant values from both the operand and from the stored
1779 constraint for it, given that the constrained discriminants are
1780 not visible in the object.
1781 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
1782 side may be derived from that of the left-hand side (as in the
1783 case of an assignment with a change of representation) so the
1784 discriminant to be used in the retrieval of the value of the
1785 component must be the entity in the type of the right-hand side.
1786
1787 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1788
1789 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
1790 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1791 * exp_util.adb (Is_Source_Object): Account for
1792 the cases where the source object may appear as a dereference
1793 or within a type conversion.
1794 * exp_ch6.adb: Fix missing space in error message.
1795
1796 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1797
1798 * sem_prag.adb: Update description of Eliminate.
1799
1800 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1801
1802 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
1803 properly an attribute reference 'Loop_Entry that appears in the
1804 list of indices of an indexed expression, to prevent an infinite
1805 loop in the compiler.
1806
1807 2017-09-06 Bob Duff <duff@adacore.com>
1808
1809 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
1810
1811 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1812
1813 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
1814 in a set membership is an overloaded enumeration literal, and
1815 the type of the alternative is resolved from a previous one,
1816 replace the entity of the alternative as well as the type,
1817 to prevent inconsistencies between the entity and the type.
1818
1819 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1820
1821 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
1822 (No_Component_Reordering_Specified): New switch.
1823 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
1824 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
1825 * bcheck.adb (Check_Consistent_No_Component_Reordering):
1826 New check.
1827 (Check_Configuration_Consistency): Invoke it.
1828 * debug.adb (d.r): Toggle the effect of the switch.
1829 (d.v): Change to no-op.
1830 * einfo.ads (Has_Complex_Representation):
1831 Restrict to record types.
1832 (No_Reordering): New alias for Flag239.
1833 (OK_To_Reorder_Components): Delete.
1834 (No_Reordering): Declare.
1835 (Set_No_Reordering): Likewise.
1836 (OK_To_Reorder_Components): Delete.
1837 (Set_OK_To_Reorder_Components): Likewise.
1838 * einfo.adb (Has_Complex_Representation): Expect record types.
1839 (No_Reordering): New function.
1840 (OK_To_Reorder_Components): Delete.
1841 (Set_Has_Complex_Representation): Expect base record types.
1842 (Set_No_Reordering): New procedure.
1843 (Set_OK_To_Reorder_Components): Delete.
1844 (Write_Entity_Flags): Adjust to above change.
1845 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
1846 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
1847 OK_To_Reorder_Components on record types with convention Ada.
1848 * lib-writ.adb (Write_ALI): Deal with NC marker.
1849 * opt.ads (No_Component_Reordering): New flag.
1850 (No_Component_Reordering_Config): Likewise.
1851 (Config_Switches_Type): Add No_Component_Reordering component.
1852 * opt.adb (Register_Opt_Config_Switches): Copy
1853 No_Component_Reordering onto No_Component_Reordering_Config.
1854 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
1855 (Save_Opt_Config_Switches): Save No_Component_Reordering.
1856 (Set_Opt_Config_Switches): Set No_Component_Reordering.
1857 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
1858 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
1859 No_Reordering flag from the default.
1860 (Build_Derived_Private_Type): Likewise.
1861 (Build_Derived_Record_Type): Likewise. Then inherit it
1862 for untagged types and clean up handling of similar flags.
1863 (Record_Type_Declaration): Likewise.
1864 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
1865 remove redundant test on Is_Tagged_Type.
1866 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
1867 (Sig_Flags): Likewise.
1868 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
1869 (Pragma_Id): Add Pragma_No_Component_Reordering value.
1870 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
1871 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
1872 Copy the layout of the parent type only if the No_Reordering
1873 settings match.
1874 (components_to_record): Reorder record types with
1875 convention Ada by default unless No_Reordering is set or -gnatd.r
1876 is specified and do not warn if No_Reordering is set in GNAT mode.
1877
1878 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1879
1880 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
1881 new predicate to reject declarations that can be completions,
1882 when there is a visible prior homograph that is a null procedure.
1883 * sem_ch6.adb (Analyze_Null_Procedure): use it.
1884 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
1885
1886 2017-09-06 Thomas Quinot <quinot@adacore.com>
1887
1888 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
1889 run of 253 characters or more.
1890
1891 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1892
1893 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
1894 properly incomplete subtypes that may be created by explicit or
1895 implicit declarations.
1896 (Is_Base_Type): Take E_Incomplete_Subtype into account.
1897 (Subtype_Kind): Ditto.
1898 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
1899 Ekind of a subtype of a discriminated incomplete type.
1900 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
1901 incomplete types, to preserve error reporting.
1902 (Process_Incomplete_Dependents): Do not create a subtype
1903 declaration for an incomplete subtype that is created internally.
1904 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
1905 incomplete subtypes that do not require a completion, either
1906 because they are limited views, of they are generic actuals.
1907
1908 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1909
1910 * checks.adb (Insert_Valid_Check): Remove the
1911 suspicious manipulation of the Do_Range_Check flag as ths is
1912 no linger needed. Suppress validity check when analysing the
1913 validation variable.
1914
1915 2017-09-06 Philippe Gil <gil@adacore.com>
1916
1917 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
1918 GNATCOLL.Memory
1919
1920 2017-09-06 Bob Duff <duff@adacore.com>
1921
1922 * sem_elim.adb: Minor comment fix.
1923
1924 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1925
1926 * sem_util.adb (Is_Object_Reference): A function call is an
1927 object reference, and thus attribute references for attributes
1928 that are functions (such as Pred and Succ) as well as predefined
1929 operators are legal in contexts that require an object, such as
1930 the prefix of attribute Img and the Ada2020 version of 'Image.
1931
1932 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1933
1934 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
1935 exp_ch3.adb, xoscons.adb: Minor reformatting.
1936
1937 2017-09-06 Raphael Amiard <amiard@adacore.com>
1938
1939 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
1940 Position parameter. If supplied, use it to provide efficient iteration.
1941 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
1942 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
1943 iteration.
1944
1945 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1946
1947 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
1948 designated type is class-wide and the expression is an unchecked
1949 conversion, preserve the conversion when checking the tag of the
1950 designated object, to prevent spurious semantic errors when the
1951 expression in the conversion has an untagged type (for example
1952 an address attribute).
1953
1954 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1955
1956 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
1957 operation is subject to a pragma Eliminate.
1958
1959 2017-09-06 Ed Schonberg <schonberg@adacore.com>
1960
1961 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
1962
1963 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
1964
1965 * fe.h (Eliminate_Error_Msg): Remove.
1966
1967 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
1968
1969 * gcc-interface/utils.c (make_packable_type): Update call to
1970 mode_for_size_tree.
1971
1972 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
1973
1974 * gcc-interface/utils2.c (build_load_modify_store):
1975 Use int_mode_for_size.
1976
1977 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
1978
1979 PR ada/62235
1980 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
1981 for Itypes that are E_Record_Subtype with a cloned subtype.
1982 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
1983
1984 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
1985
1986 * gcc-interface/trans.c (convert_with_check): Use a custom base type
1987 if the base type of the expression has a different machine mode.
1988 Rename a couple of parameters and local variable.
1989
1990 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
1991
1992 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
1993 conversions around prefixes that are not references.
1994
1995 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
1996
1997 * gcc-interface/utils.c (unchecked_convert): When the result type is a
1998 non-biased integral type with size 0, set the result to 0 directly.
1999
2000 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2001
2002 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
2003 (renaming_from_instantiation_p): ...this.
2004 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
2005 instead of explicit tests on kind of entities. Adjust for renaming.
2006 (gnat_to_gnu_profile_type): Likewise.
2007 (gnat_to_gnu_subprog_type): Likewise.
2008 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
2009 (Case_Statement_to_gnu): Likewise.
2010 (gnat_to_gnu): Likewise.
2011 (process_freeze_entity): Likewise.
2012 (process_type): Likewise.
2013 (add_stmt_with_node): Adjust for renaming.
2014 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
2015 (renaming_from_generic_instantiation_p): Rename to...
2016 (renaming_from_instantiation_p): ...this. Use inline predicate.
2017 (pad_type_hasher::keep_cache_entry): Fold.
2018
2019 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2020
2021 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
2022 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
2023 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
2024 (N_Slice): Likewise.
2025 (N_Selected_Component): Likewise. Do not try again to translate it.
2026 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
2027
2028 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2029
2030 * repinfo.ads: Document new treatment of dynamic values.
2031 (TCode): Bump upper bound to 29.
2032 (Dynamic_Val): New constant set to 29.
2033 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
2034 (Rep_Value) <Dynamic_Val>: Likewise.
2035 * repinfo.h (Dynamic_Val): New macro.
2036 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
2037 DECL_P nodes too.
2038 <INTEGER_CST>: Set TCODE instead of recursing.
2039 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
2040 <VAR_DECL>: New case.
2041 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
2042 <BIT_AND_EXPR>: Adjust.
2043 <CALL_EXPR>: Do not fall through.
2044
2045 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2046
2047 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
2048 there is no target, do not create a temporary for the return value for
2049 an allocator either.
2050
2051 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
2052
2053 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
2054 unconstrained array type.
2055
2056 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2057 Alan Hayward <alan.hayward@arm.com>
2058 David Sherwood <david.sherwood@arm.com>
2059
2060 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
2061 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
2062
2063 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2064 Alan Hayward <alan.hayward@arm.com>
2065 David Sherwood <david.sherwood@arm.com>
2066
2067 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
2068 is_a <scalar_int_mode>.
2069 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
2070 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
2071
2072 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2073 Alan Hayward <alan.hayward@arm.com>
2074 David Sherwood <david.sherwood@arm.com>
2075
2076 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
2077 instead of mode_for_size.
2078 (gnat_to_gnu_subprog_type): Likewise.
2079 * gcc-interface/utils.c (make_type_from_size): Likewise.
2080
2081 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2082 Alan Hayward <alan.hayward@arm.com>
2083 David Sherwood <david.sherwood@arm.com>
2084
2085 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
2086 (fp_size_to_prec): Likewise.
2087
2088 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2089 Alan Hayward <alan.hayward@arm.com>
2090 David Sherwood <david.sherwood@arm.com>
2091
2092 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
2093 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
2094
2095 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2096 Alan Hayward <alan.hayward@arm.com>
2097 David Sherwood <david.sherwood@arm.com>
2098
2099 * gcc-interface/decl.c (validate_size): Update use of
2100 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
2101
2102 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2103 Alan Hayward <alan.hayward@arm.com>
2104 David Sherwood <david.sherwood@arm.com>
2105
2106 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
2107 (fp_size_to_prec): Likewise.
2108
2109 2017-08-29 Martin Liska <mliska@suse.cz>
2110
2111 PR other/39851
2112 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
2113
2114 2017-08-08 Martin Liska <mliska@suse.cz>
2115
2116 * gcc-interface/trans.c: Include header files.
2117
2118 2017-07-29 Jakub Jelinek <jakub@redhat.com>
2119
2120 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
2121 as new argument to the imported_module_or_decl debug hook.
2122
2123 2017-07-25 Javier Miranda <miranda@adacore.com>
2124
2125 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
2126 evaluated twice.
2127
2128 2017-07-19 Jakub Jelinek <jakub@redhat.com>
2129
2130 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
2131 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
2132 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
2133
2134 2017-07-18 Mike Frysinger <vapier@chromium.org>
2135
2136 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
2137 (../../gnatlink$(exeext)): Likewise.
2138
2139 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2140
2141 PR ada/81446
2142 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
2143 (Backend_Overflow_Checks): Set to True.
2144
2145 2017-06-23 Jakub Jelinek <jakub@redhat.com>
2146
2147 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
2148
2149 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
2150
2151 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
2152 notice. New macro.
2153 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
2154 as a definition.
2155 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
2156 definition.
2157 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
2158 imported subprograms for the current compilation unit as
2159 definitions. Disable debug info for references to variables.
2160 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
2161 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
2162 not built-in functions to their binding scope.
2163 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
2164 the function as a definition. Update all callers.
2165 (gnat_write_global_declarations): Emit debug info for imported
2166 functions. Filter out external variables for which debug info
2167 is disabled.
2168
2169 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
2170
2171 PR ada/81105
2172 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
2173 (i[3456]86-pc-gnu): Likewise.
2174 (x86_64 kfreebsd): Likewise.
2175
2176 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2177
2178 PR bootstrap/80897
2179 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
2180
2181 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
2182
2183 PR ada/81070
2184 * s-interr-hwint.adb: Reinstate.
2185 * gcc-interface/Makefile.in (RTEMS): Use it again.
2186
2187 2017-06-08 Olivier Hainque <hainque@adacore.com>
2188
2189 * vx_crtbegin_auto.c: Update year in copyright notice.
2190 * vx_crtbegin.c: Likewise.
2191 * vx_crtbegin.inc: Likewise.
2192 * vx_crtend.c: Likewise.
2193
2194 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2195
2196 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
2197 * s-tpopsp-rtems.adb: Delete.
2198
2199 2017-06-02 Olivier Hainque <hainque@adacore.com>
2200
2201 * vx_crtbegin_auto.c: New file.
2202 * vx_crtbegin.c: New file.
2203 * vx_crtbegin.inc: New file.
2204 * vx_crtend.c: New file.
2205
2206 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
2207
2208 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
2209 const qualifiers that cause -Wignored-qualifiers warnings.
2210
2211 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2212
2213 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2214 for Itypes that are E_Access_Subtype.
2215 <E_Access_Subtype>: Use the DECL of the base type directly.
2216
2217 2017-05-22 Ed Schonberg <schonberg@adacore.com>
2218 Eric Botcazou <ebotcazou@adacore.com>
2219
2220 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
2221 limited view may appear in the profile of a function, and a call to
2222 that function in another unit in which the full view is available must
2223 use this full view to spurious type errors at the point of call.
2224 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
2225 of parent body with a with clause for the main unit.
2226 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
2227 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
2228 types declared in external units like types from limited with clauses.
2229 Adjust final processing of defer_limited_with_list accordingly.
2230 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
2231 again to translate the prefix after the field if it is incomplete.
2232
2233 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
2234
2235 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
2236 alignment for simple volatile fields and remove associated errors.
2237
2238 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2239
2240 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
2241 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
2242
2243 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
2244
2245 * gcc-interface/utils.c (can_materialize_object_renaming_p):
2246 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
2247 process Original_Node instead of expanded names.
2248
2249 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2250
2251 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
2252 addressability check in the constrained case.
2253
2254 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2255
2256 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
2257 types not coming from a limited context.
2258
2259 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2260
2261 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
2262 the inlined list that are not public.
2263 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
2264 there is a pragma Inline_Always on the subprogram.
2265
2266 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2267
2268 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
2269 <N_Allocator>: Use properly typed constants.
2270 (extract_values): Move around.
2271 (pos_to_constructor): Minor tweaks.
2272 (Sloc_to_locus): Fix formatting.
2273 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
2274 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
2275 (Gigi_Equivalent_Type): Adjust head comment.
2276 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
2277
2278 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
2279
2280 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
2281 is a representation clause on an extension, propagate the alignment of
2282 the parent type only if the platform requires strict alignment.
2283
2284 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
2285
2286 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
2287 instead of Word_Size.
2288
2289 Revert
2290 2017-03-28 Andreas Schwab <schwab@suse.de>
2291
2292 PR ada/80117
2293 * system-linux-aarch64-ilp32.ads: New file.
2294 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
2295 from LIBGNAT_TARGET_PAIRS.
2296 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
2297 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
2298 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
2299 or -mabi=ilp32, resp.
2300
2301 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2302
2303 PR ada/80626
2304 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
2305 instead of Word_Size.
2306
2307 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2308
2309 * raise-gcc.c (exception_class_eq): Make ec parameter const.
2310
2311 2017-05-02 Richard Biener <rguenther@suse.de>
2312
2313 * gcc-interface/misc.c (gnat_post_options): Do not set
2314 -fstrict-overflow.
2315
2316 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2317
2318 * gcc-interface/trans.c (assoc_to_constructor): Make sure
2319 Corresponding_Discriminant is only called on discriminants.
2320 Skip the saving of the result only for them.
2321 (gnat_to_gnu) <N_Selected_Component>: Likewise.
2322 <N_Unchecked_Type_Conversion>: Translate the result type first.
2323 (gigi): Set TREE_NOTHROW on Begin_Handler.
2324 (stmt_list_cannot_raise_p): New predicate.
2325 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
2326 a cleanup if the statements of the handler cannot raise.
2327 (process_freeze_entity): Use Is_Record_Type.
2328 (process_type): Likewise.
2329
2330 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2331
2332 * einfo.ads (Corresponding_Record_Component): New alias
2333 for Node21 used for E_Component and E_Discriminant.
2334 * einfo.adb (Corresponding_Record_Component): New function.
2335 (Set_Corresponding_Record_Component): New procedure.
2336 (Write_Field21_Name): Handle Corresponding_Record_Component.
2337 * sem_ch3.adb (Inherit_Component): Set
2338 Corresponding_Record_Component for every component in
2339 the untagged case. Clear it afterwards for non-girder
2340 discriminants.
2341 * gcc-interface/decl.c (gnat_to_gnu_entity)
2342 <E_Record_Type>: For a derived untagged type with discriminants
2343 and constraints, apply the constraints to the layout of the
2344 parent type to deduce the layout.
2345 (field_is_aliased): Delete.
2346 (components_to_record): Test DECL_ALIASED_P directly.
2347 (annotate_rep): Check that fields are present except for
2348 an extension.
2349 (create_field_decl_from): Add DEBUG_INFO_P
2350 parameter and pass it in recursive and other calls. Add guard
2351 for the manual CSE on the size.
2352 (is_stored_discriminant): New predicate.
2353 (copy_and_substitute_in_layout): Consider only
2354 stored discriminants and check that original fields are present
2355 in the old type. Deal with derived types. Adjust call to
2356 create_variant_part_from.
2357
2358 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2359
2360 * exp_ch6.adb (Expand_Call_Helper): When locating the
2361 accessibility entity created for an access parameter, handle
2362 properly a reference to a formal of an enclosing subprogram. if
2363 the reference appears in an inherited class-wide condition, it
2364 is the rewriting of the reference in the ancestor expression,
2365 but the accessibility entity must be that of the current formal.
2366
2367 2017-05-02 Javier Miranda <miranda@adacore.com>
2368
2369 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
2370 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
2371 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
2372 Call Expand_Non_Binary_Modular_Op.
2373
2374 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2375
2376 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
2377 has discriminants, do not override the Stored_Constraint list of
2378 the full view of the derived type with that of the derived type.
2379
2380 2017-05-02 Bob Duff <duff@adacore.com>
2381
2382 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
2383
2384 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2385
2386 * s-os_lib.ads: Minor typo fix.
2387
2388 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2389
2390 * gnatls.adb: Merge and refactor code from Prj.Env and remove
2391 this deprecated dependency.
2392
2393 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2394
2395 * exp_util.ads: minor comment addition.
2396
2397 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2398
2399 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
2400 pastos in part #3 of the head comment.
2401
2402 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2403
2404 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
2405 procedure body for a local (sub)type declaration within a
2406 predicate function. Invariant checks do not apply to these, and
2407 the expansion of the procedure will happen in the wrong scope,
2408 leading to misplaced freeze nodes.
2409
2410 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2411
2412 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
2413 to analyze generated actions. If the main unit is a body,
2414 the required scope is that of the corresponding unit declaration.
2415
2416 2017-05-02 Arnaud Charlet <charlet@adacore.com>
2417
2418 * einfo.adb (Declaration_Node): flip branches of
2419 an IF statement to avoid repeated negations in its condition;
2420 no change in semantics, only to improve readability.
2421
2422 2017-05-02 Arnaud Charlet <charlet@adacore.com>
2423
2424 * sem_case.adb: Remove extra spaces in parameter declarations.
2425
2426 2017-05-02 Justin Squirek <squirek@adacore.com>
2427
2428 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
2429 in usage line for new -gnatwE switch.
2430
2431 2017-05-02 Claire Dross <dross@adacore.com>
2432
2433 * a-cofuve.ads (Remove): Remove unnecessary
2434 conditions in precondition.
2435
2436 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
2437
2438 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
2439 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
2440
2441 2017-05-02 Justin Squirek <squirek@adacore.com>
2442
2443 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
2444 alternative expression.
2445 * sem_res.adb (Resolve_Case_Expression): Ditto.
2446
2447 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2448
2449 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
2450 Refine predicate for the case where the primitive operation
2451 is a renaming of equality. An overriding operation that is
2452 a user-defined renaming of predefined equality inherits its
2453 slot from the overridden operation. Otherwise it is treated
2454 as a predefined op and occupies the same predefined slot as
2455 equality. A call to it is transformed into a call to its alias,
2456 which is the predefined equality. A dispatching call thus uses
2457 the proper slot if operation is further inherited and called
2458 with class-wide arguments.
2459
2460 2017-05-02 Justin Squirek <squirek@adacore.com>
2461
2462 * errout.adb (Set_Msg_Text): Add a case to switch the message
2463 type when the character '[' is detected signifying a warning
2464 about a run-time exception.
2465 * opt.ads Add a new Warning_Mode value for new switch
2466 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
2467 to handle new warning mode
2468 * usage.adb (Usage): Add usage entry for -gnatwE
2469 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
2470
2471 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2472
2473 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
2474 declaration that operates on some fixed point type.
2475
2476 2017-05-02 Justin Squirek <squirek@adacore.com>
2477
2478 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
2479
2480 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2481
2482 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
2483
2484 2017-05-02 Justin Squirek <squirek@adacore.com>
2485
2486 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
2487 expression (Analyze_If_Expression): Add check for valid condition
2488 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
2489 on case-expression
2490 * sem_res.adb (Resolve_If_Expression): Add check for valid
2491 condition and then-expression.
2492
2493 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2494
2495 * exp_ch3.adb (Build_Initialization_Call): Generate a null
2496 statement if the initialization call is a null procedure, as
2497 can happen with a controlled type with no explicit Initialize
2498 procedure, or an array of such.
2499 * exp_ch7.adb (Process_Object_Declaration): For a type with
2500 controlled components that has a trivial Initialize procedure,
2501 insert declaration for finalization counter after object
2502 declaration itself.
2503 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
2504 finalization block and attendant declarations if component has
2505 a trivial Initialize procedure.
2506 (Make_Init_Call): Do not generate a call if controlled type has
2507 a trivial Initialize procedure.
2508
2509 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2510
2511 * g-forstr.ads (Data): Move Format component last.
2512 * g-forstr.adb ("+"): Adjust for above change.
2513 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
2514 * g-sechas.ads (Context): Move Key last.
2515 * g-socket.ads (Service_Entry_Type): Move Aliases last.
2516 * s-fileio.adb (Temp_File_Record): Move Name last.
2517 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
2518 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
2519
2520 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
2521
2522 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
2523 switch introduced recently. finally not needed.
2524
2525 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2526
2527 * sem_ch6.adb (Analyze_Null_Procedure): Set the
2528 Corresponding_Body link for a null procedure declaration.
2529
2530 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2531
2532 * atree.h (Flag290): Add missing terminating parenthesis.
2533 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
2534 (Set_Is_Class_Wide_Clone): Likewise.
2535 * einfo.ads (Is_Class_Wide_Clone): Likewise.
2536
2537 2017-05-02 Gary Dismukes <dismukes@adacore.com>
2538
2539 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
2540 parameter Array_Comp to indicate the case of an array object
2541 with null-excluding components.
2542 * checks.adb (Null_Exclusion_Static_Checks):
2543 Call Compile_Time_Constraint_Error instead of
2544 Apply_Compile_Time_Constraint_Error in the component case. Also
2545 call that when Array_Comp is True, with an appropriate warning for
2546 the array component case. Only create an explicit initialization
2547 by null in the case of an object of a null-excluding access type
2548 (and no longer do that in the component case).
2549 * sem_ch3.adb (Check_Component): Add a Boolean parameter
2550 Array_Comp defaulted to False. Pass Empty for the Comp
2551 actual when calling Null_Exclusion_Static_Checks in the case
2552 where Comp_Decl matches Object_Decl, because we don't have a
2553 component in that case. In the case of an object or component
2554 of an array type, pass True for Array_Comp on the recursive call
2555 to Check_Component.
2556
2557 2017-05-02 Bob Duff <duff@adacore.com>
2558
2559 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
2560 compute the linux priority from the Ada priority. Call this everywhere
2561 required. In particular, the previous version was not doing this
2562 computation when setting the ceiling priority in various places. It
2563 was just converting to C.int, which results in a ceiling that is off
2564 by 1.
2565
2566 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2567
2568 * sem_ch3.adb: Comment predicate inheritance.
2569
2570 2017-05-02 Tristan Gingold <gingold@adacore.com>
2571
2572 * s-trasym.ads: Add comment.
2573
2574 2017-05-02 Bob Duff <duff@adacore.com>
2575
2576 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
2577 * sem_ch4.adb: Minor reformatting.
2578 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
2579 * s-taspri-posix-noaltstack.ads: Minor refactoring.
2580 * sinput.ads: Minor typo fix.
2581
2582 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2583
2584 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
2585 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
2586 here from exp_ch9, to recognize objects whose creation requires
2587 dynamic allocation, so that the proper warning can be emitted
2588 when restriction No_Implicit_Heap_Allocation is in effect.
2589 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
2590 to emit proper warning when an object that requires dynamic
2591 allocation is declared.
2592
2593 2017-05-02 Tristan Gingold <gingold@adacore.com>
2594
2595 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
2596
2597 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2598
2599 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
2600 visibility rules for equality operators that apply within an
2601 instantiation apply within an inlined body.
2602 * sem_type.adb (Add_One_Interp): ditto.
2603
2604 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2605
2606 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
2607 procedures.
2608
2609 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2610
2611 * snames.ads-tmpl
2612 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
2613 Name_No_Tagged_Streams): Move to regular pragmas. Add
2614 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
2615 and Secondary_Stack_Size.
2616 (Pragma_Id): Move Pragma_Assume,
2617 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
2618 Pragma_No_Tagged_Streams to second part.
2619
2620 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2621
2622 * exp_attr.adb: Minor reformatting.
2623
2624 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2625
2626 * sem_ch4.adb (Analyze_Selected_Component): Improve error
2627 detection for illegal references to private components or
2628 operations of a protected type in the body of the type.
2629
2630 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2631
2632 * opt.ads: Add missing GNAT markers in comments.
2633 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
2634 settings of Optimize_Alignment at the end.
2635
2636 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2637
2638 * checks.adb (Apply_Constraint_Check): Do not apply
2639 a discriminant check when the associated type is a constrained
2640 subtype created for an unconstrained nominal type.
2641 * exp_attr.adb: Minor reformatting.
2642
2643 2017-05-02 Bob Duff <duff@adacore.com>
2644
2645 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
2646 the N_Raise_Expression case.
2647 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
2648 and add assertions.
2649
2650 2017-05-02 Yannick Moy <moy@adacore.com>
2651
2652 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
2653 optimize length comparison in GNATprove mode.
2654 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
2655 operator /= into negation of operator = when needed.
2656 (Expand_SPARK): Call new
2657 function to expand operator /=.
2658
2659 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2660
2661 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
2662 Simplify the expression for a fixed-fixed division to remove
2663 divisions by constants whenever possible, as an optimization
2664 for restricted targets.
2665
2666 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2667
2668 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
2669
2670 2017-05-02 Bob Duff <duff@adacore.com>
2671
2672 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
2673 to find primitive ops, instead of using an Identifier that will
2674 later be looked up. This is necessary because these ops are not
2675 necessarily visible at all places where we need to call them.
2676 * exp_util.ads: Minor comment fix.
2677
2678 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2679
2680 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
2681 references are fully conformant if they are both expansions
2682 of the discriminant of a protected type, within one of the
2683 protected operations. One occurrence may be expanded into a
2684 constant declaration while the other is an input parameter to
2685 the corresponding generated subprogram.
2686
2687 2017-05-02 Justin Squirek <squirek@adacore.com>
2688
2689 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
2690 recursivly searching composite-types for null-excluding access
2691 types and verifying them.
2692 (Analyze_Object_Declaration): Add a
2693 call to Check_Null_Excluding_Components for static verification
2694 of non-initialized objects.
2695 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
2696 a parameter for a composite-type's component and an extra case
2697 for printing component information.
2698
2699 2017-05-02 Yannick Moy <moy@adacore.com>
2700
2701 * sem_ch10.adb (Analyze_Subunit): Take
2702 configuration pragma into account when restoring appropriate
2703 pragma for analysis of subunit.
2704
2705 2017-05-02 Justin Squirek <squirek@adacore.com>
2706
2707 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
2708 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
2709 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
2710 clauses from the runtime.
2711
2712 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
2713
2714 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
2715 array components specially.
2716
2717 2017-05-02 Ed Schonberg <schonberg@adacore.com>
2718
2719 * sem_ch8.adb (Premature_Usage): If the premature usage of
2720 an entity is as the expression in its own object decaration,
2721 rewrite the reference as Any_Id to prevent cascaded errors or
2722 compiler loops when such an entity is used in an address clause.
2723
2724 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
2725
2726 * gcc-interface/decl.c (components_to_record): Add missing guard.
2727
2728 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
2729
2730 * gcc-interface/decl.c (components_to_record): Add more comments.
2731 Put back pending fields onto the regular list if the misalignment
2732 happens to cancel itself.
2733
2734 2017-04-28 Ed Schonberg <schonberg@adacore.com>
2735
2736 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
2737 controlling actual in a prefixed call, preserve the original node
2738 information if the prefix itself has been rewritten, for ASIS use.
2739
2740 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
2741
2742 * exp_ch6.adb (Insert_Post_Call_Actions):
2743 Code clean up. Insert the post-call actions after an enclosing
2744 procedure call when N denotes a function call and appears as an
2745 actual parameter in the procedure call.
2746
2747 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
2748
2749 * freeze.adb (Check_Component_Storage_Order): If there is a clause
2750 for the component, also reject the attribute if the component
2751 doesn't end on a byte boundary and its scalar storage order is
2752 different from that of the enclosing record type.
2753
2754 2017-04-28 Javier Miranda <miranda@adacore.com>
2755
2756 * atree.ads (Info_Messages): Removed.
2757 (Warning_Info_Messages): New counter.
2758 (Report_Info_Messages): New counter.
2759 * err_vars.ads Update documentation.
2760 * errout.adb (Delete_Warning_And_Continuations): Update
2761 Info_Message occurrences.
2762 (Error_Msg_Internal): Update Info_Message occurrences.
2763 (Delete_Warning): Update Info_Message occurrences.
2764 (Write_Error_Summary): Update Info_Message occurrences.
2765 (Output_Messages): Update Info_Message occurrences.
2766 (To_Be_Removed): Update Info_Message occurrences.
2767 (Reset_Warnings): Update Info_Message occurrences.
2768 * errutil.adb (Error_Msg): Update Info_Message occurrences.
2769 (Finalize): Update Info_Message occurrences.
2770 (Initialize): Update Info_Message occurrences.
2771 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
2772 (Compilation_Errors): Update Info_Message_Occurences.
2773
2774 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
2775
2776 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
2777 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
2778 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
2779 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
2780 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
2781 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
2782 Y_Size.
2783 * sem_eval.adb (Why_Not_Static): Initialize Typ.
2784 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
2785
2786 2017-04-28 Bob Duff <duff@adacore.com>
2787
2788 * sem_util.ads, sem_util.adb (Might_Raise): New function
2789 that replaces Is_Exception_Safe, but has the opposite
2790 sense. Is_Exception_Safe was missing various cases -- calls inside
2791 a pragma Debug, calls inside an 'if' or assignment statement,
2792 etc. Might_Raise now walks the entire subtree looking for things
2793 that can raise.
2794 * exp_ch9.adb (Is_Exception_Safe): Remove.
2795 (Build_Protected_Subprogram_Body): Replace call to
2796 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
2797 constants where possible).
2798 * exp_ch7.adb: Rename Is_Protected_Body -->
2799 Is_Protected_Subp_Body. A protected_body is something different
2800 in the grammar.
2801
2802 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
2803
2804 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
2805 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
2806 (P_Discrete_Choice_List): Initialize Expr_Node variable.
2807 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
2808 (P_Protected): Likewise.
2809 * sem_case.adb (Check_Duplicates):
2810 Add pragma Warnings on variable.
2811 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
2812 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
2813 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
2814 (Analyze_Exit_Statement): Initialize Scope_Id variable.
2815 (Analyze_Iterator_Specification): Initialize Bas variable.
2816 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
2817 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
2818 (Analyze_Accept_Statement): Initialize Task_Nam.
2819
2820 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
2821
2822 * checks.adb (Install_Primitive_Elaboration_Check):
2823 Do not generate an elaboration check if all checks have been
2824 suppressed.
2825
2826 2017-04-28 Ed Schonberg <schonberg@adacore.com>
2827
2828 * sem_ch13.adb (Analyze_Aspect_Specifications, case
2829 Interrupt_Handler and Attach_Handler): Generate reference
2830 to protected operation to prevent spurious warnings about
2831 unreferenced entities. Previous scheme failed with style checks
2832 enabled.
2833
2834 2017-04-28 Ed Schonberg <schonberg@adacore.com>
2835
2836 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
2837 that follows an expression function must not be relocated to
2838 the generated body, because it applies to the code that follows.
2839
2840 2017-04-28 Gary Dismukes <dismukes@adacore.com>
2841
2842 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
2843 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
2844 code that might violate the more stringent checking for 'Access
2845 introduced in Ada 2005.
2846
2847 2017-04-28 Arnaud Charlet <charlet@adacore.com>
2848
2849 * a-cforse.adb: minor style fix in comment.
2850
2851 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
2852
2853 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
2854 initialize Block_Decls variable.
2855 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
2856 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
2857 * exp_disp.adb (Expand_Interface_Actuals): Initialize
2858 Formal_DDT and Actual_DDT variables.
2859 (Expand_Interface_Thunk): Initialize Iface_Formal.
2860 (Make_DT): Initialize Size_Comp.
2861 (Make_Select_Specific_Data_Table): Initialize Decls.
2862 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
2863 Also initialize more RPC_Receiver_* variables.
2864 (Build_To_Any_Function): Initialize Cstr_Formal.
2865 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
2866
2867 2017-04-28 Ed Schonberg <schonberg@adacore.com>
2868
2869 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
2870 node between access types, freeze the designated type as well,
2871 so that dispatch table pointers are created in the proper scope,
2872 and not in the constructed body of the expression function.
2873
2874 2017-04-28 Bob Duff <duff@adacore.com>
2875
2876 * alloc.ads (Nodes_Initial): Go back to previous value. The large
2877 value makes large compilations faster, but small compilations slower.
2878
2879 2017-04-28 Arnaud Charlet <charlet@adacore.com>
2880
2881 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
2882
2883 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
2884
2885 * erroutc.adb (Compilation_Errors): Do not consider info messages
2886 as suitable warnings when warnings must be treated as errors.
2887 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
2888 internally-generated packages when outputting completion
2889 information.
2890 * errout.adb (Output_Messages): Do not consider info messages as
2891 suitable warnings when warnings must be treated as errors.
2892 * errutil.adb (Finalize): Do not consider info messages as
2893 suitable warnings when warnings must be treated as errors.
2894
2895 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
2896
2897 * warnsw.ads: Minor fix for incorrect wording in comment.
2898
2899 2017-04-28 Ed Schonberg <schonberg@adacore.com>
2900
2901 * sem_res.adb (In_Instance_Code): New predicate in
2902 Valid_Conversion, to determine whether a type conversion appears
2903 as (or within) an actual for a formal object. Type conversions
2904 in instances are not rechecked in Valid_Conversion because
2905 visibility changes between generic location andi instance may
2906 lead to spurious errors, but conversions within an actual must be
2907 fully checked, and they are not fully resolved when pre-analyzing
2908 the actuals.
2909
2910 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
2911
2912 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
2913 New_Copy_Tree instead of Relocate_Node as any subsequent copies
2914 of the relocated node will have mangled Parent pointers.
2915 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
2916 tables used in conjunction with entity and itype replication.
2917 (Visit_Entity): Rewrite the restriction on which entities
2918 require duplication. The restriction now includes all types.
2919
2920 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
2921
2922 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
2923 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
2924 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
2925 cleanups.
2926
2927 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
2928
2929 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
2930 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
2931
2932 2017-04-28 Gary Dismukes <dismukes@adacore.com>
2933
2934 * exp_util.adb: Minor reformatting.
2935
2936 2017-04-28 Ed Schonberg <schonberg@adacore.com>
2937
2938 * sem_ch4.adb: Fix copy/pasto.
2939
2940 2017-04-27 Tristan Gingold <gingold@adacore.com>
2941
2942 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
2943 raise-gcc.c. Fix include search path for raise-gcc.c
2944
2945 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
2946
2947 * fe.h (Warn_On_Questionable_Layout): Declare.
2948 * warnsw.ads (Warn_On_Record_Holes): Move down.
2949 (Warn_On_Questionable_Layout): New boolean variable.
2950 (Warning_Record): Add Warn_On_Questionable_Layout field.
2951 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
2952 (Restore_Warnings): Likewise.
2953 (Save_Warnings): Likewise.
2954 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
2955 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
2956 components_to_record.
2957 (gnu_field_to_gnat): New function.
2958 (warn_on_field_placement): Likewise.
2959 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
2960 parameters. Rename local variables and adjust recursive call.
2961 Rework final scan of the field list and implement warnings on the
2962 problematic placement of specific sorts of fields.
2963
2964 2017-04-27 Bob Duff <duff@adacore.com>
2965
2966 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
2967 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
2968 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
2969 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
2970 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
2971 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
2972 For efficiency, cache results of Is_Internal_File_Name and
2973 Is_Predefined_File_Name in the Units table. This avoids a lot
2974 of repeated text processing.
2975
2976 2017-04-27 Emmanuel Briot <briot@adacore.com>
2977
2978 * g-comlin.adb (Sort_Sections): remove useless test.
2979
2980 2017-04-27 Claire Dross <dross@adacore.com>
2981
2982 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
2983 allow the use of regular equality over elements in contracts.
2984 (Formal_Model): Ghost package containing model functions that are
2985 used in subprogram contracts.
2986 (Current_To_Last): Removed, model functions should be used instead.
2987 (First_To_Previous): Removed, model functions should be used instead.
2988 (Strict_Equal): Removed, model functions should be used instead.
2989 (No_Overlap): Removed, model functions should be used instead.
2990 (Equivalent_Keys): Functions over cursors are removed. They were
2991 awkward with explicit container parameters.
2992 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
2993 allow the use of regular equality over elements in contracts.
2994 (Formal_Model): Ghost package containing model functions that
2995 are used in subprogram contracts.
2996 (Current_To_Last): Removed, model functions should be used instead.
2997 (First_To_Previous): Removed, model functions should be used instead.
2998 (Strict_Equal): Removed, model functions should be used instead.
2999 (No_Overlap): Removed, model functions should be used instead.
3000
3001 2017-04-27 Yannick Moy <moy@adacore.com>
3002
3003 * gnat1drv.adb: Code cleanup.
3004
3005 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3006
3007 * exp_util.adb (Replace_Entity): The prefix of a 'Result
3008 attribute reference in a post- condition is the subprogram to
3009 which the condition applies. If the condition is inherited
3010 by a type extension, the prefix becomes a reference to the
3011 inherited operation, but there is no need to create a wrapper
3012 for this operation, because 'Result is expanded independently
3013 when elaborating the postconditions.
3014
3015 2017-04-27 Bob Duff <duff@adacore.com>
3016
3017 * sinput.adb: Minor code cleanup.
3018 * namet.adb (Append): Create faster versions of
3019 Append(String) and Append(Name_Id) by using slice assignment
3020 instead of loops.
3021 * sem_util.adb (In_Instance): Speed this up by removing
3022 unnecessary tests; Is_Generic_Instance is defined for all
3023 entities.
3024 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
3025 Remove unused function.
3026 * alloc.ads (Nodes_Initial): Use a much larger value, because
3027 the compiler was spending a lot of time copying the nodes table
3028 when it grows. This number was chosen in 1996, so is rather out
3029 of date with current memory sizes. Anyway, it's virtual memory.
3030 Get rid of Orig_Nodes_...; use Node_... instead.
3031 * atree.adb (Lock): Do not release the Nodes tables; it's a
3032 waste of time.
3033 Orig_Nodes_ ==> Nodes_
3034 * nlists.adb: Orig_Nodes_ ==> Nodes_
3035 * g-table.adb: Remove unused "with" clause.
3036 * g-table.ads, table.ads: Remove Big_Table_Type, which should
3037 not be used by clients.
3038 * g-dyntab.adb (Last_Allocated): New function
3039 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
3040
3041 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3042
3043 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
3044 check.
3045 (Subtypes_Statically_Match): Remove duplicate check.
3046 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
3047
3048 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3049
3050 * exp_aggr.adb (Replace_Type): Remove the special processing
3051 for selected components.
3052 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
3053 processing for attributes Fixed_Value and Integer_Value.
3054 * exp_util.adb (Side_Effect_Free): Merge the processing for
3055 qualified expressions, type conversions, and unchecked type
3056 conversions.
3057 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
3058 and Optional.
3059 * par-ch3.adb (P_Declarative_Items): Merge the processing for
3060 tokens function, not, overriding, and procedure.
3061 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
3062 for qualified expressions, type conversions, and unchecked
3063 type conversions.
3064 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
3065 processing for Ada 83 and instances.
3066 (Object_Access_Level): Merge the processing for indexed components
3067 and selected components.
3068 * uname.adb (Add_Node_Name): Merge the processing for stubs.
3069
3070 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3071
3072 * checks.adb (Install_Primitive_Elaboration_Check):
3073 Do not generate the check when restriction No_Elaboration_Code
3074 is in effect.
3075
3076 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3077
3078 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
3079 of Expand_Dispatching_Call. If the denoted subprogram has a
3080 class-wide precondition, this is the only precondition that
3081 applies to the call, rather that the class-wide preconditions
3082 that may apply to the body that is executed. (This is specified
3083 in AI12-0195).
3084
3085 2017-04-27 Yannick Moy <moy@adacore.com>
3086
3087 * gnat1drv.adb (Adjust_Global_Switches): Issue
3088 a warning in GNATprove mode if the runtime library does not
3089 support IEEE-754 floats.
3090
3091 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3092
3093 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
3094 is itself inherited it does not carry any contract information,
3095 so examine its parent operation which is its Alias.
3096
3097 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3098
3099 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
3100 prefix can be an object reference in which case Obj'Image (X)
3101 can only be interpreted as an indexing of the parameterless
3102 version of the attribute.
3103 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
3104 an indexing or a slice operation if the attribute does not require
3105 parameters. In Ada2012 'Image also belongs in this category,
3106 and A'Image (lo .. hi) is legal and must be parsed as a slice.
3107
3108 2017-04-27 Yannick Moy <moy@adacore.com>
3109
3110 * exp_ch4.adb: Minor reformatting.
3111 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
3112 disable the CodePeer and C generation modes. Similar to the
3113 opposite actions done in CodePeer mode.
3114
3115 2017-04-27 Yannick Moy <moy@adacore.com>
3116
3117 * sem_res.adb: Remove duplicate code.
3118 * sem_attr.adb: Delete duplicate code.
3119
3120 2017-04-27 Bob Duff <duff@adacore.com>
3121
3122 * g-dyntab.adb: Reduce the amount of copying in
3123 Release. No need to copy items past Last.
3124
3125 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3126
3127 * checks.adb Add with and use clauses for Sem_Disp.
3128 (Install_Primitive_Elaboration_Check): New routine.
3129 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
3130 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
3131 processing of 'Elaborated.
3132 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
3133 elaboration check.
3134
3135 2017-04-27 Bob Duff <duff@adacore.com>
3136
3137 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
3138 If the table grows and then shrinks back to empty, we won't necessarily
3139 point back to the empty array. Code cleanups.
3140 * sinput.ads: Add 'Base to Size clause to match the declared
3141 component subtypes.
3142
3143 2017-04-27 Claire Dross <dross@adacore.com>
3144
3145 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
3146 allow the use of regular equality over elements in contracts.
3147 (Formal_Model): Ghost package containing model functions that
3148 are used in subprogram contracts.
3149 (Current_To_Last): Removed, model functions should be used instead.
3150 (First_To_Previous): Removed, model functions should be used instead.
3151 (Strict_Equal): Removed, model functions should be used instead.
3152 (No_Overlap): Removed, model functions should be used instead.
3153 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
3154 Boolean generic parameter to disable contracts for equivalence
3155 between keys.
3156 (Witness): Create a witness of a key that is used for handling of
3157 equivalence between keys.
3158 (Has_Witness): Check whether a witness is contained in a map.
3159 (W_Get): Get the element associated to a witness.
3160 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
3161 directly.
3162 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
3163 Boolean generic parameter to disable contracts for equivalence
3164 between keys.
3165 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
3166 of equivalence on functional maps.
3167 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
3168 of equivalence on functional maps.
3169
3170 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3171
3172 * exp_ch9.adb (Expand_Entry_Barrier): Code
3173 cleanup. Do not perform the optimization which removes the
3174 declarations of the discriminant and component renamings when
3175 validity checks on operands and attributes are in effect.
3176
3177 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3178
3179 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
3180 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
3181 a-cfhama.ads, a-cofove.ads: Minor reformatting.
3182
3183 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3184
3185 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
3186 pointer dereference.
3187 * g-spipat.adb (Dump): Code clean up. Protect against a possible
3188 null pointer dereference.
3189
3190 2017-04-27 Bob Duff <duff@adacore.com>
3191
3192 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
3193 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
3194 Free renames Init, since they do the same thing.
3195 * g-table.ads: Default for Table_Low_Bound.
3196 * table.ads: Default for Table_Low_Bound, Table_Initial, and
3197 Table_Increment.
3198
3199 2017-04-27 Bob Duff <duff@adacore.com>
3200
3201 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
3202 can reallocate.
3203 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
3204 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
3205 Reorder code so that above assertions do not fail.
3206 * table.ads: Remove obsolete comment on Locked.
3207
3208 2017-04-27 Claire Dross <dross@adacore.com>
3209
3210 * a-cfdlli.ads: Code cleanup.
3211
3212 2017-04-27 Yannick Moy <moy@adacore.com>
3213
3214 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
3215 when needed for proof. (Expand_SPARK): Call the new procedure.
3216 * exp_util.ads Fix typo.
3217
3218 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3219
3220 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
3221 fixes.
3222
3223 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3224
3225 * sem_elab.adb Add new type Visited_Element
3226 and update the contents of table Elab_Visited. Various code clean up.
3227 (Check_Elab_Call): Determine whether a prior call to
3228 the same subprogram was already examined within the same context.
3229 (Check_Internal_Call_Continue): Register the subprogram being
3230 called as examined within a particular context. Do not suppress
3231 elaboration warnings.
3232
3233 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3234
3235 * xoscons.adb, osint.ads: Minor reformatting.
3236
3237 2017-04-27 Bob Duff <duff@adacore.com>
3238
3239 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
3240 Table_Count_Type --> Table_Last_Type, because the name
3241 was confusing (a "count" usually starts at zero). Add
3242 functionality supported or needed by other tables packages
3243 (Move, Release_Threshold).
3244 * g-table.ads, g-table.adb: This is now just a thin wrapper
3245 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
3246 or needed by other tables packages (Save, Restore).
3247 * table.ads, table.adb: This is now just a thin wrapper around
3248 * g-table.ads/g-table.adb.
3249 * namet.h, scos.h, uintp.h: These files are reaching into the
3250 private data of some instances of g-table, whose names changed,
3251 so the above change requires some adjustment here. It now uses
3252 public interfaces.
3253
3254 2017-04-27 Bob Duff <duff@adacore.com>
3255
3256 * namet.adb, namet.ads: Minor: remove unused procedures.
3257
3258 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3259
3260 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
3261 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
3262 Add pragma Warnings on Rtype variable in nested block. *
3263 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
3264 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
3265 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
3266 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
3267 (Process_Component_List_For_Finalize): Initialize Counter_Id.
3268 (Build_Finalize_Statements): Initialize Bod_Stmts.
3269 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
3270
3271 2017-04-27 Claire Dross <dross@adacore.com>
3272
3273 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
3274 allow the use of regular equality over elements in contracts.
3275 (Formal_Model): Ghost package containing model functions that are
3276 used in subprogram contracts.
3277 (Current_To_Last): Removed, model
3278 functions should be used instead.
3279 (First_To_Previous): Removed, model functions should be used instead.
3280 (Strict_Equal): Removed, model functions should be used instead.
3281 (No_Overlap): Removed, model functions should be used instead.
3282 (Equivalent_Keys): Functions over cursors are removed. They were
3283 awkward with explicit container parameters.
3284 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
3285 (proof only) procedure to help GNATprove when equivalence over
3286 keys is not equality.
3287
3288 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3289
3290 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
3291 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
3292 Minor reformatting and code cleanups.
3293
3294 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3295
3296 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
3297 subsidiary of Check_Inherited_Conditions, to build pragmas for an
3298 operation whose ancestor has classwide pre/postconditions. This
3299 is used both to check the legality of the inheritance in Ada
3300 and in SPARK, and to determine whether a wrapper is needed for
3301 an inherited operation.
3302 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
3303 Improve placement of error message for inherited classwide
3304 conditions that become illegal on type derivation.
3305
3306 2017-04-27 Yannick Moy <moy@adacore.com>
3307
3308 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
3309 SPARK_Mode from context on generic package.
3310 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
3311 useless test.
3312
3313 2017-04-27 Claire Dross <dross@adacore.com>
3314
3315 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
3316 overflows in computations.
3317 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
3318 overflows in computations.
3319 (Insert): Rewrite precondition to avoid overflows in computations.
3320 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
3321 overflows in computations.
3322 (Insert): Rewrite precondition to avoid overflows in computations.
3323
3324 2017-04-27 Steve Baird <baird@adacore.com>
3325
3326 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
3327 flag when it is declared in order to avoid confusing CodePeer about
3328 the possibility of an uninitialized variable read.
3329
3330 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3331
3332 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
3333 no dimensionality error if the subtype of the expression is
3334 identical to the nominal subtype in the declaration, even though
3335 the expression itself may have been constant-folded and lack a
3336 dimension vector.
3337 * sem_dim.ads: Add comments on setting of dimension vectors and
3338 its interaction with node rewritings and side-effect removal.
3339
3340 2017-04-27 Bob Duff <duff@adacore.com>
3341
3342 * debug.adb: Minor comment correction.
3343 * sem_dim.ads: Minor reformatting and typo fixes.
3344
3345 2017-04-27 Bob Duff <duff@adacore.com>
3346
3347 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
3348 Last of the tables via function calls, rather than relying on layout
3349 of data structures.
3350
3351 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3352
3353 * exp_util.adb: No wrapper in GNATprove mode.
3354
3355 2017-04-27 Yannick Moy <moy@adacore.com>
3356
3357 * sem_res.adb (Resolve_Comparison_Op): Always
3358 evaluate comparisons between values of universal types.
3359
3360 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3361
3362 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
3363 an elaboration counter nor a check when in GNATprove mode.
3364 * sem_util.adb (Build_Elaboration_Entity): Do not create an
3365 elaboration counter when in GNATprove mode.
3366
3367 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3368
3369 * freeze.adb: copy-paste typo.
3370
3371 2017-04-27 Yannick Moy <moy@adacore.com>
3372
3373 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
3374 Use correct test to detect call in GNATprove mode instead of
3375 compilation.
3376
3377 2017-04-27 Claire Dross <dross@adacore.com>
3378
3379 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
3380 New property function expressing that the element of a
3381 sequence are contained in the union of two sequences.
3382 (Formal_Model.M_Elements_Included): New property function
3383 expressing that the element of a sequence are another sequence.
3384 (Generic_Sorting): Use new property functions to state that
3385 elements are preserved by Sort and Merge.
3386 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
3387 allow the use of regular equality over elements in contracts.
3388 (Formal_Model): Ghost package containing model functions
3389 that are used in subprogram contracts. (Capacity):
3390 On unbounded containers, return the maximal capacity.
3391 (Current_To_Last): Removed, model functions should be used instead.
3392 (First_To_Previous): Removed, model functions should be used instead.
3393 (Append): Default parameter value replaced
3394 by new wrapper to allow more precise contracts.
3395 (Insert): Subprogram restored, it seems it was useful to users even if
3396 it is inefficient.
3397 (Delete): Subprogram restored, it seems it was useful to users even if
3398 it is inefficient.
3399 (Prepend): Subprogram restored, it seems it was useful to users even
3400 if it is inefficient.
3401 (Delete_First): Subprogram restored, it seems it
3402 was useful to users even if it is inefficient. (Delete_Last):
3403 Default parameter value replaced by new wrapper to allow more
3404 precise contracts.
3405 (Generic_Sorting.Merge): Subprogram restored.
3406 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
3407 allow the use of regular equality over elements in contracts.
3408 (Formal_Model): Ghost package containing model functions
3409 that are used in subprogram contracts. (Capacity):
3410 On unbounded containers, return the maximal capacity.
3411 (Current_To_Last): Removed, model functions should be used
3412 instead.
3413 (First_To_Previous): Removed, model functions should be used instead.
3414 (Append): Default parameter value replaced
3415 by new wrapper to allow more precise contracts.
3416 (Insert): Subprogram restored, it seems it was useful to users even if
3417 it is inefficient.
3418 (Delete): Subprogram restored, it seems it was useful to users even if
3419 it is inefficient.
3420 (Prepend): Subprogram restored, it seems it was useful to users even
3421 if it is inefficient.
3422 (Delete_First): Subprogram restored, it seems it
3423 was useful to users even if it is inefficient. (Delete_Last):
3424 Default parameter value replaced by new wrapper to allow more
3425 precise contracts.
3426 (Generic_Sorting.Merge): Subprogram restored.
3427 (Vector): Do not reuse formal vectors, as it is no longer possible
3428 to supply them with an equality function over elements.
3429
3430 2017-04-27 Bob Duff <duff@adacore.com>
3431
3432 * g-dyntab.adb (Release): When allocating the new
3433 table, use the correct slice of the old table to initialize it.
3434
3435 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
3436
3437 * einfo.ads: Minor fixes in comments.
3438
3439 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3440
3441 * sem_prag.adb: disable clones in SPARK_Mode.
3442
3443 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3444
3445 * sem_util.ads, contracts.adb: Minor reformatting.
3446
3447 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3448
3449 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
3450 Build body of subprogram that has a class-wide condition that
3451 contains calls to other primitives.
3452 (Build_Class_Wide_Clone_Call); Build a call to the common
3453 class-wide clone of a subprogram with classwide conditions. The
3454 body of the subprogram becomes a wrapper for a call to the
3455 clone. The inherited operation becomes a similar wrapper to which
3456 modified conditions apply, and the call to the clone includes
3457 the proper conversion in a call the parent operation.
3458 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
3459 subprogram that has a classwide condition that contains calls to
3460 other primitives, build an internal subprogram that is invoked
3461 through a type-specific wrapper for all inherited subprograms
3462 that may have a modified condition.
3463 * sem_prag.adb (Check_References): If subprogram has a classwide
3464 condition, create entity for corresponding clone, to be invoked
3465 through wrapper subprograns.
3466 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
3467 message about placement if pragma isi internally generated.
3468 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
3469 a classwide clone, build body of clone as copy of original body,
3470 and rewrite original body as a wrapper as a wrapper for a call to
3471 the clone, so that it incorporates the original pre/postconditions
3472 of the subprogram.
3473 * freeze.adb (Check_Inherited_Conditions): For an inherited
3474 subprogram that inherits a classwide condition, build spec and
3475 body of corresponding wrapper so that call to inherited operation
3476 gets the modified conditions.
3477 * contracts.adb (Analyze_Contracts): If analysis of classwide
3478 condition has created a clone for a primitive operation, analyze
3479 declaration of clone.
3480
3481 2017-04-27 Steve Baird <baird@adacore.com>
3482
3483 * exp_util.adb (Build_Allocate_Deallocate_Proc):
3484 Add "Suppress => All_Checks" to avoid generating unnecessary
3485 checks.
3486
3487 2017-04-27 Yannick Moy <moy@adacore.com>
3488
3489 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
3490 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
3491 inlining body in GNATprove mode when switch -gnatdm used.
3492 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
3493 in GNATprove mode when switch -gnatdm used.
3494
3495 2017-04-27 Arnaud Charlet <charlet@adacore.com>
3496
3497 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
3498 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
3499 clauses, so that we keep an indication of the address clause
3500 before removing it from the tree.
3501
3502 2017-04-27 Yannick Moy <moy@adacore.com>
3503
3504 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
3505 of expression being qualified, when not an object name, or else
3506 evaluate the underlying name.
3507
3508 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
3509
3510 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
3511
3512 2017-04-27 Justin Squirek <squirek@adacore.com>
3513
3514 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
3515 Process_Component_List_For_Finalization as a local variable.
3516 (Process_Component_For_Finalize): Add an extra parameter to avoid
3517 global references.
3518 (Process_Component_List_For_Finalization): Correct calls to
3519 Process_Component_For_Finalize to take Num_Comps as a parameter.
3520
3521 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3522
3523 * sem_ch8.adb (Find_Direct_Name): Account for the case where
3524 a use-visible entity is defined within a nested scope of an
3525 instance when giving priority to entities which were visible in
3526 the original generic.
3527 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
3528
3529 2017-04-27 Tristan Gingold <gingold@adacore.com>
3530
3531 * raise-gcc.c: Don't use unwind.h while compiling
3532 for the frontend, but mimic host behavior.
3533
3534 2017-04-27 Javier Miranda <miranda@adacore.com>
3535
3536 * sem_ch3.adb (Build_Discriminated_Subtype):
3537 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
3538
3539 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3540
3541 * sem_prag.adb (Analyze_Global_Item):
3542 Do not consider discriminants because they are not "entire
3543 objects". Remove the discriminant-related checks because they are
3544 obsolete.
3545 (Analyze_Input_Output): Do not consider discriminants
3546 because they are not "entire objects".
3547
3548 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3549
3550 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
3551 perform check if the current scope does not come from source,
3552 as is the case for a rewritten task body, because check has
3553 been performed already, and may not be doable because of changed
3554 visibility.
3555
3556 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3557
3558 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
3559 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
3560 Minor reformatting.
3561
3562 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3563
3564 * sem_ch4.adb (Analyze_Call): If the return type of a function
3565 is incomplete in an context in which the full view is available,
3566 replace the type of the call by the full view, to prevent spurious
3567 type errors.
3568 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
3569 abstract subprogram so that compiler does not reject a parameter
3570 of a primitive operation of a tagged type being frozen, when
3571 the untagged type of that parameter cannot be frozen.
3572
3573 2017-04-27 Bob Duff <duff@adacore.com>
3574
3575 * sem_attr.adb (Compute_Type_Key): Don't walk
3576 representation items for irrelevant types, which could be in a
3577 different source file.
3578
3579 2017-04-27 Steve Baird <baird@adacore.com>
3580
3581 * exp_attr.adb (Expand_N_Attribute_Reference):
3582 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
3583 for CodePeer.
3584
3585 2017-04-27 Yannick Moy <moy@adacore.com>
3586
3587 * exp_unst.ads: Fix typos in comments.
3588
3589 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3590
3591 * sem_eval.adb (Choice_Matches): Handle properly a real literal
3592 whose type has a defined static predicate.
3593
3594 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3595
3596 * exp_ch4.adb (Insert_Dereference_Action):
3597 Do not adjust the address of a controlled object when the
3598 associated access type is subject to pragma No_Heap_Finalization.
3599 Code reformatting.
3600
3601 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
3602
3603 * gcc-interface/utils.c (gnat_type_for_size): Set
3604 TYPE_ARTIFICIAL on created types.
3605
3606 2017-04-27 Claire Dross <dross@adacore.com>
3607
3608 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
3609 modifications in functional containers.
3610 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
3611 to improve readablity. Subprograms are separated between basic
3612 operations, constructors and properties. Universally quantified
3613 formulas in contracts are factorized in independant functions
3614 with a name and a comment. Names of parameters are improved.
3615
3616 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3617
3618 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
3619
3620 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3621
3622 * sem_res.adb (Resolve_Type_Conversion): Do not
3623 install a predicate check here since this is already done during
3624 the expansion phase. Verify whether the operand satisfies the
3625 static predicate (if any) of the target type.
3626 * sem_ch3.adb (Analyze_Object_Declaration): Do
3627 not install a predicate check if the object is initialized by
3628 means of a type conversion because the conversion is subjected
3629 to the same check.
3630
3631 2017-04-27 Tristan Gingold <gingold@adacore.com>
3632
3633 * raise.c (__gnat_builtin_longjmp): Remove.
3634 (__gnat_bracktrace):
3635 Add a dummy definition for the compiler (__gnat_eh_personality,
3636 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
3637 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
3638 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
3639 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
3640 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
3641 and a-except-2005.adb.
3642 * raise-gcc.c: Allow build in compiler, compiled as a C++
3643 file.
3644 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
3645 (db): Constify msg_format.
3646 (get_call_site_action_for): Don't use void arithmetic.
3647 * system.ads (Frontend_Exceptions): Set to False.
3648 (ZCX_By_Default): Set to True.
3649 (GCC_ZC_Support): Set to True.
3650 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
3651 a-except.ad[sb].
3652 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
3653 in gnat1 and gnatbind.
3654 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
3655 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
3656 * s-excmac.ads, s-excmac.adb: Copy of variants.
3657 * a-except.o: Adjust preequisites.
3658 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
3659
3660 2017-04-27 Claire Dross <dross@adacore.com>
3661
3662 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
3663 modifications in functional containers.
3664 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
3665 to improve readablity. Subprograms are separated between basic
3666 operations, constructors and properties. Universally quantified
3667 formulas in contracts are factorized in independant functions
3668 with a name and a comment. Names of parameters are improved.
3669
3670 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3671
3672 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
3673
3674 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3675
3676 * sem_res.adb (Resolve_Type_Conversion): Do not
3677 install a predicate check here since this is already done during
3678 the expansion phase. Verify whether the operand satisfies the
3679 static predicate (if any) of the target type.
3680 * sem_ch3.adb (Analyze_Object_Declaration): Do
3681 not install a predicate check if the object is initialized by
3682 means of a type conversion because the conversion is subjected
3683 to the same check.
3684
3685 2017-04-27 Tristan Gingold <gingold@adacore.com>
3686
3687 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
3688 replaced by their variants).
3689
3690 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3691
3692 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
3693 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
3694 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
3695
3696 2017-04-27 Tristan Gingold <gingold@adacore.com>
3697
3698 * s-excmac-gcc.ads, s-excmac-gcc.adb,
3699 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
3700 Ada95.
3701
3702 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3703
3704 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
3705 the loop which detects potential enclosing transient scopes. The
3706 loop now terminates much earlier as transient scopes are bounded
3707 by packages and subprograms.
3708
3709 2017-04-27 Claire Dross <dross@adacore.com>
3710
3711 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
3712 allow the use of regular equality over elements in contracts.
3713 (Cursor): Type is now public so that it can be used in
3714 model functions.
3715 (Formal_Model): Ghost package containing
3716 model functions that are used in subprogram contracts.
3717 (Current_To_Last): Removed, model functions should be used
3718 instead.
3719 (First_To_Previous): Removed, model functions should
3720 be used instead.
3721 (Strict_Equal): Removed, model functions
3722 should be used instead.
3723 (Append): Default parameter value
3724 replaced by new wrapper to allow more precise contracts.
3725 (Insert): Default parameter value replaced by new wrapper to
3726 allow more precise contracts.
3727 (Delete): Default parameter
3728 value replaced by new wrapper to allow more precise contracts.
3729 (Prepend): Default parameter value replaced by new wrapper to
3730 allow more precise contracts.
3731 (Delete_First): Default parameter
3732 value replaced by new wrapper to allow more precise contracts.
3733 (Delete_Last): Default parameter value replaced by new wrapper
3734 to allow more precise contracts.
3735
3736 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3737
3738 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
3739 for object declarations.
3740 (Expand_SPARK_N_Object_Declaration): New routine.
3741 * sem_elab.adb (Check_A_Call): Include calls to the
3742 Default_Initial_Condition procedure of a type under the SPARK
3743 elaboration checks umbrella.
3744
3745 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3746
3747 * sem.adb (Analyze): Diagnose an illegal iterated component
3748 association.
3749 * sem_util.ads, sem_util.adb
3750 (Diagnose_Iterated_Component_Association): New routine.
3751
3752 2017-04-27 Bob Duff <duff@adacore.com>
3753
3754 * adaint.c (__gnat_get_current_dir): Return 0 in length if
3755 getcwd fails.
3756 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
3757 exception if getcwd failed.
3758
3759 2017-04-27 Yannick Moy <moy@adacore.com>
3760
3761 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
3762 entities with special prefix.
3763
3764 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3765
3766 * debug.adb Change the documentation of switch -gnatd.s.
3767 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
3768 to manage the secondary stack when an enclosing scope already
3769 performs this functionality (aka relaxed management). Switch
3770 -gnatd.s may be used to force strict management in which case
3771 the block will manage the secondary stack unconditionally. Add
3772 a guard to stop the traversal when encountering a package or a
3773 subprogram scope.
3774
3775 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3776
3777 * sem_res.adb (Resolve_Call): Refine further the handling of
3778 limited views of return types in function calls. If the function
3779 that returns a limited view appears in the current unit,
3780 we do not replace its type by the non-limited view because
3781 this transformation is performed int the back-end. However,
3782 the type of the call itself must be the non-limited view, to
3783 prevent spurious resolution errors.
3784
3785 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3786
3787 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
3788 Removed, proposed implementation using generics for class-wide
3789 preconditions proved impractical.
3790 (Class_Wide_Clone): New attribute of subprogram. Designates
3791 subprogram created for primitive operations with class-wide
3792 pre/postconditions that contain calls to other primitives. The
3793 clone holds the body of the original primitive, but the
3794 pre/postonditions do not apply to it. The original body is
3795 rewritten as a wrapper for a call to the clone.
3796 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
3797 the flag is set, no code for the corresponding pre/postconditions
3798 is inserted into its body.
3799
3800 2017-04-27 Bob Duff <duff@adacore.com>
3801
3802 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
3803 Scalar_Storage_Order if -gnatI is given.
3804 * sem_prag.adb (Analyze_Pragma): Ignore
3805 Default_Scalar_Storage_Order if -gnatI is given.
3806
3807 2017-04-27 Claire Dross <dross@adacore.com>
3808
3809 * a-cofuba.ads (Add): Take as an additional input parameter
3810 the position where the element should be inserted.
3811 (Remove): New function that removes an element from the container.
3812 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
3813 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
3814 (Remove): New function that removes an element from a set.
3815 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
3816 (Remove): New function that removes an element from a sequence.
3817 (Insert): New function that adds anywhere in a sequence.
3818
3819 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3820
3821 * checks.adb (Generate_Range_Check): Revert previous change.
3822
3823 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3824
3825 * sem_util.adb: Minor reformatting/rewording.
3826
3827 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3828
3829 * lib-xref.adb (Generate_Reference): The use
3830 of attribute 'Result is not considered a violation of pragma
3831 Unreferenced.
3832
3833 2017-04-27 Justin Squirek <squirek@adacore.com>
3834
3835 * cstand.adb (Create_Standard): Correctly set
3836 Directly_Designated_Type for Any_Access.
3837 * sem_type.adb (Covers): Minor grammar fixes.
3838
3839 2017-04-27 Bob Duff <duff@adacore.com>
3840
3841 * sem_attr.adb: Minor cleanup.
3842
3843 2017-04-27 Claire Dross <dross@adacore.com>
3844
3845 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
3846 private child of Ada.Containers used to implement all functional
3847 containers.
3848 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
3849 child of Ada.Containers. It provides functional indefinite unbounded
3850 maps which can be used as high level models for specification
3851 of data structures.
3852 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
3853 child of Ada.Containers. It provides functional indefinite unbounded
3854 sets which can be used as high level models for specification
3855 of data structures.
3856 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
3857 child of Ada.Containers. It provides functional indefinite unbounded
3858 vectors which can be used as high level models for specification
3859 of data structures.
3860 * Makefile.rtl: Add new packages.
3861 * impunit.adb: Add new packages.
3862
3863 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3864
3865 * sem_ch4.adb: Minor reformatting.
3866
3867 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3868
3869 * sem_ch12.adb (Analyze_Associations): minor reformatting.
3870 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
3871 point type actual that has user-defined arithmetic primitives,
3872 when there is a previous actual for a formal package that defines
3873 a fixed-point type with the parent user-defined operator.
3874
3875 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3876
3877 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
3878 * sem_attr.adb (Resolve_Attribute): Generate a range check when
3879 the component type allows range checks.
3880
3881 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3882
3883 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
3884 corresponding declaration, because formal derived types are
3885 rewritten as private extensions.
3886
3887 2017-04-27 Ed Schonberg <schonberg@adacore.com>
3888
3889 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
3890 dimensions of operands if node has been analyzed already, because
3891 previous analysis and dimension checking will have removed the
3892 dimension information from the operands.
3893
3894 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3895
3896 * debug.adb: Document the use of switch -gnatd.s.
3897 * einfo.ads Update the documentation on attribute
3898 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
3899 the uses of these attributes from certain entities.
3900 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
3901 which determines whether the block should continue to manage
3902 the secondary stack.
3903 (Manages_Sec_Stack): New routine.
3904
3905 2017-04-27 Bob Duff <duff@adacore.com>
3906
3907 * atree.ads: Minor edit.
3908
3909 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3910
3911 * sinfo.ads: Update the section on Ghost mode. Add
3912 a section on SPARK mode. Update the placement of section on
3913 expression functions.
3914
3915 2017-04-27 Bob Duff <duff@adacore.com>
3916
3917 * sinput.adb (Get_Source_File_Index): Don't
3918 assert that S is in the right range in the case where this is
3919 a .dg file under construction.
3920
3921 2017-04-27 Yannick Moy <moy@adacore.com>
3922
3923 * sem_util.adb (Check_Result_And_Post_State):
3924 Handle more precisely each conjunct in expressions formed by
3925 and'ing sub-expressions.
3926
3927 2017-04-27 Gary Dismukes <dismukes@adacore.com>
3928
3929 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
3930
3931 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3932
3933 * gnat_rm.texi, gnat_ugn.texi,
3934 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3935 doc/gnat_ugn/platform_specific_information.rst,
3936 doc/gnat_ugn/gnat_and_program_execution.rst,
3937 doc/gnat_ugn/gnat_utility_programs.rst,
3938 doc/gnat_ugn/the_gnat_compilation_model.rst,
3939 doc/gnat_rm/implementation_defined_attributes.rst,
3940 doc/gnat_rm/the_gnat_library.rst,
3941 doc/gnat_rm/implementation_defined_pragmas.rst,
3942 doc/gnat_rm/representation_clauses_and_pragmas.rst,
3943 doc/gnat_rm/implementation_of_specific_ada_features.rst,
3944 doc/gnat_rm/implementation_defined_aspects.rst,
3945 doc/gnat_rm/implementation_defined_characteristics.rst: Update
3946 documentation.
3947
3948 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3949
3950 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
3951 generating C code on complex case expressions.
3952
3953 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3954
3955 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
3956 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
3957 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
3958 Ada_2012 instead of Ada_2005 to be compatible with the above
3959 change.
3960 * bindgen.adb: Silence new warning on pragma Ada_95.
3961
3962 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3963
3964 * checks.adb (Generate_Range_Check): Revert part of previous change.
3965
3966 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3967
3968 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
3969 container indexing operation that appears as a an actual in a
3970 parameter association in a procedure call.
3971
3972 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
3973
3974 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
3975 Fix spelling mistakes.
3976
3977 2017-04-25 Bob Duff <duff@adacore.com>
3978
3979 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
3980 * sinput-p.adb: Use regular fat pointers, with bounds checking,
3981 for source buffers. Fix misc obscure bugs.
3982 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
3983 checking, for source buffers. Modify representation clause for
3984 Source_File_Record as appropriate. Move Source_File_Index_Table
3985 from spec to body, because it is not used outside the body.
3986 Move Set_Source_File_Index_Table into the private part, because
3987 it is used only in the body and in children. Use trickery to
3988 modify the dope in the generic instantiation case. It's ugly,
3989 but not as ugly as the previous method. Fix documentation.
3990 Remove obsolete code.
3991 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
3992 indexing in source buffers.
3993 * fmap.adb: Avoid conversions from one string type to another.
3994 Remove a use of global name buffer.
3995 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
3996 fixes.
3997
3998 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3999
4000 * exp_util.adb, exp_ch4.adb: Minor reformatting.
4001
4002 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4003
4004 * checks.adb: Code clean up in various routines.
4005 (Generate_Range_Check): Do not generate a range check when the
4006 expander is not active or when index/range checks are suppressed
4007 on the target type.
4008 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
4009 Remove variants that include a Supress parameter. These routines
4010 are never used, and were introduced before the current scope-based
4011 check suppression method.
4012
4013 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
4014
4015 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
4016 code and some subprogram calls that are now noop.
4017
4018 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4019
4020 * exp_ch4.adb (Expand_N_Case_Expression): Take
4021 Minimize_Expression_With_Actions into account when possible.
4022
4023 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4024
4025 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
4026 (Known_Null): Moved to Sem_Util.
4027 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
4028 (Known_Null): Moved to Sem_Util.
4029 * sem_util.adb Add new enumeration type Null_Status_Kind.
4030 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
4031 this routine is now carried out by Null_Status.
4032 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
4033 is now carried out by Null_Status.
4034 (Null_Status): New routine.
4035 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
4036 (Known_Null): Moved from Exp_Util.
4037
4038 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4039
4040 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
4041 error on the return type of an expression function that is a
4042 completion, if the type is derived from a generic formal type.
4043
4044 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4045
4046 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
4047 conversion are those of the target type.
4048
4049 2017-04-25 Bob Duff <duff@adacore.com>
4050
4051 * a-clrefi.adb: Minor cleanup.
4052
4053 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4054
4055 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
4056
4057 2017-04-25 Bob Duff <duff@adacore.com>
4058
4059 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
4060 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
4061 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
4062 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
4063 the Internal_Source buffer. This removes the incorrect call to "="
4064 the customer noticed.
4065 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
4066 eventually need to eliminate them altogether. Or else get rid
4067 of zero-origin addressing.
4068
4069 2017-04-25 Claire Dross <dross@adacore.com>
4070
4071 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
4072 function used in GNATprove to know if an expression contains
4073 non-dispatching calls on primitives of a tagged type.
4074
4075 2017-04-25 Bob Duff <duff@adacore.com>
4076
4077 * rtsfind.adb (Initialize): Initialize
4078 First_Implicit_With. Building the compiler with Normalize_Scalars
4079 and validity checking finds this being used as an uninitialized
4080 variable.
4081
4082 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4083
4084 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
4085 Add a warning about SPARK mode management. The routine now
4086 saves and restores both the mode and associated pragma.
4087 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
4088 SPARK mode management. The routine now saves and restores both
4089 the mode and associated pragma.
4090 (Analyze_Object_Contract):
4091 Add a warning about SPARK mode management. The routine
4092 now saves and restores both the mode and associated pragma.
4093 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
4094 management. The routine now saves and restores both the mode
4095 and associated pragma. (Analyze_Package_Contract): Add a warning
4096 about SPARK mode management. The routine now saves and restores
4097 both the mode and associated pragma.
4098 (Analyze_Task_Contract):
4099 Add a warning about SPARK mode management. The routine now saves
4100 and restores both the mode and associated pragma.
4101 * expander.adb (Expand): Change the way the Ghost mode is saved
4102 and restored.
4103 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
4104 saved and restored.
4105 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
4106 and restored.
4107 * exp_util.adb (Build_DIC_Procedure_Body):
4108 Change the way the Ghost mode is saved and restored.
4109 (Build_DIC_Procedure_Declaration): Change the way the Ghost
4110 mode is saved and restored.
4111 (Build_Invariant_Procedure_Body):
4112 Change the way the Ghost mode is saved and restored.
4113 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
4114 mode is saved and restored.
4115 (Make_Predicate_Call): Change the
4116 way the Ghost mode is saved and restored.
4117 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
4118 saved and restored.
4119 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4120 and its assignment.
4121 (Mark_And_Set_Ghost_Body): Remove parameter
4122 Mode and its assignment.
4123 (Mark_And_Set_Ghost_Completion):
4124 Remove parameter Mode and its assignment.
4125 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
4126 assignment.
4127 (Mark_And_Set_Ghost_Instantiation): Remove parameter
4128 Mode and its assignment.
4129 (Mark_And_Set_Ghost_Procedure_Call):
4130 Remove parameter Mode and its assignment.
4131 (Set_Ghost_Mode):
4132 Remove parameter Mode and its assignment.
4133 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4134 and update the comment on usage.
4135 (Mark_And_Set_Ghost_Body):
4136 Remove parameter Mode and update the comment on usage.
4137 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
4138 update the comment on usage.
4139 (Mark_And_Set_Ghost_Declaration):
4140 Remove parameter Mode and update the comment on usage.
4141 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
4142 update the comment on usage.
4143 (Mark_And_Set_Ghost_Procedure_Call):
4144 Remove parameter Mode and update the comment on usage.
4145 (Set_Ghost_Mode): Remove parameter Mode and update the comment
4146 on usage.
4147 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
4148 types.
4149 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
4150 of obsolete field SPARK_Mode_Pragma.
4151 (Load_Main_Source): Remove
4152 the assignment of obsolete field SPARK_Mode_Pragma.
4153 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
4154 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
4155 the assignment of obsolete field SPARK_Mode_Pragma.
4156 (Ensure_System_Dependency): Remove the assignment of obsolete
4157 field SPARK_Mode_Pragma.
4158 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
4159 mode management. Change the way Ghost and SPARK modes are saved
4160 and restored.
4161 * sem.adb (Analyze): Change the way the Ghost mode is saved
4162 and restored.
4163 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
4164 Ghost mode is saved and restored.
4165 (Process_Full_View): Change
4166 the way the Ghost mode is saved and restored.
4167 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
4168 mode is saved and restored.
4169 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
4170 mode is saved and restored.
4171 (Analyze_Subprogram_Body_Helper):
4172 Change the way the Ghost mode is saved and restored.
4173 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
4174 Ghost mode is saved and restored.
4175 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
4176 management. Save the SPARK mode-related data prior to any changes
4177 to the scope stack and contexts. The mode is then reinstalled
4178 before the subunit is analyzed in order to restore the original
4179 view of the subunit.
4180 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
4181 warning on region management. Change the way the Ghost and
4182 SPARK modes are saved and restored.
4183 (Inline_Instance_Body):
4184 Add a warning about SPARK mode management. Code clean up.
4185 (Analyze_Subprogram_Instantiation): Update the warning on region
4186 management. Change the way the Ghost and SPARK modes are saved
4187 and restored.
4188 (Instantiate_Package_Body): Update the warning
4189 on region management. Change the way the Ghost and SPARK modes
4190 are saved and restored.
4191 (Instantiate_Subprogram_Body): Update
4192 the warning on region management. Change the way the Ghost and
4193 SPARK modes are saved and restored.
4194 (Set_Instance_Env): Add a
4195 warning about SPARK mode management. Change the way SPARK mode
4196 is saved and restored.
4197 * sem_ch13.adb (Build_Predicate_Functions):
4198 Change the way the Ghost mode is saved and restored.
4199 (Build_Predicate_Function_Declaration): Change the way the Ghost
4200 mode is saved and restored.
4201 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
4202 mode management. Change the way SPARK mode is saved and restored.
4203 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4204 Change the way the Ghost mode is saved and restored.
4205 (Analyze_Initial_Condition_In_Decl_Part): Change the way
4206 the Ghost mode is saved and restored.
4207 (Analyze_Pragma):
4208 Change the way the Ghost mode is saved and restored.
4209 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
4210 Ghost mode is saved and restored.
4211 * sem_util.adb (Install_SPARK_Mode): New routine.
4212 (Restore_SPARK_Mode): New routine.
4213 (Save_SPARK_Mode_And_Set): Removed.
4214 (Set_SPARK_Mode): New routine.
4215 * sem_util.ads (Install_SPARK_Mode): New routine.
4216 (Restore_SPARK_Mode): New routine.
4217 (Save_SPARK_Mode_And_Set): Removed.
4218 (Set_SPARK_Mode): New routine.
4219
4220 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4221
4222 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
4223 to determine whether a type is declared in a local package that
4224 has not yet been frozen.
4225 * freeze.adb (Freeze_Before): Use new predicate to determine
4226 whether a local package must be installed on the scope stack
4227 in order to evaluate in the proper scope actions generated by
4228 aspect specifications, such as Predicate
4229 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
4230 using new predicate.
4231
4232 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4233
4234 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
4235 comparisons between non- scalar expressions expressions because
4236 their values cannot be invalidated.
4237 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
4238 comment on usage.
4239
4240 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4241
4242 * par_sco.adb: Minor reformatting.
4243
4244 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4245
4246 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
4247 is a type from an unfrozen local package, install package to
4248 complete the analysis of delayed aspects of the type.
4249
4250 2017-04-25 Tristan Gingold <gingold@adacore.com>
4251
4252 * bingen.adb (System_Version_Control_Used): New variable.
4253 (Resolve_Binder_Options): Set the above variable.
4254 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
4255 (Gen_Elab_Order): Emit blank line before.
4256
4257 2017-04-25 Justin Squirek <squirek@adacore.com>
4258
4259 * sem_cat.adb (Validate_RT_RAT_Component): Added
4260 an extra check to ignore incomplete types.
4261
4262 2017-04-25 Thomas Quinot <quinot@adacore.com>
4263
4264 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
4265 bogus circuitry for the case where Name is Predicate.
4266
4267 2017-04-25 Thomas Quinot <quinot@adacore.com>
4268
4269 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
4270 Create SCOs for Predicate aspects in disabled
4271 state initially, to be enabled later on by...
4272 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
4273 SCO for predicate as enabled.
4274
4275 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4276
4277 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
4278 pragmas Warnings Off / On.
4279 * namet.adb (Finalize): Remove now obsolete pair of pragmas
4280 Warnings Off / On.
4281 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
4282 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
4283 consider comparisons between static expressions because their
4284 values cannot be invalidated.
4285 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
4286 Warnings Off / On.
4287 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
4288 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
4289
4290 2017-04-25 Bob Duff <duff@adacore.com>
4291
4292 * sem_elab.adb (In_Task_Activation): Trace internal calls in
4293 task bodies.
4294
4295 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4296
4297 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
4298 typo fixes.
4299
4300 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4301
4302 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
4303 On/Off to defend against a spurious warning in conditional
4304 compilation.
4305 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
4306 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
4307 defend against a spurious warning in conditional compilation.
4308 * output.adb Add a pair of pragma Warnings On/Off to defend
4309 against a spurious warning in conditional compilation.
4310 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
4311 (Fold_General_Op): New routine.
4312 (Fold_Static_Real_Op): New routine.
4313 (Test_Comparison): New routine.
4314 * sem_eval.ads (Test_Comparison): New routine.
4315 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
4316 (Warn_On_Constant_Valid_Condition): New routine.
4317 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
4318 to detect a specific case.
4319 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
4320 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
4321 to defend against a spurious warning in conditional compilation.
4322 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
4323 against a spurious warning in conditional compilation.
4324 * usage.adb Add a pair of pragma Warnings On/Off to defend
4325 against a spurious warning in conditional compilation.
4326
4327 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4328
4329 * sinfo.ads, sem_ch13.adb: Update comment.
4330
4331 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4332
4333 * sem_util.adb (Is_Post_State): A reference to a
4334 generic in out parameter is considered a change in the post-state
4335 of a subprogram.
4336
4337 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4338
4339 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
4340 declaration of a subprogram instance within its wrapper package,
4341 skip over null statements that may result from the rewriting of
4342 ignored pragmas.
4343
4344 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4345
4346 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
4347 If the type is an unchecked_union, replace the attribute with
4348 a Raise_Program_Error (rather than inserting such before the
4349 attribute reference) to handle properly the case where we are
4350 processing a component of a larger record, and we need to prevent
4351 further expansion for the unchecked union.
4352 (Expand_Attribute_Reference, case 'Write): If the type is
4353 an unchecked_union, check whether enclosing scope is a Write
4354 subprogram. Replace attribute with a Raise_Program_Error if the
4355 discriminants of the unchecked_union type have not default values
4356 because such a use is erroneous..
4357
4358 2017-04-25 Tristan Gingold <gingold@adacore.com>
4359
4360 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
4361 Add relative_deadline to task record on edf profile.
4362 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
4363 (Make_Task_Create_Call): Pass relative_deadline value.
4364 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
4365 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
4366 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
4367 * sem_prag.adb (Set_Ravenscar_Profile): Handle
4368 GNAT_Ravenscar_EDF (set scheduling policy).
4369 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
4370 pragma.
4371 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
4372 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
4373 New names.
4374 (Pragma_Deadline_Floor): New pragma.
4375 * targparm.adb (Get_Target_Parameters): Recognize
4376 GNAT_Ravenscar_EDF profile.
4377
4378 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4379
4380 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
4381
4382 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4383
4384 * sem_aux.adb (Nearest_Ancestor): Use original node of type
4385 declaration to locate nearest ancestor, because derived
4386 type declarations for record types are rewritten as record
4387 declarations.
4388 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
4389 properly derivations that are completions of private types.
4390 (Add_Predicates): If type is private, examine rep. items of full
4391 view, which may include inherited predicates.
4392 (Build_Predicate_Functions): Ditto.
4393
4394 2017-04-25 Javier Miranda <miranda@adacore.com>
4395
4396 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
4397 to generate new entities for subtype declarations located in
4398 Expression_With_Action nodes.
4399
4400 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4401
4402 * sem_elab.adb (Check_A_Call): Remove
4403 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
4404 need for Elaborate_All when SPARK elaboration checks are
4405 required. Update the checks for instances, variables, and calls
4406 to Default_Initial_Condition procedures.
4407
4408 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4409
4410 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
4411 into a boolean aspect, in analogy with the Ada aspect No_Return.
4412
4413 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4414
4415 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
4416
4417 2017-04-25 Bob Duff <duff@adacore.com>
4418
4419 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
4420 Is_True_Constant for an array variable that is passed to a
4421 foreign function as an 'in' parameter.
4422 * debug.adb: Document -gnatd.q.
4423
4424 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4425
4426 * sem_ch6.adb (Analyze_Expression_Function): If expression function
4427 is completion and return type is an access type do not freeze
4428 designated type: this will be done in the process of freezing
4429 the expression if needed.
4430 (Freeze_Expr_Types): Check whether type is complete before
4431 creating freeze node, to provide a better error message if
4432 reference is premature.
4433 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
4434 functions created by type derivations.
4435
4436 2017-04-25 Pascal Obry <obry@adacore.com>
4437
4438 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
4439
4440 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4441
4442 * sem_res.adb (Resolve_Type_Conversion):
4443 When resolving against any fixed type, set the type of the
4444 operand as universal real when the operand is a multiplication
4445 or a division where both operands are of any fixed type.
4446 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
4447 placement of an error message by pointing to the operand of a
4448 type conversion rather than the conversion itself.
4449
4450 2017-04-25 Thomas Quinot <quinot@adacore.com>
4451
4452 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
4453 Needs_Debug_Info when producing SCOs.
4454
4455 2017-04-25 Thomas Quinot <quinot@adacore.com>
4456
4457 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4458 Always pass a null finalization master for a library level named access
4459 type to which a pragme No_Heap_Finalization applies.
4460
4461 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4462
4463 PR ada/78845
4464
4465 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
4466 set to A'First(2) and vice versa.
4467
4468 2017-04-25 Yannick Moy <moy@adacore.com>
4469
4470 * freeze.adb (Freeze_Record_Type): Remove obsolete
4471 rule on volatile tagged record restriction on SPARK code.
4472
4473 2017-04-25 Yannick Moy <moy@adacore.com>
4474
4475 * sem_prag.adb (minor) Fix SPARK RM reference.
4476
4477 2017-04-25 Yannick Moy <moy@adacore.com>
4478
4479 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
4480 comment to reflect which entity is chosen as unique entity.
4481 (Unique_Entity): Return full view instead of private spec for
4482 protected type or task type. Fix possible incorrect access when
4483 called on entry.
4484
4485 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
4486
4487 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
4488 array types only instead of all packed array types.
4489
4490 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4491
4492 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
4493 dimension system, verify that dimensions of both match.
4494 (Check_Conformance): Add error message in case of dimension
4495 mismatch.
4496 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
4497 predicate.
4498
4499 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
4500
4501 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
4502 confusing.
4503
4504 2017-04-25 Yannick Moy <moy@adacore.com>
4505
4506 * sem_util.adb: Minor refactoring.
4507 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
4508
4509 2017-04-25 Claire Dross <dross@adacore.com>
4510
4511 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
4512 ultimate alias when accessing overridden operation. Indeed, if the
4513 overridden operation is itself inherited, it won't have any explicit
4514 contract.
4515
4516 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4517
4518 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
4519 overlap if the two formals have different types, because formally
4520 the corresponding actuals cannot designate the same objects.
4521
4522 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4523
4524 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
4525 dimensions are present from context, use them. b) If operand is
4526 a static constant rewritten as a literal, obtain the dimensions
4527 from the original declaration, otherwise use dimensions of type
4528 established from context.
4529
4530 2017-04-25 Yannick Moy <moy@adacore.com>
4531
4532 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
4533 of array that is private.
4534
4535 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4536
4537 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
4538 reformatting.
4539
4540 2017-04-25 Yannick Moy <moy@adacore.com>
4541
4542 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
4543 on body.
4544
4545 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4546
4547 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
4548 the check that recognizes a call to a private overridding and
4549 replaces the called subprogram with its alias.
4550
4551 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4552
4553 * exp_util.adb: Minor reformatting.
4554
4555 2017-04-25 Justin Squirek <squirek@adacore.com>
4556
4557 * exp_ch3.adb (Freeze_Type): Add condition to always treat
4558 interface types as a partial view of a private type for the
4559 generation of invariant procedure bodies.
4560 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
4561 Add a condition to get the Corresponding_Record_Type for
4562 concurrent types, add condition to return in the absence of a
4563 class in the pragma, remove call to Replace_Type_References,
4564 and add call to Replace_References.
4565 (Add_Interface_Invariatns),
4566 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
4567 to including the working type T.
4568 (Add_Own_Invariants): Remove
4569 legacy condition for separate units, remove dispatching for ASIS
4570 and save a copy of the expression in the pragma expression.
4571 (Build_Invariant_Procedure_Body): Default initalize vars,
4572 remove return condition on interfaces, always use the
4573 private type for interfaces, and move the processing of types
4574 until after the processing of invariants for the full view.
4575 (Build_Invariant_Procedure_Declaration): Remove condition
4576 to return if an interface type is encountered and add
4577 condition to convert the formal parameter to its class-wide
4578 counterpart if Work_Typ is abstract.
4579 (Replace_Type): Add call to Remove_Controlling_Arguments.
4580 (Replace_Type_Ref): Remove class-wide dispatching for the current
4581 instance of the type.
4582 (Replace_Type_References): Remove parameter "Derived"
4583 (Remove_Controlling_Arguments): Created in order to removing
4584 the controlliong argument from calls to primitives in the case
4585 of the formal parameter being an class-wide abstract type.
4586 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
4587 to the change made to Freeze_Type in exp_ch3. Add a condition
4588 to treat interface types as a partial view.
4589 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
4590 to Build_Invariant_Procedure_Declaration to properly generate a
4591 "partial" invariant procedure when Typ is an interface.
4592
4593 2017-04-25 Bob Duff <duff@adacore.com>
4594
4595 * a-numeri.ads: Go back to using brackets encoding for the Greek
4596 letter pi.
4597
4598 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4599
4600 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
4601 (10-15): if derived type T with progenitors is abstract,
4602 and primitive P of this type inherits non-trivial classwide
4603 preconditions from both a parent operation and from an interface
4604 operation, then the inherited operation is abstract if the parent
4605 operation is not null.
4606 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
4607 with Covered_Interface_Op to yield the actual interface operation
4608 that is implemented by a given inherited operation.
4609
4610 2017-04-25 Javier Miranda <miranda@adacore.com>
4611
4612 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
4613 and right operands after performing the validity checks. Required
4614 because validity checks may remove side effects from the operands.
4615
4616 2017-04-25 Javier Miranda <miranda@adacore.com>
4617
4618 * exp_attr.adb (Attribute_Unrestricted_Access):
4619 Do not disable implicit type conversion. Required to generate
4620 code that displaces the pointer to reference the secondary
4621 dispatch table.
4622
4623 2017-04-25 Pascal Obry <obry@adacore.com>
4624
4625 * prj-attr.adb, snames.ads-tmpl: Add package Install's
4626 Required_Artifacts attribute.
4627
4628 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4629
4630 * sem_util.adb (Same_Value): String literals are compile-time
4631 values, and comparing them must use Expr_Value_S.
4632
4633 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4634
4635 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
4636 dereference is introduced for the object, and the object is
4637 overloaded, do not check whether it is aliased, because it may
4638 include an implicit dereference.
4639 * sem_type.adb (Disambiguate): If two interpretations are access
4640 attribute types with the same designated type keep either of
4641 them and do not report an ambiguity. A true ambiguity will be
4642 reported elsewhere.
4643
4644 2017-04-25 Bob Duff <duff@adacore.com>
4645
4646 * a-numeri.ads: Change the encoding of Greek letter Pi from
4647 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
4648 to indicate the encoding. We considered using a byte order mark
4649 (BOM), but that causes various trouble (misc software eats the
4650 BOM, if you have a patch with a BOM, then it's not at the start
4651 of the patch, so it's not a BOM, the BOM affects with-ing files,
4652 etc.).
4653 * scng.adb, s-wchcnv.adb: Minor.
4654
4655 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4656
4657 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
4658 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4659
4660 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
4661 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
4662 Improve error message on operations that inherit non-conforming
4663 classwide preconditions from ancestor and progenitor.
4664 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
4665 moved here from sem_ch3.
4666 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
4667 check given in RM 6.1.1 (17) concerning renamings of overriding
4668 operations that inherits class-wide preconditions from ancestor
4669 or progenitor.
4670
4671 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4672
4673 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
4674 (Build_Adjust_Statements): Code cleanup.
4675 (Build_Finalizer): Update the initialization of
4676 Exceptions_OK.
4677 (Build_Finalize_Statements): Code cleanup.
4678 (Build_Initialize_Statements): Code cleanup.
4679 (Make_Deep_Array_Body): Update the initialization of
4680 Exceptions_OK.
4681 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
4682 (Process_Object_Declaration): Generate a null exception handler only
4683 when exceptions are allowed.
4684 (Process_Transients_In_Scope): Update the initialization of
4685 Exceptions_OK.
4686 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
4687 routine.
4688 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
4689 restrictions when the handler is internally generated and the
4690 mode is warnings.
4691
4692 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4693
4694 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
4695 enforce legality rule on classwide preconditions inherited from
4696 both an ancestor and a progenitor (RM 6.1.1 (10-13).
4697 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
4698 subprogram need not be dispatching if it appears in a precondition
4699 for an abstract or null subprogram.
4700
4701 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4702
4703 * sem_ch10.adb: Minor typo fix.
4704
4705 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4706
4707 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
4708
4709 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
4710
4711 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
4712 have a length which is a power of 2.
4713 (Is_Predefined_File_Name): Likewise. Adjust comment.
4714
4715 2017-04-25 Bob Duff <duff@adacore.com>
4716
4717 * exp_aggr.adb (Component_Count): Protect the
4718 arithmetic from attempting to convert a value >= 2**31 to Int,
4719 which would otherwise raise Constraint_Error.
4720
4721 2017-04-25 Bob Duff <duff@adacore.com>
4722
4723 * opt.ads (Locking_Policy): Fix incorrect documentation. The
4724 first character of the policy name is not unique.
4725
4726 2017-04-25 Bob Duff <duff@adacore.com>
4727
4728 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
4729 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
4730 about this flag not being used. It was already used, and it is
4731 now used more.
4732
4733 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4734
4735 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
4736 (Ignore_SPARK_Mode_Pragmas): New routine.
4737 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
4738 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
4739 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
4740 related entities.
4741 (Ignore_SPARK_Mode_Pragmas): New routine
4742 along with pragma Inline.
4743 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
4744 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
4745 Ignore_SPARK_Mode_Pragmas_In_Instance.
4746 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4747 Save and restore the value of global flag
4748 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
4749 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
4750 the corresponding spec or the body must ignore all SPARK_Mode
4751 pragmas found within.
4752 (Analyze_Subprogram_Declaration): Mark
4753 the spec when it needs to ignore all SPARK_Mode pragmas found
4754 within to allow the body to infer this property in case it is
4755 instantiated or inlined later.
4756 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
4757 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
4758 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
4759 when the corresponding spec also ignored all SPARK_Mode pragmas
4760 found within.
4761 (Analyze_Package_Declaration): Mark the spec when
4762 it needs to ignore all SPARK_Mode pragmas found within to allow
4763 the body to infer this property in case it is instantiated or
4764 inlined later.
4765 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
4766 Save and restore the value of flag
4767 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
4768 formal spec when it needs to ignore all SPARK_Mode
4769 pragmas found within to allow the body to infer this
4770 property in case it is instantiated or inlined later.
4771 (Analyze_Package_Instantiation): Save and restore the value
4772 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
4773 the instance spec when it needs to ignore all SPARK_Mode
4774 pragmas found within to allow the body to infer this
4775 property in case it is instantiated or inlined later.
4776 (Analyze_Subprogram_Instantiation): Save and restore the value
4777 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
4778 instance spec and anonymous package when they need to ignore
4779 all SPARK_Mode pragmas found within to allow the body to infer
4780 this property in case it is instantiated or inlined later.
4781 (Instantiate_Package_Body): Save and restore the value of global
4782 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
4783 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
4784 corresponding instance spec also ignored all SPARK_Mode pragmas
4785 found within.
4786 (Instantiate_Subprogram_Body): Save and restore the
4787 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
4788 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
4789 when the corresponding instance spec also ignored all SPARK_Mode
4790 pragmas found within.
4791 * sem_prag.adb (Analyze_Pragma): Update the reference to
4792 Ignore_Pragma_SPARK_Mode.
4793 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
4794 all SPARK_Mode pragmas defined within yields mode "off".
4795
4796 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4797
4798 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
4799
4800 2017-04-25 Bob Duff <duff@adacore.com>
4801
4802 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
4803 All_Checks" to avoid generating unnecessary checks.
4804 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
4805 All_Checks".
4806 * sem.ads: Fix comment.
4807 * expander.ads: Fix comment.
4808 * exp_atag.ads: Fix comment: "Index = 0" should be
4809 "Index >= 0".
4810
4811 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4812
4813 * s-taprop-linux.adb: Minor editorial fixes.
4814
4815 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
4816
4817 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
4818 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
4819 variable and set it to True whenever the main hash table is
4820 populated. Short- circuit the Assoc function if it is false
4821 and add associated guards.
4822
4823 2017-04-25 Olivier Hainque <hainque@adacore.com>
4824
4825 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
4826 specs without elaboration code that have an elaboration counter
4827 nevertheless, e.g. when compiled with -fpreserve-control-flow.
4828 * sem_ch10.adb (Analyze_Compilation_Unit):
4829 Set_Elaboration_Entity_Required when requested to preserve
4830 control flow, to ensure the unit elaboration is materialized at
4831 bind time, resulting in the inclusion of the unit object file
4832 in the executable closure at link time.
4833
4834 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
4835
4836 * exp_dbug.adb: In Debug_Renaming_Declaration,
4837 when dealing with indexed component, accept to produce a renaming
4838 symbol when the index is an IN parameter or when it is a name
4839 defined in an outer scope.
4840
4841 2017-04-25 Yannick Moy <moy@adacore.com>
4842
4843 * errout.adb (Error_Msg): Adapt continuation
4844 message in instantiations and inlined bodies for info messages.
4845
4846 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
4847
4848 * fname.adb (Has_Internal_Extension): Add pragma Inline.
4849 Use direct 4-character slice comparisons.
4850 (Has_Prefix): Add
4851 pragma Inline. (Has_Suffix): Delete.
4852 (Is_Internal_File_Name):
4853 Test Is_Predefined_File_Name first.
4854 (Is_Predefined_File_Name):
4855 Use direct slice comparisons as much as possible and limit all
4856 comparisons to at most 8 characters.
4857
4858 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4859
4860 * checks.adb (Insert_Valid_Check): Code cleanup.
4861 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
4862 (Expand_Actuals): Generate proper copy-back for a validation
4863 variable when it acts as the argument of a type conversion.
4864 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
4865 predicate to operate on type qualifications.
4866
4867 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4868
4869 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
4870 Minor reformatting.
4871
4872 2017-04-25 Bob Duff <duff@adacore.com>
4873
4874 * sem_prag.adb (No_Return): Give an error if the pragma applies
4875 to a body. Specialize the error for the specless body case,
4876 as is done for (e.g.) pragma Convention.
4877 * debug.adb: Add switch -gnatd.J to disable the above legality
4878 checks. This is mainly for use in our test suite, to avoid
4879 rewriting a lot of illegal (but working) code. It might also
4880 be useful to customers. Under this switch, if a pragma No_Return
4881 applies to a body, and the procedure raises an exception (as it
4882 should), the pragma has no effect. If the procedure does return,
4883 execution is erroneous.
4884
4885 2017-04-25 Bob Duff <duff@adacore.com>
4886
4887 * exp_ch6.adb (Expand_Actuals): This is the
4888 root of the problem. It took N as an 'in out' parameter, and in
4889 some cases, rewrote N, but then set N to Original_Node(N). So
4890 the node returned in N had no Parent. The caller continued
4891 processing of this orphaned node. In some cases that caused a
4892 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
4893 and trips over the Empty Parent). The solution is to make N an
4894 'in' parameter. Instead of rewriting it, return the list of
4895 post-call actions, so the caller can do the rewriting later,
4896 after N has been fully processed.
4897 (Expand_Call_Helper): Move most of Expand_Call here. It has
4898 too many premature 'return' statements, and we want to do the
4899 rewriting on return.
4900 (Insert_Post_Call_Actions): New procedure to insert the post-call
4901 actions in the appropriate place. In the problematic case,
4902 that involves rewriting N as an Expression_With_Actions.
4903 (Expand_Call): Call the new procedures Expand_Call_Helper and
4904 Insert_Post_Call_Actions.
4905
4906 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4907
4908 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
4909 properly type derived from generic formal types, to handle
4910 properly modified version of ACATS 4.1B B611017.
4911
4912 2017-04-25 Javier Miranda <miranda@adacore.com>
4913
4914 * exp_unst.adb (Subp_Index): Adding missing
4915 support for renamings and functions that return a constrained
4916 array type (i.e. functions for which the frontend built a
4917 procedure with an extra out parameter).
4918
4919 2017-04-25 Pascal Obry <obry@adacore.com>
4920
4921 * s-string.adb: Minor code clean-up.
4922
4923 2017-04-25 Bob Duff <duff@adacore.com>
4924
4925 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
4926 procedure.
4927 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
4928 function for Non_Blocking_Wait_Process.
4929
4930 2017-04-25 Bob Duff <duff@adacore.com>
4931
4932 * prep.adb (Preprocess): Remove incorrect
4933 Assert. Current character can be ASCII.CR.
4934
4935 2017-04-25 Ed Schonberg <schonberg@adacore.com>
4936
4937 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
4938 convention Stdcall, which has a number of exceptions. Convention
4939 is legal on a component declaration whose type is an anonymous
4940 access to subprogram.
4941
4942 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4943
4944 * sem_ch4.adb: sem_ch4.adb Various reformattings.
4945 (Try_One_Prefix_Interpretation): Use the base type when dealing
4946 with a subtype created for purposes of constraining a private
4947 type with discriminants.
4948
4949 2017-04-25 Javier Miranda <miranda@adacore.com>
4950
4951 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
4952 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
4953 dispatching primitives (Restore_Warnings): Restore warning on
4954 late dispatching primitives (Save_Warnings): Save warning on late
4955 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
4956 to enable/disable this warning.
4957 (WA_Warnings): Set warning on late dispatching primitives.
4958 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
4959 that its parent type has a private extension.
4960 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
4961 New subprogram.
4962 * usage.adb: Document -gnatw.j and -gnatw.J.
4963
4964 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4965
4966 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
4967 reformatting.
4968
4969 2017-04-25 Bob Duff <duff@adacore.com>
4970
4971 * binde.adb (Validate): Do not pass dynamic strings
4972 to pragma Assert, because older compilers do not support that.
4973
4974 2017-04-25 Bob Duff <duff@adacore.com>
4975
4976 * s-fileio.adb (Close): When a temp file is
4977 closed, delete it and clean up its Temp_File_Record immediately,
4978 rather than waiting until later.
4979 (Temp_File_Record): Add File
4980 component, so Close can know which Temp_File_Record corresponds
4981 to the file being closed.
4982 (Delete): Don't delete temp files,
4983 because they are deleted by Close.
4984 (Open): Set the File component
4985 of Temp_File_Record. This requires moving the creation of the
4986 Temp_File_Record to the end, after the AFCB has been created.
4987
4988 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4989
4990 * checks.adb (Insert_Valid_Check): Do not generate
4991 a validity check when inside a generic.
4992
4993 2017-04-25 Yannick Moy <moy@adacore.com>
4994
4995 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
4996
4997 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4998
4999 * snames.ads-tmpl (Snames): More names for detecting predefined
5000 potentially blocking subprograms.
5001
5002 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5003
5004 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
5005 concerning inheritance of class-wide preconditions do not apply
5006 to postconditions.
5007
5008 2017-04-25 Bob Duff <duff@adacore.com>
5009
5010 * s-ficobl.ads: Minor comment fix.
5011
5012 2017-04-25 Yannick Moy <moy@adacore.com>
5013
5014 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
5015 conversions from float to integer in GNATprove mode.
5016 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
5017 to call Apply_Type_Conversion_Checks, so that range checks
5018 are properly positioned when needed on conversions, including
5019 when converting from float to integer. (Determine_Range): In
5020 GNATprove mode, take into account the possibility of conversion
5021 from float to integer.
5022 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
5023 check on conversions from fixed-point to integer, not anymore
5024 on conversions from floating-point to integer, when in GNATprove
5025 mode.
5026
5027 2017-04-25 Yannick Moy <moy@adacore.com>
5028
5029 * checks.adb (Determine_Range_R): Special case type conversions
5030 from integer to float in order to get bounds in that case too.
5031 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
5032 mode, for computations involved in interval checking.
5033
5034 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5035
5036 * checks.adb (Insert_Valid_Check): Partially reimplement validity
5037 checks.
5038 * einfo.adb Node36 is now used as Validated_Object.
5039 (Validated_Object): New routine.
5040 (Set_Validated_Object): New routine.
5041 (Write_Field36_Name): Add an entry for Validated_Object.
5042 * einfo.ads Add new attribute Validated_Object along with
5043 usage in entities.
5044 (Validated_Object): New routine along with pragma Inline.
5045 (Set_Validated_Object): New routine along with pragma Inline.
5046 * exp_attr.adb (Make_Range_Test): Add processing for validation
5047 variables to avoid extra reads and copies of the prefix.
5048 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
5049 variables in order to reflect any changes done in the variable
5050 back into the original object.
5051 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
5052 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
5053
5054 2017-04-25 Steve Baird <baird@adacore.com>
5055
5056 * exp_ch7.adb (Build_Array_Deep_Procs,
5057 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
5058 generate Finalize_Address routines for CodePeer.
5059
5060 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5061
5062 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
5063 Analyze_Pre_Post_Condition, to implement the legality checks
5064 mandated by AI12-0131: Pre'Class shall not be specified for an
5065 overriding primitive subprogram of a tagged type T unless the
5066 Pre'Class aspect is specified for the corresponding primitive
5067 subprogram of some ancestor of T.
5068
5069 2017-04-25 Bob Duff <duff@adacore.com>
5070
5071 * sem_ch8.adb (Use_One_Type): If a use_type_clause
5072 is redundant, set its Used_Operations to empty. This is only
5073 necessary for use clauses that appear in the parent of a generic
5074 child unit, because those use clauses get reanalyzed when we
5075 instantiate the generic, and we don't want the Used_Operations
5076 carried over from the original context (where it was probably
5077 not redundant).
5078
5079 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5080
5081 * exp_ch6.adb: Minor reformatting.
5082
5083 2017-04-25 Bob Duff <duff@adacore.com>
5084
5085 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5086 Use Source_Index (Current_Sem_Unit) to find the correct casing.
5087 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
5088 (Current_Sem_Unit) to find the correct casing.
5089 * par.adb (Par): Null out Current_Source_File, to ensure that
5090 the above bugs won't rear their ugly heads again.
5091
5092 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5093
5094 * sem_ch8.adb (Find_Type): For an attribute reference
5095 'Class, if prefix type is synchronized and previous errors
5096 have suppressed the creation of the corresponding record type,
5097 create a spurious class-wide for the synchonized type itself,
5098 to catch other misuses of the attribute
5099
5100 2017-04-25 Steve Baird <baird@adacore.com>
5101
5102 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
5103 is True, then don't generate the accessibility check for the
5104 tag of a tagged result.
5105 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
5106 if CodePeer_Mode is True, then don't generate the
5107 tag checks for the result of call to an instance of
5108 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
5109 descendant of" check and the accessibility check).
5110
5111 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5112
5113 * sem_ch13.adb: Code cleanups.
5114 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
5115 * sem_ch8.ads: Minor comment fix.
5116
5117 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5118
5119 * exp_ch4.adb (Library_Level_Target): New function.
5120 (Expand_Concatenate): When optimization is enabled, also expand
5121 the operation out-of-line if the concatenation is present within
5122 the expression of the declaration of a library-level object and
5123 not only if it is the expression of the declaration.
5124
5125 2017-04-25 Bob Duff <duff@adacore.com>
5126
5127 * freeze.adb (Freeze_Object_Declaration): Do
5128 not Remove_Side_Effects if there is a pragma Linker_Section,
5129 because in that case we want static initialization in the
5130 appropriate section.
5131
5132 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5133
5134 * exp_dbug.adb: Minor rewording and reformatting.
5135
5136 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5137
5138 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
5139 handle the proposed changes to rules concerning potentially
5140 unevaluated expressions, to include selected components that
5141 do not depend on discriminants, and indexed components with
5142 static indices.
5143 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
5144 predicate in quantified expression, and fix bugs in the handling
5145 of case expressions and membership test.
5146 (Analyze_Attribute_Old_Result): use new predicate.
5147 (Analyze_Attribute, case Loop_Entry): ditto.
5148
5149 2017-04-25 Bob Duff <duff@adacore.com>
5150
5151 * s-secsta.adb (SS_Info): Add a comment
5152 explaining why we don't need to walk all the chunks in order to
5153 compute the total size.
5154
5155 2017-04-25 Bob Duff <duff@adacore.com>
5156
5157 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
5158 of the global name buffer to 4*Max_Line_Length.
5159
5160 2017-04-25 Javier Miranda <miranda@adacore.com>
5161
5162 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
5163 renaming entity for debug information, mark the entity as needing debug
5164 info if it comes from sources.
5165
5166 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5167
5168 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
5169 restriction converning the use of 'Address where the prefix is
5170 of a controlled type.
5171
5172 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
5173
5174 * exp_dbug.adb: In Debug_Renaming_Declaration,
5175 skip slices that are made redundant by an indexed component
5176 access.
5177 * atree.h: New definition for Original_Node.
5178
5179 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5180
5181 * sem_prag.adb, sem_prag.ads: Minor reformatting.
5182
5183 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5184
5185 * sem_ch3.adb (Check_Entry_Contract): Call
5186 Preanalyze_Spec_Expression so that resolution takes place as well.
5187 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
5188 internal calls that appear in preconditions of protected
5189 operations, in default values for same, and in contract guards
5190 for contract cases in SPARK.
5191
5192 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5193
5194 * a-numaux.ads: Fix description of a-numaux-darwin
5195 and a-numaux-x86.
5196 (Double): Define to Long_Float.
5197 * a-numaux-vxworks.ads (Double): Likewise.
5198 * a-numaux-darwin.ads
5199 (Double): Likewise.
5200 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
5201 * a-numaux-x86.ads: Fix package description.
5202 * a-numaux-x86.adb (Is_Nan): Minor tweak.
5203 (Reduce): Adjust and complete description. Call Is_Nan instead of
5204 testing manually. Use an integer temporary to hold rounded value.
5205 * a-numaux-darwin.adb (Reduce): Likewise.
5206 (Is_Nan): New function.
5207
5208 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5209
5210 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
5211 on analysis of prefix whose type is a current instance of a
5212 synchronized type, but where the prefix itself is an entity that
5213 is an object.
5214
5215 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5216
5217 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
5218 the identity of callable entities therein, because they have been
5219 properly resolved, and prefixed calls may have been rewritten
5220 as normal calls.
5221
5222 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
5223
5224 * exp_ch3.adb (Build_Init_Statements): Convert
5225 the expression of the pragma/aspect Secondary_Stack_Size to
5226 internal type System.Parameters.Size_Type before assigning
5227 it to the Secondary_Stack_Size component of the task type's
5228 corresponding record.
5229
5230 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5231
5232 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
5233 (etc) optimizations when the type is modular and the offsets
5234 are equal.
5235
5236 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5237
5238 * s-osinte-freebsd.ads: Minor comment tweaks
5239
5240 2017-04-25 Javier Miranda <miranda@adacore.com>
5241
5242 * urealp.adb (UR_Write): Reverse previous patch
5243 adding documentation on why we generate multiplications instead
5244 of divisions (needed to avoid expressions whose computation with
5245 large numbers may cause division by 0).
5246
5247 2017-04-25 Bob Duff <duff@adacore.com>
5248
5249 * erroutc.adb (Set_Specific_Warning_Off,
5250 Set_Warnings_Mode_Off): Use the correct source file for
5251 Stop. Was using Current_Source_File, which is only valid during
5252 parsing. Current_Source_File will have a leftover value from
5253 whatever file happened to be parsed last, because of a with_clause
5254 or something.
5255
5256 2017-04-25 Bob Duff <duff@adacore.com>
5257
5258 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
5259 to In_Predefined_Unit, but including GNAT units.
5260 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
5261 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
5262 because Should_Ignore_Pragma was not working reliably outside
5263 the parser, because Current_Source_File is not valid.
5264 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
5265 * par-prag.adb: Call Should_Ignore_Pragma_Par.
5266
5267 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5268
5269 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
5270 codepeer mode.
5271
5272 2017-04-25 Javier Miranda <miranda@adacore.com>
5273
5274 * urealp.adb (UR_Write): Fix output of constants with a base other
5275 that 10.
5276
5277 2017-04-25 Justin Squirek <squirek@adacore.com>
5278
5279 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
5280 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
5281 Add extra parameter for Process_Interface_Name.
5282 (Process_Interface_Name): Add parameter for pragma to analyze
5283 corresponding aspect.
5284 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
5285 from sem_ch13.adb
5286
5287 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5288
5289 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
5290 correction.
5291
5292 2017-04-25 Yannick Moy <moy@adacore.com>
5293
5294 * sem_res.adb (Resolve_Comparison_Op): Do not
5295 attempt evaluation of relational operations inside assertions.
5296
5297 2017-04-25 Justin Squirek <squirek@adacore.com>
5298
5299 * exp_util.adb (Add_Interface_Invariants):
5300 Restored, code moved back from Build_Invariant_Procedure_Body.
5301 (Add_Parent_Invariants): Restored, code moved back from
5302 Build_Invariant_Procedure_Body.
5303 (Build_Invariant_Procedure_Body):
5304 Remove refactored calls and integrated code from
5305 Add_Parent_Invariants and Add_Interface_Invariants.
5306
5307 2017-04-25 Johannes Kanig <kanig@adacore.com>
5308
5309 * errout.adb (Output_Messages): Adjust computation of total
5310 errors
5311 * erroutc.adb (Error_Msg): In statistics counts, deal
5312 correctly with informational messages that are not warnings.
5313 * errutil.adb (Finalize): adjust computation of total errors.
5314
5315 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5316
5317 * terminals.c (__gnat_terminate_pid): New.
5318 * g-exptty.ads (Terminate_Process): New. Update comments.
5319
5320 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5321
5322 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
5323
5324 2017-04-25 Justin Squirek <squirek@adacore.com>
5325
5326 * sem_ch3.adb (Analyze_Declarations): Minor
5327 correction to comments, move out large conditional and scope
5328 traversal into a predicate.
5329 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
5330 logic.
5331
5332 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5333
5334 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
5335 of prefix whose type is a current instance of a synchronized
5336 type. If the prefix is an object this is an external call (or
5337 requeue) that can only access public operations of the object. The
5338 previous predicate was too restrictive, and did not allow public
5339 protected operations, only task entries.
5340
5341 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5342
5343 * sem_ch5.adb, fname.adb: Minor reformatting.
5344
5345 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5346
5347 * einfo.adb (Is_Anonymous_Access_Type): New routine.
5348 * einfo.ads Update the placement of
5349 E_Anonymous_Access_Subprogram_Type along with all subtypes that
5350 mention the ekind.
5351 (Is_Anonymous_Access_Type): New routine.
5352 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
5353 master for an access type subject to pragma No_Heap_Finalization.
5354 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
5355 allocated or deallocated does not finalization actions if the
5356 associated access type is subject to pragma No_Heap_Finalization.
5357 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
5358 * par-prag.adb Pragma No_Heap_Finalization does not need special
5359 processing from the parser.
5360 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
5361 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
5362 * sem_prag.adb Add an entry in table Sig_Flags for pragma
5363 No_Heap_Finalization.
5364 (Analyze_Pragma): Add processing for
5365 pragma No_Heap_Finalization. Update various error messages to
5366 use Duplication_Error.
5367 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
5368 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
5369 and corresponding pragma id.
5370
5371 2017-04-25 Bob Duff <duff@adacore.com>
5372
5373 * freeze.adb (Freeze_Record_Type): Use the
5374 underlying type of the component type to determine whether it's
5375 elementary. For representation clause purposes, a private type
5376 should behave the same as its full type.
5377 * fname.ads, fname.adb (Is_Predefined_File_Name):
5378 Make sure things like "system.ali" are recognized as predefined.
5379
5380 2017-04-25 Javier Miranda <miranda@adacore.com>
5381
5382 * debug.adb: Update documentation of -gnatd.6.
5383
5384 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5385
5386 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
5387 element iterator when the name is an overloaded function call,
5388 one of whose interpretations yields an array.
5389
5390 2017-04-25 Bob Duff <duff@adacore.com>
5391
5392 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
5393 Is_Internal_Unit_Name): New functions for operating on unit
5394 names, as opposed to file names. There's some duplicated code
5395 with fname.adb, which is unfortunate, but it seems like we don't
5396 want to add dependencies here.
5397 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
5398 to Is_Predefined_Unit_Name; the former was wrong, because Uname
5399 is not a file name at all.
5400 * fname.ads, fname.adb: Document the fact that
5401 Is_Predefined_File_Name and Is_Internal_File_Name can be called
5402 for ALI files, and fix the code so it works properly for ALI
5403 files. E.g. these should return True for "system.ali".
5404
5405 2017-04-25 Justin Squirek <squirek@adacore.com>
5406
5407 * exp_util.adb (Add_Invariant): Removed,
5408 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
5409 and Add_Own_Invariant. (Add_Invariant_Check): Used
5410 for adding runtime checks from any kind of invariant.
5411 (Add_Inherited_Invariant): Generates invariant checks for
5412 class-wide invariants (Add_Interface_Invariants): Removed, code
5413 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
5414 Create a types own invariant procedure (Add_Parent_Invariants):
5415 Removed, code moved to Build_Invariant_Procedure_Body
5416 (Build_Invariant_Procedure_Body): Add refactored calls
5417 and integrated code from Add_Parent_Invariants and
5418 Add_Interface_Invariants.
5419 (Process_Type): Removed, the
5420 relavant code was inlined into both Add_Own_Invariant and
5421 Add_Inherited_Invariant.
5422
5423 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5424
5425 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
5426 scn.adb, osint.adb, fname.adb: Minor reformatting.
5427
5428 2017-04-25 Pascal Obry <obry@adacore.com>
5429
5430 * s-taprop-mingw.adb: Do not check for CloseHandle in
5431 Finalize_TCB.
5432
5433 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5434
5435 * sem_util.adb (Check_Part_Of_Reference):
5436 Continue to examine the context if the reference appears within
5437 an expression function.
5438
5439 2017-04-25 Justin Squirek <squirek@adacore.com>
5440
5441 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
5442 and Build_Invariant_Procedure_Declaration.
5443 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
5444 and Build_Invariant_Procedure_Declaration from exp_ch7
5445 and break-out Is_Untagged_Private_Derivation from
5446 Build_Invariant_Procedure_Body.
5447 (Replace_Type_References):
5448 Append an extra parameter to allow for dispatching replacements
5449 and add the corrasponding logic.
5450 (Type_Invariant): Remove
5451 Replace_Typ_Refs and replace its references with calls to
5452 Replace_Type_References.
5453 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
5454
5455 2017-04-25 Bob Duff <duff@adacore.com>
5456
5457 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
5458 that returns True when appropriate.
5459 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
5460 when compiling predefined files.
5461 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
5462 "gnat.adc" should not be considered a predefined file name.
5463 That required (or at least encouraged) a lot of cleanup of global
5464 variable usage. We shouldn't be communicating information via
5465 the global name buffer.
5466 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
5467 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
5468 required by the above-mentioned cleanup.
5469
5470 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5471
5472 * osint.adb (Find_File): Handle properly a request for a
5473 configuration file whose name is a directory.
5474
5475 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5476
5477 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
5478
5479 2017-04-25 Bob Duff <duff@adacore.com>
5480
5481 * types.ads: Minor: Fix '???' comment.
5482 * sem_ch8.adb: Minor comment fix.
5483
5484 2017-04-25 Bob Duff <duff@adacore.com>
5485
5486 * sem_prag.adb: Remove suspicious uses of Name_Buf.
5487 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
5488 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
5489 Add String_To_Name with no side effects.
5490
5491 2017-04-25 Justin Squirek <squirek@adacore.com>
5492
5493 * sem_ch3.adb (Analyze_Declarations): Add
5494 additional condition for edge case.
5495
5496 2017-04-25 Bob Duff <duff@adacore.com>
5497
5498 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
5499 reserved words inside pragmas. This is necessary to allow the
5500 pragma name Interface to be used in pragma Ignore_Pragma.
5501 * par.adb: Minor comment fix.
5502
5503 2017-04-25 Javier Miranda <miranda@adacore.com>
5504
5505 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
5506 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
5507 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
5508 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
5509 occurrences of RE_Type_Is_Abstract
5510
5511 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5512
5513 * exp_util.adb (Build_Chain): Account for ancestor
5514 subtypes while traversing the derivation chain.
5515
5516 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5517
5518 * sem_attr.adb: minor reformatting.
5519
5520 2017-04-25 Doug Rupp <rupp@adacore.com>
5521
5522 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
5523
5524 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5525
5526 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
5527 the first pass over an assignment statement with target names,
5528 to prevent the generation of subtypes (such as discriminated
5529 record components)that may carry the target name outside of the
5530 tree for the assignment. The subtypes will be generated when
5531 the assignment is reanalyzed in full.
5532 (Analyze_Target_Name): Handle properly class-wide types.
5533
5534 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5535
5536 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
5537 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
5538 the purposes of freezing.
5539 * exp_util.adb Update the documentation and structure of the
5540 type map used in class-wide semantics of assertion expressions.
5541 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
5542 and resolve the triaged expression because all substitutions
5543 refer to the proper entities. Update the replacement of
5544 references.
5545 (Build_DIC_Procedure_Body): Add formal parameter
5546 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
5547 are now only processed when freezing occurs. Build a body only
5548 when one is needed.
5549 (Entity_Hash): Removed.
5550 (Map_Types): New routine.
5551 (Replace_Object_And_Primitive_References): Removed.
5552 (Replace_References): New routine.
5553 (Replace_Type_References): Moved to the library level of Exp_Util.
5554 (Type_Map_Hash): New routine.
5555 (Update_Primitives_Mapping): Update the mapping call.
5556 (Update_Primitives_Mapping_Of_Types): Removed.
5557 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
5558 parameter For_Freeze and update the comment on usage.
5559 (Map_Types): New routine.
5560 (Replace_References): New routine.
5561 (Replace_Type_References): Moved to the library level of Exp_Util.
5562 (Update_Primitives_Mapping_Of_Types): Removed.
5563 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
5564 properties of the private type to the full view in case the full
5565 view derives from a parent type and inherits a DIC pragma.
5566 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
5567 DIC pragma is placed at the top of a declarative region.
5568
5569 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5570
5571 * a-tasatt.adb: Complete previous change and use an unsigned
5572 int to avoid overflow checks.
5573
5574 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5575
5576 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
5577 the error message when the attribute reference is an actual in
5578 a call to a subprogram inherited from a generic formal type with
5579 unknown discriminants, which makes the subprogram and its formal
5580 parameters intrinsic (see RM 6.3.1 (8) and (13)).
5581
5582 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5583
5584 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
5585 sem_prag.adb: Minor reformatting.
5586
5587 2017-04-25 Bob Duff <duff@adacore.com>
5588
5589 * sem_attr.adb (Type_Key): Add code in the
5590 recursive Compute_Type_Key to protect against fetching the source
5591 code for Standard, in case a component of the type is declared
5592 in Standard. There was already code to do this for the original
5593 type, but not for its components.
5594
5595 2017-04-25 Javier Miranda <miranda@adacore.com>
5596
5597 * exp_ch3.adb (Build_Initialization_Call): Handle
5598 subtypes of private types when searching for the underlying full
5599 view of a private type.
5600
5601 2017-04-25 Javier Miranda <miranda@adacore.com>
5602
5603 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
5604 real conditional expression can appear in a fixed-type context
5605 and must be resolved with that context to facilitate the code
5606 generation to the backend.
5607
5608 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5609
5610 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
5611 to indicate whether during inline processing, when some unit U1
5612 appears in the context of a unit U2 compiled for instantiation
5613 or inlining purposes, the body of U1 needs to be compiled as well.
5614 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
5615 context is a package declaration.
5616 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
5617 Analyze_Generic_Package_Declaration): ditto.
5618 * inline.adb (Analyze_Inlined_Bodies): Check
5619 Body_Needed_For_Inlining.
5620
5621 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5622
5623 * par.adb (Current_Assign_Node): Global variable use to record
5624 the presence of a target_name in the right hand side of the
5625 assignment being parsed.
5626 * par-ch4.adb (P_Name): If the name is a target_name, mark the
5627 enclosing assignment node accordingly.
5628 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
5629 appropriately.
5630 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
5631 analyzing RHS if the statement has target_names.
5632 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
5633 properly choices that are subtype marks.
5634 * exp_ch5.adb: Code cleanup.
5635
5636 2017-04-25 Bob Duff <duff@adacore.com>
5637
5638 * s-memory.adb: Add a comment regarding efficiency.
5639 * atree.adb: Fix the assertion, and combine 2 assertions into one,
5640 "the source has an extension if and only if the destination does."
5641 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
5642
5643 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5644
5645 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
5646 conversion.
5647
5648 2017-04-25 Doug Rupp <rupp@adacore.com>
5649
5650 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
5651 handling for ppc64-vx7.
5652 * sigtramp-vxworks-target.inc
5653 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
5654
5655 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5656
5657 * ada_get_targ.adb: New file.
5658
5659 2017-04-25 Bob Duff <duff@adacore.com>
5660
5661 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
5662 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
5663 (UI_GCD): Remove ??? comment involving possible efficiency
5664 improvements. This just isn't important after all these years.
5665 Also minor cleanup.
5666 * uintp.ads: Minor cleanup.
5667
5668 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5669
5670 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
5671 Revert previous changes.
5672 * scng.adb: Minor reformatting.
5673 * s-stratt.ads: Fix unbalanced parens in comment.
5674
5675 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5676
5677 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
5678 Minor reformatting.
5679
5680 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5681
5682 * scng.adb (Scan): Handle '@' appropriately.
5683 * sem_ch5.adb: Code cleanup.
5684
5685 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5686
5687 * freeze.adb (Check_Expression_Function): Do not check for the
5688 use of deferred constants if the freezing of the expression
5689 function is triggered by its generated body, rather than a
5690 premature use.
5691
5692 2017-04-25 Javier Miranda <miranda@adacore.com>
5693
5694 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
5695 subtypes of private types when performing the view conversion.
5696
5697 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5698
5699 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
5700 the purposes of freezing.
5701 * exp_util.adb Update the documentation and structure of the
5702 type map used in class-wide semantics of assertion expressions.
5703 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
5704 and resolve the triaged expression because all substitutions
5705 refer to the proper entities. Update the replacement of
5706 references.
5707 (Build_DIC_Procedure_Body): Add formal parameter
5708 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
5709 are now only processed when freezing occurs. Build a body only
5710 when one is needed.
5711 (Entity_Hash): Removed.
5712 (Map_Types): New routine.
5713 (Replace_Object_And_Primitive_References): Removed.
5714 (Replace_References): New routine.
5715 (Replace_Type_References): Moved to the library level of Exp_Util.
5716 (Type_Map_Hash): New routine.
5717 (Update_Primitives_Mapping): Update the mapping call.
5718 (Update_Primitives_Mapping_Of_Types): Removed.
5719 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
5720 parameter For_Freeze and update the comment on usage.
5721 (Map_Types): New routine.
5722 (Replace_References): New routine.
5723 (Replace_Type_References): Moved to the library level of Exp_Util.
5724 (Update_Primitives_Mapping_Of_Types): Removed.
5725 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
5726 properties of the private type to the full view in case the full
5727 view derives from a parent type and inherits a DIC pragma.
5728 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
5729 DIC pragma is placed at the top of a declarative region.
5730
5731 2017-04-25 Tristan Gingold <gingold@adacore.com>
5732
5733 * s-mmap.ads (Data): Add pragma Inline.
5734
5735 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5736
5737 * checks.adb (Insert_Valid_Check): Do not use
5738 a renaming to alias a volatile name because this will lead to
5739 multiple evaluations of the volatile name. Use a constant to
5740 capture the value instead.
5741
5742 2017-04-25 Doug Rupp <rupp@adacore.com>
5743
5744 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
5745
5746 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5747
5748 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
5749 Add out parameter to indicate to caller that a wrapper must
5750 be constructed for an inherited primitive whose inherited
5751 pre/postcondition has called to overridden primitives.
5752 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
5753 for inherited primitive that requires it.
5754 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
5755 legal primitive operations and belong to the list of bodies
5756 generated after the freeze point of a type.
5757 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
5758 of Build_Class_Wide_Expression.
5759 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
5760 to construct the specification of the wrapper subprogram created
5761 for an inherited operation.
5762
5763 2017-04-25 Bob Duff <duff@adacore.com>
5764
5765 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
5766 pthread_mutexattr_setprioceiling): Add new interfaces for these
5767 pthread operations.
5768 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
5769 protocols as appropriate for Locking_Policy 'C' and 'I'.
5770 * s-taprop-posix.adb: Minor reformatting to make it more similar
5771 to s-taprop-linux.adb.
5772
5773 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5774
5775 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
5776 Handle properly a multi- level derivation involving both renamed
5777 and constrained parent discriminants, when the type to be
5778 constrained has fewer discriminants that the ultimate ancestor.
5779
5780 2017-04-25 Bob Duff <duff@adacore.com>
5781
5782 * sem_util.adb (Is_Object_Reference): In the
5783 case of N_Explicit_Dereference, return False if it came from a
5784 conditional expression.
5785
5786 2017-04-25 Bob Duff <duff@adacore.com>
5787
5788 * par-ch4.adb (P_Case_Expression): If a semicolon
5789 is followed by "when", assume that ";" was meant to be ",".
5790
5791 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5792
5793 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
5794 fixes.
5795
5796 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5797
5798 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
5799 loading of an entity.
5800 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
5801 previously repeated in the analysis.
5802 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
5803 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
5804 use new procedure SPARK_Implicit_Load.
5805 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
5806 SPARK_Implicit_Load.
5807
5808 2017-04-25 Javier Miranda <miranda@adacore.com>
5809
5810 * sem_util.adb (New_Copy_Tree): By default
5811 copying of defining identifiers is prohibited because
5812 this would introduce an entirely new entity into the
5813 tree. This patch introduces an exception to this general
5814 rule: the declaration of constants and variables located in
5815 Expression_With_Action nodes.
5816 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
5817 (In_Map): New subprogram.
5818 (Visit_Entity): New subprogram.
5819 (Visit_Node): Handle EWA_Level,
5820 EWA_Inner_Scope_Level, and take care of defining entities defined
5821 in Expression_With_Action nodes.
5822
5823 2017-04-25 Thomas Quinot <quinot@adacore.com>
5824
5825 * exp_ch6.adb: minor comment edit.
5826 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
5827 procedure specifications that come from source.
5828 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
5829 Null_Statement attribute.
5830 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
5831 procedure, generate statement SCO for the generated NULL statement.
5832 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
5833 parser, if available.
5834
5835 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5836
5837 * system-linux-s390.ads: Use Long_Integer'Size to define
5838 Memory_Size.
5839
5840 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
5841
5842 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
5843
5844 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5845
5846 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
5847 * g-socket.adb (To_Host_Entry): Fix typo in comment.
5848 * gnat_ugn.texi: Fix typo.
5849 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
5850 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
5851 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
5852 * sem_util.adb (Mark_Coextensions): Likewise.
5853 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
5854
5855 2017-03-28 Andreas Schwab <schwab@suse.de>
5856
5857 PR ada/80117
5858 * system-linux-aarch64-ilp32.ads: New file.
5859 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
5860 from LIBGNAT_TARGET_PAIRS.
5861 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
5862 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
5863 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
5864 or -mabi=ilp32, resp.
5865
5866 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
5867
5868 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
5869
5870 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
5871
5872 PR ada/79903
5873 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
5874
5875 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
5876
5877 PR ada/79945
5878 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
5879
5880 * system-linux-arm.ads (Default_Bit_Order): Likewise.
5881 * system-linux-mips.ads (Default_Bit_Order): Likewise.
5882 * system-linux-armeb.ads: Delete.
5883 * system-linux-mipsel.ads: Likewise.
5884 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
5885 (ARM/Linux): Likewise.
5886
5887 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5888
5889 PR c/79677
5890 * gcc-interface/misc.c (gnat_handle_option): Pass true to
5891 handle_generated_option GENERATED_P.
5892
5893 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5894
5895 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
5896 around a justified modular type if it doesn't have the same scalar
5897 storage order as the enclosing record type.
5898
5899 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5900
5901 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
5902 of boolean rvalues to function calls.
5903
5904 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5905
5906 * gcc-interface/utils.c (fold_bit_position): New function.
5907 (rest_of_record_type_compilation): Call it instead of bit_position to
5908 compute the field position and remove the call to remove_conversions.
5909 (compute_related_constant): Factor out the multiplication in both
5910 operands, if any, and streamline the final test.
5911
5912 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5913
5914 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
5915
5916 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5917
5918 * gcc-interface/decl.c: Include demangle.h.
5919 (is_cplusplus_method): Return again true for a primitive operation
5920 only if it is dispatching. For a subprogram with an interface name,
5921 call the demangler to get the number of C++ parameters and compare it
5922 with the number of Ada parameters.
5923
5924 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5925
5926 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
5927 there is no end label, put the location of the At_End procedure on
5928 the call to the procedure.
5929
5930 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5931
5932 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
5933 value for array types with TYPE_INDEX_TYPE set on their domain type.
5934 * gcc-interface/utils.c (max_size): For operations and expressions, do
5935 not build a new node if the operands have not changed or are missing.
5936
5937 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5938
5939 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
5940 argument when recursing on TRUTH_NOT_EXPR.
5941
5942 2017-02-12 John Marino <gnugcc@marino.st>
5943
5944 * system-freebsd-x86.ads: Rename into...
5945 * system-freebsd.ads: ...this.
5946 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
5947 * gcc-interface/Makefile.in: Support aarch64-freebsd.
5948 (x86-64/FreeBSD): Adjust to above renaming.
5949 (i386/FreeBSD): Likewise.
5950
5951 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
5952
5953 * comperr.adb: Update FSF bug reporting URL.
5954
5955 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
5956 Jakub Jelinek <jakub@redhat.com>
5957
5958 PR ada/79309
5959 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
5960
5961 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5962
5963 PR lto/79061
5964 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
5965 to build_translation_unit_decl.
5966
5967 2017-01-23 Javier Miranda <miranda@adacore.com>
5968
5969 * sem_util.adb (New_Copy_Tree): Code cleanup:
5970 removal of the internal map (ie. variable Actual_Map, its
5971 associated local variables, and all the code handling it).
5972 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
5973 force loading of the System package when processing a task type.
5974 (Analyze_Protected_Type_Declaration): in GNATprove mode force
5975 loading of the System package when processing a protected type.
5976 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
5977 force loading of the System package when processing compilation
5978 unit with a main-like subprogram.
5979 * frontend.adb (Frontend): remove forced loading of the System
5980 package.
5981
5982 2017-01-23 Ed Schonberg <schonberg@adacore.com>
5983
5984 * sem_prag.adb (Default_Initial_Condition): If the desired type
5985 declaration is a derived type declaration with discriminants,
5986 it is rewritten as a private type declaration.
5987 * sem_ch13.adb (Replace_Type_References_Generic,
5988 Visible_Component): A discriminated private type with descriminnts
5989 has components that must be rewritten as selected components
5990 if they appear as identifiers in an aspect expression such as
5991 a Default_Initial_Condition.
5992 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
5993 nodes.
5994
5995 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
5996
5997 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
5998 * gnat1drv.adb Generate an empty object file for an ignored
5999 Ghost compilation unit.
6000 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
6001
6002 2017-01-23 Yannick Moy <moy@adacore.com>
6003
6004 * sem_ch4.adb (Analyze_Indexed_Component_Form):
6005 Adapt to inlined prefix with string literal subtype.
6006 * inline.adb (Expand_Inlined_Call): Keep unchecked
6007 conversion inside inlined call when formal type is constrained.
6008
6009 2017-01-23 Javier Miranda <miranda@adacore.com>
6010
6011 * sem_util.adb (New_Copy_Tree): Code cleanup:
6012 removal of global variables. All the global variables, global
6013 functions and tables of this subprogram are now declared locally.
6014
6015 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6016
6017 * exp_strm.ads: Minor reformatting and typo fixes.
6018
6019 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6020
6021 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
6022 exp_aggr.adb: Minor reformatting.
6023 * g-diopit.adb: minor grammar/punctuation fix in comment.
6024 * g-byorma.ads: minor fix of unbalanced parens in comment.
6025
6026 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6027
6028 * par.adb: Update the documentation of component Labl.
6029 * par-ch6.adb (P_Return_Statement): Set the expected label of
6030 an extended return statement to Error.
6031
6032 2017-01-23 Tristan Gingold <gingold@adacore.com>
6033
6034 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
6035
6036 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6037
6038 * expander.adb: Handle N_Delta_Aggregate.
6039
6040 2017-01-23 Javier Miranda <miranda@adacore.com>
6041
6042 * exp_ch6.adb (Expand_Call): Improve the code that
6043 checks if some formal of the called subprogram is a class-wide
6044 interface, to handle subtypes of class-wide interfaces.
6045
6046 2017-01-23 Javier Miranda <miranda@adacore.com>
6047
6048 * checks.adb (Apply_Parameter_Aliasing_Checks):
6049 Remove side effects of the actuals before generating the overlap
6050 check.
6051
6052 2017-01-23 Justin Squirek <squirek@adacore.com>
6053
6054 * exp_strm.ads, exp_strm.ads
6055 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
6056 as to avoid getting the underlying type by default.
6057 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
6058 underlying type in the Iiput and output attribute cases when
6059 building their respective functions.
6060
6061 2017-01-23 Gary Dismukes <dismukes@adacore.com>
6062
6063 * scng.adb: Minor reformatting of error message.
6064
6065 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6066
6067 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
6068 to freeze the return type of an expression funxtion that is a
6069 completion, if the type is a limited view and the non-limited
6070 view is available.
6071
6072 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6073
6074 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
6075 aggregate construct.
6076 (P_Record_Or_Array_Component_Association): An array aggregate
6077 can start with an Iterated_Component_Association.
6078 * scng.adb: Modify error message on improper use of @ in earlier
6079 versions of the language.
6080 * sinfo.ads: New node kind N_Delta_Aggregate.
6081 * sinfo.adb: An N_Delta_Aggregate has component associations and
6082 an expression.
6083 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
6084 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
6085 Create a new index for each one of the choices in the association,
6086 to prevent spurious homonyms in the scope.
6087 (Resolve_Delta_Aggregate): New.
6088 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
6089 * exp_util.adb (Insert_Actions): Take into account
6090 N_Delta_Aggregate.
6091 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
6092 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
6093 and local procedures Expand_Delta_Array_Aggregate and
6094 expand_Delta_Record_Aggregate.
6095 * sprint.adb: Handle N_Delta_Aggregate.
6096
6097 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6098
6099 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
6100 empty name when the exception declaration is subject to pragma
6101 Discard_Names.
6102 (Null_String): New routine.
6103
6104 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6105
6106 * par-ch9.adb (P_Protected_Definition): Parse
6107 any optional and potentially illegal pragmas which appear in
6108 a protected operation declaration list.
6109 (P_Task_Items): Parse
6110 any optional and potentially illegal pragmas which appear in a
6111 task item list.
6112
6113 2017-01-23 Pascal Obry <obry@adacore.com>
6114
6115 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
6116 is needed when a foreign thread call a Win32 API using a thread handle
6117 like GetThreadTimes() for example.
6118
6119 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6120
6121 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6122 allow an 'Address clause to be specified on a prefix of a
6123 class-wide type.
6124
6125 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6126
6127 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6128 attribute 'Valid is a renaming of the original expression when
6129 the expression denotes a name. For all other kinds of expression,
6130 use a constant to capture the value.
6131 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6132 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6133
6134 2017-01-23 Justin Squirek <squirek@adacore.com>
6135
6136 * sem_eval.adb (Eval_Integer_Literal): Add special
6137 case to avoid optimizing out check if the literal appears in
6138 an if-expression.
6139
6140 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6141
6142 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6143 allow an 'Address clause to be specified on a prefix of a
6144 class-wide type.
6145
6146 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6147
6148 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6149 attribute 'Valid is a renaming of the original expression when
6150 the expression denotes a name. For all other kinds of expression,
6151 use a constant to capture the value.
6152 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6153 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6154
6155 2017-01-23 Justin Squirek <squirek@adacore.com>
6156
6157 * sem_eval.adb (Eval_Integer_Literal): Add special
6158 case to avoid optimizing out check if the literal appears in
6159 an if-expression.
6160
6161 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6162
6163 * sem_ch4.adb (Try_Primitive_Operations,
6164 Is_Valid_First_Argument_Of): argument is valid if it is a derived
6165 type with unknown discriminants that matches its underlying
6166 record view.
6167 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
6168 expression if its type is derived from a limited type with
6169 unknown discriminants, because the expansion (which is a call)
6170 must be expanded in the enclosing context to add the proper build-
6171 in-place parameters to the call.
6172 * lib.ads, exp_ch9.adb: Minor fixes in comments.
6173
6174 2017-01-23 Yannick Moy <moy@adacore.com>
6175
6176 * frontend.adb (Frontend): Do not load runtime
6177 unit for GNATprove when parsing failed.
6178 * exp_ch9.adb: minor removal of extra whitespace
6179 * exp_ch6.adb: minor typo in comment
6180 * sem_util.adb: Code cleanup.
6181 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
6182 * a-ngcefu.adb: minor style fix in whitespace
6183
6184 2017-01-23 Thomas Quinot <quinot@adacore.com>
6185
6186 * scos.ads: Document usage of 'd' as default SCO kind for
6187 declarations.
6188 * par_sco.adb (Traverse_Declarations_Or_Statements.
6189 Traverse_Degenerate_Subprogram): New supporting routine for expression
6190 functions and null procedures.
6191 (Traverse_Declarations_Or_Statements.Traverse_One): Add
6192 N_Expression_Function to the subprogram case; add required
6193 support for null procedures and expression functions.
6194
6195 2017-01-23 Bob Duff <duff@adacore.com>
6196
6197 * namet.ads (Bounded_String): Decrease the size of type
6198 Bounded_String to avoid running out of stack space.
6199 * namet.ads (Append): Don't ignore buffer overflow; raise
6200 Program_Error instead.
6201
6202 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6203
6204 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
6205 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
6206 reformatting.
6207 * exp_ch9.adb: minor style fix in comment.
6208
6209 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6210
6211 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
6212 for a limited record extension with unknown discriminants whose
6213 full view has no discriminants.
6214
6215 2017-01-23 Yannick Moy <moy@adacore.com>
6216
6217 * exp_spark.adb: Alphabetize with clauses.
6218
6219 2017-01-23 Yannick Moy <moy@adacore.com>
6220
6221 * sem_util.adb (Has_Enabled_Property): Treat
6222 protected objects and variables differently from other variables.
6223
6224 2017-01-23 Thomas Quinot <quinot@adacore.com>
6225
6226 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
6227 Split original Ada 95 part off into new subprogram
6228 below. Call that subprogram (instead of proceeding with
6229 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
6230 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
6231 * debug.adb Document new switch -gnatd.p
6232 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
6233 record for reverse bit order if an error has already been posted
6234 on the record type. This avoids generating extraneous "info:"
6235 messages for illegal code.
6236
6237 2017-01-23 Justin Squirek <squirek@adacore.com>
6238
6239 * sem_ch3.adb (Analyze_Declarations): Correct comments
6240 * freeze.adb (Find_Constant): Add detection of deferred constants
6241 so they are not incorrectly flagged as premature.
6242
6243 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6244
6245 * scans.ads: New token At_Sign. Remove '@' from list of illegal
6246 characters for future version of the language. '@' is legal name.
6247 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
6248 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
6249 denotes a Target_Name.
6250 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
6251 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
6252 (Has_Target_Names): New flag on N_Assignment_Statement, to
6253 indicate that RHS has occurrences of N_Target_Name.
6254 * sem.adb: Call Analyze_Target_Name.
6255 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
6256 (urrent_LHS): Global variable that denotes LHS of assignment,
6257 used in the analysis of Target_Name nodes.
6258 * sem_res.adb (Resolve_Target_Name): New procedure.
6259 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
6260 N is an assignment statement whose RHS contains occurences of @
6261 that designate the value of the LHS of the assignment. If the
6262 LHS is side-effect free the target names can be replaced with
6263 a copy of the LHS; otherwise the semantics of the assignment
6264 is described in terms of a procedure with an in-out parameter,
6265 and expanded as such.
6266 (Expand_N_Assignment_Statement): Call
6267 Expand_Assign_With_Target_Names when needed.
6268 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
6269 * sprint.adb: Handle N_Target_Name.
6270
6271 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
6272
6273 * checks.adb: Minor fix in comment.
6274
6275 2017-01-23 Philippe Gil <gil@adacore.com>
6276
6277 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
6278 count in Sort = Memory_Usage or Allocations_Count
6279
6280 2017-01-23 Justin Squirek <squirek@adacore.com>
6281
6282 * sem_ch3.adb: Code cleanup.
6283
6284 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6285
6286 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
6287 variables to the local variable section. Update the profile
6288 of various nested routine that previously had visibility
6289 of those globals. One the matching phase has completed,
6290 remove certain classes of clauses which are considered noise.
6291 (Check_Dependency_Clause): Properly detect a match between two
6292 'Result attributes. Update the various post-match cases to use
6293 Is_Already_Matched as this routine now automatically recognizes
6294 a previously matched 'Result attribute.
6295 (Is_Already_Matched): New routine.
6296 (Remove_Extra_Clauses): New routine.
6297 (Report_Extra_Clauses): Remove the detection of ... => null
6298 clauses as this is now done in Remove_Extra_Clauses.
6299
6300 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6301
6302 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
6303 report on spurious overlaps between values involving a subtype
6304 with a static predicate, because the expansion of such a subtype
6305 into individual ranges in inhibited in ASIS mode.
6306
6307 2017-01-23 Justin Squirek <squirek@adacore.com>
6308
6309 * sem_ch3.adb (Analyze_Declarations): Add detection
6310 of an edge case and delay freezing if it is present.
6311
6312 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6313
6314 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
6315 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
6316
6317 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6318
6319 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
6320 access-to-subprogram types inherit the convention of the
6321 associated subprogram. (Set_Profile_Convention): New routine.
6322 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
6323 of the two entities directly, use Conventions_Match to account
6324 for anonymous access-to-subprogram and subprogram types.
6325 (Conventions_Match): New routine.
6326
6327 2017-01-23 Claire Dross <dross@adacore.com>
6328
6329 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
6330 which return Universal_Integer, force the overflow check flag for
6331 Length and Range_Length for types as big as Long_Long_Integer.
6332
6333 2017-01-23 Claire Dross <dross@adacore.com>
6334
6335 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
6336 attributes which return Universal_Integer, introduce a conversion
6337 to the expected type with the appropriate check flags set.
6338 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
6339 base type if the range is null. It may still be invalid if it
6340 is higher than the lower bound. This is checked later in the
6341 context in which the range appears.
6342
6343 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
6344
6345 * scos.ads: Introduce a constant to represent ignored
6346 dependencies in SCO_Unit_Table_Entry.
6347
6348 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6349
6350 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
6351 spaces from error messages.
6352
6353 2017-01-23 Ed Schonberg <schonberg@adacore.com>
6354
6355 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
6356 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
6357 an object declaration for an array type with a modular index type
6358 with the size of Long_Long_Integer. Special processing is needed
6359 in this case to compute reliably the size of the object, and
6360 eventually to raise Storage_Error, when wrap-around arithmetic
6361 might compute a meangingless size for the object.
6362
6363 2017-01-23 Justin Squirek <squirek@adacore.com>
6364
6365 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
6366 sem_type.adb: Code cleanups.
6367
6368 2017-01-23 Bob Duff <duff@adacore.com>
6369
6370 * sem_res.adb (Resolve_Call): In the part of the code where
6371 it is deciding whether to turn the call into an indexed
6372 component, avoid doing so if the call is to an instance of
6373 Unchecked_Conversion. Otherwise, the compiler turns it into an
6374 indexed component, and resolution of that turns it back into a
6375 function call, and so on, resulting in infinite recursion.
6376 * sem_util.adb (Needs_One_Actual): If the first formal has a
6377 default, then return False.
6378
6379 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
6380
6381 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
6382 optimizations when the type is modular and the offsets are equal.
6383
6384 2017-01-20 Thomas Quinot <quinot@adacore.com>
6385
6386 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
6387 message.
6388
6389 2017-01-20 Nicolas Roche <roche@adacore.com>
6390
6391 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
6392
6393 2017-01-20 Bob Duff <duff@adacore.com>
6394
6395 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
6396 (etc) optimizations when the type is modular.
6397
6398 2017-01-20 Yannick Moy <moy@adacore.com>
6399
6400 * sem_ch6.adb (Move_Pragmas): move some pragmas,
6401 but copy the SPARK_Mode pragma instead of moving it.
6402 (Build_Subprogram_Declaration): Ensure that the generated spec
6403 and original body share the same SPARK_Pragma aspect/pragma.
6404 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
6405 procedure to copy SPARK_Mode aspect.
6406
6407 2017-01-20 Bob Duff <duff@adacore.com>
6408
6409 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
6410 even in ASIS mode.
6411 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
6412 Empty even in ASIS mode.
6413
6414 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6415
6416 * exp_ch9.adb: minor style fixes in comments.
6417 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
6418 relative statement introduces an implicit dependency on
6419 Ada.Real_Time.Clock_Time.
6420 * sem_util.adb: Minor reformatting.
6421
6422 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6423
6424 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
6425 must be treated as delayed aspect even if the expression is
6426 a literal, because the aspect affects the freezing and the
6427 elaboration of the object to which it applies.
6428
6429 2017-01-20 Tristan Gingold <gingold@adacore.com>
6430
6431 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
6432
6433 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6434
6435 * lib-xref.adb (Generate_Reference): Do not warn about the
6436 presence of a pragma Unreferenced if the entity appears as the
6437 actual in a procedure call that does not come from source.
6438
6439 2017-01-20 Pascal Obry <obry@adacore.com>
6440
6441 * expect.c, terminals.c: Fix some warnings about unused variables.
6442 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
6443 of the runtime.
6444
6445 2017-01-20 Bob Duff <duff@adacore.com>
6446
6447 * exp_attr.adb (Constrained): Apply an access check (check that
6448 the prefix is not null) when the prefix denotes an object of an
6449 access type; that is, when there is an implicit dereference.
6450
6451 2017-01-20 Gary Dismukes <dismukes@adacore.com>
6452
6453 * s-rident.ads (constant Profile_Info): Remove
6454 No_Calendar from GNAT_Extended_Ravenscar restrictions.
6455
6456 2017-01-20 Tristan Gingold <gingold@adacore.com>
6457
6458 * s-maccod.ads: Add pragma No_Elaboration_Code_All
6459
6460 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6461
6462 * ghost.adb (Mark_Ghost_Clause): New routine.
6463 (Prune_Node): Do not prune compilation unit nodes.
6464 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
6465 This does not touch the node itself, but does prune all its fields.
6466 * ghost.ads (Mark_Ghost_Clause): New routine.
6467 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
6468 package clause mentions Ghost and non-Ghost packages. Mark a
6469 use package clause as Ghost when it mentions a Ghost package.
6470 (Analyze_Use_Type): Emit an error when a use type clause mentions
6471 Ghost and non-Ghost types. Mark a use type clause as Ghost when
6472 it mentions a Ghost type.
6473 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
6474 Ghost when it withs a Ghost unit.
6475
6476 2017-01-20 Javier Miranda <miranda@adacore.com>
6477
6478 * sem_res.adb (Resolve_Call): If a function call
6479 returns a limited view of a type and at the point of the call the
6480 function is not declared in the extended main unit then replace
6481 it with the non-limited view, which must be available. If the
6482 called function is in the extended main unit then no action is
6483 needed since the back-end handles this case.
6484
6485 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
6486
6487 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
6488 (Contains_Subprograms_Refs): ...this. Adjust comment
6489 for constants. (Is_Subp_Or_Const_Ref): Rename into...
6490 (Is_Subprogram_Ref): ...this.
6491 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
6492 Has_Non_Subprograms_Referencer and adjust comment. Remove
6493 incorrect shortcut for package declarations and bodies.
6494
6495 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6496
6497 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
6498 base type differs from that of the completion and the private
6499 subtype is an itype (created for a constraint on an access
6500 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
6501 anomalies in gigi.
6502
6503 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6504
6505 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
6506 When inheriting the SPARK_Mode of a prior expression function,
6507 look at the properly resolved entity rather than the initial
6508 candidate which may denote a homonym.
6509
6510 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6511
6512 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
6513 Precondition or Postcondition, and the context is pragma
6514 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
6515 and suggest the standard names Assertion_Policy /Pre /Post
6516 instead.
6517
6518 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6519
6520 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
6521
6522 2017-01-20 Javier Miranda <miranda@adacore.com>
6523
6524 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
6525 Entity attribute.
6526 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
6527 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
6528 malformed trees.
6529
6530 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6531
6532 * sem_ch13.adb (Analyze_Aspect_Specification, case
6533 Dynamic_Predicate): If the entity E is a subtype that inherits
6534 a static predicate for its parent P,, the inherited and the
6535 new predicate combine in the generated predicate function,
6536 and E only has a dynamic predicate.
6537
6538 2017-01-20 Tristan Gingold <gingold@adacore.com>
6539
6540 * s-boustr.ads, s-boustr.adb: New package.
6541 * Makefile.rtl: Add s-boustr.
6542
6543 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6544
6545 * inline.adb (Process_Formals): Qualify the
6546 expression of a return statement when it yields a universal type.
6547
6548 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6549
6550 * freeze.adb (Freeze_All): Freeze the default
6551 expressions of all eligible formal parameters that appear in
6552 entries, entry families, and protected subprograms.
6553
6554 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6555
6556 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
6557 for illegal inherited Implicit_Dereference aspects with renamed
6558 discriminants.
6559
6560 2017-01-20 Javier Miranda <miranda@adacore.com>
6561
6562 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
6563 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
6564 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
6565 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
6566 Set_Prev, Tree_Read): Adding assertion.
6567 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
6568 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
6569 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
6570 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
6571 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
6572 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
6573 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
6574 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
6575 Set_ListN_With_Parent): Adding assertion.
6576
6577 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6578
6579 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
6580 import that applies to several homograph subprograms. when one
6581 of them is declared by a subprogram body.
6582
6583 2017-01-20 Justin Squirek <squirek@adacore.com>
6584
6585 * exp_ch6.adb (Expand_Call): Remove optimization
6586 that nulls out calls to null procedures.
6587
6588 2017-01-20 Yannick Moy <moy@adacore.com>
6589
6590 * inline.adb (Expand_Inlined_Call): Keep more
6591 precise type of actual for inlining whenever possible. In
6592 particular, do not switch to the formal type in GNATprove mode in
6593 some case where the GNAT backend might require it for visibility.
6594
6595 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6596
6597 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
6598 aspect Implicit_Dereference can be inherited by a full view if
6599 the partial view has no discriminants, because there is no way
6600 to apply the aspect to the partial view.
6601 (Build_Derived_Record_Type): If derived type renames discriminants
6602 of the parent, the new discriminant inherits the aspect from
6603 the old one.
6604 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
6605 call through an access discriminant designating a subprogram.
6606 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
6607 properly a parameterless call through an access discriminant on
6608 the left-hand side of an assignment.
6609 * sem_res.adb (resolve): If an interpreation involves a
6610 discriminant with an implicit dereference and the expression is an
6611 entity, resolution takes place later in the appropriate routine.
6612 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
6613 access discriminants that designate a subprogram type.
6614
6615 2017-01-20 Pascal Obry <obry@adacore.com>
6616
6617 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
6618
6619 2017-01-20 Yannick Moy <moy@adacore.com>
6620
6621 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
6622 on implicitly with'ed units in GNATprove mode.
6623 * sinfo.ads (Implicit_With): Document use of flag for implicitly
6624 with'ed units in GNATprove mode.
6625
6626 2017-01-20 Ed Schonberg <schonberg@adacore.com>
6627
6628 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
6629 unit Do not report an error on a non-static entity that appears
6630 in the context of a spec expression, such as an aspect expression.
6631
6632 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6633
6634 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
6635 (Is_Underlying_Full_View): New routine.
6636 (Set_Is_Underlying_Full_View): New routine.
6637 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
6638 * einfo.ads Add new attribute Is_Underlying_Full_View.
6639 (Is_Underlying_Full_View): New routine along with pragma Inline.
6640 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
6641 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
6642 class-wide types and underlying full views. The first subtype
6643 is used as the working type for all Itypes, not just array base types.
6644 (Build_DIC_Procedure_Declaration): Do not consider
6645 class-wide types and underlying full views. The first subtype
6646 is used as the working type for all Itypes, not just array
6647 base types.
6648 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
6649 view or an underlying full view without clobbering the attributes
6650 of a previous freeze node.
6651 (Inherit_Freeze_Node): New routine.
6652 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
6653 full view as such.
6654 (Build_Underlying_Full_View): Mark an underlying full view as such.
6655 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
6656 full view as such.
6657
6658 2017-01-20 Yannick Moy <moy@adacore.com>
6659
6660 * sinfo.ads: Document lack of Do_Division_Check flag
6661 on float exponentiation.
6662
6663 2017-01-19 Javier Miranda <miranda@adacore.com>
6664
6665 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
6666 identifier attribute of a block-statement node. Required to avoid
6667 assertion failure when building the new containers library.
6668
6669 2017-01-19 Bob Duff <duff@adacore.com>
6670
6671 * exp_ch3.adb: Update comment.
6672
6673 2017-01-19 Vincent Celier <celier@adacore.com>
6674
6675 * gprep.adb (Gnatprep): Parse the definition file without
6676 "replace in comments" even when switch -C is used.
6677
6678 2017-01-19 Justin Squirek <squirek@adacore.com>
6679
6680 * exp_ch9.adb (Is_Pure_Barrier): Create function
6681 Is_Count_Attribute to identify an expansion of the 'Count
6682 attribute.
6683
6684 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6685
6686 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
6687 statements within an element iterator loop are only analyzed
6688 agter the loop is rewritten. Within a generic the analysis must
6689 be performed in any case to complete name capture.
6690
6691 2017-01-19 Bob Duff <duff@adacore.com>
6692
6693 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
6694 before checking for unrecognized pragmas.
6695 Initialize Pname on its declarations; that's always good style.
6696
6697 2017-01-19 Claire Dross <dross@adacore.com>
6698
6699 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
6700 body into the tree for GNATprove by setting its Parent field. The
6701 components invariants of composite types are not checked by
6702 the composite type's invariant procedure in GNATprove mode.
6703 (Build_Invariant_Procedure_Declaration): Semi-insert the
6704 declaration into the tree for GNATprove by setting its Parent
6705 field.
6706 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
6707 the component invariants to the array type invariant procedure
6708 so that the procedure can be used to check the array type
6709 invariants if any.
6710 (Freeze_Record_Type): In GNATprove mode, do
6711 not add the component invariants to the record type invariant
6712 procedure so that the procedure can be used to check the record
6713 type invariants if any.
6714
6715 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
6716
6717 * lib-xref-spark_specific.adb: Minor reformatting.
6718 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
6719
6720 2017-01-19 Javier Miranda <miranda@adacore.com>
6721
6722 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
6723 Build_Back_End_Aggregate.
6724 (Generate_Aggregate_For_Derived_Type): Code cleanup.
6725 (Prepend_Stored_Values): Code cleanup.
6726
6727 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6728
6729 * sem_ch6.adb (Analyze_Expression_Function): Check for an
6730 incomplete return type after attempting to freeze it, so that
6731 other freeze actiona are generated in the proper order.
6732
6733 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6734
6735 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
6736 type, ie. a type whose component is a character type, and the
6737 aggregate is positional, do not convert into a string literal
6738 if the index type is not an integer type, because the original
6739 type may be required in an enclosing operation.
6740
6741 2017-01-19 Bob Duff <duff@adacore.com>
6742
6743 * binde.adb, debug.adb: Enable new elaboration order algorithm
6744 by default. -dp switch reverts to the old algorithm.
6745
6746 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
6747
6748 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
6749 (Analyze_Declarations): Create the DIC and Invariant
6750 procedure bodies s after all freezing has taken place.
6751 (Build_Assertion_Bodies): New routine.
6752 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
6753 and Exp_Util.
6754 (Analyze_Package_Specification): Remove the
6755 generation of the DIC and Invariant procedure bodies. This is
6756 now done by Analyze_Declarations.
6757 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
6758 procedures are never treated as primitives.
6759
6760 2017-01-19 Yannick Moy <moy@adacore.com>
6761
6762 * frontend.adb: Analyze inlined bodies and check elaboration
6763 rules in GNATprove mode too.
6764 * sem_elab.adb (Delay_Element): Add Boolean component to save
6765 indication that call is in SPARK code. (Check_Elab_Calls):
6766 Check elaboration rules in GNATprove mode, and correctly set
6767 the current value of SPARK_Mode.
6768 * lib-xref-spark_specific.adb
6769 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
6770
6771 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6772
6773 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
6774 checks on the expression for the high bound of concatenation
6775 when checks are disabled, to suppress warnings about potential
6776 constraint errors in restricted runtimes.
6777
6778 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
6779
6780 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
6781 representation-to-position function as inlined.
6782 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
6783 the purity of an internally generated entity if it has been
6784 explicitly marked as pure for optimization purposes.
6785 * exp_aggr.adb: Minor reformatting.
6786
6787 2017-01-19 Javier Miranda <miranda@adacore.com>
6788
6789 * exp_ch6.adb (Expand_Call): Remove side effects on
6790 actuals that are allocators with qualified expression since the
6791 initialization of the object is performed by means of individual
6792 statements (and hence it must be done before the call).
6793
6794 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6795
6796 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
6797 (Build_Derived_Enumeration_Type): If the derived type inherits a
6798 dynamic predicate from its parent, the bounds of the type must
6799 freeze because an explicit constraint is constructed for the
6800 type and the corresponding range is elaborated now.
6801
6802 2017-01-19 Arnaud Charlet <charlet@adacore.com>
6803
6804 * sem_attr.ads: minor fix of inconsistent casing in comment
6805 * lib-writ.ads: minor align comments in columns
6806 * sem_ch3.adb: Minor reformatting.
6807 * spark_xrefs.ads: minor fix typo in SPARK-related comment
6808 * table.ads: minor style fix in comment
6809 * lib-xref-spark_specific.adb
6810 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
6811 * sem_ch12.adb: minor whitespace fix
6812 * freeze.adb: Add comment.
6813 * sem_util.adb (Unique_Name): for instances of
6814 generic subprograms ignore the name of the wrapper package.
6815
6816 2017-01-19 Javier Miranda <miranda@adacore.com>
6817
6818 * exp_aggr.adb (Resolve_Record_Aggregate):
6819 Factorize code needed for aggregates of limited and unlimited
6820 types in a new routine.
6821 (Pass_Aggregate_To_Back_End): New subprogram.
6822
6823 2017-01-19 Yannick Moy <moy@adacore.com>
6824
6825 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
6826
6827 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6828
6829 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
6830 public, for use elsewhere.
6831 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
6832 an Inlined_body, recognize a call that uses object notation
6833 and has not been rewritten as a regular call because regular
6834 expansion has not taken place.
6835
6836 2017-01-19 Bob Duff <duff@adacore.com>
6837
6838 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
6839 in case of generic formal discrete types, because it causes crashes in
6840 the compiler when built with assertions on.
6841
6842 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
6843
6844 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
6845 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
6846
6847 2017-01-19 Bob Duff <duff@adacore.com>
6848
6849 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
6850 Increment Warnings_Detected. It was decrementing, which is
6851 wrong since we just issued a warning message.
6852 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
6853 these variables to be of subtype Nat instead of Int, because
6854 they should never be negative.
6855
6856 2017-01-19 Javier Miranda <miranda@adacore.com>
6857
6858 * contracts.adb (Build_Postconditions_Procedure): Replace
6859 Generate_C_Code by Modify_Tree_For_C.
6860 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
6861 Replace Generate_C_Code by Modify_Tree_For_C.
6862 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
6863 Modify_Tree_For_C.
6864 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
6865 Generate_C_Code by Modify_Tree_For_C.
6866 * exp_ch4.adb (Expand_Allocator_Expression): Replace
6867 Generate_C_Code by Modify_Tree_For_C.
6868 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
6869 by Modify_Tree_For_C.
6870 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
6871 Generate_C_Code by Modify_Tree_For_C.
6872 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
6873 by Modify_Tree_For_C.
6874 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
6875
6876 2017-01-19 Javier Miranda <miranda@adacore.com>
6877
6878 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
6879 subprogram.
6880 (Is_Inlinable_Expression_Function): New subprogram.
6881 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
6882 to Sem_Util.
6883 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
6884
6885 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6886
6887 * sem_ch4.adb (Diagnose_Call): Improve error message when a
6888 selected component has a prefix that might be interpreted
6889 as a parameterless function call, but none of the candidate
6890 interpretations is parameterless, and there is a hidden homonym
6891 of the prefix that is a package.
6892 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
6893 interpreted as a parameterless function call and its analysis
6894 fails, do not call Analyze_Selected_Component.
6895
6896 2017-01-19 Steve Baird <baird@adacore.com>
6897
6898 * sem_util.ads: Add new Use_Full_View Boolean parameter to
6899 Get_Index_Bounds.
6900 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
6901 calls to a newly-defined Scalar_Range_Of_Right_View function.
6902
6903 2017-01-19 Arnaud Charlet <charlet@adacore.com>
6904
6905 * gnat1drv.adb: minor fix of unbalanced parens in comment
6906 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
6907 to visible part of the package to allow re-use in GNATprove.
6908 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
6909 from repeated code of Traverse_Compilation_Unit.
6910 (Traverse_Declaration_Or_Statement): fixed detection of
6911 generic subprograms and packages; also, iteration over case
6912 statement alternatives rewritten to avoid testing if the first
6913 alternative is present (since it must be present due to Ada
6914 syntax restrictions).
6915
6916 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
6917
6918 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
6919 returning by reference not just for subprogram body stubs,
6920 but for all subprogram cases.
6921 * sem_util.adb: Code reformatting.
6922 (Requires_Transient_Scope): Update the call to Results_Differ.
6923 (Results_Differ): Update the parameter profile and the associated
6924 comment on usage.
6925
6926 2017-01-19 Ed Schonberg <schonberg@adacore.com>
6927
6928 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
6929 identifier nodes that do not come from source, to handle properly
6930 dimensionality check within an inlined body which inclddes both
6931 original operands and rewritten operands. This removes spurious
6932 dimensionality errors in the presence of front-end inlining,
6933 as well as in SPARK mode.
6934
6935 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6936
6937 PR driver/49726
6938 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
6939
6940 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6941
6942 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
6943
6944 2017-01-13 Arnaud Charlet <charlet@adacore.com>
6945
6946 * doc/gnat_ugn/getting_started_with_gnat.rst,
6947 doc/gnat_ugn/inline_assembler.rst,
6948 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
6949 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
6950 doc/gnat_ugn/about_this_guide.rst,
6951 doc/gnat_ugn/platform_specific_information.rst,
6952 doc/gnat_ugn/example_of_binder_output.rst,
6953 doc/gnat_ugn/gnat_and_program_execution.rst,
6954 doc/gnat_ugn/gnat_utility_programs.rst,
6955 doc/gnat_ugn/the_gnat_compilation_model.rst,
6956 doc/gnat_rm/implementation_defined_attributes.rst,
6957 doc/gnat_rm/compatibility_and_porting_guide.rst,
6958 doc/gnat_rm/standard_library_routines.rst,
6959 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
6960 doc/gnat_rm/implementation_defined_pragmas.rst,
6961 doc/gnat_rm/the_gnat_library.rst,
6962 doc/gnat_rm/obsolescent_features.rst,
6963 doc/gnat_rm/about_this_guide.rst,
6964 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
6965 doc/gnat_rm/implementation_of_ada_2012_features.rst,
6966 doc/gnat_rm/interfacing_to_other_languages.rst,
6967 doc/gnat_rm/implementation_defined_aspects.rst,
6968 doc/gnat_rm.rst: Update documentation.
6969 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
6970
6971 2017-01-13 Ed Schonberg <schonberg@adacore.com>
6972
6973 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
6974 * scil_ll.adb: Minor style fix in comment.
6975 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
6976 even if entity is already set, because the node may be renalyzed
6977 after inlining transformations.
6978
6979 2017-01-13 Javier Miranda <miranda@adacore.com>
6980
6981 * sem_res.adb (Resolve_Call): Do not establish a transient scope
6982 for a call to inlinable expression function (since the call will
6983 be replaced by its returned object).
6984 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
6985 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
6986 (Expand_Call): For inlinable expression function call replace the
6987 call by its returned object.
6988 (Is_Inlinable_Expression_Function): New subprogram.
6989
6990 2017-01-13 Gary Dismukes <dismukes@adacore.com>
6991
6992 * checks.adb: Minor typo fix and reformatting.
6993
6994 2017-01-13 Javier Miranda <miranda@adacore.com>
6995
6996 * contracts.adb (Contract_Only_Subprograms): Remove formal.
6997 (Copy_Original_Specification): Removed.
6998 (Skip_Contract_Only_Subprogram): Move here checks previously
6999 located in the caller of this routine (to leave the code more clean).
7000 (Build_Contract_Only_Subprogram): Code cleanup.
7001 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
7002 (Get_Contract_Only_Missing_Body_Name): Removed.
7003
7004 2017-01-13 Javier Miranda <miranda@adacore.com>
7005
7006 * sem_ch6.adb (Cloned_Expression): New subprogram.
7007 (Freeze_Expr_Types): Complete previous patch since the expression
7008 of an expression-function may have iterators and loops with
7009 defining identifiers which, as part of the preanalysis of the
7010 expression, may be left decorated with itypes that will not be
7011 available in the tree passed to the backend.
7012
7013 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7014
7015 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
7016 conversion to Integer of an expression that is an attribute
7017 reference 'Pos on an enumeration type.
7018
7019 2017-01-13 Bob Duff <duff@adacore.com>
7020
7021 * atree.ads: Minor comment fix.
7022
7023 2017-01-13 Justin Squirek <squirek@adacore.com>
7024
7025 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
7026 calls in accessibility check on return statement.
7027
7028 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7029
7030 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7031 Ensure that the input body is a subprogram body before trying to
7032 determine whether it denoted an expression function. Note that
7033 subprogram body stubs cannot denote expression functions.
7034
7035 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7036
7037 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
7038 and typo fixes.
7039
7040 2017-01-13 Javier Miranda <miranda@adacore.com>
7041
7042 * einfo.ads (Component_Bit_Offset): Fix documentation.
7043 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
7044 on record holes for components with unknown compile-time offsets.
7045
7046 2017-01-13 Bob Duff <duff@adacore.com>
7047
7048 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
7049 * g-locfil.ads: Minor comment fix.
7050
7051 2017-01-13 Bob Duff <duff@adacore.com>
7052
7053 * binde.adb (Elab_New): New elaboration order algorithm
7054 that is expected to cause fewer ABE issues. This is a work in
7055 progress. The new algorithm is currently disabled, and can be
7056 enable by the -dp switch, or by modifying the Do_Old and Do_New
7057 etc. flags and rebuilding. Experimental code is included to
7058 compare the results of the old and new algorithms.
7059 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
7060 can have multiple of these tables, so the old and new algorithms
7061 can coexist.
7062 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
7063 parameter of type array. This avoids the global variable, and
7064 allows bounds checking (which is normally defeated by the tables
7065 packages). It also ensures that the Elab_Order is read-only
7066 to Bindgen.
7067 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
7068 subprograms that need it, as above.
7069 * debug.adb: Document new -dp switch. Modify doc of old -do
7070 switch.
7071 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
7072 and Bindgen. Move writing of closure (-R and -Ra switches)
7073 to Binde; that's more convenient.
7074
7075 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7076
7077 * sem_ch6.adb (Analyze_Expression_Function): If the expression
7078 function is a completion, all entities referenced in the
7079 expression are frozen. As a consequence, a reference to an
7080 uncompleted private type from an enclosing scope is illegal.
7081
7082 2017-01-13 Javier Miranda <miranda@adacore.com>
7083
7084 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
7085 (Analyze_Subprogram_Body_Helper): At the occurrence of an
7086 expression function declaration that is a completion, its
7087 expression causes freezing (AI12-0103).
7088
7089 2017-01-13 Vadim Godunko <godunko@adacore.com>
7090
7091 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
7092 Reference functions of Ada.Containers.Indefinite_Holders.
7093
7094 2017-01-13 Bob Duff <duff@adacore.com>
7095
7096 * s-os_lib.ads: Minor comment fixes.
7097
7098 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7099
7100 * exp_ch3.adb (Default_Initialize_Object): Do not default
7101 initialize an object when it is of a task type and restriction
7102 No_Tasking is in effect because the initialization is obsolete.
7103 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
7104 restriction No_Tasking is in effect.
7105 (Build_Master_Renaming): Do not rename a master when restriction
7106 No_Tasking is in effect.
7107
7108 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7109
7110 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
7111 the legality of An others clause applies as well to a choice in
7112 an Iterated_component_ association.
7113 (Resolve_Iterated_Component_Association): An others choice
7114 is legal.
7115 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
7116 Iterated_Component_Association is not static.
7117
7118 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7119
7120 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
7121 control is passed to the expresion handler before the new mode
7122 is set.
7123 * sem_ch12.adb (Analyze_Package_Instantiation,
7124 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
7125 in case control is passed to the expresion handler before the
7126 new mode is set.
7127
7128 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7129
7130 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
7131 exp_aggr.adb: Minor reformatting.
7132
7133 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7134
7135 * inline.adb: Minor reformatting and typo fix.
7136
7137 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7138
7139 * sem_util.ads, sem_util.adb (Choice_List): Move function here
7140 from sem_aggr.adb, for use elsewhere.
7141 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
7142 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
7143 Iterated_Component_Present.
7144 * exp_aggr.adb: Use Choice_List throughout, to handle
7145 Iterated_Component_Associations.
7146 (Gen_Loop): Generate proper loop for an
7147 Iterated_Component_Association: loop variable has the identifier
7148 of the original association. Generate a loop even for a single
7149 component choice, in order to make loop parameter visible in
7150 expression.
7151 (Flatten): An Iterated_Component_Association is not static.
7152
7153 2017-01-13 Yannick Moy <moy@adacore.com>
7154
7155 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
7156 float exponentiation for statically known small negative values
7157 is the reciprocal of the exponentiation for the opposite value
7158 of the exponent.
7159 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
7160 Ensure that the value of float exponentiation for negative values
7161 is the reciprocal of the exponentiation for the opposite value
7162 of the exponent.
7163 * inline.adb (Expand_Inlined_Call): Fix the count
7164 for the number of generated gotos.
7165
7166 2017-01-13 Yannick Moy <moy@adacore.com>
7167
7168 * inline.adb: Code cleanup.
7169 * sem_util.adb (Is_OK_Volatile_Context): Add
7170 expression in delay statement as OK for volatile context.
7171
7172 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7173
7174 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
7175 mode a choice that is a subtype with a static predicate is
7176 replaced by the values it covers. This transformation must not
7177 be performed in ASIS mode, to preserve the source for analysis.
7178
7179 2017-01-13 Justin Squirek <squirek@adacore.com>
7180
7181 * nlists.ads: Correct minor typo.
7182
7183 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7184
7185 * sem_ch13.adb: Minor reformatting and typo fix.
7186
7187 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7188
7189 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
7190 Iterated_Component_Association is a named association in an
7191 array aggregate.
7192 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
7193 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
7194 and resolve the discrete choices and the expression of the
7195 new construct.
7196 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
7197 Loop_Actions and Box_Present are attributes of
7198 N_Iterated_Component_Association nodes. Box_Present is always
7199 False in this case.
7200 * sprint.adb (Sprint_Node): An Iterated_Component_Association
7201 has a Discrete_Choices list, as specified in the RM. A
7202 Component_Association for aggregate uses instead a Choices list.
7203 We have to live with this small inconsistency because the new
7204 construct also has a defining identifier, and there is no way
7205 to merge the two node structures.
7206
7207 2017-01-13 Yannick Moy <moy@adacore.com>
7208
7209 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
7210 list of pragmas to remove. Remove pragmas from the list of
7211 statements in the body to inline.
7212 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
7213
7214 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7215
7216 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
7217 Analyze_Declarations, to analyze and resolve the expressions of
7218 aspect specifications in the current declarative list, so that
7219 the expressions have proper entity and type info. This is needed
7220 for ASIS when there is no subsequent expansion to generate this
7221 semantic information.
7222 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
7223 original expression, to suppress cascaded errors when expression
7224 has been constant-folded.
7225 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
7226 ASIS mode, because there is no subsequent expansion to decorate
7227 the tree.
7228
7229 2017-01-13 Yannick Moy <moy@adacore.com>
7230
7231 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
7232 New function to detect when a call may be inlined or not in
7233 GNATprove mode.
7234 (Expand_Inlined_Call): Ensure that a temporary
7235 is always created in the cases where a type conversion may be
7236 needed on an input parameter in GNATprove mode, so that GNATprove
7237 sees the check to perform.
7238 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
7239 when not applicable due to actual requiring type conversion
7240 with possible check but no temporary value can be copied for
7241 GNATprove to see the check.
7242
7243 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7244
7245 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
7246 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
7247 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
7248 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
7249 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
7250 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
7251 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
7252 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
7253 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
7254 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
7255 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
7256 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
7257 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
7258 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
7259 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
7260 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
7261 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
7262 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
7263 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
7264 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
7265 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
7266 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
7267 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
7268 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
7269 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
7270 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
7271 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
7272 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
7273 statements to reflect the new style for case alternatives. Various
7274 code clean up and reformatting.
7275
7276 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7277
7278 * exp_util.adb: Minor reformatting.
7279
7280 2017-01-13 Yannick Moy <moy@adacore.com>
7281
7282 * exp_spark.adb: Code cleanup.
7283 * sem_ch9.adb (Analyze_Delay_Until): Resolve
7284 expression so that calls are identified as such inside delay
7285 until.
7286
7287 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7288
7289 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
7290 * par-ch3.adb (P_Discrete_Choice_List): An
7291 Iterated_Component_Association is an array aggregate component.
7292 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
7293 (Is_Quantified_Expression): New function that performs a lookahead
7294 to distinguish quantified expressions from iterated component
7295 associations.
7296 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
7297 associations.
7298 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
7299 * sem.adb (Analyze): Handle Iterated_Component_Association.
7300 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
7301 component associations.
7302 * sinfo.ads, sinfo.adb: Entries for for
7303 N_Iterated_Component_Association and its fields.
7304 * sprint.adb (Sprint_Node_Actual): Handle
7305 N_Iterated_Component_Association.
7306
7307 2017-01-13 Justin Squirek <squirek@adacore.com>
7308
7309 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
7310 of the style check until after preanalysis of acutals.
7311
7312 2017-01-13 Yannick Moy <moy@adacore.com>
7313
7314 * sem_ch13.adb: Minor reformatting.
7315 * par-ch11.adb: minor style fix in whitespace
7316 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
7317 reduced to Add_Artificial_ALI_File; style fix in declaration of
7318 Text; grammar fix in comment.
7319 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
7320 * freeze.adb: Cleanup to pass pragma instead of
7321 expression to call.
7322 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
7323 replace System'To_Address by equivalent call.
7324
7325 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7326
7327 * bindusg.adb: Improve usage output for -f switch.
7328
7329 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7330
7331 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
7332 Minor reformatting.
7333
7334 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7335
7336 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
7337 treat comparisons on strings as legal in a Static_Predicate.
7338 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
7339 a function call that is the expansion of a string comparison.The
7340 function call is built when compiling the corresponding predicate
7341 function, but the expression has been found legal as a static
7342 predicate during earlier analysis.
7343 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
7344 properly a function call that is the expansion of a string
7345 comparison operation, in order to recover the Static_Predicate
7346 expression and apply it to a static argument when needed.
7347
7348 2017-01-13 Tristan Gingold <gingold@adacore.com>
7349
7350 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
7351 (Open_Read): Re-implement using Open_Read_No_Exception.
7352 (Open_Write): Raise exception in case of error.
7353 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
7354 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
7355 reaise exception.
7356 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
7357
7358 2017-01-13 Yannick Moy <moy@adacore.com>
7359
7360 * checks.adb: Code cleanup.
7361
7362 2017-01-13 Yannick Moy <moy@adacore.com>
7363
7364 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
7365 expression instead of unanalyzed aspect expression for checking
7366 the validity of inheriting an operation. Also copy the expression
7367 being passing it to Build_Class_Wide_Expression, as this call
7368 modifies its argument.
7369 * sem_util.ads Fix comment to reference correct function name
7370 New_Copy_Tree.
7371
7372 2017-01-13 Javier Miranda <miranda@adacore.com>
7373
7374 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
7375 when we propagate information about the indexes back to the original
7376 indexing mode and the prefix of the index is a function call, do not
7377 remove any parameter from such call.
7378
7379 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7380
7381 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
7382 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
7383 a build-in-place function whose result type is tagged.
7384
7385 2017-01-13 Yannick Moy <moy@adacore.com>
7386
7387 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
7388 Do not generate a wrapper when the only candidate is a class-wide
7389 subprogram.
7390 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
7391 inside a generic context.
7392
7393 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7394
7395 * exp_util.adb (Add_Inherited_Tagged_DIC):
7396 Pass the object parameters of both the parent and the derived
7397 type DIC procedure to the reference replacement circuitry.
7398 (Find_DIC_Type): Modify the circuitry to present the partial
7399 view of a private type in case the private type defines its own
7400 DIC pragma.
7401 (Replace_Object_And_Primitive_References): Add two
7402 optional formal parameters. Update the comment on usage. Update
7403 the replacement of references to object parameters.
7404
7405 2017-01-13 Gary Dismukes <dismukes@adacore.com>
7406
7407 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
7408
7409 2017-01-13 Ed Schonberg <schonberg@adacore.com>
7410
7411 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
7412 an out parameter that is a type conversion, independently of th
7413 range check that may apply to the expression of the conversion,
7414 for use in GNATProve.
7415
7416 2017-01-13 Yannick Moy <moy@adacore.com>
7417
7418 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
7419 GNATprove_Mode here to Frontend.
7420 * frontend.adb (Frontend): Move the implicit with for System
7421 in GNATprove_Mode here as it ismore correct this way; the old
7422 place only worked by chance, since there were no overloaded names.
7423 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
7424 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
7425 four attributes identified in SRM 9(18), add an implicit with
7426 to Ada.Task_Identification.
7427 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
7428 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
7429 mode.
7430 * checks.adb (Apply_Discriminant_Check,
7431 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
7432 In GNATprove mode, we do not apply the checks, but we still
7433 analyze the expression to possibly issue errors on SPARK
7434 code when a run-time error can be detected at compile time.
7435 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
7436 in GNATprove mode.
7437
7438 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7439
7440 * expander.adb (Expand): Add a warning about using return
7441 statements in Ghost management code.
7442 * exp_ch3.adb (Freeze_Type): Add a warning about using return
7443 statements in Ghost management code.
7444 * exp_ch7.adb (Build_Invariant_Procedure_Body,
7445 Build_Invariant_Procedure_Declaration): Add a warning about
7446 using return statements in Ghost management code.
7447 * exp_disp.adb (Make_DT): Add a warning about using return
7448 statements in Ghost management code.
7449 * exp_util.adb (Build_DIC_Procedure_Body,
7450 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
7451 warning about using return statements in Ghost management code.
7452 * freeze.adb (Freeze_Entity): Add a warning about using return
7453 statements in Ghost management code.
7454 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
7455 statements in Ghost management code.
7456 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
7457 a warning about using return statements in Ghost management code.
7458 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
7459 return statements in Ghost management code.
7460 * sem_ch6.adb (Analyze_Procedure_Call,
7461 Analyze_Subprogram_Body_Helper): Add a warning about using return
7462 statements in Ghost management code.
7463 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
7464 using return statements in Ghost management code.
7465 * sem_ch12.adb (Analyze_Package_Instantiation,
7466 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
7467 Instantiate_Subprogram_Body): Add a warning about using return
7468 statements in Ghost management code.
7469 * sem_ch13.adb (Build_Predicate_Functions,
7470 Build_Predicate_Function_Declarations): Add a warning about
7471 using return statements in Ghost management code.
7472 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
7473 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
7474 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
7475 using return statements in Ghost management code.
7476
7477 2017-01-13 Tristan Gingold <gingold@adacore.com>
7478
7479 * s-mmosin-mingw.adb: Fix pragma import.
7480
7481 2017-01-13 Arnaud Charlet <charlet@adacore.com>
7482
7483 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
7484 codepeer mode.
7485
7486 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
7487
7488 * atree.adb (Allocate_Initialize_Node): A newly created node is
7489 no longer marked as Ghost at this level.
7490 (Mark_New_Ghost_Node): New routine.
7491 (New_Copy): Mark the copy as Ghost.
7492 (New_Entity): Mark the entity as Ghost.
7493 (New_Node): Mark the node as Ghost.
7494 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
7495 apply to unanalyzed entities.
7496 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
7497 entities.
7498 (Set_Is_Checked_Ghost_Entity): This attribute now
7499 applies to all entities as well as unanalyzed entities.
7500 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
7501 all entities as well as unanalyzed entities.
7502 * expander.adb Add with and use clauses for Ghost.
7503 (Expand): Install and revert the Ghost region associated with the node
7504 being expanded.
7505 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
7506 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
7507 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
7508 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
7509 (Freeze_Type): Install and revert the Ghost region associated
7510 with the type being frozen.
7511 * exp_ch5.adb Remove with and use clauses for Ghost.
7512 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
7513 * exp_ch6.adb Remove with and use clauses for Ghost.
7514 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
7515 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
7516 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
7517 Ghost region of the working type.
7518 (Build_Invariant_Procedure_Declaration): Install and revert
7519 the Ghost region of the working type.
7520 (Expand_N_Package_Body): Remove all Ghost-related code.
7521 * exp_ch8.adb Remove with and use clauses for Ghost.
7522 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
7523 code.
7524 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
7525 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
7526 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
7527 code.
7528 * exp_ch13.adb Remove with and use clauses for Ghost.
7529 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
7530 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
7531 the tagged type. Move the generation of various entities within
7532 the Ghost region of the type.
7533 * exp_prag.adb Remove with and use clauses for Ghost.
7534 (Expand_Pragma_Check): Remove all Ghost-related code.
7535 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
7536 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
7537 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
7538 * exp_util.adb (Build_DIC_Procedure_Body): Install
7539 and revert the Ghost region of the working types.
7540 (Build_DIC_Procedure_Declaration): Install and revert the
7541 Ghost region of the working type.
7542 (Make_Invariant_Call): Install and revert the Ghost region of the
7543 associated type.
7544 (Make_Predicate_Call): Reimplemented. Install and revert the
7545 Ghost region of the associated type.
7546 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
7547 of the entity being frozen.
7548 (New_Freeze_Node): Removed.
7549 * ghost.adb Remove with and use clauses for Opt.
7550 (Check_Ghost_Completion): Update the parameter profile
7551 and all references to formal parameters.
7552 (Ghost_Entity): Update the comment on usage.
7553 (Install_Ghost_Mode): New routines.
7554 (Is_Ghost_Assignment): New routine.
7555 (Is_Ghost_Declaration): New routine.
7556 (Is_Ghost_Pragma): New routine.
7557 (Is_Ghost_Procedure_Call): New routine.
7558 (Is_Ghost_Renaming): Removed.
7559 (Is_OK_Declaration): Reimplemented.
7560 (Is_OK_Pragma): Reimplemented.
7561 (Is_OK_Statement): Reimplemented.
7562 (Is_Subject_To_Ghost): Update the comment on usage.
7563 (Mark_And_Set_Ghost_Assignment): New routine.
7564 (Mark_And_Set_Ghost_Body): New routine.
7565 (Mark_And_Set_Ghost_Completion): New routine.
7566 (Mark_And_Set_Ghost_Declaration): New routine.
7567 (Mark_And_Set_Ghost_Instantiation): New routine.
7568 (Mark_And_Set_Ghost_Procedure_Call): New routine.
7569 (Mark_Full_View_As_Ghost): Removed.
7570 (Mark_Ghost_Declaration_Or_Body): New routine.
7571 (Mark_Ghost_Pragma): New routine.
7572 (Mark_Ghost_Renaming): New routine.
7573 (Mark_Pragma_As_Ghost): Removed.
7574 (Mark_Renaming_As_Ghost): Removed.
7575 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
7576 (Prune_Node): Freeze nodes no longer need special pruning, they
7577 are processed by the general ignored Ghost code mechanism.
7578 (Restore_Ghost_Mode): New routine.
7579 (Set_Ghost_Mode): Reimplemented.
7580 (Set_Ghost_Mode_From_Entity): Removed.
7581 * ghost.ads Add with and use clauses for Ghost.
7582 (Check_Ghost_Completion): Update the parameter profile
7583 along with the comment on usage.
7584 (Install_Ghost_Mode): New routine.
7585 (Is_Ghost_Assignment): New routine.
7586 (Is_Ghost_Declaration): New routine.
7587 (Is_Ghost_Pragma): New routine.
7588 (Is_Ghost_Procedure_Call): New routine.
7589 (Mark_And_Set_Ghost_Assignment): New routine.
7590 (Mark_And_Set_Ghost_Body): New routine.
7591 (Mark_And_Set_Ghost_Completion): New routine.
7592 (Mark_And_Set_Ghost_Declaration): New routine.
7593 (Mark_And_Set_Ghost_Instantiation): New routine.
7594 (Mark_And_Set_Ghost_Procedure_Call): New routine.
7595 (Mark_Full_View_As_Ghost): Removed.
7596 (Mark_Ghost_Pragma): New routine.
7597 (Mark_Ghost_Renaming): New routine.
7598 (Mark_Pragma_As_Ghost): Removed.
7599 (Mark_Renaming_As_Ghost): Removed.
7600 (Restore_Ghost_Mode): New routine.
7601 (Set_Ghost_Mode): Redefined.
7602 (Set_Ghost_Mode_From_Entity): Removed.
7603 * sem.adb (Analyze): Install and revert the Ghost region of the
7604 node being analyzed.
7605 (Do_Analyze): Change the way a clean Ghost
7606 region is installed and reverted.
7607 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
7608 all Ghost-related code.
7609 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
7610 (Analyze_Number_Declaration): Remove all Ghost-related code.
7611 (Analyze_Object_Declaration): Install and revert the Ghost region of
7612 a deferred object declaration's completion.
7613 (Array_Type_Declaration): Remove all Ghost-related code.
7614 (Build_Derived_Type): Update the comment on
7615 the propagation of Ghost attributes from a parent to a derived type.
7616 (Derive_Subprogram): Remove all Ghost-related code.
7617 (Make_Class_Wide_Type): Remove all Ghost-related code.
7618 (Make_Implicit_Base): Remove all Ghost-related code.
7619 (Process_Full_View): Install and revert the Ghost region of
7620 the partial view. There is no longer need to check the Ghost
7621 completion here.
7622 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
7623 region of the left hand side.
7624 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
7625 all Ghost-related code.
7626 (Analyze_Expression_Function): Remove all Ghost-related code.
7627 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
7628 (Analyze_Procedure_Call): Install and revert the Ghost region of
7629 the procedure being called.
7630 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
7631 region of the spec or body.
7632 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
7633 (Build_Subprogram_Declaration): Remove all Ghost-related code.
7634 (Find_Corresponding_Spec): Remove all Ghost-related code.
7635 (Process_Formals): Remove all Ghost-related code.
7636 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
7637 the Ghost region of the spec.
7638 (Analyze_Package_Declaration): Remove all Ghost-related code.
7639 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
7640 Ghost when it aliases a Ghost entity.
7641 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
7642 a Ghost entity.
7643 (Analyze_Object_Renaming): Mark a renaming as Ghost when
7644 it aliases a Ghost entity.
7645 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
7646 a Ghost entity.
7647 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
7648 aliases a Ghost entity.
7649 * sem_ch11.adb Remove with and use clauses for Ghost.
7650 (Analyze_Exception_Declaration): Remove all Ghost-related code.
7651 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
7652 Ghost-related code.
7653 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
7654 code.
7655 (Analyze_Package_Instantiation): Install and revert the Ghost region
7656 of the package instantiation.
7657 (Analyze_Subprogram_Instantiation): Install
7658 and revert the Ghost region of the subprogram instantiation.
7659 (Instantiate_Package_Body): Code clean up. Install and revert the
7660 Ghost region of the package body.
7661 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
7662 Ghost region of the subprogram body.
7663 * sem_ch13.adb (Build_Predicate_Functions): Install
7664 and revert the Ghost region of the related type.
7665 (Build_Predicate_Function_Declaration): Code clean up. Install
7666 and rever the Ghost region of the related type.
7667 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
7668 Install and revert the Ghost region of the pragma.
7669 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
7670 Ghost region of the pragma.
7671 (Analyze_Pragma): Install and revert the Ghost region of various
7672 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
7673 or encloses a Ghost entity.
7674 (Analyze_Pre_Post_Condition): Install and revert the Ghost
7675 region of the pragma.
7676 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
7677 Ghost region of the pragma.
7678 * sem_res.adb (Resolve): Remove all Ghost-related code.
7679 * sem_util.adb (Is_Declaration): Reimplemented.
7680 (Is_Declaration_Other_Than_Renaming): New routine.
7681 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
7682 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
7683 (Is_Ghost_Pragma): Removed.
7684 (Is_Ignored_Ghost_Pragma): New routine.
7685 (Set_Is_Checked_Ghost_Pragma): New routine.
7686 (Set_Is_Ghost_Pragma): Removed.
7687 (Set_Is_Ignored_Ghost_Pragma): New routine.
7688 * sinfo.ads: Update the documentation on Ghost mode and
7689 Ghost regions. New attributes Is_Checked_Ghost_Pragma
7690 and Is_Ignored_Ghost_Pragma along with usages in nodes.
7691 Remove attribute Is_Ghost_Pragma along with usages in nodes.
7692 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
7693 (Is_Ghost_Pragma): Removed along with pragma Inline.
7694 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
7695 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
7696 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
7697 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
7698
7699 2017-01-12 Tristan Gingold <gingold@adacore.com>
7700
7701 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
7702 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
7703
7704 2017-01-12 Yannick Moy <moy@adacore.com>
7705
7706 * errout.adb, errout.ads (Initialize): Factor common treatment
7707 in Reset_Warnings.
7708 (Reset_Warnings): New procedure to reset counts related to warnings.
7709 (Record_Compilation_Errors): New variable to store the presence of an
7710 error, used in gnat2why to allow changing the Warning_Mode.
7711 (Compilation_Errors): Use new variable Record_Compilation_Errors to
7712 store the presence of an error.
7713
7714 2017-01-12 Javier Miranda <miranda@adacore.com>
7715
7716 * sem_ch13.adb (Analyze_Aspect_Specifications):
7717 For Interrupt_Handler and Attach_ Handler aspects, decorate the
7718 internally built reference to the protected procedure as coming
7719 from sources and force its analysis.
7720
7721 2017-01-12 Ed Schonberg <schonberg@adacore.com>
7722
7723 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
7724 inherit predicates if any from the first_subtype of the parent,
7725 not from the anonymous parent type.
7726 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
7727 predicate is not a static subtype.
7728
7729 2017-01-12 Gary Dismukes <dismukes@adacore.com>
7730
7731 * freeze.adb (Check_Suspicious_Convention): New procedure
7732 performing a warning check on discriminated record types with
7733 convention C or C++. Factored out of procedure Freeze_Record_Type,
7734 and changed to only apply to base types (to avoid spurious
7735 warnings on subtypes). Minor improvement of warning messages
7736 to refer to discriminated rather than variant record types.
7737 (Freeze_Record_Type): Remove code for performing a suspicious
7738 convention check.
7739 (Freeze_Entity): Only call Freeze_Record_Type
7740 on types that aren't declared within any enclosing generic units
7741 (rather than just excluding the type when the innermost scope
7742 is generic). Call Check_Suspicious_Convention whether or not
7743 the type is declared within a generic unit.
7744 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
7745 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
7746 from Sem_Ch8).
7747
7748 2017-01-12 Tristan Gingold <gingold@adacore.com>
7749
7750 * sysdep.c, adaint.c, rtinit.c, ming32.h:
7751 (__gnat_current_codepage): Renamed from CurrentCodePage
7752 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
7753
7754 2017-01-12 Ed Schonberg <schonberg@adacore.com>
7755
7756 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
7757 quantified expressions, following AI12-050: the loop parameters
7758 of two quantified expressions are conformant if they have the
7759 same identifier.
7760
7761 2017-01-12 Arnaud Charlet <charlet@adacore.com>
7762
7763 * gcc-interface/Makefile.in: Clean up VxWorks targets.
7764
7765 2017-01-12 Ed Schonberg <schonberg@adacore.com>
7766
7767 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
7768 Hnadle properly the attribute reference when it appears as part
7769 of an expression in another loop aspect.
7770
7771 2017-01-12 Ed Schonberg <schonberg@adacore.com>
7772
7773 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
7774 subsidiary of Build_Initialization_Call, to complete generation
7775 of predicate checks on discriminants whose (sub)types have
7776 predicates, and to add checks on variants that do not have an
7777 others clause.
7778 * sem_util.adb (Gather_Components): A missing Others alternative is
7779 not an error when the type of the discriminant is a static predicate
7780 (and coverage has been checked when analyzing the case statement). A
7781 runtime check is generated to verify that a given discriminant
7782 satisfies the predicate (RM 3.8.1. (21.1/2)).
7783
7784 2017-01-12 Yannick Moy <moy@adacore.com>
7785
7786 * gnat1drv.adb (Adjust_Global_Switches): Only
7787 perform checking of exception mechanism when generating code.
7788
7789 2017-01-12 Justin Squirek <squirek@adacore.com>
7790
7791 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
7792 Remove handling of access component with invariant.
7793 (Build_Invariant_Procedure_Declaration): Remove return on class
7794 wide type.
7795 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
7796 conditional exception for component or array so Has_Own_Invariants
7797 flag is not falsly set.
7798 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
7799 wide type to have no invariant flags.
7800
7801 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
7802
7803 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
7804 sem_ch13.adb: Minor reformatting.
7805
7806 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
7807
7808 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
7809 adjustment primitive when the ancestor type was not properly frozen.
7810 (Gen_Assign): Guard against a missing initialization
7811 primitive when the component type was not properly frozen.
7812 (Initialize_Array_Component): Guard against a missing adjustment
7813 primitive when the component type was not properly frozen.
7814 (Initialize_Record_Component): Guard against a missing adjustment
7815 primitive when the component type was not properly frozen.
7816 (Process_Transient_Component_Completion): The transient object may
7817 not be finalized when its associated type was not properly frozen.
7818 * exp_ch3.adb (Build_Assignment): Guard against a missing
7819 adjustment primitive when the component type was not properly frozen.
7820 (Build_Initialization_Call): Guard against a missing
7821 initialization primitive when the associated type was not properly
7822 frozen.
7823 (Expand_N_Object_Declaration): Guard against a missing
7824 adjustment primitive when the base type was not properly frozen.
7825 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
7826 body when there is no adjustment primitive available. Create an
7827 empty Deep_Finalize body when there is no finalization primitive
7828 available.
7829 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
7830 missing finalization primitive when the designated type was
7831 not properly frozen.
7832 (Expand_N_Allocator): Guard against a missing initialization primitive
7833 when the designated type was not properly frozen.
7834 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
7835 only when the corresponding adjustment primitive is available.
7836 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
7837 adjustment/finalization statements only when there is an available
7838 primitive to carry out the action.
7839 (Build_Initialize_Statements): Generate the initialization/finalization
7840 statements only when there is an available primitive to carry out the
7841 action.
7842 (Make_Adjust_Call): Do not generate a call when the underlying
7843 type is not present due to a possible missing full view.
7844 (Make_Final_Call): Do not generate a call when the underlying
7845 type is not present due to a possible missing full view.
7846 (Make_Finalize_Address_Stmts): Generate an empty body when the
7847 designated type lacks a finalization primitive.
7848 (Make_Init_Call): Do not generate a call when the underlying type is
7849 not present due to a possible missing full view.
7850 (Process_Component_For_Adjust): Add the adjustment call only when the
7851 corresponding adjustment primitive is available.
7852 (Process_Component_For_Finalize): Add the finalization call only when
7853 the corresponding finalization primitive is available.
7854 (Process_Object_Declaration): Use a null statement to emulate a
7855 missing call to the finalization primitive of the object type.
7856 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
7857 (Make_Final_Call): Update the comment on usage.
7858 (Make_Init_Call): Update the comment on usage.
7859 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
7860
7861 2017-01-12 Arnaud Charlet <charlet@adacore.com>
7862
7863 * einfo.ads: Update documentation of Address_Taken.
7864 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
7865 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
7866 for subprograms when setting Address_Taken flag.
7867
7868 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
7869
7870 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
7871 Configurable_Run_Time_Mode off when analysing with'ed predefined
7872 libraries.
7873
7874 2017-01-12 Gary Dismukes <dismukes@adacore.com>
7875
7876 * sem_prag.adb: Minor reformatting.
7877 * sem_util.adb (Unique_Entity): fix result for
7878 bodies of entry families.
7879
7880 2017-01-12 Justin Squirek <squirek@adacore.com>
7881
7882 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
7883 Resolve_Suppressible in the pragma Assertion_Policy case.
7884 (Resolve_Suppressible): Created this function to factor out
7885 common code used to resolve Suppress to either Ignore or Check
7886 * snames.ads-tmpl: Add name for Suppressible.
7887
7888 2017-01-12 Gary Dismukes <dismukes@adacore.com>
7889
7890 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
7891 reformatting.
7892 * debug.adb: Minor comment fixes.
7893
7894 2017-01-12 Arnaud Charlet <charlet@adacore.com>
7895
7896 * sem_util.adb (Unique_Entity): For concurrent
7897 bodies that are defined with stubs and complete a declaration
7898 of a single concurrent object return the entity of an implicit
7899 concurrent type, not the entity of the anonymous concurrent
7900 object.
7901 * debug.adb: -gnatd.J is no longer used.
7902 * make.adb (Globalize): Removed, no longer used.
7903 * sem_ch9.adb: minor typo in comment for entry index
7904
7905 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
7906
7907 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
7908 * exp_ch3.adb (Build_Init_Statements): As part of initialising
7909 the value record of a task, set its _Secondary_Stack_Size field
7910 if present.
7911 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
7912 a _Secondary_Stack_Size field in the value record of
7913 the task if a Secondary_Stack_Size rep item is present.
7914 (Make_Task_Create_Call): Include secondary stack size
7915 parameter. If No_Secondary_Stack restriction is in place, passes
7916 stack size of 0.
7917 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
7918 Secondary_Stack_Size.
7919 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
7920 function to define the overhead of the secondary stack.
7921 * s-tarest.adb (Create_Restricted_Task,
7922 Create_Restricted_Task_Sequential): Functions now include
7923 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
7924 * s-tarest.adb (Create_Restricted_Task,
7925 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
7926 include Secondary_Stack_Size parameter.
7927 (Task_Wrapper): Secondary stack now allocated to the size specified by
7928 the Secondary_Stack_Size parameter in the task's ATCB.
7929 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
7930 Secondary_Stack_Size component.
7931 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
7932 Create_Restricted_Task_Sequential): Function now include
7933 Secondary_Stack_Size parameter.
7934 (Task_Wrapper): Secondary stack now allocated to the size
7935 specified by the Secondary_Stack_Size parameter in the task's
7936 ATCB.
7937 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
7938 to include Secondary_Stack_Size parameter.
7939 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
7940 Secondary_Stack_Size aspect, turning the aspect into its corresponding
7941 internal attribute.
7942 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
7943 * snames.adb-tmpl, snames.ads-tmpl: Added names
7944 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
7945 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
7946
7947 2017-01-12 Yannick Moy <moy@adacore.com>
7948
7949 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
7950 subtree.
7951
7952 2017-01-12 Justin Squirek <squirek@adacore.com>
7953
7954 * exp_attr.adb (Expand_N_Attribute_Reference):
7955 Fix Finalization_Size case by properly resolving the type after
7956 rewritting the node.
7957
7958 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
7959
7960 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
7961 the tree.
7962 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
7963 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
7964 exp_sel.ads: Minor reformatting.
7965
7966 2017-01-12 Justin Squirek <squirek@adacore.com>
7967
7968 * exp_ch6.adb (Expand_Call): Add guard to prevent
7969 invariant checks from being created for internally generated
7970 subprograms.
7971
7972 2017-01-12 Bob Duff <duff@adacore.com>
7973
7974 * lib-writ.ads: Remove incorrect comment.
7975
7976 2017-01-12 Javier Miranda <miranda@adacore.com>
7977
7978 * debug.adb (-gnatd.K): Enable generation of contract-only
7979 procedures in CodePeer mode.
7980 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
7981 New subprogram.
7982 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
7983 set.
7984 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
7985 subprogram.
7986 (Get_Contract_Only_Missing_Body_Name): New subprogram.
7987 (Get_Contract_Only_Body): New subprogram.
7988 (Set_Contract_Only_Body): New subprogram.
7989 (Is_Contract_Only_Body): New subprogram.
7990 (Set_Is_Contract_Only_Body): New subprogram.
7991 (SCIL_Nodes): Replace table by hash-table.
7992
7993 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
7994
7995 * exp_ch6.adb: Minor reformatting.
7996 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
7997
7998 2017-01-12 Bob Duff <duff@adacore.com>
7999
8000 * binde.adb (Forced): New reason for a dependence.
8001 (Force_Elab_Order): Implementation of the new switch.
8002 * binde.ads: Minor comment fixes.
8003 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
8004 long ago that is no longer supported; removed comment about that.
8005 * opt.ads (Force_Elab_Order_File): Name of file specified for
8006 -f switch.
8007 * switch-b.adb: Parse -f switch.
8008
8009 2017-01-12 Justin Squirek <squirek@adacore.com>
8010
8011 * exp_ch6.adb (Check_View_Conversion): Created this function
8012 to properly chain calls to check type invariants that may be
8013 present in a subprogram call after the subprogram.
8014 (Expand_Call): Add a conditional to identify when a view conversion
8015 needs to be checked.
8016 * nlists.adb, nlists.ads (Prepend_New): New routine.
8017 (Prepend_New_To): New routine.
8018
8019 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8020
8021 * sinfo.ads: Minor reformatting.
8022
8023 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8024
8025 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
8026 reformatting.
8027
8028 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
8029
8030 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
8031 variable Definite. Create a local object and pass its 'Access to the
8032 BIP function when the result type is either definite or it does not
8033 require any finalization or secondary stack management.
8034
8035 2017-01-12 Bob Duff <duff@adacore.com>
8036
8037 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
8038 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
8039 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
8040 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
8041 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
8042 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
8043 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8044 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
8045 Change name to Pragma_Name_Unmapped.
8046 (Pragma_Name_Mapped): Change name to Pragma_Name.
8047 This is because the "mapped" version should be the usual case.
8048
8049 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
8050
8051 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
8052 Is_Default_Init_Cond_Procedure, and
8053 Has_Inherited_Default_Init_Cond. Add uses of flags
8054 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
8055 (Default_Init_Cond_Procedure): Removed.
8056 (DIC_Procedure): New routine.
8057 (Has_Default_Init_Cond): Removed.
8058 (Has_DIC): New routine.
8059 (Has_Inheritable_Invariants): The attribute applies to the base type.
8060 (Has_Inherited_Default_Init_Cond): Removed.
8061 (Has_Inherited_DIC): New routine.
8062 (Has_Inherited_Invariants): The attribute applies to the base type.
8063 (Has_Own_DIC): New routine.
8064 (Has_Own_Invariants): The attribute applies to the base type.
8065 (Is_Default_Init_Cond_Procedure): Removed.
8066 (Is_DIC_Procedure): New routine.
8067 (Set_Default_Init_Cond_Procedure): Removed.
8068 (Set_DIC_Procedure): New routine.
8069 (Set_Has_Default_Init_Cond): Removed.
8070 (Set_Has_Inheritable_Invariants): The attribute applies
8071 to the base type.
8072 (Set_Has_Inherited_Default_Init_Cond): Removed.
8073 (Set_Has_Inherited_DIC): New routine.
8074 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
8075 (Set_Has_Own_DIC): New routine.
8076 (Set_Has_Own_Invariants): The attribute applies to the base type.
8077 (Set_Is_Default_Init_Cond_Procedure): Removed.
8078 (Set_Is_DIC_Procedure): New routine.
8079 (Write_Entity_Flags): Update the output of all flags related to
8080 default initial condition.
8081 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
8082 of the call to the DIC procedure.
8083 (Freeze_Type): Generate the body of the DIC procedure.
8084 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
8085 all occurrences of Create_Append with Append_New_To. Do
8086 not generate an invariant procedure for a class-wide type.
8087 The generated body acts as a freeze action of the working type.
8088 (Build_Invariant_Procedure_Declaration): Do not generate an
8089 invariant procedure for a class-wide type.
8090 (Create_Append): Removed.
8091 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
8092 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
8093 class-wide pre/postcondition description and data structures from
8094 Sem_Prag.
8095 (Build_Class_Wide_Expression): Moved from Sem_Prag.
8096 (Build_DIC_Call): New routine.
8097 (Build_DIC_Procedure_Body): New routine.
8098 (Build_DIC_Procedure_Declaration): New routine.
8099 (Entity_Hash): Moved from Sem_Prag.
8100 (Find_DIC_Type): New routine.
8101 (Update_Primitives_Mapping): Reimplemented.
8102 (Update_Primitives_Mapping_Of_Types): New routine.
8103 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
8104 (Build_DIC_Call): New routine.
8105 (Build_DIC_Procedure_Body): New routine.
8106 (Build_DIC_Procedure_Declaration): New routine.
8107 (Update_Primitives_Mapping): Moved from Sem_Prag.
8108 (Update_Primitives_Mapping_Of_Types): New routine.
8109 * nlists.adb (Append_New): New routine.
8110 (Append_New_To): New routine.
8111 * nlists.ads (Append_New): New routine.
8112 (Append_New_To): New routine.
8113 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
8114 of DIC procedures here. This is now done at the end of the
8115 visible declarations, private declarations, and at the freeze
8116 point of a type.
8117 (Analyze_Private_Extension_Declaration):
8118 A private extension inherits the DIC pragma of a parent type.
8119 (Analyze_Subtype_Declaration): No need to propagate invariant
8120 attributes to a subtype as those apply to the base type.
8121 (Build_Derived_Record_Type): No need to inherit invariants here
8122 as this is now done in Build_Derived_Type.
8123 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
8124 a parent type.
8125 (Process_Full_View): Update the propagation of DIC attributes.
8126 (Propagate_Default_Init_Cond_Attributes): Removed.
8127 * sem_ch7.adb Add with and use clauses for Exp_Util.
8128 (Analyze_Package_Specification): Create the body of the DIC
8129 procedure at the end of the visible and private declarations.
8130 (Preserve_Full_Attributes): Propagate DIC attributes.
8131 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
8132 DIC attributes.
8133 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
8134 * sem_elab.adb (Check_A_Call): Update the call to
8135 Is_Nontrivial_Default_Init_Cond_Procedure.
8136 * sem_prag.adb Remove the with and use clauses for
8137 GNAT.HTable. Move the handling of class- wide pre/postcondition
8138 description and data structures to Exp_Util.
8139 (Analyze_Pragma): Create the declaration of the DIC procedure. There
8140 is no need to propagate invariant-related attributes at this point
8141 as this is done in Build_Invariant_Procedure_Declaration.
8142 (Build_Class_Wide_Expression): Moved to Exp_Util.
8143 (Entity_Hash): Moved to Exp_Util.
8144 (Update_Primitives_Mapping): Moved to Exp_Util.
8145 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
8146 (Update_Primitives_Mapping): Moved to Exp_Util.
8147 * sem_util.adb: Remove with and use clauses for Ghost
8148 and Sem_Ch13.
8149 (Build_Default_Init_Cond_Call): Removed.
8150 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8151 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8152 (Get_Views): Reimplemented.
8153 (Has_Full_Default_Initialization): Reimplement the section on DIC.
8154 (Inherit_Default_Init_Cond_Procedure): Removed.
8155 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8156 (Is_Nontrivial_DIC_Procedure): New routine.
8157 (Is_Verifiable_DIC_Pragma): New routine.
8158 (Propagate_DIC_Attributes): New routine.
8159 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
8160 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8161 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8162 (Inherit_Default_Init_Cond_Procedure): Removed.
8163 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8164 (Is_Nontrivial_DIC_Procedure): New routine.
8165 (Is_Verifiable_DIC_Pragma): New routine.
8166 (Propagate_DIC_Attributes): New routine.
8167 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
8168 on DIC.
8169 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
8170 usage in nodes.
8171 (Expression_Copy): New routine along with pragma Inline.
8172 (Set_Expression_Copy): New routine along with pragma Inline.
8173
8174 2017-01-06 Bob Duff <duff@adacore.com>
8175
8176 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
8177 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
8178 we won't generate the call to s_stalib_adafinal when the main
8179 is not written in Ada.
8180
8181 2017-01-06 Bob Duff <duff@adacore.com>
8182
8183 * sem_prag.adb: Minor: remove pragma Warnings.
8184
8185 2017-01-06 Tristan Gingold <gingold@adacore.com>
8186
8187 * Makefile.rtl: Do not compile s-stchop by default.
8188
8189 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8190
8191 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
8192 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
8193 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
8194 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
8195 Reverted previous change for now.
8196
8197 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8198
8199 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
8200 check to default discriminant value if checks are enabled.
8201 (Build_Assignment): If type of component has static predicate,
8202 apply check to its default value, if any.
8203
8204 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
8205
8206 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8207 * exp_ch3.adb (Build_Init_Statements): As part of initialising
8208 the value record of a task, set its _Secondary_Stack_Size field
8209 if present.
8210 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8211 a _Secondary_Stack_Size field in the value record of
8212 the task if a Secondary_Stack_Size rep item is present.
8213 (Make_Task_Create_Call): Include secondary stack size
8214 parameter. If No_Secondary_Stack restriction is in place, passes
8215 stack size of 0.
8216 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8217 Secondary_Stack_Size.
8218 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8219 function to define the overhead of the secondary stack.
8220 * s-tarest.adb (Create_Restricted_Task,
8221 Create_Restricted_Task_Sequential): Functions now include
8222 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8223 * s-tarest.adb (Create_Restricted_Task,
8224 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
8225 now include Secondary_Stack_Size parameter.
8226 (Task_Wrapper):
8227 Secondary stack now allocated to the size specified by the
8228 Secondary_Stack_Size parameter in the task's ATCB.
8229 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
8230 Secondary_Stack_Size component.
8231 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8232 Create_Restricted_Task_Sequential): Function now include
8233 Secondary_Stack_Size parameter.
8234 (Task_Wrapper): Secondary stack
8235 now allocated to the size specified by the Secondary_Stack_Size
8236 parameter in the task's ATCB.
8237 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
8238 for Secondary_Stack_Size aspect, turning the aspect into its
8239 corresponding internal attribute.
8240 (Analyze_Attribute_Definition):
8241 Process Secondary_Stack_Size attribute.
8242 * snames.adb-tmpl, snames.ads-tmpl: Added names
8243 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8244 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8245
8246 2017-01-06 Pascal Obry <obry@adacore.com>
8247
8248 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
8249 Sequential_IO and Direct_IO.
8250
8251 2017-01-06 Bob Duff <duff@adacore.com>
8252
8253 * snames.ads-tmpl (Renamed): New name for the pragma argument.
8254 * par-ch2.adb: Allow the new pragma (with analysis deferred
8255 to Sem_Prag).
8256 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
8257 Keep a mapping from new pragma names to old names.
8258 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
8259 implement it by calling Map_Pragma_Name.
8260 * checks.adb, contracts.adb, einfo.adb, errout.adb,
8261 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
8262 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
8263 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
8264 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
8265 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8266 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
8267 as appropriate.
8268
8269 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8270
8271 * exp_ch9.adb: Minor reformatting.
8272
8273 2017-01-06 Tristan Gingold <gingold@adacore.com>
8274
8275 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
8276 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
8277 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
8278 (unused).
8279 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
8280 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
8281 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
8282 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
8283
8284 2017-01-06 Bob Duff <duff@adacore.com>
8285
8286 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
8287 dummy implementation of Map_Pragma_Name.
8288
8289 2017-01-06 Tristan Gingold <gingold@adacore.com>
8290
8291 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
8292 entry_body variable constant.
8293 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
8294 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
8295 to constant.
8296 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
8297 now access to constant.
8298
8299 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8300
8301 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
8302 reformatting and typo fixes.
8303
8304 2017-01-06 Bob Duff <duff@adacore.com>
8305
8306 * snames.ads-tmpl: New names for pragma renaming.
8307 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
8308 * par-prag.adb: Add new pragma name to case statement.
8309 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
8310 of the pragma.
8311 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
8312 Dummy implementation of Pragma_Name_Mapped.
8313
8314 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8315
8316 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
8317 better detect call within an entry_wrapper.
8318 * sem_res.adb (Resolve_Call): A protected call within an
8319 entity_wrapper is analyzed in the context of the protected
8320 object but corresponds to a pre-analysis and is not an access
8321 before elaboration.
8322 * sem_attr.adb: Minor reformatting.
8323
8324 2017-01-06 Justin Squirek <squirek@adacore.com>
8325
8326 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
8327 Finalization_Size to allow a prefix of any non-class-wide type.
8328 * sem_attr.ads Modify comment for Finalization_Size to include
8329 definite type use case.
8330
8331 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8332
8333 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
8334 on procedures that are wrappers created for entries that have
8335 preconditions.
8336 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
8337 body is an entry_wrapper, compile it in the context of the
8338 synchronized type, because a precondition may refer to funtions
8339 of the type.
8340 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
8341 body entity.
8342 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
8343 within an Entry_Wrapper this is an external call whose target
8344 is the synchronized object that is the actual in the call to
8345 the wrapper.
8346
8347 2017-01-06 Yannick Moy <moy@adacore.com>
8348
8349 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
8350 in tree, which means not analyzing the previous prefix if the node has
8351 been rewritten into its prefix.
8352
8353 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8354
8355 * s-tpobop.adb: Minor reformatting.
8356
8357 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8358
8359 * checks.adb (Ensure_Valid): Do not generate a validity check
8360 within a generated predicate function, validity checks will have
8361 been applied earlier when required.
8362
8363 2017-01-06 Tristan Gingold <gingold@adacore.com>
8364
8365 * s-tpoben.ads (Protection_Entries): Add comment and reorder
8366 components for performances.
8367 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
8368 semantic.
8369
8370 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8371
8372 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
8373 If expression is compile-time known and obeys a static predicate
8374 it must be labelled as static, to prevent spurious warnings and
8375 run-time errors, e.g. in case statements. This is relevant when
8376 the expression is the result of constant-folding a type conversion
8377 whose expression is a variable with a known static value.
8378
8379 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8380
8381 * exp_attr.adb, sem_attr.ads: Minor reformatting.
8382
8383 2017-01-06 Justin Squirek <squirek@adacore.com>
8384
8385 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
8386 expansion of Finalization_Size attribute.
8387 * sem_attr.adb (Analyze_Attribute): Add entry to check the
8388 semantics of Finalization_Size.
8389 (Eval_Attribute): Add null entry for Finalization_Size.
8390 * sem_attr.ads: Add Finalization_Size to the implementation
8391 dependent attribute list.
8392 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
8393
8394 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8395
8396 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
8397 iterator specification with a serious syntactic error, transform
8398 construct into an infinite loop in order to continue analysis
8399 and prevent a compiler abort.
8400
8401 2017-01-06 Tristan Gingold <gingold@adacore.com>
8402
8403 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
8404 max_queue_lengths_array if unused.
8405
8406 2017-01-06 Bob Duff <duff@adacore.com>
8407
8408 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
8409 array access, in case "\" is at the end of Text.
8410 * stylesw.adb (Set_Style_Check_Options): Don't include input
8411 characters in the error message template, because they could
8412 be control characters such as "\", which Errout will try to
8413 interpret.
8414
8415 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8416
8417 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
8418 For a private type examine the visible declarations that follow
8419 the partial view, not just the private declarations that follow
8420 the full view.
8421
8422 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8423
8424 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
8425 code cleanup.
8426
8427 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8428
8429 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
8430 alias of the inherited op is the parent iterator, no need to
8431 examine dispatch table positions which might not be established
8432 yet if type is not frozen.
8433 * sem_disp.adb (Check_Controlling_Formals): The formal of a
8434 predicate function may be a subtype of a tagged type.
8435 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
8436 of representation items for the completion of a type extension
8437 where a predicate applies to the partial view.
8438 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
8439 parameter that designates function whose actual receives a
8440 predicate check, to improve warning message when the check will
8441 lead to infinite recursion.
8442 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
8443 Apply_Predicate_Check.
8444
8445 2017-01-06 Tristan Gingold <gingold@adacore.com>
8446
8447 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
8448 Gnat_Extended_Ravenscar.
8449 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
8450
8451 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8452
8453 * sem_util.ads: Minor typo fix and reformatting.
8454
8455 2017-01-06 Yannick Moy <moy@adacore.com>
8456
8457 * ghost.adb Minor fixing of references to SPARK RM.
8458 (Check_Ghost_Context): Check whether reference is to a lvalue
8459 before issuing an error about violation of SPARK RM 6.9(13)
8460 when declaration has Ghost policy Check and reference has Ghost
8461 policy Ignore.
8462 * sem_util.adb Minor indentation.
8463 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
8464 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
8465 * sem_util.ads (Unique_Defining_Entity): Document the result
8466 for package body stubs.
8467
8468 2017-01-06 Tristan Gingold <gingold@adacore.com>
8469
8470 * raise-gcc.c (abort): Macro to call Abort_Propagation.
8471 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
8472 constant.
8473 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
8474 Do not generate the Entry_Max_Queue_Lengths_Array if all default
8475 values.
8476 * exp_util.adb (Corresponding_Runtime_Package): Consider
8477 Max_Queue_Length pragma.
8478
8479 2017-01-06 Justin Squirek <squirek@adacore.com>
8480
8481 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
8482 Remove declaration generation in the case of
8483 System_Tasking_Protected_Objects_Single_Entry being used,
8484 and add a warning message when this is detected to occur.
8485 (Make_Initialize_Protection): Remove reference pass in the case
8486 of System_Tasking_Protected_Objects_Single_Entry.
8487 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
8488 * s-tposen.adb (Initialize_Protection_Entry): Remove
8489 Entry_Queue_Max parameter.
8490 * s-tposen.ads: Remove the types use to store the entry queue
8491 maximum.
8492 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
8493
8494 2017-01-06 Yannick Moy <moy@adacore.com>
8495
8496 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
8497 behavior of function, to also accept out of range positions
8498 and raise Constraint_Error in such case, and to copy sloc from
8499 literal if No_Location passed as location.
8500 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
8501 of functions to raise Constraint_Error in case of value not in
8502 appropriate range.
8503
8504 2017-01-06 Tristan Gingold <gingold@adacore.com>
8505
8506 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
8507 Invalidate_Stack_Cache.
8508
8509 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
8510
8511 * s-os_lib.adb: Minor fix to the signature of Readlink.
8512
8513 2017-01-06 Javier Miranda <miranda@adacore.com>
8514
8515 * sem_ch6.adb (Conforming_Types): Handle another
8516 confusion between views in a nested instance with an actual
8517 private type whose full view is not in scope.
8518
8519 2017-01-06 Arnaud Charlet <charlet@adacore.com>
8520
8521 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
8522 mark a rewritten if statement as explicit (Comes_From_Source).
8523
8524 2017-01-06 Gary Dismukes <dismukes@adacore.com>
8525
8526 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
8527
8528 2017-01-06 Tristan Gingold <gingold@adacore.com>
8529
8530 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
8531
8532 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8533
8534 * sem_case.adb: Minor reformatting.
8535
8536 2017-01-06 Thomas Quinot <quinot@adacore.com>
8537
8538 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
8539
8540 2017-01-06 Justin Squirek <squirek@adacore.com>
8541
8542 * aspects.adb: Register aspect in Canonical_Aspect.
8543 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
8544 into respective tables.
8545 * einfo.ads, einfo.adb: Add a new attribute for
8546 handling the parameters for Pragma_Max_Entry_Queue
8547 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
8548 for accessing and setting were added as well.
8549 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
8550 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
8551 declaration for pramga arguments and store them in the protected
8552 type node.
8553 (Make_Initialize_Protection): Pass a reference to
8554 the Entry_Max_Queue_Lengths_Array in the protected type node to
8555 the runtime.
8556 * rtsfind.adb: Minor grammar fix.
8557 * rtsfind.ads: Register new types taken from the
8558 runtime libraries RE_Protected_Entry_Queue_Max and
8559 RE_Protected_Entry_Queue_Max_Array
8560 * s-tposen.adb, s-tpoben.adb
8561 (Initialize_Protection_Entry/Initialize_Protection_Entries):
8562 Add extra parameter and add assignment to local object.
8563 * s-tposen.ads, s-tpoben.ads: Add new types to
8564 store entry queue maximums and a field to the entry object record.
8565 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
8566 for Aspect_Max_Queue_Length.
8567 (Check_Aspect_At_Freeze_Point):
8568 Add aspect to list of aspects that don't require delayed analysis.
8569 * sem_prag.adb (Analyze_Pragma): Add case statement for
8570 Pragma_Max_Queue_Length, check semantics, and register arugments
8571 in the respective entry nodes.
8572 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
8573 and Has_Max_Queue_Length
8574 * snames.ads-tmpl: Add constant for the new aspect-name
8575 Name_Max_Queue_Length and corrasponding pragma.
8576
8577 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8578
8579 * exp_util.adb (Is_Controlled_Function_Call):
8580 Reimplemented. Consider any node which has an entity as the
8581 function call may appear in various ways.
8582
8583 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8584
8585 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
8586 an unchecked type conversion when performing a view conversion
8587 to/from a private type. In all other cases use a regular type
8588 conversion to ensure that any relevant checks are properly
8589 installed.
8590
8591 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8592
8593 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
8594
8595 2017-01-06 Ed Schonberg <schonberg@adacore.com>
8596
8597 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
8598 error on case expression that is an entity, when coverage is
8599 incomplete and entity has a static value obtained by local
8600 propagation.
8601 (Handle_Static_Predicate): New procedure, subsidiary of
8602 Check_Choices, to handle case alternatives that are either
8603 subtype names or subtype indications involving subtypes that
8604 have static predicates.
8605
8606 2017-01-06 Thomas Quinot <quinot@adacore.com>
8607
8608 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
8609 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
8610
8611 2017-01-06 Bob Duff <duff@adacore.com>
8612
8613 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
8614 Elaborate_All(P) to P itself. That could happen in obscure cases,
8615 and always introduced a cycle (P body must be elaborated before
8616 P body).
8617 * lib-writ.ads: Comment clarification.
8618 * ali-util.ads: Minor comment fix.
8619 * ali.adb: Minor reformatting.
8620
8621 2017-01-06 Tristan Gingold <gingold@adacore.com>
8622
8623 * a-exexpr-gcc.adb: Improve comment.
8624
8625 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
8626
8627 * s-linux-mips.ads: Use correct signal and errno constants.
8628 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
8629
8630 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
8631
8632 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
8633 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
8634 sections.
8635
8636 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
8637
8638 * gnatvsn.ads: Bump copyright year.
8639
8640 2017-01-01 Jakub Jelinek <jakub@redhat.com>
8641
8642 * gnat_ugn.texi: Bump @copying's copyright year.
8643 * gnat_rm.texi: Likewise.
8644 \f
8645 Copyright (C) 2017 Free Software Foundation, Inc.
8646
8647 Copying and distribution of this file, with or without modification,
8648 are permitted in any medium without royalty provided the copyright
8649 notice and this notice are preserved.