1 2016-10-19 Eric Botcazou <ebotcazou@adacore.com>
3 * system-linux-armel.ads: Rename into...
4 * system-linux-arm.ads: ...this
5 * gcc-interface/Makefile.in (ARM/Android): Adjust to above renaming.
7 (Aarch64/Linux): Likewise.
9 2016-10-18 Eric Botcazou <ebotcazou@adacore.com>
11 * gcc-interface/Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
12 (EXTRA_GNATRTL_TASKING_OBJS): Likewise.
13 (ARM/Android): Add atomic support.
14 (SPARC/Solaris): Simplify.
15 (x86/Solaris): Likewise.
16 (x86/Linux): Likewise.
17 (x86-64/kFreeBDS): Adjust and use system-freebsd-x86.ads
18 (x86/FreeBSD): Add s-mudido-affinity.adb.
19 (x86-64/FreeBSD): Likewise and use system-freebsd-x86.ads.
20 (s390/Linux): Simplify.
21 (PowerPC/AIX): Likewise.
22 (Cygwin/Mingw): Likewise.
23 (MIPSel/Linux): Likewise.
24 (ARM/Linux): Add atomic support.
25 (Aarch64/Linux): Use system-linux-armel.ads.
26 (SPARC/Linux): Simplify.
27 (IA-64/Linux): Minor tweak.
28 (IA-64/HP-UX): Likewise.
29 (Alpha/Linux): Likewise.
30 (x86-64/Linux): Use system-linux-x86.ads.
31 (x86/Darwin): Simplify.
32 (PowerPC/Darwin): Likewise.
33 (ARM/Darwin): Use system-darwin-arm.ads.
34 (ADA_EXCLUDE_SRCS): Minor reformatting.
35 * system-aix.ads (Word_Size): Change to Standard'Word_Size.
36 (Memory_Size): Change to 2 ** Word_Size.
37 (Support_Atomic_Primitives): Set to True.
38 * system-aix64.ads: Delete.
39 * system-darwin-arm.ads: New.
40 * system-darwin-ppc.ads (Word_Size): Change to Standard'Word_Size.
41 (Memory_Size): Change to 2 ** Word_Size.
42 (Support_Atomic_Primitives): Set to True.
43 * system-darwin-ppc64.ads: New.
44 * system-darwin-x86.ads (Word_Size): Change to Standard'Word_Size.
45 (Memory_Size): Change to 2 ** Word_Size.
46 * system-darwin-x86_64.ads: Delete.
47 * system-freebsd-x86.ads (Word_Size): Change to Standard'Word_Size.
48 (Memory_Size): Change to 2 ** Word_Size.
49 * system-freebsd-x86_64.ads: Delete.
50 * system-linux-alpha.ads (Support_Atomic_Primitives): Set to True.
51 * system-linux-armeb.ads (Word_Size): Change to Standard'Word_Size.
52 (Memory_Size): Change to 2 ** Word_Size.
53 (Support_Atomic_Primitives): Set to True.
54 * system-linux-armel.ads (Word_Size): Change to Standard'Word_Size.
55 (Memory_Size): Change to 2 ** Word_Size.
56 (Support_Atomic_Primitives): Set to True.
57 * system-linux-mips.ads: (Word_Size): Change to Standard'Word_Size.
58 (Memory_Size): Change to 2 ** Word_Size.
59 * system-linux-mipsel.ads (Word_Size): Change to Standard'Word_Size.
60 (Memory_Size): Change to 2 ** Word_Size.
61 * system-linux-s390.ads (Word_Size): Change to Standard'Word_Size.
62 (Memory_Size): Change to 2 ** Word_Size.
63 (Stack_Check_Probes): Set to True.
64 * system-linux-s390x.ads: Delete.
65 * system-linux-sparc.ads (Word_Size): Change to Standard'Word_Size.
66 (Memory_Size): Change to 2 ** Word_Size.
67 * system-linux-sparcv9.ads: Delete.
68 * system-linux-x86.ads (Word_Size): Change to Standard'Word_Size.
69 (Memory_Size): Change to 2 ** Word_Size.
70 * system-linux-x86_64.ads: Delete.
71 * system-mingw-x86_64.ads: Delete.
72 * system-mingw.ads (Word_Size): Change to Standard'Word_Size.
73 (Memory_Size): Change to 2 ** Word_Size.
74 * system-solaris-sparc.ads (Word_Size): Change to Standard'Word_Size.
75 (Memory_Size): Change to 2 ** Word_Size.
76 (Support_Atomic_Primitives): Set to True.
77 * system-solaris-sparcv9.ads: Delete.
78 * system-solaris-x86.ads (Word_Size): Change to Standard'Word_Size.
79 (Memory_Size): Change to 2 ** Word_Size.
80 * system-solaris-x86_64.ads: Delete.
82 2016-10-17 Eric Botcazou <ebotcazou@adacore.com>
84 * system-darwin-ppc64.ads (Support_64_Bit_Divides): Delete.
85 * system-linux-armeb.ads (Support_64_Bit_Divides): Likewise.
86 * system-linux-mips.ads (Support_64_Bit_Divides): Likewise.
87 * system-linux-mips64el.ads (Support_64_Bit_Divides): Likewise.
88 * system-linux-mipsel.ads (Support_64_Bit_Divides): Likewise.
89 * system-linux-sparcv9.ads (Support_64_Bit_Divides): Likewise.
90 * system-rtems.ads (Support_64_Bit_Divides): Likewise.
92 2016-10-16 Eric Botcazou <ebotcazou@adacore.com>
94 * gcc-interface/misc.c (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS):Define.
95 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Deal with
96 a zero TARGET_CUSTOM_FUNCTION_DESCRIPTORS specially for Code_Address.
97 Otherwise, if TARGET_CUSTOM_FUNCTION_DESCRIPTORS is positive, set
98 FUNC_ADDR_BY_DESCRIPTOR for 'Access/'Unrestricted_Access of nested
99 subprograms if the type can use an internal representation.
100 (call_to_gnu): Likewise, but set CALL_EXPR_BY_DESCRIPTOR on indirect
101 calls if the type can use an internal representation.
103 2016-10-16 Eric Botcazou <ebotcazou@adacore.com>
105 * system-aix.ads (Always_Compatible_Rep): Change to False.
106 * system-aix64.ads (Always_Compatible_Rep): Likewise.
107 * system-hpux-ia64.ads (Always_Compatible_Rep): Likewise.
108 * system-hpux.ads (Always_Compatible_Rep): Likewise.
109 * system-linux-alpha.ads (Always_Compatible_Rep): Likewise.
110 * system-linux-hppa.ads (Always_Compatible_Rep): Likewise.
111 * system-linux-ia64.ads (Always_Compatible_Rep): Likewise.
112 * system-linux-mips.ads (Always_Compatible_Rep): Likewise.
113 * system-linux-mips64el.ads (Always_Compatible_Rep): Likewise.
114 * system-linux-mipsel.ads (Always_Compatible_Rep): Likewise.
115 * system-linux-s390.ads (Always_Compatible_Rep): Likewise.
116 * system-linux-s390x.ads (Always_Compatible_Rep): Likewise.
117 * system-linux-sh4.ads (Always_Compatible_Rep): Likewise.
118 * system-linux-sparc.ads (Always_Compatible_Rep): Likewise.
119 * system-linux-sparcv9.ads (Always_Compatible_Rep): Likewise.
120 * system-rtems.ads (Always_Compatible_Rep): Likewise.
122 2016-10-14 Eric Botcazou <ebotcazou@adacore.com>
125 * gcc-interface/utils.c (create_var_decl): Do not clear TREE_READONLY
126 in LTO mode for an external variable.
127 (can_materialize_object_renaming_p): Move up.
129 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
131 * gcc-interface/utils2.c: Include memmodel.h.
133 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
135 * sem_ch6.adb (Analyze_Expression_Function):
136 Remove the aspects of the original expression function has been
137 rewritten into a subprogram declaration or a body. Reinsert the
138 aspects once they have been analyzed.
140 2016-10-13 Tristan Gingold <gingold@adacore.com>
142 * exp_ch9.adb (Expand_N_Asynchronous_Select): Return immediately
143 on restricted profile.
145 2016-10-13 Javier Miranda <miranda@adacore.com>
147 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Register the
148 pragma for its validation after the backend has been called only if
149 its expression has some occurrence of attributes 'size or 'alignment
150 * table.ads (Release_Threshold): New formal.
151 (Release): Adding documentation of its new functionality.
152 * table.adb (Release): Extend its functionality with a
154 * nlists.adb (Next_Node table): Set its Release_Threshold.
155 * atree.adb (Orig_Nodes table): Set its Release_Threshold.
156 * atree.ads (Nodes table): Set its Release_Threshold.
157 (Flags table): Set its Release_Threshold.
158 * alloc.ads (Nodes_Release_Threshold): New constant declaration.
159 (Orig_Nodes_Release_Threshold): New constant declaration.
160 * debug.adb (switch d.9): Left free.
161 * gnat1drv.adb (Post_Compilation_Validation_Checks): Enable
162 validation of pragmas Compile_Time_Error and Compile_Time_Warning.
164 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
166 * sem_ch6.adb (Create_Extra_Formals): Generate
167 an Itype reference for the object extra formal in case the
168 subprogram is called within the same or nested scope.
170 2016-10-13 Claire Dross <dross@adacore.com>
172 * sem_ch5.adb (Analyze_Iterator_Specification):
173 Also create a renaming in GNATprove mode.
175 2016-10-13 Ed Schonberg <schonberg@adacore.com>
177 * freeze.adb (Freeze_Fixed_Point_Type): in SPARK mode, the
178 given bounds of the type must be strictly representable, and the
179 range reduction by one delta ("shaving") allowed by the Ada RM,
180 is not applicable in SPARK.
182 2016-10-13 Javier Miranda <miranda@adacore.com>
184 * debug.adb (switch d.9): Used to temporarily disable the support
185 needed for this enhancement since it causes regressions with
187 * gnat1drv.adb (Post_Compilation_Validation_Checks): Temporarily
188 leave the validation of pragmas Compile_Time_Warning and
189 Compile_Time_Error under control of -gnatd.9/
191 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
193 * sem_ch10.adb (Entity_Needs_Body): A generic
194 subprogram renaming needs a body if the renamed unit is declared
195 outside the current compilation unit.
197 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
199 * sinfo.ads, sem_ch12.adb, sem.adb, expander.adb, sem_res.ads,
200 sem_ch4.adb, sem_ch8.adb, s-memory.adb: Minor reformatting.
202 2016-10-13 Vincent Celier <celier@adacore.com>
204 * gnatcmd.adb: Delete all temporary files when invoked as gnat
207 2016-10-13 Ed Falis <falis@adacore.com>
209 * i-vxinco.adb, i-vxinco.ads: New files.
210 * impunit.adb: add i-vxinco.ads.
211 * s-interr-vxworks.adb: add hook for user interrupt connection routine.
213 2016-10-13 Ed Falis <falis@adacore.com>
215 * s-interr-hwint.adb, s-interr-vxworks.adb: Rename s-interr-hwint.adb
216 to s-interr-vxworks.adb.
218 2016-10-13 Gary Dismukes <dismukes@adacore.com>
220 * exp_ch7.adb, einfo.ads, sem_prag.adb, sem_prag.ads, sem.ads,
221 sem_attr.adb, sem_case.adb, sem_ch13.ads: Minor typo fixes and
224 2016-10-13 Javier Miranda <miranda@adacore.com>
226 * sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New
227 overloaded subprogram that factorizes code executed as part
228 of the regular processing of these pragmas and as part of its
229 validation after invoking the backend.
230 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): New
232 (Process_Compile_Time_Warning_Or_Error): If the
233 condition is known at compile time then invoke the new overloaded
234 subprogram; otherwise register the pragma in a table to validate
235 it after invoking the backend.
236 * sem.ads, sem.adb (Unlock): New subprogram.
237 * sem_attr.adb (Analyze_Attribute [Size]): If we are processing
238 pragmas Compile_Time_Warning and Compile_Time_Errors after the
239 backend has been called then evaluate this attribute if 'Size
240 is known at compile time.
241 * gnat1drv.adb (Post_Compilation_Validation_Checks): Validate
242 compile time warnings and errors.
243 * sem_ch13.ads, sem_ch13.adb (Validate_Compile_Time_Warning_Error):
245 (Validate_Compile_Time_Warning_Errors): New subprogram.
247 2016-10-13 Yannick Moy <moy@adacore.com>
249 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt to
250 optional refinement for abstract states with only partial refinement
253 2016-10-13 Justin Squirek <squirek@adacore.com>
255 * sem_ch13.adb: Minor correction in comment in
256 Analyze_Aspect_Specifications
257 * sem_prag.adb: Minor reformatting.
259 2016-10-13 Thomas Quinot <quinot@adacore.com>
261 * s-stratt-xdr.adb: Disable compiler unit warnings.
263 2016-10-13 Ed Schonberg <schonberg@adacore.com>
265 * sem_ch3.adb (Visible_Component): In an instance body, check
266 whether the component may be hidden in a selected component by
267 a homonym that is a primitive operation of the type of the prefix.
269 2016-10-13 Jakub Jelinek <jakub@redhat.com>
272 * gcc-interface/misc.c (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
273 instead of lhd_return_null_tree_v.
275 2016-10-12 Yannick Moy <moy@adacore.com>
277 * einfo.adb, einfo.ads (Partial_Refinement_Constituents): Take
278 into account constituents that are themselves abstract states
279 with full or partial refinement visible.
280 * sem_prag.adb (Find_Encapsulating_State): Move function
281 to library-level, to share between subprograms.
282 (Analyze_Refined_Global_In_Decl_Part): Use
283 Find_Encapsulating_State to get relevant encapsulating state.
285 2016-10-12 Arnaud Charlet <charlet@adacore.com>
287 * gnat1drv.adb: Fix minor typo.
289 2016-10-12 Yannick Moy <moy@adacore.com>
291 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt checking
292 for optional refinement of abstract state with partial
294 (Analyze_Refined_Global_In_Decl_Part): Adapt checking for optional
295 refinement of abstract state with partial visible refinement. Implement
296 new rules in SPARK RM 7.2.4 related to optional refinement.
297 Also fix the missing detection of missing items.
299 2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
301 * einfo.adb Add new usage for Elist29 and Node35.
302 (Anonymous_Designated_Type): New routine.
303 (Anonymous_Master): Removed.
304 (Anonymous_Masters): New routine.
305 (Set_Anonymous_Designated_Type): New routine.
306 (Set_Anonymous_Master): Removed.
307 (Set_Anonymous_Masters): New routine.
308 (Write_Field29_Name): Add output for Anonymous_Masters.
309 (Write_Field35_Name): Remove the output for Anonymous_Master. Add
310 output for Anonymous_Designated_Type.
311 * einfo.ads Remove attribute Anonymous_Master along with
312 usage in entities. Add attributes Anonymous_Designated_Type
313 and Anonymous_Masters along with usage in entities.
314 (Anonymous_Designated_Type): New routine along with pragma Inline.
315 (Anonymous_Master): Removed along with pragma Inline.
316 (Anonymous_Masters): New routine along with pragma Inline.
317 (Set_Anonymous_Designated_Type): New routine along with pragma Inline.
318 (Set_Anonymous_Master): Removed along with pragma Inline.
319 (Set_Anonymous_Masters): New routine along with pragma Inline.
320 * exp_ch7.adb (Build_Anonymous_Master): Reuse an anonymous master
321 defined in the same unit if it services the same designated
322 type, otherwise create a new one.
323 (Create_Anonymous_Master): Reimplemented.
324 (Current_Anonymous_Master): New routine.
325 (In_Subtree): Removed.
327 2016-10-12 Ed Schonberg <schonberg@adacore.com>
329 * sem_prag.adb (Analyze_Pragma, case Dynamic_Predicate):
330 Check properly whether there is an explicit assertion policy
331 for predicate checking, even in the presence of a general Ignore
334 2016-10-12 Steve Baird <baird@adacore.com>
336 * sem.adb (Walk_Library_Items): Cope with ignored ghost units.
338 2016-10-12 Ed Schonberg <schonberg@adacore.com>
340 * lib-writ.adb (Write_ALI): Removal of unused file entries from
341 dependency list must be performed before the list is sorted,
342 so that the dependency number of other files is properly set-up
343 for use in tools that relate entity information to the unit in
344 which they are declared.
346 2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
348 * exp_aggr.adb (Initialize_Ctrl_Array_Component):
349 Create a copy of the initialization expression to avoid sharing
350 it between multiple components.
352 2016-10-12 Yannick Moy <moy@adacore.com>
354 * einfo.adb, einfo.ads (Has_Partial_Visible_Refinement): New flag
356 (Has_Non_Null_Visible_Refinement): Return true for patial refinement.
357 (Partial_Refinement_Constituents): New function returns the full or
358 partial refinement constituents depending on scope.
359 * sem_ch3.adb (Analyze_Declarations): Remove partial visible
360 refinements when exiting the scope of a package spec or body
361 and those partial refinements are not in scope afterwards.
362 * sem_ch7.adb, sem_ch7.ads (Install_Partial_Declarations): Mark
363 abstract states of parent units with partial refinement so that
365 * sem_prag.adb (Analyze_Part_Of_In_Decl_Part): Mark enclosing
366 abstract state if any as having partial refinement in that scope.
367 (Analyze_Refined_Global_In_Decl_Part): Check constituent usage
368 based on full or partial refinement depending on scope.
370 2016-10-12 Ed Schonberg <schonberg@adacore.com>
372 * exp_ch4.adb (Expand_N_Type_Conversion): If the target type
373 has an invariant aspect, insert invariant call at the proper
374 place in the code rather than rewriting the expression as an
375 expression with actions, to prevent spurious semantic errors on
376 the rewritten conversion when it is the object in a renaming.
378 2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
380 * exp_ch5.adb, sem_ch3.adb, exp_ch9.adb, a-tags.adb, sem_prag.adb,
381 sem_ch12.adb, xref_lib.adb, a-strunb-shared.adb, rtsfind.adb,
382 freeze.adb, sem_attr.adb, sem_case.adb, exp_ch4.adb, ghost.adb,
383 exp_ch6.adb, sem_ch4.adb, restrict.adb, s-os_lib.adb: Minor
386 2016-10-12 Justin Squirek <squirek@adacore.com>
388 * sem_ch10.adb (Remove_Limited_With_Clause): Add a check to
389 detect accidental visibility.
391 2016-10-12 Ed Schonberg <schonberg@adacore.com>
393 * exp_ch4.adb (Expand_Allocator): If the expression is a qualified
394 expression, add a predicate check after the constraint check.
395 * sem_res.adb (Resolve_Qualified_Expression): If context is an
396 allocator, do not apply predicate check, as it will be done when
397 allocator is expanded.
399 2016-10-12 Bob Duff <duff@adacore.com>
401 * xref_lib.adb: Use renamings-of-slices to ensure
402 that all references to Tables are properly bounds checked (when
403 checks are turned on).
404 * g-dyntab.ads, g-dyntab.adb: Default-initialize the array
405 components, so we don't get uninitialized pointers in case
406 of Tables containing access types. Misc cleanup of the code
409 2016-10-12 Ed Schonberg <schonberg@adacore.com>
411 * sem_attr.adb (Analyze_Attribute, case 'Type_Key): Implement
412 functionality of attribute, to provide a reasonably unique key
413 for a given type and detect any changes in the semantics of the
414 type or any of its subcomponents from version to version.
416 2016-10-12 Bob Duff <duff@adacore.com>
418 * sem_case.adb (Check_Choice_Set): Separate
419 checking for duplicates out into a separate pass from checking
420 full coverage, because the check for duplicates does not depend
421 on predicates. Therefore, we shouldn't do it separately for the
422 predicate vs. no-predicate case; we should share code. The code
423 for the predicate case was wrong.
425 2016-10-12 Jerome Lambourg <lambourg@adacore.com>
427 * init.c: Make sure to call finit on x86_64-vx7 to reinitialize
430 2016-10-12 Arnaud Charlet <charlet@adacore.com>
432 * lib-load.adb (Load_Unit): Generate an error message even when
435 2016-10-12 Ed Schonberg <schonberg@adacore.com>
437 * lib-writ.adb (Write_ALI): Disable optimization related to transitive
438 limited_with clauses for now.
440 2016-10-12 Javier Miranda <miranda@adacore.com>
442 * sem_attr.adb (Analyze_Attribute_Old_Result): Generating C
443 code handle 'old located in inlined _postconditions procedures.
444 (Analyze_Attribute [Attribute_Result]): Handle 'result when
445 rewriting the attribute as a reference to the formal parameter
446 _Result of inlined _postconditions procedures.
448 2016-10-12 Tristan Gingold <gingold@adacore.com>
450 * s-rident.ads (Profile_Info): Remove
451 Max_Protected_Entries restriction from GNAT_Extended_Ravenscar
452 * sem_ch9.adb (Analyze_Protected_Type_Declaration):
453 Not a controlled type on restricted runtimes.
455 2016-10-12 Gary Dismukes <dismukes@adacore.com>
457 * sem_ch3.adb (Derive_Subprogram): Add test
458 for Is_Controlled of Parent_Type when determining whether an
459 inherited subprogram with one of the special names Initialize,
460 Adjust, or Finalize should be derived with its normal name even
461 when inherited as a private operation (which would normally
462 result in the inherited operation having a special "hidden" name).
464 2016-10-12 Ed Schonberg <schonberg@adacore.com>
466 * sem_res.adb (Resolve_Call): If a function call returns a
467 limited view of a type replace it with the non-limited view,
468 which must be available when compiling call. This was already
469 done elsewhere for non-overloaded calls, but needs to be done
470 after resolution if function name is overloaded.
472 2016-10-12 Javier Miranda <miranda@adacore.com>
474 * a-tags.adb (IW_Membership [private]): new overloaded
475 subprogram that factorizes the code needed to check if a
476 given type implements an interface type.
478 [public]): invoke the new internal IW_Membership function.
479 (Is_Descendant_At_Same_Level): Fix this routine to implement RM
482 2016-10-12 Tristan Gingold <gingold@adacore.com>
484 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Add support
485 for a secondary procedure in case of missing Ada.Calendar.Delays
486 * rtsfind.ads (RTU_Id): Add System_Relative_Delays.
487 (RE_Id): Add RO_RD_Delay_For.
488 * rtsfind.adb (Output_Entity_Name): Handle correctly units RO_XX.
489 * s-rident.ads: Remove No_Relative_Delays
490 restriction for GNAT_Extended_Ravenscar.
492 2016-10-12 Ed Schonberg <schonberg@adacore.com>
494 * sem_elab.adb (Within_Initial_Condition): When deternining
495 the context of the expression, use the original node if it is
496 a pragma, because Check pragmas are rewritten as conditionals
497 when assertions are not enabled.
499 2016-10-12 Bob Duff <duff@adacore.com>
501 * spitbol_table.ads, spitbol_table.adb (Adjust, Finalize): Add
504 2016-10-12 Bob Duff <duff@adacore.com>
506 * a-strunb-shared.ads, a-strunb-shared.adb (Finalize):
507 Make sure Finalize is idempotent.
508 (Unreference): Check for
509 Empty_Shared_String, in case the reference count of the empty
511 Also add "not null" in various places that can't be null.
513 2016-10-12 Jerome Lambourg <lambourg@adacore.com>
515 * init.c: Fix sigtramp with the x86_64-vx7-vxsim target on
518 2016-10-12 Vadim Godunko <godunko@adacore.com>
520 * s-os_lib.ads (Is_Owner_Readable_File): Renamed from
522 (Is_Owner_Writable_File): Renamed from Is_Writable_File.
523 (Is_Readable_File): Renames Is_Read_Accessible_File.
524 (Is_Writable_File): Renames Is_Write_Accessible_File.
526 2016-10-12 Ed Schonberg <schonberg@adacore.com>
528 * sem_ch12.adb (Check_Formal_Package_Instance): Skip an internal
529 formal entity without a parent only if the corresponding actual
530 entity has a different kind.
531 * exp_ch9.adb (Build_Class_Wide_Master): If the master is
532 declared locally, insert the renaming declaration after the
533 master declaration, to prevent access before elaboration in gigi.
535 2016-10-12 Ed Schonberg <schonberg@adacore.com>
537 * contracts.adb (Analyze_Contracts): For a type declaration, analyze
538 an iterable aspect when present.
540 2016-10-12 Ed Schonberg <schonberg@adacore.com>
542 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
543 an instance of a formal package with defaults, when defaulted
544 parameters include tagged private types and array types.
546 2016-10-12 Eric Botcazou <ebotcazou@adacore.com>
549 * exp_ch5.adb (Is_Non_Local_Array): Return true for every array
550 that is not a component or slice of an entity in the current
553 2016-10-12 Tristan Gingold <gingold@adacore.com>
555 * restrict.ads, restrict.adb (Restricted_Profile): Adjust
556 comment, use Restricted_Tasking to compare restrictions.
557 * s-rident.ads (Profile_Name): Add Restricted_Tasking and
559 (Profile_Info): Set restrictions for Restricted_Tasking.
561 2016-10-12 Ed Schonberg <schonberg@adacore.com>
563 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Ghost status
564 of type before elaborating inherited operations, so that the
565 Ghost status is set properly for them.
566 * ghost.adb (Check_Ghost_Overriding): A ghost subprogram can
567 override an abstract subprogram coming from an interface
570 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
572 * system-linux-armeb.ads (Backend_Overflow_Checks): Change to True.
573 * system-linux-mips.ads (Backend_Overflow_Checks): Likewise.
574 * system-linux-mips64el.ads (Backend_Overflow_Checks): Likewise.
575 * system-linux-mipsel.ads (Backend_Overflow_Checks): Likewise.
576 * system-linux-sparcv9.ads (Backend_Overflow_Checks): Likewise.
577 * system-rtems.ads (Backend_Overflow_Checks): Likewise.
579 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
581 * adaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP.
582 ISALPHA: include <ctype.h> and define to isalpha for DJGPP when IN_RTS
584 (DIR_SEPARATOR) define to '\\' for DJGPP.
585 (__gnat_get_file_names_case_sensitive): Return 0 for DJGPP unless
586 overriden in environment.
587 (__gnat_is_absolute_path): Support MS-DOS absolute paths for DJGPP.
588 (__gnat_portable_spawn): Use spewnvp for DJGPP.
589 (__gnat_portable_no_block_spawn): Use spawnvp for DJGPP.
590 (__gnat_portable_wait): Return 0 for DJGPP.
592 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
594 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP.
595 (EH_MECHANISM): Define to -gcc for DJGPP.
596 * system-djgpp.ads: New file.
598 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
600 * ctrl_c.c: Do not use macro SA_RESTART for DJGPP.
601 * gsocket.h: Do not support sockets for DJGPP.
602 * init.c (__gnat_install_handler): Implememt for DJGPP.
603 * sysdep.c: Include <io.h> for DJGPP.
604 (_setmode): Define to setmode for DJGPP.
605 (__gnat_set_mode): Add implementation for DJGPP.
606 (__gnat_localtime_tzoff): Use localtime_r for DJGPP.
607 * terminals.c: Add DJGPP to list of unsupported platforms.
608 * env.c (__gnat_clearenv): Use _gnat_unsetenv on all entries for DJGPP.
610 2016-10-11 Pierre-Marie de Rodat <derodat@adacore.com>
612 * exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
613 Emit GNAT encodings for object renamings involving record components
614 whose normalized bit offset is not null.
615 * uintp.h (UI_No_Uint): Declare.
616 * gcc-interface/gigi.h (can_materialize_object_renaming_p): Likewise.
617 * gcc-interface/utils.c (can_materialize_object_renaming_p): New
619 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Renaming_Declaration>:
620 In code generation mode, materialize all renamings as long as they need
621 debug info and we are not optimizing.
623 2016-10-11 Pierre-Marie de Rodat <derodat@adacore.com>
625 * gcc-interface/utils2.c (build_binary_op): Add a NO_FOLD argument.
626 Disable folding when it is true.
627 * gcc-interface/gigi.h (choices_to_gnu): Remove declaration.
628 (build_binary_op): Update signature and comment.
629 * gcc-interface/decl.c (choices_to_gnu): Make static. Disable
630 folding in calls to build_binary_op.
632 2016-10-11 Tristan Gingold <gingold@adacore.com>
634 * fe.h (Constant_Value): Declare.
635 * gcc-interface/decl.c (compile_time_known_address_p): Also consider
636 references to constants.
638 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
640 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_Add>: Adjust comment.
641 <N_Op_Minus>: Add comment and missing guard.
642 * gcc-interface/trans.c (build_binary_op_trapv): Use an explicit test.
644 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
646 * gcc-interface/utils.c (type_unsigned_for_rm): New predicate.
647 (make_type_from_size): Use it.
648 (unchecked_convert): Likewise. Do not skip the extension step if the
649 source type is not integral.
651 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
652 Tristan Gingold <gingold@adacore.com>
654 * system-linux-ppc64.ads: Delete.
655 * system-linux-ppc.ads: Make 32-bit/64-bit neutral.
656 * gcc-interface/Makefile.in (PowerPC/Linux): Simplify.
658 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
660 * gcc-interface/decl.c (gnat_to_gnu_entity): Put volatile qualifier
661 on types at the very end of the processing.
662 (gnat_to_gnu_param): Remove redundant test.
663 (change_qualified_type): Do nothing for unconstrained array types.
665 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
667 * gcc-interface/utils2.c (find_common_type): Do not return the LHS type
668 if it's an array with non-constant lower bound and the RHS type is an
669 array with a constant one.
671 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
673 * gcc-interface/utils.c (convert): For a biased input type, convert the
674 bias itself to the base type before adding it.
676 2016-10-08 Eric Botcazou <ebotcazou@adacore.com>
678 * gcc-interface/utils.c (convert) <VECTOR_CST>: Add missing break.
681 2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
683 * gcc-interface/decl.c: Fix fall through comment formatting.
684 * gcc-interface/misc.c: Likewise.
685 * gcc-interface/trans.c: Likewise.
686 * gcc-interface/utils.c: Likewise.
687 * gcc-interface/utils2.c: Likewise.
689 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
691 * gcc-interface/misc.c (gnat_post_options): Remove special case for
692 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
694 2016-09-27 Jakub Jelinek <jakub@redhat.com>
696 * terminals.c (is_gui_app): Remove break after return.
698 2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
700 * gcc-interface/decl.c: Fix fall through comment formatting.
701 * gcc-interface/misc.c: Likewise.
702 * gcc-interface/trans.c: Likewise.
703 * gcc-interface/utils.c: Likewise.
704 * gcc-interface/utils2.c: Likewise.
706 2016-09-23 Jakub Jelinek <jakub@redhat.com>
708 * gcc-interface/decl.c (gnat_to_gnu_entity): Use
709 CONSTRUCTOR_NELTS (...) instead of
710 vec_safe_length (CONSTRUCTOR_ELTS (...)).
712 2016-07-14 Eric Botcazou <ebotcazou@adacore.com>
714 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Also use
715 the void pointer type if the designated type is incomplete and has no
716 full view in LTO mode.
717 <E_Access_Protected_Subprogram_Type>: Adjust comment.
718 <E_Incomplete_Type>: Likewise.
719 * gcc-interface/trans.c (Call_to_gnu): Do not convert to the type of
720 the actual if it is a dummy type.
722 2016-07-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
724 * gcc-interface/ada-tree.h (TYPE_ALIGN_OK): Define.
725 * gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
727 * gcc-interface/utils2.c (build_unary_op): Likewise.
729 2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
731 * gcc-interface/trans.c (add_decl_expr): Minor tweak.
732 * gcc-interface/utils.c (create_var_decl): For an external variable,
733 also clear TREE_READONLY in LTO mode if the initializer is not a valid
734 constant and set DECL_READONLY_ONCE_ELAB instead.
736 2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
739 * adaint.c (__gnat_is_read_accessible_file): Add parentheses.
740 (__gnat_is_write_accessible_file): Likewise.
742 2016-07-07 Ed Schonberg <schonberg@adacore.com>
744 * exp_ch6.adb (Expand_Internal_Init_Call): Subsidiary procedure
745 to Expand_Protected_ Subprogram_Call, to handle properly a
746 call to a protected function that provides the initialization
747 expression for a private component of the same protected type.
748 * sem_ch9.adb (Analyze_Protected_Definition): Layout must be
749 applied to itypes generated for a private operation of a protected
750 type that has a formal of an anonymous access to subprogram,
751 because these itypes have no freeze nodes and are frozen in place.
752 * sem_ch4.adb (Analyze_Selected_Component): If prefix is a
753 protected type and it is not a current instance, do not examine
754 the first private component of the type.
756 2016-07-07 Arnaud Charlet <charlet@adacore.com>
758 * exp_imgv.adb, g-dynhta.adb, s-regexp.adb, s-fatgen.adb, s-poosiz.adb:
759 Minor removal of extra whitespace.
760 * einfo.ads: minor removal of repeated "as" in comment
762 2016-07-07 Vadim Godunko <godunko@adacore.com>
764 * adaint.c: Complete previous change.
766 2016-07-07 Vadim Godunko <godunko@adacore.com>
768 * adainit.h, adainit.c (__gnat_is_read_accessible_file): New
770 (__gnat_is_write_accessible_file): New subprogram.
771 * s-os_lib.ads, s-os_lib.adb (Is_Read_Accessible_File): New subprogram.
772 (Is_Write_Accessible_File): New subprogram.
774 2016-07-07 Justin Squirek <squirek@adacore.com>
776 * sem_ch12.adb (Install_Body): Minor refactoring in the order
778 (In_Same_Scope): Change loop condition to be more expressive.
780 2016-07-07 Gary Dismukes <dismukes@adacore.com>
782 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, prj-ext.adb, freeze.adb,
783 sem_attr.adb: Minor reformatting, fix typos.
785 2016-07-07 Justin Squirek <squirek@adacore.com>
787 * sem_ch12.adb (In_Same_Scope): Created this function to check
788 a generic package definition against an instantiation for scope
790 (Install_Body): Add function In_Same_Scope and
791 amend conditional in charge of delaying the package instance.
792 (Is_In_Main_Unit): Add guard to check if parent is present in
793 assignment of Current_Unit.
795 2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
797 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove redundant test,
798 adjust comments and formatting.
799 * sem_prag.adb (Inlining_Not_Possible): Do not test Front_End_Inlining
801 (Make_Inline): ...here before calling Inlining_Not_Possible instead.
802 (Set_Inline_Flags): Remove useless test.
803 (Analyze_Pragma) <Pragma_Inline>: Add comment about -gnatn switch.
805 2016-07-07 Ed Schonberg <schonberg@adacore.com>
807 * sem_prag.ads, sem_prag.adb (Build_Classwide_Expression): Include
808 overridden operation as parameter, in order to map formals of
809 the overridden and overring operation properly prior to rewriting
810 the inherited condition.
811 * freeze.adb (Check_Inherited_Cnonditions): Change call to
812 Build_Class_Wide_Expression accordingly. In Spark_Mode, add
813 call to analyze the contract of the parent operation, prior to
814 mapping formals between operations.
816 2016-07-07 Arnaud Charlet <charlet@adacore.com>
818 * adabkend.adb (Scan_Back_End_Switches): Ignore -o/-G switches
819 as done in back_end.adb.
820 (Scan_Compiler_Args): Remove special case for CodePeer/SPARK, no longer
821 needed, and prevents proper handling of multi-unit sources.
823 2016-07-07 Thomas Quinot <quinot@adacore.com>
825 * g-sechas.adb, g-sechas.ads (GNAT.Secure_Hashes.H): Add Hash_Stream
826 type with Write primitive calling Update on the underlying context
827 (and dummy Read primitive raising P_E).
829 2016-07-07 Thomas Quinot <quinot@adacore.com>
831 * sem_ch13.adb: Minor reformatting.
833 2016-07-07 Thomas Quinot <quinot@adacore.com>
835 * g-socket.ads: Document performance consideration for stream
838 2016-07-07 Arnaud Charlet <charlet@adacore.com>
840 * osint-c.ads (Set_File_Name): Clarify spec.
842 2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
844 * freeze.adb: Reenable code.
846 2016-07-07 Yannick Moy <moy@adacore.com>
848 * sem_ch6.adb (Process_Formals): Set ghost flag
849 on formal entities of ghost subprograms.
850 * ghost.adb (Check_Ghost_Context.Is_OK_Ghost_Context): Accept ghost
851 entities in use type clauses.
853 2016-07-06 Javier Miranda <miranda@adacore.com>
855 * sem_ch6.adb (Check_Inline_Pragma): if the subprogram has no spec
856 then move its aspects to the internally built subprogram spec.
858 2016-07-06 Yannick Moy <moy@adacore.com>
860 * sem_ch6.adb (Analyze_Expression_Function): Mark body of
861 expression function as ghost if needed when created.
862 * sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
865 2016-07-06 Arnaud Charlet <charlet@adacore.com>
867 * lib.adb (Check_Same_Extended_Unit): Complete previous change.
868 * sem_intr.adb (Errint): New parameter Relaxed. Refine previous
869 change to only disable errors selectively.
870 * sem_util.adb: minor style fix in object declaration
872 2016-07-06 Yannick Moy <moy@adacore.com>
874 * sem_warn.adb (Check_Infinite_Loop_Warning.Find_Var): Special case a
875 call to a volatile function, so that it does not lead to a warning in
878 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
880 * sem_ch12.adb, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
882 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
884 * gnat1drv.adb: Code clean up. Do not emit any
885 code generation errors when the unit is ignored Ghost.
887 2016-07-06 Ed Schonberg <schonberg@adacore.com>
889 * sem_eval.adb (Check_Non_Static_Context): If the expression
890 is a real literal of a floating point type that is part of a
891 larger expression and is not a static expression, transform it
892 into a machine number now so that the rest of the computation,
893 even if other components are static, is not evaluated with
896 2016-07-06 Javier Miranda <miranda@adacore.com>
898 * sem_ch13.adb (Freeze_Entity_Checks): Undo previous patch and move the
899 needed functionality to Analyze_Freeze_Generic_Entity.
900 (Analyze_Freeze_Generic_Entity): If the entity is not already frozen
901 and has delayed aspects then analyze them.
903 2016-07-06 Yannick Moy <moy@adacore.com>
905 * sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
906 Special case for unanalyzed body entity of ghost expression function.
908 2016-07-06 Javier Miranda <miranda@adacore.com>
910 * sem_ch7.adb (Analyze_Package_Specification): Insert its
911 freezing nodes after the last declaration. Needed to ensure
912 that global entities referenced in aspects of frozen types are
914 * freeze.adb (Freeze_Entity): Minor code reorganization to ensure
915 that freezing nodes of generic packages are handled.
916 * sem_ch13.adb (Freeze_Entity_Checks): Handle N_Freeze_Generic nodes.
917 * sem_ch12.adb (Save_References_In_Identifier): Handle selected
918 components which denote a named number that is constant folded
919 in the analyzed copy of the tree.
921 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
923 * exp_aggr.adb Remove with and use clauses for Exp_Ch11 and Inline.
924 (Initialize_Array_Component): Protect the initialization
925 statements in an abort defer / undefer block when the associated
926 component is controlled.
927 (Initialize_Record_Component): Protect the initialization statements
928 in an abort defer / undefer block when the associated component is
930 (Process_Transient_Component_Completion): Use Build_Abort_Undefer_Block
931 to create an abort defer / undefer block.
932 * exp_ch3.adb Remove with and use clauses for Exp_ch11 and Inline.
933 (Default_Initialize_Object): Use Build_Abort_Undefer_Block to
934 create an abort defer / undefer block.
935 * exp_ch5.adb (Expand_N_Assignment_Statement): Mark an abort
936 defer / undefer block as such.
937 * exp_ch9.adb (Find_Enclosing_Context): Do not consider an abort
938 defer / undefer block as a suitable context for an activation
940 * exp_util.adb Add with and use clauses for Exp_Ch11.
941 (Build_Abort_Undefer_Block): New routine.
942 * exp_util.ads (Build_Abort_Undefer_Block): New routine.
943 * sinfo.adb (Is_Abort_Block): New routine.
944 (Set_Is_Abort_Block): New routine.
945 * sinfo.ads New attribute Is_Abort_Block along with occurrences
947 (Is_Abort_Block): New routine along with pragma Inline.
948 (Set_Is_Abort_Block): New routine along with pragma Inline.
950 2016-07-06 Justin Squirek <squirek@adacore.com>
952 * sem_ch4.adb (Analyze_One_Call): Add a conditional to handle
955 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
957 * einfo.adb Flag252 is now used as Is_Finalized_Transient. Flag295
958 is now used as Is_Ignored_Transient.
959 (Is_Finalized_Transient): New routine.
960 (Is_Ignored_Transient): New routine.
961 (Is_Processed_Transient): Removed.
962 (Set_Is_Finalized_Transient): New routine.
963 (Set_Is_Ignored_Transient): New routine.
964 (Set_Is_Processed_Transient): Removed.
965 (Write_Entity_Flags): Output Flag252 and Flag295.
966 * einfo.ads: New attributes Is_Finalized_Transient
967 and Is_Ignored_Transient along with occurrences in
968 entities. Remove attribute Is_Processed_Transient.
969 (Is_Finalized_Transient): New routine along with pragma Inline.
970 (Is_Ignored_Transient): New routine along with pragma Inline.
971 (Is_Processed_Transient): Removed along with pragma Inline.
972 (Set_Is_Finalized_Transient): New routine along with pragma Inline.
973 (Set_Is_Ignored_Transient): New routine along with pragma Inline.
974 (Set_Is_Processed_Transient): Removed along with pragma Inline.
975 * exp_aggr.adb Add with and use clauses for Exp_Ch11 and Inline.
976 (Build_Record_Aggr_Code): Change the handling
977 of controlled record components.
978 (Ctrl_Init_Expression): Removed.
979 (Gen_Assign): Add new formal parameter In_Loop
980 along with comment on usage. Remove local variables Stmt and
981 Stmt_Expr. Change the handling of controlled array components.
982 (Gen_Loop): Update the call to Gen_Assign.
983 (Gen_While): Update the call to Gen_Assign.
984 (Initialize_Array_Component): New routine.
985 (Initialize_Ctrl_Array_Component): New routine.
986 (Initialize_Ctrl_Record_Component): New routine.
987 (Initialize_Record_Component): New routine.
988 (Process_Transient_Component): New routine.
989 (Process_Transient_Component_Completion): New routine.
990 * exp_ch4.adb (Process_Transient_In_Expression): New routine.
991 (Process_Transient_Object): Removed. Replace all existing calls
992 to this routine with calls to Process_Transient_In_Expression.
993 * exp_ch6.adb (Expand_Ctrl_Function_Call): Remove local constant
994 Is_Elem_Ref. Update the comment on ignoring transients.
995 * exp_ch7.adb (Process_Declarations): Do not process ignored
996 or finalized transient objects.
997 (Process_Transient_In_Scope): New routine.
998 (Process_Transients_In_Scope): New routine.
999 (Process_Transient_Objects): Removed. Replace all existing calls
1000 to this routine with calls to Process_Transients_In_Scope.
1001 * exp_util.adb (Build_Transient_Object_Statements): New routine.
1002 (Is_Finalizable_Transient): Do not consider a transient object
1003 which has been finalized.
1004 (Requires_Cleanup_Actions): Do not consider ignored or finalized
1006 * exp_util.ads (Build_Transient_Object_Statements): New routine.
1007 * sem_aggr.adb: Major code clean up.
1008 * sem_res.adb: Update documentation.
1010 2016-07-06 Ed Schonberg <schonberg@adacore.com>
1012 * sem_ch3.adb (Analyze_Subtype_Declaration): For generated
1013 subtypes, such as actual subtypes of unconstrained formals,
1014 inherit predicate functions, if any, from the parent type rather
1015 than creating redundant new ones.
1017 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
1019 * exp_attr.adb, sem_attr.adb, sem_ch13.adb: Minor reformatting.
1021 2016-07-06 Arnaud Charlet <charlet@adacore.com>
1023 * lib.adb (Check_Same_Extended_Unit): Prevent looping forever.
1024 * gnatbind.adb: Disable some consistency checks in codepeer mode,
1025 which are not needed.
1027 2016-07-06 Ed Schonberg <schonberg@adacore.com>
1029 * sem_ch12.adb (Check_Fixed_Point_Actual): Add a warning when
1030 a formal fixed point type is instantiated with a type that has
1031 a user-defined arithmetic operations, but the generic has no
1032 corresponding formal functions. This is worth a warning because
1033 of the special semantics of fixed-point operators.
1035 2016-07-06 Bob Duff <duff@adacore.com>
1037 * sem_attr.adb (Analyze_Attribute): Allow any expression of
1039 * exp_attr.adb (Expand_N_Attribute_Reference): Change the
1040 constant-folding code to correctly handle cases newly allowed
1041 by Analyze_Attribute.
1043 2016-07-05 Eric Botcazou <ebotcazou@adacore.com>
1045 * gcc-interface/decl.c (gnat_to_gnu_entity): Invoke global_bindings_p
1046 last when possible. Do not call elaborate_expression_2 on offsets in
1047 local record types and avoid useless processing for constant offsets.
1049 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1051 * gnat_rm.texi, gnat_ugn.texi,
1052 doc/gnat_ugn/gnat_project_manager.rst,
1053 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1054 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
1055 doc/gnat_ugn/about_this_guide.rst,
1056 doc/gnat_ugn/platform_specific_information.rst,
1057 doc/gnat_ugn/tools_supporting_project_files.rst,
1058 doc/gnat_ugn/gnat_and_program_execution.rst,
1059 doc/gnat_ugn/gnat_utility_programs.rst,
1060 doc/gnat_ugn/the_gnat_compilation_model.rst,
1061 doc/gnat_rm/implementation_defined_attributes.rst,
1062 doc/gnat_rm/implementation_defined_pragmas.rst,
1063 doc/gnat_rm/representation_clauses_and_pragmas.rst,
1064 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1065 doc/gnat_ugn.rst: Update documentation.
1067 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1069 * gcc-interface/Makefile.in: Cleanups.
1071 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1073 * sem_attr.adb (Analyze_Attribute_Old_Result): The attributes can
1074 appear in the postcondition of a subprogram renaming declaration,
1075 when the renamed entity is an attribute reference that is a
1076 function (such as 'Value).
1077 * sem_attr.adb (Eval_Attribute): It doesn't
1078 need to be static, just known at compile time, so use
1079 Compile_Time_Known_Value instead of Is_Static_Expression.
1080 This is an efficiency improvement over the previous bug fix.
1081 * sem_ch13.adb (Analyze_One_Aspect): Use Original_Node to detect
1082 illegal aspects on subprogram renaming declarations that may
1083 have been rewritten as bodies.
1085 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1087 * sem_intr.adb (Errint): Do not emit error message in
1088 Relaxed_RM_Semantics mode.
1090 2016-07-04 Bob Duff <duff@adacore.com>
1092 * sem_attr.adb (Eval_Attribute): The code was assuming
1093 that X'Enum_Rep, where X denotes a constant, can be constant
1094 folded. Fix it so it makes that assumption only when X denotes
1097 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1099 * sem_ch4.adb (Compatible_Types_In_Predicate): New function
1100 to handle cases where a formal of a predicate function and the
1101 corresponding actual have different views of the same type.
1103 2016-07-04 Philippe Gil <gil@adacore.com>
1105 * g-debpoo.adb (Free_Blocks) free blocks also until
1106 Logically_Deallocated less than Maximum_Logically_Freed_Memory
1107 (Dump) add dump of number of traceback & validity elements
1110 2016-07-04 Justin Squirek <squirek@adacore.com>
1112 * sem_ch12.adb (Instantiate_Package_Body): Add
1113 a guard to ignore Itypes which fail when installing primitives.
1115 2016-07-04 Bob Duff <duff@adacore.com>
1117 * sem_eval.adb (Decompose_Expr): Set 'out' parameters
1118 Kind and Cons to valid values, to avoid use of uninit vars.
1119 (Extract_Length): Reorder the check to make it clearer that
1120 we're depending on BOTH Ent1 and Ent2 to be Present.
1121 * sem_aggr.adb (Resolve_Aggregate): Remove dead code.
1122 (Check_Misspelled_Component): Remove exit statement, because
1123 it's covered by the 'while' condition.
1124 * checks.adb (Apply_Selected_Range_Checks): Remove useless
1125 condition "or else not Checks_On".
1126 (Selected_Range_Checks):
1127 Initialize Known_LB and Known_HB to False, because they are
1128 tested unconditionally; avoid use of uninit vars.
1129 * frontend.adb (Frontend): Removed useless condition
1130 "Operating_Mode = Check_Semantics and then", and added an Assert
1131 to clarify why it was useless.
1132 * prep.adb (Preprocess): Remove redundant condition. Add an
1134 * sem_ch10.adb (Analyze_Proper_Body): Moved redundant condition
1135 "Original_Operating_Mode = Generate_Code" to an Assert.
1136 (Process_Spec_Clauses, Process_Body_Clauses): Change parameters
1137 from 'in out' to 'out', and don't initialize actuals.
1138 * sem_ch12.adb (Is_In_Main_Unit): Removed useless condition
1139 "Unum = Main_Unit or else".
1140 (Save_Global_Descendant): Moved
1141 redundant condition "D = Union_Id (No_List)" to an Assert.
1142 * sem_ch4.adb (Check_Misspelled_Selector): Remove exit
1143 statement, because it's covered by the 'while' condition.
1144 (Analyze_Case_Expression): Initialize Wrong_Alt to Empty,
1145 because it looks like it is used uninitialized otherwise.
1146 * sem_ch6.adb (Check_Return_Subtype_Indication): Moved redundant
1147 condition "not R_Type_Is_Anon_Access" to an Assert.
1148 * sem_elim.adb (Line_Num_Match): Moved redundant condition
1149 "Sloc_Trace (Idx) = '['" to an Assert.
1150 * sem_util.adb (Compile_Time_Constraint_Error): Change "J" to
1151 "J - 1". This code is trying to replace "?" with "<", but not if
1152 the "?" is quoted, as in "'?", so we want to check the PREVIOUS
1154 * snames.adb-tmpl (Is_Pragma_Name): Remove useless condition
1155 "or else N = Name_Relative_Deadline". It's useless because
1156 Name_Relative_Deadline is in the range First_Pragma_Name
1157 .. Last_Pragma_Name.
1158 * treepr.adb (Visit_Node): Moved redundant condition "D =
1159 Union_Id (No_List)" to an Assert.
1160 * sem_ch3.adb (Derive_Subprogram, Derive_Subprograms): Change
1161 parameters from 'in out' to 'out'.
1162 * errout.adb (Error_Msg_Internal): Replace redundant test with Assert.
1163 * inline.adb (Add_Inlined_Body): Code cleanup.
1165 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1167 * g-sercom-mingw.adb, sem_ch6.adb: Minor reformatting.
1169 2016-07-04 Olivier Hainque <hainque@adacore.com>
1171 * g-sercom-mingw.adb (Set): Fix port configuration for the
1172 non-blocking + null-timeout case, request of immediate return.
1174 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1176 * sem_ch6.adb (Is_Non_Overriding_Operation): Add guard to test
1177 of generic parent type when operation is a parameterless function
1178 that may dispatch on result.
1180 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1182 * freeze.adb, ghost.adb, sem_ch13.adb: Minor reformatting.
1184 2016-07-04 Pascal Obry <obry@adacore.com>
1186 * g-forstr.ads: More documentation for the Formatted_String
1189 2016-07-04 Justin Squirek <squirek@adacore.com>
1191 * sem_ch7.adb (Install_Parent_Private_Declarations): When
1192 instantiating a child unit, do not install private declaration of
1193 a non-generic ancestor of the generic that is also an ancestor
1194 of the current unit: its private part will be installed when
1195 private part of ancestor itself is analyzed.
1197 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1199 * sem_ch12.adb (Instantiate_Object): In SPARK mode add a guard
1200 to verify that the actual is an object reference before checking
1202 (Check_Generic_Child_Unit): Prevent cascaded errors when prefix
1205 2016-07-04 Gary Dismukes <dismukes@adacore.com>
1207 * sem_ch12.ads, freeze.adb: Minor reformatting and typo fixes.
1209 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1211 * sem_ch13.adb (New_Stream_Subprogram): If the attribute
1212 definition clause comes from an aspect specification, place the
1213 generated subprogram renaming in the freeze actions of the type.
1215 2016-07-04 Philippe Gil <gil@adacore.com>
1217 * g-debpoo.adb (Dump.Do_Report) - add space prefix to backtrace
1218 address dump - avoid new line sent directly to stdout.
1220 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1222 * gnat1drv.adb, sem_ch12.adb, sem_elab.adb, sem_prag.adb, sem_res.adb:
1223 Relax elaboration checks in SPARK_Mode so that we rely on the
1224 static elaboration model (if used). We'll have a more precise
1225 check performed in flow analysis of gnat2why.
1227 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1229 * ghost.adb (Prune_Node): A freeze node for an ignored ghost
1230 entity must be pruned as well.
1232 2016-07-04 Gary Dismukes <dismukes@adacore.com>
1234 * sem_type.adb, einfo.ads, freeze.adb, exp_ch6.adb: Minor reformatting
1237 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1239 * sem_ch3.adb, sem_type.adb, sem_ch12.adb, xref_lib.adb,
1240 freeze.adb, sinput-l.adb, sinput-l.ads, sem_ch4.adb, sem_ch8.adb:
1243 2016-07-04 Justin Squirek <squirek@adacore.com>
1245 * sem_prag.adb (Analyze_Unmodified_Or_Unused and
1246 Analyze_Unreferenced_Or_Unused): Change warning message to be
1247 more clear about pragma duplicates.
1249 2016-07-04 Yannick Moy <moy@adacore.com>
1251 * sinput-l.adb (Create_Instantiation_Source): Set component
1252 Inlined_Call for inherited pragma case.
1253 * sinput.adb, sinput.ads (Instantiation): Return component
1254 Inlined_Call for inherited pragma case.
1256 2016-07-04 Bob Duff <duff@adacore.com>
1258 * sem_type.adb (Remove_Conversions): Protect
1259 the call to Left_Opnd by checking for Nkind in N_Unary_Op --
1260 unary operators do not have a left operand.
1262 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1264 * sem_ch3.adb (Analyze_Object_Declaration): A declaration of a
1265 constant in a protected operation may be a homonym of a private
1266 component of the enclosing protected type. This declaration hides
1267 the component renaming constructed within the protected operation.
1269 2016-07-04 Bob Duff <duff@adacore.com>
1271 * xref_lib.adb (Parse_X_Filename, Parse_Identifier_Info): Ignore
1272 unknown files. Check that File_Nr is in the range of files we
1273 know about. The previous code was checking the lower bound,
1274 but not the upper bound.
1276 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1278 * tracebak.c: Minor reformatting.
1280 2016-07-04 Yannick Moy <moy@adacore.com>
1282 * sem_ch12.adb, sem_ch12.ads Update calls to
1283 Create_Instantiation_Source to use default argument.
1284 (Adjust_Inherited_Pragma_Sloc): New function to adjust sloc
1285 of inherited pragma.
1286 (Set_Copied_Sloc_For_Inherited_Pragma):
1287 New function that wraps call to Create_Instantiation_Source for
1288 copying an inherited pragma.
1289 (Set_Copied_Sloc_For_Inlined_Body): Update call to
1290 Create_Instantiation_Source with new arguments.
1291 * sem_prag.adb (Build_Pragma_Check_Equivalent): In the case
1292 of inherited pragmas, use the generic machinery to get chained
1293 locations for the pragma and its sub-expressions.
1294 * sinput-c.adb: Adapt to new type Source_File_Record.
1295 * sinput-l.adb, sinput-l.ads (Create_Instantiation_Source):
1296 Add parameter Inherited_Pragma and make parameter Inlined_Body
1298 * sinput.adb, sinput.ads (Comes_From_Inherited_Pragma): New
1299 function to return when a location comes from an inherited pragma.
1300 (Inherited_Pragma): New function to detect when a location comes
1301 from an inherited pragma.
1302 (Source_File_Record): New component Inherited_Pragma.
1304 2016-07-04 Yannick Moy <moy@adacore.com>
1306 * sem_elab.adb: Register existence of quickfix for error message.
1308 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1310 * sem_ch4.adb (Resolve_One_Call): In the context of a predicate
1311 function the formal and the actual in a call may have different
1312 views of the same type, because of the delayed analysis of
1313 predicates aspects. Extend the patch that handles this potential
1314 discrepancy to handle private and full views as well.
1315 * sem_ch8.adb (Find_Selected_Component): Refine predicate that
1316 produces additional error when an illegal selected component
1317 looks like a prefixed call whose first formal is untagged.
1319 2016-07-04 Justin Squirek <squirek@adacore.com>
1321 * einfo.adb (Has_Pragma_Unused): Create this function as a setter
1322 for a new flag294 (Set_Has_Pragma_Unused): Create this procedure
1323 as a getter for flag294 (Write_Entity_Flags): Register the new
1325 * einfo.ads Add comment documenting Has_Pragma_Unused (flag294)
1326 and subsequent getter and setter declarations.
1327 * lib-xref.adb (Generate_Reference): Recognize Has_Pragma_Unused
1328 flag to print appropriate warning messages.
1329 * par-prag.adb (Prag): Classify Pragma_Unused into "All Other
1331 * snames.ads-tmpl Add a new name to the name constants and a
1332 new pramga to Pragma_Id for pramga Unused.
1333 * sem_prag.adb (Analyze_Pragma): Create case for Pragma_Unused
1334 and move the block for Pragma_Unmodified and Pragma_Unreferenced
1335 out and into local subprograms.
1336 (Analyze_Unmodified, Analyze_Unreferenced): From the old pragma blocks
1337 that have been separated in to local subprograms add a parameter to
1338 indicate the if they are being called in the context of Pragma_Unused
1339 and handle it accordingly.
1340 (Is_Non_Significant_Pragma_Reference): Add an entry for Pragma_Unused
1341 and correct the position of Pragma_Unevaluated_Use_Of_Old.
1342 * sem_util.adb (Note_Possible_Modification): Recognize
1343 Has_Pragma_Unused flag to print appropriate warning messages.
1345 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1347 * freeze.adb (Check_Inherited_Conditions): Perform two passes over
1348 the primitive operations of the type: one over source overridings
1349 to build the primitives mapping, and one over inherited operations
1350 to check for the need to create wrappers, and to check legality
1351 of inherited condition in SPARK.
1352 * sem_prag.ads (Update_Primitive_Mapping): Make public, for use
1354 * sem_prag.adb (Build_Pragma_Check_Equivalent): Refine error
1355 message in the case of an inherited condition in SPARK that
1356 includes a call to some other overriding primitive.
1358 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1360 * exp_aggr.adb (Ctrl_Init_Expression): New routine.
1361 (Gen_Assign): Code cleanup. Perform in-place side effect removal when
1362 the expression denotes a controlled function call.
1363 * exp_util.adb (Remove_Side_Effects): Do not remove side effects
1364 on a function call which has this behavior suppressed.
1365 * sem_aggr.adb Code cleanup.
1366 * sinfo.adb (No_Side_Effect_Removal): New routine.
1367 (Set_Side_Effect_Removal): New routine.
1368 * sinfo.ads New attribute No_Side_Effect_Removal along with
1369 occurences in nodes.
1370 (No_Side_Effect_Removal): New routine along with pragma Inline.
1371 (Set_Side_Effect_Removal): New routine along with pragma Inline.
1373 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1375 * opt.ads, sem_prag.adb (Universal_Addressing_On_AAMP): Removed.
1376 Remove support for pragma No_Run_Time. Update comments.
1378 2016-07-04 Pascal Obry <obry@adacore.com>
1380 * g-forstr.ads: More documentation for the Formatted_String
1383 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1385 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
1386 'Address): If the address comes from an aspect specification
1387 and not a source attribute definition clause, do not remove
1388 side effects from the expression, because the expression must
1389 be elaborated at the freeze point of the object and not at the
1390 object declaration, because of the delayed analysis of aspect
1393 2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
1397 * gcc-interface/gigi.h (enum standard_datatypes): Add ADT_realloc_decl
1398 (realloc_decl): New macro.
1399 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use local
1400 variable for the entity type and translate it as void pointer if the
1401 entity has convention C.
1402 (gnat_to_gnu_entity) <E_Function>: If this is not a definition and the
1403 external name matches that of malloc_decl or realloc_decl, return the
1404 correspoding node directly.
1405 (gnat_to_gnu_subprog_type): Likewise for parameter and return types.
1406 * gcc-interface/trans.c (gigi): Initialize void_list_node here, not...
1407 Initialize realloc_decl.
1408 * gcc-interface/utils.c (install_builtin_elementary_types): ...here.
1409 (build_void_list_node): Delete.
1410 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Return the
1411 alignment of the system allocator for malloc_decl and realloc_decl.
1412 Do not take alignment from void pointer types either.
1414 2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
1416 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Reorder.
1417 (LANG_HOOKS_INIT_TS): Likewise.
1419 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1421 * sem_prag.adb: Revert unwanted change in previous commit,
1422 only keep message fix.
1424 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1426 * sem_prag.ads (Build_Classwide_Expression): new procedure to
1427 build the expression for an inherited classwide condition, and
1428 to validate such expressions when they apply to an inherited
1429 operation that is not overridden.
1430 * sem_prag.adb (Primitives_Mapping): new data structure to
1431 handle the mapping between operations of a root type and the
1432 corresponding overriding operations of a type extension. Used
1433 to construct the expression for an inherited classwide condition.
1434 (Update_Primitives_Mapping): add to Primitives_Mapping the links
1435 between primitive operations of a root type and those of a given
1437 (Build_Pragma_Check_Equivalent): use Primitives_Mapping.
1438 * sem_ch6.adb (New_Overloaded_Entity): Remove call to
1439 Collect_Iherited_Class_Wide_Conditions in GNATprove_Mode. This
1440 needs to be done at freeze point of the type.
1441 * freeze.adb (Check_Inherited_Conditions): new procedure to
1442 verify the legality of inherited classwide conditions. In normal
1443 compilation mode the procedure determines whether an inherited
1444 operation needs a wrapper to handle an inherited condition that
1445 differs from the condition of the root type. In SPARK mode
1446 the routine invokes Collect_Inherited_Class_Wide_Conditions to
1447 produce the SPARK version of these inherited conditions.
1448 (Freeze_Record_Type): For a type extension, call
1449 Check_Inherited_Conditions.
1451 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1453 * sem_ch3.adb, sem_type.adb, sem.adb, freeze.adb, sem_util.adb,
1454 s-htable.adb, exp_ch11.adb, s-secsta.adb, restrict.adb, exp_disp.adb,
1455 sem_ch8.adb, s-tpobop.adb, exp_aggr.ads, sem_ch13.adb: Minor
1458 2016-06-22 Yannick Moy <moy@adacore.com>
1460 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Inverse order of
1461 treatments so that files without compilation unit are simply skipped
1462 before more elaborate treatments.
1464 2016-06-22 Bob Duff <duff@adacore.com>
1466 * s-memory.ads: Minor typo fixes in comments.
1467 * s-memory.adb: Code cleanup.
1469 2016-05-22 Olivier Hainque <hainque@adacore.com>
1471 * vxworks-crtbe-link.spec: Removed, no longer used.
1473 2016-06-22 Justin Squirek <squirek@adacore.com>
1475 * sem_ch8.adb (Push_Scope): Add a check for when the
1476 scope table is empty to assign the global variable
1477 Configuration_Component_Alignment.
1478 * sem.adb (Do_Analyze): Add Configuration_Component_Alignment
1479 to be assigned when the environment is cleaned instead of the
1481 * sem.ads Add a global variable Configuration_Component_Alignment
1482 to store the value given by pragma Component_Alignment in the
1483 context of a configuration file.
1484 * sem_prag.adb (Analyze_Pragma): Correct the case for
1485 Component_Alignment so that the pragma is verified and add
1486 comments to explain how it is applied to the scope stack.
1488 2016-06-22 Justin Squirek <squirek@adacore.com>
1490 * sprint.adb (Sprint_Node_Actual): Add check in
1491 the case of an N_Object_Declaration when evaluating an expression
1492 to properly ignore errors.
1494 2016-06-22 Bob Duff <duff@adacore.com>
1496 * g-comlin.ads (Parameter_Type): Change subtype of Last to
1498 * g-comlin.adb (Set_Parameter): Change subtype of Last to
1500 (Getopt): Check for Arg = "", and Switches /= "".
1501 (Internal_Initialize_Option_Scan): Check for Argument (Parser,
1504 2016-06-22 Gary Dismukes <dismukes@adacore.com>
1506 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
1508 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1510 * einfo.ads, einfo.adb (Is_Actual_Subtype): New flag, defined
1511 on subtypes that are created within subprogram bodies to handle
1512 unconstrained composite formals.
1513 * checks.adb (Apply_Predicate_Check): Do not generate a check on
1514 an object whose type is an actual subtype.
1515 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate an
1516 actual subtype for a formal whose base type is private.
1517 Set Is_Actual_Subtype on corresponding entity after analyzing
1520 2016-06-22 Justin Squirek <squirek@adacore.com>
1522 * sem_prag.adb (Check_Expr_Is_OK_Static_Expression): Fix ordering
1523 of if-block and add in a condition to test for errors during
1525 * sem_res.adb (Resolution_Failed): Add comment to explain why
1526 the type of a node which failed to resolve is set to the desired
1527 type instead of Any_Type.
1528 * sem_ch8.adb (Analyze_Object_Renaming): Add a check for Any_Type
1529 to prevent crashes on Is_Access_Constant.
1531 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1533 * lib-xref-spark_specific.adb, checks.adb, sem_ch13.adb: Minor
1535 * exp_ch7.adb: Minor typo fix.
1536 * lib.ads (Get_Top_Level_Code_Unit): Add comment.
1538 2016-06-22 Bob Duff <duff@adacore.com>
1540 * s-tassta.adb (Task_Wrapper): Fix handling of Fall_Back_Handler
1541 wrt independent tasks.
1543 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1545 * sem_dim.adb (Analyze_Dimension): Propagate dimension for
1546 explicit_dereference nodes when they do not come from source,
1547 to handle correctly dimensional analysis on iterators over
1548 containers whose elements have declared dimensions.
1550 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1552 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
1553 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
1554 moved into scope of Collect_SPARK_Xrefs.
1555 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
1556 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
1557 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
1559 (Traverse_Compilation_Unit): refactored as a generic procedure.
1560 * types.ads (Unit_Number_Type): range refined.
1562 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1564 * lib-xref-spark_specific.adb, a-cuprqu.ads, sem_ch6.adb: Minor
1567 2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
1569 * sem_util.ads (Address_Value): Declare new function.
1570 * sem_util.adb (Address_Value): New function extracted
1571 unmodified from Apply_Address_Clause_Check, which returns the
1572 underlying value of the expression of an address clause.
1573 * checks.adb (Compile_Time_Bad_Alignment): Delete.
1574 (Apply_Address_Clause_Check): Call Address_Value on
1575 the expression. Do not issue the main warning here and
1576 issue the secondary warning only when the value of the
1577 expression is not known at compile time.
1578 * sem_ch13.adb (Address_Clause_Check_Record): Add A component and
1579 adjust the description.
1580 (Analyze_Attribute_Definition_Clause): In the case
1581 of an address, move up the code creating an entry in the table of
1582 address clauses. Also create an entry for an absolute address.
1583 (Validate_Address_Clauses): Issue the warning for absolute
1584 addresses here too. Tweak condition associated with overlays
1587 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1589 * sem_ch13.adb (Is_Predicate_Static): An inherited predicate
1590 can be static only if it applies to a scalar type.
1592 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1594 * exp_util.adb (Adjust_Result_Type): Convert operand to base
1595 type to prevent spurious constraint checks on subtypes of Boolean.
1597 2016-06-22 Bob Duff <duff@adacore.com>
1599 * debug.adb: Document debug switch -gnatd.o.
1600 * sem_elab.adb (Check_Internal_Call): Debug switch -gnatd.o
1601 now causes a more conservative treatment of indirect calls,
1602 treating P'Access as a call to P in more cases. We Can't make
1603 this the default, because it breaks common idioms, for example
1605 * sem_util.adb: Add an Assert.
1607 2016-06-22 Bob Duff <duff@adacore.com>
1609 * a-cuprqu.ads, a-cuprqu.adb: Completely rewrite this package. Use
1610 red-black trees, which gives O(lg N) worst-case performance on
1611 Enqueue and Dequeue. The previous version had O(N) Enqueue in
1614 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1616 * sem_warn.adb: minor style fix in comment.
1617 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
1618 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
1619 moved into scope of Collect_SPARK_Xrefs.
1620 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
1621 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
1622 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
1624 * sem_ch3.adb (Build_Discriminal): Set Parent of the discriminal.
1626 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1628 * lib-xref-spark_specific.adb (Generate_Dereference): Assignment to not
1629 commented local variables replaced with direct uses of their values.
1631 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1633 * exp_ch7.adb (Add_Invariant): Replace the
1634 current type instance with the _object parameter even in ASIS mode.
1635 (Build_Invariant_Procedure_Body): Do not insert the
1636 invariant procedure body into the tree for ASIS and GNATprove.
1637 (Build_Invariant_Procedure_Declaration): Do not insert the
1638 invariant procedure declaration into the tree for ASIS and
1640 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Update comment.
1642 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1644 * sem_ch6.adb (Set_Actual_Subtypes): If the type of the actual
1645 has predicates, the actual subtype must be frozen properly
1646 because of the generated tests that may follow. The predicate
1647 may be specified by an explicit aspect, or may be inherited in
1650 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1652 * exp_ch4.adb (In_Range_Chec)): New predicate, subsidiary of
1653 Expand_N_In: within an expanded range check that might raise
1654 Constraint_Error do not generate a predicate check as well. It
1655 is redundant because the context will add an explicit predicate
1656 check, and it will raise the wrong exception if it fails.
1657 * lib-xref-spark_specific.adb (Add_SPARK_File): Remove useless checks
1658 since dependency units always have an associated compilation unit.
1660 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1662 * lib.ads: Code cleanup.
1663 * inline.adb: Type refinement for a counter variable.
1664 * lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code.
1667 2016-06-21 Eric Botcazou <ebotcazou@adacore.com>
1669 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New
1671 (set_reverse_storage_order_on_array_type): Likewise.
1672 (gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags.
1673 <E_Array_Subtype>: Likewise.
1674 <E_String_Literal_Subtype>: Likewise.
1675 (substitute_in_type) <ARRAY_TYPE>: Likewise.
1676 * gcc-interface/utils.c (gnat_pushdecl): Always create a variant for
1677 the DECL_ORIGINAL_TYPE of a type.
1679 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1681 * make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
1683 * lib.ads, sem_util.adb: Minor typo in comment.
1685 2016-06-20 Yannick Moy <moy@adacore.com>
1687 * sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
1688 Add parameter Keep_Pragma_Id to optionally keep
1689 the identifier of the pragma instead of converting
1690 to pragma Check. Also set type of new function call
1691 appropriately. (Collect_Inherited_Class_Wide_Conditions):
1692 Call Build_Pragma_Check_Equivalent with the new parameter
1693 Keep_Pragma_Id set to True to keep the identifier of the copied
1695 * sinfo.ads: Add comment.
1697 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1699 * exp_ch7.adb (Build_Invariant_Procedure_Body):
1700 Always install the scope of the invariant procedure
1701 in order to produce better error messages. Do not
1702 insert the body when the context is a generic unit.
1703 (Build_Invariant_Procedure_Declaration): Perform minimal
1704 decoration of the invariant procedure and its formal parameter
1705 in case they are not analyzed. Do not insert the declaration
1706 when the context is a generic unit.
1708 2016-06-20 Ed Schonberg <schonberg@adacore.com>
1710 * sem_ch13.adb (Visible_Component): New procedure, subsidiary
1711 of Replace_Type_References_ Generic, to determine whether an
1712 identifier in a predicate or invariant expression is a visible
1713 component of the type to which the predicate or invariant
1714 applies. Implements the visibility rule stated in RM 13.1.1
1717 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1719 * s-regpat.adb, sem_prag.adb, pprint.adb, sem_ch13.adb: Minor
1722 2016-06-20 Tristan Gingold <gingold@adacore.com>
1724 * make.adb (Check_Standard_Library): Consider system.ads
1725 if s-stalib.adb is not available.
1726 * gnatbind.adb (Add_Artificial_ALI_File): New procedure extracted from
1729 2016-06-20 Thomas Quinot <quinot@adacore.com>
1731 * g-socket.adb (Is_IP_Address): A string consisting in digits only is
1734 2016-06-20 Arnaud Charlet <charlet@adacore.com>
1736 * exp_ch7.adb (Build_Invariant_Procedure_Body):
1737 decorate invariant procedure body with typical properties of
1740 2016-06-20 Arnaud Charlet <charlet@adacore.com>
1742 * a-exetim-darwin.adb: New file.
1744 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
1746 * atree.ads, atree.adb (Elist29): New routine.
1747 (Set_Elist29): New routine.
1748 * atree.h New definition for Elist29.
1749 * einfo.adb Subprograms_For_Type is now an Elist rather than
1750 a node. Has_Invariants is now a synthesized attribute
1751 and does not require a flag. Has_Own_Invariants
1752 is now Flag232. Has_Inherited_Invariants is
1753 Flag291. Is_Partial_Invariant_Procedure is Flag292.
1754 (Default_Init_Cond_Procedure): Reimplemented.
1755 (Has_Inherited_Invariants): New routine.
1756 (Has_Invariants): Reimplemented.
1757 (Has_Own_Invariants): New routine.
1758 (Invariant_Procedure): Reimplemented.
1759 (Is_Partial_Invariant_Procedure): New routine.
1760 (Partial_Invariant_Procedure): Reimplemented.
1761 (Predicate_Function): Reimplemented.
1762 (Predicate_Function_M): Reimplemented.
1763 (Set_Default_Init_Cond_Procedure): Reimplemented.
1764 (Set_Has_Inherited_Invariants): New routine.
1765 (Set_Has_Invariants): Removed.
1766 (Set_Has_Own_Invariants): New routine.
1767 (Set_Invariant_Procedure): Reimplemented.
1768 (Set_Is_Partial_Invariant_Procedure): New routine.
1769 (Set_Partial_Invariant_Procedure): Reimplemented.
1770 (Set_Predicate_Function): Reimplemented.
1771 (Set_Predicate_Function_M): Reimplemented.
1772 (Set_Subprograms_For_Type): Reimplemented.
1773 (Subprograms_For_Type): Reimplemented.
1774 (Write_Entity_Flags): Output Flag232 and Flag291.
1775 * einfo.ads Add new attributes Has_Inherited_Invariants
1776 Has_Own_Invariants Is_Partial_Invariant_Procedure
1777 Partial_Invariant_Procedure Change the documentation
1778 of attributes Has_Inheritable_Invariants Has_Invariants
1779 Invariant_Procedure Is_Invariant_Procedure Subprograms_For_Type
1780 (Has_Inherited_Invariants): New routine along with pragma Inline.
1781 (Has_Own_Invariants): New routine along with pragma Inline.
1782 (Is_Partial_Invariant_Procedure): New routine along with pragma Inline.
1783 (Partial_Invariant_Procedure): New routine.
1784 (Set_Has_Inherited_Invariants): New routine along with pragma Inline.
1785 (Set_Has_Invariants): Removed along with pragma Inline.
1786 (Set_Has_Own_Invariants): New routine along with pragma Inline.
1787 (Set_Is_Partial_Invariant_Procedure): New routine
1788 along with pragma Inline.
1789 (Set_Partial_Invariant_Procedure): New routine.
1790 (Set_Subprograms_For_Type): Update the signature.
1791 (Subprograms_For_Type): Update the signature.
1792 * exp_ch3.adb Remove with and use clauses for Sem_Ch13.
1793 (Build_Array_Invariant_Proc): Removed.
1794 (Build_Record_Invariant_Proc): Removed.
1795 (Freeze_Type): Build the body of the invariant procedure.
1796 (Insert_Component_Invariant_Checks): Removed.
1797 * exp_ch7.adb Add with and use clauses for Sem_Ch6, Sem_Ch13,
1799 (Build_Invariant_Procedure_Body): New routine.
1800 (Build_Invariant_Procedure_Declaration): New routine.
1801 * exp_ch7.ads (Build_Invariant_Procedure_Body): New routine.
1802 (Build_Invariant_Procedure_Declaration): New routine.
1803 * exp_ch9.adb (Build_Corresponding_Record): Do not propagate
1804 attributes related to invariants to the corresponding record
1805 when building the corresponding record. This is done by
1806 Build_Invariant_Procedure_Declaration.
1807 * exp_util.adb (Make_Invariant_Call): Reimplemented.
1808 * freeze.adb (Freeze_Array_Type): An array type requires an
1809 invariant procedure when its component type has invariants.
1810 (Freeze_Record_Type): A record type requires an invariant
1811 procedure when at least one of its components has an invariant.
1812 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Inherit
1813 invariant-related attributes.
1814 (Analyze_Subtype_Declaration):
1815 Inherit invariant-related attributes.
1816 (Build_Derived_Record_Type): Inherit invariant-related attributes.
1817 (Check_Duplicate_Aspects): Reimplemented.
1818 (Get_Partial_View_Aspect): New routine.
1819 (Process_Full_View): Inherit invariant-related attributes. Reimplement
1820 the check on hidden inheritance of class-wide invariants.
1821 (Remove_Default_Init_Cond_Procedure): Reimplemented.
1822 * sem_ch6.adb (Analyze_Subprogram_Specification): Do not modify
1823 the controlling type for an invariant procedure declaration
1825 (Is_Invariant_Procedure_Or_Body): New routine.
1826 * sem_ch7.adb (Analyze_Package_Specification): Build the partial
1827 invariant body in order to preanalyze and resolve all invariants
1828 of a private type at the end of the visible declarations. Build
1829 the full invariant body in order to preanalyze and resolve
1830 all invariants of a private type's full view at the end of
1831 the private declarations.
1832 (Preserve_Full_Attributes): Inherit invariant-related attributes.
1833 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Ensure that
1834 aspects are analyzed with the proper view when the protected type
1835 is a completion of a private type. Inherit invariant-related attributes.
1836 (Analyze_Task_Type_Declaration): Ensure that
1837 aspects are analyzed with the proper view when the task type
1838 is a completion of a private type. Inherit invariant-related
1840 * sem_ch13.adb Remove with and use clauses for Stringt.
1841 (Build_Invariant_Procedure_Declaration): Removed.
1842 (Build_Invariant_Procedure): Removed.
1843 (Freeze_Entity_Checks): Do not build the body of the invariant
1845 The body is built when the type is frozen in Freeze_Type.
1846 (Inherit_Aspects_At_Freeze_Point): Do not inherit any attributes
1847 related to invariants here because this leads to erroneous
1849 (Replace_Node): Rename to Replace_Type_Ref.
1850 * sem_ch13.ads (Build_Invariant_Procedure_Declaration): Removed.
1851 (Build_Invariant_Procedure): Removed.
1852 * sem_prag.adb Add with and use clauses for Exp_Ch7.
1853 (Analyze_Pragma): Reimplement the analysis of pragma Invariant.
1854 * sem_res.adb (Resolve_Actuals): Emit a specialized error when
1855 the context is an invariant.
1856 * sem_util.adb (Get_Views): New routine.
1857 (Incomplete_Or_Partial_View): Consider generic packages when
1858 examining declarations.
1859 (Inspect_Decls): Consider full type
1860 declarations because they may denote a derivation from a
1862 (Propagate_Invariant_Attributes): New routine.
1863 * sem_util.ads (Get_Views): New routine.
1864 (Propagate_Invariant_Attributes): New routine.
1866 2016-06-16 Arnaud Charlet <charlet@adacore.com>
1868 * pprint.adb (Expression_Image): Add better handling of UCs,
1869 we don't want to strip them all for clarity.
1872 2016-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1874 * exp_util.adb (Safe_Unchecked_Type_Conversion): Use "alignment"
1875 instead of "alignement".
1877 2016-06-16 Gary Dismukes <dismukes@adacore.com>
1879 * sem_util.adb: Minor typo fix.
1881 2016-06-16 Emmanuel Briot <briot@adacore.com>
1883 * s-regpat.adb: Further fix for invalid index in GNAT.Regexp.
1885 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
1887 * sem_ch13.adb (Validate_Address_Clauses): Use the same logic to
1888 issue the warning on the offset for the size as for the alignment
1889 and tweak the wording for the sake of consistency.
1891 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1893 * sem_prag.adb (Check_Class_Wide_COndition): New procedure,
1894 subsidiary of Analyze_Pre_Post_ Condition_In_Decl_Part, to
1895 check legality rules that follow from the revised semantics of
1896 class-wide pre/postconditions described in AI12-0113.
1897 (Build_Pragma_Check_Equivalent): Abstract subprogram declarations
1898 must be included in list of overriding primitives of a derived
1901 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1903 * sem_util.adb (May_Be_Lvalue): An actual in an unexpanded
1904 attribute reference 'Read is an assignment and must be considered
1905 a modification of the object.
1907 2016-06-16 Gary Dismukes <dismukes@adacore.com>
1909 * einfo.adb: Minor editorial.
1911 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1913 * sem_prag.adb (Overridden_Ancestor): Clean up code to use
1914 controlling type of desired primitive rather than its scope,
1915 because the primitive that inherits the classwide condition may
1916 comes from several derivation steps.
1918 2016-06-16 Javier Miranda <miranda@adacore.com>
1920 * einfo.adb (Set_Default_Init_Cond_Procedure): Allow calls setting
1921 this attribute to Empty (only if the attribute has not been set).
1922 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
1923 No action needed if the spec was not built.
1924 (Build_Default_Init_Cond_Procedure_Declaration): The spec is
1925 not built if DIC is set to NULL or no condition was specified.
1926 * exp_ch3.adb (Expand_N_Object_Declaration): Check availability
1927 of the Init_Cond procedure before generating code to call it.
1929 2016-06-16 Emmanuel Briot <briot@adacore.com>
1931 * s-regpat.adb: Fix invalid index check when matching end-of-line
1934 2016-06-16 Arnaud Charlet <charlet@adacore.com>
1936 * gnat1drv.adb: Minor reformatting.
1938 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1940 * sem_ch3.adb (Check_Entry_Contracts): New procedure, subsidiary
1941 of Analyze_Declarations, that performs pre-analysis of
1942 pre/postconditions on entry declarations before full analysis
1943 is performed after entries have been converted into procedures.
1944 Done solely to capture semantic errors.
1945 * sem_attr.adb (Analyze_Attribute, case 'Result): Add guard to
1946 call to Denote_Same_Function.
1948 2016-06-16 Emmanuel Briot <briot@adacore.com>
1950 * g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
1952 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
1954 * exp_ch7.adb (Find_Last_Init): Remove obsolete code. The
1955 logic is now performed by Process_Object_Declaration.
1956 (Process_Declarations): Recognize a controlled deferred
1957 constant which is in fact initialized by means of a
1958 build-in-place function call as needing finalization actions.
1959 (Process_Object_Declaration): Insert the counter after the
1960 build-in-place initialization call for a controlled object. This
1961 was previously done in Find_Last_Init.
1962 * exp_util.adb (Requires_Cleanup_Actions): Recognize a controlled
1963 deferred constant which is in fact initialized by means of a
1964 build-in-place function call as needing finalization actions.
1966 2016-06-16 Justin Squirek <squirek@adacore.com>
1968 * exp_aggr.adb (Expand_Array_Aggregate): Minor comment changes and
1969 additional style fixes.
1970 * exp_ch7.adb: Minor typo fixes and reformatting.
1972 2016-06-16 Justin Squirek <squirek@adacore.com>
1974 * sem_ch3.adb (Analyze_Object_Declaration): Add a missing check
1975 for optimized aggregate arrays with qualified expressions.
1976 * exp_aggr.adb (Expand_Array_Aggregate): Fix block and
1977 conditional statement in charge of deciding whether to perform
1978 in-place expansion. Specifically, use Parent_Node to jump over
1979 the qualified expression to the object declaration node. Also,
1980 a check has been inserted to skip the optimization if SPARK 2005
1981 is being used in strict adherence to RM 4.3(5).
1983 2016-06-16 Tristan Gingold <gingold@adacore.com>
1985 * sem_prag.adb (Analyze_Pragma): Simplify code
1986 for Pragma_Priority.
1988 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
1990 * sem_util.ads (Indexed_Component_Bit_Offset): Declare.
1991 * sem_util.adb (Indexed_Component_Bit_Offset): New
1992 function returning the offset of an indexed component.
1993 (Has_Compatible_Alignment_Internal): Call it.
1994 * sem_ch13.adb (Offset_Value): New function returning the offset of an
1995 Address attribute reference from the underlying entity.
1996 (Validate_Address_Clauses): Call it and take the offset into
1997 account for the size warning.
1999 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
2001 * bindgen.adb, exp_util.adb, sem_ch9.adb, sem_util.adb: Minor
2004 2016-06-16 Gary Dismukes <dismukes@adacore.com>
2006 * sem_ch9.adb, sem_util.ads, sem_res.adb: Minor reformatting and typo
2009 2016-06-16 Javier Miranda <miranda@adacore.com>
2011 * sem_res.adb (Resolve): Under relaxed RM semantics silently
2012 replace occurrences of null by System.Null_Address.
2013 * sem_ch4.adb (Analyze_One_Call, Operator_Check): Under
2014 relaxed RM semantics silently replace occurrences of null by
2015 System.Null_Address.
2016 * sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram.
2017 (Replace_Null_By_Null_Address): New subprogram.
2019 2016-06-16 Bob Duff <duff@adacore.com>
2021 * exp_util.adb (Is_Controlled_Function_Call):
2022 This was missing the case where the call is in prefix format,
2023 with named notation, as in Obj.Func (Formal => Actual).
2025 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
2027 * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
2030 2016-06-16 Bob Duff <duff@adacore.com>
2032 * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
2033 (Full_T) crashes when assertions are on.
2034 * sem_ch12.adb (Matching_Actual): Correctly handle the case where
2035 "others => <>" appears in a generic formal package, other than
2038 2016-06-16 Arnaud Charlet <charlet@adacore.com>
2040 * usage.adb: Remove confusing comment in usage line.
2041 * bindgen.adb: Fix binder generated file in codepeer mode wrt
2044 2016-06-16 Javier Miranda <miranda@adacore.com>
2046 * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
2047 never-ending loop, code cleanup; adding also support for Text_IO.
2048 * sem_ch8.adb (Find_Expanded_Name): Invoke
2049 Check_Restriction_No_Use_Entity.
2051 2016-06-16 Tristan Gingold <gingold@adacore.com>
2053 * exp_ch9.adb: Minor comment fix.
2054 * einfo.ads (Has_Protected): Clarify comment.
2055 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
2056 consider private protected types declared in the runtime for
2057 the No_Local_Protected_Types restriction.
2059 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2061 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
2062 subtypes for unconstrained formals when analyzing the generated
2063 body of an expression function, because it may lead to premature
2064 and misplaced freezing of the types of formals.
2066 2016-06-14 Gary Dismukes <dismukes@adacore.com>
2068 * sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
2070 2016-06-14 Tristan Gingold <gingold@adacore.com>
2072 * einfo.adb (Set_Has_Timing_Event): Add assertion.
2073 * sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
2074 name for Propagate_Type_Has_Flags.
2075 * exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
2078 2016-06-14 Bob Duff <duff@adacore.com>
2080 * sem_elab.adb (Check_A_Call): Do nothing if the callee is
2081 (or is in) an instance, and the caller is outside. Misc cleanup.
2083 2016-06-14 Javier Miranda <miranda@adacore.com>
2085 * sem_ch4.adb (Analyze_Quantified_Expression):
2086 Generating C code avoid spurious warning on loop variable of
2087 inlinined postconditions.
2089 2016-06-14 Javier Miranda <miranda@adacore.com>
2091 * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
2092 (Analyze_Attribute [Attribute_Old]): Generating C handle
2093 analysis of 'old in inlined postconditions.
2094 (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
2095 of 'result in inlined postconditions.
2096 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
2097 Generating C handle expansion of 'old in inlined postconditions.
2098 * inline.adb (Declare_Postconditions_Result): New subprogram.
2099 * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
2100 aspects when generating C code since pre/post conditions are
2101 inlined and the frontend inlining relies on this routine to
2103 * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
2104 by Modify_Tree_For_C.
2105 * exp_unst.adb (Visit_Node): Searching for up-level references
2106 skip entities defined in inlined subprograms.
2108 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2110 * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
2113 2016-06-14 Bob Duff <duff@adacore.com>
2115 * sem_elab.adb: Do nothing if the callee is intrinsic.
2116 * sinfo.ads, einfo.ads: Minor comment fixes.
2118 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2120 * contracts.adb (Has_Null_Body): Move to sem_util, for general
2122 * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
2123 determine when an internal procedure created for some assertion
2124 checking (e.g. type invariant) is a null procedure. Used to
2125 eliminate redundant calls to such procedures when they apply to
2126 components of composite types.
2127 * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
2128 if invariant procedure has a null body.
2130 2016-06-14 Thomas Quinot <quinot@adacore.com>
2132 * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
2135 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2137 * exp_ch4.adb (Process_Action): Pass the action
2138 list to Process_Transient_Object.
2139 (Process_If_Case_Statements): Pass the action list to
2140 Process_Transient_Object.
2141 (Process_Transient_Object): Add new parameter Stmts and update the
2142 comment on usage. When the context is a Boolean evaluation, insert
2143 any finalization calls after the last statement of the construct.
2145 2016-06-14 Tristan Gingold <gingold@adacore.com>
2147 * einfo.adb, einfo.ads (Has_Timing_Event,
2148 Set_Has_Timing_Event): Add Has_Timing_Event flag.
2149 (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
2150 (Propagate_Type_Has_Flags): New procedure to factorize code.
2151 * exp_ch3.adb (Expand_Freeze_Array_Type,
2152 Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
2153 * sem_ch3.adb (Access_Type_Decalaration): Initialize
2154 Has_Timing_Event flag. (Analyze_Object_Declaration):
2155 Move code that check No_Local_Timing_Events near
2156 the code that check No_Local_Protected_Objects.
2157 (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
2158 (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
2159 Process_Full_View) (Record_Type_Definition): Call
2160 Propagate_Type_Has_Flags.
2161 * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
2162 * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
2164 (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
2165 * sem_ch9.adb (Analyze_Protected_Definition): Call
2166 Propagate_Type_Has_Flags.
2168 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2170 * sem.ads: Minor style fix.
2172 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2174 * sem_ch12.adb (Analyze_Associations): An actual parameter
2175 with a box must be included in the count of actuals, to detect
2176 possible superfluous named actuals that do not match any of the
2177 formals of the generic unit in a formal package declaration.
2179 2016-06-14 Justin Squirek <squirek@adacore.com>
2181 * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
2182 of error output related to SPARK RM 6.1.7(3) and pragma
2184 * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
2185 output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
2186 * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
2187 related to SPARK RM 7.1.2(15) and pragma Volatile_Function
2188 so that the values True and False are no longer surrounded by
2190 * sem_res.adb (Resolve_Actuals): Fix formatting of error output
2191 related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
2193 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2195 * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
2197 * freeze.adb: Minor grammar fix in comment.
2198 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2200 * lib.adb: Minor reformatting.
2201 * sem_util.adb (Is_OK_Volatile_Context): Do
2202 include Address in the supported attributes.
2204 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2206 * exp_ch4.adb (Expand_N_Case_Expression):
2207 Code cleanup. Finalize any transient controlled
2208 objects on exit from a case expression alternative.
2209 (Expand_N_If_Expression): Code cleanup.
2210 (Process_Actions): Removed.
2211 (Process_If_Case_Statements): New routine.
2212 (Process_Transient_Object): Change the name of formal Rel_Node to
2213 N and update all occurrences. Update the comment on usage. When
2214 the type of the context is Boolean, the proper insertion point
2215 for the finalization call is after the last declaration.
2217 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2219 * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
2220 predicate to determine whether an entity appears in a context
2221 for which a Deferred_Reference was created, because it is not
2222 possible to determine when reference is analyzed whether it
2223 appears in a context in which the entity is modified.
2224 * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
2225 on assignment for an entity that has a deferred_reference.
2227 2016-06-14 Javier Miranda <miranda@adacore.com>
2229 * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
2230 come from source. Previously the reference was generated only if the
2231 call comes from source but the call may be rewritten by the expander
2232 thus causing the notification of spurious warnings.
2234 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2236 * gnat1drv.adb: Remove further references to AAMP.
2237 * checks.adb (Apply_Scalar_Range_Check): Take
2238 Check_Float_Overflow info account.
2239 * live.ads, live.adb Added subprogram headers and
2240 start-of-processing-for comments.
2241 * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
2242 checks when instantiating runtime units in CodePeer mode.
2244 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2246 * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
2249 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2251 * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
2252 simple value propagation in CodePeer mode when warnings are disabled.
2253 (Scan_Front_End_Switches): Enable relevant front-end switches
2256 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2258 * sem_util.adb (Is_OK_Volatile_Context): A
2259 reference to a volatile object is considered OK if appears as
2260 the prefix of attributes Address, Alignment, Component_Size,
2261 First_Bit, Last_Bit, Position, Size, Storage_Size.
2263 2016-06-14 Yannick Moy <moy@adacore.com>
2265 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
2266 subunits directly, as they are already traversed as part of the
2267 top-level unit to which they belong.
2268 (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
2269 (Generate_Dereference): Use unique definition place for special
2270 variable __HEAP, to ensure correct sorting of references.
2271 * lib-xref.adb (Generate_Reference): Use top-level unit in case
2273 * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
2274 compute the top-level code unit for a source location of AST node,
2275 that go past subunits.
2277 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
2279 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
2280 PARM_DECL when the parameter type is dummy.
2281 * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
2284 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
2286 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
2287 PLUS_EXPR in the expression of a renaming.
2289 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
2291 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
2292 with calls to malloc.
2294 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
2296 * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
2297 constant, use the generic implementation of the middle-end; otherwise
2298 turn the dynamic conditions into static conditions and simplify.
2300 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
2302 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
2304 2016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2306 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
2307 gnat_entity_name with temporary names for XUP and XUT types.
2309 2016-06-10 Martin Sebor <msebor@redhat.com>
2312 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
2313 the nonnull attribute in type-generic builtins.
2315 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2317 * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
2318 types are present before returning them. Remove final assertion.
2319 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
2321 <E_Protected_Type>: Likewise.
2323 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2325 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
2326 not elaborate Itypes.
2328 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2330 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
2331 for noinline and noclone attributes.
2332 (handle_noinline_attribute): New handler.
2333 (handle_noclone_attribute): Likewise.
2335 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2337 * gcc-interface/trans.c (process_type): Beef up comment.
2339 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2341 * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
2342 placeholder expressions here but...
2343 * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
2344 Make an exception to the protection of a CALL_EXPR result with an
2345 unconstrained type only in the same cases as Call_to_gnu.
2347 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2349 * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
2350 with boolean rvalues and set the location directly. Do not set the
2351 location in the other cases for a simple name.
2352 (gnat_to_gnu_external): Clear the location on the expression.
2354 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2356 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
2357 useless 'else' statements and tidy up.
2358 <E_Array_Subtype>: Fully deal with the declaration here.
2359 <E_Incomplete_Type>: Use properly-typed constant.
2360 Assert that we don't apply the special type treatment to dummy types.
2361 Separate this treatment from the final back-annotation and simplify
2362 the condition for the RM size.
2363 (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
2364 (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
2365 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
2367 (process_freeze_entity): Remove obsolete code.
2368 (process_type): Minor tweaks.
2370 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2372 * einfo.ads (Returns_Limited_View): Remove.
2373 (Set_Returns_Limited_View ): Likewise.
2374 * einfo.adb (Returns_Limited_View): Likewise.
2375 (Set_Returns_Limited_View ): Likewise.
2376 * freeze.adb (Late_Freeze_Subprogram): Remove.
2377 (Freeze_Entity): Do not defer the freezing of functions returning an
2378 incomplete type coming from a limited context.
2380 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2382 * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
2383 * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
2384 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
2385 of profiles for builtins here... Call gnu_ext_name_for_subprog.
2386 Also update profiles if pointers to limited_with'ed types are
2388 (gnat_to_gnu_param): Restore the correct source location information
2389 for vector ABI warnings.
2390 (associate_subprog_with_dummy_type): Add comment about AI05-019.
2391 Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
2392 (update_profile): Deal with builtin declarations.
2393 Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
2394 (update_profiles_with): Add comment.
2395 (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
2396 Likewise for parameter declarations in most cases. Do not change
2397 the return type for the CICO mechanism if the profile is incomplete.
2398 ...but here instead. Always reset the slot for the parameters.
2399 * gcc-interface/utils.c (create_subprog_decl): Call
2400 gnu_ext_name_for_subprog. Do not set the assembler name here but...
2401 (finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
2403 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2405 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
2406 declaration of the corresponding record type before that of the
2407 unprotected version of the subprograms that operate on it.
2408 (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
2409 just before the original type.
2410 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
2411 declaration to the newly created declaration for the primitive.
2412 (Analyze_Subtype_Declaration): Remove obsolete code forcing the
2413 freezing of the subtype before its declaration.
2414 (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
2415 declaration in the nearest enclosing scope for formal parameters too.
2416 (Build_Derived_Access_Type): Restore the status of the created Itype
2417 after it is erased by Copy_Node.
2418 * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
2419 (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
2420 the specification is present.
2421 Move around the code changing the designated view of the return type
2422 and save the original view. Restore it on exit.
2423 * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
2424 the declaration right after that of the type.
2426 2016-06-01 Simon Wright <simon@pushface.org>
2429 * g-comlin.adb (Display_Section_Help): Do not dereference
2430 Config.Switches if it's null.
2433 2016-05-31 Eric Botcazou <ebotcazou@adacore.com>
2435 * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
2436 (Get_Page_Size): Remove duplicate and return int.
2438 2016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
2441 * s-osinte-rtems.ads (clock_getres): Define.
2442 (Get_Page_Size): Remove duplicate and return int.
2444 2016-05-20 Eric Botcazou <ebotcazou@adacore.com>
2446 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2447 Make same-sized subtypes of signed base types signed.
2448 * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
2449 (unchecked_convert): Likewise.
2451 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2453 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
2454 a specific type for the object if it is deemed a constant.
2456 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2458 * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
2459 components of any elementary types and of composite types.
2461 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2463 * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
2464 of testing for individual sizes.
2465 (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
2466 array types, in particular test for suitable sizes upfront and do not
2467 mimic the processing that will be redone later in Freeze_Array_Type.
2469 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2471 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
2474 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2476 * doc/gnat_rm/implementation_defined_attributes.rst
2477 (Scalar_Storage_Order): Adjust restriction for packed array types.
2478 * einfo.ads (Is_Bit_Packed_Array): Adjust description.
2479 (Is_Packed): Likewise.
2480 (Is_Packed_Array_Impl_Type): Likewise.
2481 (Packed_Array_Impl_Type): Likewise.
2482 * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
2483 if the prefix is not a packed array implemented specially.
2484 * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
2485 bit-packed array types.
2486 * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
2487 the PAT before analyzing its declaration.
2488 (Create_Packed_Array_Impl_Type): Remove redundant statements.
2489 * freeze.adb (Check_Component_Storage_Order): Reject packed array
2490 components only if they are bit packed.
2491 (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
2492 pack for composite types whose size is multiple of a byte.
2493 Create the implementation type for packed array types only when it is
2494 needed, i.e. bit packing or packing because of holes in index types.
2495 Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
2496 * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
2497 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2498 Call maybe_pad_type instead of building the padding type manually.
2499 (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
2500 Packed_Array_Impl_Type is present for packed arrays.
2501 (gnat_to_gnu_component_type): Also handle known alignment for packed
2502 types by passing it to make_packable_type.
2503 * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
2504 and deal with it in the array case. Adjust recursive call. Simplify
2505 computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
2507 2016-05-16 Thomas Quinot <quinot@adacore.com>
2509 * freeze.adb (Check_Component_Storage_Order): Also get full view of
2512 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2514 * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
2515 to capture the value for a small not by-reference record type.
2516 * freeze.ads (Check_Compile_Time_Size): Adjust comment.
2517 * freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
2519 (Check_Compile_Time_Size): Merge scalar and access type cases. Change
2520 variable name in array type case. For the computation of the packed
2521 size, deal with record components and remove redundant test.
2522 (Freeze_Array_Type): Also adjust packing status when the size of the
2523 component type is in the range 33 .. 64 bits.
2524 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
2525 into elementary type throughout. Minor tweaks.
2526 (Alignment Clauses): Document actual alignment of packed array types.
2527 (Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
2528 "simple" to the record case. Document effect on non packable types.
2529 (Pragma Pack for Records): Likewise. Add record case and adjust.
2531 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2533 * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
2534 cross case, use host_noncanonical instead of host as prefix.
2535 (GNATBIND_FOR_HOST): Likewise.
2536 (GNATLINK_FOR_HOST): Likewise.
2537 (GNATLS_FOR_HOST): Likewise.
2539 2016-05-06 Eric Botcazou <ebotcazou@adacore.com>
2542 * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
2543 * system-linux-armeb.ads: Likewise.
2544 * system-linux-mips64el.ads: Likewise.
2545 * system-linux-mips.ads: Likewise.
2546 * system-linux-mipsel.ads: Likewise.
2547 * system-linux-ppc64.ads: Likewise.
2548 * system-linux-sparcv9.ads: Likewise.
2549 * system-rtems.ads: Likewise.
2551 2016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
2553 * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
2554 instead of __getpagesize.
2556 2016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2558 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2561 2016-05-02 Tristan Gingold <gingold@adacore.com>
2563 * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
2566 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2568 * sem_util.adb (Aggregate_Constraint_Checks): Separate
2569 accessibility checks and non-null checks for aggregate components,
2570 to prevent spurious accessibility errors.
2572 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2574 * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
2575 always legal in the in-place initialization of a limited entity
2576 (e.g. an allocator).
2577 * sem_res.adb (Resolve_Allocator): Improve error message with RM
2578 reference when allocator expression is illegal.
2580 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2582 * exp_ch6.adb (Expand_Call): When inlining a call to a function
2583 declared in a package instance, locate the instance node of the
2584 package after the actual package declaration. skipping over
2585 pragmas that may have been introduced when the generic unit
2586 carries aspects that are transformed into pragmas.
2588 2016-05-02 Bob Duff <duff@adacore.com>
2590 * s-memory.adb (Alloc, Realloc): Move checks
2591 for Size = 0 or size_t'Last into the Result = System.Null_Address
2592 path for efficiency. Improve comments (based on actual C language
2593 requirements for malloc).
2594 * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
2595 case where we are using the default Global_Pool_Object, and we
2596 don't need the heavy finalization machinery.
2598 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2600 * exp_util.ads, sem_ch12.adb: Minor reformatting.
2602 2016-05-02 Javier Miranda <miranda@adacore.com>
2604 * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
2605 (Remove_Side_Effects): Adding a new formal.
2606 * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
2607 call to the _Postconditions procedure ensure that side-effects
2608 are unconditionally removed.
2610 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2612 * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
2613 Use original node to determine whether the declaration is for
2614 a formal type declaration, to take into account that formwl
2615 private types are rewritten as private extension declarations
2616 to simplify semantic analysis.
2618 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2620 * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
2623 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2625 * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
2628 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2630 * exp_ch4.adb (Expand_N_Allocator): If the designated type
2631 is a private derived type with no discriminants, examine its
2632 underlying_full_view to determine whether the full view has
2633 defaulted discriminants, so their defaults can be used in the
2634 call to the initialization procedure for the designated object.
2636 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2638 * exp_prag.adb, comperr.adb: Minor reformatting.
2640 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2642 * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
2643 unchecked conversion if the source size is 0 (indicating that
2644 its RM size is unknown). This will happen with packed arrays of
2645 non-discrete types, in which case the component type is known
2648 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2650 * debug.adb: Reserve -gnatd.V.
2652 2016-05-02 Javier Miranda <miranda@adacore.com>
2654 * sem_ch3.adb (Process_Full_View): Remove from visibility
2655 wrappers of synchronized types to avoid spurious errors with
2656 their wrapped entity.
2657 * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
2658 if no interface primitive is covered by the subprogram and this is
2659 not a primitive declared between two views; see Process_Full_View.
2660 (Build_Protected_Sub_Specification): Link the dispatching
2661 subprogram with its original non-dispatching protected subprogram
2662 since their names differ.
2663 (Expand_N_Protected_Type_Declaration):
2664 If a protected subprogram overrides an interface primitive then
2665 do not build a wrapper if it was already built.
2666 * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
2667 * sem_ch4.adb (Names_Match): New subprogram.
2668 * sem_ch6.adb (Check_Synchronized_Overriding): Moved
2669 to library level and defined in the public part of the
2670 package to invoke it from Exp_Ch9.Build_Wrapper_Spec
2671 (Has_Matching_Entry_Or_Subprogram): New subprogram.
2672 (Report_Conflict): New subprogram.
2674 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
2676 * s-unstyp.ads: Code cleanups.
2678 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2680 * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
2682 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2684 * exp_prag.adb (Expand_attributes_In_Consequence,
2685 Expand_Attributes): If the prefix of'Old is an unconstrained type,
2686 for example an unconstrained formal of the enclosing subprogram,
2687 create an object declaration with an expression to obtain the
2688 actual subtype of the temporary.
2690 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2692 * comperr.adb (Delete_SCIL_Files): Add missing handling of
2693 N_Subprogram_Declaration.
2695 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2697 * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
2698 gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
2700 * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
2702 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2704 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
2705 function call may be wrapped in an explicit type conversion.
2707 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
2709 * interfac.ads: use pragma No_Elaboration_Code_All.
2710 * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
2712 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2714 * sem.adb (Analyze: If node is an error node previously created
2715 by the parser, disable expansion to prevent subsequent glitches
2718 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2720 * sem_ch13.adb (Alignment_Error): Removed.
2721 (Get_Alignment_Value): Code cleanup.
2723 2016-05-02 Tristan Gingold <gingold@adacore.com>
2725 * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
2726 to check for the no local protected objects restriction.
2728 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2730 * einfo.adb Anonymous_Master now uses Node35.
2731 (Anonymous_Master): Update the assertion and node reference.
2732 (Set_Anonymous_Master): Update the assertion and node reference.
2733 (Write_Field35_Name): Add output for Anonymous_Master.
2734 (Write_Field36_Name): The output is now undefined.
2735 * einfo.ads Update the node and description of attribute
2736 Anonymous_Master. Remove prior occurrences in entities as this
2737 is now a type attribute.
2738 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
2739 Ins_Node. Anonymous access- to-controlled component types no
2740 longer need finalization masters. The master is now built when
2741 a related allocator is expanded.
2742 (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
2743 detect whether the record type has at least one component of anonymous
2744 access-to- controlled type. These types no longer need finalization
2745 masters. The master is now built when a related allocator is expanded.
2746 * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
2747 (Current_Anonymous_Master): Removed.
2748 (Expand_N_Allocator): Call Build_Anonymous_Master to create a
2749 finalization master for an anonymous access-to-controlled type.
2750 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2751 Call routine Build_Anonymous_Master to create a finalization master
2752 for an anonymous access-to-controlled type.
2753 * exp_ch7.adb (Allows_Finalization_Master): New routine.
2754 (Build_Anonymous_Master): New routine.
2755 (Build_Finalization_Master): Remove formal parameter
2756 For_Anonymous. Use Allows_Finalization_Master to determine whether
2757 circumstances warrant a finalization master. This routine no
2758 longer creates masters for anonymous access-to-controlled types.
2759 (In_Deallocation_Instance): Removed.
2760 * exp_ch7.ads (Build_Anonymous_Master): New routine.
2761 (Build_Finalization_Master): Remove formal parameter For_Anonymous
2762 and update the comment on usage.
2763 * sem_util.adb (Get_Qualified_Name): New routines.
2764 (Output_Name): Reimplemented.
2765 (Output_Scope): Removed.
2766 * sem_util.ads (Get_Qualified_Name): New routines.
2768 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2770 * debug.adb: Document the use of switch -gnatd.H.
2771 * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
2772 -gnatd.H is present.
2773 (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
2774 * opt.ads: Add new option ASIS_GNSA_Mode.
2775 * sem_ch13.adb (Alignment_Error): New routine.
2776 (Analyze_Attribute_Definition_Clause): Suppress certain errors in
2777 ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
2779 (Check_Size): Use routine Size_Too_Small_Error to
2780 suppress certain errors in ASIS mode.
2781 (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
2782 errors in ASIS mode.
2783 (Size_Too_Small_Error): New routine.
2785 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2787 * spark_xrefs.ads Description of the spark cross-references
2788 clarified; small style fixes.
2789 * lib-xref-spark_specific.adb (Add_SPARK_Scope,
2790 Detect_And_Add_SPARK_Scope): consider protected types and bodies
2791 as yet another scopes.
2792 (Enclosing_Subprogram_Or_Library_Package): refactored using
2793 Hristian's suggestions; added support for scopes of protected
2794 types and bodies; fix for entries to return the scope of the
2795 enclosing concurrent type, which is consistent with what is
2796 returned for protected subprograms.
2797 * sem_intr.adb: Minor style fix in comment.
2799 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2801 * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
2802 put_spark_xrefs.adb: Minor reformatting.
2804 2016-05-02 Doug Rupp <rupp@adacore.com>
2806 * g-traceb.ads: Document traceback for ARM.
2808 2016-05-02 Javier Miranda <miranda@adacore.com>
2810 * exp_disp.adb (Make_Tags): Do not generate the
2811 external name of interface tags adding the suffix counter since
2812 it causes problems at link time when the IP routines are inlined
2813 across units with optimization.
2815 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2817 * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
2818 that predicate checking is disabled for predicated subtypes in
2819 the context of an Assertion_Policy pragma.
2820 * checks.adb (Apply_Predicate_Check): Do nothing if
2821 Predicates_Ignored is true.
2822 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
2823 Predicates_Ignores is true, the function Rep_To_Pos does raise
2824 an exception for invalid data.
2825 * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
2826 type do not apply check if Predicates_Ignored is true.
2827 * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
2828 is true, sem_prag.adb:
2829 * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
2830 is true do not emit predicate check on initializing expression.
2832 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2834 * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
2835 they are declared; refine type of a counter from Integer to Natural.
2836 * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
2837 prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
2838 exp_ch3.adb: Minor editing.
2840 2016-05-02 Yannick Moy <moy@adacore.com>
2842 * a-tigeli.adb (Get_Line): Always set Last prior to returning.
2844 2016-05-02 Yannick Moy <moy@adacore.com>
2846 * lib-xref.adb: Minor style fix in whitespace of declarations.
2847 * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
2848 refactored without loops.
2849 * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
2851 * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
2852 of generic procedure.
2854 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2856 * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
2857 (Detect_And_Add_SPARK_Scope): detect and add task type scope.
2858 (Enclosing_Subprogram_Or_Package): Respect boundaries of task
2859 and entry declarations.
2860 * spark_xrefs.ads: minor typo in comment.
2862 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2864 * make.adb: Minor: avoid an exception when calling gnatmake with
2865 no argument and gnatmake is built with checks on.
2866 * lib-xref-spark_specific.adb: Minor code cleanup.
2868 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2870 * sem_util.adb (Normalize_Actuals): Take into account extra
2871 actuals that may have been introduced previously. Normally extra
2872 actuals are introduced when a call is expanded, but a validity
2873 check may copy and reanalyze a call that carries an extra actual
2874 (e.g. an accessibility parameter) before the call itself is
2875 marked Analzyed, and the analysis of the copy has to be able to
2876 cope with the added actual.
2878 2016-05-02 Bob Duff <duff@adacore.com>
2880 * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
2881 treeishness. Previous version had Context_Items shared between
2884 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2886 * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
2887 record cases, apply predicate check on component for expression
2888 only if expression has been analyzed already. For expressions
2889 that need to be duplicated when they cover multiple components,
2890 resolution and predicate checking take place later.
2892 2016-05-02 Olivier Hainque <hainque@adacore.com>
2894 * a-direct.adb (Delete_Tree): Use full names to designate subdirs
2895 and files therein, instead of local names after a change of
2898 2016-05-02 Thomas Quinot <quinot@adacore.com>
2900 * freeze.adb (Check_Component_Storage_Order): Get full view of
2903 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2905 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
2908 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2910 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
2911 of the container base type in case the container is a subtype.
2912 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
2913 the selector has an entity when checking for a component of a
2916 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2919 * opt.ads (Latest_Ada_Only): New flag.
2920 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
2921 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
2922 * einfo.ads (Has_Predicates, Predicate_Function):
2923 Clarify that Has_Predicates does not imply that Predicate_Function
2924 will return a non-empty entity.
2926 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2928 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
2929 check if type requires it.
2930 * checks.adb (Apply_Predicate_Check): Disable checks in the
2931 object declaration created for an expression with side-effects
2932 that requires a predicate check to prevent infinite recursion
2935 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2937 * sem_ch6.adb (Process_Formals): Check properly the type of a
2938 formal to determine whether a given convention applies to it.
2940 2016-05-02 Doug Rupp <rupp@adacore.com>
2942 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
2944 2016-05-02 Thomas Quinot <quinot@adacore.com>
2946 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
2947 error, to have a component with implicit SSO within a composite type
2948 that has explicit SSO.
2950 2016-05-02 Bob Duff <duff@adacore.com>
2952 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
2954 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2956 * repinfo.adb (List_Entities): Make procedure recursive, to
2957 provide representation information for subprograms declared
2958 within subprogram bodies.
2960 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2962 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
2963 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
2964 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
2965 osint.adb: Remove dead code.
2967 2016-05-02 Yannick Moy <moy@adacore.com>
2969 * a-tigeli.adb (Get_Line): Fix bound for test to
2970 decide when to compensate for character 0 added by call to fgets.
2972 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2974 * sem_ch4.adb (Analyze_Allocator): If the expression does not
2975 have a subtype indication and the type is an unconstrained tagged
2976 type with defaulted discriminants, create an explicit constraint
2977 for it during analysis to prevent out-of-order freezing actions
2978 on generated classwide types.
2980 2016-05-02 Javier Miranda <miranda@adacore.com>
2982 * exp_ch5.adb (Expand_N_Assignment_Statement):
2983 In the runtime check that ensures that the tags of source an
2984 target match, add missing displacement of the pointer to the
2985 objects if they cover interface types.
2987 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2989 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
2990 base type for attribute when type is discrete: transformation
2991 is not needed for such types, and leads to spurious errors if
2992 the context is a case construct.
2994 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
2996 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
2997 operand #2 for COMPONENT_REF.
2998 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
2999 (gnat_protect_expr): Likewise.
3000 (gnat_stabilize_reference_1): Likewise.
3001 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
3002 (get_inner_constant_reference): Likewise.
3003 (gnat_invariant_expr): Likewise.
3004 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
3006 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
3008 * gcc-interface/trans.c (Range_to_gnu): New static function.
3009 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
3010 (gnat_to_gnu) <N_In>: Likewise.
3012 2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
3014 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
3015 (check-acats): Use it.
3016 (check_acats_targets): Likewise.
3018 2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
3021 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
3023 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3025 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
3026 incomplete type without full view.
3027 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
3028 return the list of changes.
3029 (Restore_Limited_Views): New procedure to undo the transformation made
3030 by Exchange_Limited_Views.
3031 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
3032 and call Restore_Limited_Views at the end, if need be.
3033 (Possible_Freeze): Do not delay freezing because of incomplete types.
3034 (Process_Formals): Remove kludges for class-wide types.
3035 * types.h (By_Copy_Return): Delete.
3036 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
3037 (TYPE_DUMMY_IN_PROFILE_P): New macro.
3038 * gcc-interface/gigi.h (update_profiles_with): Declare.
3039 (finish_subprog_decl): Likewise.
3040 (get_minimal_subprog_decl): Delete.
3041 (create_subprog_type): Likewise.
3042 (create_param_decl): Adjust prototype.
3043 (create_subprog_decl): Likewise.
3044 * gcc-interface/decl.c (defer_limited_with): Rename into...
3045 (defer_limited_with_list): ...this.
3046 (gnat_to_gnu_entity): Adjust to above renaming.
3047 (finalize_from_limited_with): Likewise.
3048 (tree_entity_vec_map): New structure.
3049 (gt_pch_nx): New helpers.
3050 (dummy_to_subprog_map): New hash table.
3051 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
3052 add FIRST parameter. Deal with the mechanism here instead of...
3053 Do not make read-only variant of types. Simplify expressions.
3054 In the by-ref case, test the mechanism before must_pass_by_ref
3055 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
3056 (gnat_to_gnu_subprog_type): New static function extracted from...
3057 Do not special-case the type_annotate_only mode. Call
3058 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
3059 Deal with dummy return types. Likewise for parameter types. Deal
3060 with by-reference types explicitly and add a kludge for null procedures
3061 with untagged incomplete types. Remove assertion on the types and be
3062 prepared for multiple elaboration of the declarations. Skip the whole
3063 CICO processing if the profile is incomplete. Handle the completion of
3064 a previously incomplete profile.
3065 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
3066 Adjust couple of calls to create_param_decl.
3067 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
3068 Remove specific deferring code.
3069 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
3070 Simplify handling of dummy types and remove obsolete comment.
3071 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
3073 <E_Access_Subtype>: Tweak comment and simplify condition.
3074 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
3075 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
3076 create_subprog_decl.
3077 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
3078 inner break statements. Tidy up condition guarding direct use of the
3080 (get_minimal_subprog_decl): Delete.
3081 (finalize_from_limited_with): Call update_profiles_with on dummy types
3082 with TYPE_DUMMY_IN_PROFILE_P set.
3083 (is_from_limited_with_of_main): Delete.
3084 (associate_subprog_with_dummy_type): New function.
3085 (update_profile): Likewise.
3086 (update_profiles_with): Likewise.
3087 (gnat_to_gnu_profile_type): Likewise.
3088 (init_gnat_decl): Initialize dummy_to_subprog_map.
3089 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
3090 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
3091 TYPE_UNIVERSAL_ALIASING_P.
3092 (gnat_get_array_descr_info): Minor tweak.
3093 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
3094 (build_raise_check): Likewise.
3095 (Compilation_Unit_to_gnu): Likewise.
3096 (Identifier_to_gnu): Accept mismatches coming from a limited context.
3097 (Attribute_to_gnu): Remove kludge for dispatch table entities.
3098 (process_freeze_entity): Do not retrieve old definition if there is an
3099 address clause on the entity. Call update_profiles_with on dummy types
3100 with TYPE_DUMMY_IN_PROFILE_P set.
3101 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
3102 TYPE_REFERENCE_TO to the fat pointer type.
3103 (create_subprog_type): Delete.
3104 (create_param_decl): Remove READONLY parameter.
3105 (finish_subprog_decl): New function extracted from...
3106 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
3107 VOLATILE_FLAG parameters and adjust.
3108 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
3111 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3113 * aa_util.adb, aa_util.ads: Removed, no longer used.
3115 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3117 * sem_prag.adb (Analyze_Pragma): An object
3118 renaming declaration resulting from the expansion of an object
3119 declaration is a suitable context for pragma Ghost.
3121 2016-04-27 Doug Rupp <rupp@adacore.com>
3123 * init.c: Refine last checkin so the only requirement is the
3124 signaling compilation unit is compiled with the same mode as
3125 the compilation unit containing the initial landing pad.
3127 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3129 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
3130 specifications for Default_Iterator, including overloaded cases
3131 where no interpretations are legal, and return types that are
3134 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3136 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
3137 an accessibility check when the left hand side of the assignment
3138 denotes a container cursor.
3139 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
3140 * sem_ch4.adb (Find_Indexing_Operations): New routine.
3141 (Try_Container_Indexing): Code cleanup.
3143 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3145 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
3147 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3149 * errout.adb, errutil.adb: Minor reformatting.
3151 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3153 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
3154 Check that the classwide version is illegal when the prefix is
3155 an operation of an untagged synchronized type.
3157 2016-04-27 Arnaud Charlet <charleT@adacore.com>
3159 * sinput-l.ads, sem_ch13.adb: Minor editing.
3161 2016-04-27 Doug Rupp <rupp@adacore.com>
3163 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
3164 Bump the pc so the lower order bit is set.
3166 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3168 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
3169 enabled, report an empty range in a case construct.
3171 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3173 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
3174 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
3176 2016-04-27 Bob Duff <duff@adacore.com>
3178 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
3179 as is done for the other containers.
3181 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3183 * ghost.adb (In_Subprogram_Body_Profile): New routine.
3184 (Is_OK_Declaration): Treat an unanalyzed expression
3185 function as an OK context. Treat a reference to a Ghost entity
3186 as OK when it appears within the profile of a subprogram body.
3188 2016-04-27 Bob Duff <duff@adacore.com>
3190 * errout.ads: Document the fact that informational messages
3191 don't have to be warnings.
3192 * errout.adb (Error_Msg_Internal): In statistics counts, deal
3193 correctly with informational messages that are not warnings.
3194 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
3195 Set_Posted already checks for errors and ignores others.
3196 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
3197 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
3198 implies Is_Warning_Msg.
3199 * errutil.adb (Error_Msg): In statistics counts, deal correctly
3200 with informational messages that are not warnings.
3202 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3204 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
3205 to determine whether a record type is a null record.
3206 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
3207 null record and there is no expression in the declaration,
3208 no predicate check applies to the object.
3210 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3212 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
3213 instantiated package should not cause freezing of previous contracts.
3215 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3217 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
3218 that do not come from source.
3219 (Analyze_Dimension_Subtype_Declaration): Allow confirming
3220 dimensions on subtype entity, either inherited from base type
3221 or provided by aspect specification.
3223 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3225 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
3226 Add scalar formal object Zero, to allow detection and report
3227 when the matrix is singular.
3228 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
3229 Raise Constraint_Error if the Forward_Eliminate pass has
3230 determined that determinant is Zero.o
3231 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
3233 * s-ngcoar.adb (Solve): Ditto.
3235 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3237 * sem_ch3.adb: Minor reformatting.
3239 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3241 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
3242 that identifier has a usable type before analysis, to handle
3243 properly identifiers introduced after some lexical/syntactic
3244 recovery that created new identifiers.
3246 2016-04-27 Bob Duff <duff@adacore.com>
3248 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
3249 exp_util.adb: Remove assertions that can fail in obscure cases when
3250 assertions are turned on but tampering checks are turned off.
3252 2016-04-27 Javier Miranda <miranda@adacore.com>
3254 * exp_ch6.adb (Add_Call_By_Copy_Code,
3255 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
3256 whose type comes from the limited view.
3258 2016-04-27 Yannick Moy <moy@adacore.com>
3260 * a-textio.adb: Complete previous patch.
3262 2016-04-27 Yannick Moy <moy@adacore.com>
3264 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
3265 Error_Msg_N to issue message about impossibility to inline call,
3266 with slight change of message.
3268 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3270 * exp_spark.adb (Expand_Potential_Renaming): Removed.
3271 (Expand_SPARK): Update the call to expand a potential renaming.
3272 (Expand_SPARK_Potential_Renaming): New routine.
3273 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
3274 * sem.adb Add with and use clauses for Exp_SPARK.
3275 (Analyze): Expand a non-overloaded potential renaming for SPARK.
3277 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3279 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
3280 check full view for the presence of defaulted discriminants,
3281 even when the partial view of a private type has no visible and
3282 no unknown discriminants.
3284 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3286 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
3288 2016-04-27 Nicolas Roche <roche@adacore.com>
3290 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
3292 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3294 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
3295 cleanup. Check the original node when trying to determine the node kind
3296 of pragma Volatile's argument to account for untagged derivations
3297 where the type is transformed into a constrained subtype.
3299 2016-04-27 Olivier Hainque <hainque@adacore.com>
3301 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
3302 consistent posix interface on the caller side.
3304 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3306 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
3307 is a limited view of a type, initialize the Limited_Dependents
3308 field to catch misuses of the type in a client unit.
3310 2016-04-27 Thomas Quinot <quinot@adacore.com>
3312 * a-strunb-shared.adb (Finalize): add missing Reference call.
3313 * s-strhas.adb: minor grammar fix and extension of comment
3314 * sem_ch8.adb: minor whitespace fixes
3316 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3318 * lib-xref.adb (Get_Type_Reference): Handle properly the case
3319 of an object declaration whose type definition is a class-wide
3320 subtype and whose expression is a function call that returns a
3323 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3325 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
3326 (Output_Name): New routine.
3328 2016-04-27 Bob Duff <duff@adacore.com>
3330 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
3332 2016-04-27 Vincent Celier <celier@adacore.com>
3334 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
3335 --unchecked-shared-lib-imports and set the flag
3336 Opt.Unchecked_Shared_Lib_Imports accordingly.
3338 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3340 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
3341 A generic subprogram is never a primitive operation, and thus
3342 a classwide condition for it is not legal.
3344 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3346 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
3349 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3351 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
3352 (Resolve_Actuals): Flag effectively volatile objects with enabled
3353 property Async_Writers or Effective_Reads as illegal.
3354 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
3356 2016-04-27 Javier Miranda <miranda@adacore.com>
3358 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
3359 Do not generate the profile of the equality operator if it has
3360 been explicitly defined as abstract in the parent type. Required
3361 to avoid reporting an spurious error.
3363 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3365 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
3366 procedure to compute the dimension vector of a scalar expression
3367 and compare it with the dimensions if its expected subtype. Used
3368 for the ultimate components of a multidimensional aggregate,
3369 whose components typically are themselves aggregates that are
3370 expanded separately. Previous to this patch, dimensionality
3371 checking on such aggregates generated spurious errors.
3372 * sem_aggr.adb (Resolve_Array_Aggregate): Use
3373 Check_Expression_Dimensions when needed.
3375 2016-04-27 Javier Miranda <miranda@adacore.com>
3377 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
3378 (applicable to E_Procedure).
3379 (Corresponding_Procedure): New attribute (applicable to E_Function).
3380 * exp_util.adb (Build_Procedure_Form): Link the function with
3381 its internally built proc and viceversa.
3382 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
3383 attribute Rewritten_For_C and Corresponding_Procedure to the body.
3384 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
3385 (Rewritten_For_C_Proc_Id): Removed.
3386 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
3387 locate the corresponding procedure.
3389 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3391 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
3392 corresponding pragma.
3394 2016-04-27 Bob Duff <duff@adacore.com>
3396 * exp_ch3.adb: Minor comment improvement.
3398 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3400 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
3401 return type is an untagged limited record with only access
3402 discriminants and no controlled components, the return value does not
3403 need to use the secondary stack.
3405 2016-04-27 Javier Miranda <miranda@adacore.com>
3407 * exp_util.adb (Remove_Side_Effects): When
3408 generating C code handle object declarations that have
3409 discriminants and are initialized by means of a call to a
3412 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3414 * a-textio.adb (Get_Line function): Handle properly the case of
3415 a line that has the same length as the buffer (or a multiple
3416 thereof) and there is no line terminator.
3417 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
3418 in the string when there is no previous line terminator and we
3419 need at most one additional character.
3421 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3423 * s-rident.ads: Make No_Implicit_Loops non partition wide.
3425 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3427 * sem_ch11.adb (Analyze_Handled_Statements): check useless
3428 assignments also in entries and task bodies, not only in
3429 procedures and declaration blocks.
3430 * sem_ch5.adb (Analyze_Block_Statement): check useless
3431 assignements in declaration blocks as part of processing their
3432 handled statement sequence, just like it was done for procedures
3433 and now is also done for entries and task bodies.
3434 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
3435 of entries and task bodies just like of procedures.
3437 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3439 * sem_util.adb (Is_Volatile_Function): Recognize
3440 a function declared within a protected type as well as the
3441 protected/unprotected version of a function.
3443 2016-04-27 Bob Duff <duff@adacore.com>
3445 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
3446 declaration of the form "X : T := Func (...);", where T is
3447 controlled, as a renaming.
3448 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
3449 to be an empty string, instead of null-ing out the Reference.
3450 * exp_util.adb (Needs_Finalization): Remove redundant code.
3452 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3454 * aspects.ads Aspects Export and Import do not require delay. They
3455 were classified as delayed aspects, but treated as non-delayed
3456 by the analysis of aspects.
3457 * freeze.adb (Copy_Import_Pragma): New routine.
3458 (Wrap_Imported_Subprogram): Copy the import pragma by first
3459 resetting all semantic fields to avoid an infinite loop when
3460 performing the copy.
3461 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
3462 comment on the processing of aspects Export and Import
3463 at the freeze point.
3464 (Analyze_Aspect_Convention: New routine.
3465 (Analyze_Aspect_Export_Import): New routine.
3466 (Analyze_Aspect_External_Link_Name): New routine.
3467 (Analyze_Aspect_External_Or_Link_Name): Removed.
3468 (Analyze_Aspect_Specifications): Factor out the analysis of
3469 aspects Convention, Export, External_Name, Import, and Link_Name
3470 in their respective routines. Aspects Export and Import should
3471 not generate a Boolean pragma because their corresponding pragmas
3472 have a very different syntax.
3473 (Build_Export_Import_Pragma): New routine.
3474 (Get_Interfacing_Aspects): New routine.
3476 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3478 * inline.adb (Add_Inlined_Body): Overhaul implementation,
3479 robustify handling of -gnatn1, add special treatment for
3480 expression functions.
3482 2016-04-27 Doug Rupp <rupp@adacore.com>
3484 * g-traceb.ads: Update comment.
3485 * exp_ch2.adb: minor style fix in object declaration
3487 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3489 * sem_elab.adb (Check_Internal_Call): Do not
3490 consider a call when it appears within pragma Initial_Condition
3491 since the pragma is part of the elaboration statements of a
3492 package body and may only call external subprograms or subprograms
3493 whose body is already available.
3494 (Within_Initial_Condition): New routine.
3496 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3498 * exp_util.adb (Build_Procedure_Form): Prevent double generation
3499 of the procedure form when dealing with an expression function
3500 whose return type is an array.
3501 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
3502 * exp_ch6.adb: Proper conversion for inherited operation in C.
3503 * sem_ch6.adb: Code cleanup.
3505 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3507 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
3508 * g-socket.adb: Minor reformatting.
3509 * sinfo.ads: Minor comment correction.
3510 * sem_warn.ads: minor grammar fix in comment
3512 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3514 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
3515 (maybe_pad_type): Adjust comment.
3516 (finish_record_type): Likewise.
3517 (rest_of_record_type_compilation): Likewise.
3518 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
3519 parameter from integer to boolean. Adjust recursive calls.
3520 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
3521 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
3522 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
3523 Pass false to finish_record_type. Set the debug type later.
3524 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
3525 (gnat_to_gnu_component_type): Fix formatting.
3526 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
3527 (gnat_to_gnu_type): Likewise.
3528 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
3529 (Loop_Statement_to_gnu): Likewise.
3530 (Subprogram_Body_to_gnu): Likewise.
3531 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
3532 (Exception_Handler_to_gnu_gcc): Likewise.
3533 (Compilation_Unit_to_gnu): Likewise.
3534 (gnat_to_gnu): Likewise.
3535 (push_exception_label_stack): Likewise.
3536 (elaborate_all_entities_for_package): Likewise.
3537 (process_freeze_entity): Likewise.
3538 (process_decls): Likewise.
3539 (process_type): Likewise.
3540 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
3541 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
3542 call to rest_of_record_type_compilation.
3543 (rest_of_record_type_compilation): Use copy_type.
3544 (copy_type): Use correctly typed constants.
3545 (gnat_signed_or_unsigned_type_for): Use copy_type.
3546 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
3547 (build_goto_raise): Adjust call tognat_to_gnu_entity.
3549 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3551 * gcc-interface/misc.c (gnat_init): Do not call
3552 internal_reference_types.
3554 2016-04-27 Svante Signell <svante.signell@gmail.com>
3556 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
3557 * s-osinte-gnu.ads: Small tweaks.
3558 * s-osinte-gnu.adb: New file.
3560 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3562 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
3563 constituent even if it is not to prevent spurious errors.
3565 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3567 * sem_ch4.adb: Minor typo fixes and reformatting.
3569 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
3571 * g-calend.ads (No_Time): The same value in any timezone.
3572 * g-socket.adb (Raise_Host_Error): Remove ending
3573 dot from original error message before append colon delimited
3576 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3578 * sem_ch3.adb: Code cleanup.
3579 * sem_ch6.adb: Code cleanup.
3580 (Is_Matching_Limited_View): New routine.
3581 (Matches_Limited_With_View): Reimplemented.
3582 * sem_ch10.adb (Decorate_Type): Code cleanup.
3584 2016-04-21 Doug Rupp <rupp@adacore.com>
3586 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
3588 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3590 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
3591 indexing functions, collect all overloadings of the call firts,
3592 and then transfer them to indexing node, to prevent interleaving
3593 of the set of interpretations of the nodes involved.
3594 * sem_res.adb (Resolve): Suppress cascaded errors that report
3595 ambiguities when one of the actuals in an overloaded generatlized
3596 indexing operation is illegal and has type Any_Type, as is done
3597 for similar cascaded errors in subprogram calls.
3598 (Valid_Tagged_Conversion): Cleanup conversion checks when one
3599 of the types involved is a class-wide subtype.
3601 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3603 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
3604 subprogram declaration within a wrapper package, skip pragmas
3605 that may have been generated by aspect specifications on the
3608 2016-04-21 Javier Miranda <miranda@adacore.com>
3610 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
3611 code return True for array identifiers since the backend needs
3612 to initialize such component by means of memcpy().
3614 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3616 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
3617 potentially uninitialized memory.
3618 * sem_ch3.adb: Minor style fix in comment.
3620 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3622 * gnat_rm.texi, gnat_ugn.texi,
3623 doc/gnat_ugn/gnat_project_manager.rst,
3624 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3625 doc/gnat_ugn/gnat_and_program_execution.rst,
3626 doc/gnat_ugn/gnat_utility_programs.rst,
3627 doc/gnat_ugn/the_gnat_compilation_model.rst,
3628 doc/gnat_rm/implementation_defined_attributes.rst,
3629 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3630 doc/gnat_rm/implementation_defined_pragmas.rst,
3631 doc/gnat_rm/the_gnat_library.rst,
3632 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
3633 * doc/Makefile: Cleanups.
3635 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3637 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
3639 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3641 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
3642 disambiguate local variables that may be hidden from inner visibility
3643 by nested block declarations or loop variables.
3645 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
3647 * s-soflin.adb: Initialize the Stack_Limit global variable.
3649 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3651 * lib-writ.adb: Minor reformatting.
3653 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3655 * exp_pakd.adb (Compute_Number_Components): New function to
3656 build an expression that computes the number of a components of
3657 an array that may be multidimensional.
3658 (Expan_Packed_Eq): Use it.
3660 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3662 * g-traceb.ads: Update list of supported platforms.
3664 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3666 * sem_ch13.adb (Add_Predicates): if the type is declared in
3667 an inner package it may be frozen outside of the package, and
3668 the generated pragma has not been analyzed yet, the expression
3669 for the predicate must be captured and added to the predicate
3670 function at this point.
3672 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3674 * contracts.adb (Analyze_Package_Body_Contract): Do not check
3675 for a missing package refinement because 1) packages do not have
3676 "refinement" and 2) the check for proper state refinement is
3677 performed in a different place.
3678 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
3679 (Has_Null_Visible_Refinement): Reimplemented.
3680 * sem_ch3.adb (Analyze_Declarations): Determine whether all
3681 abstract states have received a refinement and if not, emit
3683 * sem_ch7.adb (Analyze_Package_Declaration): Code
3684 cleanup. Determine whether all abstract states of the
3685 package and any nested packages have received a refinement
3686 and if not, emit errors.
3687 (Requires_Completion_In_Body): Add new formal parameter
3688 Do_Abstract_States. Update the comment on usage. Propagate the
3689 Do_Abstract_States flag to all Unit_Requires_Body calls.
3690 (Unit_Requires_Body): Remove formal
3691 parameter Ignore_Abstract_States. Add new formal paramter
3692 Do_Abstract_States. Propagate the Do_Abstract_States flag to
3693 all Requires_Completion_In calls.
3694 * sem_ch7.ads (Unit_Requires_Body): Remove formal
3695 parameter Ignore_Abstract_States. Add new formal paramter
3696 Do_Abstract_States. Update the comment on usage.
3697 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
3698 not initialize the constituent list as this is now done on a
3699 need-to-add-element basis.
3700 (Analyze_Single_Task_Declaration):
3701 Do not initialize the constituent list as this is now done on
3702 a need-to-add-element basis.
3703 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
3704 lists as this is now done on a need-to-add-element basis.
3705 * sem_prag.adb (Analyze_Constituent): Set the
3706 refinement constituents when adding a new element.
3707 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
3708 adding a new element.
3709 (Analyze_Part_Of_Option): Set the Part_Of
3710 constituents when adding a new element.
3711 (Analyze_Pragma): Set the Part_Of constituents when adding a new
3713 (Check_Constituent_Usage (all versions)): Reimplemented.
3714 (Collect_Constituent): Set the refinement constituents when adding
3716 (Create_Abstract_State): Do not initialize the
3717 constituent lists as this is now done on a need-to-add-element basis.
3718 (Propagate_Part_Of): Set the Part_Of constituents when
3719 adding a new element.
3720 * sem_util.adb (Check_State_Refinements): New routine.
3721 (Has_Non_Null_Refinement): Reimplemented.
3722 (Has_Null_Refinement): Reimplemented.
3723 (Requires_State_Refinement): Removed.
3724 * sem_util.ads (Check_State_Refinements): New routine.
3725 (Requires_State_Refinement): Removed.
3727 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3729 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
3730 * sem.adb: Fix comment.
3732 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3734 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
3735 declaration with no aspects, whose subtype_mark is a subtype
3736 with predicates, inherits the list of subprograms for the type.
3738 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3740 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
3743 2016-04-21 Thomas Quinot <quinot@adacore.com>
3745 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
3747 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3749 * lib-writ.adb (Write_ALI): Do not record in ali file units
3750 that are present in the files table but not analyzed. These
3751 units are present because they appear in the context of units
3752 named in limited_with clauses, and the unit being compiled does
3753 not depend semantically on them.
3755 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3757 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
3758 create the procedure body for an function returning an array type,
3759 when generating C code. Reuse the subprogram body rather than
3760 creating a new one, both as an efficiency measure and because
3761 in an instance the body may contain global references that must
3764 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3766 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
3769 2016-04-21 Javier Miranda <miranda@adacore.com>
3771 * exp_aggr.adb (Component_Check): Extend
3772 the check that verifies that the aggregate has no function
3773 calls to handle transformations performed by the frontend.
3774 (Ultimate_Original_Expression): New subprogram.
3776 2016-04-21 Philippe Gil <gil@adacore.com>
3778 * krunch.adb (Krunch): Fix krunching of i-java.
3780 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3782 * exp_ch8.adb (Evaluation_Required): Always return
3783 True when Modify_Tree_For_C.
3785 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3787 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
3788 * alloc.ads: Minor comment fixes.
3789 * einfo.ads: Fix typo.
3791 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3793 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
3794 changes to handle all cases of components depending on the
3795 discriminant, not just string literals.
3797 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3799 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
3800 declaration is the generated declaration for a generic actual,
3801 inherit predicates from the actual if it is a predicated subtype.
3803 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3805 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
3806 inherited and its result is controlling, introduce a conversion
3807 on the actual for the corresponding procedure call, to avoid
3808 spurious type errors.
3810 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
3812 * krunch.adb (Krunch): Fix krunching of i-vxworks.
3814 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3816 * exp_aggr.adb: Minor reformatting and code cleanup.
3818 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3820 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
3821 resolution, because they introduce local names. Full resolution
3822 will take place when predicate function is constructed.
3824 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3826 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
3827 change to take into account Per_Object_Constraint field rather
3828 than special casing strings.
3829 * exp_ch6.adb: Fix typo in Replace_Returns.
3831 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3833 * sem_ch5.adb: Minor reformatting.
3835 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3837 * exp_aggr.adb (Backend_Processing_Possible): Return False
3838 when generating C and aggregate contains function calls.
3840 2016-04-21 Tristan Gingold <gingold@adacore.com>
3842 * krunch.adb (Krunch): Only partially krunch children of
3843 Interfaces that aren't known.
3845 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3847 * sem_prag.adb (Make_Inline): Handle properly the instantiation
3848 of a generic subpprogram that carries an Inline aspect. Place
3849 inline info on the anonymous subprogram that is constructed in
3850 the wrapper package.
3851 (Analyze_Pragma, case Pure): Do not check placement if pragma
3852 appears within an instantiation, which can be nested at any level.
3853 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
3854 node from anonymous subprogram to its visible renaming. The
3855 freeze node will be constructed if the subprogram carries
3857 (Set_Global): Preserve dimension information if present (from
3860 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
3862 * gnatlink.adb: Change wording of the warning message on
3863 problematic filenames to be more neutral. Add a new substring
3864 "patch" introduced on Windows 10.
3866 2016-04-21 Philippe Gil <gil@adacore.com>
3868 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
3870 2016-04-21 Javier Miranda <miranda@adacore.com>
3872 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
3875 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3877 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
3878 * einfo.ads New synthesized attribute
3879 Has_Non_Null_Abstract_State along with occurrences in entities.
3880 (Has_Non_Null_Abstract_State): New routine.
3881 * sem_ch7.adb (Unit_Requires_Body): Add local variable
3882 Requires_Body. A package declaring an abstract state requires
3883 a body only when the state is non-null and the package contains
3884 at least one other construct that requires completion in a body.
3885 * sem_util.adb (Mode_Is_Off): Removed.
3886 (Requires_State_Refinement): Remove an obsolete check. Code
3889 2016-04-21 Bob Duff <duff@adacore.com>
3891 * sem_attr.adb (Analyze_Attribute): In processing
3892 the 'Old attribute, a warning is given for infinite recursion. Fix
3893 the code to not crash when the prefix of 'Old denotes a protected
3895 * sem_ch5.adb (Analyze_Iterator_Specification):
3896 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
3897 where the parameter would not be an object.
3899 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3901 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
3902 Etype or Underlying_Type of the operands.
3904 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3906 * atree.adb (Print_Statistics): Protect against overflows and
3907 print the memory consumption in bytes.
3908 * table.adb (Reallocate): Do the intermediate calculation of the new
3909 size using the Memory.size_t type.
3911 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3913 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
3914 expansion of Attribute_Machine and Attribute_Model for AAMP.
3916 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3918 * freeze.adb: Disable previous change for now.
3920 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3922 * sem_ch8.adb (Find_Selected_Component): If prefix has an
3923 access type and designated type is a limited view, introduce
3924 an explicit dereference before continuing the analysis, and
3925 set its type to the non-limited view of the designated type,
3926 if we are in context where it is available.
3928 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3930 * freeze.adb: Freeze profile in ASIS mode.
3932 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3934 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
3935 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
3937 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3939 * exp_ch6.adb: Minor reformatting.
3941 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3943 * sem_ch13.adb: Minor comment update.
3945 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3947 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
3948 boolean parameter to determine whether freezing an overloadable
3949 entity freezes its profile as well. This is required by
3950 AI05-019. The call to Freeze_Profile within Freeze_Entity is
3951 conditioned by the value of this flag, whose default is True.
3952 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
3953 reference freezes the prefix, but it the prefix is a subprogram
3954 it does not freeze its profile.
3956 2016-04-21 Javier Miranda <miranda@adacore.com>
3958 * exp_util.adb (Build_Procedure_Form): No action needed for
3959 subprogram renamings since the backend can generate the call
3960 using the renamed subprogram. This leaves the tree more clean
3962 * exp_ch6.adb (Expand_Call): Extend previous patch for
3963 rewritten-for-c entities to handle subprogram renamings.
3964 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
3966 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3968 * sem_ch13.adb: Code cleanup.
3970 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3972 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
3973 created for SPARK_To_C, the entity must remain invisible so it
3974 does not overload subsequent references to the original function.
3975 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
3976 Handle Extended_Return_Statements by replacing it with a block
3977 with assignments and a simple return statement.
3978 * exp_util.adb (Build_Procedure_Form): Make procedure entity
3979 invisible after analyzing declaration, to prevent improper
3982 2016-04-21 Javier Miranda <miranda@adacore.com>
3984 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
3985 attribute Rewritten_For_C to the body since since the expander
3986 may generate calls using that entity.
3987 * exp_ch6.adb (Expand_Call): For internally generated
3988 calls ensure that they reference the entity of the spec
3989 of the called function.
3990 (Rewritten_For_C_Func_Id): New subprogram.
3991 (Rewritten_For_C_Proc_Id): New subprogram.
3992 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
3993 ensure that we skip freezing entities.
3994 * exp_util.adb (Build_Procedure_Form): No action needed if the
3995 procedure was already built.
3997 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3999 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
4002 2016-04-21 Ed Schonberg <schonberg@adacore.com>
4004 * sem_util.adb (Denotes_Iterator): Use root type to determine
4005 whether the ultimate ancestor is the predefined iterator
4007 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
4008 and avoid reuse of Pack local variable.
4010 2016-04-21 Olivier Hainque <hainque@adacore.com>
4012 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4013 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4014 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
4015 Executable_Extension to ".out".
4017 2016-04-21 Javier Miranda <miranda@adacore.com>
4019 * frontend.adb: Update call to Unnest_Subprograms.
4020 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
4021 (Unnest_Subprograms): Moved to package exp_unst.
4022 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
4024 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
4025 enumeration literals when generating C code.
4027 2016-04-21 Javier Miranda <miranda@adacore.com>
4029 * frontend.adb: Remove call to initialize Exp_Ch6.
4030 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
4031 (Unest_Entry/Unest_Bodies): Removed.
4032 (Unnest_Subprograms): Code cleanup.
4034 2016-04-21 Arnaud Charlet <charlet@adacore.com>
4036 * set_targ.adb (Read_Target_Dependent_Values):
4037 close target description file once its contents is read.
4038 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
4039 and Stderr_File): Close local file descriptors before spawning
4041 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
4042 local variables to make the code easier to understand and avoid
4043 duplicated calls to Parent and Generic_Parent.
4045 2016-04-20 Bob Duff <duff@adacore.com>
4047 * s-os_lib.ads: Minor comment fix.
4049 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4051 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
4052 a discriminant check for a type whose partial view has unknown
4053 discriminants when the full view has discriminants with defaults.
4055 2016-04-20 Javier Miranda <miranda@adacore.com>
4057 * exp_util.adb (Remove_Side_Effects): When generating C code
4058 remove side effect of type conversion of access to unconstrained
4060 (Side_Effect_Free): Return false for the type
4061 conversion of access to unconstrained array type when generating
4063 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
4064 of access to unconstrained array type conversion when generating
4067 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4069 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
4070 function, to construct the declaration of a predicate function
4071 at the end of the current declarative part rather than at the
4072 (possibly later) freeze point of the type. This also allows uses
4073 of a type with predicates in instantiations elsewhere.
4074 (Resolve_Aspect_Expression): New procedure to detect visiblity
4075 errors in aspect expressions, at the end of the declarative part
4076 that includes the type declaration.
4077 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
4078 predicate function from private to full view.
4079 * einfo.adb (Predicate_Function): Refine search for predicate
4080 function when type has a full view and predicate function may
4081 be defined on either view.
4083 2016-04-20 Javier Miranda <miranda@adacore.com>
4085 * frontend.adb: Passing the root of the tree to
4086 Unnest_Subprograms().
4087 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
4088 took care of adding subprograms to the Unest_Bodies table since
4089 performing such action too early disables the ability to process
4090 generic instantiations.
4091 (Unnest_Subprograms): Adding parameter.
4092 (Search_Unnesting_Subprograms): New subprogram.
4093 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
4095 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4097 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
4099 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4101 * exp_unst.adb (Check_Static_Type): For a private type, check
4104 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4106 * sem_attr.adb (Check_Type): Reject an attribute reference in
4107 an aspect expression, when the prefix of the reference is the
4108 current instance of the type to which the aspect applies.
4110 2016-04-20 Bob Duff <duff@adacore.com>
4112 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
4113 hiding unless we're actually hiding something. The previous
4114 code would (for example) warn about a "<" on a record type
4115 because it incorrectly thought it was hiding the "<" on Boolean
4116 in Standard. We need to check that the homonym S is in fact a
4117 homograph of a predefined operator.
4119 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4121 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
4122 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
4123 procedure equivalent to a function returning an array, when this
4124 construction is deferred to the freeze point of the function.
4125 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
4126 function that renames an instance of Unchecked_Conversion.
4127 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
4128 declaration for a function returning an array.
4129 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
4131 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4133 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
4134 New predicate to determine that in a context with full run-time,
4135 a function call is an expansion of a reference to attribute
4137 * sem_ch5.adb (Analyze_Function_Call): use it.
4138 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
4140 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4142 * einfo.adb Flag286 is now used as Is_Exception_Handler.
4143 (Is_Exception_Handler): New routine.
4144 (Set_Is_Exception_Handler): New routine.
4145 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
4146 * einfo.ads New attribute Is_Exception_Handler along with
4147 occurrences in entities.
4148 (Is_Exception_Handler): New routine along with pragma Inline.
4149 (Set_Is_Exception_Handler): New routine along with pragma Inline.
4150 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
4151 for exception handlers with a choice parameter.
4152 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
4153 generated for a choice parameter as an exception handler.
4155 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4157 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
4158 (Constrain_Discriminated_Type): In an instance, if the type has
4159 unknown discriminants, use its full view.
4160 (Process_Subtype): Check that the base type is private before
4161 adding subtype to Private_Dependents list.
4163 2016-04-20 Bob Duff <duff@adacore.com>
4165 * sem_ch13.adb: Minor comment fix.
4167 2016-04-20 Yannick Moy <moy@adacore.com>
4169 * sem_ch4.adb: Fix typos in comments.
4170 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
4172 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4174 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
4175 current instance of a task type is legal if the prefix is an
4176 expression of that task type and the selector is an entry or
4179 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4181 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
4182 varsize field at the end for efficiency.
4184 2016-04-20 Vincent Celier <celier@adacore.com>
4186 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
4187 ls" includes the switch -V.
4188 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
4190 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
4193 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4195 * sem_ch12.adb (Qualify_Type): Do not perform
4196 partial qualification when the immediate scope is a generic unit.
4198 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4200 * exp_unst.adb: Minor reformatting.
4202 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4204 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
4205 tag assignment and adjustment preceed the accessibility check.
4206 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
4208 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4210 * exp_prag.adb (Expand_Attributes): Ensure that
4211 the temporary used to capture the value of attribute 'Old's
4212 prefix is properly initialized.
4214 2016-04-20 Javier Miranda <miranda@adacore.com>
4216 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
4219 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4221 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
4224 2016-04-20 Vincent Celier <celier@adacore.com>
4226 * make.adb: Code cleanup.
4228 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4230 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
4233 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4235 * sem_ch12.adb (Copy_Generic_Node): Handle the special
4236 qualification installed for universal literals that act as
4237 operands in binary or unary operators. (Qualify_Operand): Mark
4238 the qualification to signal the instantiation mechanism how to
4239 handle global reference propagation.
4240 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
4241 (Set_Is_Qualified_Universal_Literal): New routine.
4242 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
4243 with occurrences in nodes.
4244 (Is_Qualified_Universal_Literal):
4245 New routine along with pragma Inline.
4246 (Set_Is_Qualified_Universal_Literal): New routine along with
4249 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4251 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
4252 so that the corresponding checks are preserved across compilations
4253 that include System.Constants in their context.
4255 2016-04-20 Gary Dismukes <dismukes@adacore.com>
4257 * sem_type.adb: Minor typo fix and reformatting.
4258 * a-conhel.ads: Update comment.
4260 2016-04-20 Bob Duff <duff@adacore.com>
4262 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
4263 code so it doesn't trigger an "uninit var" warning.
4265 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4267 * sem_attr.ads Add new table Universal_Type_Attribute.
4268 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
4269 checking attributes.
4271 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4273 * exp_aggr.adb (Init_Stored_Discriminants,
4274 Init_Visible_Discriminants): New procedures, subsidiary of
4275 Build_Record_Aggr_Code, to handle properly the construction
4276 of aggregates for a derived type that constrains some parent
4277 discriminants and renames others.
4279 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4281 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
4282 (Save_References_In_Operator): Add explicit qualifications in
4283 the generic template for all operands of universal type.
4284 * sem_type.adb (Disambiguate): Update the call to Matches.
4285 (Matches): Reimplemented.
4286 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
4288 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4290 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
4291 an illegal aspect that freezes the entity to which it applies.
4293 2016-04-20 Bob Duff <duff@adacore.com>
4295 * a-stwibo.ads, a-stzbou.ads
4296 ("="): Add overriding keyword before function to avoid crash when
4297 compiler is called with -gnatyO (check overriding indicators).
4299 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4301 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
4302 is a configuration pragma and it uses the ARG syntax, insert
4303 the rewritten pragma after the current one rather than using
4306 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4308 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
4311 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4313 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
4314 s-imglli.adb: Minor reformatting.
4316 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4318 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
4319 renamed operator when the associated node appears within a
4321 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
4323 2016-04-20 Yannick Moy <moy@adacore.com>
4325 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
4326 * einfo.adb (Set_Overridden_Operation): Add assertion.
4327 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
4330 2016-04-20 Javier Miranda <miranda@adacore.com>
4332 * exp_unst.adb (Append_Unique_Call): New subprogram.
4333 (Unnest_Subprogram): Replace the unique occurrence
4334 of Call.Append() by Append_Unique_Call() which protects us from
4335 adding to the Calls table duplicated entries.
4337 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4339 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
4340 * xref_lib.ads (Dependencies_Tables): instantiate
4341 Table package with types that guarantee its safe use.
4342 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
4345 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4347 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
4348 Disable expansion when generating C code.
4349 * sinfo.ads, inline.ads: Minor editing.
4351 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4353 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
4356 2016-04-20 Javier Miranda <miranda@adacore.com>
4358 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
4359 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
4360 declaration of the internally built _postcondition procedure.
4362 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4364 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
4366 * sem_util.adb (Is_Unchecked_Conversion_Instance):
4367 defense against library-level renamings of other functions,
4368 which are never instances of Unchecked_Conversion.
4369 * einfo.ads: minor fix of casing in comment
4371 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4373 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
4374 that has been analyzed and expanded already. Qualify the names
4375 in the proper body for use in the generation of C code.
4377 2016-04-20 Javier Miranda <miranda@adacore.com>
4379 * contracts.adb (Build_Postconditions_Procedure): Force its
4380 inlining when generating C code.
4381 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
4382 _postconditions when generating C code.
4383 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
4384 _postconditions when generating C code.
4385 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
4386 types of return value and argument changed from Node_Id to
4389 2016-04-20 Vincent Celier <celier@adacore.com>
4391 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
4393 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
4395 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
4396 the Has_Delayed_Freeze flag on the anonymous instance node.
4398 2016-04-20 Javier Miranda <miranda@adacore.com>
4400 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
4401 scope associated with the renaming object declaration.
4402 * exp_util.adb (Insert_Actions): Remove handling of iterator
4403 loop marked as requiring the secondary stack.
4405 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4407 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
4408 AI12-0124, which extends the functionality of the attribute so it
4409 reflects the semantics of GNAT 'Img when applied to scalar types.
4410 * lib-xref.adb: minor whitespace layout fix.
4412 2016-04-20 Vincent Celier <celier@adacore.com>
4414 * clean.adb (Gnatclean): Fail if project file specified and
4415 gprclean is not available.
4416 * gnatname.adb: Fail is -P is used and gprname is not available.
4417 * make.adb (Initialize): Fail if project file specified and
4418 gprbuild is not available.
4420 2016-04-20 Bob Duff <duff@adacore.com>
4422 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
4423 stack when possible.
4425 2016-04-20 Gary Dismukes <dismukes@adacore.com>
4427 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
4430 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4432 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4433 If the pragma comes from an aspect specification, verify that
4434 the aspect applies to an entity with a declarative part.
4435 * exp_ch5.adb: Code cleanup.
4437 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4439 * sem_res.adb (Resolve_If_Expression): If first expression is
4440 universal, resolve subsequent ones with the corresponding class
4441 type (Any_Integer or Any_Real).
4443 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4445 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
4446 disabled, complete the analysis of the iterator name to ensure
4447 that reference for entities within are properly generated.
4449 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4451 * a-dispat.ads (Yield): add Global contract.
4452 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
4453 * a-taside.adb: Added Initializes => Tasking_State.
4455 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4457 * sem_ch13.adb (Build_Invariant_Procedure):
4458 Reimplement the invariant procedure spec and body insertion.
4460 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4462 * sem_ch13.adb (Add_Invariant): Do not replace
4463 the saved expression of an invariatn aspect when inheriting
4464 a class-wide type invariant as this clobbers the existing
4465 expression. Do not use New_Copy_List as it is unnecessary
4466 and leaves the parent pointers referencing the wrong part of
4467 the tree. Do not replace the type references for ASIS when
4468 inheriting a class-wide type invariant as this clobbers the
4469 existing replacement.
4471 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4473 * sem_util.adb (Build_Explicit_Dereference): If the designated
4474 expression is an entity name, generate reference to the entity
4475 because it will not be resolved again.
4477 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4479 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4480 gnat_rm.texi: Update documentation.
4482 2016-04-19 Olivier Hainque <hainque@adacore.com>
4484 * par_sco.adb (Traverse_One, case N_Case_Statement):
4485 Skip pragmas before the first alternative.
4486 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
4488 2016-04-19 Tristan Gingold <gingold@adacore.com>
4490 * adaint.c (__gnat_lwp_self): New function (for darwin).
4491 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
4494 2016-04-19 Olivier Hainque <hainque@adacore.com>
4496 * sem_util.adb (Build_Elaboration_Entity): Always request an
4497 elab counter when preserving control-flow.
4499 2016-04-19 Olivier Hainque <hainque@adacore.com>
4501 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
4502 Needs_Debug_Info when producing SCOs.
4503 * par_sco.adb (Traverse_Aspects): Fix categorization of
4504 Type_Invariant to match actual processing as activated depending
4505 on pragma Assertion_Policy.
4506 * sem_prag.adb (Analyze_Pragma): Remove special case for
4507 Name_Invariant regarding SCO generation, which completely disabled
4508 the production of SCOs for Invariant pragmas and aspects.
4510 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4512 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
4515 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4517 * freeze.adb (Freeze_Profile): Refine predicate that checks
4518 whether a function that returns a limited view is declared in
4519 another unit and cannot be frozen at this point.
4521 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4523 * exp_aggr.adb (Component_Count): Handle properly superflat
4524 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
4525 return value of the function is Natural, rather than leaving
4526 the handling of such arrays to the caller of this function.
4528 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4530 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
4531 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
4532 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
4533 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
4534 to publicly visible routine in Sem_Util.
4536 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4538 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
4539 the check if the type of the actual is By_Reference.
4541 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4543 * sem_res.adb (Within_Subprogram_Call): Detect
4544 also nodes that appear in entry calls.
4545 (Resolve_Actuals, Insert_Default): Propagate
4546 dimension information if any, from default expression to the
4547 copy that appears in the list of actuals.
4548 * uintp.ads: minor whitespace fix in comment.
4549 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
4551 * set_targ.adb (Set_Targ): convert directly from
4552 Natural to Pos, without intermediate conversion to Int.
4554 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4556 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
4557 SPARK RM in comment.
4558 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
4560 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
4561 to SPARK RM in both comment and error message.
4563 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
4565 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
4566 CW type, then the subprogram must have a delayed freeze. This
4567 ensures that the backend can properly recover the full view when
4568 elaborating the access subprogram declaration.
4570 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4572 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
4573 overloadable entity if originally overloaded.
4575 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4577 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
4578 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
4579 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
4580 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
4583 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4585 * sem_util.adb (Copy_Node_With_Replacement):
4586 use Set_Comes_From_Source instead of directly manipulating
4587 internals of the node table.
4588 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
4589 * sem_aux.adb (Get_Rep_Pragma,
4590 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
4591 do not change as constants and initialize them in the declaration.
4592 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
4593 variables that do not change as constants and initialize them
4596 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4598 * sem_res.adb (Resolve_Entry_Call): If the entry has
4599 preconditions it is rewritten by means of a wrapper that
4600 incorporates the original call. Before rewriting generate a
4601 reference to the entry being called to prevent spurious warnings
4602 and provide correct cross-reference information.
4604 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4606 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
4607 local constant Scop. Ignore any internally generated loops when
4608 performing the check concerning an abstract subprogram call
4609 without a controlling argument.
4610 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
4612 2016-04-19 Bob Duff <duff@adacore.com>
4614 * sem_elab.adb (Check_A_Call): There are cases where we have No
4615 (Ent) after the Alias loop, even when there was no previous error,
4616 so we can't assert that there was an error.
4618 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4620 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
4621 Reject use of type name as a prefix to 'access within an aggregate
4622 in a context that is not the declarative region of a type.
4624 2016-04-19 Vincent Celier <celier@adacore.com>
4626 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
4627 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
4628 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
4629 Remove anything related to project files
4630 * g-mbdira.adb: minor whitespace cleanup
4631 * g-spipat.adb: minor removal of extra spaces after closing paren
4633 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4635 * exp_ch6.adb (Expand_Actuals): If post-statements are present
4636 and the enclosing context is a function call or indexing, build
4637 an Expression_With_Actions for the call.
4639 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4641 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
4642 a with line for an ignored Ghost unit.
4643 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
4644 Par. A child package is Ghost when its parent is Ghost.
4645 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
4646 a subprogram declaration that acts as a compilation unit.
4648 2016-04-18 Michael Matz <matz@suse.de>
4650 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
4651 (gnat_to_gnu_field): Ditto.
4652 (components_to_record): Ditto.
4653 (create_variant_part_from): Ditto.
4654 (copy_and_substitute_in_size): Ditto.
4655 (substitute_in_type): Ditto.
4656 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
4657 (make_packable_type): Ditto.
4658 (maybe_pad_type): Ditto.
4659 (finish_fat_pointer_type): Ditto.
4660 (finish_record_type): Ditto and use SET_DECL_ALIGN.
4661 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
4662 (create_field_decl): Use SET_DECL_ALIGN.
4664 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4666 * einfo.adb (Overridden_Operation): assert that
4667 function is called for valid arguments.
4668 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
4669 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
4670 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
4671 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
4672 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
4673 No space after closing parenthesis except where required for
4675 * sem_res.adb: Minor reformatting.
4677 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4679 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
4680 statement when relevant.
4682 2016-04-18 Bob Duff <duff@adacore.com>
4684 * a-cuprqu.adb (Enqueue): Properly handle the
4685 case where the new element has a unique priority.
4687 2016-04-18 Tristan Gingold <gingold@adacore.com>
4689 * adaint.h: Define stat structures and functions for iOS
4692 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4694 * sem_res.adb (Resolve_Entry_Call): reset
4695 Is_Overloaded flag after resolving calls to overloaded protected
4697 * exp_spark.adb (Expand_SPARK): call
4698 Qualify_Entity_Names for tasking nodes, i.e. protected types,
4699 task types and entries.
4700 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
4701 in case of an unconstrained type.
4703 2016-04-18 Yannick Moy <moy@adacore.com>
4705 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
4706 comment to document usage of subprogram in GNATprove.
4708 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4710 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
4711 message for wrong placement of aspect Test_Case.
4713 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4715 * einfo.ads: Update the documentation of attribute Renamed_Object.
4716 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
4718 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4720 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
4721 in the case of AAMP (same as for use of the -gnatd.P switch) to
4722 suppress this optimization, which avoids creating a dependence
4723 on the 64-bit arithmetic package.
4725 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4727 * exp_ch4.adb: Update comment.
4729 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4731 * exp_ch6.adb (Expand_Call): Make sure instantiations are
4732 registered only once as pending here.
4734 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4736 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
4737 (Minimize_Expression_With_Actions): New flag.
4738 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
4740 (Resolve_Short_Circuit): Redo previous change
4741 using Minimize_Expression_With_Actions.
4742 (Expand_N_If_Expression,
4743 Expand_Short_Circuit_Operator): Restore old code to avoid
4744 Expression_With_Actions when Minimize_Expression_With_Actions
4747 2016-04-18 Vincent Celier <celier@adacore.com>
4749 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
4750 Stderr_File): Close local file descriptors when no longer needed.
4752 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4754 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
4755 mode check that the type of the cursor in an iteration over
4756 a formal container is not volatile. The proper check on the
4757 element type is done elsewhere.
4759 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4761 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
4762 a subprogram that returns a class-wide type, if the subprogram
4763 is a compilation unit, because otherwise gigi will treat the
4764 subprogram as external, leading to link errors.
4766 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4768 * sem_res.adb (Resolve_Short_Circuit): Do not use
4769 expression-with-actions when generating C.
4771 2016-04-18 Yannick Moy <moy@adacore.com>
4773 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
4774 raise node in GNATprove mode.
4776 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4778 * s-fileio.adb: Minor reformatting.
4779 * sem_prag.adb (Analyze_Input_Item): Add local
4780 variable Input_OK. Do not consider mappings of generic formal
4781 parameters to actuals.
4783 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4785 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
4786 type, the cursor is declared in the scope of the parent type.
4787 (Analyze_Parameter_Specification): A qualified expression with an
4788 iterator type indicates an iteration over a container (explicit
4791 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4793 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
4794 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
4795 * debug.adb: Reserve -gnatd.4 to force generation of C files.
4797 2016-04-18 Yannick Moy <moy@adacore.com>
4799 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
4800 division by zero, instead possibly issue a warning.
4801 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
4802 static division by zero, instead add check flag on original
4804 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
4805 Only issue error when both SPARK_Mode is On and Warn is False.
4807 2016-04-18 Yannick Moy <moy@adacore.com>
4809 * checks.adb (Apply_Scalar_Range_Check): Force
4810 warning instead of error when SPARK_Mode is On, on index out of
4811 bounds, and set check flag for GNATprove.
4813 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4815 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
4816 Update the comment on usage. Reimplemented.
4817 (Check_Input_States.Check_Constituent_Usage): Update the comment
4818 on usage. A Proof_In constituent can now refine an Input state
4819 as long as there is at least one Input constituent present.
4821 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4823 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
4824 body id as the sloc of the entity in the generated subprogram
4825 declaration, to avoid spurious conformance errors when style
4828 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4830 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
4831 Refine check on illegal calls to entities within a task body,
4832 when the entity is declared in an object of the same type. In
4833 a generic context there might be no explicit dereference but if
4834 the prefix includes an access type the construct is legal.
4836 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4838 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
4839 RE_Default_Priority.
4841 2016-04-18 Bob Duff <duff@adacore.com>
4843 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
4844 if the pragma came from an aspect specification.
4846 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4848 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
4850 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4852 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
4853 superfluous conformance check on an inlined body with a previous
4854 spec, use the fact that the generated declaration does not come
4855 from source. We must treat the entity as coming from source to
4856 enable some back-end inlining when pragma appears after the body.
4858 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4860 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
4861 exp_intr.adb: Minor reformatting and typo corrections.
4863 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4865 * sem_ch6.adb: Code cleanup.
4867 2016-04-18 Thomas Quinot <quinot@adacore.com>
4869 * sem_ch13.adb: Minor reformatting and error message tweaking
4870 (remove extraneous spaces).
4872 2016-04-18 Johannes Kanig <kanig@adacore.com>
4874 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
4876 2016-04-18 Bob Duff <duff@adacore.com>
4878 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
4879 exists, and it's a fifo, we use "w" as the open string instead of
4880 "r+". This is necessary to make a write to the fifo block until
4883 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4885 * sem_attr.adb (Denote_Same_Function): Account
4886 for a special case where a primitive of a tagged type inherits
4887 a class-wide postcondition from a parent type.
4889 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4891 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
4892 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
4893 of reserved words is OK.
4894 (Scan_Pragma_Argument_Association):
4895 Add new formal Reserved_Words_OK and update the comment on
4896 usage. Code cleanup. Parse an expression or a reserved word in
4897 identifier form for pragmas Restriction_Warnings and Restrictions
4898 No_Use_Of_Attribute.
4899 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4900 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
4901 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
4903 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
4904 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
4905 Update the parameter profile.
4906 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
4908 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
4909 the comment on usage.
4910 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
4911 * sem_attr.adb (Analyze_Attribute): Check restriction
4912 No_Use_Of_Attribute.
4913 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
4914 restriction No_Use_Of_Attribute before any rewritings have
4916 * sem_prag.adb (Analyze_Pragma): Check restriction
4917 No_Use_Of_Pragma before any rewritings have taken place.
4919 2016-04-18 Bob Duff <duff@adacore.com>
4921 * sem_ch6.adb (Is_Inline_Pragma): The pragma
4922 argument can be a selected component, which has no Chars field,
4923 so we need to deal with that case (use the Selector_Name).
4924 (Check_Inline_Pragma): We need to test Is_List_Member before
4925 calling In_Same_List, because in case of a library unit, they're
4926 not in lists, so In_Same_List fails an assertion.
4928 2016-04-18 Bob Duff <duff@adacore.com>
4930 * namet.ads, namet.adb: Add an Append that appends a
4931 Bounded_String onto a Bounded_String. Probably a little more
4932 efficient than "Append(X, +Y);". Also minor cleanup.
4933 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
4934 Append_Unqualified_Decoded): Make sure these work with non-empty
4936 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
4937 parameter, defaulting to Global_Name_Buffer.
4938 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
4939 Bounded_String parameter, no default.
4940 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
4941 Bounded_String instead of Global_Name_Buffer.
4942 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
4943 to Append_Entity_Name, and pass a Bounded_String parameter,
4944 instead of using globals.
4945 (Add_Source_Info): Pass a Bounded_String parameter, instead of
4947 (Expand_Source_Info): Use local instead of globals.
4948 * stringt.ads, stringt.adb (Append): Add an Append procedure
4949 for appending a String_Id onto a Bounded_String.
4950 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
4952 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
4953 Adjust_Name_Case parameter.
4954 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
4955 Set_Casing; that's the default.
4956 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
4957 protected subprograms are entry calls; otherwise it is not possible to
4958 distinguish them from regular subprogram calls.
4960 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4962 * sem_ch13.adb (Has_Good_Profile): Improvement
4963 of error message. Now indicates subtype_mark of formal parameter
4964 rather than the formal's name, plus minor rewording.
4966 2016-04-18 Pascal Obry <obry@adacore.com>
4968 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
4970 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4972 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
4974 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4976 * par-ch4.adb, sem_prag.adb: Minor reformatting.
4978 2016-04-18 Bob Duff <duff@adacore.com>
4980 * sinput.ads, sinput.adb (Build_Location_String): Take a
4981 parameter instead of using a global variable. The function
4982 version no longer destroys the Name_Buffer.
4983 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
4984 parameter, which defaults to the Global_Name_Buffer, so some
4985 calls can avoid the global.
4986 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
4987 to avoid using globals. All but one call to Build_Location_String
4988 avoids the global. Only one call to String_From_Name_Buffer
4991 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4993 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
4995 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4997 * sem_eval.adb (Choice_Matches): Check the expression
4998 against the predicate values when the choice denotes a
4999 subtype with a static predicate.
5000 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
5001 tests for predicates.
5002 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
5003 is not static. (Is_Static_Subtype): A subtype with a dynamic
5004 predicate is not static.
5005 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
5006 (Is_Static_Subtype): Update the comment on usage.
5008 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5010 * sem_prag.adb (Analyze_Input_Item): Allow
5011 generic formals to appear as initialization items.
5013 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5015 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
5016 Has_Good_Profile): Additional error message to indicate that
5017 the second parameter of the subprogram must be a first subtype.
5019 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5021 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
5022 Use the pragma lookahead that determines whether a subprogram
5023 is to be inlined, when some level of backend optimization is
5025 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
5026 code used to create an instance body when needed for inlining.
5027 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
5028 call appears within an instantiation that is not a compilation
5029 unit, add a pending instantiation for the enclosing instance,
5030 so the backend can inline in turn the calls contained in the
5033 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5035 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
5036 that relates operations of the parent type to the operations of
5037 the derived type has three distinct sources:
5038 a) explicit operations of the derived type carry an
5039 Overridden_Operation that designates the operation in the
5041 b) Implicit operations that are inherited by the derived type
5042 carry an alias that may be an explicit subprogram (in which case
5043 it may have an Overridden_ Operation indicator) or may also be
5044 inherited and carry its own alias.
5045 c) If the parent type is an interface, the operation of the
5046 derived type does not override, but the interface operation
5047 indicates the operation that implements it.
5048 * sem_prag.adb: Minor reformatting.
5049 * sem_prag.adb (Check_External_Property): Update
5050 the comment on usage. Reimplement.
5052 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5054 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
5055 profiles such as ZFP, ceiling priority is not available.
5057 2016-04-18 Bob Duff <duff@adacore.com>
5059 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
5061 2016-04-18 Bob Duff <duff@adacore.com>
5063 * sem_elab.adb (Output_Calls): Use
5064 Get_Name_String, to clearly indicate that the global Name_Buffer
5065 is being used. The previous code used Is_Internal_Name, which
5066 returns a Boolean, but also has a side effect of setting the
5067 Name_Buffer. Then it called the other Is_Internal_Name, which uses
5068 the Name_Buffer for its input. And then it called Error_Msg_N,
5069 again using the Name_Buffer. We haven't eliminated the global
5070 usage here, but we've made it a bit clearer.
5071 This also allows us to have a side-effect-free version of
5073 * namet.ads, namet.adb: Provide a type Bounded_String, along with
5074 routines that can be used without using global variables. Provide
5075 Global_Name_Buffer so existing code can continue to use the
5076 global. Mark the routines that use globals as obsolete. New code
5077 shouldn't call the obsolete ones, and we should clean up existing
5078 code from time to time.
5079 Name_Find_Str is renamed as Name_Find.
5080 * namet.h: Changed as necessary to interface to the new version
5082 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
5085 2016-04-18 Yannick Moy <moy@adacore.com>
5087 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
5088 outside of GNATprove, hence it should not be removed.
5090 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5092 * sem_prag.adb (Analyze_Refinement_Clause):
5093 The refinement of an external abstract state can now mention
5094 non-external constituents.
5095 (Check_External_Property): Update all SPARK RM references.
5097 2016-04-18 Bob Duff <duff@adacore.com>
5099 * exp_intr.adb: Remove some duplicated code.
5101 2016-04-18 Yannick Moy <moy@adacore.com>
5103 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
5104 package spec and body out of SPARK.
5106 2016-04-18 Johannes Kanig <kanig@adacore.com>
5108 * spark_xrefs.ads: Minor comment update.
5110 2016-04-18 Johannes Kanig <kanig@adacore.com>
5112 * gnat1drv.adb (Gnat1drv): Force loading of System
5115 2016-04-18 Bob Duff <duff@adacore.com>
5117 * a-cuprqu.adb: Correction to previous change. If a new node
5118 is inserted at the front of the queue (because it is higher
5119 priority than the previous front node), we need to update
5120 Header.Next_Unequal -- not just in the case where the queue was
5123 2016-04-18 Bob Duff <duff@adacore.com>
5125 * a-cuprqu.ads: Change the representation of List_Type from a
5126 singly-linked list to a doubly-linked list. In addition, add a
5127 pointer Next_Unequal, which points past a possibly-long chain
5128 of equal-priority items. This increases efficiency, especially
5129 in the case of many equal-priority items.
5130 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
5131 advantage of new data structure.
5132 (Finalize): Rewrite in terms of Dequeue, for simplicity.
5134 2016-04-18 Yannick Moy <moy@adacore.com>
5136 * contracts.adb (Analyze_Object_Contract,
5137 Analyze_Protected_Contract): Remove tests performed in GNATprove.
5138 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
5139 Remove query for tests performed in GNATprove.
5141 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5143 * sem_aggr.adb (Resolve_Record_Aggregate): If
5144 Warn_On_Redundant_Constructs is enabled, report a redundant box
5145 association that does not cover any components, as it done for
5146 redundant others associations in case statements.
5148 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5150 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
5151 Analyze the generated Check pragma for an inherited condition so
5152 that it does not freeze the dispatching type of the primitive
5153 operation, because it is pre-analyzed at the point of the
5154 subprogram declaration (and not in the subprogram body, as is
5155 done during regular expansion).
5157 2016-04-18 Vincent Celier <celier@adacore.com>
5159 * ali.ads: Increase the range of all _Id types to 100 millions.
5161 2016-04-18 Gary Dismukes <dismukes@adacore.com>
5163 * sem_warn.adb (Check_References): Change warning to suggest
5164 using pragma Export rather than saying "volatile has no effect".
5166 2016-04-18 Bob Duff <duff@adacore.com>
5168 * g-souinf.ads (Compilation_ISO_Date): New function to return
5169 the current date in ISO form.
5170 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
5171 a call to Compilation_ISO_Date into a string literal containing
5172 the current date in ISO form.
5173 * exp_intr.ads (Add_Source_Info): Improve documentation.
5174 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
5175 Compilation_ISO_Date.
5176 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
5178 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5180 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
5181 to subtypes that are not first subtypes.
5183 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5185 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
5187 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
5188 generated pragmas after subprogram declaration, rather than in
5189 the corresponding subprogram body.
5190 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
5191 mode, if the operation is overridding, call
5192 Collect_Inherited_Class_Wide_Conditions to generate the
5193 corresponding pragmas immediately after the corresponding
5194 subprogram declaration.
5196 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5198 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
5199 type to natural numbers.
5200 (Stype): document code characters for concurrent entities.
5202 2016-04-18 Olivier Hainque <hainque@adacore.com>
5204 * targparm.ads: Update the Frontend_Exceptions default internal
5206 (Frontend_Exceptions_On_Target): Change default value to True.
5208 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5210 * sem_ch4.adb (Analyze_Selected_Component): Refine error
5211 detection when a selected component in the body of a synchronized
5212 type is a reference to an object of the same type declared
5213 elsewhere. The construct is legal if the prefix of the selected
5214 component includes an explicit dereference at any point.
5216 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5218 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
5219 internally generated expressions when trying to determine whether
5220 a formal parameter of a tagged type subject to Extensions_Visible
5221 False is used to initialize an object.
5222 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
5223 internally generated expressions when trying to determine whether
5224 a formal parameter of a tagged type subject to Extensions_Visible
5225 False is used in a type conversion.
5227 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5229 * sem_res.adb (Is_Protected_Operation_Call):
5230 Add guards to account for a non-decorated selected component.
5232 2016-04-18 Yannick Moy <moy@adacore.com>
5234 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
5235 implementation of Body_Has_SPARK_Mode_On.
5236 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
5237 New function replacing previous Get_SPARK_Mode_From_Pragma, that
5238 deals also with aspects.
5239 (Get_SPARK_Mode_Type): Make function internal again.
5240 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
5241 Get_SPARK_Mode_From_Annotation.
5243 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5245 * contracts.adb (Analyze_Object_Contract): Update references to
5247 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
5248 * ghost.adb Add with and use clauses for Sem_Disp.
5249 (Check_Ghost_Derivation): Removed.
5250 (Check_Ghost_Overriding):
5251 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
5252 (Check_Ghost_Primitive): New routine.
5253 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
5254 Update references to SPARK RM. (Is_OK_Pragma): Update references
5255 to SPARK RM. Predicates are now a valid context for references
5257 * ghost.ads (Check_Ghost_Derivation): Removed.
5258 (Check_Ghost_Overriding): Update the comment on usage.
5259 (Check_Ghost_Primitive): New routine.
5260 (Check_Ghost_Refinement): New routine.
5261 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
5262 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
5263 related to Ghost derivations
5264 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
5265 related to the convention-like behavior of pragma Ghost.
5266 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
5267 of a tagged type and its primitive agree.
5268 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
5269 RM. Move the verification of pragma Assertion_Policy Ghost
5270 to the proper place. Remove the now obsolete check related
5271 to Ghost derivations.
5272 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
5273 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
5275 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5277 * layout.adb: Fix more minor typos in comments.
5279 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5281 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
5283 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5285 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
5286 mode, collect inherited class-wide conditions to generate the
5287 corresponding pragmas.
5288 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
5289 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
5290 procedure for overriding subprograms, used to generate the pragmas
5291 corresponding to an inherited class- wide pre- or postcondition.
5292 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
5293 from contracts.adb (Replace_Condition_Entities): Subsidiary
5294 Build_Pragma_Check_Equivalent, to implement the proper semantics
5295 of inherited class-wide conditions, as given in AI12-0113.
5296 (Process_Class_Wide_Condition): Removed.
5297 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
5298 in contract of subprogram, to collect inherited class-wide
5300 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
5302 2016-04-18 Yannick Moy <moy@adacore.com>
5304 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
5305 * a-calend.ads (Ada.Calendar): Mark package spec as
5306 SPARK_Mode and add synchronous external abstract state Clock_Time.
5308 2016-04-18 Yannick Moy <moy@adacore.com>
5310 * sem_res.adb (Resolve_Call): Prevent inlining of
5311 calls inside expression functions. Factor previous code issuing
5312 errors to call Cannot_Inline instead, which does appropriate
5313 processing of message for GNATprove.
5315 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5317 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
5318 osint-b.adb: Cleanups.
5320 2016-04-18 Yannick Moy <moy@adacore.com>
5322 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
5323 body to inline in GNATprove mode when SPARK_Mode On applies to
5325 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
5328 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5330 * layout.adb: Fix minor typo in comment.
5331 * inline.adb: Fix minor pasto.
5332 * sem_ch12.ads: Fix minor typos in comments.
5334 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5336 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
5337 handle some complex cases of tag indeterminate calls that are
5338 actuals in other dispatching calls that are themselves tag
5340 (Check_Dispatching_Context): Add parameter to support recursive
5341 check for an enclosing construct that may provide a tag for a
5342 tag-indeterminate call.
5344 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5346 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
5347 Add global variables Task_Input_Seen and Task_Output_Seen.
5348 (Analyze_Global_Item): Detect an illegal use of the current
5349 instance of a single protected/task type in a global annotation.
5350 (Analyze_Input_Output): Inputs and output related to the current
5351 instance of a task unit are now tracked.
5352 (Check_Usage): Require
5353 the presence of the current instance of a task unit only when
5354 one input/output is available. (Current_Task_Instance_Seen):
5356 (Is_CCT_Instance): New parameter profile. Update
5357 the comment on usage. The routine now properly recognizes several
5358 cases related to single protected/task types.
5360 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5362 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
5363 to create a brand new freeze node. This handles a case where an
5364 ignored Ghost context is freezing something which is not ignored
5365 Ghost and whose freeze node should not be removed from the tree.
5366 (New_Freeze_Node): New routine.
5368 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5370 * sigtramp.h (__gnat_set_is_vxsim) New function to
5371 tell sigtramp-vxworks to handle vxsim signal contexts. *
5372 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
5373 differences in the sigcontext structure between the expected
5374 regular x86 or x86_64 ones and the ones received in case of
5375 exexution on the vxworks simulator.
5376 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
5377 this information to sigtramp-vxworks.c. Remove the old mechanism for
5379 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
5381 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5383 * exp_ch3.adb (Inline_Init_Proc): New function returning
5384 whether the initialization procedure of a type should be
5385 inlined. Return again True for controlled type themselves.
5386 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
5387 (Build_Record_Init_Proc): Likewise.
5389 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5391 * gnatvsn.ads (Library_Version): Bump to 7.
5393 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5395 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
5396 on the entity of a subprogram declaration that is completed by
5397 an expression function.
5399 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5401 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
5402 declaration can appear in an aspect specification for a dynamic
5403 predicate, and a pragma for aspect Predicate_Failure.
5404 * exp_util.adb (Replace_Subtype_References): Replace current
5405 occurrences of the subtype to which a dynamic predicate applies,
5406 byt the expression that triggers a predicate check. Needed to
5407 implement new aspect Predicate_Failure.
5409 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5411 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
5412 * Makefile.rtl: update accordingly.
5414 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5416 * sem_type.adb (Disambiguate): Call Covers only when necessary
5417 for standard operators.
5419 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5421 * atree.ads (Num_Extension_Nodes): Add couple of figures
5423 * atree.adb: Add GNAT.Heap_Sort_G dependency.
5424 (Print_Statistics): New exported procedure to print statistics.
5426 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5428 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
5429 as to be inlined if the type needs finalization.
5431 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5433 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
5434 alignment for x86_64.
5435 * init.c: Better fix for guard page reset on x86_64-vx7.
5436 Do not try to retrieve the page that actually raised
5437 the signal as the probing mechanism used on x86_64 do not allow
5438 such retrieval. We thus just test if the guard page is active,
5439 and re-activate it if not.
5441 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5443 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
5446 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5448 * affinity.c: Use the proper type for task id.
5449 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
5451 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5453 * sem_prag.adb (Process_Convention): Relax rule on exporting
5454 Intrinsic types if Relaxed_RM_Semantics is True.
5456 2016-04-18 Vincent Celier <celier@adacore.com>
5458 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
5459 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
5460 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
5461 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
5462 exp_ch3.ads, exp_unst.adb: Change "descendent" to
5463 "descendant" in comments, error messages and identifiers.
5464 * gcc-interface/decl.c: Ditto.
5466 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5468 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
5469 New_S only once at the beginning of the function.
5471 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
5473 * gcc-interface/decl.c (components_to_record): Restrict the previous
5474 change to fields with variable size.
5476 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
5478 * gcc-interface/decl.c (components_to_record): Add special case for
5479 single field with representation clause at offset 0.
5481 2016-03-16 Svante Signell <svante.signell@gmail.com>
5483 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
5484 * s-osinte-gnu.ads: New file.
5486 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
5488 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
5489 (Stack_Check_Limits): Set to False.
5490 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
5491 (Stack_Check_Limits): Set to False.
5492 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
5493 (Stack_Check_Limits): Set to False.
5494 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
5495 (Stack_Check_Limits): Set to False.
5496 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
5497 (Stack_Check_Limits): Set to False.
5499 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
5501 * gcc-interface/trans.c (statement_node_p): New predicate.
5502 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
5503 not return dummy results for expressions attached to packed array
5504 implementation types.
5506 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
5508 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
5509 the expression of a renaming manually in case #3.
5511 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
5513 * system-linux-s390.ads: Enable Stack_Check_Probes.
5514 * system-linux-s390.ads: Likewise.
5516 2016-02-29 Martin Liska <mliska@suse.cz>
5518 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
5519 Replace ENABLE_CHECKING macro with flag_checking.
5521 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5523 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
5524 handling of unconstrained array types as designated types into common
5525 processing. Also handle array types as incomplete designated types.
5527 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5529 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
5530 ASIS mode, fully lay out the minimal record type.
5532 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5534 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
5535 (build_return_expr): Likewise.
5536 (Call_to_gnu): If this is a function call and there is no target,
5537 create a temporary for the return value for all aggregate types,
5538 but never create it for a return statement. Push a binding level
5539 around the call in more cases. Remove obsolete code.
5541 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5543 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
5544 * gcc-interface/gigi.h (gigi): Remove useless attribute.
5545 (gnat_gimplify_expr): Likewise.
5546 (gnat_to_gnu_external): Declare.
5547 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
5548 code dealing with the expression of external constants into...
5549 Invoke gnat_to_gnu_external instead.
5550 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
5551 when not for a definition. Deal with COMPOUND_EXPR and variables with
5552 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
5553 'reference to a function call in a renaming. Remove obsolete test and
5554 adjust associated comment.
5555 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
5556 temporaries created to hold the return value, if any.
5557 (gnat_to_gnu_external): ...this. New function.
5558 * gcc-interface/utils.c (create_var_decl): Detect a constant created
5559 to hold 'reference to function call.
5560 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
5561 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
5563 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
5565 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
5566 the prefix denotes an entity which Has_Atomic_Components.
5567 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
5568 denotes an entity which Has_Atomic_Components.
5570 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
5572 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
5573 for fat pointer or scalar types.
5575 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
5577 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
5578 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
5579 Call maybe_character_value on the array bounds. Get to the base type
5580 of the index type and call maybe_debug_type on it.
5581 * gcc-interface/utils.c (finish_character_type): Add special treatment
5584 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
5586 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
5587 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
5589 2016-02-12 Jakub Jelinek <jakub@redhat.com>
5591 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
5592 neighbour -> neighbor.
5593 * prep.adb: Likewise.
5594 * prj.ads: Likewise.
5595 * prepcomp.adb: Likewise.
5596 * g-socket.ads: Likewise.
5597 * s-imgrea.adb: Likewise.
5598 * a-calend.adb: Likewise.
5599 * exp_disp.adb: Likewise.
5600 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
5601 * g-socket.adb: Likewise.
5602 * sem_ch12.adb: Likewise.
5603 * terminals.c: Likewise.
5605 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5607 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
5608 build_common_tree_nodes.
5610 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
5612 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
5613 DECL_IGNORED_P last.
5615 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
5617 * gcc-interface/gigi.h (enum attr_type): Rename into...
5618 (enum attrib_type): ...this.
5619 (struct attrib): Adjust.
5620 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
5622 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
5624 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
5625 literal if the entity is of a character type.
5626 * gcc-interface/lang.opt (fsigned-char): New option.
5627 * gcc-interface/misc.c (gnat_handle_option): Accept it.
5628 (gnat_init): Adjust comment.
5629 * gcc-interface/gigi.h (finish_character_type): New prototype.
5630 (maybe_character_type): New inline function.
5631 (maybe_character_value): Likewise.
5632 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
5633 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
5634 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
5635 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
5636 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
5637 Copy TYPE_STRING_FLAG from type to subtype.
5638 <E_Array_Type>: Deal with character index types.
5639 <E_Array_Subtype>: Likewise.
5640 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
5641 char_type_node throughout.
5642 (build_raise_check): Likewise.
5643 (get_type_length): Deal with character types.
5644 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
5646 <Attr_Pred>: Likewise.
5647 (Loop_Statement_to_gnu): Likewise.
5648 (Raise_Error_to_gnu): Likewise.
5649 <N_Indexed_Component>: Deal with character index types. Remove
5651 <N_Slice>: Likewise.
5652 <N_Type_Conversion>: Deal with character types. Minor tweak.
5653 <N_Unchecked_Type_Conversion>: Likewise.
5655 <N_Op_Eq>: Likewise.
5656 (emit_index_check): Delete.
5657 * gcc-interface/utils.c (finish_character_type): New function.
5658 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
5659 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
5660 with char_type_node.
5661 (build_call_raise): Likewise.
5662 (build_call_raise_column): Likewise.
5663 (build_call_raise_range): Likewise.
5665 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5667 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
5668 (build_call_raise_range): Likewise.
5669 (gnat_unsigned_type): Delete.
5670 (gnat_signed_type): Likewise.
5671 (gnat_signed_or_unsigned_type_for): New prototype.
5672 (gnat_unsigned_type_for): New inline function.
5673 (gnat_signed_type_for): Likewise.
5674 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
5675 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
5676 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
5677 and compute their base type from that.
5678 <E_Array_Subtype>: Remove duplicate declaration.
5679 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
5680 * gcc-interface/trans.c (get_type_length): Likewise.
5681 (Attribute_to_gnu): Likewise.
5682 (Loop_Statement_to_gnu): Likewise.
5683 (Call_to_gnu): Likewise.
5684 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
5685 and gnat_signed_type_for. Minor tweaks.
5686 (build_binary_op_trapv): Likewise.
5687 (emit_check): Likewise.
5688 (convert_with_check): Likewise.
5689 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
5690 functions. Minor tweaks.
5691 (Case_Statement_to_gnu): Remove dead code.
5692 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
5693 (init_code_table): Minor reordering.
5694 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
5695 (gnat_signed_type): Likewise.
5696 (gnat_signed_or_unsigned_type_for): New function.
5697 (unchecked_convert): Use directly the size in the test for precision
5698 vs size adjustments.
5699 (install_builtin_elementary_types): Call gnat_signed_type_for.
5700 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
5702 (build_goto_raise): New function taken from...
5703 (build_call_raise): ...here. Call it.
5704 (build_call_raise_column): Add KIND parameter and call it.
5705 (build_call_raise_range): Likewise.
5707 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5709 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
5710 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
5711 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
5712 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
5713 and tweak gnat_encodings tests throughout.
5714 (initial_value_needs_conversion): Likewise.
5715 (intrin_arglists_compatible_p): Likewise.
5716 * gcc-interface/misc.c (gnat_print_type): Likewise.
5717 (gnat_get_debug_type): Likewise.
5718 (gnat_get_fixed_point_type_info): Likewise.
5719 (gnat_get_array_descr_info): Likewise.
5720 (get_array_bit_stride): Likewise.
5721 (gnat_get_type_bias): Fix formatting.
5722 (enumerate_modes): Likewise.
5723 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
5724 (add_decl_expr): Simplify NULL_TREE test.
5725 (end_stmt_group): Likewise.
5726 (build_binary_op_trapv): Fix formatting.
5727 (get_exception_label): Use switch statement.
5728 (init_code_table): Move around.
5729 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
5730 (gnat_poplevel): Likewise.
5731 (gnat_set_type_context): Likewise.
5732 (defer_or_set_type_context): Fix formatting.
5733 (gnat_pushdecl): Simplify NULL_TREE test.
5734 (maybe_pad_type): Likewise.
5735 (add_parallel_type): Likewise.
5736 (create_range_type): Likewise.
5737 (process_deferred_decl_context): Likewise.
5738 (convert): Likewise.
5739 (def_builtin_1): Likewise.
5740 * gcc-interface/utils2.c (find_common_type): Likewise.
5741 (build_binary_op): Likewise.
5742 (gnat_rewrite_reference): Likewise.
5743 (get_inner_constant_reference): Likewise.
5745 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5748 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
5749 the parent function instead of the current function in order to issue
5750 the warning or the error. Add guard for ignored functions.
5752 2016-01-17 Jakub Jelinek <jakub@redhat.com>
5754 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
5756 2016-01-15 Jakub Jelinek <jakub@redhat.com>
5758 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
5759 of char * for path_val to avoid warnings.
5761 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
5763 * gcc-interface/utils.c: Bump copyright year.
5764 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
5765 the current lexical scope.
5767 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5769 * gnat_ugn.texi: Bump @copying's copyright year.
5770 * gnat_rm.texi: Likewise.
5772 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
5774 * gnatvsn.ads: Bump copyright year.
5777 Copyright (C) 2016 Free Software Foundation, Inc.
5779 Copying and distribution of this file, with or without modification,
5780 are permitted in any medium without royalty provided the copyright
5781 notice and this notice are preserved.