comparison gcc/ada/ChangeLog-2016 @ 111:04ced10e8804

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