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