1 2016-11-27 Eric Botcazou <ebotcazou@adacore.com>
4 * gcc-interface/utils.c (max_size) <tcc_reference>: Add missing
5 conversion to original type in the PLACEHOLDER_EXPR case.
7 2016-11-27 Eric Botcazou <ebotcazou@adacore.com>
10 * namet.h (Max_Line_Length): Define.
11 (struct Bounded_String): Declare Chars with exact size.
12 (namet__get_decoded_name_string): Delete.
13 (Get_Decoded_Name_String): Likewise.
14 (casing__set_all_upper_case): Likewise.
16 2016-11-22 Uros Bizjak <ubizjak@gmail.com>
18 * gcc-interface/Make-lang.in (check-acats): Fix detection
21 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
22 Alan Hayward <alan.hayward@arm.com>
23 David Sherwood <david.sherwood@arm.com>
25 * gcc-interface/utils.c (create_label_decl): Use SET_DECL_MODE.
27 2016-11-14 Eric Botcazou <ebotcazou@adacore.com>
29 * gcc-interface/Makefile.in: Replace s-interr-hwint.adb with
30 s-interr-vxworks.adb throughout.
32 2016-11-13 Bob Duff <duff@adacore.com>
34 * gcc-interface/decl.c (gnat_to_gnu_entity): In assertion about known
35 Esize, protect with !is_type and change !Unknown_Esize to Known_Esize.
37 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
39 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
40 Look at the underlying type for the signedness of the type.
42 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
44 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Deal specially
45 with negative constants.
47 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
49 * gcc-interface/utils2.c (gnat_protect_expr): Also protect only the
50 address if the expression is the component of a dereference.
51 Do not use a reference type for the final temporary reference.
53 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
55 * gcc-interface/Makefile.in (NO_OMIT_ADAFLAGS): Define.
56 (a-except.o): Replace -fno-inline with NO_INLINE_ADAFLAGS.
57 (s-memory.o): New rule.
58 (tracebak.o): Replace -fno-omit-frame-pointer with NO_OMIT_ADAFLAGS.
60 2016-11-07 Tamar Christina <tamar.christina@arm.com>
62 * adaint.c: Added signal.h for Windows.
64 2016-10-31 Jakub Jelinek <jakub@redhat.com>
66 * gcc-interface/misc.c (gnat_get_array_descr_info): Clear rank field.
68 2016-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
70 * gcc-interface/Make-lang.in (lang_checks_parallelized): New target.
71 (check_gnat_parallelize): Likewise.
73 2016-10-20 Nicolas Roche <roche@adacore.com>
75 * gcc-interface/Makefile (x86-64/Darwin): Restore missing pairs.
76 (x86/Darwin): Likewise.
78 2016-10-19 Eric Botcazou <ebotcazou@adacore.com>
80 * system-linux-armel.ads: Rename into...
81 * system-linux-arm.ads: ...this
82 * gcc-interface/Makefile.in (ARM/Android): Adjust to above renaming.
83 (ARM/Linux): Likewise.
84 (Aarch64/Linux): Likewise.
86 2016-10-18 Eric Botcazou <ebotcazou@adacore.com>
88 * gcc-interface/Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
89 (EXTRA_GNATRTL_TASKING_OBJS): Likewise.
90 (ARM/Android): Add atomic support.
91 (SPARC/Solaris): Simplify.
92 (x86/Solaris): Likewise.
93 (x86/Linux): Likewise.
94 (x86-64/kFreeBDS): Adjust and use system-freebsd-x86.ads
95 (x86/FreeBSD): Add s-mudido-affinity.adb.
96 (x86-64/FreeBSD): Likewise and use system-freebsd-x86.ads.
97 (s390/Linux): Simplify.
98 (PowerPC/AIX): Likewise.
99 (Cygwin/Mingw): Likewise.
100 (MIPSel/Linux): Likewise.
101 (ARM/Linux): Add atomic support.
102 (Aarch64/Linux): Use system-linux-armel.ads.
103 (SPARC/Linux): Simplify.
104 (IA-64/Linux): Minor tweak.
105 (IA-64/HP-UX): Likewise.
106 (Alpha/Linux): Likewise.
107 (x86-64/Linux): Use system-linux-x86.ads.
108 (x86/Darwin): Simplify.
109 (PowerPC/Darwin): Likewise.
110 (ARM/Darwin): Use system-darwin-arm.ads.
111 (ADA_EXCLUDE_SRCS): Minor reformatting.
112 * system-aix.ads (Word_Size): Change to Standard'Word_Size.
113 (Memory_Size): Change to 2 ** Word_Size.
114 (Support_Atomic_Primitives): Set to True.
115 * system-aix64.ads: Delete.
116 * system-darwin-arm.ads: New.
117 * system-darwin-ppc.ads (Word_Size): Change to Standard'Word_Size.
118 (Memory_Size): Change to 2 ** Word_Size.
119 (Support_Atomic_Primitives): Set to True.
120 * system-darwin-ppc64.ads: New.
121 * system-darwin-x86.ads (Word_Size): Change to Standard'Word_Size.
122 (Memory_Size): Change to 2 ** Word_Size.
123 * system-darwin-x86_64.ads: Delete.
124 * system-freebsd-x86.ads (Word_Size): Change to Standard'Word_Size.
125 (Memory_Size): Change to 2 ** Word_Size.
126 * system-freebsd-x86_64.ads: Delete.
127 * system-linux-alpha.ads (Support_Atomic_Primitives): Set to True.
128 * system-linux-armeb.ads (Word_Size): Change to Standard'Word_Size.
129 (Memory_Size): Change to 2 ** Word_Size.
130 (Support_Atomic_Primitives): Set to True.
131 * system-linux-armel.ads (Word_Size): Change to Standard'Word_Size.
132 (Memory_Size): Change to 2 ** Word_Size.
133 (Support_Atomic_Primitives): Set to True.
134 * system-linux-mips.ads: (Word_Size): Change to Standard'Word_Size.
135 (Memory_Size): Change to 2 ** Word_Size.
136 * system-linux-mipsel.ads (Word_Size): Change to Standard'Word_Size.
137 (Memory_Size): Change to 2 ** Word_Size.
138 * system-linux-s390.ads (Word_Size): Change to Standard'Word_Size.
139 (Memory_Size): Change to 2 ** Word_Size.
140 (Stack_Check_Probes): Set to True.
141 * system-linux-s390x.ads: Delete.
142 * system-linux-sparc.ads (Word_Size): Change to Standard'Word_Size.
143 (Memory_Size): Change to 2 ** Word_Size.
144 * system-linux-sparcv9.ads: Delete.
145 * system-linux-x86.ads (Word_Size): Change to Standard'Word_Size.
146 (Memory_Size): Change to 2 ** Word_Size.
147 * system-linux-x86_64.ads: Delete.
148 * system-mingw-x86_64.ads: Delete.
149 * system-mingw.ads (Word_Size): Change to Standard'Word_Size.
150 (Memory_Size): Change to 2 ** Word_Size.
151 * system-solaris-sparc.ads (Word_Size): Change to Standard'Word_Size.
152 (Memory_Size): Change to 2 ** Word_Size.
153 (Support_Atomic_Primitives): Set to True.
154 * system-solaris-sparcv9.ads: Delete.
155 * system-solaris-x86.ads (Word_Size): Change to Standard'Word_Size.
156 (Memory_Size): Change to 2 ** Word_Size.
157 * system-solaris-x86_64.ads: Delete.
159 2016-10-17 Eric Botcazou <ebotcazou@adacore.com>
161 * system-darwin-ppc64.ads (Support_64_Bit_Divides): Delete.
162 * system-linux-armeb.ads (Support_64_Bit_Divides): Likewise.
163 * system-linux-mips.ads (Support_64_Bit_Divides): Likewise.
164 * system-linux-mips64el.ads (Support_64_Bit_Divides): Likewise.
165 * system-linux-mipsel.ads (Support_64_Bit_Divides): Likewise.
166 * system-linux-sparcv9.ads (Support_64_Bit_Divides): Likewise.
167 * system-rtems.ads (Support_64_Bit_Divides): Likewise.
169 2016-10-16 Eric Botcazou <ebotcazou@adacore.com>
171 * gcc-interface/misc.c (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS):Define.
172 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Deal with
173 a zero TARGET_CUSTOM_FUNCTION_DESCRIPTORS specially for Code_Address.
174 Otherwise, if TARGET_CUSTOM_FUNCTION_DESCRIPTORS is positive, set
175 FUNC_ADDR_BY_DESCRIPTOR for 'Access/'Unrestricted_Access of nested
176 subprograms if the type can use an internal representation.
177 (call_to_gnu): Likewise, but set CALL_EXPR_BY_DESCRIPTOR on indirect
178 calls if the type can use an internal representation.
180 2016-10-16 Eric Botcazou <ebotcazou@adacore.com>
182 * system-aix.ads (Always_Compatible_Rep): Change to False.
183 * system-aix64.ads (Always_Compatible_Rep): Likewise.
184 * system-hpux-ia64.ads (Always_Compatible_Rep): Likewise.
185 * system-hpux.ads (Always_Compatible_Rep): Likewise.
186 * system-linux-alpha.ads (Always_Compatible_Rep): Likewise.
187 * system-linux-hppa.ads (Always_Compatible_Rep): Likewise.
188 * system-linux-ia64.ads (Always_Compatible_Rep): Likewise.
189 * system-linux-mips.ads (Always_Compatible_Rep): Likewise.
190 * system-linux-mips64el.ads (Always_Compatible_Rep): Likewise.
191 * system-linux-mipsel.ads (Always_Compatible_Rep): Likewise.
192 * system-linux-s390.ads (Always_Compatible_Rep): Likewise.
193 * system-linux-s390x.ads (Always_Compatible_Rep): Likewise.
194 * system-linux-sh4.ads (Always_Compatible_Rep): Likewise.
195 * system-linux-sparc.ads (Always_Compatible_Rep): Likewise.
196 * system-linux-sparcv9.ads (Always_Compatible_Rep): Likewise.
197 * system-rtems.ads (Always_Compatible_Rep): Likewise.
199 2016-10-14 Eric Botcazou <ebotcazou@adacore.com>
202 * gcc-interface/utils.c (create_var_decl): Do not clear TREE_READONLY
203 in LTO mode for an external variable.
204 (can_materialize_object_renaming_p): Move up.
206 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
208 * gcc-interface/utils2.c: Include memmodel.h.
210 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
212 * sem_ch6.adb (Analyze_Expression_Function):
213 Remove the aspects of the original expression function has been
214 rewritten into a subprogram declaration or a body. Reinsert the
215 aspects once they have been analyzed.
217 2016-10-13 Tristan Gingold <gingold@adacore.com>
219 * exp_ch9.adb (Expand_N_Asynchronous_Select): Return immediately
220 on restricted profile.
222 2016-10-13 Javier Miranda <miranda@adacore.com>
224 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Register the
225 pragma for its validation after the backend has been called only if
226 its expression has some occurrence of attributes 'size or 'alignment
227 * table.ads (Release_Threshold): New formal.
228 (Release): Adding documentation of its new functionality.
229 * table.adb (Release): Extend its functionality with a
231 * nlists.adb (Next_Node table): Set its Release_Threshold.
232 * atree.adb (Orig_Nodes table): Set its Release_Threshold.
233 * atree.ads (Nodes table): Set its Release_Threshold.
234 (Flags table): Set its Release_Threshold.
235 * alloc.ads (Nodes_Release_Threshold): New constant declaration.
236 (Orig_Nodes_Release_Threshold): New constant declaration.
237 * debug.adb (switch d.9): Left free.
238 * gnat1drv.adb (Post_Compilation_Validation_Checks): Enable
239 validation of pragmas Compile_Time_Error and Compile_Time_Warning.
241 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
243 * sem_ch6.adb (Create_Extra_Formals): Generate
244 an Itype reference for the object extra formal in case the
245 subprogram is called within the same or nested scope.
247 2016-10-13 Claire Dross <dross@adacore.com>
249 * sem_ch5.adb (Analyze_Iterator_Specification):
250 Also create a renaming in GNATprove mode.
252 2016-10-13 Ed Schonberg <schonberg@adacore.com>
254 * freeze.adb (Freeze_Fixed_Point_Type): in SPARK mode, the
255 given bounds of the type must be strictly representable, and the
256 range reduction by one delta ("shaving") allowed by the Ada RM,
257 is not applicable in SPARK.
259 2016-10-13 Javier Miranda <miranda@adacore.com>
261 * debug.adb (switch d.9): Used to temporarily disable the support
262 needed for this enhancement since it causes regressions with
264 * gnat1drv.adb (Post_Compilation_Validation_Checks): Temporarily
265 leave the validation of pragmas Compile_Time_Warning and
266 Compile_Time_Error under control of -gnatd.9/
268 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
270 * sem_ch10.adb (Entity_Needs_Body): A generic
271 subprogram renaming needs a body if the renamed unit is declared
272 outside the current compilation unit.
274 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
276 * sinfo.ads, sem_ch12.adb, sem.adb, expander.adb, sem_res.ads,
277 sem_ch4.adb, sem_ch8.adb, s-memory.adb: Minor reformatting.
279 2016-10-13 Vincent Celier <celier@adacore.com>
281 * gnatcmd.adb: Delete all temporary files when invoked as gnat
284 2016-10-13 Ed Falis <falis@adacore.com>
286 * i-vxinco.adb, i-vxinco.ads: New files.
287 * impunit.adb: add i-vxinco.ads.
288 * s-interr-vxworks.adb: add hook for user interrupt connection routine.
290 2016-10-13 Ed Falis <falis@adacore.com>
292 * s-interr-hwint.adb, s-interr-vxworks.adb: Rename s-interr-hwint.adb
293 to s-interr-vxworks.adb.
295 2016-10-13 Gary Dismukes <dismukes@adacore.com>
297 * exp_ch7.adb, einfo.ads, sem_prag.adb, sem_prag.ads, sem.ads,
298 sem_attr.adb, sem_case.adb, sem_ch13.ads: Minor typo fixes and
301 2016-10-13 Javier Miranda <miranda@adacore.com>
303 * sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New
304 overloaded subprogram that factorizes code executed as part
305 of the regular processing of these pragmas and as part of its
306 validation after invoking the backend.
307 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): New
309 (Process_Compile_Time_Warning_Or_Error): If the
310 condition is known at compile time then invoke the new overloaded
311 subprogram; otherwise register the pragma in a table to validate
312 it after invoking the backend.
313 * sem.ads, sem.adb (Unlock): New subprogram.
314 * sem_attr.adb (Analyze_Attribute [Size]): If we are processing
315 pragmas Compile_Time_Warning and Compile_Time_Errors after the
316 backend has been called then evaluate this attribute if 'Size
317 is known at compile time.
318 * gnat1drv.adb (Post_Compilation_Validation_Checks): Validate
319 compile time warnings and errors.
320 * sem_ch13.ads, sem_ch13.adb (Validate_Compile_Time_Warning_Error):
322 (Validate_Compile_Time_Warning_Errors): New subprogram.
324 2016-10-13 Yannick Moy <moy@adacore.com>
326 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt to
327 optional refinement for abstract states with only partial refinement
330 2016-10-13 Justin Squirek <squirek@adacore.com>
332 * sem_ch13.adb: Minor correction in comment in
333 Analyze_Aspect_Specifications
334 * sem_prag.adb: Minor reformatting.
336 2016-10-13 Thomas Quinot <quinot@adacore.com>
338 * s-stratt-xdr.adb: Disable compiler unit warnings.
340 2016-10-13 Ed Schonberg <schonberg@adacore.com>
342 * sem_ch3.adb (Visible_Component): In an instance body, check
343 whether the component may be hidden in a selected component by
344 a homonym that is a primitive operation of the type of the prefix.
346 2016-10-13 Jakub Jelinek <jakub@redhat.com>
349 * gcc-interface/misc.c (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
350 instead of lhd_return_null_tree_v.
352 2016-10-12 Yannick Moy <moy@adacore.com>
354 * einfo.adb, einfo.ads (Partial_Refinement_Constituents): Take
355 into account constituents that are themselves abstract states
356 with full or partial refinement visible.
357 * sem_prag.adb (Find_Encapsulating_State): Move function
358 to library-level, to share between subprograms.
359 (Analyze_Refined_Global_In_Decl_Part): Use
360 Find_Encapsulating_State to get relevant encapsulating state.
362 2016-10-12 Arnaud Charlet <charlet@adacore.com>
364 * gnat1drv.adb: Fix minor typo.
366 2016-10-12 Yannick Moy <moy@adacore.com>
368 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt checking
369 for optional refinement of abstract state with partial
371 (Analyze_Refined_Global_In_Decl_Part): Adapt checking for optional
372 refinement of abstract state with partial visible refinement. Implement
373 new rules in SPARK RM 7.2.4 related to optional refinement.
374 Also fix the missing detection of missing items.
376 2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
378 * einfo.adb Add new usage for Elist29 and Node35.
379 (Anonymous_Designated_Type): New routine.
380 (Anonymous_Master): Removed.
381 (Anonymous_Masters): New routine.
382 (Set_Anonymous_Designated_Type): New routine.
383 (Set_Anonymous_Master): Removed.
384 (Set_Anonymous_Masters): New routine.
385 (Write_Field29_Name): Add output for Anonymous_Masters.
386 (Write_Field35_Name): Remove the output for Anonymous_Master. Add
387 output for Anonymous_Designated_Type.
388 * einfo.ads Remove attribute Anonymous_Master along with
389 usage in entities. Add attributes Anonymous_Designated_Type
390 and Anonymous_Masters along with usage in entities.
391 (Anonymous_Designated_Type): New routine along with pragma Inline.
392 (Anonymous_Master): Removed along with pragma Inline.
393 (Anonymous_Masters): New routine along with pragma Inline.
394 (Set_Anonymous_Designated_Type): New routine along with pragma Inline.
395 (Set_Anonymous_Master): Removed along with pragma Inline.
396 (Set_Anonymous_Masters): New routine along with pragma Inline.
397 * exp_ch7.adb (Build_Anonymous_Master): Reuse an anonymous master
398 defined in the same unit if it services the same designated
399 type, otherwise create a new one.
400 (Create_Anonymous_Master): Reimplemented.
401 (Current_Anonymous_Master): New routine.
402 (In_Subtree): Removed.
404 2016-10-12 Ed Schonberg <schonberg@adacore.com>
406 * sem_prag.adb (Analyze_Pragma, case Dynamic_Predicate):
407 Check properly whether there is an explicit assertion policy
408 for predicate checking, even in the presence of a general Ignore
411 2016-10-12 Steve Baird <baird@adacore.com>
413 * sem.adb (Walk_Library_Items): Cope with ignored ghost units.
415 2016-10-12 Ed Schonberg <schonberg@adacore.com>
417 * lib-writ.adb (Write_ALI): Removal of unused file entries from
418 dependency list must be performed before the list is sorted,
419 so that the dependency number of other files is properly set-up
420 for use in tools that relate entity information to the unit in
421 which they are declared.
423 2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
425 * exp_aggr.adb (Initialize_Ctrl_Array_Component):
426 Create a copy of the initialization expression to avoid sharing
427 it between multiple components.
429 2016-10-12 Yannick Moy <moy@adacore.com>
431 * einfo.adb, einfo.ads (Has_Partial_Visible_Refinement): New flag
433 (Has_Non_Null_Visible_Refinement): Return true for patial refinement.
434 (Partial_Refinement_Constituents): New function returns the full or
435 partial refinement constituents depending on scope.
436 * sem_ch3.adb (Analyze_Declarations): Remove partial visible
437 refinements when exiting the scope of a package spec or body
438 and those partial refinements are not in scope afterwards.
439 * sem_ch7.adb, sem_ch7.ads (Install_Partial_Declarations): Mark
440 abstract states of parent units with partial refinement so that
442 * sem_prag.adb (Analyze_Part_Of_In_Decl_Part): Mark enclosing
443 abstract state if any as having partial refinement in that scope.
444 (Analyze_Refined_Global_In_Decl_Part): Check constituent usage
445 based on full or partial refinement depending on scope.
447 2016-10-12 Ed Schonberg <schonberg@adacore.com>
449 * exp_ch4.adb (Expand_N_Type_Conversion): If the target type
450 has an invariant aspect, insert invariant call at the proper
451 place in the code rather than rewriting the expression as an
452 expression with actions, to prevent spurious semantic errors on
453 the rewritten conversion when it is the object in a renaming.
455 2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
457 * exp_ch5.adb, sem_ch3.adb, exp_ch9.adb, a-tags.adb, sem_prag.adb,
458 sem_ch12.adb, xref_lib.adb, a-strunb-shared.adb, rtsfind.adb,
459 freeze.adb, sem_attr.adb, sem_case.adb, exp_ch4.adb, ghost.adb,
460 exp_ch6.adb, sem_ch4.adb, restrict.adb, s-os_lib.adb: Minor
463 2016-10-12 Justin Squirek <squirek@adacore.com>
465 * sem_ch10.adb (Remove_Limited_With_Clause): Add a check to
466 detect accidental visibility.
468 2016-10-12 Ed Schonberg <schonberg@adacore.com>
470 * exp_ch4.adb (Expand_Allocator): If the expression is a qualified
471 expression, add a predicate check after the constraint check.
472 * sem_res.adb (Resolve_Qualified_Expression): If context is an
473 allocator, do not apply predicate check, as it will be done when
474 allocator is expanded.
476 2016-10-12 Bob Duff <duff@adacore.com>
478 * xref_lib.adb: Use renamings-of-slices to ensure
479 that all references to Tables are properly bounds checked (when
480 checks are turned on).
481 * g-dyntab.ads, g-dyntab.adb: Default-initialize the array
482 components, so we don't get uninitialized pointers in case
483 of Tables containing access types. Misc cleanup of the code
486 2016-10-12 Ed Schonberg <schonberg@adacore.com>
488 * sem_attr.adb (Analyze_Attribute, case 'Type_Key): Implement
489 functionality of attribute, to provide a reasonably unique key
490 for a given type and detect any changes in the semantics of the
491 type or any of its subcomponents from version to version.
493 2016-10-12 Bob Duff <duff@adacore.com>
495 * sem_case.adb (Check_Choice_Set): Separate
496 checking for duplicates out into a separate pass from checking
497 full coverage, because the check for duplicates does not depend
498 on predicates. Therefore, we shouldn't do it separately for the
499 predicate vs. no-predicate case; we should share code. The code
500 for the predicate case was wrong.
502 2016-10-12 Jerome Lambourg <lambourg@adacore.com>
504 * init.c: Make sure to call finit on x86_64-vx7 to reinitialize
507 2016-10-12 Arnaud Charlet <charlet@adacore.com>
509 * lib-load.adb (Load_Unit): Generate an error message even when
512 2016-10-12 Ed Schonberg <schonberg@adacore.com>
514 * lib-writ.adb (Write_ALI): Disable optimization related to transitive
515 limited_with clauses for now.
517 2016-10-12 Javier Miranda <miranda@adacore.com>
519 * sem_attr.adb (Analyze_Attribute_Old_Result): Generating C
520 code handle 'old located in inlined _postconditions procedures.
521 (Analyze_Attribute [Attribute_Result]): Handle 'result when
522 rewriting the attribute as a reference to the formal parameter
523 _Result of inlined _postconditions procedures.
525 2016-10-12 Tristan Gingold <gingold@adacore.com>
527 * s-rident.ads (Profile_Info): Remove
528 Max_Protected_Entries restriction from GNAT_Extended_Ravenscar
529 * sem_ch9.adb (Analyze_Protected_Type_Declaration):
530 Not a controlled type on restricted runtimes.
532 2016-10-12 Gary Dismukes <dismukes@adacore.com>
534 * sem_ch3.adb (Derive_Subprogram): Add test
535 for Is_Controlled of Parent_Type when determining whether an
536 inherited subprogram with one of the special names Initialize,
537 Adjust, or Finalize should be derived with its normal name even
538 when inherited as a private operation (which would normally
539 result in the inherited operation having a special "hidden" name).
541 2016-10-12 Ed Schonberg <schonberg@adacore.com>
543 * sem_res.adb (Resolve_Call): If a function call returns a
544 limited view of a type replace it with the non-limited view,
545 which must be available when compiling call. This was already
546 done elsewhere for non-overloaded calls, but needs to be done
547 after resolution if function name is overloaded.
549 2016-10-12 Javier Miranda <miranda@adacore.com>
551 * a-tags.adb (IW_Membership [private]): new overloaded
552 subprogram that factorizes the code needed to check if a
553 given type implements an interface type.
555 [public]): invoke the new internal IW_Membership function.
556 (Is_Descendant_At_Same_Level): Fix this routine to implement RM
559 2016-10-12 Tristan Gingold <gingold@adacore.com>
561 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Add support
562 for a secondary procedure in case of missing Ada.Calendar.Delays
563 * rtsfind.ads (RTU_Id): Add System_Relative_Delays.
564 (RE_Id): Add RO_RD_Delay_For.
565 * rtsfind.adb (Output_Entity_Name): Handle correctly units RO_XX.
566 * s-rident.ads: Remove No_Relative_Delays
567 restriction for GNAT_Extended_Ravenscar.
569 2016-10-12 Ed Schonberg <schonberg@adacore.com>
571 * sem_elab.adb (Within_Initial_Condition): When deternining
572 the context of the expression, use the original node if it is
573 a pragma, because Check pragmas are rewritten as conditionals
574 when assertions are not enabled.
576 2016-10-12 Bob Duff <duff@adacore.com>
578 * spitbol_table.ads, spitbol_table.adb (Adjust, Finalize): Add
581 2016-10-12 Bob Duff <duff@adacore.com>
583 * a-strunb-shared.ads, a-strunb-shared.adb (Finalize):
584 Make sure Finalize is idempotent.
585 (Unreference): Check for
586 Empty_Shared_String, in case the reference count of the empty
588 Also add "not null" in various places that can't be null.
590 2016-10-12 Jerome Lambourg <lambourg@adacore.com>
592 * init.c: Fix sigtramp with the x86_64-vx7-vxsim target on
595 2016-10-12 Vadim Godunko <godunko@adacore.com>
597 * s-os_lib.ads (Is_Owner_Readable_File): Renamed from
599 (Is_Owner_Writable_File): Renamed from Is_Writable_File.
600 (Is_Readable_File): Renames Is_Read_Accessible_File.
601 (Is_Writable_File): Renames Is_Write_Accessible_File.
603 2016-10-12 Ed Schonberg <schonberg@adacore.com>
605 * sem_ch12.adb (Check_Formal_Package_Instance): Skip an internal
606 formal entity without a parent only if the corresponding actual
607 entity has a different kind.
608 * exp_ch9.adb (Build_Class_Wide_Master): If the master is
609 declared locally, insert the renaming declaration after the
610 master declaration, to prevent access before elaboration in gigi.
612 2016-10-12 Ed Schonberg <schonberg@adacore.com>
614 * contracts.adb (Analyze_Contracts): For a type declaration, analyze
615 an iterable aspect when present.
617 2016-10-12 Ed Schonberg <schonberg@adacore.com>
619 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
620 an instance of a formal package with defaults, when defaulted
621 parameters include tagged private types and array types.
623 2016-10-12 Eric Botcazou <ebotcazou@adacore.com>
626 * exp_ch5.adb (Is_Non_Local_Array): Return true for every array
627 that is not a component or slice of an entity in the current
630 2016-10-12 Tristan Gingold <gingold@adacore.com>
632 * restrict.ads, restrict.adb (Restricted_Profile): Adjust
633 comment, use Restricted_Tasking to compare restrictions.
634 * s-rident.ads (Profile_Name): Add Restricted_Tasking and
636 (Profile_Info): Set restrictions for Restricted_Tasking.
638 2016-10-12 Ed Schonberg <schonberg@adacore.com>
640 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Ghost status
641 of type before elaborating inherited operations, so that the
642 Ghost status is set properly for them.
643 * ghost.adb (Check_Ghost_Overriding): A ghost subprogram can
644 override an abstract subprogram coming from an interface
647 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
649 * system-linux-armeb.ads (Backend_Overflow_Checks): Change to True.
650 * system-linux-mips.ads (Backend_Overflow_Checks): Likewise.
651 * system-linux-mips64el.ads (Backend_Overflow_Checks): Likewise.
652 * system-linux-mipsel.ads (Backend_Overflow_Checks): Likewise.
653 * system-linux-sparcv9.ads (Backend_Overflow_Checks): Likewise.
654 * system-rtems.ads (Backend_Overflow_Checks): Likewise.
656 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
658 * adaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP.
659 ISALPHA: include <ctype.h> and define to isalpha for DJGPP when IN_RTS
661 (DIR_SEPARATOR) define to '\\' for DJGPP.
662 (__gnat_get_file_names_case_sensitive): Return 0 for DJGPP unless
663 overriden in environment.
664 (__gnat_is_absolute_path): Support MS-DOS absolute paths for DJGPP.
665 (__gnat_portable_spawn): Use spewnvp for DJGPP.
666 (__gnat_portable_no_block_spawn): Use spawnvp for DJGPP.
667 (__gnat_portable_wait): Return 0 for DJGPP.
669 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
671 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP.
672 (EH_MECHANISM): Define to -gcc for DJGPP.
673 * system-djgpp.ads: New file.
675 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
677 * ctrl_c.c: Do not use macro SA_RESTART for DJGPP.
678 * gsocket.h: Do not support sockets for DJGPP.
679 * init.c (__gnat_install_handler): Implememt for DJGPP.
680 * sysdep.c: Include <io.h> for DJGPP.
681 (_setmode): Define to setmode for DJGPP.
682 (__gnat_set_mode): Add implementation for DJGPP.
683 (__gnat_localtime_tzoff): Use localtime_r for DJGPP.
684 * terminals.c: Add DJGPP to list of unsupported platforms.
685 * env.c (__gnat_clearenv): Use _gnat_unsetenv on all entries for DJGPP.
687 2016-10-11 Pierre-Marie de Rodat <derodat@adacore.com>
689 * exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
690 Emit GNAT encodings for object renamings involving record components
691 whose normalized bit offset is not null.
692 * uintp.h (UI_No_Uint): Declare.
693 * gcc-interface/gigi.h (can_materialize_object_renaming_p): Likewise.
694 * gcc-interface/utils.c (can_materialize_object_renaming_p): New
696 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Renaming_Declaration>:
697 In code generation mode, materialize all renamings as long as they need
698 debug info and we are not optimizing.
700 2016-10-11 Pierre-Marie de Rodat <derodat@adacore.com>
702 * gcc-interface/utils2.c (build_binary_op): Add a NO_FOLD argument.
703 Disable folding when it is true.
704 * gcc-interface/gigi.h (choices_to_gnu): Remove declaration.
705 (build_binary_op): Update signature and comment.
706 * gcc-interface/decl.c (choices_to_gnu): Make static. Disable
707 folding in calls to build_binary_op.
709 2016-10-11 Tristan Gingold <gingold@adacore.com>
711 * fe.h (Constant_Value): Declare.
712 * gcc-interface/decl.c (compile_time_known_address_p): Also consider
713 references to constants.
715 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
717 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_Add>: Adjust comment.
718 <N_Op_Minus>: Add comment and missing guard.
719 * gcc-interface/trans.c (build_binary_op_trapv): Use an explicit test.
721 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
723 * gcc-interface/utils.c (type_unsigned_for_rm): New predicate.
724 (make_type_from_size): Use it.
725 (unchecked_convert): Likewise. Do not skip the extension step if the
726 source type is not integral.
728 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
729 Tristan Gingold <gingold@adacore.com>
731 * system-linux-ppc64.ads: Delete.
732 * system-linux-ppc.ads: Make 32-bit/64-bit neutral.
733 * gcc-interface/Makefile.in (PowerPC/Linux): Simplify.
735 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
737 * gcc-interface/decl.c (gnat_to_gnu_entity): Put volatile qualifier
738 on types at the very end of the processing.
739 (gnat_to_gnu_param): Remove redundant test.
740 (change_qualified_type): Do nothing for unconstrained array types.
742 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
744 * gcc-interface/utils2.c (find_common_type): Do not return the LHS type
745 if it's an array with non-constant lower bound and the RHS type is an
746 array with a constant one.
748 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
750 * gcc-interface/utils.c (convert): For a biased input type, convert the
751 bias itself to the base type before adding it.
753 2016-10-08 Eric Botcazou <ebotcazou@adacore.com>
755 * gcc-interface/utils.c (convert) <VECTOR_CST>: Add missing break.
758 2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
760 * gcc-interface/decl.c: Fix fall through comment formatting.
761 * gcc-interface/misc.c: Likewise.
762 * gcc-interface/trans.c: Likewise.
763 * gcc-interface/utils.c: Likewise.
764 * gcc-interface/utils2.c: Likewise.
766 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
768 * gcc-interface/misc.c (gnat_post_options): Remove special case for
769 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
771 2016-09-27 Jakub Jelinek <jakub@redhat.com>
773 * terminals.c (is_gui_app): Remove break after return.
775 2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
777 * gcc-interface/decl.c: Fix fall through comment formatting.
778 * gcc-interface/misc.c: Likewise.
779 * gcc-interface/trans.c: Likewise.
780 * gcc-interface/utils.c: Likewise.
781 * gcc-interface/utils2.c: Likewise.
783 2016-09-23 Jakub Jelinek <jakub@redhat.com>
785 * gcc-interface/decl.c (gnat_to_gnu_entity): Use
786 CONSTRUCTOR_NELTS (...) instead of
787 vec_safe_length (CONSTRUCTOR_ELTS (...)).
789 2016-07-14 Eric Botcazou <ebotcazou@adacore.com>
791 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Also use
792 the void pointer type if the designated type is incomplete and has no
793 full view in LTO mode.
794 <E_Access_Protected_Subprogram_Type>: Adjust comment.
795 <E_Incomplete_Type>: Likewise.
796 * gcc-interface/trans.c (Call_to_gnu): Do not convert to the type of
797 the actual if it is a dummy type.
799 2016-07-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
801 * gcc-interface/ada-tree.h (TYPE_ALIGN_OK): Define.
802 * gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
804 * gcc-interface/utils2.c (build_unary_op): Likewise.
806 2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
808 * gcc-interface/trans.c (add_decl_expr): Minor tweak.
809 * gcc-interface/utils.c (create_var_decl): For an external variable,
810 also clear TREE_READONLY in LTO mode if the initializer is not a valid
811 constant and set DECL_READONLY_ONCE_ELAB instead.
813 2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
816 * adaint.c (__gnat_is_read_accessible_file): Add parentheses.
817 (__gnat_is_write_accessible_file): Likewise.
819 2016-07-07 Ed Schonberg <schonberg@adacore.com>
821 * exp_ch6.adb (Expand_Internal_Init_Call): Subsidiary procedure
822 to Expand_Protected_ Subprogram_Call, to handle properly a
823 call to a protected function that provides the initialization
824 expression for a private component of the same protected type.
825 * sem_ch9.adb (Analyze_Protected_Definition): Layout must be
826 applied to itypes generated for a private operation of a protected
827 type that has a formal of an anonymous access to subprogram,
828 because these itypes have no freeze nodes and are frozen in place.
829 * sem_ch4.adb (Analyze_Selected_Component): If prefix is a
830 protected type and it is not a current instance, do not examine
831 the first private component of the type.
833 2016-07-07 Arnaud Charlet <charlet@adacore.com>
835 * exp_imgv.adb, g-dynhta.adb, s-regexp.adb, s-fatgen.adb, s-poosiz.adb:
836 Minor removal of extra whitespace.
837 * einfo.ads: minor removal of repeated "as" in comment
839 2016-07-07 Vadim Godunko <godunko@adacore.com>
841 * adaint.c: Complete previous change.
843 2016-07-07 Vadim Godunko <godunko@adacore.com>
845 * adainit.h, adainit.c (__gnat_is_read_accessible_file): New
847 (__gnat_is_write_accessible_file): New subprogram.
848 * s-os_lib.ads, s-os_lib.adb (Is_Read_Accessible_File): New subprogram.
849 (Is_Write_Accessible_File): New subprogram.
851 2016-07-07 Justin Squirek <squirek@adacore.com>
853 * sem_ch12.adb (Install_Body): Minor refactoring in the order
855 (In_Same_Scope): Change loop condition to be more expressive.
857 2016-07-07 Gary Dismukes <dismukes@adacore.com>
859 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, prj-ext.adb, freeze.adb,
860 sem_attr.adb: Minor reformatting, fix typos.
862 2016-07-07 Justin Squirek <squirek@adacore.com>
864 * sem_ch12.adb (In_Same_Scope): Created this function to check
865 a generic package definition against an instantiation for scope
867 (Install_Body): Add function In_Same_Scope and
868 amend conditional in charge of delaying the package instance.
869 (Is_In_Main_Unit): Add guard to check if parent is present in
870 assignment of Current_Unit.
872 2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
874 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove redundant test,
875 adjust comments and formatting.
876 * sem_prag.adb (Inlining_Not_Possible): Do not test Front_End_Inlining
878 (Make_Inline): ...here before calling Inlining_Not_Possible instead.
879 (Set_Inline_Flags): Remove useless test.
880 (Analyze_Pragma) <Pragma_Inline>: Add comment about -gnatn switch.
882 2016-07-07 Ed Schonberg <schonberg@adacore.com>
884 * sem_prag.ads, sem_prag.adb (Build_Classwide_Expression): Include
885 overridden operation as parameter, in order to map formals of
886 the overridden and overring operation properly prior to rewriting
887 the inherited condition.
888 * freeze.adb (Check_Inherited_Cnonditions): Change call to
889 Build_Class_Wide_Expression accordingly. In Spark_Mode, add
890 call to analyze the contract of the parent operation, prior to
891 mapping formals between operations.
893 2016-07-07 Arnaud Charlet <charlet@adacore.com>
895 * adabkend.adb (Scan_Back_End_Switches): Ignore -o/-G switches
896 as done in back_end.adb.
897 (Scan_Compiler_Args): Remove special case for CodePeer/SPARK, no longer
898 needed, and prevents proper handling of multi-unit sources.
900 2016-07-07 Thomas Quinot <quinot@adacore.com>
902 * g-sechas.adb, g-sechas.ads (GNAT.Secure_Hashes.H): Add Hash_Stream
903 type with Write primitive calling Update on the underlying context
904 (and dummy Read primitive raising P_E).
906 2016-07-07 Thomas Quinot <quinot@adacore.com>
908 * sem_ch13.adb: Minor reformatting.
910 2016-07-07 Thomas Quinot <quinot@adacore.com>
912 * g-socket.ads: Document performance consideration for stream
915 2016-07-07 Arnaud Charlet <charlet@adacore.com>
917 * osint-c.ads (Set_File_Name): Clarify spec.
919 2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
921 * freeze.adb: Reenable code.
923 2016-07-07 Yannick Moy <moy@adacore.com>
925 * sem_ch6.adb (Process_Formals): Set ghost flag
926 on formal entities of ghost subprograms.
927 * ghost.adb (Check_Ghost_Context.Is_OK_Ghost_Context): Accept ghost
928 entities in use type clauses.
930 2016-07-06 Javier Miranda <miranda@adacore.com>
932 * sem_ch6.adb (Check_Inline_Pragma): if the subprogram has no spec
933 then move its aspects to the internally built subprogram spec.
935 2016-07-06 Yannick Moy <moy@adacore.com>
937 * sem_ch6.adb (Analyze_Expression_Function): Mark body of
938 expression function as ghost if needed when created.
939 * sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
942 2016-07-06 Arnaud Charlet <charlet@adacore.com>
944 * lib.adb (Check_Same_Extended_Unit): Complete previous change.
945 * sem_intr.adb (Errint): New parameter Relaxed. Refine previous
946 change to only disable errors selectively.
947 * sem_util.adb: minor style fix in object declaration
949 2016-07-06 Yannick Moy <moy@adacore.com>
951 * sem_warn.adb (Check_Infinite_Loop_Warning.Find_Var): Special case a
952 call to a volatile function, so that it does not lead to a warning in
955 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
957 * sem_ch12.adb, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
959 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
961 * gnat1drv.adb: Code clean up. Do not emit any
962 code generation errors when the unit is ignored Ghost.
964 2016-07-06 Ed Schonberg <schonberg@adacore.com>
966 * sem_eval.adb (Check_Non_Static_Context): If the expression
967 is a real literal of a floating point type that is part of a
968 larger expression and is not a static expression, transform it
969 into a machine number now so that the rest of the computation,
970 even if other components are static, is not evaluated with
973 2016-07-06 Javier Miranda <miranda@adacore.com>
975 * sem_ch13.adb (Freeze_Entity_Checks): Undo previous patch and move the
976 needed functionality to Analyze_Freeze_Generic_Entity.
977 (Analyze_Freeze_Generic_Entity): If the entity is not already frozen
978 and has delayed aspects then analyze them.
980 2016-07-06 Yannick Moy <moy@adacore.com>
982 * sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
983 Special case for unanalyzed body entity of ghost expression function.
985 2016-07-06 Javier Miranda <miranda@adacore.com>
987 * sem_ch7.adb (Analyze_Package_Specification): Insert its
988 freezing nodes after the last declaration. Needed to ensure
989 that global entities referenced in aspects of frozen types are
991 * freeze.adb (Freeze_Entity): Minor code reorganization to ensure
992 that freezing nodes of generic packages are handled.
993 * sem_ch13.adb (Freeze_Entity_Checks): Handle N_Freeze_Generic nodes.
994 * sem_ch12.adb (Save_References_In_Identifier): Handle selected
995 components which denote a named number that is constant folded
996 in the analyzed copy of the tree.
998 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
1000 * exp_aggr.adb Remove with and use clauses for Exp_Ch11 and Inline.
1001 (Initialize_Array_Component): Protect the initialization
1002 statements in an abort defer / undefer block when the associated
1003 component is controlled.
1004 (Initialize_Record_Component): Protect the initialization statements
1005 in an abort defer / undefer block when the associated component is
1007 (Process_Transient_Component_Completion): Use Build_Abort_Undefer_Block
1008 to create an abort defer / undefer block.
1009 * exp_ch3.adb Remove with and use clauses for Exp_ch11 and Inline.
1010 (Default_Initialize_Object): Use Build_Abort_Undefer_Block to
1011 create an abort defer / undefer block.
1012 * exp_ch5.adb (Expand_N_Assignment_Statement): Mark an abort
1013 defer / undefer block as such.
1014 * exp_ch9.adb (Find_Enclosing_Context): Do not consider an abort
1015 defer / undefer block as a suitable context for an activation
1017 * exp_util.adb Add with and use clauses for Exp_Ch11.
1018 (Build_Abort_Undefer_Block): New routine.
1019 * exp_util.ads (Build_Abort_Undefer_Block): New routine.
1020 * sinfo.adb (Is_Abort_Block): New routine.
1021 (Set_Is_Abort_Block): New routine.
1022 * sinfo.ads New attribute Is_Abort_Block along with occurrences
1024 (Is_Abort_Block): New routine along with pragma Inline.
1025 (Set_Is_Abort_Block): New routine along with pragma Inline.
1027 2016-07-06 Justin Squirek <squirek@adacore.com>
1029 * sem_ch4.adb (Analyze_One_Call): Add a conditional to handle
1032 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
1034 * einfo.adb Flag252 is now used as Is_Finalized_Transient. Flag295
1035 is now used as Is_Ignored_Transient.
1036 (Is_Finalized_Transient): New routine.
1037 (Is_Ignored_Transient): New routine.
1038 (Is_Processed_Transient): Removed.
1039 (Set_Is_Finalized_Transient): New routine.
1040 (Set_Is_Ignored_Transient): New routine.
1041 (Set_Is_Processed_Transient): Removed.
1042 (Write_Entity_Flags): Output Flag252 and Flag295.
1043 * einfo.ads: New attributes Is_Finalized_Transient
1044 and Is_Ignored_Transient along with occurrences in
1045 entities. Remove attribute Is_Processed_Transient.
1046 (Is_Finalized_Transient): New routine along with pragma Inline.
1047 (Is_Ignored_Transient): New routine along with pragma Inline.
1048 (Is_Processed_Transient): Removed along with pragma Inline.
1049 (Set_Is_Finalized_Transient): New routine along with pragma Inline.
1050 (Set_Is_Ignored_Transient): New routine along with pragma Inline.
1051 (Set_Is_Processed_Transient): Removed along with pragma Inline.
1052 * exp_aggr.adb Add with and use clauses for Exp_Ch11 and Inline.
1053 (Build_Record_Aggr_Code): Change the handling
1054 of controlled record components.
1055 (Ctrl_Init_Expression): Removed.
1056 (Gen_Assign): Add new formal parameter In_Loop
1057 along with comment on usage. Remove local variables Stmt and
1058 Stmt_Expr. Change the handling of controlled array components.
1059 (Gen_Loop): Update the call to Gen_Assign.
1060 (Gen_While): Update the call to Gen_Assign.
1061 (Initialize_Array_Component): New routine.
1062 (Initialize_Ctrl_Array_Component): New routine.
1063 (Initialize_Ctrl_Record_Component): New routine.
1064 (Initialize_Record_Component): New routine.
1065 (Process_Transient_Component): New routine.
1066 (Process_Transient_Component_Completion): New routine.
1067 * exp_ch4.adb (Process_Transient_In_Expression): New routine.
1068 (Process_Transient_Object): Removed. Replace all existing calls
1069 to this routine with calls to Process_Transient_In_Expression.
1070 * exp_ch6.adb (Expand_Ctrl_Function_Call): Remove local constant
1071 Is_Elem_Ref. Update the comment on ignoring transients.
1072 * exp_ch7.adb (Process_Declarations): Do not process ignored
1073 or finalized transient objects.
1074 (Process_Transient_In_Scope): New routine.
1075 (Process_Transients_In_Scope): New routine.
1076 (Process_Transient_Objects): Removed. Replace all existing calls
1077 to this routine with calls to Process_Transients_In_Scope.
1078 * exp_util.adb (Build_Transient_Object_Statements): New routine.
1079 (Is_Finalizable_Transient): Do not consider a transient object
1080 which has been finalized.
1081 (Requires_Cleanup_Actions): Do not consider ignored or finalized
1083 * exp_util.ads (Build_Transient_Object_Statements): New routine.
1084 * sem_aggr.adb: Major code clean up.
1085 * sem_res.adb: Update documentation.
1087 2016-07-06 Ed Schonberg <schonberg@adacore.com>
1089 * sem_ch3.adb (Analyze_Subtype_Declaration): For generated
1090 subtypes, such as actual subtypes of unconstrained formals,
1091 inherit predicate functions, if any, from the parent type rather
1092 than creating redundant new ones.
1094 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
1096 * exp_attr.adb, sem_attr.adb, sem_ch13.adb: Minor reformatting.
1098 2016-07-06 Arnaud Charlet <charlet@adacore.com>
1100 * lib.adb (Check_Same_Extended_Unit): Prevent looping forever.
1101 * gnatbind.adb: Disable some consistency checks in codepeer mode,
1102 which are not needed.
1104 2016-07-06 Ed Schonberg <schonberg@adacore.com>
1106 * sem_ch12.adb (Check_Fixed_Point_Actual): Add a warning when
1107 a formal fixed point type is instantiated with a type that has
1108 a user-defined arithmetic operations, but the generic has no
1109 corresponding formal functions. This is worth a warning because
1110 of the special semantics of fixed-point operators.
1112 2016-07-06 Bob Duff <duff@adacore.com>
1114 * sem_attr.adb (Analyze_Attribute): Allow any expression of
1116 * exp_attr.adb (Expand_N_Attribute_Reference): Change the
1117 constant-folding code to correctly handle cases newly allowed
1118 by Analyze_Attribute.
1120 2016-07-05 Eric Botcazou <ebotcazou@adacore.com>
1122 * gcc-interface/decl.c (gnat_to_gnu_entity): Invoke global_bindings_p
1123 last when possible. Do not call elaborate_expression_2 on offsets in
1124 local record types and avoid useless processing for constant offsets.
1126 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1128 * gnat_rm.texi, gnat_ugn.texi,
1129 doc/gnat_ugn/gnat_project_manager.rst,
1130 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1131 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
1132 doc/gnat_ugn/about_this_guide.rst,
1133 doc/gnat_ugn/platform_specific_information.rst,
1134 doc/gnat_ugn/tools_supporting_project_files.rst,
1135 doc/gnat_ugn/gnat_and_program_execution.rst,
1136 doc/gnat_ugn/gnat_utility_programs.rst,
1137 doc/gnat_ugn/the_gnat_compilation_model.rst,
1138 doc/gnat_rm/implementation_defined_attributes.rst,
1139 doc/gnat_rm/implementation_defined_pragmas.rst,
1140 doc/gnat_rm/representation_clauses_and_pragmas.rst,
1141 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1142 doc/gnat_ugn.rst: Update documentation.
1144 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1146 * gcc-interface/Makefile.in: Cleanups.
1148 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1150 * sem_attr.adb (Analyze_Attribute_Old_Result): The attributes can
1151 appear in the postcondition of a subprogram renaming declaration,
1152 when the renamed entity is an attribute reference that is a
1153 function (such as 'Value).
1154 * sem_attr.adb (Eval_Attribute): It doesn't
1155 need to be static, just known at compile time, so use
1156 Compile_Time_Known_Value instead of Is_Static_Expression.
1157 This is an efficiency improvement over the previous bug fix.
1158 * sem_ch13.adb (Analyze_One_Aspect): Use Original_Node to detect
1159 illegal aspects on subprogram renaming declarations that may
1160 have been rewritten as bodies.
1162 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1164 * sem_intr.adb (Errint): Do not emit error message in
1165 Relaxed_RM_Semantics mode.
1167 2016-07-04 Bob Duff <duff@adacore.com>
1169 * sem_attr.adb (Eval_Attribute): The code was assuming
1170 that X'Enum_Rep, where X denotes a constant, can be constant
1171 folded. Fix it so it makes that assumption only when X denotes
1174 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1176 * sem_ch4.adb (Compatible_Types_In_Predicate): New function
1177 to handle cases where a formal of a predicate function and the
1178 corresponding actual have different views of the same type.
1180 2016-07-04 Philippe Gil <gil@adacore.com>
1182 * g-debpoo.adb (Free_Blocks) free blocks also until
1183 Logically_Deallocated less than Maximum_Logically_Freed_Memory
1184 (Dump) add dump of number of traceback & validity elements
1187 2016-07-04 Justin Squirek <squirek@adacore.com>
1189 * sem_ch12.adb (Instantiate_Package_Body): Add
1190 a guard to ignore Itypes which fail when installing primitives.
1192 2016-07-04 Bob Duff <duff@adacore.com>
1194 * sem_eval.adb (Decompose_Expr): Set 'out' parameters
1195 Kind and Cons to valid values, to avoid use of uninit vars.
1196 (Extract_Length): Reorder the check to make it clearer that
1197 we're depending on BOTH Ent1 and Ent2 to be Present.
1198 * sem_aggr.adb (Resolve_Aggregate): Remove dead code.
1199 (Check_Misspelled_Component): Remove exit statement, because
1200 it's covered by the 'while' condition.
1201 * checks.adb (Apply_Selected_Range_Checks): Remove useless
1202 condition "or else not Checks_On".
1203 (Selected_Range_Checks):
1204 Initialize Known_LB and Known_HB to False, because they are
1205 tested unconditionally; avoid use of uninit vars.
1206 * frontend.adb (Frontend): Removed useless condition
1207 "Operating_Mode = Check_Semantics and then", and added an Assert
1208 to clarify why it was useless.
1209 * prep.adb (Preprocess): Remove redundant condition. Add an
1211 * sem_ch10.adb (Analyze_Proper_Body): Moved redundant condition
1212 "Original_Operating_Mode = Generate_Code" to an Assert.
1213 (Process_Spec_Clauses, Process_Body_Clauses): Change parameters
1214 from 'in out' to 'out', and don't initialize actuals.
1215 * sem_ch12.adb (Is_In_Main_Unit): Removed useless condition
1216 "Unum = Main_Unit or else".
1217 (Save_Global_Descendant): Moved
1218 redundant condition "D = Union_Id (No_List)" to an Assert.
1219 * sem_ch4.adb (Check_Misspelled_Selector): Remove exit
1220 statement, because it's covered by the 'while' condition.
1221 (Analyze_Case_Expression): Initialize Wrong_Alt to Empty,
1222 because it looks like it is used uninitialized otherwise.
1223 * sem_ch6.adb (Check_Return_Subtype_Indication): Moved redundant
1224 condition "not R_Type_Is_Anon_Access" to an Assert.
1225 * sem_elim.adb (Line_Num_Match): Moved redundant condition
1226 "Sloc_Trace (Idx) = '['" to an Assert.
1227 * sem_util.adb (Compile_Time_Constraint_Error): Change "J" to
1228 "J - 1". This code is trying to replace "?" with "<", but not if
1229 the "?" is quoted, as in "'?", so we want to check the PREVIOUS
1231 * snames.adb-tmpl (Is_Pragma_Name): Remove useless condition
1232 "or else N = Name_Relative_Deadline". It's useless because
1233 Name_Relative_Deadline is in the range First_Pragma_Name
1234 .. Last_Pragma_Name.
1235 * treepr.adb (Visit_Node): Moved redundant condition "D =
1236 Union_Id (No_List)" to an Assert.
1237 * sem_ch3.adb (Derive_Subprogram, Derive_Subprograms): Change
1238 parameters from 'in out' to 'out'.
1239 * errout.adb (Error_Msg_Internal): Replace redundant test with Assert.
1240 * inline.adb (Add_Inlined_Body): Code cleanup.
1242 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1244 * g-sercom-mingw.adb, sem_ch6.adb: Minor reformatting.
1246 2016-07-04 Olivier Hainque <hainque@adacore.com>
1248 * g-sercom-mingw.adb (Set): Fix port configuration for the
1249 non-blocking + null-timeout case, request of immediate return.
1251 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1253 * sem_ch6.adb (Is_Non_Overriding_Operation): Add guard to test
1254 of generic parent type when operation is a parameterless function
1255 that may dispatch on result.
1257 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1259 * freeze.adb, ghost.adb, sem_ch13.adb: Minor reformatting.
1261 2016-07-04 Pascal Obry <obry@adacore.com>
1263 * g-forstr.ads: More documentation for the Formatted_String
1266 2016-07-04 Justin Squirek <squirek@adacore.com>
1268 * sem_ch7.adb (Install_Parent_Private_Declarations): When
1269 instantiating a child unit, do not install private declaration of
1270 a non-generic ancestor of the generic that is also an ancestor
1271 of the current unit: its private part will be installed when
1272 private part of ancestor itself is analyzed.
1274 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1276 * sem_ch12.adb (Instantiate_Object): In SPARK mode add a guard
1277 to verify that the actual is an object reference before checking
1279 (Check_Generic_Child_Unit): Prevent cascaded errors when prefix
1282 2016-07-04 Gary Dismukes <dismukes@adacore.com>
1284 * sem_ch12.ads, freeze.adb: Minor reformatting and typo fixes.
1286 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1288 * sem_ch13.adb (New_Stream_Subprogram): If the attribute
1289 definition clause comes from an aspect specification, place the
1290 generated subprogram renaming in the freeze actions of the type.
1292 2016-07-04 Philippe Gil <gil@adacore.com>
1294 * g-debpoo.adb (Dump.Do_Report) - add space prefix to backtrace
1295 address dump - avoid new line sent directly to stdout.
1297 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1299 * gnat1drv.adb, sem_ch12.adb, sem_elab.adb, sem_prag.adb, sem_res.adb:
1300 Relax elaboration checks in SPARK_Mode so that we rely on the
1301 static elaboration model (if used). We'll have a more precise
1302 check performed in flow analysis of gnat2why.
1304 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1306 * ghost.adb (Prune_Node): A freeze node for an ignored ghost
1307 entity must be pruned as well.
1309 2016-07-04 Gary Dismukes <dismukes@adacore.com>
1311 * sem_type.adb, einfo.ads, freeze.adb, exp_ch6.adb: Minor reformatting
1314 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1316 * sem_ch3.adb, sem_type.adb, sem_ch12.adb, xref_lib.adb,
1317 freeze.adb, sinput-l.adb, sinput-l.ads, sem_ch4.adb, sem_ch8.adb:
1320 2016-07-04 Justin Squirek <squirek@adacore.com>
1322 * sem_prag.adb (Analyze_Unmodified_Or_Unused and
1323 Analyze_Unreferenced_Or_Unused): Change warning message to be
1324 more clear about pragma duplicates.
1326 2016-07-04 Yannick Moy <moy@adacore.com>
1328 * sinput-l.adb (Create_Instantiation_Source): Set component
1329 Inlined_Call for inherited pragma case.
1330 * sinput.adb, sinput.ads (Instantiation): Return component
1331 Inlined_Call for inherited pragma case.
1333 2016-07-04 Bob Duff <duff@adacore.com>
1335 * sem_type.adb (Remove_Conversions): Protect
1336 the call to Left_Opnd by checking for Nkind in N_Unary_Op --
1337 unary operators do not have a left operand.
1339 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1341 * sem_ch3.adb (Analyze_Object_Declaration): A declaration of a
1342 constant in a protected operation may be a homonym of a private
1343 component of the enclosing protected type. This declaration hides
1344 the component renaming constructed within the protected operation.
1346 2016-07-04 Bob Duff <duff@adacore.com>
1348 * xref_lib.adb (Parse_X_Filename, Parse_Identifier_Info): Ignore
1349 unknown files. Check that File_Nr is in the range of files we
1350 know about. The previous code was checking the lower bound,
1351 but not the upper bound.
1353 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1355 * tracebak.c: Minor reformatting.
1357 2016-07-04 Yannick Moy <moy@adacore.com>
1359 * sem_ch12.adb, sem_ch12.ads Update calls to
1360 Create_Instantiation_Source to use default argument.
1361 (Adjust_Inherited_Pragma_Sloc): New function to adjust sloc
1362 of inherited pragma.
1363 (Set_Copied_Sloc_For_Inherited_Pragma):
1364 New function that wraps call to Create_Instantiation_Source for
1365 copying an inherited pragma.
1366 (Set_Copied_Sloc_For_Inlined_Body): Update call to
1367 Create_Instantiation_Source with new arguments.
1368 * sem_prag.adb (Build_Pragma_Check_Equivalent): In the case
1369 of inherited pragmas, use the generic machinery to get chained
1370 locations for the pragma and its sub-expressions.
1371 * sinput-c.adb: Adapt to new type Source_File_Record.
1372 * sinput-l.adb, sinput-l.ads (Create_Instantiation_Source):
1373 Add parameter Inherited_Pragma and make parameter Inlined_Body
1375 * sinput.adb, sinput.ads (Comes_From_Inherited_Pragma): New
1376 function to return when a location comes from an inherited pragma.
1377 (Inherited_Pragma): New function to detect when a location comes
1378 from an inherited pragma.
1379 (Source_File_Record): New component Inherited_Pragma.
1381 2016-07-04 Yannick Moy <moy@adacore.com>
1383 * sem_elab.adb: Register existence of quickfix for error message.
1385 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1387 * sem_ch4.adb (Resolve_One_Call): In the context of a predicate
1388 function the formal and the actual in a call may have different
1389 views of the same type, because of the delayed analysis of
1390 predicates aspects. Extend the patch that handles this potential
1391 discrepancy to handle private and full views as well.
1392 * sem_ch8.adb (Find_Selected_Component): Refine predicate that
1393 produces additional error when an illegal selected component
1394 looks like a prefixed call whose first formal is untagged.
1396 2016-07-04 Justin Squirek <squirek@adacore.com>
1398 * einfo.adb (Has_Pragma_Unused): Create this function as a setter
1399 for a new flag294 (Set_Has_Pragma_Unused): Create this procedure
1400 as a getter for flag294 (Write_Entity_Flags): Register the new
1402 * einfo.ads Add comment documenting Has_Pragma_Unused (flag294)
1403 and subsequent getter and setter declarations.
1404 * lib-xref.adb (Generate_Reference): Recognize Has_Pragma_Unused
1405 flag to print appropriate warning messages.
1406 * par-prag.adb (Prag): Classify Pragma_Unused into "All Other
1408 * snames.ads-tmpl Add a new name to the name constants and a
1409 new pramga to Pragma_Id for pramga Unused.
1410 * sem_prag.adb (Analyze_Pragma): Create case for Pragma_Unused
1411 and move the block for Pragma_Unmodified and Pragma_Unreferenced
1412 out and into local subprograms.
1413 (Analyze_Unmodified, Analyze_Unreferenced): From the old pragma blocks
1414 that have been separated in to local subprograms add a parameter to
1415 indicate the if they are being called in the context of Pragma_Unused
1416 and handle it accordingly.
1417 (Is_Non_Significant_Pragma_Reference): Add an entry for Pragma_Unused
1418 and correct the position of Pragma_Unevaluated_Use_Of_Old.
1419 * sem_util.adb (Note_Possible_Modification): Recognize
1420 Has_Pragma_Unused flag to print appropriate warning messages.
1422 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1424 * freeze.adb (Check_Inherited_Conditions): Perform two passes over
1425 the primitive operations of the type: one over source overridings
1426 to build the primitives mapping, and one over inherited operations
1427 to check for the need to create wrappers, and to check legality
1428 of inherited condition in SPARK.
1429 * sem_prag.ads (Update_Primitive_Mapping): Make public, for use
1431 * sem_prag.adb (Build_Pragma_Check_Equivalent): Refine error
1432 message in the case of an inherited condition in SPARK that
1433 includes a call to some other overriding primitive.
1435 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
1437 * exp_aggr.adb (Ctrl_Init_Expression): New routine.
1438 (Gen_Assign): Code cleanup. Perform in-place side effect removal when
1439 the expression denotes a controlled function call.
1440 * exp_util.adb (Remove_Side_Effects): Do not remove side effects
1441 on a function call which has this behavior suppressed.
1442 * sem_aggr.adb Code cleanup.
1443 * sinfo.adb (No_Side_Effect_Removal): New routine.
1444 (Set_Side_Effect_Removal): New routine.
1445 * sinfo.ads New attribute No_Side_Effect_Removal along with
1446 occurences in nodes.
1447 (No_Side_Effect_Removal): New routine along with pragma Inline.
1448 (Set_Side_Effect_Removal): New routine along with pragma Inline.
1450 2016-07-04 Arnaud Charlet <charlet@adacore.com>
1452 * opt.ads, sem_prag.adb (Universal_Addressing_On_AAMP): Removed.
1453 Remove support for pragma No_Run_Time. Update comments.
1455 2016-07-04 Pascal Obry <obry@adacore.com>
1457 * g-forstr.ads: More documentation for the Formatted_String
1460 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1462 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
1463 'Address): If the address comes from an aspect specification
1464 and not a source attribute definition clause, do not remove
1465 side effects from the expression, because the expression must
1466 be elaborated at the freeze point of the object and not at the
1467 object declaration, because of the delayed analysis of aspect
1470 2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
1474 * gcc-interface/gigi.h (enum standard_datatypes): Add ADT_realloc_decl
1475 (realloc_decl): New macro.
1476 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use local
1477 variable for the entity type and translate it as void pointer if the
1478 entity has convention C.
1479 (gnat_to_gnu_entity) <E_Function>: If this is not a definition and the
1480 external name matches that of malloc_decl or realloc_decl, return the
1481 correspoding node directly.
1482 (gnat_to_gnu_subprog_type): Likewise for parameter and return types.
1483 * gcc-interface/trans.c (gigi): Initialize void_list_node here, not...
1484 Initialize realloc_decl.
1485 * gcc-interface/utils.c (install_builtin_elementary_types): ...here.
1486 (build_void_list_node): Delete.
1487 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Return the
1488 alignment of the system allocator for malloc_decl and realloc_decl.
1489 Do not take alignment from void pointer types either.
1491 2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
1493 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Reorder.
1494 (LANG_HOOKS_INIT_TS): Likewise.
1496 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1498 * sem_prag.adb: Revert unwanted change in previous commit,
1499 only keep message fix.
1501 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1503 * sem_prag.ads (Build_Classwide_Expression): new procedure to
1504 build the expression for an inherited classwide condition, and
1505 to validate such expressions when they apply to an inherited
1506 operation that is not overridden.
1507 * sem_prag.adb (Primitives_Mapping): new data structure to
1508 handle the mapping between operations of a root type and the
1509 corresponding overriding operations of a type extension. Used
1510 to construct the expression for an inherited classwide condition.
1511 (Update_Primitives_Mapping): add to Primitives_Mapping the links
1512 between primitive operations of a root type and those of a given
1514 (Build_Pragma_Check_Equivalent): use Primitives_Mapping.
1515 * sem_ch6.adb (New_Overloaded_Entity): Remove call to
1516 Collect_Iherited_Class_Wide_Conditions in GNATprove_Mode. This
1517 needs to be done at freeze point of the type.
1518 * freeze.adb (Check_Inherited_Conditions): new procedure to
1519 verify the legality of inherited classwide conditions. In normal
1520 compilation mode the procedure determines whether an inherited
1521 operation needs a wrapper to handle an inherited condition that
1522 differs from the condition of the root type. In SPARK mode
1523 the routine invokes Collect_Inherited_Class_Wide_Conditions to
1524 produce the SPARK version of these inherited conditions.
1525 (Freeze_Record_Type): For a type extension, call
1526 Check_Inherited_Conditions.
1528 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1530 * sem_ch3.adb, sem_type.adb, sem.adb, freeze.adb, sem_util.adb,
1531 s-htable.adb, exp_ch11.adb, s-secsta.adb, restrict.adb, exp_disp.adb,
1532 sem_ch8.adb, s-tpobop.adb, exp_aggr.ads, sem_ch13.adb: Minor
1535 2016-06-22 Yannick Moy <moy@adacore.com>
1537 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Inverse order of
1538 treatments so that files without compilation unit are simply skipped
1539 before more elaborate treatments.
1541 2016-06-22 Bob Duff <duff@adacore.com>
1543 * s-memory.ads: Minor typo fixes in comments.
1544 * s-memory.adb: Code cleanup.
1546 2016-05-22 Olivier Hainque <hainque@adacore.com>
1548 * vxworks-crtbe-link.spec: Removed, no longer used.
1550 2016-06-22 Justin Squirek <squirek@adacore.com>
1552 * sem_ch8.adb (Push_Scope): Add a check for when the
1553 scope table is empty to assign the global variable
1554 Configuration_Component_Alignment.
1555 * sem.adb (Do_Analyze): Add Configuration_Component_Alignment
1556 to be assigned when the environment is cleaned instead of the
1558 * sem.ads Add a global variable Configuration_Component_Alignment
1559 to store the value given by pragma Component_Alignment in the
1560 context of a configuration file.
1561 * sem_prag.adb (Analyze_Pragma): Correct the case for
1562 Component_Alignment so that the pragma is verified and add
1563 comments to explain how it is applied to the scope stack.
1565 2016-06-22 Justin Squirek <squirek@adacore.com>
1567 * sprint.adb (Sprint_Node_Actual): Add check in
1568 the case of an N_Object_Declaration when evaluating an expression
1569 to properly ignore errors.
1571 2016-06-22 Bob Duff <duff@adacore.com>
1573 * g-comlin.ads (Parameter_Type): Change subtype of Last to
1575 * g-comlin.adb (Set_Parameter): Change subtype of Last to
1577 (Getopt): Check for Arg = "", and Switches /= "".
1578 (Internal_Initialize_Option_Scan): Check for Argument (Parser,
1581 2016-06-22 Gary Dismukes <dismukes@adacore.com>
1583 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
1585 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1587 * einfo.ads, einfo.adb (Is_Actual_Subtype): New flag, defined
1588 on subtypes that are created within subprogram bodies to handle
1589 unconstrained composite formals.
1590 * checks.adb (Apply_Predicate_Check): Do not generate a check on
1591 an object whose type is an actual subtype.
1592 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate an
1593 actual subtype for a formal whose base type is private.
1594 Set Is_Actual_Subtype on corresponding entity after analyzing
1597 2016-06-22 Justin Squirek <squirek@adacore.com>
1599 * sem_prag.adb (Check_Expr_Is_OK_Static_Expression): Fix ordering
1600 of if-block and add in a condition to test for errors during
1602 * sem_res.adb (Resolution_Failed): Add comment to explain why
1603 the type of a node which failed to resolve is set to the desired
1604 type instead of Any_Type.
1605 * sem_ch8.adb (Analyze_Object_Renaming): Add a check for Any_Type
1606 to prevent crashes on Is_Access_Constant.
1608 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1610 * lib-xref-spark_specific.adb, checks.adb, sem_ch13.adb: Minor
1612 * exp_ch7.adb: Minor typo fix.
1613 * lib.ads (Get_Top_Level_Code_Unit): Add comment.
1615 2016-06-22 Bob Duff <duff@adacore.com>
1617 * s-tassta.adb (Task_Wrapper): Fix handling of Fall_Back_Handler
1618 wrt independent tasks.
1620 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1622 * sem_dim.adb (Analyze_Dimension): Propagate dimension for
1623 explicit_dereference nodes when they do not come from source,
1624 to handle correctly dimensional analysis on iterators over
1625 containers whose elements have declared dimensions.
1627 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1629 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
1630 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
1631 moved into scope of Collect_SPARK_Xrefs.
1632 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
1633 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
1634 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
1636 (Traverse_Compilation_Unit): refactored as a generic procedure.
1637 * types.ads (Unit_Number_Type): range refined.
1639 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1641 * lib-xref-spark_specific.adb, a-cuprqu.ads, sem_ch6.adb: Minor
1644 2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
1646 * sem_util.ads (Address_Value): Declare new function.
1647 * sem_util.adb (Address_Value): New function extracted
1648 unmodified from Apply_Address_Clause_Check, which returns the
1649 underlying value of the expression of an address clause.
1650 * checks.adb (Compile_Time_Bad_Alignment): Delete.
1651 (Apply_Address_Clause_Check): Call Address_Value on
1652 the expression. Do not issue the main warning here and
1653 issue the secondary warning only when the value of the
1654 expression is not known at compile time.
1655 * sem_ch13.adb (Address_Clause_Check_Record): Add A component and
1656 adjust the description.
1657 (Analyze_Attribute_Definition_Clause): In the case
1658 of an address, move up the code creating an entry in the table of
1659 address clauses. Also create an entry for an absolute address.
1660 (Validate_Address_Clauses): Issue the warning for absolute
1661 addresses here too. Tweak condition associated with overlays
1664 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1666 * sem_ch13.adb (Is_Predicate_Static): An inherited predicate
1667 can be static only if it applies to a scalar type.
1669 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1671 * exp_util.adb (Adjust_Result_Type): Convert operand to base
1672 type to prevent spurious constraint checks on subtypes of Boolean.
1674 2016-06-22 Bob Duff <duff@adacore.com>
1676 * debug.adb: Document debug switch -gnatd.o.
1677 * sem_elab.adb (Check_Internal_Call): Debug switch -gnatd.o
1678 now causes a more conservative treatment of indirect calls,
1679 treating P'Access as a call to P in more cases. We Can't make
1680 this the default, because it breaks common idioms, for example
1682 * sem_util.adb: Add an Assert.
1684 2016-06-22 Bob Duff <duff@adacore.com>
1686 * a-cuprqu.ads, a-cuprqu.adb: Completely rewrite this package. Use
1687 red-black trees, which gives O(lg N) worst-case performance on
1688 Enqueue and Dequeue. The previous version had O(N) Enqueue in
1691 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1693 * sem_warn.adb: minor style fix in comment.
1694 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
1695 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
1696 moved into scope of Collect_SPARK_Xrefs.
1697 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
1698 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
1699 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
1701 * sem_ch3.adb (Build_Discriminal): Set Parent of the discriminal.
1703 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1705 * lib-xref-spark_specific.adb (Generate_Dereference): Assignment to not
1706 commented local variables replaced with direct uses of their values.
1708 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1710 * exp_ch7.adb (Add_Invariant): Replace the
1711 current type instance with the _object parameter even in ASIS mode.
1712 (Build_Invariant_Procedure_Body): Do not insert the
1713 invariant procedure body into the tree for ASIS and GNATprove.
1714 (Build_Invariant_Procedure_Declaration): Do not insert the
1715 invariant procedure declaration into the tree for ASIS and
1717 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Update comment.
1719 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1721 * sem_ch6.adb (Set_Actual_Subtypes): If the type of the actual
1722 has predicates, the actual subtype must be frozen properly
1723 because of the generated tests that may follow. The predicate
1724 may be specified by an explicit aspect, or may be inherited in
1727 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1729 * exp_ch4.adb (In_Range_Chec)): New predicate, subsidiary of
1730 Expand_N_In: within an expanded range check that might raise
1731 Constraint_Error do not generate a predicate check as well. It
1732 is redundant because the context will add an explicit predicate
1733 check, and it will raise the wrong exception if it fails.
1734 * lib-xref-spark_specific.adb (Add_SPARK_File): Remove useless checks
1735 since dependency units always have an associated compilation unit.
1737 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1739 * lib.ads: Code cleanup.
1740 * inline.adb: Type refinement for a counter variable.
1741 * lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code.
1744 2016-06-21 Eric Botcazou <ebotcazou@adacore.com>
1746 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New
1748 (set_reverse_storage_order_on_array_type): Likewise.
1749 (gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags.
1750 <E_Array_Subtype>: Likewise.
1751 <E_String_Literal_Subtype>: Likewise.
1752 (substitute_in_type) <ARRAY_TYPE>: Likewise.
1753 * gcc-interface/utils.c (gnat_pushdecl): Always create a variant for
1754 the DECL_ORIGINAL_TYPE of a type.
1756 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1758 * make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
1760 * lib.ads, sem_util.adb: Minor typo in comment.
1762 2016-06-20 Yannick Moy <moy@adacore.com>
1764 * sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
1765 Add parameter Keep_Pragma_Id to optionally keep
1766 the identifier of the pragma instead of converting
1767 to pragma Check. Also set type of new function call
1768 appropriately. (Collect_Inherited_Class_Wide_Conditions):
1769 Call Build_Pragma_Check_Equivalent with the new parameter
1770 Keep_Pragma_Id set to True to keep the identifier of the copied
1772 * sinfo.ads: Add comment.
1774 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1776 * exp_ch7.adb (Build_Invariant_Procedure_Body):
1777 Always install the scope of the invariant procedure
1778 in order to produce better error messages. Do not
1779 insert the body when the context is a generic unit.
1780 (Build_Invariant_Procedure_Declaration): Perform minimal
1781 decoration of the invariant procedure and its formal parameter
1782 in case they are not analyzed. Do not insert the declaration
1783 when the context is a generic unit.
1785 2016-06-20 Ed Schonberg <schonberg@adacore.com>
1787 * sem_ch13.adb (Visible_Component): New procedure, subsidiary
1788 of Replace_Type_References_ Generic, to determine whether an
1789 identifier in a predicate or invariant expression is a visible
1790 component of the type to which the predicate or invariant
1791 applies. Implements the visibility rule stated in RM 13.1.1
1794 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1796 * s-regpat.adb, sem_prag.adb, pprint.adb, sem_ch13.adb: Minor
1799 2016-06-20 Tristan Gingold <gingold@adacore.com>
1801 * make.adb (Check_Standard_Library): Consider system.ads
1802 if s-stalib.adb is not available.
1803 * gnatbind.adb (Add_Artificial_ALI_File): New procedure extracted from
1806 2016-06-20 Thomas Quinot <quinot@adacore.com>
1808 * g-socket.adb (Is_IP_Address): A string consisting in digits only is
1811 2016-06-20 Arnaud Charlet <charlet@adacore.com>
1813 * exp_ch7.adb (Build_Invariant_Procedure_Body):
1814 decorate invariant procedure body with typical properties of
1817 2016-06-20 Arnaud Charlet <charlet@adacore.com>
1819 * a-exetim-darwin.adb: New file.
1821 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
1823 * atree.ads, atree.adb (Elist29): New routine.
1824 (Set_Elist29): New routine.
1825 * atree.h New definition for Elist29.
1826 * einfo.adb Subprograms_For_Type is now an Elist rather than
1827 a node. Has_Invariants is now a synthesized attribute
1828 and does not require a flag. Has_Own_Invariants
1829 is now Flag232. Has_Inherited_Invariants is
1830 Flag291. Is_Partial_Invariant_Procedure is Flag292.
1831 (Default_Init_Cond_Procedure): Reimplemented.
1832 (Has_Inherited_Invariants): New routine.
1833 (Has_Invariants): Reimplemented.
1834 (Has_Own_Invariants): New routine.
1835 (Invariant_Procedure): Reimplemented.
1836 (Is_Partial_Invariant_Procedure): New routine.
1837 (Partial_Invariant_Procedure): Reimplemented.
1838 (Predicate_Function): Reimplemented.
1839 (Predicate_Function_M): Reimplemented.
1840 (Set_Default_Init_Cond_Procedure): Reimplemented.
1841 (Set_Has_Inherited_Invariants): New routine.
1842 (Set_Has_Invariants): Removed.
1843 (Set_Has_Own_Invariants): New routine.
1844 (Set_Invariant_Procedure): Reimplemented.
1845 (Set_Is_Partial_Invariant_Procedure): New routine.
1846 (Set_Partial_Invariant_Procedure): Reimplemented.
1847 (Set_Predicate_Function): Reimplemented.
1848 (Set_Predicate_Function_M): Reimplemented.
1849 (Set_Subprograms_For_Type): Reimplemented.
1850 (Subprograms_For_Type): Reimplemented.
1851 (Write_Entity_Flags): Output Flag232 and Flag291.
1852 * einfo.ads Add new attributes Has_Inherited_Invariants
1853 Has_Own_Invariants Is_Partial_Invariant_Procedure
1854 Partial_Invariant_Procedure Change the documentation
1855 of attributes Has_Inheritable_Invariants Has_Invariants
1856 Invariant_Procedure Is_Invariant_Procedure Subprograms_For_Type
1857 (Has_Inherited_Invariants): New routine along with pragma Inline.
1858 (Has_Own_Invariants): New routine along with pragma Inline.
1859 (Is_Partial_Invariant_Procedure): New routine along with pragma Inline.
1860 (Partial_Invariant_Procedure): New routine.
1861 (Set_Has_Inherited_Invariants): New routine along with pragma Inline.
1862 (Set_Has_Invariants): Removed along with pragma Inline.
1863 (Set_Has_Own_Invariants): New routine along with pragma Inline.
1864 (Set_Is_Partial_Invariant_Procedure): New routine
1865 along with pragma Inline.
1866 (Set_Partial_Invariant_Procedure): New routine.
1867 (Set_Subprograms_For_Type): Update the signature.
1868 (Subprograms_For_Type): Update the signature.
1869 * exp_ch3.adb Remove with and use clauses for Sem_Ch13.
1870 (Build_Array_Invariant_Proc): Removed.
1871 (Build_Record_Invariant_Proc): Removed.
1872 (Freeze_Type): Build the body of the invariant procedure.
1873 (Insert_Component_Invariant_Checks): Removed.
1874 * exp_ch7.adb Add with and use clauses for Sem_Ch6, Sem_Ch13,
1876 (Build_Invariant_Procedure_Body): New routine.
1877 (Build_Invariant_Procedure_Declaration): New routine.
1878 * exp_ch7.ads (Build_Invariant_Procedure_Body): New routine.
1879 (Build_Invariant_Procedure_Declaration): New routine.
1880 * exp_ch9.adb (Build_Corresponding_Record): Do not propagate
1881 attributes related to invariants to the corresponding record
1882 when building the corresponding record. This is done by
1883 Build_Invariant_Procedure_Declaration.
1884 * exp_util.adb (Make_Invariant_Call): Reimplemented.
1885 * freeze.adb (Freeze_Array_Type): An array type requires an
1886 invariant procedure when its component type has invariants.
1887 (Freeze_Record_Type): A record type requires an invariant
1888 procedure when at least one of its components has an invariant.
1889 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Inherit
1890 invariant-related attributes.
1891 (Analyze_Subtype_Declaration):
1892 Inherit invariant-related attributes.
1893 (Build_Derived_Record_Type): Inherit invariant-related attributes.
1894 (Check_Duplicate_Aspects): Reimplemented.
1895 (Get_Partial_View_Aspect): New routine.
1896 (Process_Full_View): Inherit invariant-related attributes. Reimplement
1897 the check on hidden inheritance of class-wide invariants.
1898 (Remove_Default_Init_Cond_Procedure): Reimplemented.
1899 * sem_ch6.adb (Analyze_Subprogram_Specification): Do not modify
1900 the controlling type for an invariant procedure declaration
1902 (Is_Invariant_Procedure_Or_Body): New routine.
1903 * sem_ch7.adb (Analyze_Package_Specification): Build the partial
1904 invariant body in order to preanalyze and resolve all invariants
1905 of a private type at the end of the visible declarations. Build
1906 the full invariant body in order to preanalyze and resolve
1907 all invariants of a private type's full view at the end of
1908 the private declarations.
1909 (Preserve_Full_Attributes): Inherit invariant-related attributes.
1910 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Ensure that
1911 aspects are analyzed with the proper view when the protected type
1912 is a completion of a private type. Inherit invariant-related attributes.
1913 (Analyze_Task_Type_Declaration): Ensure that
1914 aspects are analyzed with the proper view when the task type
1915 is a completion of a private type. Inherit invariant-related
1917 * sem_ch13.adb Remove with and use clauses for Stringt.
1918 (Build_Invariant_Procedure_Declaration): Removed.
1919 (Build_Invariant_Procedure): Removed.
1920 (Freeze_Entity_Checks): Do not build the body of the invariant
1922 The body is built when the type is frozen in Freeze_Type.
1923 (Inherit_Aspects_At_Freeze_Point): Do not inherit any attributes
1924 related to invariants here because this leads to erroneous
1926 (Replace_Node): Rename to Replace_Type_Ref.
1927 * sem_ch13.ads (Build_Invariant_Procedure_Declaration): Removed.
1928 (Build_Invariant_Procedure): Removed.
1929 * sem_prag.adb Add with and use clauses for Exp_Ch7.
1930 (Analyze_Pragma): Reimplement the analysis of pragma Invariant.
1931 * sem_res.adb (Resolve_Actuals): Emit a specialized error when
1932 the context is an invariant.
1933 * sem_util.adb (Get_Views): New routine.
1934 (Incomplete_Or_Partial_View): Consider generic packages when
1935 examining declarations.
1936 (Inspect_Decls): Consider full type
1937 declarations because they may denote a derivation from a
1939 (Propagate_Invariant_Attributes): New routine.
1940 * sem_util.ads (Get_Views): New routine.
1941 (Propagate_Invariant_Attributes): New routine.
1943 2016-06-16 Arnaud Charlet <charlet@adacore.com>
1945 * pprint.adb (Expression_Image): Add better handling of UCs,
1946 we don't want to strip them all for clarity.
1949 2016-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1951 * exp_util.adb (Safe_Unchecked_Type_Conversion): Use "alignment"
1952 instead of "alignement".
1954 2016-06-16 Gary Dismukes <dismukes@adacore.com>
1956 * sem_util.adb: Minor typo fix.
1958 2016-06-16 Emmanuel Briot <briot@adacore.com>
1960 * s-regpat.adb: Further fix for invalid index in GNAT.Regexp.
1962 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
1964 * sem_ch13.adb (Validate_Address_Clauses): Use the same logic to
1965 issue the warning on the offset for the size as for the alignment
1966 and tweak the wording for the sake of consistency.
1968 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1970 * sem_prag.adb (Check_Class_Wide_COndition): New procedure,
1971 subsidiary of Analyze_Pre_Post_ Condition_In_Decl_Part, to
1972 check legality rules that follow from the revised semantics of
1973 class-wide pre/postconditions described in AI12-0113.
1974 (Build_Pragma_Check_Equivalent): Abstract subprogram declarations
1975 must be included in list of overriding primitives of a derived
1978 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1980 * sem_util.adb (May_Be_Lvalue): An actual in an unexpanded
1981 attribute reference 'Read is an assignment and must be considered
1982 a modification of the object.
1984 2016-06-16 Gary Dismukes <dismukes@adacore.com>
1986 * einfo.adb: Minor editorial.
1988 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1990 * sem_prag.adb (Overridden_Ancestor): Clean up code to use
1991 controlling type of desired primitive rather than its scope,
1992 because the primitive that inherits the classwide condition may
1993 comes from several derivation steps.
1995 2016-06-16 Javier Miranda <miranda@adacore.com>
1997 * einfo.adb (Set_Default_Init_Cond_Procedure): Allow calls setting
1998 this attribute to Empty (only if the attribute has not been set).
1999 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
2000 No action needed if the spec was not built.
2001 (Build_Default_Init_Cond_Procedure_Declaration): The spec is
2002 not built if DIC is set to NULL or no condition was specified.
2003 * exp_ch3.adb (Expand_N_Object_Declaration): Check availability
2004 of the Init_Cond procedure before generating code to call it.
2006 2016-06-16 Emmanuel Briot <briot@adacore.com>
2008 * s-regpat.adb: Fix invalid index check when matching end-of-line
2011 2016-06-16 Arnaud Charlet <charlet@adacore.com>
2013 * gnat1drv.adb: Minor reformatting.
2015 2016-06-16 Ed Schonberg <schonberg@adacore.com>
2017 * sem_ch3.adb (Check_Entry_Contracts): New procedure, subsidiary
2018 of Analyze_Declarations, that performs pre-analysis of
2019 pre/postconditions on entry declarations before full analysis
2020 is performed after entries have been converted into procedures.
2021 Done solely to capture semantic errors.
2022 * sem_attr.adb (Analyze_Attribute, case 'Result): Add guard to
2023 call to Denote_Same_Function.
2025 2016-06-16 Emmanuel Briot <briot@adacore.com>
2027 * g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
2029 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
2031 * exp_ch7.adb (Find_Last_Init): Remove obsolete code. The
2032 logic is now performed by Process_Object_Declaration.
2033 (Process_Declarations): Recognize a controlled deferred
2034 constant which is in fact initialized by means of a
2035 build-in-place function call as needing finalization actions.
2036 (Process_Object_Declaration): Insert the counter after the
2037 build-in-place initialization call for a controlled object. This
2038 was previously done in Find_Last_Init.
2039 * exp_util.adb (Requires_Cleanup_Actions): Recognize a controlled
2040 deferred constant which is in fact initialized by means of a
2041 build-in-place function call as needing finalization actions.
2043 2016-06-16 Justin Squirek <squirek@adacore.com>
2045 * exp_aggr.adb (Expand_Array_Aggregate): Minor comment changes and
2046 additional style fixes.
2047 * exp_ch7.adb: Minor typo fixes and reformatting.
2049 2016-06-16 Justin Squirek <squirek@adacore.com>
2051 * sem_ch3.adb (Analyze_Object_Declaration): Add a missing check
2052 for optimized aggregate arrays with qualified expressions.
2053 * exp_aggr.adb (Expand_Array_Aggregate): Fix block and
2054 conditional statement in charge of deciding whether to perform
2055 in-place expansion. Specifically, use Parent_Node to jump over
2056 the qualified expression to the object declaration node. Also,
2057 a check has been inserted to skip the optimization if SPARK 2005
2058 is being used in strict adherence to RM 4.3(5).
2060 2016-06-16 Tristan Gingold <gingold@adacore.com>
2062 * sem_prag.adb (Analyze_Pragma): Simplify code
2063 for Pragma_Priority.
2065 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
2067 * sem_util.ads (Indexed_Component_Bit_Offset): Declare.
2068 * sem_util.adb (Indexed_Component_Bit_Offset): New
2069 function returning the offset of an indexed component.
2070 (Has_Compatible_Alignment_Internal): Call it.
2071 * sem_ch13.adb (Offset_Value): New function returning the offset of an
2072 Address attribute reference from the underlying entity.
2073 (Validate_Address_Clauses): Call it and take the offset into
2074 account for the size warning.
2076 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
2078 * bindgen.adb, exp_util.adb, sem_ch9.adb, sem_util.adb: Minor
2081 2016-06-16 Gary Dismukes <dismukes@adacore.com>
2083 * sem_ch9.adb, sem_util.ads, sem_res.adb: Minor reformatting and typo
2086 2016-06-16 Javier Miranda <miranda@adacore.com>
2088 * sem_res.adb (Resolve): Under relaxed RM semantics silently
2089 replace occurrences of null by System.Null_Address.
2090 * sem_ch4.adb (Analyze_One_Call, Operator_Check): Under
2091 relaxed RM semantics silently replace occurrences of null by
2092 System.Null_Address.
2093 * sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram.
2094 (Replace_Null_By_Null_Address): New subprogram.
2096 2016-06-16 Bob Duff <duff@adacore.com>
2098 * exp_util.adb (Is_Controlled_Function_Call):
2099 This was missing the case where the call is in prefix format,
2100 with named notation, as in Obj.Func (Formal => Actual).
2102 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
2104 * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
2107 2016-06-16 Bob Duff <duff@adacore.com>
2109 * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
2110 (Full_T) crashes when assertions are on.
2111 * sem_ch12.adb (Matching_Actual): Correctly handle the case where
2112 "others => <>" appears in a generic formal package, other than
2115 2016-06-16 Arnaud Charlet <charlet@adacore.com>
2117 * usage.adb: Remove confusing comment in usage line.
2118 * bindgen.adb: Fix binder generated file in codepeer mode wrt
2121 2016-06-16 Javier Miranda <miranda@adacore.com>
2123 * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
2124 never-ending loop, code cleanup; adding also support for Text_IO.
2125 * sem_ch8.adb (Find_Expanded_Name): Invoke
2126 Check_Restriction_No_Use_Entity.
2128 2016-06-16 Tristan Gingold <gingold@adacore.com>
2130 * exp_ch9.adb: Minor comment fix.
2131 * einfo.ads (Has_Protected): Clarify comment.
2132 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
2133 consider private protected types declared in the runtime for
2134 the No_Local_Protected_Types restriction.
2136 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2138 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
2139 subtypes for unconstrained formals when analyzing the generated
2140 body of an expression function, because it may lead to premature
2141 and misplaced freezing of the types of formals.
2143 2016-06-14 Gary Dismukes <dismukes@adacore.com>
2145 * sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
2147 2016-06-14 Tristan Gingold <gingold@adacore.com>
2149 * einfo.adb (Set_Has_Timing_Event): Add assertion.
2150 * sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
2151 name for Propagate_Type_Has_Flags.
2152 * exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
2155 2016-06-14 Bob Duff <duff@adacore.com>
2157 * sem_elab.adb (Check_A_Call): Do nothing if the callee is
2158 (or is in) an instance, and the caller is outside. Misc cleanup.
2160 2016-06-14 Javier Miranda <miranda@adacore.com>
2162 * sem_ch4.adb (Analyze_Quantified_Expression):
2163 Generating C code avoid spurious warning on loop variable of
2164 inlinined postconditions.
2166 2016-06-14 Javier Miranda <miranda@adacore.com>
2168 * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
2169 (Analyze_Attribute [Attribute_Old]): Generating C handle
2170 analysis of 'old in inlined postconditions.
2171 (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
2172 of 'result in inlined postconditions.
2173 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
2174 Generating C handle expansion of 'old in inlined postconditions.
2175 * inline.adb (Declare_Postconditions_Result): New subprogram.
2176 * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
2177 aspects when generating C code since pre/post conditions are
2178 inlined and the frontend inlining relies on this routine to
2180 * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
2181 by Modify_Tree_For_C.
2182 * exp_unst.adb (Visit_Node): Searching for up-level references
2183 skip entities defined in inlined subprograms.
2185 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2187 * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
2190 2016-06-14 Bob Duff <duff@adacore.com>
2192 * sem_elab.adb: Do nothing if the callee is intrinsic.
2193 * sinfo.ads, einfo.ads: Minor comment fixes.
2195 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2197 * contracts.adb (Has_Null_Body): Move to sem_util, for general
2199 * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
2200 determine when an internal procedure created for some assertion
2201 checking (e.g. type invariant) is a null procedure. Used to
2202 eliminate redundant calls to such procedures when they apply to
2203 components of composite types.
2204 * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
2205 if invariant procedure has a null body.
2207 2016-06-14 Thomas Quinot <quinot@adacore.com>
2209 * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
2212 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2214 * exp_ch4.adb (Process_Action): Pass the action
2215 list to Process_Transient_Object.
2216 (Process_If_Case_Statements): Pass the action list to
2217 Process_Transient_Object.
2218 (Process_Transient_Object): Add new parameter Stmts and update the
2219 comment on usage. When the context is a Boolean evaluation, insert
2220 any finalization calls after the last statement of the construct.
2222 2016-06-14 Tristan Gingold <gingold@adacore.com>
2224 * einfo.adb, einfo.ads (Has_Timing_Event,
2225 Set_Has_Timing_Event): Add Has_Timing_Event flag.
2226 (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
2227 (Propagate_Type_Has_Flags): New procedure to factorize code.
2228 * exp_ch3.adb (Expand_Freeze_Array_Type,
2229 Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
2230 * sem_ch3.adb (Access_Type_Decalaration): Initialize
2231 Has_Timing_Event flag. (Analyze_Object_Declaration):
2232 Move code that check No_Local_Timing_Events near
2233 the code that check No_Local_Protected_Objects.
2234 (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
2235 (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
2236 Process_Full_View) (Record_Type_Definition): Call
2237 Propagate_Type_Has_Flags.
2238 * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
2239 * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
2241 (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
2242 * sem_ch9.adb (Analyze_Protected_Definition): Call
2243 Propagate_Type_Has_Flags.
2245 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2247 * sem.ads: Minor style fix.
2249 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2251 * sem_ch12.adb (Analyze_Associations): An actual parameter
2252 with a box must be included in the count of actuals, to detect
2253 possible superfluous named actuals that do not match any of the
2254 formals of the generic unit in a formal package declaration.
2256 2016-06-14 Justin Squirek <squirek@adacore.com>
2258 * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
2259 of error output related to SPARK RM 6.1.7(3) and pragma
2261 * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
2262 output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
2263 * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
2264 related to SPARK RM 7.1.2(15) and pragma Volatile_Function
2265 so that the values True and False are no longer surrounded by
2267 * sem_res.adb (Resolve_Actuals): Fix formatting of error output
2268 related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
2270 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2272 * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
2274 * freeze.adb: Minor grammar fix in comment.
2275 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2277 * lib.adb: Minor reformatting.
2278 * sem_util.adb (Is_OK_Volatile_Context): Do
2279 include Address in the supported attributes.
2281 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2283 * exp_ch4.adb (Expand_N_Case_Expression):
2284 Code cleanup. Finalize any transient controlled
2285 objects on exit from a case expression alternative.
2286 (Expand_N_If_Expression): Code cleanup.
2287 (Process_Actions): Removed.
2288 (Process_If_Case_Statements): New routine.
2289 (Process_Transient_Object): Change the name of formal Rel_Node to
2290 N and update all occurrences. Update the comment on usage. When
2291 the type of the context is Boolean, the proper insertion point
2292 for the finalization call is after the last declaration.
2294 2016-06-14 Ed Schonberg <schonberg@adacore.com>
2296 * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
2297 predicate to determine whether an entity appears in a context
2298 for which a Deferred_Reference was created, because it is not
2299 possible to determine when reference is analyzed whether it
2300 appears in a context in which the entity is modified.
2301 * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
2302 on assignment for an entity that has a deferred_reference.
2304 2016-06-14 Javier Miranda <miranda@adacore.com>
2306 * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
2307 come from source. Previously the reference was generated only if the
2308 call comes from source but the call may be rewritten by the expander
2309 thus causing the notification of spurious warnings.
2311 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2313 * gnat1drv.adb: Remove further references to AAMP.
2314 * checks.adb (Apply_Scalar_Range_Check): Take
2315 Check_Float_Overflow info account.
2316 * live.ads, live.adb Added subprogram headers and
2317 start-of-processing-for comments.
2318 * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
2319 checks when instantiating runtime units in CodePeer mode.
2321 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2323 * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
2326 2016-06-14 Arnaud Charlet <charlet@adacore.com>
2328 * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
2329 simple value propagation in CodePeer mode when warnings are disabled.
2330 (Scan_Front_End_Switches): Enable relevant front-end switches
2333 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2335 * sem_util.adb (Is_OK_Volatile_Context): A
2336 reference to a volatile object is considered OK if appears as
2337 the prefix of attributes Address, Alignment, Component_Size,
2338 First_Bit, Last_Bit, Position, Size, Storage_Size.
2340 2016-06-14 Yannick Moy <moy@adacore.com>
2342 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
2343 subunits directly, as they are already traversed as part of the
2344 top-level unit to which they belong.
2345 (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
2346 (Generate_Dereference): Use unique definition place for special
2347 variable __HEAP, to ensure correct sorting of references.
2348 * lib-xref.adb (Generate_Reference): Use top-level unit in case
2350 * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
2351 compute the top-level code unit for a source location of AST node,
2352 that go past subunits.
2354 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
2356 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
2357 PARM_DECL when the parameter type is dummy.
2358 * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
2361 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
2363 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
2364 PLUS_EXPR in the expression of a renaming.
2366 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
2368 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
2369 with calls to malloc.
2371 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
2373 * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
2374 constant, use the generic implementation of the middle-end; otherwise
2375 turn the dynamic conditions into static conditions and simplify.
2377 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
2379 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
2381 2016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2383 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
2384 gnat_entity_name with temporary names for XUP and XUT types.
2386 2016-06-10 Martin Sebor <msebor@redhat.com>
2389 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
2390 the nonnull attribute in type-generic builtins.
2392 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2394 * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
2395 types are present before returning them. Remove final assertion.
2396 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
2398 <E_Protected_Type>: Likewise.
2400 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2402 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
2403 not elaborate Itypes.
2405 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2407 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
2408 for noinline and noclone attributes.
2409 (handle_noinline_attribute): New handler.
2410 (handle_noclone_attribute): Likewise.
2412 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2414 * gcc-interface/trans.c (process_type): Beef up comment.
2416 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2418 * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
2419 placeholder expressions here but...
2420 * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
2421 Make an exception to the protection of a CALL_EXPR result with an
2422 unconstrained type only in the same cases as Call_to_gnu.
2424 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2426 * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
2427 with boolean rvalues and set the location directly. Do not set the
2428 location in the other cases for a simple name.
2429 (gnat_to_gnu_external): Clear the location on the expression.
2431 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2433 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
2434 useless 'else' statements and tidy up.
2435 <E_Array_Subtype>: Fully deal with the declaration here.
2436 <E_Incomplete_Type>: Use properly-typed constant.
2437 Assert that we don't apply the special type treatment to dummy types.
2438 Separate this treatment from the final back-annotation and simplify
2439 the condition for the RM size.
2440 (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
2441 (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
2442 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
2444 (process_freeze_entity): Remove obsolete code.
2445 (process_type): Minor tweaks.
2447 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2449 * einfo.ads (Returns_Limited_View): Remove.
2450 (Set_Returns_Limited_View ): Likewise.
2451 * einfo.adb (Returns_Limited_View): Likewise.
2452 (Set_Returns_Limited_View ): Likewise.
2453 * freeze.adb (Late_Freeze_Subprogram): Remove.
2454 (Freeze_Entity): Do not defer the freezing of functions returning an
2455 incomplete type coming from a limited context.
2457 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2459 * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
2460 * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
2461 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
2462 of profiles for builtins here... Call gnu_ext_name_for_subprog.
2463 Also update profiles if pointers to limited_with'ed types are
2465 (gnat_to_gnu_param): Restore the correct source location information
2466 for vector ABI warnings.
2467 (associate_subprog_with_dummy_type): Add comment about AI05-019.
2468 Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
2469 (update_profile): Deal with builtin declarations.
2470 Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
2471 (update_profiles_with): Add comment.
2472 (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
2473 Likewise for parameter declarations in most cases. Do not change
2474 the return type for the CICO mechanism if the profile is incomplete.
2475 ...but here instead. Always reset the slot for the parameters.
2476 * gcc-interface/utils.c (create_subprog_decl): Call
2477 gnu_ext_name_for_subprog. Do not set the assembler name here but...
2478 (finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
2480 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2482 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
2483 declaration of the corresponding record type before that of the
2484 unprotected version of the subprograms that operate on it.
2485 (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
2486 just before the original type.
2487 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
2488 declaration to the newly created declaration for the primitive.
2489 (Analyze_Subtype_Declaration): Remove obsolete code forcing the
2490 freezing of the subtype before its declaration.
2491 (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
2492 declaration in the nearest enclosing scope for formal parameters too.
2493 (Build_Derived_Access_Type): Restore the status of the created Itype
2494 after it is erased by Copy_Node.
2495 * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
2496 (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
2497 the specification is present.
2498 Move around the code changing the designated view of the return type
2499 and save the original view. Restore it on exit.
2500 * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
2501 the declaration right after that of the type.
2503 2016-06-01 Simon Wright <simon@pushface.org>
2506 * g-comlin.adb (Display_Section_Help): Do not dereference
2507 Config.Switches if it's null.
2510 2016-05-31 Eric Botcazou <ebotcazou@adacore.com>
2512 * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
2513 (Get_Page_Size): Remove duplicate and return int.
2515 2016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
2518 * s-osinte-rtems.ads (clock_getres): Define.
2519 (Get_Page_Size): Remove duplicate and return int.
2521 2016-05-20 Eric Botcazou <ebotcazou@adacore.com>
2523 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2524 Make same-sized subtypes of signed base types signed.
2525 * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
2526 (unchecked_convert): Likewise.
2528 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2530 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
2531 a specific type for the object if it is deemed a constant.
2533 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2535 * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
2536 components of any elementary types and of composite types.
2538 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2540 * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
2541 of testing for individual sizes.
2542 (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
2543 array types, in particular test for suitable sizes upfront and do not
2544 mimic the processing that will be redone later in Freeze_Array_Type.
2546 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2548 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
2551 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2553 * doc/gnat_rm/implementation_defined_attributes.rst
2554 (Scalar_Storage_Order): Adjust restriction for packed array types.
2555 * einfo.ads (Is_Bit_Packed_Array): Adjust description.
2556 (Is_Packed): Likewise.
2557 (Is_Packed_Array_Impl_Type): Likewise.
2558 (Packed_Array_Impl_Type): Likewise.
2559 * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
2560 if the prefix is not a packed array implemented specially.
2561 * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
2562 bit-packed array types.
2563 * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
2564 the PAT before analyzing its declaration.
2565 (Create_Packed_Array_Impl_Type): Remove redundant statements.
2566 * freeze.adb (Check_Component_Storage_Order): Reject packed array
2567 components only if they are bit packed.
2568 (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
2569 pack for composite types whose size is multiple of a byte.
2570 Create the implementation type for packed array types only when it is
2571 needed, i.e. bit packing or packing because of holes in index types.
2572 Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
2573 * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
2574 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2575 Call maybe_pad_type instead of building the padding type manually.
2576 (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
2577 Packed_Array_Impl_Type is present for packed arrays.
2578 (gnat_to_gnu_component_type): Also handle known alignment for packed
2579 types by passing it to make_packable_type.
2580 * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
2581 and deal with it in the array case. Adjust recursive call. Simplify
2582 computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
2584 2016-05-16 Thomas Quinot <quinot@adacore.com>
2586 * freeze.adb (Check_Component_Storage_Order): Also get full view of
2589 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2591 * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
2592 to capture the value for a small not by-reference record type.
2593 * freeze.ads (Check_Compile_Time_Size): Adjust comment.
2594 * freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
2596 (Check_Compile_Time_Size): Merge scalar and access type cases. Change
2597 variable name in array type case. For the computation of the packed
2598 size, deal with record components and remove redundant test.
2599 (Freeze_Array_Type): Also adjust packing status when the size of the
2600 component type is in the range 33 .. 64 bits.
2601 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
2602 into elementary type throughout. Minor tweaks.
2603 (Alignment Clauses): Document actual alignment of packed array types.
2604 (Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
2605 "simple" to the record case. Document effect on non packable types.
2606 (Pragma Pack for Records): Likewise. Add record case and adjust.
2608 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2610 * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
2611 cross case, use host_noncanonical instead of host as prefix.
2612 (GNATBIND_FOR_HOST): Likewise.
2613 (GNATLINK_FOR_HOST): Likewise.
2614 (GNATLS_FOR_HOST): Likewise.
2616 2016-05-06 Eric Botcazou <ebotcazou@adacore.com>
2619 * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
2620 * system-linux-armeb.ads: Likewise.
2621 * system-linux-mips64el.ads: Likewise.
2622 * system-linux-mips.ads: Likewise.
2623 * system-linux-mipsel.ads: Likewise.
2624 * system-linux-ppc64.ads: Likewise.
2625 * system-linux-sparcv9.ads: Likewise.
2626 * system-rtems.ads: Likewise.
2628 2016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
2630 * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
2631 instead of __getpagesize.
2633 2016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2635 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2638 2016-05-02 Tristan Gingold <gingold@adacore.com>
2640 * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
2643 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2645 * sem_util.adb (Aggregate_Constraint_Checks): Separate
2646 accessibility checks and non-null checks for aggregate components,
2647 to prevent spurious accessibility errors.
2649 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2651 * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
2652 always legal in the in-place initialization of a limited entity
2653 (e.g. an allocator).
2654 * sem_res.adb (Resolve_Allocator): Improve error message with RM
2655 reference when allocator expression is illegal.
2657 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2659 * exp_ch6.adb (Expand_Call): When inlining a call to a function
2660 declared in a package instance, locate the instance node of the
2661 package after the actual package declaration. skipping over
2662 pragmas that may have been introduced when the generic unit
2663 carries aspects that are transformed into pragmas.
2665 2016-05-02 Bob Duff <duff@adacore.com>
2667 * s-memory.adb (Alloc, Realloc): Move checks
2668 for Size = 0 or size_t'Last into the Result = System.Null_Address
2669 path for efficiency. Improve comments (based on actual C language
2670 requirements for malloc).
2671 * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
2672 case where we are using the default Global_Pool_Object, and we
2673 don't need the heavy finalization machinery.
2675 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2677 * exp_util.ads, sem_ch12.adb: Minor reformatting.
2679 2016-05-02 Javier Miranda <miranda@adacore.com>
2681 * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
2682 (Remove_Side_Effects): Adding a new formal.
2683 * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
2684 call to the _Postconditions procedure ensure that side-effects
2685 are unconditionally removed.
2687 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2689 * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
2690 Use original node to determine whether the declaration is for
2691 a formal type declaration, to take into account that formwl
2692 private types are rewritten as private extension declarations
2693 to simplify semantic analysis.
2695 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2697 * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
2700 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2702 * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
2705 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2707 * exp_ch4.adb (Expand_N_Allocator): If the designated type
2708 is a private derived type with no discriminants, examine its
2709 underlying_full_view to determine whether the full view has
2710 defaulted discriminants, so their defaults can be used in the
2711 call to the initialization procedure for the designated object.
2713 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2715 * exp_prag.adb, comperr.adb: Minor reformatting.
2717 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2719 * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
2720 unchecked conversion if the source size is 0 (indicating that
2721 its RM size is unknown). This will happen with packed arrays of
2722 non-discrete types, in which case the component type is known
2725 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2727 * debug.adb: Reserve -gnatd.V.
2729 2016-05-02 Javier Miranda <miranda@adacore.com>
2731 * sem_ch3.adb (Process_Full_View): Remove from visibility
2732 wrappers of synchronized types to avoid spurious errors with
2733 their wrapped entity.
2734 * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
2735 if no interface primitive is covered by the subprogram and this is
2736 not a primitive declared between two views; see Process_Full_View.
2737 (Build_Protected_Sub_Specification): Link the dispatching
2738 subprogram with its original non-dispatching protected subprogram
2739 since their names differ.
2740 (Expand_N_Protected_Type_Declaration):
2741 If a protected subprogram overrides an interface primitive then
2742 do not build a wrapper if it was already built.
2743 * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
2744 * sem_ch4.adb (Names_Match): New subprogram.
2745 * sem_ch6.adb (Check_Synchronized_Overriding): Moved
2746 to library level and defined in the public part of the
2747 package to invoke it from Exp_Ch9.Build_Wrapper_Spec
2748 (Has_Matching_Entry_Or_Subprogram): New subprogram.
2749 (Report_Conflict): New subprogram.
2751 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
2753 * s-unstyp.ads: Code cleanups.
2755 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2757 * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
2759 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2761 * exp_prag.adb (Expand_attributes_In_Consequence,
2762 Expand_Attributes): If the prefix of'Old is an unconstrained type,
2763 for example an unconstrained formal of the enclosing subprogram,
2764 create an object declaration with an expression to obtain the
2765 actual subtype of the temporary.
2767 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2769 * comperr.adb (Delete_SCIL_Files): Add missing handling of
2770 N_Subprogram_Declaration.
2772 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2774 * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
2775 gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
2777 * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
2779 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2781 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
2782 function call may be wrapped in an explicit type conversion.
2784 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
2786 * interfac.ads: use pragma No_Elaboration_Code_All.
2787 * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
2789 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2791 * sem.adb (Analyze: If node is an error node previously created
2792 by the parser, disable expansion to prevent subsequent glitches
2795 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2797 * sem_ch13.adb (Alignment_Error): Removed.
2798 (Get_Alignment_Value): Code cleanup.
2800 2016-05-02 Tristan Gingold <gingold@adacore.com>
2802 * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
2803 to check for the no local protected objects restriction.
2805 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2807 * einfo.adb Anonymous_Master now uses Node35.
2808 (Anonymous_Master): Update the assertion and node reference.
2809 (Set_Anonymous_Master): Update the assertion and node reference.
2810 (Write_Field35_Name): Add output for Anonymous_Master.
2811 (Write_Field36_Name): The output is now undefined.
2812 * einfo.ads Update the node and description of attribute
2813 Anonymous_Master. Remove prior occurrences in entities as this
2814 is now a type attribute.
2815 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
2816 Ins_Node. Anonymous access- to-controlled component types no
2817 longer need finalization masters. The master is now built when
2818 a related allocator is expanded.
2819 (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
2820 detect whether the record type has at least one component of anonymous
2821 access-to- controlled type. These types no longer need finalization
2822 masters. The master is now built when a related allocator is expanded.
2823 * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
2824 (Current_Anonymous_Master): Removed.
2825 (Expand_N_Allocator): Call Build_Anonymous_Master to create a
2826 finalization master for an anonymous access-to-controlled type.
2827 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2828 Call routine Build_Anonymous_Master to create a finalization master
2829 for an anonymous access-to-controlled type.
2830 * exp_ch7.adb (Allows_Finalization_Master): New routine.
2831 (Build_Anonymous_Master): New routine.
2832 (Build_Finalization_Master): Remove formal parameter
2833 For_Anonymous. Use Allows_Finalization_Master to determine whether
2834 circumstances warrant a finalization master. This routine no
2835 longer creates masters for anonymous access-to-controlled types.
2836 (In_Deallocation_Instance): Removed.
2837 * exp_ch7.ads (Build_Anonymous_Master): New routine.
2838 (Build_Finalization_Master): Remove formal parameter For_Anonymous
2839 and update the comment on usage.
2840 * sem_util.adb (Get_Qualified_Name): New routines.
2841 (Output_Name): Reimplemented.
2842 (Output_Scope): Removed.
2843 * sem_util.ads (Get_Qualified_Name): New routines.
2845 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2847 * debug.adb: Document the use of switch -gnatd.H.
2848 * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
2849 -gnatd.H is present.
2850 (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
2851 * opt.ads: Add new option ASIS_GNSA_Mode.
2852 * sem_ch13.adb (Alignment_Error): New routine.
2853 (Analyze_Attribute_Definition_Clause): Suppress certain errors in
2854 ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
2856 (Check_Size): Use routine Size_Too_Small_Error to
2857 suppress certain errors in ASIS mode.
2858 (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
2859 errors in ASIS mode.
2860 (Size_Too_Small_Error): New routine.
2862 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2864 * spark_xrefs.ads Description of the spark cross-references
2865 clarified; small style fixes.
2866 * lib-xref-spark_specific.adb (Add_SPARK_Scope,
2867 Detect_And_Add_SPARK_Scope): consider protected types and bodies
2868 as yet another scopes.
2869 (Enclosing_Subprogram_Or_Library_Package): refactored using
2870 Hristian's suggestions; added support for scopes of protected
2871 types and bodies; fix for entries to return the scope of the
2872 enclosing concurrent type, which is consistent with what is
2873 returned for protected subprograms.
2874 * sem_intr.adb: Minor style fix in comment.
2876 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2878 * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
2879 put_spark_xrefs.adb: Minor reformatting.
2881 2016-05-02 Doug Rupp <rupp@adacore.com>
2883 * g-traceb.ads: Document traceback for ARM.
2885 2016-05-02 Javier Miranda <miranda@adacore.com>
2887 * exp_disp.adb (Make_Tags): Do not generate the
2888 external name of interface tags adding the suffix counter since
2889 it causes problems at link time when the IP routines are inlined
2890 across units with optimization.
2892 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2894 * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
2895 that predicate checking is disabled for predicated subtypes in
2896 the context of an Assertion_Policy pragma.
2897 * checks.adb (Apply_Predicate_Check): Do nothing if
2898 Predicates_Ignored is true.
2899 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
2900 Predicates_Ignores is true, the function Rep_To_Pos does raise
2901 an exception for invalid data.
2902 * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
2903 type do not apply check if Predicates_Ignored is true.
2904 * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
2905 is true, sem_prag.adb:
2906 * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
2907 is true do not emit predicate check on initializing expression.
2909 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2911 * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
2912 they are declared; refine type of a counter from Integer to Natural.
2913 * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
2914 prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
2915 exp_ch3.adb: Minor editing.
2917 2016-05-02 Yannick Moy <moy@adacore.com>
2919 * a-tigeli.adb (Get_Line): Always set Last prior to returning.
2921 2016-05-02 Yannick Moy <moy@adacore.com>
2923 * lib-xref.adb: Minor style fix in whitespace of declarations.
2924 * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
2925 refactored without loops.
2926 * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
2928 * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
2929 of generic procedure.
2931 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2933 * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
2934 (Detect_And_Add_SPARK_Scope): detect and add task type scope.
2935 (Enclosing_Subprogram_Or_Package): Respect boundaries of task
2936 and entry declarations.
2937 * spark_xrefs.ads: minor typo in comment.
2939 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2941 * make.adb: Minor: avoid an exception when calling gnatmake with
2942 no argument and gnatmake is built with checks on.
2943 * lib-xref-spark_specific.adb: Minor code cleanup.
2945 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2947 * sem_util.adb (Normalize_Actuals): Take into account extra
2948 actuals that may have been introduced previously. Normally extra
2949 actuals are introduced when a call is expanded, but a validity
2950 check may copy and reanalyze a call that carries an extra actual
2951 (e.g. an accessibility parameter) before the call itself is
2952 marked Analzyed, and the analysis of the copy has to be able to
2953 cope with the added actual.
2955 2016-05-02 Bob Duff <duff@adacore.com>
2957 * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
2958 treeishness. Previous version had Context_Items shared between
2961 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2963 * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
2964 record cases, apply predicate check on component for expression
2965 only if expression has been analyzed already. For expressions
2966 that need to be duplicated when they cover multiple components,
2967 resolution and predicate checking take place later.
2969 2016-05-02 Olivier Hainque <hainque@adacore.com>
2971 * a-direct.adb (Delete_Tree): Use full names to designate subdirs
2972 and files therein, instead of local names after a change of
2975 2016-05-02 Thomas Quinot <quinot@adacore.com>
2977 * freeze.adb (Check_Component_Storage_Order): Get full view of
2980 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2982 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
2985 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2987 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
2988 of the container base type in case the container is a subtype.
2989 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
2990 the selector has an entity when checking for a component of a
2993 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2996 * opt.ads (Latest_Ada_Only): New flag.
2997 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
2998 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
2999 * einfo.ads (Has_Predicates, Predicate_Function):
3000 Clarify that Has_Predicates does not imply that Predicate_Function
3001 will return a non-empty entity.
3003 2016-05-02 Ed Schonberg <schonberg@adacore.com>
3005 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
3006 check if type requires it.
3007 * checks.adb (Apply_Predicate_Check): Disable checks in the
3008 object declaration created for an expression with side-effects
3009 that requires a predicate check to prevent infinite recursion
3012 2016-05-02 Ed Schonberg <schonberg@adacore.com>
3014 * sem_ch6.adb (Process_Formals): Check properly the type of a
3015 formal to determine whether a given convention applies to it.
3017 2016-05-02 Doug Rupp <rupp@adacore.com>
3019 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
3021 2016-05-02 Thomas Quinot <quinot@adacore.com>
3023 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
3024 error, to have a component with implicit SSO within a composite type
3025 that has explicit SSO.
3027 2016-05-02 Bob Duff <duff@adacore.com>
3029 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
3031 2016-05-02 Ed Schonberg <schonberg@adacore.com>
3033 * repinfo.adb (List_Entities): Make procedure recursive, to
3034 provide representation information for subprograms declared
3035 within subprogram bodies.
3037 2016-05-02 Arnaud Charlet <charlet@adacore.com>
3039 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
3040 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
3041 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
3042 osint.adb: Remove dead code.
3044 2016-05-02 Yannick Moy <moy@adacore.com>
3046 * a-tigeli.adb (Get_Line): Fix bound for test to
3047 decide when to compensate for character 0 added by call to fgets.
3049 2016-05-02 Ed Schonberg <schonberg@adacore.com>
3051 * sem_ch4.adb (Analyze_Allocator): If the expression does not
3052 have a subtype indication and the type is an unconstrained tagged
3053 type with defaulted discriminants, create an explicit constraint
3054 for it during analysis to prevent out-of-order freezing actions
3055 on generated classwide types.
3057 2016-05-02 Javier Miranda <miranda@adacore.com>
3059 * exp_ch5.adb (Expand_N_Assignment_Statement):
3060 In the runtime check that ensures that the tags of source an
3061 target match, add missing displacement of the pointer to the
3062 objects if they cover interface types.
3064 2016-05-02 Ed Schonberg <schonberg@adacore.com>
3066 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
3067 base type for attribute when type is discrete: transformation
3068 is not needed for such types, and leads to spurious errors if
3069 the context is a case construct.
3071 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
3073 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
3074 operand #2 for COMPONENT_REF.
3075 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
3076 (gnat_protect_expr): Likewise.
3077 (gnat_stabilize_reference_1): Likewise.
3078 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
3079 (get_inner_constant_reference): Likewise.
3080 (gnat_invariant_expr): Likewise.
3081 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
3083 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
3085 * gcc-interface/trans.c (Range_to_gnu): New static function.
3086 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
3087 (gnat_to_gnu) <N_In>: Likewise.
3089 2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
3091 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
3092 (check-acats): Use it.
3093 (check_acats_targets): Likewise.
3095 2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
3098 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
3100 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3102 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
3103 incomplete type without full view.
3104 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
3105 return the list of changes.
3106 (Restore_Limited_Views): New procedure to undo the transformation made
3107 by Exchange_Limited_Views.
3108 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
3109 and call Restore_Limited_Views at the end, if need be.
3110 (Possible_Freeze): Do not delay freezing because of incomplete types.
3111 (Process_Formals): Remove kludges for class-wide types.
3112 * types.h (By_Copy_Return): Delete.
3113 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
3114 (TYPE_DUMMY_IN_PROFILE_P): New macro.
3115 * gcc-interface/gigi.h (update_profiles_with): Declare.
3116 (finish_subprog_decl): Likewise.
3117 (get_minimal_subprog_decl): Delete.
3118 (create_subprog_type): Likewise.
3119 (create_param_decl): Adjust prototype.
3120 (create_subprog_decl): Likewise.
3121 * gcc-interface/decl.c (defer_limited_with): Rename into...
3122 (defer_limited_with_list): ...this.
3123 (gnat_to_gnu_entity): Adjust to above renaming.
3124 (finalize_from_limited_with): Likewise.
3125 (tree_entity_vec_map): New structure.
3126 (gt_pch_nx): New helpers.
3127 (dummy_to_subprog_map): New hash table.
3128 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
3129 add FIRST parameter. Deal with the mechanism here instead of...
3130 Do not make read-only variant of types. Simplify expressions.
3131 In the by-ref case, test the mechanism before must_pass_by_ref
3132 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
3133 (gnat_to_gnu_subprog_type): New static function extracted from...
3134 Do not special-case the type_annotate_only mode. Call
3135 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
3136 Deal with dummy return types. Likewise for parameter types. Deal
3137 with by-reference types explicitly and add a kludge for null procedures
3138 with untagged incomplete types. Remove assertion on the types and be
3139 prepared for multiple elaboration of the declarations. Skip the whole
3140 CICO processing if the profile is incomplete. Handle the completion of
3141 a previously incomplete profile.
3142 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
3143 Adjust couple of calls to create_param_decl.
3144 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
3145 Remove specific deferring code.
3146 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
3147 Simplify handling of dummy types and remove obsolete comment.
3148 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
3150 <E_Access_Subtype>: Tweak comment and simplify condition.
3151 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
3152 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
3153 create_subprog_decl.
3154 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
3155 inner break statements. Tidy up condition guarding direct use of the
3157 (get_minimal_subprog_decl): Delete.
3158 (finalize_from_limited_with): Call update_profiles_with on dummy types
3159 with TYPE_DUMMY_IN_PROFILE_P set.
3160 (is_from_limited_with_of_main): Delete.
3161 (associate_subprog_with_dummy_type): New function.
3162 (update_profile): Likewise.
3163 (update_profiles_with): Likewise.
3164 (gnat_to_gnu_profile_type): Likewise.
3165 (init_gnat_decl): Initialize dummy_to_subprog_map.
3166 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
3167 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
3168 TYPE_UNIVERSAL_ALIASING_P.
3169 (gnat_get_array_descr_info): Minor tweak.
3170 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
3171 (build_raise_check): Likewise.
3172 (Compilation_Unit_to_gnu): Likewise.
3173 (Identifier_to_gnu): Accept mismatches coming from a limited context.
3174 (Attribute_to_gnu): Remove kludge for dispatch table entities.
3175 (process_freeze_entity): Do not retrieve old definition if there is an
3176 address clause on the entity. Call update_profiles_with on dummy types
3177 with TYPE_DUMMY_IN_PROFILE_P set.
3178 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
3179 TYPE_REFERENCE_TO to the fat pointer type.
3180 (create_subprog_type): Delete.
3181 (create_param_decl): Remove READONLY parameter.
3182 (finish_subprog_decl): New function extracted from...
3183 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
3184 VOLATILE_FLAG parameters and adjust.
3185 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
3188 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3190 * aa_util.adb, aa_util.ads: Removed, no longer used.
3192 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3194 * sem_prag.adb (Analyze_Pragma): An object
3195 renaming declaration resulting from the expansion of an object
3196 declaration is a suitable context for pragma Ghost.
3198 2016-04-27 Doug Rupp <rupp@adacore.com>
3200 * init.c: Refine last checkin so the only requirement is the
3201 signaling compilation unit is compiled with the same mode as
3202 the compilation unit containing the initial landing pad.
3204 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3206 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
3207 specifications for Default_Iterator, including overloaded cases
3208 where no interpretations are legal, and return types that are
3211 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3213 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
3214 an accessibility check when the left hand side of the assignment
3215 denotes a container cursor.
3216 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
3217 * sem_ch4.adb (Find_Indexing_Operations): New routine.
3218 (Try_Container_Indexing): Code cleanup.
3220 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3222 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
3224 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3226 * errout.adb, errutil.adb: Minor reformatting.
3228 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3230 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
3231 Check that the classwide version is illegal when the prefix is
3232 an operation of an untagged synchronized type.
3234 2016-04-27 Arnaud Charlet <charleT@adacore.com>
3236 * sinput-l.ads, sem_ch13.adb: Minor editing.
3238 2016-04-27 Doug Rupp <rupp@adacore.com>
3240 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
3241 Bump the pc so the lower order bit is set.
3243 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3245 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
3246 enabled, report an empty range in a case construct.
3248 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3250 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
3251 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
3253 2016-04-27 Bob Duff <duff@adacore.com>
3255 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
3256 as is done for the other containers.
3258 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3260 * ghost.adb (In_Subprogram_Body_Profile): New routine.
3261 (Is_OK_Declaration): Treat an unanalyzed expression
3262 function as an OK context. Treat a reference to a Ghost entity
3263 as OK when it appears within the profile of a subprogram body.
3265 2016-04-27 Bob Duff <duff@adacore.com>
3267 * errout.ads: Document the fact that informational messages
3268 don't have to be warnings.
3269 * errout.adb (Error_Msg_Internal): In statistics counts, deal
3270 correctly with informational messages that are not warnings.
3271 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
3272 Set_Posted already checks for errors and ignores others.
3273 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
3274 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
3275 implies Is_Warning_Msg.
3276 * errutil.adb (Error_Msg): In statistics counts, deal correctly
3277 with informational messages that are not warnings.
3279 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3281 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
3282 to determine whether a record type is a null record.
3283 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
3284 null record and there is no expression in the declaration,
3285 no predicate check applies to the object.
3287 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3289 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
3290 instantiated package should not cause freezing of previous contracts.
3292 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3294 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
3295 that do not come from source.
3296 (Analyze_Dimension_Subtype_Declaration): Allow confirming
3297 dimensions on subtype entity, either inherited from base type
3298 or provided by aspect specification.
3300 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3302 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
3303 Add scalar formal object Zero, to allow detection and report
3304 when the matrix is singular.
3305 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
3306 Raise Constraint_Error if the Forward_Eliminate pass has
3307 determined that determinant is Zero.o
3308 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
3310 * s-ngcoar.adb (Solve): Ditto.
3312 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3314 * sem_ch3.adb: Minor reformatting.
3316 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3318 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
3319 that identifier has a usable type before analysis, to handle
3320 properly identifiers introduced after some lexical/syntactic
3321 recovery that created new identifiers.
3323 2016-04-27 Bob Duff <duff@adacore.com>
3325 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
3326 exp_util.adb: Remove assertions that can fail in obscure cases when
3327 assertions are turned on but tampering checks are turned off.
3329 2016-04-27 Javier Miranda <miranda@adacore.com>
3331 * exp_ch6.adb (Add_Call_By_Copy_Code,
3332 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
3333 whose type comes from the limited view.
3335 2016-04-27 Yannick Moy <moy@adacore.com>
3337 * a-textio.adb: Complete previous patch.
3339 2016-04-27 Yannick Moy <moy@adacore.com>
3341 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
3342 Error_Msg_N to issue message about impossibility to inline call,
3343 with slight change of message.
3345 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3347 * exp_spark.adb (Expand_Potential_Renaming): Removed.
3348 (Expand_SPARK): Update the call to expand a potential renaming.
3349 (Expand_SPARK_Potential_Renaming): New routine.
3350 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
3351 * sem.adb Add with and use clauses for Exp_SPARK.
3352 (Analyze): Expand a non-overloaded potential renaming for SPARK.
3354 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3356 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
3357 check full view for the presence of defaulted discriminants,
3358 even when the partial view of a private type has no visible and
3359 no unknown discriminants.
3361 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3363 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
3365 2016-04-27 Nicolas Roche <roche@adacore.com>
3367 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
3369 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3371 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
3372 cleanup. Check the original node when trying to determine the node kind
3373 of pragma Volatile's argument to account for untagged derivations
3374 where the type is transformed into a constrained subtype.
3376 2016-04-27 Olivier Hainque <hainque@adacore.com>
3378 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
3379 consistent posix interface on the caller side.
3381 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3383 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
3384 is a limited view of a type, initialize the Limited_Dependents
3385 field to catch misuses of the type in a client unit.
3387 2016-04-27 Thomas Quinot <quinot@adacore.com>
3389 * a-strunb-shared.adb (Finalize): add missing Reference call.
3390 * s-strhas.adb: minor grammar fix and extension of comment
3391 * sem_ch8.adb: minor whitespace fixes
3393 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3395 * lib-xref.adb (Get_Type_Reference): Handle properly the case
3396 of an object declaration whose type definition is a class-wide
3397 subtype and whose expression is a function call that returns a
3400 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3402 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
3403 (Output_Name): New routine.
3405 2016-04-27 Bob Duff <duff@adacore.com>
3407 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
3409 2016-04-27 Vincent Celier <celier@adacore.com>
3411 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
3412 --unchecked-shared-lib-imports and set the flag
3413 Opt.Unchecked_Shared_Lib_Imports accordingly.
3415 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3417 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
3418 A generic subprogram is never a primitive operation, and thus
3419 a classwide condition for it is not legal.
3421 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3423 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
3426 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3428 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
3429 (Resolve_Actuals): Flag effectively volatile objects with enabled
3430 property Async_Writers or Effective_Reads as illegal.
3431 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
3433 2016-04-27 Javier Miranda <miranda@adacore.com>
3435 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
3436 Do not generate the profile of the equality operator if it has
3437 been explicitly defined as abstract in the parent type. Required
3438 to avoid reporting an spurious error.
3440 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3442 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
3443 procedure to compute the dimension vector of a scalar expression
3444 and compare it with the dimensions if its expected subtype. Used
3445 for the ultimate components of a multidimensional aggregate,
3446 whose components typically are themselves aggregates that are
3447 expanded separately. Previous to this patch, dimensionality
3448 checking on such aggregates generated spurious errors.
3449 * sem_aggr.adb (Resolve_Array_Aggregate): Use
3450 Check_Expression_Dimensions when needed.
3452 2016-04-27 Javier Miranda <miranda@adacore.com>
3454 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
3455 (applicable to E_Procedure).
3456 (Corresponding_Procedure): New attribute (applicable to E_Function).
3457 * exp_util.adb (Build_Procedure_Form): Link the function with
3458 its internally built proc and viceversa.
3459 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
3460 attribute Rewritten_For_C and Corresponding_Procedure to the body.
3461 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
3462 (Rewritten_For_C_Proc_Id): Removed.
3463 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
3464 locate the corresponding procedure.
3466 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3468 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
3469 corresponding pragma.
3471 2016-04-27 Bob Duff <duff@adacore.com>
3473 * exp_ch3.adb: Minor comment improvement.
3475 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3477 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
3478 return type is an untagged limited record with only access
3479 discriminants and no controlled components, the return value does not
3480 need to use the secondary stack.
3482 2016-04-27 Javier Miranda <miranda@adacore.com>
3484 * exp_util.adb (Remove_Side_Effects): When
3485 generating C code handle object declarations that have
3486 discriminants and are initialized by means of a call to a
3489 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3491 * a-textio.adb (Get_Line function): Handle properly the case of
3492 a line that has the same length as the buffer (or a multiple
3493 thereof) and there is no line terminator.
3494 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
3495 in the string when there is no previous line terminator and we
3496 need at most one additional character.
3498 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3500 * s-rident.ads: Make No_Implicit_Loops non partition wide.
3502 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3504 * sem_ch11.adb (Analyze_Handled_Statements): check useless
3505 assignments also in entries and task bodies, not only in
3506 procedures and declaration blocks.
3507 * sem_ch5.adb (Analyze_Block_Statement): check useless
3508 assignements in declaration blocks as part of processing their
3509 handled statement sequence, just like it was done for procedures
3510 and now is also done for entries and task bodies.
3511 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
3512 of entries and task bodies just like of procedures.
3514 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3516 * sem_util.adb (Is_Volatile_Function): Recognize
3517 a function declared within a protected type as well as the
3518 protected/unprotected version of a function.
3520 2016-04-27 Bob Duff <duff@adacore.com>
3522 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
3523 declaration of the form "X : T := Func (...);", where T is
3524 controlled, as a renaming.
3525 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
3526 to be an empty string, instead of null-ing out the Reference.
3527 * exp_util.adb (Needs_Finalization): Remove redundant code.
3529 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3531 * aspects.ads Aspects Export and Import do not require delay. They
3532 were classified as delayed aspects, but treated as non-delayed
3533 by the analysis of aspects.
3534 * freeze.adb (Copy_Import_Pragma): New routine.
3535 (Wrap_Imported_Subprogram): Copy the import pragma by first
3536 resetting all semantic fields to avoid an infinite loop when
3537 performing the copy.
3538 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
3539 comment on the processing of aspects Export and Import
3540 at the freeze point.
3541 (Analyze_Aspect_Convention: New routine.
3542 (Analyze_Aspect_Export_Import): New routine.
3543 (Analyze_Aspect_External_Link_Name): New routine.
3544 (Analyze_Aspect_External_Or_Link_Name): Removed.
3545 (Analyze_Aspect_Specifications): Factor out the analysis of
3546 aspects Convention, Export, External_Name, Import, and Link_Name
3547 in their respective routines. Aspects Export and Import should
3548 not generate a Boolean pragma because their corresponding pragmas
3549 have a very different syntax.
3550 (Build_Export_Import_Pragma): New routine.
3551 (Get_Interfacing_Aspects): New routine.
3553 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3555 * inline.adb (Add_Inlined_Body): Overhaul implementation,
3556 robustify handling of -gnatn1, add special treatment for
3557 expression functions.
3559 2016-04-27 Doug Rupp <rupp@adacore.com>
3561 * g-traceb.ads: Update comment.
3562 * exp_ch2.adb: minor style fix in object declaration
3564 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3566 * sem_elab.adb (Check_Internal_Call): Do not
3567 consider a call when it appears within pragma Initial_Condition
3568 since the pragma is part of the elaboration statements of a
3569 package body and may only call external subprograms or subprograms
3570 whose body is already available.
3571 (Within_Initial_Condition): New routine.
3573 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3575 * exp_util.adb (Build_Procedure_Form): Prevent double generation
3576 of the procedure form when dealing with an expression function
3577 whose return type is an array.
3578 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
3579 * exp_ch6.adb: Proper conversion for inherited operation in C.
3580 * sem_ch6.adb: Code cleanup.
3582 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3584 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
3585 * g-socket.adb: Minor reformatting.
3586 * sinfo.ads: Minor comment correction.
3587 * sem_warn.ads: minor grammar fix in comment
3589 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3591 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
3592 (maybe_pad_type): Adjust comment.
3593 (finish_record_type): Likewise.
3594 (rest_of_record_type_compilation): Likewise.
3595 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
3596 parameter from integer to boolean. Adjust recursive calls.
3597 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
3598 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
3599 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
3600 Pass false to finish_record_type. Set the debug type later.
3601 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
3602 (gnat_to_gnu_component_type): Fix formatting.
3603 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
3604 (gnat_to_gnu_type): Likewise.
3605 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
3606 (Loop_Statement_to_gnu): Likewise.
3607 (Subprogram_Body_to_gnu): Likewise.
3608 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
3609 (Exception_Handler_to_gnu_gcc): Likewise.
3610 (Compilation_Unit_to_gnu): Likewise.
3611 (gnat_to_gnu): Likewise.
3612 (push_exception_label_stack): Likewise.
3613 (elaborate_all_entities_for_package): Likewise.
3614 (process_freeze_entity): Likewise.
3615 (process_decls): Likewise.
3616 (process_type): Likewise.
3617 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
3618 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
3619 call to rest_of_record_type_compilation.
3620 (rest_of_record_type_compilation): Use copy_type.
3621 (copy_type): Use correctly typed constants.
3622 (gnat_signed_or_unsigned_type_for): Use copy_type.
3623 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
3624 (build_goto_raise): Adjust call tognat_to_gnu_entity.
3626 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3628 * gcc-interface/misc.c (gnat_init): Do not call
3629 internal_reference_types.
3631 2016-04-27 Svante Signell <svante.signell@gmail.com>
3633 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
3634 * s-osinte-gnu.ads: Small tweaks.
3635 * s-osinte-gnu.adb: New file.
3637 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3639 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
3640 constituent even if it is not to prevent spurious errors.
3642 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3644 * sem_ch4.adb: Minor typo fixes and reformatting.
3646 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
3648 * g-calend.ads (No_Time): The same value in any timezone.
3649 * g-socket.adb (Raise_Host_Error): Remove ending
3650 dot from original error message before append colon delimited
3653 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3655 * sem_ch3.adb: Code cleanup.
3656 * sem_ch6.adb: Code cleanup.
3657 (Is_Matching_Limited_View): New routine.
3658 (Matches_Limited_With_View): Reimplemented.
3659 * sem_ch10.adb (Decorate_Type): Code cleanup.
3661 2016-04-21 Doug Rupp <rupp@adacore.com>
3663 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
3665 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3667 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
3668 indexing functions, collect all overloadings of the call firts,
3669 and then transfer them to indexing node, to prevent interleaving
3670 of the set of interpretations of the nodes involved.
3671 * sem_res.adb (Resolve): Suppress cascaded errors that report
3672 ambiguities when one of the actuals in an overloaded generatlized
3673 indexing operation is illegal and has type Any_Type, as is done
3674 for similar cascaded errors in subprogram calls.
3675 (Valid_Tagged_Conversion): Cleanup conversion checks when one
3676 of the types involved is a class-wide subtype.
3678 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3680 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
3681 subprogram declaration within a wrapper package, skip pragmas
3682 that may have been generated by aspect specifications on the
3685 2016-04-21 Javier Miranda <miranda@adacore.com>
3687 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
3688 code return True for array identifiers since the backend needs
3689 to initialize such component by means of memcpy().
3691 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3693 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
3694 potentially uninitialized memory.
3695 * sem_ch3.adb: Minor style fix in comment.
3697 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3699 * gnat_rm.texi, gnat_ugn.texi,
3700 doc/gnat_ugn/gnat_project_manager.rst,
3701 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3702 doc/gnat_ugn/gnat_and_program_execution.rst,
3703 doc/gnat_ugn/gnat_utility_programs.rst,
3704 doc/gnat_ugn/the_gnat_compilation_model.rst,
3705 doc/gnat_rm/implementation_defined_attributes.rst,
3706 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3707 doc/gnat_rm/implementation_defined_pragmas.rst,
3708 doc/gnat_rm/the_gnat_library.rst,
3709 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
3710 * doc/Makefile: Cleanups.
3712 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3714 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
3716 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3718 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
3719 disambiguate local variables that may be hidden from inner visibility
3720 by nested block declarations or loop variables.
3722 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
3724 * s-soflin.adb: Initialize the Stack_Limit global variable.
3726 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3728 * lib-writ.adb: Minor reformatting.
3730 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3732 * exp_pakd.adb (Compute_Number_Components): New function to
3733 build an expression that computes the number of a components of
3734 an array that may be multidimensional.
3735 (Expan_Packed_Eq): Use it.
3737 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3739 * g-traceb.ads: Update list of supported platforms.
3741 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3743 * sem_ch13.adb (Add_Predicates): if the type is declared in
3744 an inner package it may be frozen outside of the package, and
3745 the generated pragma has not been analyzed yet, the expression
3746 for the predicate must be captured and added to the predicate
3747 function at this point.
3749 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3751 * contracts.adb (Analyze_Package_Body_Contract): Do not check
3752 for a missing package refinement because 1) packages do not have
3753 "refinement" and 2) the check for proper state refinement is
3754 performed in a different place.
3755 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
3756 (Has_Null_Visible_Refinement): Reimplemented.
3757 * sem_ch3.adb (Analyze_Declarations): Determine whether all
3758 abstract states have received a refinement and if not, emit
3760 * sem_ch7.adb (Analyze_Package_Declaration): Code
3761 cleanup. Determine whether all abstract states of the
3762 package and any nested packages have received a refinement
3763 and if not, emit errors.
3764 (Requires_Completion_In_Body): Add new formal parameter
3765 Do_Abstract_States. Update the comment on usage. Propagate the
3766 Do_Abstract_States flag to all Unit_Requires_Body calls.
3767 (Unit_Requires_Body): Remove formal
3768 parameter Ignore_Abstract_States. Add new formal paramter
3769 Do_Abstract_States. Propagate the Do_Abstract_States flag to
3770 all Requires_Completion_In calls.
3771 * sem_ch7.ads (Unit_Requires_Body): Remove formal
3772 parameter Ignore_Abstract_States. Add new formal paramter
3773 Do_Abstract_States. Update the comment on usage.
3774 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
3775 not initialize the constituent list as this is now done on a
3776 need-to-add-element basis.
3777 (Analyze_Single_Task_Declaration):
3778 Do not initialize the constituent list as this is now done on
3779 a need-to-add-element basis.
3780 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
3781 lists as this is now done on a need-to-add-element basis.
3782 * sem_prag.adb (Analyze_Constituent): Set the
3783 refinement constituents when adding a new element.
3784 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
3785 adding a new element.
3786 (Analyze_Part_Of_Option): Set the Part_Of
3787 constituents when adding a new element.
3788 (Analyze_Pragma): Set the Part_Of constituents when adding a new
3790 (Check_Constituent_Usage (all versions)): Reimplemented.
3791 (Collect_Constituent): Set the refinement constituents when adding
3793 (Create_Abstract_State): Do not initialize the
3794 constituent lists as this is now done on a need-to-add-element basis.
3795 (Propagate_Part_Of): Set the Part_Of constituents when
3796 adding a new element.
3797 * sem_util.adb (Check_State_Refinements): New routine.
3798 (Has_Non_Null_Refinement): Reimplemented.
3799 (Has_Null_Refinement): Reimplemented.
3800 (Requires_State_Refinement): Removed.
3801 * sem_util.ads (Check_State_Refinements): New routine.
3802 (Requires_State_Refinement): Removed.
3804 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3806 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
3807 * sem.adb: Fix comment.
3809 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3811 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
3812 declaration with no aspects, whose subtype_mark is a subtype
3813 with predicates, inherits the list of subprograms for the type.
3815 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3817 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
3820 2016-04-21 Thomas Quinot <quinot@adacore.com>
3822 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
3824 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3826 * lib-writ.adb (Write_ALI): Do not record in ali file units
3827 that are present in the files table but not analyzed. These
3828 units are present because they appear in the context of units
3829 named in limited_with clauses, and the unit being compiled does
3830 not depend semantically on them.
3832 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3834 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
3835 create the procedure body for an function returning an array type,
3836 when generating C code. Reuse the subprogram body rather than
3837 creating a new one, both as an efficiency measure and because
3838 in an instance the body may contain global references that must
3841 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3843 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
3846 2016-04-21 Javier Miranda <miranda@adacore.com>
3848 * exp_aggr.adb (Component_Check): Extend
3849 the check that verifies that the aggregate has no function
3850 calls to handle transformations performed by the frontend.
3851 (Ultimate_Original_Expression): New subprogram.
3853 2016-04-21 Philippe Gil <gil@adacore.com>
3855 * krunch.adb (Krunch): Fix krunching of i-java.
3857 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3859 * exp_ch8.adb (Evaluation_Required): Always return
3860 True when Modify_Tree_For_C.
3862 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3864 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
3865 * alloc.ads: Minor comment fixes.
3866 * einfo.ads: Fix typo.
3868 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3870 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
3871 changes to handle all cases of components depending on the
3872 discriminant, not just string literals.
3874 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3876 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
3877 declaration is the generated declaration for a generic actual,
3878 inherit predicates from the actual if it is a predicated subtype.
3880 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3882 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
3883 inherited and its result is controlling, introduce a conversion
3884 on the actual for the corresponding procedure call, to avoid
3885 spurious type errors.
3887 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
3889 * krunch.adb (Krunch): Fix krunching of i-vxworks.
3891 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3893 * exp_aggr.adb: Minor reformatting and code cleanup.
3895 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3897 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
3898 resolution, because they introduce local names. Full resolution
3899 will take place when predicate function is constructed.
3901 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3903 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
3904 change to take into account Per_Object_Constraint field rather
3905 than special casing strings.
3906 * exp_ch6.adb: Fix typo in Replace_Returns.
3908 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3910 * sem_ch5.adb: Minor reformatting.
3912 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3914 * exp_aggr.adb (Backend_Processing_Possible): Return False
3915 when generating C and aggregate contains function calls.
3917 2016-04-21 Tristan Gingold <gingold@adacore.com>
3919 * krunch.adb (Krunch): Only partially krunch children of
3920 Interfaces that aren't known.
3922 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3924 * sem_prag.adb (Make_Inline): Handle properly the instantiation
3925 of a generic subpprogram that carries an Inline aspect. Place
3926 inline info on the anonymous subprogram that is constructed in
3927 the wrapper package.
3928 (Analyze_Pragma, case Pure): Do not check placement if pragma
3929 appears within an instantiation, which can be nested at any level.
3930 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
3931 node from anonymous subprogram to its visible renaming. The
3932 freeze node will be constructed if the subprogram carries
3934 (Set_Global): Preserve dimension information if present (from
3937 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
3939 * gnatlink.adb: Change wording of the warning message on
3940 problematic filenames to be more neutral. Add a new substring
3941 "patch" introduced on Windows 10.
3943 2016-04-21 Philippe Gil <gil@adacore.com>
3945 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
3947 2016-04-21 Javier Miranda <miranda@adacore.com>
3949 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
3952 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3954 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
3955 * einfo.ads New synthesized attribute
3956 Has_Non_Null_Abstract_State along with occurrences in entities.
3957 (Has_Non_Null_Abstract_State): New routine.
3958 * sem_ch7.adb (Unit_Requires_Body): Add local variable
3959 Requires_Body. A package declaring an abstract state requires
3960 a body only when the state is non-null and the package contains
3961 at least one other construct that requires completion in a body.
3962 * sem_util.adb (Mode_Is_Off): Removed.
3963 (Requires_State_Refinement): Remove an obsolete check. Code
3966 2016-04-21 Bob Duff <duff@adacore.com>
3968 * sem_attr.adb (Analyze_Attribute): In processing
3969 the 'Old attribute, a warning is given for infinite recursion. Fix
3970 the code to not crash when the prefix of 'Old denotes a protected
3972 * sem_ch5.adb (Analyze_Iterator_Specification):
3973 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
3974 where the parameter would not be an object.
3976 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3978 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
3979 Etype or Underlying_Type of the operands.
3981 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3983 * atree.adb (Print_Statistics): Protect against overflows and
3984 print the memory consumption in bytes.
3985 * table.adb (Reallocate): Do the intermediate calculation of the new
3986 size using the Memory.size_t type.
3988 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3990 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
3991 expansion of Attribute_Machine and Attribute_Model for AAMP.
3993 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3995 * freeze.adb: Disable previous change for now.
3997 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3999 * sem_ch8.adb (Find_Selected_Component): If prefix has an
4000 access type and designated type is a limited view, introduce
4001 an explicit dereference before continuing the analysis, and
4002 set its type to the non-limited view of the designated type,
4003 if we are in context where it is available.
4005 2016-04-21 Ed Schonberg <schonberg@adacore.com>
4007 * freeze.adb: Freeze profile in ASIS mode.
4009 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
4011 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
4012 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
4014 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
4016 * exp_ch6.adb: Minor reformatting.
4018 2016-04-21 Ed Schonberg <schonberg@adacore.com>
4020 * sem_ch13.adb: Minor comment update.
4022 2016-04-21 Ed Schonberg <schonberg@adacore.com>
4024 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
4025 boolean parameter to determine whether freezing an overloadable
4026 entity freezes its profile as well. This is required by
4027 AI05-019. The call to Freeze_Profile within Freeze_Entity is
4028 conditioned by the value of this flag, whose default is True.
4029 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
4030 reference freezes the prefix, but it the prefix is a subprogram
4031 it does not freeze its profile.
4033 2016-04-21 Javier Miranda <miranda@adacore.com>
4035 * exp_util.adb (Build_Procedure_Form): No action needed for
4036 subprogram renamings since the backend can generate the call
4037 using the renamed subprogram. This leaves the tree more clean
4039 * exp_ch6.adb (Expand_Call): Extend previous patch for
4040 rewritten-for-c entities to handle subprogram renamings.
4041 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
4043 2016-04-21 Ed Schonberg <schonberg@adacore.com>
4045 * sem_ch13.adb: Code cleanup.
4047 2016-04-21 Ed Schonberg <schonberg@adacore.com>
4049 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
4050 created for SPARK_To_C, the entity must remain invisible so it
4051 does not overload subsequent references to the original function.
4052 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
4053 Handle Extended_Return_Statements by replacing it with a block
4054 with assignments and a simple return statement.
4055 * exp_util.adb (Build_Procedure_Form): Make procedure entity
4056 invisible after analyzing declaration, to prevent improper
4059 2016-04-21 Javier Miranda <miranda@adacore.com>
4061 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
4062 attribute Rewritten_For_C to the body since since the expander
4063 may generate calls using that entity.
4064 * exp_ch6.adb (Expand_Call): For internally generated
4065 calls ensure that they reference the entity of the spec
4066 of the called function.
4067 (Rewritten_For_C_Func_Id): New subprogram.
4068 (Rewritten_For_C_Proc_Id): New subprogram.
4069 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
4070 ensure that we skip freezing entities.
4071 * exp_util.adb (Build_Procedure_Form): No action needed if the
4072 procedure was already built.
4074 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
4076 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
4079 2016-04-21 Ed Schonberg <schonberg@adacore.com>
4081 * sem_util.adb (Denotes_Iterator): Use root type to determine
4082 whether the ultimate ancestor is the predefined iterator
4084 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
4085 and avoid reuse of Pack local variable.
4087 2016-04-21 Olivier Hainque <hainque@adacore.com>
4089 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4090 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4091 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
4092 Executable_Extension to ".out".
4094 2016-04-21 Javier Miranda <miranda@adacore.com>
4096 * frontend.adb: Update call to Unnest_Subprograms.
4097 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
4098 (Unnest_Subprograms): Moved to package exp_unst.
4099 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
4101 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
4102 enumeration literals when generating C code.
4104 2016-04-21 Javier Miranda <miranda@adacore.com>
4106 * frontend.adb: Remove call to initialize Exp_Ch6.
4107 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
4108 (Unest_Entry/Unest_Bodies): Removed.
4109 (Unnest_Subprograms): Code cleanup.
4111 2016-04-21 Arnaud Charlet <charlet@adacore.com>
4113 * set_targ.adb (Read_Target_Dependent_Values):
4114 close target description file once its contents is read.
4115 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
4116 and Stderr_File): Close local file descriptors before spawning
4118 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
4119 local variables to make the code easier to understand and avoid
4120 duplicated calls to Parent and Generic_Parent.
4122 2016-04-20 Bob Duff <duff@adacore.com>
4124 * s-os_lib.ads: Minor comment fix.
4126 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4128 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
4129 a discriminant check for a type whose partial view has unknown
4130 discriminants when the full view has discriminants with defaults.
4132 2016-04-20 Javier Miranda <miranda@adacore.com>
4134 * exp_util.adb (Remove_Side_Effects): When generating C code
4135 remove side effect of type conversion of access to unconstrained
4137 (Side_Effect_Free): Return false for the type
4138 conversion of access to unconstrained array type when generating
4140 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
4141 of access to unconstrained array type conversion when generating
4144 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4146 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
4147 function, to construct the declaration of a predicate function
4148 at the end of the current declarative part rather than at the
4149 (possibly later) freeze point of the type. This also allows uses
4150 of a type with predicates in instantiations elsewhere.
4151 (Resolve_Aspect_Expression): New procedure to detect visiblity
4152 errors in aspect expressions, at the end of the declarative part
4153 that includes the type declaration.
4154 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
4155 predicate function from private to full view.
4156 * einfo.adb (Predicate_Function): Refine search for predicate
4157 function when type has a full view and predicate function may
4158 be defined on either view.
4160 2016-04-20 Javier Miranda <miranda@adacore.com>
4162 * frontend.adb: Passing the root of the tree to
4163 Unnest_Subprograms().
4164 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
4165 took care of adding subprograms to the Unest_Bodies table since
4166 performing such action too early disables the ability to process
4167 generic instantiations.
4168 (Unnest_Subprograms): Adding parameter.
4169 (Search_Unnesting_Subprograms): New subprogram.
4170 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
4172 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4174 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
4176 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4178 * exp_unst.adb (Check_Static_Type): For a private type, check
4181 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4183 * sem_attr.adb (Check_Type): Reject an attribute reference in
4184 an aspect expression, when the prefix of the reference is the
4185 current instance of the type to which the aspect applies.
4187 2016-04-20 Bob Duff <duff@adacore.com>
4189 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
4190 hiding unless we're actually hiding something. The previous
4191 code would (for example) warn about a "<" on a record type
4192 because it incorrectly thought it was hiding the "<" on Boolean
4193 in Standard. We need to check that the homonym S is in fact a
4194 homograph of a predefined operator.
4196 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4198 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
4199 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
4200 procedure equivalent to a function returning an array, when this
4201 construction is deferred to the freeze point of the function.
4202 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
4203 function that renames an instance of Unchecked_Conversion.
4204 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
4205 declaration for a function returning an array.
4206 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
4208 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4210 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
4211 New predicate to determine that in a context with full run-time,
4212 a function call is an expansion of a reference to attribute
4214 * sem_ch5.adb (Analyze_Function_Call): use it.
4215 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
4217 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4219 * einfo.adb Flag286 is now used as Is_Exception_Handler.
4220 (Is_Exception_Handler): New routine.
4221 (Set_Is_Exception_Handler): New routine.
4222 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
4223 * einfo.ads New attribute Is_Exception_Handler along with
4224 occurrences in entities.
4225 (Is_Exception_Handler): New routine along with pragma Inline.
4226 (Set_Is_Exception_Handler): New routine along with pragma Inline.
4227 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
4228 for exception handlers with a choice parameter.
4229 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
4230 generated for a choice parameter as an exception handler.
4232 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4234 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
4235 (Constrain_Discriminated_Type): In an instance, if the type has
4236 unknown discriminants, use its full view.
4237 (Process_Subtype): Check that the base type is private before
4238 adding subtype to Private_Dependents list.
4240 2016-04-20 Bob Duff <duff@adacore.com>
4242 * sem_ch13.adb: Minor comment fix.
4244 2016-04-20 Yannick Moy <moy@adacore.com>
4246 * sem_ch4.adb: Fix typos in comments.
4247 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
4249 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4251 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
4252 current instance of a task type is legal if the prefix is an
4253 expression of that task type and the selector is an entry or
4256 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4258 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
4259 varsize field at the end for efficiency.
4261 2016-04-20 Vincent Celier <celier@adacore.com>
4263 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
4264 ls" includes the switch -V.
4265 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
4267 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
4270 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4272 * sem_ch12.adb (Qualify_Type): Do not perform
4273 partial qualification when the immediate scope is a generic unit.
4275 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4277 * exp_unst.adb: Minor reformatting.
4279 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4281 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
4282 tag assignment and adjustment preceed the accessibility check.
4283 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
4285 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4287 * exp_prag.adb (Expand_Attributes): Ensure that
4288 the temporary used to capture the value of attribute 'Old's
4289 prefix is properly initialized.
4291 2016-04-20 Javier Miranda <miranda@adacore.com>
4293 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
4296 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4298 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
4301 2016-04-20 Vincent Celier <celier@adacore.com>
4303 * make.adb: Code cleanup.
4305 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4307 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
4310 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4312 * sem_ch12.adb (Copy_Generic_Node): Handle the special
4313 qualification installed for universal literals that act as
4314 operands in binary or unary operators. (Qualify_Operand): Mark
4315 the qualification to signal the instantiation mechanism how to
4316 handle global reference propagation.
4317 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
4318 (Set_Is_Qualified_Universal_Literal): New routine.
4319 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
4320 with occurrences in nodes.
4321 (Is_Qualified_Universal_Literal):
4322 New routine along with pragma Inline.
4323 (Set_Is_Qualified_Universal_Literal): New routine along with
4326 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4328 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
4329 so that the corresponding checks are preserved across compilations
4330 that include System.Constants in their context.
4332 2016-04-20 Gary Dismukes <dismukes@adacore.com>
4334 * sem_type.adb: Minor typo fix and reformatting.
4335 * a-conhel.ads: Update comment.
4337 2016-04-20 Bob Duff <duff@adacore.com>
4339 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
4340 code so it doesn't trigger an "uninit var" warning.
4342 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4344 * sem_attr.ads Add new table Universal_Type_Attribute.
4345 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
4346 checking attributes.
4348 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4350 * exp_aggr.adb (Init_Stored_Discriminants,
4351 Init_Visible_Discriminants): New procedures, subsidiary of
4352 Build_Record_Aggr_Code, to handle properly the construction
4353 of aggregates for a derived type that constrains some parent
4354 discriminants and renames others.
4356 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4358 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
4359 (Save_References_In_Operator): Add explicit qualifications in
4360 the generic template for all operands of universal type.
4361 * sem_type.adb (Disambiguate): Update the call to Matches.
4362 (Matches): Reimplemented.
4363 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
4365 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4367 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
4368 an illegal aspect that freezes the entity to which it applies.
4370 2016-04-20 Bob Duff <duff@adacore.com>
4372 * a-stwibo.ads, a-stzbou.ads
4373 ("="): Add overriding keyword before function to avoid crash when
4374 compiler is called with -gnatyO (check overriding indicators).
4376 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4378 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
4379 is a configuration pragma and it uses the ARG syntax, insert
4380 the rewritten pragma after the current one rather than using
4383 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4385 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
4388 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4390 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
4391 s-imglli.adb: Minor reformatting.
4393 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4395 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
4396 renamed operator when the associated node appears within a
4398 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
4400 2016-04-20 Yannick Moy <moy@adacore.com>
4402 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
4403 * einfo.adb (Set_Overridden_Operation): Add assertion.
4404 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
4407 2016-04-20 Javier Miranda <miranda@adacore.com>
4409 * exp_unst.adb (Append_Unique_Call): New subprogram.
4410 (Unnest_Subprogram): Replace the unique occurrence
4411 of Call.Append() by Append_Unique_Call() which protects us from
4412 adding to the Calls table duplicated entries.
4414 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4416 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
4417 * xref_lib.ads (Dependencies_Tables): instantiate
4418 Table package with types that guarantee its safe use.
4419 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
4422 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4424 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
4425 Disable expansion when generating C code.
4426 * sinfo.ads, inline.ads: Minor editing.
4428 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4430 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
4433 2016-04-20 Javier Miranda <miranda@adacore.com>
4435 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
4436 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
4437 declaration of the internally built _postcondition procedure.
4439 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4441 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
4443 * sem_util.adb (Is_Unchecked_Conversion_Instance):
4444 defense against library-level renamings of other functions,
4445 which are never instances of Unchecked_Conversion.
4446 * einfo.ads: minor fix of casing in comment
4448 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4450 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
4451 that has been analyzed and expanded already. Qualify the names
4452 in the proper body for use in the generation of C code.
4454 2016-04-20 Javier Miranda <miranda@adacore.com>
4456 * contracts.adb (Build_Postconditions_Procedure): Force its
4457 inlining when generating C code.
4458 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
4459 _postconditions when generating C code.
4460 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
4461 _postconditions when generating C code.
4462 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
4463 types of return value and argument changed from Node_Id to
4466 2016-04-20 Vincent Celier <celier@adacore.com>
4468 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
4470 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
4472 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
4473 the Has_Delayed_Freeze flag on the anonymous instance node.
4475 2016-04-20 Javier Miranda <miranda@adacore.com>
4477 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
4478 scope associated with the renaming object declaration.
4479 * exp_util.adb (Insert_Actions): Remove handling of iterator
4480 loop marked as requiring the secondary stack.
4482 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4484 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
4485 AI12-0124, which extends the functionality of the attribute so it
4486 reflects the semantics of GNAT 'Img when applied to scalar types.
4487 * lib-xref.adb: minor whitespace layout fix.
4489 2016-04-20 Vincent Celier <celier@adacore.com>
4491 * clean.adb (Gnatclean): Fail if project file specified and
4492 gprclean is not available.
4493 * gnatname.adb: Fail is -P is used and gprname is not available.
4494 * make.adb (Initialize): Fail if project file specified and
4495 gprbuild is not available.
4497 2016-04-20 Bob Duff <duff@adacore.com>
4499 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
4500 stack when possible.
4502 2016-04-20 Gary Dismukes <dismukes@adacore.com>
4504 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
4507 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4509 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4510 If the pragma comes from an aspect specification, verify that
4511 the aspect applies to an entity with a declarative part.
4512 * exp_ch5.adb: Code cleanup.
4514 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4516 * sem_res.adb (Resolve_If_Expression): If first expression is
4517 universal, resolve subsequent ones with the corresponding class
4518 type (Any_Integer or Any_Real).
4520 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4522 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
4523 disabled, complete the analysis of the iterator name to ensure
4524 that reference for entities within are properly generated.
4526 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4528 * a-dispat.ads (Yield): add Global contract.
4529 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
4530 * a-taside.adb: Added Initializes => Tasking_State.
4532 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4534 * sem_ch13.adb (Build_Invariant_Procedure):
4535 Reimplement the invariant procedure spec and body insertion.
4537 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4539 * sem_ch13.adb (Add_Invariant): Do not replace
4540 the saved expression of an invariatn aspect when inheriting
4541 a class-wide type invariant as this clobbers the existing
4542 expression. Do not use New_Copy_List as it is unnecessary
4543 and leaves the parent pointers referencing the wrong part of
4544 the tree. Do not replace the type references for ASIS when
4545 inheriting a class-wide type invariant as this clobbers the
4546 existing replacement.
4548 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4550 * sem_util.adb (Build_Explicit_Dereference): If the designated
4551 expression is an entity name, generate reference to the entity
4552 because it will not be resolved again.
4554 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4556 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4557 gnat_rm.texi: Update documentation.
4559 2016-04-19 Olivier Hainque <hainque@adacore.com>
4561 * par_sco.adb (Traverse_One, case N_Case_Statement):
4562 Skip pragmas before the first alternative.
4563 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
4565 2016-04-19 Tristan Gingold <gingold@adacore.com>
4567 * adaint.c (__gnat_lwp_self): New function (for darwin).
4568 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
4571 2016-04-19 Olivier Hainque <hainque@adacore.com>
4573 * sem_util.adb (Build_Elaboration_Entity): Always request an
4574 elab counter when preserving control-flow.
4576 2016-04-19 Olivier Hainque <hainque@adacore.com>
4578 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
4579 Needs_Debug_Info when producing SCOs.
4580 * par_sco.adb (Traverse_Aspects): Fix categorization of
4581 Type_Invariant to match actual processing as activated depending
4582 on pragma Assertion_Policy.
4583 * sem_prag.adb (Analyze_Pragma): Remove special case for
4584 Name_Invariant regarding SCO generation, which completely disabled
4585 the production of SCOs for Invariant pragmas and aspects.
4587 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4589 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
4592 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4594 * freeze.adb (Freeze_Profile): Refine predicate that checks
4595 whether a function that returns a limited view is declared in
4596 another unit and cannot be frozen at this point.
4598 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4600 * exp_aggr.adb (Component_Count): Handle properly superflat
4601 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
4602 return value of the function is Natural, rather than leaving
4603 the handling of such arrays to the caller of this function.
4605 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4607 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
4608 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
4609 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
4610 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
4611 to publicly visible routine in Sem_Util.
4613 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4615 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
4616 the check if the type of the actual is By_Reference.
4618 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4620 * sem_res.adb (Within_Subprogram_Call): Detect
4621 also nodes that appear in entry calls.
4622 (Resolve_Actuals, Insert_Default): Propagate
4623 dimension information if any, from default expression to the
4624 copy that appears in the list of actuals.
4625 * uintp.ads: minor whitespace fix in comment.
4626 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
4628 * set_targ.adb (Set_Targ): convert directly from
4629 Natural to Pos, without intermediate conversion to Int.
4631 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4633 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
4634 SPARK RM in comment.
4635 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
4637 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
4638 to SPARK RM in both comment and error message.
4640 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
4642 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
4643 CW type, then the subprogram must have a delayed freeze. This
4644 ensures that the backend can properly recover the full view when
4645 elaborating the access subprogram declaration.
4647 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4649 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
4650 overloadable entity if originally overloaded.
4652 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4654 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
4655 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
4656 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
4657 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
4660 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4662 * sem_util.adb (Copy_Node_With_Replacement):
4663 use Set_Comes_From_Source instead of directly manipulating
4664 internals of the node table.
4665 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
4666 * sem_aux.adb (Get_Rep_Pragma,
4667 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
4668 do not change as constants and initialize them in the declaration.
4669 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
4670 variables that do not change as constants and initialize them
4673 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4675 * sem_res.adb (Resolve_Entry_Call): If the entry has
4676 preconditions it is rewritten by means of a wrapper that
4677 incorporates the original call. Before rewriting generate a
4678 reference to the entry being called to prevent spurious warnings
4679 and provide correct cross-reference information.
4681 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4683 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
4684 local constant Scop. Ignore any internally generated loops when
4685 performing the check concerning an abstract subprogram call
4686 without a controlling argument.
4687 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
4689 2016-04-19 Bob Duff <duff@adacore.com>
4691 * sem_elab.adb (Check_A_Call): There are cases where we have No
4692 (Ent) after the Alias loop, even when there was no previous error,
4693 so we can't assert that there was an error.
4695 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4697 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
4698 Reject use of type name as a prefix to 'access within an aggregate
4699 in a context that is not the declarative region of a type.
4701 2016-04-19 Vincent Celier <celier@adacore.com>
4703 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
4704 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
4705 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
4706 Remove anything related to project files
4707 * g-mbdira.adb: minor whitespace cleanup
4708 * g-spipat.adb: minor removal of extra spaces after closing paren
4710 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4712 * exp_ch6.adb (Expand_Actuals): If post-statements are present
4713 and the enclosing context is a function call or indexing, build
4714 an Expression_With_Actions for the call.
4716 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4718 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
4719 a with line for an ignored Ghost unit.
4720 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
4721 Par. A child package is Ghost when its parent is Ghost.
4722 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
4723 a subprogram declaration that acts as a compilation unit.
4725 2016-04-18 Michael Matz <matz@suse.de>
4727 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
4728 (gnat_to_gnu_field): Ditto.
4729 (components_to_record): Ditto.
4730 (create_variant_part_from): Ditto.
4731 (copy_and_substitute_in_size): Ditto.
4732 (substitute_in_type): Ditto.
4733 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
4734 (make_packable_type): Ditto.
4735 (maybe_pad_type): Ditto.
4736 (finish_fat_pointer_type): Ditto.
4737 (finish_record_type): Ditto and use SET_DECL_ALIGN.
4738 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
4739 (create_field_decl): Use SET_DECL_ALIGN.
4741 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4743 * einfo.adb (Overridden_Operation): assert that
4744 function is called for valid arguments.
4745 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
4746 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
4747 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
4748 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
4749 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
4750 No space after closing parenthesis except where required for
4752 * sem_res.adb: Minor reformatting.
4754 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4756 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
4757 statement when relevant.
4759 2016-04-18 Bob Duff <duff@adacore.com>
4761 * a-cuprqu.adb (Enqueue): Properly handle the
4762 case where the new element has a unique priority.
4764 2016-04-18 Tristan Gingold <gingold@adacore.com>
4766 * adaint.h: Define stat structures and functions for iOS
4769 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4771 * sem_res.adb (Resolve_Entry_Call): reset
4772 Is_Overloaded flag after resolving calls to overloaded protected
4774 * exp_spark.adb (Expand_SPARK): call
4775 Qualify_Entity_Names for tasking nodes, i.e. protected types,
4776 task types and entries.
4777 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
4778 in case of an unconstrained type.
4780 2016-04-18 Yannick Moy <moy@adacore.com>
4782 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
4783 comment to document usage of subprogram in GNATprove.
4785 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4787 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
4788 message for wrong placement of aspect Test_Case.
4790 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4792 * einfo.ads: Update the documentation of attribute Renamed_Object.
4793 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
4795 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4797 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
4798 in the case of AAMP (same as for use of the -gnatd.P switch) to
4799 suppress this optimization, which avoids creating a dependence
4800 on the 64-bit arithmetic package.
4802 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4804 * exp_ch4.adb: Update comment.
4806 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4808 * exp_ch6.adb (Expand_Call): Make sure instantiations are
4809 registered only once as pending here.
4811 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4813 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
4814 (Minimize_Expression_With_Actions): New flag.
4815 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
4817 (Resolve_Short_Circuit): Redo previous change
4818 using Minimize_Expression_With_Actions.
4819 (Expand_N_If_Expression,
4820 Expand_Short_Circuit_Operator): Restore old code to avoid
4821 Expression_With_Actions when Minimize_Expression_With_Actions
4824 2016-04-18 Vincent Celier <celier@adacore.com>
4826 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
4827 Stderr_File): Close local file descriptors when no longer needed.
4829 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4831 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
4832 mode check that the type of the cursor in an iteration over
4833 a formal container is not volatile. The proper check on the
4834 element type is done elsewhere.
4836 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4838 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
4839 a subprogram that returns a class-wide type, if the subprogram
4840 is a compilation unit, because otherwise gigi will treat the
4841 subprogram as external, leading to link errors.
4843 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4845 * sem_res.adb (Resolve_Short_Circuit): Do not use
4846 expression-with-actions when generating C.
4848 2016-04-18 Yannick Moy <moy@adacore.com>
4850 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
4851 raise node in GNATprove mode.
4853 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4855 * s-fileio.adb: Minor reformatting.
4856 * sem_prag.adb (Analyze_Input_Item): Add local
4857 variable Input_OK. Do not consider mappings of generic formal
4858 parameters to actuals.
4860 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4862 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
4863 type, the cursor is declared in the scope of the parent type.
4864 (Analyze_Parameter_Specification): A qualified expression with an
4865 iterator type indicates an iteration over a container (explicit
4868 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4870 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
4871 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
4872 * debug.adb: Reserve -gnatd.4 to force generation of C files.
4874 2016-04-18 Yannick Moy <moy@adacore.com>
4876 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
4877 division by zero, instead possibly issue a warning.
4878 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
4879 static division by zero, instead add check flag on original
4881 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
4882 Only issue error when both SPARK_Mode is On and Warn is False.
4884 2016-04-18 Yannick Moy <moy@adacore.com>
4886 * checks.adb (Apply_Scalar_Range_Check): Force
4887 warning instead of error when SPARK_Mode is On, on index out of
4888 bounds, and set check flag for GNATprove.
4890 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4892 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
4893 Update the comment on usage. Reimplemented.
4894 (Check_Input_States.Check_Constituent_Usage): Update the comment
4895 on usage. A Proof_In constituent can now refine an Input state
4896 as long as there is at least one Input constituent present.
4898 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4900 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
4901 body id as the sloc of the entity in the generated subprogram
4902 declaration, to avoid spurious conformance errors when style
4905 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4907 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
4908 Refine check on illegal calls to entities within a task body,
4909 when the entity is declared in an object of the same type. In
4910 a generic context there might be no explicit dereference but if
4911 the prefix includes an access type the construct is legal.
4913 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4915 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
4916 RE_Default_Priority.
4918 2016-04-18 Bob Duff <duff@adacore.com>
4920 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
4921 if the pragma came from an aspect specification.
4923 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4925 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
4927 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4929 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
4930 superfluous conformance check on an inlined body with a previous
4931 spec, use the fact that the generated declaration does not come
4932 from source. We must treat the entity as coming from source to
4933 enable some back-end inlining when pragma appears after the body.
4935 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4937 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
4938 exp_intr.adb: Minor reformatting and typo corrections.
4940 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4942 * sem_ch6.adb: Code cleanup.
4944 2016-04-18 Thomas Quinot <quinot@adacore.com>
4946 * sem_ch13.adb: Minor reformatting and error message tweaking
4947 (remove extraneous spaces).
4949 2016-04-18 Johannes Kanig <kanig@adacore.com>
4951 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
4953 2016-04-18 Bob Duff <duff@adacore.com>
4955 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
4956 exists, and it's a fifo, we use "w" as the open string instead of
4957 "r+". This is necessary to make a write to the fifo block until
4960 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4962 * sem_attr.adb (Denote_Same_Function): Account
4963 for a special case where a primitive of a tagged type inherits
4964 a class-wide postcondition from a parent type.
4966 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4968 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
4969 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
4970 of reserved words is OK.
4971 (Scan_Pragma_Argument_Association):
4972 Add new formal Reserved_Words_OK and update the comment on
4973 usage. Code cleanup. Parse an expression or a reserved word in
4974 identifier form for pragmas Restriction_Warnings and Restrictions
4975 No_Use_Of_Attribute.
4976 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4977 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
4978 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
4980 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
4981 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
4982 Update the parameter profile.
4983 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
4985 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
4986 the comment on usage.
4987 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
4988 * sem_attr.adb (Analyze_Attribute): Check restriction
4989 No_Use_Of_Attribute.
4990 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
4991 restriction No_Use_Of_Attribute before any rewritings have
4993 * sem_prag.adb (Analyze_Pragma): Check restriction
4994 No_Use_Of_Pragma before any rewritings have taken place.
4996 2016-04-18 Bob Duff <duff@adacore.com>
4998 * sem_ch6.adb (Is_Inline_Pragma): The pragma
4999 argument can be a selected component, which has no Chars field,
5000 so we need to deal with that case (use the Selector_Name).
5001 (Check_Inline_Pragma): We need to test Is_List_Member before
5002 calling In_Same_List, because in case of a library unit, they're
5003 not in lists, so In_Same_List fails an assertion.
5005 2016-04-18 Bob Duff <duff@adacore.com>
5007 * namet.ads, namet.adb: Add an Append that appends a
5008 Bounded_String onto a Bounded_String. Probably a little more
5009 efficient than "Append(X, +Y);". Also minor cleanup.
5010 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
5011 Append_Unqualified_Decoded): Make sure these work with non-empty
5013 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
5014 parameter, defaulting to Global_Name_Buffer.
5015 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
5016 Bounded_String parameter, no default.
5017 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
5018 Bounded_String instead of Global_Name_Buffer.
5019 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
5020 to Append_Entity_Name, and pass a Bounded_String parameter,
5021 instead of using globals.
5022 (Add_Source_Info): Pass a Bounded_String parameter, instead of
5024 (Expand_Source_Info): Use local instead of globals.
5025 * stringt.ads, stringt.adb (Append): Add an Append procedure
5026 for appending a String_Id onto a Bounded_String.
5027 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
5029 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
5030 Adjust_Name_Case parameter.
5031 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
5032 Set_Casing; that's the default.
5033 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
5034 protected subprograms are entry calls; otherwise it is not possible to
5035 distinguish them from regular subprogram calls.
5037 2016-04-18 Gary Dismukes <dismukes@adacore.com>
5039 * sem_ch13.adb (Has_Good_Profile): Improvement
5040 of error message. Now indicates subtype_mark of formal parameter
5041 rather than the formal's name, plus minor rewording.
5043 2016-04-18 Pascal Obry <obry@adacore.com>
5045 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
5047 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5049 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
5051 2016-04-18 Gary Dismukes <dismukes@adacore.com>
5053 * par-ch4.adb, sem_prag.adb: Minor reformatting.
5055 2016-04-18 Bob Duff <duff@adacore.com>
5057 * sinput.ads, sinput.adb (Build_Location_String): Take a
5058 parameter instead of using a global variable. The function
5059 version no longer destroys the Name_Buffer.
5060 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
5061 parameter, which defaults to the Global_Name_Buffer, so some
5062 calls can avoid the global.
5063 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
5064 to avoid using globals. All but one call to Build_Location_String
5065 avoids the global. Only one call to String_From_Name_Buffer
5068 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5070 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
5072 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5074 * sem_eval.adb (Choice_Matches): Check the expression
5075 against the predicate values when the choice denotes a
5076 subtype with a static predicate.
5077 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
5078 tests for predicates.
5079 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
5080 is not static. (Is_Static_Subtype): A subtype with a dynamic
5081 predicate is not static.
5082 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
5083 (Is_Static_Subtype): Update the comment on usage.
5085 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5087 * sem_prag.adb (Analyze_Input_Item): Allow
5088 generic formals to appear as initialization items.
5090 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5092 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
5093 Has_Good_Profile): Additional error message to indicate that
5094 the second parameter of the subprogram must be a first subtype.
5096 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5098 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
5099 Use the pragma lookahead that determines whether a subprogram
5100 is to be inlined, when some level of backend optimization is
5102 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
5103 code used to create an instance body when needed for inlining.
5104 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
5105 call appears within an instantiation that is not a compilation
5106 unit, add a pending instantiation for the enclosing instance,
5107 so the backend can inline in turn the calls contained in the
5110 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5112 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
5113 that relates operations of the parent type to the operations of
5114 the derived type has three distinct sources:
5115 a) explicit operations of the derived type carry an
5116 Overridden_Operation that designates the operation in the
5118 b) Implicit operations that are inherited by the derived type
5119 carry an alias that may be an explicit subprogram (in which case
5120 it may have an Overridden_ Operation indicator) or may also be
5121 inherited and carry its own alias.
5122 c) If the parent type is an interface, the operation of the
5123 derived type does not override, but the interface operation
5124 indicates the operation that implements it.
5125 * sem_prag.adb: Minor reformatting.
5126 * sem_prag.adb (Check_External_Property): Update
5127 the comment on usage. Reimplement.
5129 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5131 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
5132 profiles such as ZFP, ceiling priority is not available.
5134 2016-04-18 Bob Duff <duff@adacore.com>
5136 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
5138 2016-04-18 Bob Duff <duff@adacore.com>
5140 * sem_elab.adb (Output_Calls): Use
5141 Get_Name_String, to clearly indicate that the global Name_Buffer
5142 is being used. The previous code used Is_Internal_Name, which
5143 returns a Boolean, but also has a side effect of setting the
5144 Name_Buffer. Then it called the other Is_Internal_Name, which uses
5145 the Name_Buffer for its input. And then it called Error_Msg_N,
5146 again using the Name_Buffer. We haven't eliminated the global
5147 usage here, but we've made it a bit clearer.
5148 This also allows us to have a side-effect-free version of
5150 * namet.ads, namet.adb: Provide a type Bounded_String, along with
5151 routines that can be used without using global variables. Provide
5152 Global_Name_Buffer so existing code can continue to use the
5153 global. Mark the routines that use globals as obsolete. New code
5154 shouldn't call the obsolete ones, and we should clean up existing
5155 code from time to time.
5156 Name_Find_Str is renamed as Name_Find.
5157 * namet.h: Changed as necessary to interface to the new version
5159 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
5162 2016-04-18 Yannick Moy <moy@adacore.com>
5164 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
5165 outside of GNATprove, hence it should not be removed.
5167 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5169 * sem_prag.adb (Analyze_Refinement_Clause):
5170 The refinement of an external abstract state can now mention
5171 non-external constituents.
5172 (Check_External_Property): Update all SPARK RM references.
5174 2016-04-18 Bob Duff <duff@adacore.com>
5176 * exp_intr.adb: Remove some duplicated code.
5178 2016-04-18 Yannick Moy <moy@adacore.com>
5180 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
5181 package spec and body out of SPARK.
5183 2016-04-18 Johannes Kanig <kanig@adacore.com>
5185 * spark_xrefs.ads: Minor comment update.
5187 2016-04-18 Johannes Kanig <kanig@adacore.com>
5189 * gnat1drv.adb (Gnat1drv): Force loading of System
5192 2016-04-18 Bob Duff <duff@adacore.com>
5194 * a-cuprqu.adb: Correction to previous change. If a new node
5195 is inserted at the front of the queue (because it is higher
5196 priority than the previous front node), we need to update
5197 Header.Next_Unequal -- not just in the case where the queue was
5200 2016-04-18 Bob Duff <duff@adacore.com>
5202 * a-cuprqu.ads: Change the representation of List_Type from a
5203 singly-linked list to a doubly-linked list. In addition, add a
5204 pointer Next_Unequal, which points past a possibly-long chain
5205 of equal-priority items. This increases efficiency, especially
5206 in the case of many equal-priority items.
5207 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
5208 advantage of new data structure.
5209 (Finalize): Rewrite in terms of Dequeue, for simplicity.
5211 2016-04-18 Yannick Moy <moy@adacore.com>
5213 * contracts.adb (Analyze_Object_Contract,
5214 Analyze_Protected_Contract): Remove tests performed in GNATprove.
5215 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
5216 Remove query for tests performed in GNATprove.
5218 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5220 * sem_aggr.adb (Resolve_Record_Aggregate): If
5221 Warn_On_Redundant_Constructs is enabled, report a redundant box
5222 association that does not cover any components, as it done for
5223 redundant others associations in case statements.
5225 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5227 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
5228 Analyze the generated Check pragma for an inherited condition so
5229 that it does not freeze the dispatching type of the primitive
5230 operation, because it is pre-analyzed at the point of the
5231 subprogram declaration (and not in the subprogram body, as is
5232 done during regular expansion).
5234 2016-04-18 Vincent Celier <celier@adacore.com>
5236 * ali.ads: Increase the range of all _Id types to 100 millions.
5238 2016-04-18 Gary Dismukes <dismukes@adacore.com>
5240 * sem_warn.adb (Check_References): Change warning to suggest
5241 using pragma Export rather than saying "volatile has no effect".
5243 2016-04-18 Bob Duff <duff@adacore.com>
5245 * g-souinf.ads (Compilation_ISO_Date): New function to return
5246 the current date in ISO form.
5247 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
5248 a call to Compilation_ISO_Date into a string literal containing
5249 the current date in ISO form.
5250 * exp_intr.ads (Add_Source_Info): Improve documentation.
5251 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
5252 Compilation_ISO_Date.
5253 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
5255 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5257 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
5258 to subtypes that are not first subtypes.
5260 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5262 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
5264 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
5265 generated pragmas after subprogram declaration, rather than in
5266 the corresponding subprogram body.
5267 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
5268 mode, if the operation is overridding, call
5269 Collect_Inherited_Class_Wide_Conditions to generate the
5270 corresponding pragmas immediately after the corresponding
5271 subprogram declaration.
5273 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5275 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
5276 type to natural numbers.
5277 (Stype): document code characters for concurrent entities.
5279 2016-04-18 Olivier Hainque <hainque@adacore.com>
5281 * targparm.ads: Update the Frontend_Exceptions default internal
5283 (Frontend_Exceptions_On_Target): Change default value to True.
5285 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5287 * sem_ch4.adb (Analyze_Selected_Component): Refine error
5288 detection when a selected component in the body of a synchronized
5289 type is a reference to an object of the same type declared
5290 elsewhere. The construct is legal if the prefix of the selected
5291 component includes an explicit dereference at any point.
5293 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5295 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
5296 internally generated expressions when trying to determine whether
5297 a formal parameter of a tagged type subject to Extensions_Visible
5298 False is used to initialize an object.
5299 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
5300 internally generated expressions when trying to determine whether
5301 a formal parameter of a tagged type subject to Extensions_Visible
5302 False is used in a type conversion.
5304 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5306 * sem_res.adb (Is_Protected_Operation_Call):
5307 Add guards to account for a non-decorated selected component.
5309 2016-04-18 Yannick Moy <moy@adacore.com>
5311 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
5312 implementation of Body_Has_SPARK_Mode_On.
5313 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
5314 New function replacing previous Get_SPARK_Mode_From_Pragma, that
5315 deals also with aspects.
5316 (Get_SPARK_Mode_Type): Make function internal again.
5317 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
5318 Get_SPARK_Mode_From_Annotation.
5320 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5322 * contracts.adb (Analyze_Object_Contract): Update references to
5324 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
5325 * ghost.adb Add with and use clauses for Sem_Disp.
5326 (Check_Ghost_Derivation): Removed.
5327 (Check_Ghost_Overriding):
5328 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
5329 (Check_Ghost_Primitive): New routine.
5330 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
5331 Update references to SPARK RM. (Is_OK_Pragma): Update references
5332 to SPARK RM. Predicates are now a valid context for references
5334 * ghost.ads (Check_Ghost_Derivation): Removed.
5335 (Check_Ghost_Overriding): Update the comment on usage.
5336 (Check_Ghost_Primitive): New routine.
5337 (Check_Ghost_Refinement): New routine.
5338 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
5339 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
5340 related to Ghost derivations
5341 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
5342 related to the convention-like behavior of pragma Ghost.
5343 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
5344 of a tagged type and its primitive agree.
5345 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
5346 RM. Move the verification of pragma Assertion_Policy Ghost
5347 to the proper place. Remove the now obsolete check related
5348 to Ghost derivations.
5349 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
5350 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
5352 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5354 * layout.adb: Fix more minor typos in comments.
5356 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5358 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
5360 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5362 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
5363 mode, collect inherited class-wide conditions to generate the
5364 corresponding pragmas.
5365 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
5366 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
5367 procedure for overriding subprograms, used to generate the pragmas
5368 corresponding to an inherited class- wide pre- or postcondition.
5369 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
5370 from contracts.adb (Replace_Condition_Entities): Subsidiary
5371 Build_Pragma_Check_Equivalent, to implement the proper semantics
5372 of inherited class-wide conditions, as given in AI12-0113.
5373 (Process_Class_Wide_Condition): Removed.
5374 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
5375 in contract of subprogram, to collect inherited class-wide
5377 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
5379 2016-04-18 Yannick Moy <moy@adacore.com>
5381 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
5382 * a-calend.ads (Ada.Calendar): Mark package spec as
5383 SPARK_Mode and add synchronous external abstract state Clock_Time.
5385 2016-04-18 Yannick Moy <moy@adacore.com>
5387 * sem_res.adb (Resolve_Call): Prevent inlining of
5388 calls inside expression functions. Factor previous code issuing
5389 errors to call Cannot_Inline instead, which does appropriate
5390 processing of message for GNATprove.
5392 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5394 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
5395 osint-b.adb: Cleanups.
5397 2016-04-18 Yannick Moy <moy@adacore.com>
5399 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
5400 body to inline in GNATprove mode when SPARK_Mode On applies to
5402 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
5405 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5407 * layout.adb: Fix minor typo in comment.
5408 * inline.adb: Fix minor pasto.
5409 * sem_ch12.ads: Fix minor typos in comments.
5411 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5413 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
5414 handle some complex cases of tag indeterminate calls that are
5415 actuals in other dispatching calls that are themselves tag
5417 (Check_Dispatching_Context): Add parameter to support recursive
5418 check for an enclosing construct that may provide a tag for a
5419 tag-indeterminate call.
5421 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5423 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
5424 Add global variables Task_Input_Seen and Task_Output_Seen.
5425 (Analyze_Global_Item): Detect an illegal use of the current
5426 instance of a single protected/task type in a global annotation.
5427 (Analyze_Input_Output): Inputs and output related to the current
5428 instance of a task unit are now tracked.
5429 (Check_Usage): Require
5430 the presence of the current instance of a task unit only when
5431 one input/output is available. (Current_Task_Instance_Seen):
5433 (Is_CCT_Instance): New parameter profile. Update
5434 the comment on usage. The routine now properly recognizes several
5435 cases related to single protected/task types.
5437 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
5439 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
5440 to create a brand new freeze node. This handles a case where an
5441 ignored Ghost context is freezing something which is not ignored
5442 Ghost and whose freeze node should not be removed from the tree.
5443 (New_Freeze_Node): New routine.
5445 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5447 * sigtramp.h (__gnat_set_is_vxsim) New function to
5448 tell sigtramp-vxworks to handle vxsim signal contexts. *
5449 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
5450 differences in the sigcontext structure between the expected
5451 regular x86 or x86_64 ones and the ones received in case of
5452 exexution on the vxworks simulator.
5453 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
5454 this information to sigtramp-vxworks.c. Remove the old mechanism for
5456 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
5458 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5460 * exp_ch3.adb (Inline_Init_Proc): New function returning
5461 whether the initialization procedure of a type should be
5462 inlined. Return again True for controlled type themselves.
5463 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
5464 (Build_Record_Init_Proc): Likewise.
5466 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5468 * gnatvsn.ads (Library_Version): Bump to 7.
5470 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5472 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
5473 on the entity of a subprogram declaration that is completed by
5474 an expression function.
5476 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5478 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
5479 declaration can appear in an aspect specification for a dynamic
5480 predicate, and a pragma for aspect Predicate_Failure.
5481 * exp_util.adb (Replace_Subtype_References): Replace current
5482 occurrences of the subtype to which a dynamic predicate applies,
5483 byt the expression that triggers a predicate check. Needed to
5484 implement new aspect Predicate_Failure.
5486 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5488 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
5489 * Makefile.rtl: update accordingly.
5491 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5493 * sem_type.adb (Disambiguate): Call Covers only when necessary
5494 for standard operators.
5496 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5498 * atree.ads (Num_Extension_Nodes): Add couple of figures
5500 * atree.adb: Add GNAT.Heap_Sort_G dependency.
5501 (Print_Statistics): New exported procedure to print statistics.
5503 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5505 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
5506 as to be inlined if the type needs finalization.
5508 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5510 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
5511 alignment for x86_64.
5512 * init.c: Better fix for guard page reset on x86_64-vx7.
5513 Do not try to retrieve the page that actually raised
5514 the signal as the probing mechanism used on x86_64 do not allow
5515 such retrieval. We thus just test if the guard page is active,
5516 and re-activate it if not.
5518 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5520 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
5523 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5525 * affinity.c: Use the proper type for task id.
5526 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
5528 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5530 * sem_prag.adb (Process_Convention): Relax rule on exporting
5531 Intrinsic types if Relaxed_RM_Semantics is True.
5533 2016-04-18 Vincent Celier <celier@adacore.com>
5535 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
5536 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
5537 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
5538 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
5539 exp_ch3.ads, exp_unst.adb: Change "descendent" to
5540 "descendant" in comments, error messages and identifiers.
5541 * gcc-interface/decl.c: Ditto.
5543 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5545 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
5546 New_S only once at the beginning of the function.
5548 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
5550 * gcc-interface/decl.c (components_to_record): Restrict the previous
5551 change to fields with variable size.
5553 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
5555 * gcc-interface/decl.c (components_to_record): Add special case for
5556 single field with representation clause at offset 0.
5558 2016-03-16 Svante Signell <svante.signell@gmail.com>
5560 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
5561 * s-osinte-gnu.ads: New file.
5563 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
5565 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
5566 (Stack_Check_Limits): Set to False.
5567 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
5568 (Stack_Check_Limits): Set to False.
5569 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
5570 (Stack_Check_Limits): Set to False.
5571 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
5572 (Stack_Check_Limits): Set to False.
5573 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
5574 (Stack_Check_Limits): Set to False.
5576 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
5578 * gcc-interface/trans.c (statement_node_p): New predicate.
5579 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
5580 not return dummy results for expressions attached to packed array
5581 implementation types.
5583 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
5585 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
5586 the expression of a renaming manually in case #3.
5588 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
5590 * system-linux-s390.ads: Enable Stack_Check_Probes.
5591 * system-linux-s390.ads: Likewise.
5593 2016-02-29 Martin Liska <mliska@suse.cz>
5595 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
5596 Replace ENABLE_CHECKING macro with flag_checking.
5598 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5600 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
5601 handling of unconstrained array types as designated types into common
5602 processing. Also handle array types as incomplete designated types.
5604 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5606 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
5607 ASIS mode, fully lay out the minimal record type.
5609 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5611 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
5612 (build_return_expr): Likewise.
5613 (Call_to_gnu): If this is a function call and there is no target,
5614 create a temporary for the return value for all aggregate types,
5615 but never create it for a return statement. Push a binding level
5616 around the call in more cases. Remove obsolete code.
5618 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5620 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
5621 * gcc-interface/gigi.h (gigi): Remove useless attribute.
5622 (gnat_gimplify_expr): Likewise.
5623 (gnat_to_gnu_external): Declare.
5624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
5625 code dealing with the expression of external constants into...
5626 Invoke gnat_to_gnu_external instead.
5627 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
5628 when not for a definition. Deal with COMPOUND_EXPR and variables with
5629 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
5630 'reference to a function call in a renaming. Remove obsolete test and
5631 adjust associated comment.
5632 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
5633 temporaries created to hold the return value, if any.
5634 (gnat_to_gnu_external): ...this. New function.
5635 * gcc-interface/utils.c (create_var_decl): Detect a constant created
5636 to hold 'reference to function call.
5637 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
5638 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
5640 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
5642 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
5643 the prefix denotes an entity which Has_Atomic_Components.
5644 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
5645 denotes an entity which Has_Atomic_Components.
5647 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
5649 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
5650 for fat pointer or scalar types.
5652 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
5654 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
5655 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
5656 Call maybe_character_value on the array bounds. Get to the base type
5657 of the index type and call maybe_debug_type on it.
5658 * gcc-interface/utils.c (finish_character_type): Add special treatment
5661 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
5663 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
5664 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
5666 2016-02-12 Jakub Jelinek <jakub@redhat.com>
5668 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
5669 neighbour -> neighbor.
5670 * prep.adb: Likewise.
5671 * prj.ads: Likewise.
5672 * prepcomp.adb: Likewise.
5673 * g-socket.ads: Likewise.
5674 * s-imgrea.adb: Likewise.
5675 * a-calend.adb: Likewise.
5676 * exp_disp.adb: Likewise.
5677 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
5678 * g-socket.adb: Likewise.
5679 * sem_ch12.adb: Likewise.
5680 * terminals.c: Likewise.
5682 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5684 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
5685 build_common_tree_nodes.
5687 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
5689 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
5690 DECL_IGNORED_P last.
5692 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
5694 * gcc-interface/gigi.h (enum attr_type): Rename into...
5695 (enum attrib_type): ...this.
5696 (struct attrib): Adjust.
5697 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
5699 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
5701 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
5702 literal if the entity is of a character type.
5703 * gcc-interface/lang.opt (fsigned-char): New option.
5704 * gcc-interface/misc.c (gnat_handle_option): Accept it.
5705 (gnat_init): Adjust comment.
5706 * gcc-interface/gigi.h (finish_character_type): New prototype.
5707 (maybe_character_type): New inline function.
5708 (maybe_character_value): Likewise.
5709 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
5710 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
5711 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
5712 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
5713 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
5714 Copy TYPE_STRING_FLAG from type to subtype.
5715 <E_Array_Type>: Deal with character index types.
5716 <E_Array_Subtype>: Likewise.
5717 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
5718 char_type_node throughout.
5719 (build_raise_check): Likewise.
5720 (get_type_length): Deal with character types.
5721 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
5723 <Attr_Pred>: Likewise.
5724 (Loop_Statement_to_gnu): Likewise.
5725 (Raise_Error_to_gnu): Likewise.
5726 <N_Indexed_Component>: Deal with character index types. Remove
5728 <N_Slice>: Likewise.
5729 <N_Type_Conversion>: Deal with character types. Minor tweak.
5730 <N_Unchecked_Type_Conversion>: Likewise.
5732 <N_Op_Eq>: Likewise.
5733 (emit_index_check): Delete.
5734 * gcc-interface/utils.c (finish_character_type): New function.
5735 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
5736 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
5737 with char_type_node.
5738 (build_call_raise): Likewise.
5739 (build_call_raise_column): Likewise.
5740 (build_call_raise_range): Likewise.
5742 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5744 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
5745 (build_call_raise_range): Likewise.
5746 (gnat_unsigned_type): Delete.
5747 (gnat_signed_type): Likewise.
5748 (gnat_signed_or_unsigned_type_for): New prototype.
5749 (gnat_unsigned_type_for): New inline function.
5750 (gnat_signed_type_for): Likewise.
5751 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
5752 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
5753 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
5754 and compute their base type from that.
5755 <E_Array_Subtype>: Remove duplicate declaration.
5756 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
5757 * gcc-interface/trans.c (get_type_length): Likewise.
5758 (Attribute_to_gnu): Likewise.
5759 (Loop_Statement_to_gnu): Likewise.
5760 (Call_to_gnu): Likewise.
5761 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
5762 and gnat_signed_type_for. Minor tweaks.
5763 (build_binary_op_trapv): Likewise.
5764 (emit_check): Likewise.
5765 (convert_with_check): Likewise.
5766 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
5767 functions. Minor tweaks.
5768 (Case_Statement_to_gnu): Remove dead code.
5769 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
5770 (init_code_table): Minor reordering.
5771 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
5772 (gnat_signed_type): Likewise.
5773 (gnat_signed_or_unsigned_type_for): New function.
5774 (unchecked_convert): Use directly the size in the test for precision
5775 vs size adjustments.
5776 (install_builtin_elementary_types): Call gnat_signed_type_for.
5777 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
5779 (build_goto_raise): New function taken from...
5780 (build_call_raise): ...here. Call it.
5781 (build_call_raise_column): Add KIND parameter and call it.
5782 (build_call_raise_range): Likewise.
5784 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5786 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
5787 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
5788 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
5789 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
5790 and tweak gnat_encodings tests throughout.
5791 (initial_value_needs_conversion): Likewise.
5792 (intrin_arglists_compatible_p): Likewise.
5793 * gcc-interface/misc.c (gnat_print_type): Likewise.
5794 (gnat_get_debug_type): Likewise.
5795 (gnat_get_fixed_point_type_info): Likewise.
5796 (gnat_get_array_descr_info): Likewise.
5797 (get_array_bit_stride): Likewise.
5798 (gnat_get_type_bias): Fix formatting.
5799 (enumerate_modes): Likewise.
5800 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
5801 (add_decl_expr): Simplify NULL_TREE test.
5802 (end_stmt_group): Likewise.
5803 (build_binary_op_trapv): Fix formatting.
5804 (get_exception_label): Use switch statement.
5805 (init_code_table): Move around.
5806 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
5807 (gnat_poplevel): Likewise.
5808 (gnat_set_type_context): Likewise.
5809 (defer_or_set_type_context): Fix formatting.
5810 (gnat_pushdecl): Simplify NULL_TREE test.
5811 (maybe_pad_type): Likewise.
5812 (add_parallel_type): Likewise.
5813 (create_range_type): Likewise.
5814 (process_deferred_decl_context): Likewise.
5815 (convert): Likewise.
5816 (def_builtin_1): Likewise.
5817 * gcc-interface/utils2.c (find_common_type): Likewise.
5818 (build_binary_op): Likewise.
5819 (gnat_rewrite_reference): Likewise.
5820 (get_inner_constant_reference): Likewise.
5822 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5825 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
5826 the parent function instead of the current function in order to issue
5827 the warning or the error. Add guard for ignored functions.
5829 2016-01-17 Jakub Jelinek <jakub@redhat.com>
5831 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
5833 2016-01-15 Jakub Jelinek <jakub@redhat.com>
5835 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
5836 of char * for path_val to avoid warnings.
5838 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
5840 * gcc-interface/utils.c: Bump copyright year.
5841 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
5842 the current lexical scope.
5844 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5846 * gnat_ugn.texi: Bump @copying's copyright year.
5847 * gnat_rm.texi: Likewise.
5849 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
5851 * gnatvsn.ads: Bump copyright year.
5854 Copyright (C) 2016 Free Software Foundation, Inc.
5856 Copying and distribution of this file, with or without modification,
5857 are permitted in any medium without royalty provided the copyright
5858 notice and this notice are preserved.