]> gcc.gnu.org Git - gcc.git/blame - gcc/ada/ChangeLog
[Ada] Minor reformatting
[gcc.git] / gcc / ada / ChangeLog
CommitLineData
07fb1ef4
HK
12018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
2
3 * exp_aggr.adb, exp_unst.adb, freeze.adb, libgnat/a-direct.adb: Minor
4 reformatting.
5
e00ee732
ES
62018-05-30 Ed Schonberg <schonberg@adacore.com>
7
8 * exp_unst.adb (Visit_Node): Handle the semantic Procedure_To_Call
9 field in relevant nodes: Allocate, Free, and return statements.
10
392a7e19
ES
112018-05-30 Ed Schonberg <schonberg@adacore.com>
12
13 * exp_unst.adb (Visit_Node): Do not traverse a Component_Association
14 that has not been analyzed, as will be the case for a nested aggregate
15 that is expanded into individual assignments.
16
656d1fba
JS
172018-05-30 Justin Squirek <squirek@adacore.com>
18
19 * aspects.adb, aspects.ads: Register new aspect.
20 * par-prag.adb (Prag): Register new pragma.
21 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for new
22 aspect similar to Aspect_Max_Queue_Length.
23 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new pragma and
24 set it to use the same processing as Pragma_Max_Queue_Length.
25 * snames.ads-tmpl: Move definition of Name_Max_Entry_Queue_Depth so
26 that it can be processed as a pragma in addition to a restriction and
27 add an entry for the pragma itself.
28
d7db3f4f
ES
292018-05-30 Ed Schonberg <schonberg@adacore.com>
30
31 * freeze.adb (Freeze_Object_Declaration): A pragma Thread_Local_Storage
32 is now legal on a variable of composite type initialized with an
33 aggregate that is fully static and requires no elaboration code.
34 * exp_aggr.adb (Convert_To_Positional): Recognize additional cases of
35 nested aggregates that are compile-time static, so they can be used to
36 initialize variables declared with Threqd_Local_Storage.
37 * doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation on
38 Thread_Local_Storage.
39 * gnat_rm.texi: Regenerate.
40
f2a3c2fa
YM
412018-05-30 Yannick Moy <moy@adacore.com>
42
43 * sem_util.adb (Policy_In_Effect): Take into account CodePeer and
44 GNATprove modes.
45
efa760f0
JS
462018-05-30 Justin Squirek <squirek@adacore.com>
47
48 * libgnat/a-direct.adb, libgnat/a-direct.ads (Name_Case_Equivalence):
49 Add implementation.
50 (Start_Search): Modify to use Start_Search_Internal
51 (Start_Search_Internal): Add to break out an extra flag for searching
52 case insensative due to the potential for directories within the same
53 OS to allow different casing schemes.
54 * sysdep.c (__gnat_name_case_equivalence): Add as a default fallback
55 for when the more precise solution fails.
56
0c506265
HK
572018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
58
59 * checks.adb, exp_ch5.adb, exp_ch7.adb, exp_unst.adb, sem_eval.adb:
60 Minor reformatting.
61
42e508b4
PO
622018-05-30 Pascal Obry <obry@adacore.com>
63
64 * libgnat/g-comlin.ads (Value_Callback, Define_Switch): New.
65 * libgnat/g-comlin.adb: Add corresponding implementation.
66
7cc6d416
GD
672018-05-30 Gary Dismukes <dismukes@adacore.com>
68
69 * sem_res.adb, sem_util.adb: Fix several typos.
70
5e648d30
OH
712018-05-30 Olivier Hainque <hainque@adacore.com>
72
73 * vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty.
74 (eh_registration_ctors, eh_registration_tors): New static variables,
75 forced in a .ctors/.dtors section, respectively, with priority.
76
812e6118
BD
772018-05-30 Bob Duff <duff@adacore.com>
78
79 * aspects.ads, contracts.adb, exp_util.adb, expander.adb, expander.ads,
80 freeze.adb, inline.adb, lib-xref.adb, sem.ads, sem_aggr.adb,
81 sem_attr.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb,
82 sem_ch8.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_res.ads,
83 sinfo.ads: Spell preanalysis, preanalyze correctly.
84
83d849a8
BD
852018-05-30 Bob Duff <duff@adacore.com>
86
87 * libgnat/g-sestin.ads: Rework documentation comments.
88
dc67cfea
PT
892018-05-30 Piotr Trojanek <trojanek@adacore.com>
90
91 * errout.adb, exp_aggr.adb, exp_ch7.adb, exp_util.adb, lib.adb,
92 sem_ch13.adb, sem_ch4.adb, sem_res.adb, sem_util.adb
93 (Has_Original_Node): Refactor to use Is_Rewrite_Substitution.
94
81c8f261
PT
952018-05-30 Piotr Trojanek <trojanek@adacore.com>
96
97 * sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.
98
56a05ce0
HK
992018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
100
101 * sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
102 in a separate routine.
103 (Is_Atomic_Object_Entity): New routine.
104 (Is_Atomic_Prefix): Cleaned up.
105 (Is_Synchronized_Object): Check that the object is atomic, or its type
106 is atomic.
107 (Object_Has_Atomic_Components): Removed.
108 * sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
109 (Is_Atomic_Object_Entity): New routine.
110
131780ac
ES
1112018-05-30 Ed Schonberg <schonberg@adacore.com>
112
113 * sem_ch3.adb (Access_Subprogram_Declaration): The flag
114 Needs_Activation_Record is only needed on a subprogram type, not on a
115 pointer to such.
116 * sem_res.adb (Resolve_Selected_Component): If the context type and the
117 component type are anonymous access to subprograms, use the component
118 type to obtain the proper value of Needs_Activation_Record flag for the
119 expression.
120
df8aa2b7
EB
1212018-05-30 Eric Botcazou <ebotcazou@adacore.com>
122
123 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
124 comment about the memset case.
125
5a0c86bd
BD
1262018-05-30 Bob Duff <duff@adacore.com>
127
128 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
129 to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
130 We need to analyze it as part of analyzing the block, so that if the
131 call to Element that initializes Elmt_Decl returns on the secondary
132 stack, the block will ss_mark/ss_release. This block is inside the
133 loop; we don't want to leak memory until the loop exits. The purpose
134 of analyzing Elmt_Decl first was to catch the error of modifying it,
135 which is illegal because it's a loop parameter. The above causes us to
136 miss that error. Therefore, we add a flag Is_Loop_Parameter, and set
137 it on the Element entity, so we end up with an E_Variable node with the
138 flag set.
139 * einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
140 * sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
141 parameter not allowed" error if Is_Loop_Parameter.
142 * sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
143 trigger the call to Diagnose_Non_Variable_Lhs.
144
88ad52c9
AC
1452018-05-30 Arnaud Charlet <charlet@adacore.com>
146
147 * checks.adb (Apply_Scalar_Range_Check):
148 * sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
149 range values for System.Priority in CodePeer mode since the actual
150 target compiler may provide a wider range.
151
8ed508fe
ES
1522018-05-30 Ed Schonberg <schonberg@adacore.com>
153
154 * exp_unst.adb: Search specification of main unit as well, for
155 unnesting.
156
86f32857
ES
1572018-05-30 Ed Schonberg <schonberg@adacore.com>
158
159 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
160 a package body that is a compilation unit may contain blocks that
161 declare local subprograms. In Subprogram_Unnesting Mode such
162 subprograms must be handled as nested inside the (implicit) elaboration
163 procedure that executes that statement part. To handle properly uplevel
164 references we construct that subprogram explicitly, to contain blocks
165 and inner subprograms, The statement part of the compilation unit
166 becomes a call to this subprogram. This is only done if blocks are
167 present in the statement list of the body.
168
2a5ec8e6
BD
1692018-05-30 Bob Duff <duff@adacore.com>
170
171 * exp_ch7.adb: Minor comment fix.
172
5d514884
ES
1732018-05-30 Ed Schonberg <schonberg@adacore.com>
174
175 * exp_unst.adb (Visit_Node): Handle properly subprogram instantiations
176 that have no corresponding body and appear as attributes of the
177 corresponding wrapper package declaration.
178 (Register_Subprogram): New subprogram, used for subprogram bodies and
179 for subprogram instantiations to enter callable entity into Subp table.
180
1df65b89
HK
1812018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
182
183 * libgnat/s-secsta.adb: Reimplement the secondary stack support.
184 * libgnat/s-secsta.ads: Update the documentation of all routines in the
185 public part of the package. Reimplement the private part of the
186 package to account for the new secondary stack structure. Add types
187 and subprograms for testing purposes. Add several documentation
188 sections.
189
f537fc00
HK
1902018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
191
192 * exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
193 exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
194 libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
195 sem_disp.ads, sem_util.adb: Minor reformatting.
196
c0368be1
AC
1972018-05-30 Arnaud Charlet <charlet@adacore.com>
198
199 * gcc-interface/Makefile.in: Move special flags for Ada runtime files
200 from here...
201 * Makefile.rtl: ... to here. Update comments. Protect call to
202 "GCC_FOR_TARGET" in case target_os isn't defined.
203
c667752e
AC
2042018-05-30 Arnaud Charlet <charlet@adacore.com>
205
206 * gcc-interface/Makefile.in: Move target pair settings from here...
207 * Makefile.rtl: ... to here.
208 (setup-rts): New target.
209
86e74d58
EB
2102018-05-29 Eric Botcazou <ebotcazou@adacore.com>
211
212 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
213 List of All Switches): Replace "modules" with "units".
214 (Subprogram Inlining Control): Likewise.
215 * gnat_ugn.texi: Regenerate.
216 * usage.adb (Usage): Fix description of -gnatn switch.
217
4f95a818
AC
2182018-05-29 Arnaud Charlet <charlet@adacore.com>
219
220 * gcc-interface/Makefile.in: Fix typos.
221
795d0063
ES
2222018-05-29 Ed Schonberg <schonberg@adacore.com>
223
224 * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
225 the finalizer procedure in the At_End handler, for use in LLVM
226 generation.
227
65641255
JM
2282018-05-29 Javier Miranda <miranda@adacore.com>
229
230 * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
231 subprogram Inherits_From_Tagged_Full_View to identify more reliably
232 untagged private types completed with a derivation of an untagged
233 private whose full view is a tagged type.
234 * sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
235 subprogram.
236 (Collect_Primitive_Operations): Handle untagged private types completed
237 with a derivation of an untagged private type whose full view is a
238 tagged type. In such case, collecting the list of primitives we may
239 find two equality primitives: one associated with the untagged private
240 and another associated with the ultimate tagged type (and we must
241 remove from the returned list this latter one).
242
999acab6
ES
2432018-05-29 Ed Schonberg <schonberg@adacore.com>
244
245 * exp_unst.adb (Visit_Node): Handle statement sequences that include an
246 At_End handler.
247
944e24a3
EB
2482018-05-29 Eric Botcazou <ebotcazou@adacore.com>
249
250 * repinfo.adb (List_Entities): Also recurse into blocks without label.
251
3747db82
ES
2522018-05-29 Ed Schonberg <schonberg@adacore.com>
253
254 * exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
255 exceptions if subprogram unnesting is in effect, because these branch
256 nodes are relevant only in the presence of nested subprograms.
257
ef22a3b2
ES
2582018-05-29 Ed Schonberg <schonberg@adacore.com>
259
260 * libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error
261 unconditionally when applied to the largest positive (resp. largest
262 negative) value of a floating-point type.
263
54e33e5f
ES
2642018-05-29 Ed Schonberg <schonberg@adacore.com>
265
266 * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
267 discriminants and exceptions are never components of such. The flag
268 Needs_Activation_Record is set on subprogram types, not on access to
269 them.
270
895500a2
ES
2712018-05-29 Ed Schonberg <schonberg@adacore.com>
272
273 * sem_ch3.adb: Set scope of component of subtype.
274
14f8ba9a
ES
2752018-05-29 Ed Schonberg <schonberg@adacore.com>
276
277 * exp_unst.adb (Visit_Node): Exclude selected components whose prefix
278 carry no type. Such selected components appear in unit names that are
279 child units, both in the specification and possibly in an end label for
280 the unit, and they do not contain any relevant uplevel references.
281
ec3b72c5
AC
2822018-05-29 Arnaud Charlet <charlet@adacore.com>
283
284 * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
285 function.
286
57dfb3ec
OH
2872018-05-29 Olivier Hainque <hainque@adacore.com>
288
289 * libgnat/system-vxworks7-ppc-rtp.ads: New file.
290 * libgnat/system-vxworks7-ppc-kernel.ads: New file.
291 * libgnat/system-vxworks7-e500-rtp.ads: New file.
292 * libgnat/system-vxworks7-e500-kernel.ads: New file.
293 * libgnat/system-vxworks7-x86-rtp.ads: New file.
294 * libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
295 * libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
296 gnat-crtbe link spec to use the vx7 variant.
297
1f39fcd6
OH
2982018-05-29 Olivier Hainque <hainque@adacore.com>
299
300 * vx_crtbegin.inc: Use a consistent naming convention for the
301 registration/deregistration functions across RTP or kernel. Remove the
302 ctor/dtor attribute setting based on RTP/kernel, expect the optional
303 attribute extension to be provided by includers instead.
304 * vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
305 extension for the registration/deregistration functions.
306 * vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
307 constructor/destructor attribute extensions.
308 * vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
309 attribute extensions and declare _ctors/_dtors arrays.
310 * vx_crtbegin_auto.c: Remove.
311 * libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
312 vxworks7-gnat-crtbe-link.spec.
313 * libgnat/system-vxworks7-aarch64.ads: Likewise.
314 * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
315 * libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
316 * libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
317 * libgnat/system-vxworks7-x86-kernel.ads: Likewise.
318 * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
319 * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
320 * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
321
8f1edbd3
PT
3222018-05-29 Piotr Trojanek <trojanek@adacore.com>
323
324 * ali.adb: Minor reformatting.
325
c258a5b2
JB
3262018-05-29 Joel Brobecker <brobecker@adacore.com>
327
328 * doc/gnat_ugn/platform_specific_information.rst: Update package
329 requirements for 32bit GNAT on x86_64-linux.
330 * gnat_ugn.texi: Regenerate.
331
de9b2a96
EB
3322018-05-29 Eric Botcazou <ebotcazou@adacore.com>
333
334 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
335 Control): Adjust description of -gnatRj.
336 * gnat_ugn.texi: Regenerate.
337 * opt.ads (List_Representation_Info_To_JSON): Likewise.
338 * repinfo.adb (List_Rep_Info): Do not automatically create a file
339 if List_Representation_Info_To_JSON is true.
340 * switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
341 check between -gnatRj and -gnatRs.
342 * usage.adb (Usage): Adjust description of -gnatRj.
343
ce09c3c0
PO
3442018-05-29 Pascal Obry <obry@adacore.com>
345
346 * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
347 the root directory.
348
ae3d5f11
PO
3492018-05-29 Pascal Obry <obry@adacore.com>
350
351 * libgnat/s-os_lib.adb: Minor reformatting.
352
35f5e2c1
DR
3532018-05-29 Doug Rupp <rupp@adacore.com>
354
355 * libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
356 * libgnat/a-calend.ads (Epoch_Offset): to private part of spec
357 * libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
358 * libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
359
0f9ca030
EB
3602018-05-29 Eric Botcazou <ebotcazou@adacore.com>
361
362 * repinfo.ads (JSON format): Document new pair for components.
363 * repinfo.adb (Derived_Discriminant): New function.
364 (List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
365 in recursive calls. If the record type is the parent of an extension,
366 find and list the derived discriminant from the extension, if any.
367 (List_Component_Layout): List the Discriminant_Number in JSON mode.
368 (List_Record_Info): Adjust call to List_Structural_Record_Layout.
369
1e7629b8
EB
3702018-05-29 Eric Botcazou <ebotcazou@adacore.com>
371
372 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
373 List of All Switches): Document -gnatRj.
374 (Debugging Control): Likewise.
375 * gnat_ugn.texi: Regenerate.
376 * opt.ads (List_Representation_Info_To_JSON): New boolean variable.
377 * osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
378 extension if List_Representation_Info_To_JSON is true.
379 * repinfo.ads: Document the JSON output format.
380 * repinfo.adb (List_Location): New procedure.
381 (List_Array_Info): Add support for JSON output.
382 (List_Entities): Likewise.
383 (Unop): Likewise.
384 (Binop): Likewise.
385 (Print_Expr): Likewise.
386 (List_Linker_Section): Likewise.
387 (List_Mechanisms): Likewise.
388 (List_Name): Likewise.
389 (List_Object_Info): Likewise.
390 (List_Record_Info): Likewise.
391 (List_Component_Layout): Likewise. Add Indent parameter.
392 (List_Structural_Record_Layout): New procedure.
393 (List_Attr): Add support for JSON output.
394 (List_Type_Info): Likewise.
395 (Write_Unknown_Val): Likewise.
396 * switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
397 * usage.adb (Usage): List -gnatRj.
398
7883c42e
EB
3992018-05-29 Eric Botcazou <ebotcazou@adacore.com>
400
401 * repinfo.adb (List_Component_Layout): New procedure extracted from...
402 (List_Record_Layout): ...here. Invoke it.
403
76b382d9
EB
4042018-05-29 Eric Botcazou <ebotcazou@adacore.com>
405
406 * repinfo.adb (Write_Unknown_Val): New procedure.
407 (List_GCC_Expression): Call it.
408 (List_Record_Layout): Likewise.
409 (Write_Val): Likewise.
410
c35c40e7
RK
4112018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
412
413 * exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
414 code to do check.
415
ccec48c0
AC
4162018-05-29 Arnaud Charlet <charlet@adacore.com>
417
418 * lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
419 This breaks build of cross compilers with older versions of GNAT, so
420 better avoid it.
421
eda45984
DR
4222018-05-29 Doug Rupp <rupp@adacore.com>
423
424 * libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
425 reflect reality.
426
d8eb4ac4
RK
4272018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
428
429 * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
430
28cfa269
EB
4312018-05-29 Eric Botcazou <ebotcazou@adacore.com>
432
433 * repinfo.adb (List_Entities): Do not list the Linker_Section for
434 subprograms here...
435 (List_Mechanisms): ...but here instead. Use consistent name output
436 and formatting conventions.
437
9f4b346b
BD
4382018-05-29 Bob Duff <duff@adacore.com>
439
440 * lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
441 To_Lower function.
442 * libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
443 To_Mixed): New functions.
444 * osint.adb: Cleanup: use Is_Directory_Separator, which correctly
445 allows both '\' and '/' on Windows.
446
ab4dad49
EB
4472018-05-28 Eric Botcazou <ebotcazou@adacore.com>
448
449 * repinfo.ads: Minor fixes and tweaks in comments.
450
575e47bf
EB
4512018-05-28 Eric Botcazou <ebotcazou@adacore.com>
452
453 * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
454 it with calls to Unop.
455
72da915b
EB
4562018-05-28 Eric Botcazou <ebotcazou@adacore.com>
457
458 * repinfo.ads (TCode): Adjust range.
459 (Truth_Andif_Expr): Remove.
460 (Truth_Orif_Expr): Likewise.
461 (Truth_And_Expr .. Dynamic_Val): Adjust value.
462 * repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
463 (Rep_Value): Likewise.
464 * repinfo.h (Truth_Andif_Expr): Remove.
465 (Truth_Orif_Expr): Likewise.
466 (Truth_And_Expr .. Dynamic_Val): Adjust value.
467 * gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
468 through to TRUTH_AND_EXPR case.
469 <TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
470
184a6ba6
ES
4712018-05-28 Ed Schonberg <schonberg@adacore.com>
472
473 * exp_unst.adb (Visit_Node): For indexed components and attribute
474 references, examine index expressions or associated expressions as well
475 to record uplevel references.
476 (Vist_Node): For function and procedure calls, if a formal is an
477 unconstrained array and the actual is constrained, check whether bounds
478 of actual have uplevel references.
479
6af9261c
ES
4802018-05-28 Ed Schonberg <schonberg@adacore.com>
481
482 * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
483 they can appear as components of activation records.
484 * exp_unst.adb (Visit_Node): A reference to an exception may be an
485 uplevel reference.
486
bcad5029
EB
4872018-05-28 Eric Botcazou <ebotcazou@adacore.com>
488
489 * exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
490 depends on a discriminant manually instead of using the predicate
491 Size_Depends_On_Discriminant in the array type case.
492
4fd9587f
ES
4932018-05-28 Ed Schonberg <schonberg@adacore.com>
494
495 * exp_unst.adb (Check_Static_Type): For a record subtype, check
496 discriminant constraints as well.
497 (Visit_Node): For a selected component, check type of prefix, as is
498 done for indexed components and slices.
499
04920bb6
JM
5002018-05-28 Javier Miranda <miranda@adacore.com>
501
502 * exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
503 value when converting a float value to a fixed-point value. This is
504 required for CCG because it handles fixed-point types by means of
505 unsigned integer type variables. The range check is now performed using
506 the integer value stored in this temporary.
507
cb1a0672
YM
5082018-05-28 Yannick Moy <moy@adacore.com>
509
510 * sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
511 Length as valid non-interfering contexts for SPARK.
512
cc821e65
CD
5132018-05-28 Claire Dross <dross@adacore.com>
514
515 * sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
516 generic inheritance utilities.
517 (Generic_Inherited_Subprograms): Generic version of
518 Inherited_Subprograms, generic in Find_Dispatching_Type function.
519 (Generic_Is_Overriding_Subprogram): Generic version of
520 Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
521 (Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
522 Sem_Disp.Find_Dispatching_Type.
523 (Is_Overriding_Subprogram): Instance of
524 Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
525 (Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
526 with Sem_Disp.Find_Dispatching_Type.
527
0c386027
EB
5282018-05-28 Eric Botcazou <ebotcazou@adacore.com>
529
530 * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
531 component type, do not expand array equality using the unconstrained
532 base type, except for the case where the bounds of the type depend on a
533 discriminant.
534
c84205cd
ES
5352018-05-28 Ed Schonberg <schonberg@adacore.com>
536
537 * einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
538 access-to-subprogram types, to indicate that an indirect call through
539 such a type requires an activation record when compiling for LLVM.
540 * sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
541
a98217be
ES
5422018-05-28 Ed Schonberg <schonberg@adacore.com>
543
544 * exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
545 when bounds of fixed type are static, to remove some spuerfluous
546 implicit conversions and provide an accurate result when converting
547 back and forth between the fixed point type and a floating point type.
548
f4bf7b62
ES
5492018-05-28 Ed Schonberg <schonberg@adacore.com>
550
551 * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
552 activation records.
553
577ad216
RK
5542018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
555
556 * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
557 replaced, if any; all callers changed.
558 (Note_Uplevel_Ref): Likewise. Also replace reference to deferred
559 constant with private view so we take the address of that entity.
560 (Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
561 any; all callers changed. Handle N_Indexed_Component like
562 N_Attribute_Reference. Add N_Type_Conversion case.
563 (Visit_Node): Indexed references can be uplevel if the type isn't
564 static.
565 (Unnest_Subprograms): Don't rewrite if no reference given. If call has
566 been relocated, set first_named pointer in original node as well.
567
1541ede1
ES
5682018-05-28 Ed Schonberg <schonberg@adacore.com>
569
570 * exp_aggr.adb (Flatten): Copy tree of expression in a component
571 association with a range or a set of discrete choices, rather than
572 relocating the node. This avoids inconsistencies in the tree when
573 handling nested subprograms with uplevel references for LLVM.
574
f167c735
AC
5752018-05-28 Arnaud Charlet <charlet@adacore.com>
576
577 * exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
578 codepeer mode.
579
7ddbf09d
AC
5802018-05-28 Arnaud Charlet <charlet@adacore.com>
581
582 * exp_unst.adb: Fix typo.
583
0ef5a027
BD
5842018-05-28 Bob Duff <duff@adacore.com>
585
586 * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
587 unnecessary use of 'Unrestricted_Access.
588
24161618
HK
5892018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
590
591 * repinfo.adb (Expr_Value_S): New routine.
592 (List_Linker_Section): Properly extract the value of the section
593 argument.
594
f5a9ad25
PB
5952018-05-28 Patrick Bernardi <bernardi@adacore.com>
596
597 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
598 description of the -D binder switch to reflect current usage.
599 * gnat_ugn.texi: Regenerate.
600
6a890c58
GD
6012018-05-28 Gary Dismukes <dismukes@adacore.com>
602
603 * exp_ch3.adb: Minor reformatting
604
341e0bb6
JS
6052018-05-28 Justin Squirek <squirek@adacore.com>
606
607 * exp_ch3.adb
608 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
609 new formal.
610 (Init_Formals): Add new formal *_skip_null_excluding_check
611 * exp_util.adb, exp_util.ads
612 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
613 scope.
614 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
615 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
616 used to determine how to generate an Init_Proc for a given type.
617 (Needs_Constant_Address): Minor reformatting
618 * sem_res.adb
619 (Resolve_Null): Add logic to generate a conditional check in certain cases
620
9b19c244
HK
6212018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
622
623 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
624 Minor reformatting.
625
aab1da2a
HK
6262018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
627
628 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
629 the declarations of single concurrent types because they fall in the
630 category of full type and object declarations.
631
c8e95568
EB
6322018-05-28 Eric Botcazou <ebotcazou@adacore.com>
633
634 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
635 (List_Record_Layout): Likewise.
636
500b21dd
ES
6372018-05-28 Ed Schonberg <schonberg@adacore.com>
638
639 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
640 includes a call to function to which it applies. This may mean an
641 omission of an attribute reference 'Result, in particular if the
642 function is pqrameterless.
643
aa76fac7
JS
6442018-05-28 Justin Squirek <squirek@adacore.com>
645
646 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
647 misresolved package name is not a case of mistaken identity.
648
e740ff85
YM
6492018-05-28 Yannick Moy <moy@adacore.com>
650
651 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
652 GNATprove mode, as the order of resolution (low then high) means that
653 all the information is not available when resolving the low bound the
654 first time.
655
7672ab42
EB
6562018-05-28 Eric Botcazou <ebotcazou@adacore.com>
657
658 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
659 end with the linker section, if any.
660 (List_Entities): Do not output the linker section for record types,
661 array types and variables.
662 (Print_Expr): Factor out common processing for unary operators and
663 special values. Adjust and reorder the various cases.
664 (List_Object_Info): End with the linker section, if any.
665 (List_Record_Info): Likewise.
666 (List_Type_Info): Do not start with a blank line.
667
529e1a3f
NR
6682018-05-25 Nicolas Roche <roche@adacore.com>
669
670 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
671 that the result will be either -infinite or +infinite.
672
38806cd3
PB
6732018-05-25 Patrick Bernardi <bernardi@adacore.com>
674
675 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
676 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
677 Expand range of type to match the address space of the target.
678 (Task_Storage_Size): Remove unused type.
679
17dd35f4
ES
6802018-05-25 Ed Schonberg <schonberg@adacore.com>
681
682 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
683 of a fixed point type and the parent is a multiplying operation,
684 resolve the operand with its own type because the context will impose a
685 resulting type on the result of the multiplication by means of
686 approriate conversion.
687
bf5899e7
HK
6882018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
689
690 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
691 the in-place initialization aggregate created for pragmas
692 Initialize_Scalars or Normalize_Scalars is performed with checks
693 suppressed.
694
f70b0116
AC
6952018-05-25 Arnaud Charlet <charlet@adacore.com>
696
697 * exp_aggr.adb (Convert_To_Positional): Bump default for
698 Max_Others_Replicate to 32. Update comments.
699 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
700 (No_File_Info_Cache): Initialize separately.
701 * osint.adb (No_File_Info_Cache): Update initializer.
702
25409c3c
JM
7032018-05-25 Javier Miranda <miranda@adacore.com>
704
705 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
706 test when the left operand is a class-wide interface and the right
707 operand is not a class-wide type.
708 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
709 left operand.
710
1f6237e3
ES
7112018-05-25 Ed Schonberg <schonberg@adacore.com>
712
713 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
714 in an others clause to prevent visibility issues with the generated
715 loop variable.
716 (Component_OK_For_Backend): Return false for a quantified expression.
717 (Check_Static_Component): Ditto.
718
25eadeea
HK
7192018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
720
721 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
722 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
723 into three distring cases rather than in one loop which attempts to
724 handle all three cases. This rewrite eliminates an issue where the last
725 frame of the stack cannot be freed, thus causing the memory range of a
726 new frame to approach the overflow point of the memory index type.
727 Since the overflow is logically treated as a
728 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
729 (SS_Allocate_Static): New routine. The routine factorizes the static
730 secondary stack-related code from the former SS_Allocate.
731
bd42db1f
SR
7322018-05-25 Sergey Rybin <rybin@adacore.com>
733
734 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
735 option for gnatelim.
736
6459a31f
ES
7372018-05-25 Ed Schonberg <schonberg@adacore.com>
738
739 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
740 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
741 is created when the proper body of the stub is analyzed.
742 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
743 is the proper body of a subunit, the cloned body must be inserted in
744 the declarative list that contains the stub.
745
320fbd1e
JS
7462018-05-25 Justin Squirek <squirek@adacore.com>
747
748 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
749 generate code for 6.5(8-10) so that we don't get an assertion error
750 when dealing with an incomplete return type.
751
29192f7b
AC
7522018-05-25 Arnaud Charlet <charlet@adacore.com>
753
754 * pprint.adb (Expression_Name): Strip too long expressions to avoid
755 carrying very large strings.
756
733a4a3d
PB
7572018-05-25 Patrick Bernardi <bernardi@adacore.com>
758
759 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
760 numbers.
761
8ad3525a
DR
7622018-05-25 Doug Rupp <rupp@adacore.com>
763
764 * tracebak.c (aarch64-linux): Implement.
765
f9a0fd0b
JS
7662018-05-25 Justin Squirek <squirek@adacore.com>
767
768 * sem_ch8.adb: Minor reformatting.
769
308ac7f4
PT
7702018-05-25 Piotr Trojanek <trojanek@adacore.com>
771
772 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
773 assertions.
774
9ea43db6
HK
7752018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
776
777 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
778 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
779 Minor reformatting.
780
41610f15
ES
7812018-05-25 Ed Schonberg <schonberg@adacore.com>
782
783 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
784 Validate_Derived_Type_Instance, to verify that all interfaces
785 implemented by the formal type are also implemented by the actual. The
786 verification is complicated when an interface of the formal is declared
787 in a generic unit and the actual is declared in an instance of it.
788 There is currently no mechanism to relate an interface declared within
789 a generic to the corresponding interface in an instance, so we must
790 traverse the list of interfaces of the actual, looking for a name
791 match, and verifying that that interface is declared in an instance.
792
9da8032d
PT
7932018-05-25 Piotr Trojanek <trojanek@adacore.com>
794
795 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
796 assertions; replace function versions of Next_Formal/Next_Actual with
797 their procedural versions (which are more concise).
798
5865218e
DR
7992018-05-25 Doug Rupp <rupp@adacore.com>
800
801 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
802 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
803 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
804 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
805 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
806 (Relative_Timed_Wait): Remove.
807 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
808 for incremental looping. Remove references to Rel_Time and
809 Relative_Timed_Wait.
810 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
811 (Timed_Delay): Make separate.
812 * libgnat/s-optide.adb: New separate procedure.
813 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
814 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
815 (Max_System_Delay): New constant.
816
a036d1de
ES
8172018-05-25 Ed Schonberg <schonberg@adacore.com>
818
819 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
820 for a formal derived type implements all the interfaces declared for
821 the formal.
822
1f233db3
YM
8232018-05-25 Yannick Moy <moy@adacore.com>
824
825 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
826 and GNATprove modes when applicable policy is Ignore.
827
0d0cd281
EB
8282018-05-25 Eric Botcazou <ebotcazou@adacore.com>
829
830 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
831 boolean type with convention C.
832 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
833 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
834 FOREIGN and use it throughout the function.
835 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
836 convention.
837 <E_Enumeration_Subtype>: Likewise for subtypes.
838 <E_Record_Type>: Force the size of a storage unit on empty classes.
839 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
840 boolean types with precision 1 if the size is the expected one.
841
28e33720
AC
8422018-05-25 Arnaud Charlet <charlet@adacore.com>
843
844 * pprint.adb (Expression_Name): Do not print non ASCII characters.
845
5a7aacd1
BD
8462018-05-25 Bob Duff <duff@adacore.com>
847
848 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
849 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
850
6b5eb7d7
BD
8512018-05-25 Bob Duff <duff@adacore.com>
852
853 * sem_util.ads: Minor comment fix.
854
5fe0b8c3
ES
8552018-05-25 Ed Schonberg <schonberg@adacore.com>
856
857 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
858 prefixes of array attributes, to prefixes that are entity names whose
859 type is constrained.
860 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
861 subprogram, as itype created for loops in pre/postcondition may appear
862 in loops at the library level.
863
8218cfde
ES
8642018-05-25 Ed Schonberg <schonberg@adacore.com>
865
866 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
867 declaration is inserted into the tree and analyzed at that point, so
868 should not be reinserted when the body is constructed. Inside a
869 generic, ensure that the body is not inserted twice in the tree.
870
56ce7e4a
YM
8712018-05-25 Yannick Moy <moy@adacore.com>
872
873 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
874 declarations not coming from source.
875
5c737a56
FR
8762018-05-25 Fedor Rybin <frybin@adacore.com>
877
878 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
879 --copy-environment for gnattest.
880
672dfc39
PT
8812018-05-24 Piotr Trojanek <trojanek@adacore.com>
882
883 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
884 variable.
885 * sem_prag.adb (Get_Base_Subprogram): Same as above.
886
63a329f8
EB
8872018-05-24 Eric Botcazou <ebotcazou@adacore.com>
888
889 * fe.h (Set_Normalized_First_Bit): Declare.
890 (Set_Normalized_Position): Likewise.
891 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
892 variable position. Fix minor spacing issue.
893 * gcc-interface/decl.c (annotate_rep): If a field has a variable
894 offset, compute the normalized position and annotate it in addition to
895 the bit offset.
896
736e16ef
EB
8972018-05-24 Eric Botcazou <ebotcazou@adacore.com>
898
899 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
900 Constify and rename variables. Fix formatting.
901 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
902 <N_Raise_Statement>: Likewise.
903
01243764
JM
9042018-05-24 Javier Miranda <miranda@adacore.com>
905
906 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
907 body of a variant record equality renaming.
908 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
909 implementation of Build_Body_For_Renaming.
910 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
911 function that factorizes the functionality needed by
912 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
913 of a variant record equality subprogram.
914 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
915 (Build_Variant_Record_Equality): New local procedure of
916 Expand_Freeze_Record_Type containing all the code specific for freezing
917 the record type that cannot be place in the new library level function.
918
7037d2bb
ES
9192018-05-24 Ed Schonberg <schonberg@adacore.com>
920
921 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
922 in_parameters, used when unesting subprograms for LLVM, to indicate
923 that a generated parameter carries the activation record from the
924 enclosing subprogram.
925 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
926 whose bounds may contain up-level references that need to be added to
927 an activation recoord.
928 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
929
d72ba19f
YM
9302018-05-24 Yannick Moy <moy@adacore.com>
931
932 * pprint.adb (Expression_Image): Improve the printing of expressions,
933 by taking more cases into account, in particular qualified expressions
934 and aggregates. Also count more the number of parentheses to close
935 after the expression.
936
24e95966
JM
9372018-05-24 Javier Miranda <miranda@adacore.com>
938
939 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
940 check for renamed discriminants.
941 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
942 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
943 Is_Visible_Component pass the associated selector node to allow
944 checking renamed discriminants on untagged types.
945
5a5925ee
ES
9462018-05-24 Ed Schonberg <schonberg@adacore.com>
947
948 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
949 link to a use_type clause if this would cause an infinite loop in the
950 machinery that detects redundant use clauses. This may happen when the
951 redundant clauses appear in the context of a child unit and the context
952 of its parent.
953
e15bbd5f
PT
9542018-05-24 Piotr Trojanek <trojanek@adacore.com>
955
956 * sinfo.ads: Fix grammar in comment.
957
3f6d1daa
JS
9582018-05-24 Justin Squirek <squirek@adacore.com>
959
960 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
961 and manage doubly-linked entity chain.
962 (Nested_Scenarios): Removed entity field used for optimization during
963 elaboration to make room for the new field Prev_Entity.
964 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
965 and Set_Prev_Entity as well as centralize changes to the entity chain.
966 (Predicated_Parent): Modified to use Node38.
967 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
968 types.
969 (Remove_Entity): Moved from sem_util.
970 (Set_Nested_Scenarios): Deleted.
971 (Set_Predicated_Parent): Modified to use Node38.
972 (Set_Prev_Entity): Added to set Prev_Entity field.
973 (Set_Validated_Object): Modified to use Node38.
974 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
975 action is required.
976 (Validated_Object): Modified to use Node38.
977 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
978 predicated parent cases.
979 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
980 * sem_ch3.adb (Process_Subtype): Add guard to protect against
981 inappropriate marking of Predicated_Parent to non-itype subtypes.
982 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
983 (Copy_And_Swap): Add setting of Prev_Entity.
984 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
985 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
986 w/ Link_Entities.
987 (New_Overloaded_Entity): Remove block created to search for previous
988 entities in the entity chain with relevant calls to Prev_Entity as well
989 as replace duplicated code from Remove_Entity_And_Homonym with a call
990 to that subprogram.
991 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
992 Link_Entities.
993 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
994 initial subprogram declarations related to Nested_Scenarios.
995 (Process_Nested_Scenarios): Deleted.
996 (Save_Scenario): Deleted.
997 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
998 node space in the entity tree.
999 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
1000 (Remove_Entity_And_Homonym): Added to separate functionality of
1001 Remove_Entity from the homonym chain directly.
1002 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
1003 w/ Link_Entities and Unlink_Next_Entity.
1004 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
1005 Link_Entities.
1006 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
1007 Set_Next_Entity w/ Link_Entities.
1008 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
1009 Link_Entities and Unlink_Next_Entity.
1010 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
1011 call to Remove_Entity with its new incarnation.
1012 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
1013 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
1014 Link_Entities.
1015
dc59bed2
HK
10162018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1017
1018 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
1019 Install_Limited_Withed_Unit.
1020 (Expand_With_Clause): Update the call to Install_Withed_Unit.
1021 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
1022 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
1023 (Install_Limited_Context_Clauses): Update the calls to
1024 Install_Limited_Withed_Unit.
1025 (Install_Limited_Withed_Unit): Renamed to better illustrate its
1026 purpose.
1027 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
1028 and Install_Limited_Withed_Unit.
1029 (Install_With_Clause): Uninstall a limited with clause if a [private]
1030 with clause is given for the same package.
1031 (Install_Withed_Unit): Renamed to better illustrate its purpose.
1032 (Remove_Limited_With_Unit): New routine.
1033
45c6d784
EB
10342018-05-24 Eric Botcazou <ebotcazou@adacore.com>
1035
1036 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
1037 (__gnat_personality_seh0): Adjust and beef up comments, and
1038 fix formatting throughout.
1039 (__gnat_adjust_context): Deal minimally with version 2.
1040 * seh_init.c (__gnat_map_SEH): Fix formatting.
1041 (_gnat_SEH_error_handler): Adjust comments.
1042 (__gnat_install_SEH_handler): Fix formatting.
1043
b6784d90
HK
10442018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1045
1046 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
1047
861e589e
ES
10482018-05-24 Ed Schonberg <schonberg@adacore.com>
1049
1050 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
1051 aggregate with static bounds when named associations cover all index
1052 positions and the others clause is redundant.
1053
0347c01b
RA
10542018-05-24 Raphael Amiard <amiard@adacore.com>
1055
1056 * libgnat/a-cohama.ads: Add documentation.
1057
8f1b88f8
RA
10582018-05-24 Raphael Amiard <amiard@adacore.com>
1059
1060 * libgnat/a-convec.ads: Add documentation.
1061
c06a59be
JS
10622018-05-24 Justin Squirek <squirek@adacore.com>
1063
1064 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
1065 expansion for limited tagged types when the node to be expanded is a
1066 raise expression due to it not representing a valid object.
1067 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
1068 message regarding assignments to limited types to ignore genereated
1069 code.
1070
fa3717c1
HK
10712018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1072
1073 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
1074 Ghost-related attributes of the class-wide subtype because the copy
1075 clobbers them.
1076
36e7d49f
JS
10772018-05-24 Justin Squirek <squirek@adacore.com>
1078
1079 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
1080 marking use clauses as effective when the reference appears within
1081 generated code.
1082
37a104ea
CC
10832018-05-24 Cyrille Comar <comar@adacore.com>
1084
1085 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
1086 * gnat_rm.texi: Regenerate.
1087
9a975bfc
BD
10882018-05-24 Bob Duff <duff@adacore.com>
1089
1090 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
1091 for build-in-place functions with a caller-unknown-size result.
1092 (Create_Finalizer): For build-in-place functions with a
1093 caller-unknown-size result, check at run time whether we need to
1094 release the secondary stack.
1095
d2bb0bbf
HK
10962018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1097
1098 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
1099 generated incomplete type.
1100
9057bd6a
HK
11012018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1102
1103 * expander.adb (Expand): Update the save and restore of the Ghost
1104 region.
1105 * exp_ch3.adb (Freeze_Type): Likewise.
1106 * exp_disp.adb (Make_DT): Likewise.
1107 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
1108 (Build_DIC_Procedure_Declaration): Likewise.
1109 (Build_Invariant_Procedure_Body): Likewise.
1110 (Build_Invariant_Procedure_Declaration): Likewise.
1111 (Make_Predicate_Call): Likewise.
1112 * freeze.adb (Add_To_Result): Insert the freeze action of a living
1113 entity prior to the start of the enclosing ignored Ghost region.
1114 (Freeze_Entity): Update the save and restore of the Ghost region.
1115 * ghost.adb (Install_Ghost_Mode): Reimplemented.
1116 (Install_Ghost_Region): New routine.
1117 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
1118 (Mark_And_Set_Ghost_Body): Likewise.
1119 (Mark_And_Set_Ghost_Completion): Likewise.
1120 (Mark_And_Set_Ghost_Declaration): Likewise.
1121 (Mark_And_Set_Ghost_Instantiation): Likewise.
1122 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
1123 (Name_To_Ghost_Mode): New routine.
1124 (Restore_Ghost_Region): New routine.
1125 * ghost.ads (Install_Ghost_Region): New routine.
1126 (Restore_Ghost_Region): New routine.
1127 * opt.ads: Add new global variable Ignored_Ghost_Region.
1128 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
1129 region. Install a clean region.
1130 * sem.adb (Analyze): Likewise.
1131 (Do_Analyze): Likewise.
1132 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
1133 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
1134 capture the ultimate alias of the current primitive.
1135 (Process_Full_View): Update the save and restore of the Ghost region.
1136 Do not inherit DIC and invariant procedures.
1137 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
1138 Ghost region.
1139 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
1140 (Analyze_Subprogram_Body_Helper): Likewise.
1141 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
1142 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
1143 (Analyze_Subprogram_Instantiation): Likewise.
1144 (Instantiate_Package_Body): Likewise.
1145 (Instantiate_Subprogram_Body): Likewise.
1146 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
1147 (Build_Predicate_Function_Declaration): Likewise.
1148 * sem_disp.adb
1149 (Add_Dispatching_Operation): Do not consider DIC and invariant
1150 procedures.
1151 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
1152 a dispatching subprogram.
1153 (Check_Operation_From_Private_View): Likewise.
1154 (Override_Dispatching_Operation): Likewise.
1155 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
1156 and restore of the Ghost region.
1157 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
1158 (Analyze_Pragma): Update the save and restore of the Ghost region.
1159 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
1160 * sem_util.adb (Is_Suitable_Primitive): New routine.
1161 * sem_util.ads (Is_Suitable_Primitive): New routine.
1162 * sinfo.ads: Update the section of Ghost regions.
1163
883ccddf
PT
11642018-05-24 Piotr Trojanek <trojanek@adacore.com>
1165
1166 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
1167 Change "condition" to "case guard" after renaming in the contract
1168 grammar.
1169 * gnat_rm.texi: Regenerate.
1170
ebea257e
HK
11712018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1172
1173 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
1174 construct with discrete choices no longer contains a subtype with
1175 predicates since the expansion already handled this case.
1176
d72099eb
HK
11772018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1178
1179 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
1180 conversion to the return type to avoid a side effect where an imported
1181 relocated function generates a new anonymous access type, whose
1182 accessibility level does not agree with with that of the wrapper.
1183
0b5252ac
JM
11842018-05-24 Javier Miranda <miranda@adacore.com>
1185
1186 * sem_util.adb (Abstract_Interface_List): Add missing support for
1187 private types whose full view is a synchronized type.
1188 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
1189 derivation of a private type parent type is a task type with
1190 discriminants as gigi does not use such type directly.
1191
7dcac7d1
HK
11922018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
1193
1194 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
1195 variable marker when the reference appears in the formal part of a
1196 compilation unit instance because there is no place to insert it.
1197 (In_Compilation_Instance_Formal_Part): New routine.
1198
443ee956
PT
11992018-05-24 Piotr Trojanek <trojanek@adacore.com>
1200
1201 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
1202 configuration parameter.
1203
3cac09db
DR
12042018-05-24 Doug Rupp <rupp@adacore.com>
1205
1206 * argv-lynxos178-raven-cert.c: New file.
1207 * libgnat/system-lynxos178-x86.ads: New file.
1208
162ea0d3
HK
12092018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1210
1211 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
1212 Minor reformattings.
1213
cd742f4a
PO
12142018-05-23 Pascal Obry <obry@adacore.com>
1215
1216 * adaint.c (win32_wait): Properly free the handle/pid lists when
1217 WaitForMultipleObjects fails (return WAIT_FAILED).
1218
c2d2963d
PO
12192018-05-23 Pascal Obry <obry@adacore.com>
1220
1221 * adaint.c (win32_wait): Add missing parentheses.
1222
7f4b58c2
HK
12232018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1224
1225 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
1226 (Expand_N_Object_Declaration): Do not check for a large modular array
1227 here.
1228 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
1229 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
1230 array.
1231 * sem_ch3.adb: Minor reformatting.
1232
ffdd5248
ES
12332018-05-23 Ed Schonberg <schonberg@adacore.com>
1234
1235 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
1236 retrieval of the applicable predicate function to an itype created for
1237 a constrained array component.
1238 * einfo.adb: Subprograms for Predicated_Parent.
1239 (Predicate_Function): Use new attribute.
1240 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
1241 available for a subtype, retrieve it from the base type, which may have
1242 been frozen after the subtype declaration and not captured by the
1243 subtype declaration.
1244 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
1245 legal within a generated initiqlization procedure, as may happen with a
1246 predicate check on a component, when the predicate function applies to
1247 the base type of the component.
1248 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
1249 predicates for subtype declarations and for subtype indications in
1250 other contexts.
1251 (Process_Subtype): Likewise. Handle properly the case of a private type
1252 with unknown discriminants whose full view is an unconstrained array.
1253 Use Predicated_Parent to indicate source of predicate function on an
1254 itype whose parent is itself an itype.
1255 (Complete_Private_Subtype): If the private view has unknown
1256 discriminants and the full view is an unconstrained array, set base
1257 type of completion to the full view of parent.
1258 (Inherit_Predicate_Flags): Prevent double assignment of predicate
1259 function and flags.
1260 (Build_Subtype): For a constrained array component, propagate predicate
1261 information from original component type declaration.
1262
39a4daf9
BY
12632018-05-23 Boris Yakobowski <yakobowski@adacore.com>
1264
1265 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
1266
bc3fb397
AC
12672018-05-23 Arnaud Charlet <charlet@adacore.com>
1268
1269 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
1270 Hi.
1271 * sem_elab.adb: Make "out" parameters instead of "in out" when
1272 relevant.
1273
b77c24b8
BD
12742018-05-23 Bob Duff <duff@adacore.com>
1275
1276 * gnatbind.adb (List_Applicable_Restrictions): Add
1277 No_Implementation_Restrictions to the list of restrictions not to list.
1278 Remove double negative "not No_Restriction_List". Comment the
1279 commentary that is output, so it won't cause errors if used directly in
1280 a gnat.adc.
1281
b30f86de
ES
12822018-05-23 Ed Schonberg <schonberg@adacore.com>
1283
1284 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
1285 class-wide precondition on a type extension when ancestor does not have
1286 a class-wide precondition. Previously the compiler accepted such a
1287 precondition when the ancestor had a class-wide postcondition.
1288
026733d8
JM
12892018-05-23 Javier Miranda <miranda@adacore.com>
1290
1291 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
1292 the warning on occurrences of this attribute whose evaluation is always
1293 true (since that subprogram aborts processing the attribute). In
1294 addition, replace the node by its boolean result 'True' (required
1295 because the backend has no knowledge of this attribute).
1296
aeaa0347
BD
12972018-05-23 Bob Duff <duff@adacore.com>
1298
1299 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
1300 code in question is not reachable in the case where Count_Type'Last is
1301 out of range.
1302
5e1c231e
YM
13032018-05-23 Yannick Moy <moy@adacore.com>
1304
1305 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
1306 local pragma Warnings Off without On.
1307 * gnat_rm.texi: Regenerate.
1308
b682fcf0
OH
13092018-05-23 Olivier Hainque <hainque@adacore.com>
1310
1311 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
1312 * libgnat/g-excact.adb: Implement.
1313
ac450fb2
ES
13142018-05-23 Ed Schonberg <schonberg@adacore.com>
1315
1316 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
1317 is present, verify its legality when the domain of iteration is a
1318 GNAT-specific formal container, as is already done for arrays and
1319 predefined containers.
1320
fd82aeff
YM
13212018-05-23 Yannick Moy <moy@adacore.com>
1322
1323 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
1324 declaration, which was not taken into account.
1325
0c9849e1
HK
13262018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1327
1328 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
1329 synchronized suspension.
1330 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
1331 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
1332 Wait_For_Release.
1333 * sem_elab.adb: Document switch -gnatd_s.
1334 (In_Task_Body): New routine.
1335 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
1336 body when the current construct denotes a synchronous suspension call,
1337 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
1338 is in effect.
1339 (Is_Synchronous_Suspension_Call): New routine.
1340 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
1341 -gnatd_s.
1342
51ab2a39
JM
13432018-05-23 Javier Miranda <miranda@adacore.com>
1344
1345 * exp_disp.adb (Make_DT): Restrict the initialization of
1346 External_Tag and Expanded_Name to an empty string to the case where
1347 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
1348 restricted runtimes are compiled with pragma Discard_Names.
1349 * doc/gnat_rm/implementation_defined_pragmas.rst,
1350 doc/gnat_rm/implementation_defined_characteristics.rst: Add
1351 documentation.
1352 * gnat_rm.texi: Regenerate.
1353
6734617c
MM
13542018-05-23 Maroua Maalej <maalej@adacore.com>
1355
1356 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
1357
a0fa5497
ES
13582018-05-23 Ed Schonberg <schonberg@adacore.com>
1359
1360 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
1361 iteration of an Ada2012 loop is performed to determine the type of the
1362 domain, but full analysis is performed once the loop is rewritten as a
1363 while-loop during expansion. The pre-analysis suppresses expansion; it
1364 must also suppress the generation of freeze nodes, which may otherwise
1365 appear in the wrong scope before rewritting.
1366
a0f3668c
HK
13672018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1368
1369 * sem_elab.adb: Update the section on suppressing elaboration warnings.
1370
48688534
HK
13712018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1372
1373 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
1374 Is_Elaboration_Target.
1375 (Is_Elaboration_Target): New routine.
1376 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
1377 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
1378 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
1379 Is_Elaboration_Target.
1380 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
1381 with occurrences in nodes.
1382 (Is_Elaboration_Target): New routine.
1383 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
1384 elaboration target is subject to pragma Warnings (Off, ...).
1385
6e6e00ff
EB
13862018-05-23 Eric Botcazou <ebotcazou@adacore.com>
1387
1388 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
1389
162ed06f
HK
13902018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1391
1392 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
1393 (Is_Elaboration_Warnings_OK_Id): New routine.
1394 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
1395 (Write_Entity_Flags): Output Flag304.
1396 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
1397 occurrences in entities.
1398 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
1399 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
1400 Inline.
1401 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
1402 elaboration warnings.
1403 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
1404 elaboration warnings.
1405 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
1406 state of elaboration warnings.
1407 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
1408 warnings.
1409 (Analyze_Subprogram_Declaration): Capture the state of elaboration
1410 warnings.
1411 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
1412 elaboration warnings.
1413 (Analyze_Single_Task_Declaration): Capture the state of elaboration
1414 warnings.
1415 (Analyze_Task_Type_Declaration): Capture the state of elaboration
1416 warnings.
1417 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
1418 of elaboration warnings.
1419 (Analyze_Generic_Subprogram_Declaration): Capture the state of
1420 elaboration warnings.
1421 * sem_elab.adb: Add a section on suppressing elaboration warnings.
1422 Type Processing_Attributes includes component Suppress_Warnings
1423 intended to suppress any elaboration warnings along a path in the
1424 graph. Update Initial_State to include a value for this component.
1425 Types Target_Attributes and Task_Attriutes include component
1426 Elab_Warnings_OK to indicate whether the target or task has elaboration
1427 warnings enabled. component Elab_Warnings_OK.
1428 (Build_Access_Marker): Propagate attribute
1429 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
1430 call marker.
1431 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
1432 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
1433 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
1434 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
1435 when already in this mode or when the attribute or target have warnings
1436 suppressed.
1437 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
1438 if warnings are suppressed.
1439 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
1440 when already in this mode, or the target or call have warnings
1441 suppressed.
1442 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
1443 warnings are suppressed.
1444 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
1445 warnings are suppressed.
1446 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
1447 warnings when already in this mode or when the instantiation has
1448 warnings suppressed.
1449 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
1450 diagnostics if warnings are suppressed.
1451 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
1452 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1453 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
1454 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
1455 (Process_Task_Object): Suppress further elaboration warnings when
1456 already in this mode, or when the object, activation call, or task type
1457 have warnings suppressed. Update the processing state to indicate that
1458 the path goes through a task body.
1459 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
1460 references.
1461 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
1462 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
1463 attribute references.
1464
53b30c73
PT
14652018-05-23 Piotr Trojanek <trojanek@adacore.com>
1466
1467 * einfo.ads: Minor reformatting.
1468
728fedc2
ES
14692018-05-23 Ed Schonberg <schonberg@adacore.com>
1470
1471 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
1472 anonymous_access_to_ subprogram formal, apply a conversion to force an
1473 accsssibility check that will fail statically, enforcing 3.10.2 (13).
1474
87843c83
DM
14752018-05-23 Daniel Mercier <mercier@adacore.com>
1476
1477 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
1478
32677654
BD
14792018-05-23 Bob Duff <duff@adacore.com>
1480
1481 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
1482 aggregates in addition to build-in-place calls.
1483
95872381
BD
14842018-05-23 Bob Duff <duff@adacore.com>
1485
1486 * einfo.ads: Minor reformatting.
1487 * sem_ch3.adb: Likewise.
1488 * sinfo.ads: Likewise.
1489
40016fa7
HK
14902018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1491
1492 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
1493 initialization when the component type has predicates.
1494 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
1495 allocation when the component type has predicates.
1496
3d581777
HK
14972018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
1498
1499 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
1500 Minor reformatting.
1501
3f89eb7f
JS
15022018-05-22 Justin Squirek <squirek@adacore.com>
1503
1504 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
1505 original function spec into the generated function spec due to
1506 expansion of expression functions during analysis.
1507 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
1508 references from the body to the subprogram spec in the case of
1509 expression functions because of inconsistances related to having a
1510 generated body.
1511 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
1512 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
1513 * libgnarl/s-osinte__qnx.adb: Likewise.
1514 * libgnarl/s-osinte__qnx.ads: Likewise.
1515
143a4acd
DR
15162018-05-22 Doug Rupp <rupp@adacore.com>
1517
1518 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
1519 AArch64.
1520
f6904af0
OH
15212018-05-22 Olivier Hainque <hainque@adacore.com>
1522
1523 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
1524 Expect an Exception_Occurence object, not an Access.
1525 (Complete_And_Propagate_Occurrence): Adjust accordingly.
1526 (Raise_From_Signal_Handler): Likewise.
1527 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
1528 available in the provided occurrence object, just re-propagate the
1529 latter as a bare "raise;" would do.
1530 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
1531 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
1532 to null, to mark that the occurrence we're crafting from the stream
1533 contents is not being propagated (yet).
1534
02db8169
HK
15352018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1536
1537 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
1538 code for a transient component in line with the rest of the
1539 initialization code, rather than before the aggregate. This ensures
1540 that the component has proper visibility of the discriminants.
1541
9820b389
JL
15422018-05-22 Jerome Lambourg <lambourg@adacore.com>
1543
1544 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
1545 number of CPUs.
1546
817659c5
JL
15472018-05-22 Jerome Lambourg <lambourg@adacore.com>
1548
1549 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
1550
529749b9
HK
15512018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1552
1553 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
1554 conversions before extracting the value of the expression.
1555 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
1556 initialization of an array of scalars.
1557 (Get_Simple_Init_Val): Add processing for array types. Remove the
1558 processing of strings because this case is already handled by the array
1559 case.
1560 (Needs_Simple_Initialization): Moved to Sem_Util.
1561 (Simple_Init_Array_Type): New routine.
1562 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
1563 facilities from Sem_Util.
1564 (Simple_Initialization_OK): New routine.
1565 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
1566 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
1567 an array of scalars.
1568 * sem_prag.adb (Analyze_Float_Value): New routine.
1569 (Analyze_Integer_Value): New routine.
1570 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
1571 to handled the extended form of the pragma.
1572 (Analyze_Type_Value_Pair): New routine.
1573 * sem_util.adb: Add invalid value-related data structures.
1574 (Examine_Array_Bounds): New routine.
1575 (Has_Static_Array_Bounds): Reimplemented.
1576 (Has_Static_Non_Empty_Array_Bounds): New routine.
1577 (Invalid_Scalar_Value): New routine.
1578 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1579 (Set_Invalid_Scalar_Value): New routines.
1580 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
1581 (Invalid_Scalar_Value): New routine.
1582 (Needs_Simple_Initialization): Moved from Exp_Ch3.
1583 (Set_Invalid_Scalar_Value): New routines.
1584 * snames.ads-tmpl: Add names for the salar type families used by pragma
1585 Initialize_Scalars.
1586
b00baef5
JM
15872018-05-22 Javier Miranda <miranda@adacore.com>
1588
1589 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
1590 string when pragma No_Tagged_Streams is applicable to the tagged type,
1591 and initialize the Expanded_Name with an empty string when pragma
1592 Discard_Names is applicable to the tagged type.
1593
90fa8613
ES
15942018-05-22 Ed Schonberg <schonberg@adacore.com>
1595
1596 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
1597 formal subprogram is never subtype conformqnt, and thus cannot be the
1598 prefix of 'Access. Reject as well the attribute when applied to a
1599 renaming of a formal subprogram.
1600
3b26fe82
HK
16012018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1602
1603 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
1604 Needs_Simple_Initialization.
1605 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
1606 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
1607 profile and comment on usage.
1608 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
1609 Sloc of a value obtained from aspect Default_Value because this could
1610 potentially replicate large trees. The proper Sloc is now set in
1611 Get_Simple_Init_Val.
1612 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
1613 separate routines. Eliminate the use of global variables.
1614 (Init_Component): Update the call to Get_Simple_Init_Val.
1615 (Needs_Simple_Initialization): Update the parameter profile and all
1616 uses of T.
1617 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
1618 and set the proper Sloc.
1619 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
1620 comment on usage.
1621 (Needs_Simple_Initialization): Update the parameter profile.
1622
59ec5d9b
PB
16232018-05-22 Patrick Bernardi <bernardi@adacore.com>
1624
1625 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
1626 user tries to use a subtype indication as a discriminant constraint.
1627
801b4022
ES
16282018-05-22 Ed Schonberg <schonberg@adacore.com>
1629
1630 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
1631 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
1632 * par-ch4.adb: Remove parsing routines for reduction expressions.
1633 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
1634 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
1635 expressions.
1636
208ebca9
AC
16372018-05-22 Arnaud Charlet <charlet@adacore.com>
1638
1639 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
1640 Relaxed_RM_Semantics mode.
1641
b4914af8
AC
16422018-05-22 Arnaud Charlet <charlet@adacore.com>
1643
1644 * comperr.adb (Delete_SCIL_Files): Take into account
1645 N_Generic_Package_Renaming_Declaration.
1646
fbb53995
ES
16472018-05-22 Ed Schonberg <schonberg@adacore.com>
1648
1649 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
1650 private, use the full view if available, because it may include renamed
1651 discriminants whose values are stored in the corresponding
1652 Stored_Constraint.
1653
651822ae
ES
16542018-05-22 Ed Schonberg <schonberg@adacore.com>
1655
1656 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
1657 defined on packages that are actuals for formal packages, in order to
1658 set/reset the visibility of the formals of a formal package with given
1659 actuals, when there are subsequent uses of those formals in the
1660 enclosing generic, as required by RN 12.7 (10).
1661 * atree.ads, atree.adb: Add operations for Elist30.
1662 * atree.h: Add Elist30.
1663 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
1664 that are not defaulted and are thus not visible within the current
1665 instance.
1666 (Check_Formal_Packages): Reset visibility of formals of a formal
1667 package that are not defaulted, on exit from current instance.
1668
41ff70d9
HK
16692018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1670
1671 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
1672 non-'Result output appears in the output list of a function.
1673
f16cb8df
HK
16742018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1675
1676 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
1677 (Build_Record_VS_Func): Reimplemented.
1678 (Expand_N_Attribute): Reimplement the handling of attribute
1679 'Valid_Scalars.
1680 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
1681 attribute 'Valid_Scalars.
1682 * sem_util.adb (Scalar_Part_Present): Reimplemented.
1683 (Validated_View): New routine.
1684 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
1685 comment on usage.
1686 (Validated_View): New routine.
1687 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
1688 documentation of attribute 'Valid_Scalars.
1689 * gnat_rm.texi: Regenerate.
1690
6b3035ab
BD
16912018-05-22 Bob Duff <duff@adacore.com>
1692
1693 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
1694 the spec of a SAL_Interface package.
1695
85c73d63
ES
16962018-05-22 Ed Schonberg <schonberg@adacore.com>
1697
1698 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
1699 entity E within a generic unit, indicate that there are no remaining
1700 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
1701 entity E is not frozen yet but the aspects should not be reanalyzed at
1702 the freeze point, which may be outside of the generic and may not have
1703 the proper visibility.
1704
71483539
BD
17052018-05-22 Bob Duff <duff@adacore.com>
1706
1707 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
1708 the new --split-line-before-record, --indent-named-statements and
1709 --no-align-modes gnatpp switches.
1710
531351e8
ES
17112018-05-22 Ed Schonberg <schonberg@adacore.com>
1712
1713 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
1714 a second argument that is a constant of a given string value.
1715
9c629d61
DR
17162018-05-22 Doug Rupp <rupp@adacore.com>
1717
1718 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
1719
14141ce8
JL
17202018-05-22 Jerome Lambourg <lambourg@adacore.com>
1721
1722 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
1723
f2df0100
ES
17242018-05-22 Ed Schonberg <schonberg@adacore.com>
1725
1726 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
1727 delayed aspects, analyze them now, os that the representation of the
1728 type (size, bounds) can be computed and validated.
1729
b8bbe739
OH
17302018-05-22 Olivier Hainque <hainque@adacore.com>
1731
1732 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
1733 executable code section boundaries.
1734
92ea8dd2
JM
17352018-05-22 Javier Miranda <miranda@adacore.com>
1736
1737 * locales.c: New implementation for the Ada.Locales package.
1738 * libgnat/a-locale.ads: Remove comment indicating that this is not
1739 implemented.
1740 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
1741 that this is not implemented.
1742 * gnat_rm.texi: Regenerate.
1743
e5fc0179
HK
17442018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1745
1746 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
1747 reformattings.
1748
eaf51442
JS
17492018-05-22 Justin Squirek <squirek@adacore.com>
1750
1751 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
1752 (Freeze_Subprogram_Body, Install_Body): Modify calls to
1753 In_Same_Declarative_Part.
1754 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
1755 verify pragma declaration is within the same declarative list with
1756 corresponding error message.
1757 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
1758 sem_ch12.adb and generalized to be useful outside the scope of
1759 freezing.
1760
80f0c69c
HK
17612018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1762
1763 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
1764 categorization of the unit after processing the aspects in case one of
1765 its aspects is converted into a categorization pragma.
1766
f9e9ab63
ES
17672018-05-21 Ed Schonberg <schonberg@adacore.com>
1768
1769 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
1770 declaration with an explicit address clause and a type with default
1771 initialization, if the declaration carries an aspect
1772 Suppress_Initialization.
1773
dc3d037e 17742018-05-21 Daniel Mercier <mercier@adacore.com>
af5d8cb0
DM
1775
1776 * pprint.adb: Use mixed case for attribute names.
1777
dc3d037e 17782018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
e9d08fd7
HK
1779
1780 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
1781 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1782 (Analyze_Subprogram_Body_Helper): Rename the calls to
1783 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1784 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
1785 Analyze_Aspect_Specifications_On_Body_Or_Stub.
1786 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1787 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
1788 prior to analyzing its aspects.
1789 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
1790 stub prior to analyzing its aspects. Save and restore the configuration
1791 switches.
1792 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
1793 prior to analyzing its aspects.
1794 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1795 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1796 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1797 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1798 * sem_prag.adb: Code reformatting.
1799 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
1800
dc3d037e 18012018-05-21 Jerome Lambourg <lambourg@adacore.com>
f35b3e38
JL
1802
1803 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
1804 for QNX.
1805
dc3d037e 18062018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7a500fd7
HK
1807
1808 * exp_cg.adb: Remove with and use clause for Exp_Disp.
1809 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
1810 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1811 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1812 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1813 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1814 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1815 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1816 * exp_dist.adb: Remove with and use clause for Exp_Disp.
1817 * freeze.adb: Remove with and use clause for Exp_Disp.
1818 * sem_cat.adb: Remove with and use clause for Exp_Disp.
1819 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
1820 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
1821 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1822 primitives.
1823 * sem_util.adb: Remove with and use clause for Exp_Disp.
1824 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1825 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1826 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1827 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1828 Exp_Disp.
1829 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1830 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1831
dc3d037e 18322018-05-21 Ed Schonberg <schonberg@adacore.com>
516057d3
ES
1833
1834 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1835 type conversion whose expression has a limited view of a type.
1836
def6e435
ES
18372018-05-21 Ed Schonberg <schonberg@adacore.com>
1838
1839 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1840 explicit name for iterator loop, preserve that name in expanded
1841 construct, for possible use in exit statements.
1842
dc3d037e 18432018-05-21 Javier Miranda <miranda@adacore.com>
0d8b6803
JM
1844
1845 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1846 spec of a unit has Ada 2012 membership tests with multiple choices and
1847 the unit body is not compiled under Ada 2012 mode.
1848
dc3d037e 18492018-05-21 Doug Rupp <rupp@adacore.com>
92689021
DR
1850
1851 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1852 pregs.
1853 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1854 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1855
dc3d037e 18562018-05-21 Jose Ruiz <ruiz@adacore.com>
9e40de1d
JR
1857
1858 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1859 libgnarl/s-tassta.adb: Minor typo fixes
1860
12390626
ES
18612018-05-21 Ed Schonberg <schonberg@adacore.com>
1862
1863 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1864 indexed call originally in prefix forn is itself the prefix of a
1865 further call.
1866
dc3d037e 18672018-05-21 Piotr Trojanek <trojanek@adacore.com>
a2fcf1e0
PT
1868
1869 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1870 type.
1871 (Not_Null_Range): Same as above.
1872
dc3d037e 18732018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
663afa9f
HK
1874
1875 * exp_ch3.adb: Minor reformatting.
1876 * exp_ch6.adb: Likewise.
1877 * freeze.adb: Likewise.
1878 * inline.adb: Likewise.
1879 * sem_util.adb: Likewise.
1880
dc3d037e 18812018-05-21 Yannick Moy <moy@adacore.com>
031936bc
YM
1882
1883 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1884 conversion instead of an unchecked type conversion when inlining a
1885 return statement, unless type qualification is required (for character
1886 and string literal) or no check can result from the conversion (for
1887 access types).
1888 * opt.ads: Update comment.
1889
dc3d037e 18902018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7255f3c3
HK
1891
1892 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1893 model of the compilation unit spec, if any.
1894 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1895 model of the compilation unit spec, if any.
1896 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1897 parent compilation unit spec, if any.
1898 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1899 model of the main unit.
1900 (Is_Same_Unit): The routine now uses Unit_Entity.
1901 (Is_Subunit): Removed.
1902 (Normalize_Unit): Removed.
1903 (Unit_Entity): New routine.
1904 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1905 Elaboration_Checks. The analysis now ensures that the pragma appears at
1906 the configuration level, and on the initial declaration of a unit.
1907 Other placements are either flagged as illegal, or ignored.
1908 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1909 (Ignore_Elaboration_Checks_Pragma): New routine.
1910 * sem_util.adb (Install_Elaboration_Model): New routine.
1911 * sem_util.ads (Install_Elaboration_Model): New routine.
1912 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1913 documentation of pragma Elaboration_Checks.
1914 * gnat_rm.texi: Regenerate.
1915
dc3d037e 19162018-05-21 Olivier Hainque <hainque@adacore.com>
18c7a4eb
OH
1917
1918 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1919 of empty string when argv[0] couldn't be found on PATH.
1920 (Enable_Cache): Raise Program_Error instead of attempting a null
1921 pointer dereference when the Exec_Module initialization failed.
1922
dc3d037e 19232018-05-21 Piotr Trojanek <trojanek@adacore.com>
bbb99006
PT
1924
1925 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1926 * libgnarl/a-taside.ads (Tasking_State): Likewise.
1927 * libgnat/a-calend.ads (Clock_Time): Likewise.
1928
dc3d037e 19292018-05-21 Yannick Moy <moy@adacore.com>
e3822b0a
YM
1930
1931 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1932 call notation in inlined call in GNATprove mode.
1933
bcc093dc
HK
19342018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1935
1936 * einfo.adb (Is_External_State): An abstract state is also external
1937 when it is declared with option "synchronous".
1938 * einfo.ads: Update the documentation of synthesized attribute
1939 Is_External_State.
1940 * sem_util.adb (Find_Simple_Properties): New routine.
1941 (Is_Enabled_External_Property): New routine.
1942 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1943 External have precedence over option Synchronous when determining
1944 whether a property is in effect.
1945
dc3d037e 19462018-05-21 Yannick Moy <moy@adacore.com>
fe44c442
YM
1947
1948 * sem_eval.adb (Static_Length): Take into account case of variable of
1949 subtype string literal.
1950
dc3d037e 19512018-05-21 Olivier Hainque <hainque@adacore.com>
c77384a4
OH
1952
1953 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1954 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1955 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1956 component name.
1957 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1958 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1959 change.
1960
dc3d037e 19612018-05-21 Olivier Hainque <hainque@adacore.com>
0f090200
OH
1962
1963 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1964 Address, and type of Low, High to Storage_Offset.
1965 (Low): Rename as Low_Address and convey that the return value is a
1966 runtime reference accounting for a load address.
1967 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1968 address/offset type changes.
1969 (Aranges_Lookup): Likewise.
1970 (Symbolic_Address): Likewise.
1971 (Symbolic_Traceback): Likewise.
1972 (Dump_Cache): Likewise.
1973 (Is_Inside): Likewise.
1974 (Open): Likewise.
1975 (Set_Load_Address): Likewise.
1976 (Low_Address): Likewise, and account for C.Load_Address.
1977 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1978 (Multi_Module_Symbolic_Traceback): Compare address in traceback
1979 with module Low_Address instead of Low.
1980
dc3d037e 19812018-05-21 Olivier Hainque <hainque@adacore.com>
b029cc6e
OH
1982
1983 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1984 Load_Address.
1985 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1986 (Set_Load_Address): Likewise.
1987 (Symbolic_Traceback): Likewise.
1988
dc3d037e 19892018-05-21 Olivier Hainque <hainque@adacore.com>
08f8a716
OH
1990
1991 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1992 Load_Address argument and pass it down to Init_Module.
1993 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1994 lm.l_addr as the Load_Address to Add_Module_To_Cache.
1995
dc3d037e 19962018-05-21 Piotr Trojanek <trojanek@adacore.com>
689751d2
PT
1997
1998 * einfo.adb (Has_Discriminants): Stronger assertion.
1999 (Set_Has_Discriminants): Stronger assertion.
2000 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
2001 the stronger assertion on Has_Discriminant.
2002 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
2003 * sem_util.adb (New_Copy_Tree): Same as above.
2004 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
2005 Has_Discriminant on non-type entities that might happen when the
2006 compiled code has errors.
2007 * sem_ch3.adb (Derived_Type_Declaration): Only call
2008 Set_Has_Discriminant on type entities.
2009
dc3d037e 20102018-05-21 Arnaud Charlet <charlet@adacore.com>
3ae9d953
AC
2011
2012 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
2013 code generation.
2014
dc3d037e 20152018-05-21 Piotr Trojanek <trojanek@adacore.com>
0c06611c
PT
2016
2017 * lib.ads: Fix typo in enumeration in comment.
2018
dc3d037e 20192018-05-21 Ed Schonberg <schonberg@adacore.com>
8b55e70d
ES
2020
2021 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
2022 attribute reference is legal within a generic unit when the prefix is a
2023 formal private type.
2024
dc3d037e 20252018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
66c0fa2c
HK
2026
2027 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
2028 delegate the secondary stack management when there is no suitable
2029 transient context, and the transient scope was intended to manage the
2030 secondary stack because this causes premature reclamation. Change the
2031 transient scope creation logic by special casing assignment statements
2032 of controlled components for type initialization procedures.
2033 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
2034 the comment on usage.
2035 (Find_Transient_Context): Change the initinte loop into a while loop.
2036 Iterations schemes and iterator specifications are not valid transient
2037 contexts because they rely on special processing. Assignment statements
2038 are now treated as a normal transient context, special cases are
2039 handled by the caller. Add special processing for pragma Check.
2040 (Is_OK_Construct): Removed. Its functionality has been merged in
2041 routine Find_Transient_Context.
2042 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
2043 retrieve the subprogram being invoked. Use a more accurate predicate
2044 (Requires_Transient_Scope) to determine that the function will emply
2045 the secondary stack.
2046
dc3d037e 20472018-05-21 Piotr Trojanek <trojanek@adacore.com>
8016e567
PT
2048
2049 * ada_get_targ.adb: Fix subprogram body headers.
2050 * adabkend.adb: Likewise.
2051 * checks.adb: Likewise.
2052 * exp_ch3.adb: Likewise.
2053 * exp_ch5.adb: Likewise.
2054 * exp_ch9.adb: Likewise.
2055 * exp_dist.adb: Likewise.
2056 * exp_tss.adb: Likewise.
2057 * inline.adb: Likewise.
2058 * lib-writ.adb: Likewise.
2059 * lib-xref-spark_specific.adb: Likewise.
2060 * libgnarl/s-osinte__darwin.adb: Likewise.
2061 * libgnarl/s-stusta.adb: Likewise.
2062 * libgnarl/s-taprop__solaris.adb: Likewise.
2063 * libgnarl/s-tposen.adb: Likewise.
2064 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
2065 * libgnarl/s-vxwext__kernel.adb: Likewise.
2066 * libgnat/a-btgbso.adb: Likewise.
2067 * libgnat/a-cfdlli.adb: Likewise.
2068 * libgnat/a-cfhama.adb: Likewise.
2069 * libgnat/a-cfinve.adb: Likewise.
2070 * libgnat/a-cimutr.adb: Likewise.
2071 * libgnat/a-coboho.adb: Likewise.
2072 * libgnat/a-cofove.adb: Likewise.
2073 * libgnat/a-cofuve.adb: Likewise.
2074 * libgnat/a-comutr.adb: Likewise.
2075 * libgnat/a-exexda.adb: Likewise.
2076 * libgnat/a-tags.adb: Likewise.
2077 * libgnat/a-tideau.adb: Likewise.
2078 * libgnat/a-wtdeau.adb: Likewise.
2079 * libgnat/a-ztdeau.adb: Likewise.
2080 * libgnat/g-alleve.adb: Likewise.
2081 * libgnat/s-excdeb.adb: Likewise.
2082 * libgnat/s-parint.adb: Likewise.
2083 * libgnat/s-shasto.adb: Likewise.
2084 * libgnat/s-traceb__hpux.adb: Likewise.
2085 * prepcomp.adb: Likewise.
2086 * sem_ch4.adb: Likewise.
2087 * sem_ch6.adb: Likewise.
2088 * sem_dist.adb: Likewise.
2089 * sem_prag.adb: Likewise.
2090 * sem_util.adb: Likewise.
2091 * sinfo.adb: Likewise.
2092 * switch.adb: Likewise.
2093
5759c56d
JM
20942018-05-04 John Marino <gnugcc@marino.st>
2095
2096 PR ada/85635
2097 * link.c (BSD platforms): Add missing backslash.
2098
9f47a64f
EB
20992018-04-27 Eric Botcazou <ebotcazou@adacore.com>
2100
2101 PR ada/85540
2102 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
2103
87ed4159
EB
21042018-04-25 Eric Botcazou <ebotcazou@adacore.com>
2105
2106 PR ada/85007
2107 * gnat_ugn.texi: Regenerate.
2108
bd1643cc
EB
21092018-03-23 Eric Botcazou <ebotcazou@adacore.com>
2110
2111 PR ada/85007
2112 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
2113 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
2114 Remove documentation of -b switch.
2115
f8e56962
EB
21162018-03-23 Eric Botcazou <ebotcazou@adacore.com>
2117
2118 PR ada/85036
2119 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
2120 switches are passed for --LINK.
2121
50536fd5
EB
21222018-03-12 Eric Botcazou <ebotcazou@adacore.com>
2123
2124 PR ada/82813
2125 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
2126 warnings.
2127
f1bc6414
EB
21282018-03-10 Eric Botcazou <ebotcazou@adacore.com>
2129
2130 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
2131 Consider only entities for objects.
2132
6cde8c54
SH
21332018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
2134
2135 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
2136 $(GNATLIBCFLAGS).
2137 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
2138
21288963
EB
21392018-03-06 Eric Botcazou <ebotcazou@adacore.com>
2140
2141 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
2142 guarding the overflow check emitted for the upper bound of a floating-
2143 point conversion.
2144
0d6091d9
EB
21452018-03-06 Eric Botcazou <ebotcazou@adacore.com>
2146
2147 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
2148
c6db43fa
EB
21492018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2150
2151 * libgnat/i-cexten.ads (Float_128): New type.
2152
dacdc68f
EB
21532018-02-02 Eric Botcazou <ebotcazou@adacore.com>
2154
2155 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
2156 false if the component type is a pointer.
2157
fab58852
GD
21582018-01-11 Gary Dismukes <dismukes@adacore.com>
2159
2160 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
2161 result of Get_Simple_Init_Value and pass the source location of the
2162 object declaration's object_definition.
2163
a2dbe7d5
ES
21642018-01-11 Ed Schonberg <schonberg@adacore.com>
2165
2166 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
2167 properly object declarations with initializations that are
2168 build-in-place function calls, when there is an address specification,
2169 either as an aspect specification or an explicit attribute
2170 specification clause, for the initialized object.
2171 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
2172 initial expressions in the case of a build-in-place call.
2173
791f2d03
PT
21742018-01-11 Piotr Trojanek <trojanek@adacore.com>
2175
2176 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
2177 private (sub)type; refactor to avoid early return statement.
2178 (Not_Null_Range): Same as above.
2179
a85dbeec
HK
21802018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2181
2182 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
2183 concurrent, nor effectively volatile.
2184 * ghost.adb (Check_Ghost_Type): New routine.
2185 * ghost.ads (Check_Ghost_Type): New routine.
2186 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
2187 consider specific subsets of declarations.
2188 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
2189 replicated by Is_Declaration.
2190 * sem_util.ads (Is_Declaration): New parameter profile. Update the
2191 comment on usage.
2192 (Is_Declaration_Other_Than_Renaming): Removed.
2193
5efc1c00
HK
21942018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2195
2196 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
2197 as Part_Of consituents of single protected types are illegal when they
2198 take place inside a protected function.
2199 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
2200 enclosing function.
2201 (Is_Protected_Part_Of_Constituent): New routine.
2202 (Within_Function): New routine.
2203
4dfba737
AC
22042018-01-11 Arnaud Charlet <charlet@adacore.com>
2205
2206 Bump copyright notices to 2018.
2207
27d357ca
HK
22082018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2209
2210 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
2211 Minor reformatting.
2212
cb488118
JS
22132018-01-11 Justin Squirek <squirek@adacore.com>
2214
2215 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
2216 to make sure a given expression function is properly parenthesized.
2217
ed27b86b
HK
22182018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2219
2220 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
2221 categorization of a subprogram body which does not complete a previous
2222 declaration.
2223
715a5d51
HK
22242018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2225
2226 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
2227 scope of package Ada is Standard.
2228
a2fd4f0e
ES
22292018-01-11 Ed Schonberg <schonberg@adacore.com>
2230
2231 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
2232 subcomponent of the current entity when building the body for a dynamic
2233 predicate function for a record with composite subcomponents.
2234
6560f851
HK
22352018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2236
2237 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
2238 Establish_Transient_Scope.
2239 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
2240 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
2241 * exp_ch6.adb (Expand_Call_Helper): Update the call to
2242 Establish_Transient_Scope.
2243 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
2244 Establish_Transient_Scope.
2245 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
2246 management of the secondary stack to an enclosing scope if there is no
2247 suitable construct to wrap, and the transient scope was intended to
2248 manage the secondary stack.
2249 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
2250 is a valid boundary for a transient expression which comes from the
2251 statements of the alternative, otherwise alternatives cannot be
2252 wrapped. Assignments of controlled objects which have controlled
2253 actions suppressed now stop the traversal as there is no point in
2254 looking for an enclosing construct. Add several N_xxx_Body choices to
2255 the termination conditions for completeness.
2256 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
2257 and the associated comment on usage.
2258 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
2259 Establish_Transient_Scope.
2260 (Add_Write_After): Update the call to Establish_Transient_Scope.
2261 * sem_res.adb (Check_Initialization_Call): Removed.
2262 (Resolve_Actuals): Account for additional cases where finalization
2263 actions are required by utilizing predicate Needs_Finalization rather
2264 than Is_Controlled.
2265 (Resolve_Call): Type initialization procedures can now utilize
2266 transient scopes to manage the secondary stack, thus preventing leaks
2267 during initialization. Remove the previous kludgy algorithm which
2268 attempts to manage the secondary stack at the object creation site.
2269
c9e80306
JL
22702018-01-11 Jerome Lambourg <lambourg@adacore.com>
2271
2272 * libgnat/g-soliop__qnx.ads: New.
2273 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
2274 for QNX.
2275
4727f693
BD
22762018-01-11 Bob Duff <duff@adacore.com>
2277
2278 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
2279 a null procedure occurs in a protected definition.
2280
1ceee6a1
BD
22812018-01-11 Bob Duff <duff@adacore.com>
2282
2283 * binderr.ads, namet.ads: Minor reformatting.
2284
e22e7f06
BD
22852018-01-11 Bob Duff <duff@adacore.com>
2286
2287 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
2288 xml2gnat.
2289
8207dc23
BD
22902018-01-11 Bob Duff <duff@adacore.com>
2291
2292 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
2293 unit names.
2294
52c5090a
ES
22952018-01-11 Ed Schonberg <schonberg@adacore.com>
2296
2297 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
2298 controlling argument of a dispatching call. freeze the corresponding
2299 designated type.
2300
2e01b698
BB
23012018-01-11 Ben Brosgol <brosgol@adacore.com>
2302
2303 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
2304
f5c31a46
BB
23052018-01-11 Ben Brosgol <brosgol@adacore.com>
2306
2307 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
2308 corrections.
2309 * gnat_rm.texi: Regenerate.
2310
07733aa1
ES
23112018-01-11 Ed Schonberg <schonberg@adacore.com>
2312
2313 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
2314 formsl type corresponding to the actual fixed point type is private,
2315 because in this case there can be no suspicious arithmetic operations
2316 in the generic unless they reference a formal subprogram. Clarify
2317 warning.
2318
78cac738
JM
23192018-01-11 Javier Miranda <miranda@adacore.com>
2320
2321 * exp_util.adb (Remove_Side_Effects): No action done for functions
2322 returning class-wide types since it requires generating code using
2323 'reference and the CCG target has no secondary stack.
2324 * gnat1drv.adb: Disable building static dispatch tables when generating
2325 C code.
2326
210fef2d
PT
23272018-01-11 Piotr Trojanek <trojanek@adacore.com>
2328
2329 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
2330 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
2331 (File_Type): Add Default_Initial_Condition aspect.
2332
7d1553e2
PO
23332018-01-11 Pascal Obry <obry@adacore.com>
2334
2335 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
2336
1646b09f
BD
23372018-01-11 Bob Duff <duff@adacore.com>
2338
2339 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
2340 to match what the Libadalang-based version does.
2341 * doc/gnat_ugn/about_this_guide.rst: Update reference.
2342
7460ccc7
HK
23432018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2344
2345 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
2346 if it contains at least one component declaration employing a function
2347 call returning on the secondary stack.
2348
a5b2e440
YM
23492018-01-11 Yannick Moy <moy@adacore.com>
2350
2351 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
2352 Update description of restriction SPARK_05 with SPARK 2014.
2353 * gnat_rm.texi: Regenerate.
2354
151af7d2
VF
23552018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
2356
2357 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
2358
10fdda1c
HK
23592018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2360
2361 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
2362 sem_res.adb, sem_util.adb: Minor reformatting.
2363
4d6000d7
ES
23642018-01-11 Ed Schonberg <schonberg@adacore.com>
2365
2366 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
2367 has a delayed aspect which must be processed at the point the type is
2368 frozen. This mimics what is done when the predicate is provided by a
2369 source aspect.
2370
19fb0439
DR
23712018-01-11 Doug Rupp <rupp@adacore.com>
2372
2373 * init.c (vxworks): Add macro checks for __aarch64__.
2374
80631298
HK
23752018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2376
2377 * exp_util.adb (Add_Failure_Expression): New routine.
2378 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
2379 * sem_util.adb (Is_Current_Instance): Code cleanup.
2380
6a5e79b4
PB
23812018-01-11 Patrick Bernardi <bernardi@adacore.com>
2382
2383 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
2384 Default_Sec_Stack_Size.
2385 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
2386 limit check so that the integer index does not overflow. Check the
2387 dynamic stack allocation does not cause the secondary stack pointer to
2388 overflow.
2389 (SS_Info): Align colons.
2390 (SS_Init): Cover the case when bootstraping with an old compiler that
2391 does not set Default_SS_Size.
2392
5cb78fb8
ES
23932018-01-11 Ed Schonberg <schonberg@adacore.com>
2394
2395 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
2396 legality of an inherited operation that may require overriding, ignore
2397 primitive_wrappers that correspond to explicit operations that override
2398 an interface primitive.
2399 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
2400 operation to which the class-wide expression applies is a protected op.
2401 with a primitive_wrapper, verify that the updated inherited expression
2402 does not contain an internal call to a protected function. This
2403 completes the implementation of AI12-0166.
2404
94ce4941
HK
24052018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2406
2407 * ali.adb: Document the remaining letters available for ALI lines.
2408 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
2409 * ali.ads: Update type With_Record. Field
2410 Implicit_With_From_Instantiation is no longer in use. Add field
2411 Implicit_With.
2412 * csinfo.adb (CSinfo): Remove the setup for attribute
2413 Implicit_With_From_Instantiation.
2414 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
2415 either implicitly or explicitly withed.
2416 (Is_Implicit_With_Clause): New routine.
2417 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
2418 confusion with the with clause attribute by the same name.
2419 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
2420 * rtsfind.adb (Maybe_Add_With): Code cleanup.
2421 * sem_ch8.adb (Present_System_Aux): Code cleanup.
2422 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
2423 for a parent unit.
2424 (Implicit_With_On_Parent): Mark the with clause as generated for a
2425 parent unit.
2426 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
2427 instantiation are no longer marked as Implicit_With_From_Instantiation
2428 because they are already marked as implicit.
2429 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
2430 which marks implicit with clauses as related to an instantiation.
2431 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
2432 (Parent_With): New routine.
2433 (Set_Implicit_With_From_Instantiation): Removed.
2434 (Set_Parent_With): New routine.
2435 * sinfo.ads: Update the documentation of attribute Implicit_With.
2436 Remove attribute Implicit_With_From_Instantiation along with
2437 occurrences in nodes. Add attribute Parent_With along with occurrences
2438 in nodes.
2439 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
2440 (Parent_With): New routine along with pragma Inline.
2441 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
2442 (Set_Parent_With): New routine along with pragma Inline.
2443
77519270
HK
24442018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2445
2446 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
2447 entity when the enclosing construct is a body.
2448
a40d9947
PB
24492018-01-11 Patrick Bernardi <bernardi@adacore.com>
2450
2451 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
2452 Secondary_Stack_Size handling as a pragma is now generated for the
2453 corresponding aspect instead of an attribute. Pragma expression is
2454 relocated instead of evaluated. Discriminant of the corresponding
2455 record type is referenced rather than the type discriminant.
2456 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
2457 Secondary_Stack_Size rep item checks to only look for the pragma rep.
2458 * sem_ch13.adb (Analyze_One_Aspect): Transform
2459 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
2460 because the attribute does not have visibility on a task type's
2461 discriminants when the type's definition is expanded.
2462 (Analyze_Attribute_Definition_Clause): Remove handling of
2463 Attribute_Secondary_Stack_Size.
2464 * snames.adb-tmpl, snames.ads-tmpl: Remove
2465 Attribute_Secondary_Stack_Size, no longer used.
2466
6b199a18
JS
24672018-01-11 Justin Squirek <squirek@adacore.com>
2468
2469 * sem_ch8.adb: Minor comment fix.
2470
05344a33
HK
24712018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2472
2473 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
2474 individual action because the action may denote a complex expression,
2475 such as a case statement, which in turn may contain additional
2476 transient objects.
2477
d940c627
ES
24782018-01-11 Ed Schonberg <schonberg@adacore.com>
2479
2480 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
2481 analysis on a copy of the expression with a copy of the index variable,
2482 because full expansion will rewrite construct into a loop with the
2483 original loop variable.
2484 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
2485 expression is an iterated component association. Full analysis takes
2486 place when construct is rewritten as a loop.
2487 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
2488 is not safe for in-place assignment.
2489 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
2490 entity with no homonym and no other entity in the scope.
2491
c8f25817
JS
24922018-01-11 Justin Squirek <squirek@adacore.com>
2493
2494 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
2495 message to be printed on the pragma argument identifier.
2496
51f3e4e1
HK
24972018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2498
2499 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
2500 entity of the generated invariant procedure in order to construct a
2501 proper entity chain.
2502
593e3172
PT
25032018-01-11 Piotr Trojanek <trojanek@adacore.com>
2504
2505 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
2506 comment.
2507
89a4fa68
AC
25082018-01-11 Arnaud Charlet <charlet@adacore.com>
2509
2510 * einfo.ads, einfo.adb (Activation_Record_Component,
2511 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
2512 Allow E_Discriminant.
2513
af95bb26
EB
25142018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2515
2516 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
2517 for atomic access once the component size is taken into account and
2518 also do it if the component type is Atomic or Volatile_Full_Access.
2519
5d35675c
EB
25202018-01-04 Eric Botcazou <ebotcazou@adacore.com>
2521
2522 * gnatvsn.ads: Bump copyright year.
2523
73a699ae
RS
25242018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2525 Alan Hayward <alan.hayward@arm.com>
2526 David Sherwood <david.sherwood@arm.com>
2527
2528 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
2529 as polynomial.
2530
bb94ec76
RS
25312018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2532 Alan Hayward <alan.hayward@arm.com>
2533 David Sherwood <david.sherwood@arm.com>
2534
2535 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
2536 as polynomial.
2537
928686b1
RS
25382018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2539 Alan Hayward <alan.hayward@arm.com>
2540 David Sherwood <david.sherwood@arm.com>
2541
2542 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
2543 polynomial TYPE_VECTOR_SUBPARTS.
2544
7b777afa
RS
25452018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2546 Alan Hayward <alan.hayward@arm.com>
2547 David Sherwood <david.sherwood@arm.com>
2548
2549 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
2550 GET_MODE_NUNITS.
2551
65e6aea3 25522018-01-03 Jakub Jelinek <jakub@redhat.com>
0e5b9de3 2553
85ec4feb
JJ
2554 Update copyright years.
2555
65e6aea3
JJ
2556 * gnat_ugn.texi: Bump @copying's copyright year.
2557 * gnat_rm.texi: Likewise.
ad41bd84 2558\f
65e6aea3 2559Copyright (C) 2018 Free Software Foundation, Inc.
ad41bd84
JM
2560
2561Copying and distribution of this file, with or without modification,
2562are permitted in any medium without royalty provided the copyright
2563notice and this notice are preserved.
This page took 3.243312 seconds and 5 git commands to generate.