]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog-2015
c++: Handle multiple aggregate overloads [PR95319].
[thirdparty/gcc.git] / gcc / ada / ChangeLog-2015
CommitLineData
783bfcce
EB
12015-12-20 Eric Botcazou <ebotcazou@adacore.com>
2
3 * gcc-interface/utils2.c (gnat_rewrite_reference) <REALPART_EXPR>: New
4 case identical to FLOAT_EXPR.
5 <IMAGPART_EXPR>: Likewise.
6
72015-12-20 Eric Botcazou <ebotcazou@adacore.com>
8
9 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: During
10 layout in type_annotate_only mode, skip discriminants of derived
11 tagged types renaming those of the parent type.
12 In type_annotate_only mode, if the type is tagged, do not override a
13 size clause but take into account the alignment of the tag.
14 (annotate_rep): In type_annotate_only mode, deal with discriminants
15 of derived tagged types renaming those of the parent type.
16
172015-12-20 Eric Botcazou <ebotcazou@adacore.com>
18
19 * gcc-interface/utils.c (maybe_pad_type): In type_annotate_only mode,
20 retrieve the component type if this is an array and do not issue the
21 warning for concurrent types.
22
232015-12-18 Eric Botcazou <ebotcazou@adacore.com>
24
25 * gcc-interface/ada-tree.h (TYPE_DEBUG_TYPE): Remove duplicate.
26
272015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
28
29 * gcc-interface/ada-tree.h
30 (TYPE_IMPLEMENTS_PACKED_ARRAY_P, TYPE_CAN_HAVE_DEBUG_TYPE_P,
31 TYPE_ORIGINAL_PACKED_ARRAY, SET_TYPE_ORIGINAL_PACKED_ARRAY): New
32 macros.
33 * gcc-interface/decl.c (add_parallel_type_for_packed_array):
34 Rename to associate_original_type_to_packed_array. When
35 -fgnat-encodings=minimal, set original packed array type as so
36 instead of as a parallel type to the implementation type. In
37 this case, also rename the implementation type to the name of
38 the original array type.
39 (gnat_to_gnu_entity): Update invocations to
40 add_parallel_type_for_packed_array. Tag ARRAY_TYPE nodes for
41 packed arrays with the TYPE_PACKED flag.
42 When -fgnat-encodings=minimal:
43 - strip ___XP suffixes in packed arrays' names;
44 - set the debug type for padding records around packed arrays
45 to the packed array;
46 - do not attach ___XUP types as parallel types of constrained
47 array types.
48 * gcc-interface/misc.c (gnat_print_type): Update to handle
49 orignal packed arrays.
50 (gnat_get_debug_type): Update to reject packed arrays
51 implementation types.
52 (get_array_bit_stride): New.
53 (gnat_get_array_descr_info): Add packed arrays handling.
54 * gcc-interface/utils.c (maybe_pad_type): When
55 -fgnat-encodings=minimal, set the name of the padding type to
56 the one of the original packed type, if any. Fix TYPE_DECL
57 peeling around the name of the input type.
58
592015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
60
61 * gcc-interface/misc.c (gnat_get_type_bias): New.
62 (LANG_HOOKS_GET_TYPE_BIAS): Redefine macro to implement the
63 get_type_bias language hook.
64
652015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
66
67 * gcc-interface/misc.c (gnat_get_array_descr_info): When the
68 array has more dimensions than the language hook can handle,
69 fall back to a nested arrays description. Handle context-less
70 array types.
71
722015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
73
74 * gcc-interface/decl.c (gnat_to_gnu_entity): When
75 -fgnat-encodings-minimal, do not add ___XUP/XUT suffixes to type
76 names and do not generate ___XA parallel types.
77 * gcc-interface/misc.c (gnat_get_array_descr_info): Match fat
78 and thin pointers and generate the corresponding array type
79 descriptions.
80
812015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
82
83 * gcc-interface/ada-tree.def (POWER_EXPR): New binary operation.
84 * gcc-interface/ada-tree.h (TYPE_FIXED_POINT_P): New macro.
85 (TYPE_IS_FIXED_POINT_P): New macro.
86 (TYPE_SCALE_FACTOR): New macro.
87 (SET_TYPE_SCALE_FACTOR): New macro.
88 * gcc-interface/decl.c: Include urealp.h
89 (gnat_to_gnu_entity): Attach trees to encode scale factors to
90 fixed-point types.
91 * gcc-interface/misc.c (gnat_print_type): Print scale factors
92 for fixed-point types.
93 (gnat_get_fixed_point_type_info): New.
94 (gnat_init_ts): Initialize data for the POWER_EXPR binary
95 operation.
96 (LANG_HOOKS_GET_FIXED_POINT_INFO): Redefine macro to implement
97 the get_fixed_point_type_info language hook.
98
992015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
100
101 * gcc-interface/ada-tree.h (struct lang_type): Rename the t
102 field as t1 and add a t2 one.
103 (get_lang_specific): New.
104 (GET_TYPE_LANG_SPECIFIC): Refactor to use get_lang_specific.
105 (SET_TYPE_LANG_SPECIFIC): Likewise.
106 (GET_TYPE_LANG_SPECIFIC2): New macro.
107 (SET_TYPE_LANG_SPECIFIC2): New macro.
108 (TYPE_DEBUG_TYPE): New macro.
109 (SET_TYPE_DEBUG_TYPE): New macro.
110 * gcc-interface/decl.c (gnat_to_gnu_entity): When
111 -fgnat-encodings=minimal, set padding types' debug type to the
112 padded one (i.e. strip ___PAD GNAT encodings) and set
113 constrained record subtypes's debug type to the base type.
114 * gcc-interface/misc.c (gnat_print_type): Print debug types.
115 (gnat_get_debug_type): New.
116 (gnat_get_array_descr_info): When -fgnat-encodings=minimal, set
117 a byte stride for arrays that contain a type whose debug type
118 has variable length.
119 (LANG_HOOKS_GET_DEBUG_TYPE): Redefine macro to implement the
120 debug type language hook.
121 * gcc-interface/utils.c (maybe_pad_type): When
122 -fgnat-encodings=minimal, set padding types' debug type to the
123 padded one. Restore XVZ variables creation when
124 -fgnat-encodings-minimal and use them to hold padding types'
125 byte size. For library-level padding types, share this variable
126 across translation units. Tag XVZ variables as artificial.
127
1282015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
129
130 * gcc-interface/decl.c (gnat_to_gnu_entity): Disable ___XVS GNAT
131 encodings when -fgnat-encodings=minimal.
132 (components_to_record): Disable ___XVE, ___XVN, ___XVU and
133 ___XVZ GNAT encodings when -fgnat-encodings=minimal.
134 * gcc-interface/utils.c (maybe_pad_type): Disable __XVS GNAT
135 encodings when -fgnat-encodings=minimal.
136
1372015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
138
139 * gcc-interface/misc.c (gnat_encodings): Undefine macro and
140 declare a global variable.
141 (gnat_post_options): Initialize this global from options.
142
1432015-12-10 Eric Botcazou <ebotcazou@adacore.com>
144
145 PR ada/48013
146 * gcc-interface/trans.c (empty_stmt_list_p): New predicate.
147 (gigi): Invoke it to compute the No_Elaboration_Code property.
148 (insert_code_for): Do not insert the code if it's empty.
149
1502015-12-10 Eric Botcazou <ebotcazou@adacore.com>
151
152 * gcc-interface/trans.c (Call_to_gnu): Remove guard for NULL_EXPR.
153 * gcc-interface/utils2.c (gnat_rewrite_reference) <ERROR_MARK>: Return
154 the reference unmodified.
155 <NULL_EXPR>: New case. Likewise.
156
1572015-12-10 Eric Botcazou <ebotcazou@adacore.com>
158
159 * gcc-interface/gigi.h (create_var_decl): Adjust comment.
160 (create_subprog_decl): Likewise.
161 * gcc-interface/utils.c (create_var_decl): Likewise.
162 (create_subprog_decl): Likewise.
163
1642015-12-10 Tom de Vries <tom@codesourcery.com>
165
166 PR ada/65102
167 * gnat-style.texi: Set nodefaultgnufreedocumentationlicensenode and
168 define @node GNU Free Documentation License locally.
169
1702015-12-09 Eric Botcazou <ebotcazou@adacore.com>
171
172 PR ada/66526
173 * g-expect.adb (Set_Up_Child_Communications): Add matching condition
174 for uses of Input, Ouput and Error variables after the Execvp call.
175
1762015-12-08 Jakub Jelinek <jakub@redhat.com>
177
178 PR c/48088
179 PR c/68657
180 * gcc-interface/trans.c (Pragma_to_gnu): Adjust control_warning_option
181 caller.
182
1832015-12-06 Piotr Trojanek <piotr.trojanek@gmail.com>
184
185 PR ada/60164
186 * doc/gnat_ugn/gnat_and_program_execution.rst (gnatmem): Fix typo.
187
1882015-12-06 Eric Botcazou <ebotcazou@adacore.com>
189
190 PR ada/50048
191 * gcc-interface/Makefile.in (INCLUDES): Use -iquote.
192
1932015-12-06 Eric Botcazou <ebotcazou@adacore.com>
194
195 PR ada/56274
196 * s-osinte-kfreebsd-gnu.ads (pthread_rwlock_t): New subtype.
197 (pthread_rwlockattr_t): Likewise.
198
1992015-12-06 Ludovic Brenta <ludovic@ludovic-brenta.org>
200
201 PR ada/49944
202 * s-osinte-freebsd.ads: Minor reformatting.
203 (Stack_Base_Available): Correct comments.
204 * s-osinte-kfreebsd-gnu.ads (Time_Slice_Supported, nanosleep,
205 clock_id_t, clock_gettime, Stack_Base_Available, Get_Page_Size,
206 mprotect, pthread_mutexattr_setprotocol,pthread_mutexattr_getprotocol
207 pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling,
208 pthread_attr_setscope, pthread_attr_getscope,
209 pthread_attr_setinheritsched, pthread_attr_getinheritsched,
210 Time_Slice_Supported): Copy from s-osinte-freebsd.ads.
211 * gcc-interface/Makefile.in (x86/kfreebsd): Use the POSIX version of
212 the System.Task_Primitives.Operations package.
213
2142015-12-06 Ludovic Brenta <ludovic@ludovic-brenta.org>
215
216 PR ada/49940
217 * s-osinte-kfreebsd-gnu.ads (lwp_self): New imported function.
218
2192015-12-01 Jan Sommer <soja-lists@aries.uberspace.de>
220
221 PR ada/68169
222 * s-oscons-tmplt.c: Generate pthread constants for RTEMS
223 * s-osinte-rtems.ads: Declare pthread structs as opaque types in Ada
224
2252015-12-01 Eric Botcazou <ebotcazou@adacore.com>
226
227 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Reorder.
228
2292015-11-30 Eric Botcazou <ebotcazou@adacore.com>
230
231 * gcc-interface/trans.c (gigi): Fix initialization order.
232
2332015-11-30 Eric Botcazou <ebotcazou@adacore.com>
234
235 * osint.adb: Add use type clause for CRTL.size_t.
236 (C_String_Length): Return CRTL.size_t instead of Integer.
237 (To_Path_String_Access): Take CRTL.size_t instead of Integer.
238 (Get_Libraries_From_Registry): Use CRTL throughout.
239 (To_Canonical_Dir_Spec): Use CRTL.size_t instead of Integer.
240 (To_Canonical_File_List): Likewise.
241 (To_Canonical_File_Spec): Likewise.
242 (To_Canonical_Path_Spec): Likewise.
243 (To_Host_Dir_Spec): Likewise.
244 (To_Host_File_Spec): Likewise.
245 (Update_Path): Use CRTL throughout.
246 * s-shasto.adb: Add with clause for System.CRTL.
247 (Initialize): Rename CRTL.strncpy instead of importing it manually.
248
2492015-11-30 Eric Botcazou <ebotcazou@adacore.com>
250
251 * gcc-interface/gigi.h (create_var_decl): Adjust prototype.
252 (create_subprog_decl): Likewise.
253 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Rename
254 static_p into static_flag and add volatile_flag local variable.
255 Do not locally change the type of a volatile object, except for the
256 pointed-to type if the object is handled by reference. Adjust calls
257 to create_var_decl.
258 <E_Subprogram_Type>: Likewise for const and noreturn subprograms.
259 (get_minimal_subprog_decl): Adjust call to create_subprog_decl.
260 (elaborate_expression_1): Adjust call to create_var_decl.
261 (gnat_to_gnu_field): Minor tweak.
262 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
263 create_subprog_decl.
264 (build_raise_check): Likewise.
265 (Subprogram_Body_to_gnu): Likewise.
266 (create_temporary): Likewise.
267 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
268 (Exception_Handler_to_gnu_gcc): Likewise.
269 (Compilation_Unit_to_gnu): Likewise.
270 (gnat_to_gnu): Likewise.
271 * gcc-interface/utils.c (maybe_pad_type): Likewise.
272 (create_var_decl): Add VOLATILE_FLAG parameter and handle it.
273 (create_subprog_decl): Add CONST_FLAG and VOLATILE_FLAG parameters and
274 handle them.
275
2762015-11-30 Eric Botcazou <ebotcazou@adacore.com>
277
278 * gcc-interface/gigi.h (is_simple_additive_expression): Declare.
279 * gcc-interface/trans.c (struct range_check_info_d): Add DISP and
280 NEG_P fields.
281 (find_loop_for): Add DISP and NEG_P parameters with default value.
282 Call is_simple_additive_expression to handle additive expressions.
283 (Loop_Statement_to_gnu): Deal with displacement in range checks.
284 (Raise_Error_to_gnu): Likewise.
285 (gnat_to_gnu): Add call to find_loop_for.
286 (is_simple_additive_expression): New function extracted from...
287 (gnat_invariant_expr): ...here. Call it on the expression.
288
2892015-11-30 Eric Botcazou <ebotcazou@adacore.com>
290
291 * gcc-interface/utils2.c (gnat_invariant_expr): Add type conversions.
292
2932015-11-30 Eric Botcazou <ebotcazou@adacore.com>
294
295 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): New macro.
296 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set PACKED to -2.
297 Remove obsolete code setting the alignment on some atomic types.
298 When the type has no alignment but needs strict alignment and has a
299 size clause, compute a maximum alignment and set it on the type.
300 (adjust_packed): Remove handling of -2 argument. Deal with TYPE_ALIGN
301 and TYPE_MAX_ALIGN directly.
302 (gnat_to_gnu_field): Do not document -2 as argument.
303 (components_to_record): Likewise.
304 * gcc-interface/utils.c (finish_record_type): Do not bump alignment of
305 the record type beyond TYPE_MAX_ALIGN. Reset the latter on exit.
306
307 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): Move around.
308 (GNATLIBCFLAGS_FOR_C): Reformat.
309 (GCC_CFLAGS): Delete.
310
3112015-11-29 Matthias Klose <doko@ubuntu.com>
312
313 PR ada/68564
314 * gcc-interface/Makefile.in: Fix powerpc/powerpc64* and
315 mipsel/mips64el bitness detection.
316 Merge the mipsel/mips64el definitions into one.
317
3182015-11-28 Matthias Klose <doko@ubuntu.com>
319
320 PR ada/68564
321 * gcc-interface/Makefile.in: Fix sparc/sparc64 bitness detection.
322
3232015-11-25 Arnaud Charlet <charlet@adacore.com>
324
325 * lib-xref-spark_specific.adb
326 (Add_SPARK_Scope): Take entry families into account.
327 * a-exetim.ads, a-exetim-default.ads, a-exetim-mingw.ads (Clock,
328 Clock_For_Interrupts): preconditions added.
329 * a-extiin.ads (Clock): preconditions added.
330 * par-ch3.adb (P_Declarative_Items): In case of misplaced
331 aspect specifications, ensure that flag Done is properly set to
332 continue parsing.
333
3342015-11-25 Arnaud Charlet <charlet@adacore.com>
335
336 * exp_util.adb (Remove_Side_Effects): Minimize extra temporaries
337 and use of 'Reference when needed.
338
3392015-11-25 Doug Rupp <rupp@adacore.com>
340
341 * sigtramp-vxworks-target.inc (__x86_64__): Restore context for the
342 sake of uniformity.
343 * init.c (__gnat_inum_to_ivec): Add some casting to avoid
344 warnings when sizeof(long) != sizeof(int)
345
3462015-11-25 Yannick Moy <moy@adacore.com>
347
348 * lib-xref-spark_specific.adb (SPARK_Entities): Add entries for
349 consideration.
350 (Add_SPARK_Scope): Take tasks into account.
351 (Detect_And_Add_SPARK_Scope): Take tasks into account.
352 (Enclosing_Subprogram_Or_Library_Package): Take tasks into account.
353
3542015-11-25 Bob Duff <duff@adacore.com>
355
356 * sem_elab.adb (Check_Internal_Call_Continue): Code clean ups.
357
3582015-11-25 Eric Botcazou <ebotcazou@adacore.com>
359
360 * sem_util.ads (Has_Compatible_Alignment): Add Layout_Done
361 parameter.
362 * sem_util.adb (Has_Compatible_Alignment): Likewise.
363 (Has_Compatible_Alignment_Internal): Likewise. Do not set the
364 result to Unknown for packed types if Layout_Done is true.
365 * checks.adb (Apply_Address_Clause_Check): Adjust call and
366 pass False to Has_Compatible_Alignment.
367 * sem_ch13.adb (Validate_Address_Clauses): Likewise but pass True.
368
3692015-11-25 Vincent Celier <celier@adacore.com>
370
371 * gnatcmd.adb: When <target>-gnat is called with switch -P
372 and a GPR tool is invoked, invoke the GPR tool with switch
373 --target=<target>.
374
3752015-11-25 Hristian Kirtchev <kirtchev@adacore.com>
376
377 * opt.adb, bcheck.adb: Minor reformatting.
378
3792015-11-25 Jerome Lambourg <lambourg@adacore.com>
380
381 * init.c: Enable the signal trampoline on x86_64-vx7
382 * sigtramp-vxworks-target.inc: Implement the signal trampoline
383 for x86_64
384 * tracebak.c: Remove the hook to use the generic
385 unwinder on x86_64-vx7.
386
3872015-11-25 Vincent Celier <celier@adacore.com>
388
389 * gnatcmd.adb: When "gnat name -P" is called, invoke gprname
390 directly if available.
391
3922015-11-25 Tristan Gingold <gingold@adacore.com>
393
394 * init.c (__gnat_is_stack_guard): Do not use mach calls for
395 IOS simulator.
396
3972015-11-24 Pierre-Marie de Rodat <derodat@adacore.com>
398
399 * gcc-interface/utils.c (gnat_write_global_declarations): Output
400 debugging information for top-level imported declarations.
401
4022015-11-24 Gary Dismukes <dismukes@adacore.com>
403
404 * sem_ch3.adb, sem_type.adb, sem_ch7.adb, sem_ch9.adb, checks.adb,
405 sem_prag.adb, contracts.adb, g-strhas.ads, sem_ch6.adb: Minor
406 reformatting, rewording, and typo corrections.
407
4082015-11-24 Eric Botcazou <ebotcazou@adacore.com>
409
410 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
411 ASIS mode, do a minimal translation for root types with discriminants.
412 * gcc-interface/trans.c (gnat_to_gnu) <N_Subunit>: Move around.
413 <N_Entry_Body, N_Protected_Body, N_Task_Body>: Likewise. In ASIS mode,
414 process the declarations attached to the body.
415
4162015-11-24 Eric Botcazou <ebotcazou@adacore.com>
417
418 * gcc-interface/trans.c (gnat_to_gnu): In type_annotate_only mode, do
419 not build a NULL_EXPR for an N_Expanded_Name.
420
4212015-11-24 Eric Botcazou <ebotcazou@adacore.com>
422
423 * gcc-interface/decl.c (is_cplusplus_method): Check that the type of
424 the first parameter (indirectly) has C++ convention too.
425
4262015-11-23 Olivier Hainque <hainque@adacore.com>
427
428 * system-aix.ads: Add Frontend_Exceptions flag.
429 * system-aix64.ads: Likewise.
430 * system-darwin-ppc.ads: Likewise.
431 * system-darwin-ppc64.ads: Likewise.
432 * system-darwin-x86.ads: Likewise.
433 * system-darwin-x86_64.ads: Likewise.
434 * system-dragonfly-x86_64.ads: Likewise.
435 * system-freebsd-x86.ads: Likewise.
436 * system-freebsd-x86_64.ads: Likewise.
437 * system-hpux-ia64.ads: Likewise.
438 * system-hpux.ads: Likewise.
439 * system-linux-alpha.ads: Likewise.
440 * system-linux-armeb.ads: Likewise.
441 * system-linux-armel.ads: Likewise.
442 * system-linux-hppa.ads: Likewise.
443 * system-linux-ia64.ads: Likewise.
444 * system-linux-mips.ads: Likewise.
445 * system-linux-mips64el.ads: Likewise.
446 * system-linux-mipsel.ads: Likewise.
447 * system-linux-ppc.ads: Likewise.
448 * system-linux-ppc64.ads: Likewise.
449 * system-linux-s390.ads: Likewise.
450 * system-linux-s390x.ads: Likewise.
451 * system-linux-sh4.ads: Likewise.
452 * system-linux-sparc.ads: Likewise.
453 * system-linux-sparcv9.ads: Likewise.
454 * system-linux-x86.ads: Likewise.
455 * system-linux-x86_64.ads: Likewise.
456 * system-mingw-x86_64.ads: Likewise.
457 * system-mingw.ads: Likewise.
458 * system-rtems.ads: Likewise.
459 * system-solaris-sparc.ads: Likewise.
460 * system-solaris-sparcv9.ads: Likewise.
461 * system-solaris-x86.ads: Likewise.
462 * system-solaris-x86_64.ads: Likewise.
463 * system-vxworks-arm.ads: Likewise.
464 * system-vxworks-m68k.ads: Likewise.
465 * system-vxworks-mips.ads: Likewise.
466 * system-vxworks-ppc.ads: Likewise.
467 * system-vxworks-sparcv9.ads: Likewise.
468 * system-vxworks-x86.ads: Likewise.
469 * system.ads: Likewise.
470
4712015-11-23 Olivier Hainque <hainque@adacore.com>
472 Eric Botcazou <botcazou@adacore.com>
473
474 * opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ,
475 Back_End_SJLJ and Back_End_ZCX.
476 (Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions,
477 SJLJ_Exceptions): New functions, reflecting properties of the current
478 Exception_Mechanism.
479 * opt.adb: Implement the new functions.
480 * fe.h: Bind the new Exception_Mechanism and helper functions for gigi.
481
482 * exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by
483 use of property helper and update comments.
484 (Expand_Exception_Handlers): Replace tests on mechanism by use of
485 helper. Restrict Abort_Defer to ZCX specifically.
486 * exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on
487 mechanism by calls to helper functions. Abort_Undefer for ZCX only,
488 paired with Expand_Exception_Handlers.
489 * exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism
490 by calls to helper functions. Abort_Undefer for ZCX only, paired with
491 Expand_Exception_Handlers.
492
493 * lib-writ.ads (P line documentation): Add entry for "FX",
494 representative of unit compiled with Frontend_Exceptions True.
495 * lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if
496 compiled with Frontend_Exceptions True.
497
498 * ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect
499 whether the ALI file contained an "FX" indication on the P line.
500 (Frontend_Exceptions_Specified): New boolean, to keep track of whether
501 at least an FX ALI file is in the closure.
502 * ali.adb (Scan_ALI): Handle "FX" on the P line.
503 (Initialize_ALI): Initialize Frontend_Exceptions_Specified to False.
504
505 * targparm.ads: Update desription of exception schemes.
506 (Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions
507 set to True in system.ads, or not set at all.
508 * targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions.
509 Rename ZCD to ZCX for consistency.
510 (FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly.
511
512 * gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism
513 setting, now from combination of Frontend_Exceptions and ZCX_By_Default.
514
515 * bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename
516 as ...
517 (Check_Consistent_Exception_Handling): Check consistency of both
518 ZCX_By_Default and Frontend_Exceptions.
519 (Check_Configuration_Consistency): Check_Consistent_Exception_Handling
520 if either flag was set at least once.
521
522 * make.adb (Check): Remove processing of a possible -fsjlj coming from
523 lang-specs.h.
524 * gnatlink.adb (Gnatlin): Likewise.
525
526 * gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set
527 both ZCX_By_Default and Frontend_Exceptions.
528 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable):
529 Use eh property helper to test for back-end exceptions. Adjust
530 mechanism name when testing for front-end sjlj.
531 (case E_Procedure): Likewise.
532 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
533 Likewise, and rename local variables.
534 (Exception_Handler_to_gnu_sjlj): Rename as
535 Exception_Handler_to_gnu_fe_sjlj.
536 (Exception_Handler_to_gnu_zcx): Rename as
537 Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms
538 to use property helpers or correct mechanism name.
539
5402015-11-19 Bob Duff <duff@adacore.com>
541
542 * sem_elab.adb (Check_Internal_Call_Continue): Correction to previous
543 change: correctly handle generic formals/actuals that look like
544 renamings.
545
5462015-11-18 Eric Botcazou <ebotcazou@adacore.com>
547
548 * gcc-interface/trans.c (elaborate_all_entities_for_package): New
549 function extracted from... Recurse on packages.
550 (elaborate_all_entities): ...here. Call it on packages.
551
5522015-11-18 Eric Botcazou <ebotcazou@adacore.com>
553
554 * gcc-interface/ada-tree.h (DECL_INVARIANT_P): New macro.
555 * gcc-interface/gigi.h (enum standard_datatypes): Remove
556 ADT_longjmp_decl and add ADT_not_handled_by_others_decl.
557 (longjmp_decl): Delete.
558 (not_handled_by_others_decl): New macro.
559 (build_simple_component_ref): Delete.
560 (build_component_ref): Adjust prototype.
561 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to
562 build_component_ref.
563 (gnat_to_gnu_field): Set DECL_INVARIANT_P on discriminants
564 without default value.
565 * gcc-interface/trans.c (gigi): Reorder initialization sequence
566 and add not_handled_by_others_decl.
567 (Attribute_to_gnu): Adjust calls to build_component_ref.
568 (Subprogram_Body_to_gnu): Likewise.
569 (Call_to_gnu): Likewise.
570 (Exception_Handler_to_gnu_sjlj): Likewise.
571 (gnat_to_gnu): Likewise.
572 (range_check_info_d): Add inserted_cond field.
573 (Loop_Statement_to_gnu): Make two passes on the recorded range checks.
574 (build_noreturn_cond): New static function.
575 (Raise_Error_to_gnu): Record range checks in loops at -O1 and above.
576 (make_invariant): New static function.
577 (Loop_Statement_to_gnu): Use it to compute invariant expressions for
578 the loop bounds if possible, but do not require it if loop unswitching
579 is enabled.
580 * gcc-interface/utils.c (convert_to_fat_pointer): Likewise.
581 (convert): Likewise.
582 (maybe_unconstrained_array): Likewise. Call it instead of
583 build_simple_component_ref and add guard for CONSTRUCTORs.
584 (unchecked_convert): Likewise.
585 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
586 (build_simple_component_ref): Remove COMPONENT parameter, unify
587 code dealing with VIEW_CONVERT_EXPR and make it more general,
588 remove special treatment for CONSTRUCTORs of template types.
589 (build_component_ref): Remove COMPONENT parameter and adjust call
590 to build_simple_component_ref.
591 (maybe_wrap_malloc): Likewise.
592 (build_allocator): Likewise.
593 (gnat_invariant_expr): Look through overflow checks, deal with
594 addition and subtraction of constants and take into account
595 DECL_INVARIANT_P for the COMPONENT_REF case.
596
5972015-11-18 Eric Botcazou <ebotcazou@adacore.com>
598
599 * gcc-interface/misc.c: Move global variables to the top of the file.
600 (gnat_handle_option): Remove obsolete ATTRIBUTE_UNUSED markers.
601 (gnat_init_options): Minor tweak.
602 (gnat_post_options): Set -fstrict-overflow if not done by the user.
603 (internal_error_function): Minor reformatting.
604
6052015-11-18 Eric Botcazou <ebotcazou@adacore.com>
606
607 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use case #1
608 for the renaming of an address.
609
6102015-11-18 Eric Botcazou <ebotcazou@adacore.com>
611
612 * gcc-interface/trans.c (fold_constant_decl_in_expr) <ARRAY_REF>: If
613 the index is not itself constant then bail out.
614
6152015-11-18 Ed Schonberg <schonberg@adacore.com>
616
617 * sem_ch4.adb (Try_Container_Indexing): When constructing the
618 parameter list for the potentially overloaded calls to indexing
619 functions, do not propagate overloadings if the actual is a named
620 association: overloadings appear directly on the expression in
621 the association.
622
6232015-11-18 Ed Schonberg <schonberg@adacore.com>
624
625 * sem_type.adb (Interface_Present_In_Ancestor): If the type is
626 incomplete, the list of ancestors is found either on the full
627 view or the non-limited view of the type.
628
6292015-11-18 Nicolas Roche <roche@adacore.com>
630
631 * sysdep.c (__gnat_localtime_tzoff): On Windows platform
632 GetTimeZoneInformation function is thread-safe. Thus there
633 is no need to lock the runtime in the implementation of
634 __gnat_localtime_tzoff on that platform.
635
6362015-11-18 Eric Botcazou <ebotcazou@adacore.com>
637
638 * s-arit64.adb (To_Neg_Int): Add a special case for 2**63 input.
639
6402015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
641
642 * contracts.adb (Analyze_Contracts): New routine.
643 (Analyze_Enclosing_Package_Body_Contract): Removed.
644 (Analyze_Entry_Or_Subprogram_Contract): Add formal parameter
645 Freeze_Id. Propagate the entity of the freezing body to vaious
646 analysis routines.
647 (Analyze_Initial_Declaration_Contract): Removed.
648 (Analyze_Object_Contract): Add formal parameter
649 Freeze_Id. Propagate the entity of the freezing body to vaious
650 analysis routines.
651 (Analyze_Previous_Contracts): New routine.
652 * contracts.ads (Analyze_Enclosing_Package_Body_Contract): Removed.
653 (Analyze_Contracts): New routine.
654 (Analyze_Entry_Or_Subprogram_Contract): Add formal
655 parameter Freeze_Id and update the comment on usage.
656 (Analyze_Initial_Declaration_Contract): Removed.
657 (Analyze_Object_Contract): Add formal parameter Freeze_Id and
658 update the comment on usage.
659 (Analyze_Previous_Contracts): New routine.
660 * sem_ch3.adb (Analyze_Declarations): Use Analyze_Contracts to
661 analyze all contracts of eligible constructs.
662 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
663 A body no longer freezes the contract of its initial
664 declaration. This effect is achieved through different means.
665 (Analyze_Subprogram_Body_Helper): A body now freezes the contracts
666 of all eligible constructs that precede it. A body no longer
667 freezes the contract of its initial declaration. This effect is
668 achieved through different means.
669 * sem_ch7.adb (Analyze_Package_Body_Helper): A body now freezes
670 the contracts of all eligible constructs that precede it. A body
671 no longer freezes the contract of its initial declaration. This
672 effect is achieved through different means.
673 * sem_ch9.adb (Analyze_Entry_Body): A body now freezes
674 the contracts of all eligible constructs that precede
675 it. A body no longer freezes the contract of its initial
676 declaration. This effect is achieved through different means.
677 (Analyze_Protected_Body): A body now freezes the contracts
678 of all eligible constructs that precede it. A body no longer
679 freezes the contract of its initial declaration. This effect
680 is achieved through different means.
681 (Analyze_Task_Body): A
682 body now freezes the contracts of all eligible constructs that
683 precede it. A body no longer freezes the contract of its initial
684 declaration. This effect is achieved through different means.
685 * sem_prag.adb (Add_Item_To_Name_Buffer): Single protected/task
686 objects now output their respective current instance of xxx
687 type messages. (Analyze_Contract_Cases_In_Decl_Part): Add
688 formal parameter Freeze_Id. Emit a clarification message
689 when an undefined entity may the byproduct of contract
690 freezing.
691 (Analyze_Part_Of_In_Decl_Part): Add formal
692 parameter Freeze_Id. Emit a clarification message when an
693 undefined entity may the byproduct of contract freezing.
694 (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal
695 parameter Freeze_Id. Emit a clarification message when an
696 undefined entity may the byproduct of contract freezing.
697 (Analyze_Refined_State_In_Decl_Part): Do not report unused body
698 states as constituents of single protected/task types may not
699 bave been identified yet.
700 (Collect_Subprogram_Inputs_Outputs):
701 Reimplemented. (Contract_Freeze_Error): New routine.
702 (Process_Overloadable): Use predicate Is_Single_Task_Object.
703 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part):
704 Add formal parameter Freeze_Id and update the comment
705 on usage.
706 (Analyze_Part_Of_In_Decl_Part): Add formal
707 parameter Freeze_Id and update the comment on usage.
708 (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal parameter
709 Freeze_Id and update the comment on usage.
710 * sem_util.adb (Check_Unused_Body_States): Remove global
711 variable Legal_Constits. The routine now reports unused
712 body states regardless of whether constituents are
713 legal or not.
714 (Collect_Body_States): A constituent of a
715 single protected/task type is not a visible state of a
716 package body.
717 (Collect_Visible_States): A constituent
718 of a single protected/task type is not a visible
719 state of a package body.
720 (Has_Undefined_Reference): New routine.
721 (Is_Single_Concurrent_Object): Reimplemented.
722 (Is_Single_Protected_Object): New routine.
723 (Is_Single_Task_Object): New routine.
724 (Is_Visible_Object): New routine.
725 (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
726 * sem_util.ads (Check_Unused_Body_States): Update the comment on usage.
727 (Has_Undefined_Reference): New routine.
728 (Is_Single_Protected_Object): New routine.
729 (Is_Single_Task_Object): New routine.
730 (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
731
7322015-11-18 Pierre-Marie de Rodat <derodat@adacore.com>
733
734 * Makefile.rtl, impunit.adb: Add g-strhas.ads.
735 * g-strhas.ads: New file.
736 * s-strhas.ads: Add a comment to redirect users to g-strhas.ads.
737
7382015-11-18 Bob Duff <duff@adacore.com>
739
740 * sem_elab.adb (Check_Internal_Call_Continue): Fix the case
741 where the call in question is to a renaming of a subprogram that
742 can be safely called without ABE.
743 * checks.adb: Minor edits.
744
7452015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
746
747 * atree.adb (Elist11): New routine.
748 (Set_Elist11): New routine.
749 * atree.ads (Elist11): New routine.
750 (Set_Elist11): New routine.
751 * atree.h: Define Elist11.
752 * contracts.adb (Analyze_Object_Contract): Verify the legality
753 of all references to a variable given that the variable is a
754 constituent of a single protected/task type.
755 * einfo.adb: Part_Of_References now utilizes Elist11.
756 (Part_Of_References): New routine.
757 (Set_Part_Of_References): New routine.
758 (Write_Field11_Name): Add output for Part_Of_References.
759 * einfo.ads New attribute Part_Of_References along with usage
760 in entities.
761 (Part_Of_References): New routine along with
762 pragma Inline.
763 (Set_Part_Of_References): New routine along with pragma Inline.
764 * sem_prag.adb (Analyze_Constituent): Record a possible
765 reference to a concurrent constituent.
766 (Analyze_Global_Item): Record a possible reference to a concurrent
767 constituent.
768 (Analyze_Input_Output): Record a possible reference to a
769 concurrent constituent.
770 * sem_res.adb (Resolve_Entity_Name): Record a possible reference
771 to a concurrent constituent.
772 * sem_util.adb (Check_Part_Of_Reference): New routine.
773 (Record_Possible_Part_Of_Reference): New routine.
774 * sem_util.ads (Check_Part_Of_Reference): New routine.
775 (Record_Possible_Part_Of_Reference): New routine.
776
7772015-11-18 Ed Schonberg <schonberg@adacore.com>
778
779 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
780 An if_expression is the proper place to apply the overflow
781 minimization procedure if its context is not an enclosing
782 arithmetic expression.
783
7842015-11-18 Arnaud Charlet <charlet@adacore.com>
785
786 * gnat_ugn/gnat_project_manager.rst,
787 gnat_ugn/building_executable_programs_with_gnat.rst,
788 gnat_ugn/gnat_and_program_execution.rst,
789 gnat_ugn/the_gnat_compilation_model.rst,
790 gnat_rm/implementation_defined_pragmas.rst,
791 gnat_rm/standard_and_implementation_defined_restrictions.rst,
792 gnat_ugn.texi, gnat_rm.texi: Update doc.
793
7942015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
795
796 * contracts.adb (Add_Contract_Item): Chain pragmas Attach_Handler
797 and Interrupt_Handler on the classifications list of a [generic]
798 procedure N_Contract node.
799 * contracts.ads (Add_Contract_Item): Update the comment on usage.
800 * einfo.adb (Get_Pragma): Pragmas Attach_Handler and
801 Interrupt_Handler are found on the classifications list of
802 N_Contract nodes.
803 * einfo.ads (Get_Pragma): Update the comment on usage.
804 * sem_prag.adb (Process_Interrupt_Or_Attach_Handler): Code
805 reformatting. Store the pragma as a contract item.
806
8072015-11-18 Ed Schonberg <schonberg@adacore.com>
808
809 * sem_ch8.adb (Available_Subtype): Use only in GNATprove
810 mode. When generating code it may be necessary to create itypes
811 at the point of use of a selected component, for example in the
812 expansion of a record equality operation.
813
8142015-11-18 Vincent Celier <celier@adacore.com>
815
816 * s-os_lib.adb (Normalize_Pathname.Get_Directory): When
817 invoking Normalize_Pathname, use the same values for parameters
818 Resolve_Links and Case_Sensitive as the parent Normalize_Pathname.
819
8202015-11-18 Vincent Celier <celier@adacore.com>
821
822 * a-direct.adb (Containing_Directory): Return "." when the result
823 is the current directory, not specified as an absolute path name.
824
8252015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
826
827 * exp_aggr.adb (Is_Completely_Hidden_Discriminant): New routine.
828 (Init_Hidden_Discriminants): Code reformatting. Do not initialize
829 a completely hidden discriminant.
830 * a-interr.ads (Get_CPU): Added SPARK_Mode, Volatile_Function
831 and Global aspects on the function.
832
8332015-11-18 Ed Schonberg <schonberg@adacore.com>
834
835 * exp_intr.adb (Expand_Unc_Deallocation): If the designated
836 type is a concurrent type, the deallocation applies to the
837 corresponding record type, or to its class-wide type if the type
838 is tagged.
839
8402015-11-18 Doug Rupp <rupp@adacore.com>
841
842 * s-parame-vxworks.adb: Reduce default stack size for stack
843 limit check to a reasonable value
844 * s-tpopsp-vxworks.adb: Make Stack_Limit a task variable for vx5 and
845 vxmils.
846
8472015-11-18 Ed Schonberg <schonberg@adacore.com>
848
849 * sem_ch5.adb (Analyze_Assignment): Diagnose assignment where
850 left-hand side has a limited view of a class-wide type.
851 * sem_ch6.adb (Detected_And_Exchange): Do not install a non-limited
852 view if the scope of the type of the formal is visible through
853 a limited_with_clause, even if the non-limited view is available.
854
8552015-11-18 Emmanuel Briot <briot@adacore.com>
856
857 * s-pooglo.ads: Make Global_Pool_Object aliased.
858
8592015-11-18 Ed Schonberg <schonberg@adacore.com>
860
861 * sem_attr.adb (Analyze_Attribute, case 'Access): If the prefix
862 is an expression function, do not analyze the generated body if
863 the current scope is not the scope of the expression function,
864 as may happen if the attribute is an actual in an instantiation.
865 * sem_ch10.adb, sem_ch12.adb, a-stzmap.adb, s-soflin.adb,
866 a-stwima.adb: Fix typos.
867
8682015-11-18 Arnaud Charlet <charlet@adacore.com>
869
870 * exp_ch11.adb (Expand_N_Exception_Declaration): No-op when
871 generating C code.
872
8732015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
874
875 PR ada/66242
876 * exp_ch3.adb (Default_Initialize_Object): Reimplemented. Abort
877 defer / undefer pairs are now encapsulated in a block with
878 an AT END handler. Partial finalization now takes restriction
879 No_Exception_Propagation into account when generating blocks.
880 * exp_ch7.adb Various reformattings.
881 (Create_Finalizer): Change
882 the generation of abort defer / undefer pairs and explain the
883 lack of an AT END handler.
884 (Process_Transient_Objects): Add generation of abort defer/undefer
885 pairs.
886 * exp_ch9.adb Various reformattings.
887 (Build_Protected_Subprogram_Body): Use
888 Build_Runtime_Call to construct a call to Abort_Defer.
889 (Build_Protected_Subprogram_Call_Cleanup): Use
890 Build_Runtime_Call to construct a call to Abort_Undefer.
891 (Expand_N_Asynchronous_Select): Use Build_Runtime_Call to
892 construct a call to Abort_Defer.
893 * exp_intr.adb (Expand_Unc_Deallocation): Abort defer
894 / undefer pairs are now encapsulated in a block with
895 an AT END handler. Finalization now takes restriction
896 No_Exception_Propagation into account when generating blocks.
897 * exp_util.ads, exp_util.adb (Wrap_Cleanup_Procedure): Removed.
898
8992015-11-18 Vincent Celier <celier@adacore.com>
900
901 * g-comlin.adb (Find_Longest_Matching_Switch): Do not take into
902 account a switch ending with '=' when the actual command line
903 switch is not followed with a space or '='.
904
9052015-11-18 Ed Schonberg <schonberg@adacore.com>
906
907 * sem_res.adb (Resolve_Explicit_Dereference): Do not add an access
908 check if the type of the prefix is known to exclude null.
909 * a-coinve.adb (Get_Element_Access): The function returns an
910 access type that excludes null, so add an explicit check for
911 a null element pointer, which is created when Insert_Spaces is
912 called on an indefinite vector container.
913
9142015-11-18 Arnaud Charlet <charlet@adacore.com>
915
916 * switch-c.adb (Scan_Front_End_Switches): Add a check requiring
917 -gnatc with -gnateg.
918
9192015-11-18 Ed Schonberg <schonberg@adacore.com>
920
921 * sem_ch7.adb (Uninstall_Declarations): Before swapping private
922 and full views, ensure that the potential use visbility of the
923 two views is consistent.
924
9252015-11-18 Doug Rupp <rupp@adacore.com>
926
927 * s-parame-vxworks.adb: Increase default stack size for targets
928 using stack limit checking.
929
9302015-11-18 Jose Ruiz <ruiz@adacore.com>
931
932 * a-interr.adb, a-interr.ads (Ada.Interrupts.Get_CPU): Add this
933 function that was added to Ada 2005 returning the processor where
934 interrupt handlers execute.
935
9362015-11-18 Tristan Gingold <gingold@adacore.com>
937
938 * exp_ch9.adb (Is_Pure_Barrier): Handle expanded component
939 declaration of a protected definition.
940
9412015-11-18 Ed Falis <falis@adacore.com>
942
943 * s-soflin.adb, s-stchop-vxworks.adb: Code clean ups.
944
9452015-11-18 Gary Dismukes <dismukes@adacore.com>
946
947 * bcheck.adb: Minor editorial changes.
948
9492015-11-18 Arnaud Charlet <charlet@adacore.com>
950
951 * interfac.ads (Unsigned_24): New type.
952 * sem_ch13.adb (Validate_Unchecked_Conversion): Disable error on
953 unconstrained arrays in Relaxed_RM_Semantics mode.
954
9552015-11-18 Vincent Celier <celier@adacore.com>
956
957 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking): No
958 warning is withed unit is the interface of a Stand-Alone Library.
959
9602015-11-18 Thomas Quinot <quinot@adacore.com>
961
962 * s-os_lib.ads, s-os_lib.adb(Normalize_Pathname): Support the case of
963 an unresolved Directory argument, by recursively resolving it
964 against the current dir.
965
9662015-11-18 Ed Schonberg <schonberg@adacore.com>
967
968 * sem_ch6.adb (Process_Formals): A function declaration that
969 returns a class-wide type must have freeing deferred, so that it
970 is not frozen before the class-wide type and its root type are
971 frozen. This is significant when there may be a limited view of
972 the class_wide type in another package.
973
9742015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
975
976 * einfo.adb (Has_Non_Null_Refinement): Rename to
977 Has_Non_Null_Visible_Refinement.
978 (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement.
979 * einfo.ads Update the documentation of
980 attribute Has_Non_Null_Refinement and attribute Has_Null_Refinement.
981 (Has_Non_Null_Refinement): Rename to Has_Non_Null_Visible_Refinement
982 and update occurrences in entities.
983 (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement and update
984 occurrences in entities.
985 * sem_prag.adb (Check_In_Out_States): Update the calls to
986 Has_[Non_]Null_Refinement.
987 (Check_Input_States): Update the
988 calls to Has_[Non_]Null_Refinement.
989 (Check_Output_States): Update the calls to Has_[Non_]Null_Refinement.
990 (Check_Proof_In_States): Update the calls to Has_[Non_]Null_Refinement.
991 (Collect_Global_Item): Update the calls to Has_[Non_]Null_Refinement.
992 (Is_Null_Refined_State): Update the calls to Has_[Non_]Null_Refinement.
993 (Match_Item): Update the calls to Has_[Non_]Null_Refinement.
994 * sem_util.adb (Has_Non_Null_Refinement): New routine.
995 (Has_Null_Refinement): New routine.
996 * sem_util.ads (Has_Non_Null_Refinement): New routine.
997 (Has_Null_Refinement): New routine.
998
9992015-11-18 Gary Dismukes <dismukes@adacore.com>
1000
1001 * exp_util.adb: Minor reformatting and typo fixes.
1002
10032015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
1004
1005 * sem_ch4.adb: Minor reformatting.
1006
10072015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
1008
1009 * exp_util.adb (Expand_Subtype_From_Expr): Add new formal
1010 parameter Related_Id and propagate it to Make_Subtype_From_Expr.
1011 (Make_Subtype_From_Expr): Add new formal parameter
1012 Related_Id. Create external entities when requested by the caller.
1013 * exp_util.ads (Expand_Subtype_From_Expr): Add new formal
1014 parameter Related_Id. Update the comment on usage.
1015 (Make_Subtype_From_Expr): Add new formal parameter
1016 Related_Id. Update the comment on usage.
1017 * sem_ch3.adb (Analyze_Object_Declaration): Add local variable
1018 Related_Id. Generate an external constrained subtype when the
1019 object is a public symbol.
1020
10212015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
1022
1023 * sem_prag.adb (Analyze_Pragma): Update the grammars of pragmas
1024 Abstract_State, Depends, Global, Initializes, Refined_Depends,
1025 Refined_Global and Refined_State.
1026
10272015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
1028
1029 * sem_util.adb (Has_Full_Default_Initialization):
1030 Perform the test for the presence of pragma
1031 Default_Initial_Condition prior to the specialized type
1032 checks. Add a missing case where the lack of a pragma argument
1033 yields full default initialization.
1034
10352015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
1036
1037 * sem_res.adb (Resolve_Entity_Name): Do not check
1038 for elaboration issues when a variable appears as the name of
1039 an object renaming declaration as this constitutes an aliasing,
1040 not a read.
1041
10422015-11-18 Ed Schonberg <schonberg@adacore.com>
1043
1044 * checks.adb (Overlap_Check): An actual that is an aggregate
1045 cannot overlap with another actual, and no check should be
1046 generated for it.
1047 * targparm.ads: Fix typos.
1048
10492015-11-18 Pascal Obry <obry@adacore.com>
1050
1051 * adaint.c: Routine __gnat_killprocesstree only implemented on
1052 Linux and Windows.
1053
10542015-11-18 Pascal Obry <obry@adacore.com>
1055
1056 * g-ctrl_c.adb: Minor style fixes.
1057
10582015-11-18 Pascal Obry <obry@adacore.com>
1059
1060 * adaint.c, s-os_lib.adb, s-os_lib.ads (Kill_Process_Tree): New.
1061
10622015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
1063
1064 * sem_util.adb (Check_Nonvolatile_Function_Profile): Place the error
1065 message concerning the return type on the result definition.
1066 (Is_Volatile_Function): A function with a parameter of a protected
1067 type is a protected function if it is defined within a protected
1068 definition.
1069
10702015-11-18 Ed Schonberg <schonberg@adacore.com>
1071
1072 * sem_ch4.adb (Try_Container_Indexing): When building the
1073 parameter list for the function call on indexing functions,
1074 preserve overloading of the parameters, which may themselves be
1075 generalized indexing operations.
1076
10772015-11-13 Arnaud Charlet <charlet@adacore.com>
1078
1079 PR ada/68345
1080 * s-osinte-dragonfly.ads (Get_Page_Size): C function returns an int.
1081
10822015-11-13 David Malcolm <dmalcolm@redhat.com>
1083
1084 * gcc-interface/trans.c (Sloc_to_locus): Add line_table param when
1085 calling linemap_position_for_line_and_column.
1086
10872015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
1088
1089 * exp_attr.adb: Minor reformatting.
1090
10912015-11-13 Pascal Obry <obry@adacore.com>
1092
1093 * adaint.c: Ensure that it is possible to get killed process
1094 status on Windows.
1095
10962015-11-13 Arnaud Charlet <charlet@adacore.com>
1097
1098 * gnat_rm.texi, gnat_ugn.texi, doc/gnat_ugn/gnat_project_manager.rst
1099 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1100 doc/gnat_ugn/platform_specific_information.rst,
1101 doc/gnat_ugn/gnat_and_program_execution.rst,
1102 doc/gnat_ugn/gnat_utility_programs.rst,
1103 doc/gnat_ugn/the_gnat_compilation_model.rst,
1104 doc/gnat_rm/compatibility_and_porting_guide.rst,
1105 doc/gnat_rm/implementation_defined_pragmas.rst,
1106 doc/gnat_rm/representation_clauses_and_pragmas.rst,
1107 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1108 Update documentation.
1109
11102015-11-13 Eric Botcazou <ebotcazou@adacore.com>
1111
1112 * sigtramp-ios.c, init.c: Minor cosmetic tweaks.
1113
11142015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
1115
1116 * s-gloloc.adb, g-debpoo.adb: Minor reformatting.
1117
11182015-11-13 Ed Schonberg <schonberg@adacore.com>
1119
1120 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
1121 message for the case the iterable name (array or container)
1122 is a component that depends on a discriminant.
1123
11242015-11-13 Ed Schonberg <schonberg@adacore.com>
1125
1126 * sem_ch4.adb (Indicate_Name_And_Type): If the analysis of
1127 one interpretation succeeds, set type of name in call, for
1128 completeness.
1129 (Try_Container_Indexing): If there are multiple indexing
1130 functions, collect possible interpretations that are compatible
1131 with given parameters, and add implicit dereference types when
1132 present.
1133 * sem_util.adb (Build_Explicit_Dereference): If the expression
1134 is an overloaded function call use the given discriminant to
1135 resolve the call, and set properly the type of the call and of
1136 the resulting dereference.
1137
11382015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
1139
1140 * sem_prag.adb (Analyze_Pragma): Pragma Constant_After_Elaboration can
1141 now apply to a variable without an initialization expression.
1142
11432015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
1144
1145 * exp_ch9.adb (Add_Matching_Formals): Parameter Actuals is now of mode
1146 IN OUT. Create a new list when list Actuals is not present.
1147 (Build_Contract_Wrapper): Create the wrapper
1148 only when the entry has at least on checked contract case or
1149 pre/postcondition. Ensure that the call to the original entry
1150 lacks an actual parameter list when the entry appears without
1151 formal parameters.
1152 (Expand_Entry_Declaration): Code cleanup.
1153
11542015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
1155
1156 * sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis
1157 after encountering an illegal aspect Part_Of.
1158
11592015-11-13 Ed Schonberg <schonberg@adacore.com>
1160
1161 * exp_attr.adb (Expand_N_Attribute_Reference, case
1162 Overlaps_Storage): Add copies for nodes that represent the integer
1163 addresses of the two actuals, to prevent identical nodes in the
1164 tree, which the backend cannot handle properly.
1165
11662015-11-13 Bob Duff <duff@adacore.com>
1167
1168 * sem_ch6.adb (Check_Private_Overriding): Change
1169 name of Parent_Is_Private to be Overrides_Private_Part_Op,
1170 and use Unit_Declaration_Node.
1171
11722015-11-13 Bob Duff <duff@adacore.com>
1173
1174 * sinfo.ads: Minor comment fix.
1175 * sem_ch6.adb: Minor reformatting.
1176
11772015-11-13 Jerome Lambourg <lambourg@adacore.com>
1178
1179 * tracebak.c: Do not use the GCC Unwinder to retrieve traceback
1180 for x86_64-vx7.
1181
11822015-11-13 Eric Botcazou <ebotcazou@adacore.com>
1183
1184 * init.c [Darwin/arm64]: Fix typo.
1185 * sigtramp-armios.c: Remove.
1186 * sigtramp-ios.c: New file.
1187
11882015-11-13 Doug Rupp <rupp@adacore.com>
1189
1190 * s-stchop-vxworks.adb (Set_Stack_Limit_For_Current_Task): Set stack
1191 limit to 12000 decimal vice 12000 hexadecimal.
1192
11932015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
1194
1195 * exp_ch9.adb, exp_fixd.adb, exp_util.adb, g-debpoo.adb,
1196 impunit.adb, scos.ads, sem_ch4.adb, sem_prag.adb,
1197 s-stchop-vxworks.adb: Minor reformatting.
1198
11992015-11-13 Tristan Gingold <gingold@adacore.com>
1200
1201 * s-rident.ads (Profile_Info): Enable Pure_Barriers for
1202 GNAT_Extended_Ravenscar.
1203
12042015-11-13 Bob Duff <duff@adacore.com>
1205
1206 * sem_ch6.adb (Check_Private_Overriding): Detect the special
1207 case where the overriding subprogram is overriding a subprogram
1208 that was declared in the same private part.
1209
12102015-11-13 Gary Dismukes <dismukes@adacore.com>
1211
1212 * exp_ch9.adb: Minor reformatting and typo fixes.
1213
12142015-11-13 Eric Botcazou <ebotcazou@adacore.com>
1215
1216 * init.c [Darwin/arm64]: Move __gnat_sigtramp implementation to...
1217 (__gnat_map_signal): New function.
1218 (__gnat_error_handler):
1219 Adjust the context and call above function.
1220 * sigtramp-armios.c: ...here. New file.
1221
12222015-11-13 Arnaud Charlet <charlet@adacore.com>
1223
1224 * bcheck.adb (Check_Consistent_Restrictions): Do not check
1225 consistency of No_Dependence for runtime units.
1226
12272015-11-13 Tristan Gingold <gingold@adacore.com>
1228
1229 * s-rident.ads (Restriction_Id): Add Pure_Barriers.
1230 * restrict.ads (Implementation_Restriction): Add Pure_Barriers.
1231 * exp_ch9.adb (Expand_Entry_Barrier): Create
1232 Is_Simple_Barrier_Name function, add Is_Pure_Barrier and
1233 Check_Pure_Barriers.
1234
12352015-11-13 Ed Schonberg <schonberg@adacore.com>
1236
1237 * sem_util.adb (Get_Cursor_Type): To determine whether a function
1238 First is the proper Iterable primitive, use the base type of the
1239 first formal rather than the type. This is needed in the unusual
1240 case where the Iterable aspect is specified for an integer type.
1241
12422015-11-13 Ed Schonberg <schonberg@adacore.com>
1243
1244 * sem_ch4.adb (Constant_Indexing_OK): If the indexing is the
1245 prefix of a procedure call assume that constant indexing is
1246 not chosen.
1247
12482015-11-13 Eric Botcazou <ebotcazou@adacore.com>
1249
1250 * sigtramp.h: Fix formatting throughout, do not include other
1251 headers, add missing preprocessor condition and 'extern' keywords.
1252 * sigtramp-armdroid.c: Include <sys/ucontext.h>.
1253 * init.c [Android]: Likewise.
1254
12552015-11-13 Eric Botcazou <ebotcazou@adacore.com>
1256
1257 * init.c [Darwin/arm64] (__gnat_sigtramp): Do not increment PC,
1258 fix CFI and add return sequence.
1259
12602015-11-13 Ed Schonberg <schonberg@adacore.com>
1261
1262 * exp_fixd.adb (Expand_Convert_Float_To_Fixed): If the conversion
1263 comes from an attribute reference 'Round, the operation must
1264 round and not truncate.
1265 * sem_res.adb, sem_ch6.adb: Minor editing.
1266
12672015-11-12 Philippe Gil <gil@adacore.com>
1268
1269 * g-debpoo.adb (Print_Address): print address in hexadecimal as
1270 in previous GNAT version (without secondary stack use)
1271 (Deallocate): Deallocate calling once Unlock_Task.all when it
1272 raise exception.
1273
12742015-11-12 Ed Schonberg <schonberg@adacore.com>
1275
1276 * sem_ch3.adb (Analyze_Subtype_Declaration): Remove redundant
1277 copying of dimensions from parent type to subtype. This is
1278 properly done in Analyze_Dimension.
1279 * sem_dim.adb (Analyze_Dimension_Subtype_Declaration): Add entity
1280 to error message, so that reference to entity can be formatted
1281 properly.
1282 * opt.ads: Fix typo.
1283
12842015-11-12 Bob Duff <duff@adacore.com>
1285
1286 * impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads,
1287 types.ads: Get rid of some global variables.
1288 * output.adb, output.ads: Move some global variables to the body.
1289
12902015-11-12 Yannick Moy <moy@adacore.com>
1291
1292 * lib-xref-spark_specific.adb
1293 (Is_Constant_Object_Without_Variable_Input): Add special case
1294 for imported constants.
1295
12962015-11-12 Philippe Gil <gil@adacore.com>
1297
1298 * g-debpoo.adb (Allocate): Avoid having allocations not handled.
1299
13002015-11-12 Ed Schonberg <schonberg@adacore.com>
1301
1302 * checks.adb (Apply_Scalar_Range_Check): If the expression is
1303 a real literal and the context type has static bounds, remove
1304 range check when possible.
1305
13062015-11-12 Ed Schonberg <schonberg@adacore.com>
1307
1308 * sem_util.adb (Collect_Primitive_Operations): If the type is
1309 derived from a type declared elsewhere that has an incomplete
1310 type declaration, the primitives are found in the scope of the
1311 type nat that of its ancestor.
1312
13132015-11-12 Arnaud Charlet <charlet@adacore.com>
1314
1315 * switch-c.adb, debug.adb, osint-c.adb, gnat1drv.adb: Remove -gnatd.V
1316 debug switch.
1317 * exp_aggr.adb, exp_util.adb: Fix typos.
1318
13192015-11-12 Jerome Lambourg <lambourg@adacore.com>
1320
1321 * init.c: Properly adjust PC values in case of signals.
1322
13232015-11-12 Bob Duff <duff@adacore.com>
1324
1325 * sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A
1326 pragma that comes from an aspect does not "come from source",
1327 so we need to test whether it comes from an aspect.
1328
13292015-11-12 Arnaud Charlet <charlet@adacore.com>
1330
1331 * switch-c.adb, gnat1drv.adb, opt.ads: Reserve -gnateg for generation
1332 of C headers.
1333
13342015-11-12 Arnaud Charlet <charlet@adacore.com>
1335
1336 * back_end.adb, opt.ads (Debugger_Level): Update comment.
1337 (Scan_Back_End_Switches): Set Debugger_Level.
1338
13392015-11-12 Bob Duff <duff@adacore.com>
1340
1341 * fmap.adb, debug.ads, checks.adb, exp_ch11.adb: Minor edits.
1342
13432015-11-12 Doug Rupp <rupp@adacore.com>
1344
1345 * s-stchop-vxworks.adb (Stack_Limit): Export vice Import.
1346
13472015-11-12 Gary Dismukes <dismukes@adacore.com>
1348
1349 * sem_dim.adb: Minor reformatting.
1350
13512015-11-12 Gary Dismukes <dismukes@adacore.com>
1352
1353 * gnat1drv.adb, opt.ads: Minor reformatting.
1354
13552015-11-12 Ed Schonberg <schonberg@adacore.com>
1356
1357 * sem_ch3.adb (Analyze_Number_Declaration): Call Analyze_Dimension,
1358 to propagate dimension information from expression to named
1359 number.
1360 * sem_dim.ads: Documentation: number declaration and explicit
1361 dereference can carry dimension information.
1362 * sem_dim.adb (Analyze_Dimension_Number_Declaration): New
1363 procedure, to propagate dimension information from expression
1364 of declaration to named number, whose type becomes one of the
1365 dimensioned base types rather than universal real.
1366 (Analyze_Dimension_Binary_Op):
1367 a) If one operand is a literal that is the value of a declared
1368 constant after constant-foloding, use the dimensions of the
1369 declared constant.
1370 b) If an operand is a literal that is a contant-folded expression,
1371 and expander is active, do not report a dimension mismatch if
1372 literal does not carry them, because dimension matching will
1373 have been checked previously.
1374
13752015-11-12 Ed Schonberg <schonberg@adacore.com>
1376
1377 * sem_ch8.adb (Find_Selected_Component): In a synchronized
1378 body, a reference to an operation of an object of the same
1379 synchronized type was always interpreted as a reference to the
1380 current instance. This is not always the case, as the prefix of
1381 the reference may designate an object of the same type declared
1382 in the enclosing context prior to the body.
1383
13842015-11-12 Arnaud Charlet <charlet@adacore.com>
1385
1386 * impunit.ads, impunit.adb (Get_Kind_Of_File): New. Cleaned up
1387 implementation from previous Get_Kind_Of_Unit.
1388 (Get_Kind_Of_Unit): Reimplemented using Get_Kind_Of_File.
1389 * debug.adb: Remove d.4 switch, no longer used.
1390 * opt.ads: Update doc on Debugger_Level.
1391 * gnat1drv.adb: Code clean ups.
1392 * sinput.ads: minor fix in comment
1393
13942015-11-12 Bob Duff <duff@adacore.com>
1395
1396 * sinfo.adb, sinfo.ads, sem_ch6.adb, atree.ads: Add
1397 Was_Expression_Function flag, which is set in sem_ch6.adb when
1398 converting an Expression_Function into a Subprogram_Body.
1399
14002015-11-12 Pascal Obry <obry@adacore.com>
1401
1402 * usage.adb: Update overflow checking documentation.
1403
14042015-11-12 Tristan Gingold <gingold@adacore.com>
1405
1406 * snames.ads-tmpl: Name_Gnat_Extended_Ravenscar: New identifier.
1407 * s-rident.ads (Profile_Name): Add GNAT_Extended_Ravenscar.
1408 (Profile_Info): Add new entry for GNAT_Extended_Ravenscar.
1409 * sem_prag.adb (Set_Ravenscar_Profile): Add Profile parameter
1410 to handle various ravenscar profiles. Adjust error messages.
1411 (Analyze_Pragma): Handle GNAT_Extended_Ravenscar profile.
1412 * targparm.adb (Get_Target_Parameters): Handle
1413 GNAT_Extended_Ravenscar profile.
1414
14152015-11-12 Ed Schonberg <schonberg@adacore.com>
1416
1417 * sem_warn.adb (Warn_On_Unreferenced_Entity): If the entity is an
1418 Out_Parameter the front-end does not emit any warning on it, so
1419 do not suppress warnings on the entity because the backend might
1420 be able to determine an uninitialized path and warn accordingly.
1421
14222015-11-12 Ed Schonberg <schonberg@adacore.com>
1423
1424 * sem_ch4.adb (Analyze_Selected_Component): Diagnose an attempt
1425 to reference an internal entity from a synchronized type from
1426 within the body of that type, when the prefix of the selected
1427 component is not the current instance.
1428
14292015-11-12 Ed Falis <falis@adacore.com>
1430
1431 * s-stchop-vxworks.adb: Clean up in stack checking code.
1432
14332015-11-12 Gary Dismukes <dismukes@adacore.com>
1434
1435 * exp_ch6.adb (Is_Build_In_Place_Function_Call):
1436 Test Expression (N) in N_Type_Conversion cases as well,
1437 since conversions can occur in actual parameter contexts.
1438 (Make_Build_In_Place_Call_In_Anonymous_Context): Retrieve
1439 function call from Expression (Func_Call) when Nkind (Func_Call)
1440 is N_Type_Conversion, since conversions are allowed in "anonymous"
1441 contexts (specifically, as actual parameters).
1442
14432015-11-12 Thomas Quinot <quinot@adacore.com>
1444
1445 * sem_ch4.adb (analyze_If_Expression): Reject IF-expression where
1446 THEN-expression is overloaded and none of its interpretation is
1447 compatible with the ELSE-expression.
1448
14492015-11-12 Jerome Lambourg <lambourg@adacore.com>
1450
1451 * init.c: Do not try to mess with the MSR values in RTP mode:
1452 not needed and forbidden.
1453
14542015-11-12 Ed Schonberg <schonberg@adacore.com>
1455
1456 * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1457 full view of a type that has pragma Stream_Convert, because
1458 this indicates special processing for the stream operations of
1459 the type.
1460
14612015-11-12 Jerome Lambourg <lambourg@adacore.com>
1462
1463 * init.c: Do not try to mess with the MSR values in RTP mode:
1464 not needed and forbidden.
1465
14662015-11-12 Ed Schonberg <schonberg@adacore.com>
1467
1468 * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1469 full view of a type that has pragma Stream_Convert, because
1470 this indicates special processing for the stream operations of
1471 the type.
1472
14732015-11-12 Gary Dismukes <dismukes@adacore.com>
1474
1475 * exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
1476 sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor
1477 reformatting and a typo fix.
1478
14792015-11-12 Ed Schonberg <schonberg@adacore.com>
1480
1481 * sem_ch12.adb (Preanalyze_Actuals): Add guard on use of
1482 Incomplete_Actuals, which are only stored for a package
1483 instantiation, in order to place the instance in the body of
1484 the enclosing unit.
1485
14862015-11-12 Ed Schonberg <schonberg@adacore.com>
1487
1488 * exp_intr.adb: Add legality checks on calls to a
1489 Generic_Dispatching_Constructor: the given tag must be defined,
1490 it cannot be the tag of an abstract type, and its accessibility
1491 level must not be greater than that of the constructor.
1492
14932015-11-12 Ed Schonberg <schonberg@adacore.com>
1494
1495 * sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK): If
1496 the context is an overloaded call, assume that Constant_Indexing
1497 is not OK if an interpretation has an assignable parameter
1498 corresponding to the indexing expression.
1499
15002015-11-12 Jerome Lambourg <lambourg@adacore.com>
1501
1502 * init.c (__gnat_error_handler): Force the SPE bit of the MSR
1503 when executing on e500v2 CPU.
1504
15052015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1506
1507 * sem_prag.adb (Analyze_Constituent): Stop the
1508 analysis after detecting a misplaced constituent as this is a
1509 critical error.
1510
15112015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1512
1513 * sem_ch10.adb, atree.adb: Minor reformatting.
1514
15152015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1516
1517 * sem_elab.adb (Check_A_Call): Add new variable
1518 Is_DIC_Proc. Report elaboration issue in SPARK concerning calls
1519 to source subprograms or nontrivial Default_Initial_Condition
1520 procedures. Add specialized error message to avoid outputting
1521 the internal name of the Default_Initial_Condition procedure.
1522 * sem_util.ads, sem_util.adb
1523 (Is_Non_Trivial_Default_Init_Cond_Procedure): New routine.
1524
15252015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1526
1527 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
1528 Remove the guard concerning entry bodies as it is spurious.
1529 (Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
1530 Contract_Cases when not annotating the tree.
1531 * einfo.adb: Node25 is now used as Contract_Wrapper.
1532 (Contract_Wrapper): New routine.
1533 (PPC_Wrapper): Removed.
1534 (Set_Contract_Wrapper): New routine.
1535 (Set_PPC_Wrapper): Removed.
1536 (Write_Field25_Name): Add output for Contract_Wrapper. Remove
1537 output for PPC_Wrapper.
1538 * einfo.ads: New attribute Contract_Wrapper along with usage
1539 in entities. Remove attribute PPC_Wrapper along with usage in nodes.
1540 (Contract_Wrapper): New routine along with pragma Inline.
1541 (PPC_Wrapper): Removed along with pragma Inline.
1542 (Set_Contract_Wrapper): New routine along with pragma Inline.
1543 (Set_PPC_Wrapper): Removed along with pragma Inline.
1544 * exp_ch9.adb (Build_Contract_Wrapper): New routine.
1545 (Build_PPC_Wrapper): Removed.
1546 (Build_Protected_Entry): Code cleanup.
1547 (Expand_Entry_Declaration): Create a contract wrapper
1548 which now verifies Contract_Cases along with pre/postconditions.
1549 (Expand_N_Task_Type_Declaration): There is no need to check
1550 whether an entry has pre/postconditions as this is now done
1551 in Build_Contract_Wrapper.
1552 * sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
1553 Refined_Post is now properly inserted in entry bodies.
1554 (Insert_Pragma): Add circuitry to insert in an entry body. Redo
1555 the instance "header" circuitry. Remove the now obsolete special
1556 case of inserting pre- conditions.
1557 * sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
1558 applies to entries.
1559 * sem_res.adb (Resolve_Entry_Call): Update the calls to
1560 PPC_Wrapper.
1561
15622015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1563
1564 * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
1565 reformatting.
1566
15672015-11-12 Ed Schonberg <schonberg@adacore.com>
1568
1569 * exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
1570 a stream operation for an array type, install the scope of the
1571 component type if it is private and not in scope, to prevent
1572 spurious errors if the full view of the component type has
1573 defaulted discriminants.
1574
15752015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1576
1577 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a
1578 variable, if this is not an overlay, set on Treat_As_Volatile on it.
1579 * gcc-interface/decl.c (E_Variable): Do not force the type to volatile
1580 for address clauses. Tweak and adjust various RM references.
1581
15822015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1583
1584 * checks.ads: Minor comment fix.
1585
15862015-11-12 Arnaud Charlet <charlet@adacore.com>
1587
1588 * gnat_rm.texi, gnat_ugn.texi,
1589 doc/gnat_ugn/platform_specific_information.rst,
1590 doc/gnat_ugn/gnat_and_program_execution.rst,
1591 doc/gnat_ugn/the_gnat_compilation_model.rst,
1592 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1593 doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation.
1594
15952015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1596
1597 * einfo.ads (Overlays_Constant): Document usage for E_Constant.
1598 * freeze.adb (Warn_Overlay): Small reformatting.
1599 (Check_Address_Clause): Deal specifically with deferred
1600 constants. For a variable or a non-imported constant
1601 overlaying a constant object and with initialization value,
1602 either remove the initialization or issue a warning. Fix a
1603 couple of typos.
1604 * sem_util.adb (Note_Possible_Modification): Overhaul the condition for
1605 the warning on modified constants and use Find_Overlaid_Entity instead
1606 of doing it manually.
1607 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and
1608 set Overlays_Constant once on entry. Do not treat the overlaid
1609 entity as volatile. Do not issue the warning on modified
1610 constants here.
1611 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove
1612 over-restrictive condition for the special treatment of deferred
1613 constants.
1614 <E_Variable>: Remove obsolete associated code.
1615
16162015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1617
1618 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Renaming_Decl>: Do
1619 not materialize renamed subprograms if only annotating types.
1620
16212015-11-12 Pierre-Marie de Rodat <derodat@adacore.com>
1622
1623 * gcc-interface/decl.c (gnat_to_gnu_entity): Create
1624 IMPORTED_DECL nodes to describe the subprogram renamings which
1625 are relevant at debug time.
1626 * gcc-interface/gigi.h (get_debug_scope): Add declaration.
1627 * gcc-interface/trans.c (Identifier_to_gnu): Consider
1628 N_Defining_Operator_Symbol as valid entities.
1629 (gnat_to_gnu): Handle N_Defining_Operator_Symbol the same way as
1630 other entities. Introduce a specific handling for
1631 N_Subprogram_Renaming_Declaration: call gnat_to_gnu_entity on
1632 the entity defined for relevant ones.
1633 (process_decls): Process subprogram renaming declarations during
1634 the second pass only.
1635 * gcc-interface/utils.c (get_debug_scope): Make it external.
1636 Consider N_Defining_Operator_Symbol as valid entities.
1637 (gnat_write_global_declarations): Output debugging information
1638 for top-level imported declarations.
1639
16402015-11-12 Emmanuel Briot <briot@adacore.com>
1641
1642 * s-os_lib.ads: Documentation update.
1643
16442015-11-12 Arnaud Charlet <charlet@adacore.com>
1645
1646 * s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
1647 taskDelay to avoid confusion.
1648
16492015-11-12 Ed Schonberg <schonberg@adacore.com>
1650
1651 * exp_ch6.adb (Expand_Simple_Function_Return): If the return
1652 type is class-wide and the expression is a view conversion,
1653 remove the conversion to prevent overriding of the tag, which
1654 must be that of the object being returned.
1655
16562015-11-12 Tristan Gingold <gingold@adacore.com>
1657
1658 * bindgen.adb (Gen_Adainit): Code cleanup.
1659
16602015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1661
1662 * s-stalib.ads: Code cleanup.
1663
16642015-11-12 Ed Schonberg <schonberg@adacore.com>
1665
1666 * sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
1667 (Analyze_Subtype_Declaration): For floating point types,
1668 inherit dimensions.
1669 (OK_For_Limited_Init_In_05): Handle properly a conditional
1670 expression whose condition is static, and is rewritten as the
1671 branch that will be executed.
1672
16732015-11-12 Ed Schonberg <schonberg@adacore.com>
1674
1675 * sem_attr.adb (Resolve_Attribute, case 'Access): If the context
1676 type is an access constant type, do not mark the attribute
1677 reference as a possible modification of the prefix.
1678
16792015-11-12 Steve Baird <baird@adacore.com>
1680
1681 * sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
1682 do not analyze the expression of a machine code insertion.
1683 * sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
1684 mark the N_Code_Statement node as analyzed and do nothing else.
1685
16862015-11-12 Ed Schonberg <schonberg@adacore.com>
1687
1688 * sem_ch6.adb (Check_Limited_Return): Make global to package
1689 for use elsewhere.
1690 (Analyze_Expression_Function): Remove duplicated code, pre-analyze
1691 expression to capture names and call Check_Limited_Return so
1692 that semantic checks are identical to those for regular functions
1693 returning limited types.
1694
16952015-11-12 Gary Dismukes <dismukes@adacore.com>
1696
1697 * bindgen.adb: Fix typo.
1698 * sem_ch6.adb: Minor reformatting.
1699
17002015-11-12 Emmanuel Briot <briot@adacore.com>
1701
1702 * s-os_lib.adb (Argument_String_To_List): fix handling of
1703 windows separators
1704
17052015-11-11 Andrew MacLeod <amacleod@redhat.com>
1706
1707 * gcc-interface/decl.c: Remove unused header files.
1708 * gcc-interface/misc.c: Likewise.
1709 * gcc-interface/targtyps.c: Likewise.
1710 * gcc-interface/trans.c: Likewise.
1711 * gcc-interface/utils.c: Likewise.
1712
17132015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1714
1715 * gcc-interface/gigi.h (set_reverse_storage_order_on_pad_type):
1716 Declare.
1717 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Set the
1718 storage order on the enclosing record for a packed array type.
1719 <E_Array_Type>: Set the storage order.
1720 <E_Array_Subtype>: Likewise.
1721 <E_Record_Type>: Likewise.
1722 <E_Record_Subtype>: Likewise.
1723 (gnat_to_gnu_component_type): Set the reverse storage order on a
1724 padded type built for a non-bit-packed array.
1725 (gnat_to_gnu_field): Likewise.
1726 (components_to_record): Deal with TYPE_REVERSE_STORAGE_ORDER.
1727 * gcc-interface/utils.c (make_packable_type): Likewise.
1728 (pad_type_hasher::equal): Likewise.
1729 (gnat_types_compatible_p): Likewise.
1730 (unchecked_convert): Likewise.
1731 (set_reverse_storage_order_on_pad_type): New public function.
1732 * gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
1733 get_inner_reference.
1734 * gcc-interface/utils2.c (build_unary_op): Likewise.
1735 (gnat_build_constructor): Deal with TYPE_REVERSE_STORAGE_ORDER.
1736 (gnat_rewrite_reference): Propagate REF_REVERSE_STORAGE_ORDER.
1737
17382015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1739
1740 * gcc-interface/utils.c: Don't undef DEF_BUILTIN.
1741
17422015-10-29 Andrew MacLeod <amacleod@redhat.com>
1743
1744 * gcc-interface/decl.c: Reorder #include's and remove duplicates.
1745 * gcc-interface/misc.c: Likewise.
1746 * gcc-interface/targtyps.c: Likewise.
1747 * gcc-interface/trans.c: Likewise.
1748 * gcc-interface/utils.c: Likewise.
1749
17502015-10-27 Tristan Gingold <gingold@adacore.com>
1751
1752 * bindgen.adb (System_BB_CPU_Primitives_Multiprocessors_Used):
1753 New variable.
1754 (Gen_Adainit): Call Start_All_CPUs if the above
1755 variable is set to true.
1756
17572015-10-27 Emmanuel Briot <briot@adacore.com>
1758
1759 * adaint.c, s-os_lib.adb, s-os_lib.ads (Copy_File_Attributes): New
1760 subprogram.
1761
17622015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1763
1764 * namet.adb, namet.ads: Minor reformatting.
1765
17662015-10-27 Ed Schonberg <schonberg@adacore.com>
1767
1768 * sem_ch4.adb (Analyze_Allocator): Do not perform legality check
1769 on allocators for limited objects in a qualified expression,
1770 because expression has not been resolved.
1771 * sem_res.adb (Resolve_Allocator): Perform check on legality of
1772 limited objects after resolution. Add sem_ch3.adb to context.
1773
17742015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1775
1776 * sem_prag.adb (Analyze_Refined_Global_In_Decl_Part): Add variable
1777 States.
1778 (Check_Refined_Global_Item): An object or state acts as a
1779 constituent only when the corresponding encapsulating state
1780 appears in pragma Global.
1781 (Collect_Global_Item): Add a state with non-null visible refinement to
1782 list States.
1783
17842015-10-27 Gary Dismukes <dismukes@adacore.com>
1785
1786 * sem_util.ads, par.adb, sem_ch6.adb: Minor reformatting and a few
1787 typo corrections.
1788
17892015-10-27 Pierre-Marie de Rodat <derodat@adacore.com>
1790
1791 * namet.ads, namet.adb (Name_Equals): New function.
1792 * namet.h (Name_Equals): New macro.
1793
17942015-10-27 Arnaud Charlet <charlet@adacore.com>
1795
1796 * exp_ch6.adb (Build_Procedure_Form): Use 'RESULT' for the extra
1797 parameter, to avoid ambiguity when generating tmps using _xxx which
1798 might end up reusing _result.
1799
18002015-10-27 Javier Miranda <miranda@adacore.com>
1801
1802 * sem_util.ads, sem_util.adb (Defining_Identifier): Adding a formal to
1803 indicate the needed behavior in case of nodes with errors.
1804
18052015-10-27 Ed Schonberg <schonberg@adacore.com>
1806
1807 * sem_attr.adb (Eval_Attribute): If the prefix of attribute
1808 Enum_Rep is an object that is a generated loop variable for an
1809 element iterator, no folding is possible.
1810 * sem_res.adb (Resolve_Entity_Name): Do not check for a missing
1811 initialization in the case of a constant that is an object
1812 renaming.
1813 * exp_attr.adb (Expand_N_Attribute_Reference, case Enum_Rep):
1814 If the prefix is a constant that renames an expression there is
1815 nothing to evaluate statically.
1816
18172015-10-27 Vincent Celier <celier@adacore.com>
1818
1819 * gnatlink.adb: Always delete the response file, even when the
1820 invocation of gcc to link failed.
1821
18222015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1823
1824 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1825 Do not inherit the SPARK_Mode from the context if it has been
1826 set already.
1827 (Build_Subprogram_Declaration): Relocate relevant
1828 pragmas from the subprogram body to the generated corresponding
1829 spec. Do not copy aspect SPARK_Mode as this leads to circularity
1830 in Copy_Separate_Tree. Inherit the attributes that describe
1831 pragmas Ghost and SPARK_Mode.
1832 (Move_Pragmas): New routine.
1833
18342015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1835
1836 * inline.adb (Is_Expression_Function): Removed.
1837 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): An internally
1838 generated subprogram body that completes an expression function
1839 inherits the SPARK_Mode from the spec.
1840 * sem_res.adb (Resolve_Call): Update all calls to
1841 Is_Expression_Function.
1842 * sem_util.ads, sem_util.adb (Is_Expression_Function): Reimplemented.
1843 (Is_Expression_Function_Or_Completion): New routine.
1844
18452015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1846
1847 * lib-xref-spark_specific.adb, a-dirval-mingw.adb, exp_ch6.adb,
1848 sem_ch8.adb, s-os_lib.adb: Minor reformatting.
1849
18502015-10-27 Yannick Moy <moy@adacore.com>
1851
1852 * lib-xref-spark_specific.adb
1853 (Enclosing_Subprogram_Or_Library_Package): detect library-level
1854 subprograms and handle entries as subprograms, i.e. now both
1855 library-level subprograms and entry bodies act as enclosing
1856 scopes.
1857 (Traverse_Declarations_Or_Statements): process entry bodies just
1858 like subprogram bodies.
1859 * lib-xref.ads (Enclosing_Subprogram_Or_Library_Package): comment
1860 simplified while keeping its the meaning and minor typo fixed
1861 ("of" -> "or").
1862 * spark_xrefs.ads (Xref Section): fix in description of the ALI
1863 line for subprogram calls; such lines start with captial "F"
1864 followed by a space.
1865
18662015-10-27 Ed Schonberg <schonberg@adacore.com>
1867
1868 * sem_ch8.adb (Find_Direct_Name): A parameter association is
1869 a legal context for applying an implicit dereference.
1870 (Analyze_Expanded_Name): Minor code cleanup.
1871
18722015-10-27 Arnaud Charlet <charlet@adacore.com>
1873
1874 * sinput.ads, spark_xrefs.ads, lib-xref.adb: Fix typos.
1875
18762015-10-27 Pascal Obry <obry@adacore.com>
1877
1878 * a-dirval-mingw.adb: Remove some characters from Invalid_Character set.
1879
18802015-10-27 Ed Schonberg <schonberg@adacore.com>
1881
1882 * exp_ch6.adb (Rewrite_Function_Call_For_C): Use a named
1883 associaion for the added actual in the call because previous
1884 actuals may also have been given by explicit associations.
1885 * lib-xref.adb: Minor style fixes.
1886
18872015-10-27 Arnaud Charlet <charlet@adacore.com>
1888
1889 * gnat1drv.adb: Remove hard coded restrictions.
1890
18912015-10-27 Pascal Obry <obry@adacore.com>
1892
1893 * a-dirval-mingw.adb: Minor reformatting.
1894
18952015-10-27 Javier Miranda <miranda@adacore.com>
1896
1897 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve previous patch.
1898
18992015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1900
1901 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code cleanup. Set
1902 and restore the value of global flag Ignore_Pragma_SPARK_Mode. A
1903 formal package declaration acts as a package instantation with
1904 respect to SPARK_Mode legality.
1905
19062015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1907
1908 * sem_prag.adb (Check_Constituent_Usage): Use
1909 logical operators rather than short circuit operators. Emit an
1910 error when a state with visible refinement is not refined.
1911 * snames.ads-tmpl: Add names for detecting
1912 predefined potentially blocking subprograms.
1913
19142015-10-27 Arnaud Charlet <charlet@adacore.com>
1915
1916 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Revert previous
1917 change.
1918 (Expand_Array_Aggregate): Rewrite previous change here
1919 as done for other non GCC back-ends.
1920 (Build_Record_Aggr_Code): Add special case.
1921
19222015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1923
1924 * sem_prag.adb (Add_Item_To_Name_Buffer): Update the comment on usage.
1925 Add an output string for loop parameters.
1926 (Analyze_Global_Items): Loop parameters are now a
1927 valid global item. The share the legality checks of constants.
1928 (Analyze_Input_Output): Loop parameters are now a valid dependency item.
1929 (Find_Role): Loop parameters share the role of constants.
1930
19312015-10-26 Ed Schonberg <schonberg@adacore.com>
1932
1933 * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode,
1934 preserve the Generalized_ indexing link if the context is not
1935 a spec expression that will be analyzed anew.
1936
19372015-10-26 Javier Miranda <miranda@adacore.com>
1938
1939 * exp_ch6.ads, exp_ch6.adb (Build_Procedure_Body_Form): Promote it to
1940 library level (to invoke this routine from the semantic analyzer).
1941 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): When generating
1942 C code, invoke Build_Procedure_Body_Form to transform a function
1943 that returns a constrained array type into a procedure with an
1944 out parameter that carries the return value.
1945
19462015-10-26 Arnaud Charlet <charlet@adacore.com>
1947
1948 * a-reatim.ads: Add "Clock_Time with Synchronous" contract in package
1949 Ada.Real_Time.
1950 * a-taside.ads: Add "Tasking_State with Synchronous" contract in
1951 package Ada.Task_Identification.
1952 * sem_ch12.adb: minor typo in comment
1953
19542015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1955
1956 * contracts.adb (Analyze_Object_Contract): Set and restore
1957 the SPARK_Mode for both constants and objects. Factor out the
1958 semantic checks concerning Ghost objects.
1959 * freeze.adb (Freeze_Array_Type): A Ghost array type cannot have a
1960 concurrent component type.
1961 (Freeze_Entity): A Ghost type cannot also be concurrent.
1962 (Freeze_Record_Type): A Ghost record type cannot have a concurrent
1963 component.
1964 * sem_prag.adb (Analyze_Abstract_State): A Ghost abstract
1965 state cannot also be synchronized.
1966 (Check_Ghost_Synchronous): New routine.
1967 * sem_util.adb (Yields_Synchronized_Object): Correct the case
1968 of record components to account for the case where the type has
1969 no component list.
1970
19712015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1972
1973 * expander.adb (Expand): Expand a single protected declaration.
1974 * exp_ch9.ads, exp_ch9.adb (Expand_N_Single_Protected_Declaration): New
1975 routine.
1976
19772015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1978
1979 * sem_res.adb (Is_OK_Volatile_Context): A volatile object may appear
1980 in an object declaration as long as it denotes the name.
1981
19822015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1983
1984 * sem_ch9.adb (Analyze_Single_Protected_Declaration): The anonymous
1985 object no longer comes from source.
1986 (Analyze_Single_Task_Declaration): The anonymous object no longer
1987 comes from source.
1988 * sem_prag.adb (Analyze_Pragma): The analysis of pragma SPARK_Mode
1989 now recognizes the internal anonymous object created for a single
1990 concurren type as a valid context.
1991 (Find_Related_Context): The internal anonymous object created for a
1992 single concurrent type is now a valid context.
1993 (Find_Related_Declaration_Or_Body): The internal anonymous object
1994 created for a single concurrent type is now a valid context.
1995
19962015-10-26 Ed Schonberg <schonberg@adacore.com>
1997
1998 * sem_util.adb (Inherit_Rep_Item_Chain): Another another guard
1999 to prevent circularities in the rep_item_chain of the full view
2000 of a type extension in a child unit that extends a private type
2001 from the parent.
2002
20032015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2004
2005 * atree.ads, atree.adb (Ekind_In): New 10 and 11 parameter versions.
2006 * contracts.ads, contracts.adb (Analyze_Initial_Declaration_Contract):
2007 New routine.
2008 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2009 Analyze the contract of the initial declaration.
2010 (Analyze_Subprogram_Body_Helper): Analyze the contract of the
2011 initial declaration.
2012 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the contract
2013 of the initial declaration.
2014 * sem_ch9.adb (Analyze_Entry_Body): Analyze the contract of
2015 the initial declaration.
2016 (Analyze_Protected_Body): Analyze
2017 the contract of the initial declaration.
2018 (Analyze_Task_Body): Analyze the contract of the initial declaration.
2019 * sem_prag.adb (Add_Entity_To_Name_Buffer): Use "type" rather
2020 than "unit" as it makes the error messages sound better.
2021 (Add_Item_To_Name_Buffer): Update comment on usage. The routine
2022 now supports discriminants and current instances of concurrent
2023 types.
2024 (Analyze_Depends_In_Decl_Part): Install the discriminants
2025 of a task type.
2026 (Analyze_Global_In_Decl_Part): Install the discriminants of a task type.
2027 (Analyze_Global_Item): Add processing for current instances of
2028 concurrent types and include discriminants as valid global items.
2029 (Analyze_Input_Output): Discriminants and current instances of
2030 concurrent types are now valid items. Update various error messages.
2031 (Check_Usage): Current instances of protected and task types behaves
2032 as formal parameters.
2033 (Collect_Subprogram_Inputs_Outputs): There is
2034 no longer need to manually analyze [Refined_]Global thanks to
2035 freezing of initial declaration contracts. Add processing for
2036 the current instance of a concurrent type.
2037 (Find_Role): Add categorizations for discriminants, protected and task
2038 types.
2039 (Is_CCT_Instance): New routine.
2040 (Match_Items): Update the comment on usage. Update internal comments.
2041 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update the
2042 comment on usage.
2043 * sem_util.adb (Entity_Of): Ensure that the entity is an object
2044 when traversing a potential renaming chain.
2045 (Fix_Msg): Use "type" rather than "unit" as it makes the error messages
2046 sound better.
2047 * sem_util.ads (Fix_Msg): Update the comment on usage.
2048
20492015-10-26 Arnaud Charlet <charlet@adacore.com>
2050
2051 * par.adb (Par): Do not generate an error when generating
2052 SCIL for predefined units or new children of system and co.
2053
20542015-10-26 Ed Schonberg <schonberg@adacore.com>
2055
2056 * einfo.adb: Access_Disp_Table applies to a private
2057 extension.
2058
20592015-10-26 Ed Schonberg <schonberg@adacore.com>
2060
2061 * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode, when
2062 restoring original node, remove Generalized_Indexing operation
2063 so that it is recreated during re- analysis.
2064
20652015-10-26 Javier Miranda <miranda@adacore.com>
2066
2067 * exp_unst.adb: (Unnest_Subprogram):
2068 Replace absolute references to 1 and 0 by their counterpart
2069 relative references through Subps_First.
2070
20712015-10-26 Ed Schonberg <schonberg@adacore.com>
2072
2073 * par-ch3.adb (P_Declarative_Items): In case of misplaced
2074 aspect specifications, ensure that flag Done is properly set to
2075 continue parse.
2076 * sem_prag.adb, sem_prag.ads: Remove Build_Generic_Class_Condition,
2077 unused.
2078
20792015-10-26 Emmanuel Briot <briot@adacore.com>
2080
2081 * s-os_lib.adb (Argument_String_To_List): Remove backslashes in
2082 argument value.
2083
20842015-10-26 Javier Miranda <miranda@adacore.com>
2085
2086 * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): Removed.
2087
20882015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2089
2090 * exp_util.adb, sem_aux.adb, exp_attr.adb, sem_eval.adb: Minor
2091 reformatting.
2092 * sem_util.adb, sem_ch5.adb: Minor reformatting.
2093
20942015-10-26 Ed Schonberg <schonberg@adacore.com>
2095
2096 * exp_unst.adb (Unnest_Subprogram): Add guard to prevent compiler
2097 abort when handling a reference to a formal in an aspect of a
2098 nested subprogram declaration as an uplevel reference.
2099
21002015-10-26 Bob Duff <duff@adacore.com>
2101
2102 * snames.ads-tmpl, aspects.adb, aspects.ads: Add the aspect and
2103 pragma names and enter into relevant tables.
2104 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze aspect
2105 Predicate_Failure.
2106 * sem_prag.adb (Predicate_Failure): Analyze pragma Predicate_Failure.
2107 * exp_util.adb (Make_Predicate_Check): When building the Check
2108 pragma, if Predicate_Failure has been specified, add the relevant
2109 String argument to the pragma.
2110 * par-prag.adb (Prag): Add Predicate_Failure to list of pragmas
2111 handled during semantic analysis.
2112
21132015-10-26 Ed Schonberg <schonberg@adacore.com>
2114
2115 * sem_ch5.adb (Analyze_Assignment): If the left-hand side
2116 is an indexed component with generalized indexing, discard
2117 interpretation that yields a reference type, which is not
2118 assignable. This prevent spurious ambiguities when the right-hand
2119 side is an aggregate which does not provide a target type.
2120
21212015-10-26 Bob Duff <duff@adacore.com>
2122
2123 * exp_ch7.adb, exp_ch6.adb: Minor comment fix.
2124
21252015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2126
2127 * aspects.adb (Move_Or_Merge_Aspects): Move all aspects related
2128 to a single concurrent type declaration to the declaration
2129 of the anonymous object if they qualify.
2130 (Relocate_Aspect): Update comment on usage.
2131 * aspects.ads Add new sectioon on aspect specifications on single
2132 concurrent types. Add new table Aspect_On_Anonymous_Object_OK.
2133 (Move_Or_Merge_Aspects): Udate the comment on usage.
2134 * atree.adb (Elist36): New routine.
2135 (Set_Elist36): New routine.
2136 * atree.ads (Elist36): New routine along with pragma Inline.
2137 (Set_Elist36): New routine along with pragma Inline.
2138 * atree.h: Elist36 is now an alias for Field36.
2139 * contracts.adb (Add_Contract_Item): Add processing
2140 for protected units and extra processing for variables.
2141 (Analyze_Object_Contract): Code cleanup. The processing of
2142 Part_Of now depends on wherer the object is a constant or
2143 a variable. Add processing for pragmas Depends and Global
2144 when they apply to a single concurrent object. Verify that a
2145 variable which is part of a single concurrent type has full
2146 default initialization. Set/restore the SPARK_Mode of a single
2147 concurrent object.
2148 (Analyze_Protected_Contract): New routine.
2149 * contracts.ads (Add_Contract_Item): Update the comment on usage.
2150 (Analyze_Object_Contract): Update the comment on usage.
2151 (Analyze_Protected_Contract): New routine.
2152 (Analyze_Task_Contract): Update the comment on usage.
2153 * einfo.adb Part_Of_Constituents now uses Elist10.
2154 (Anonymous_Object): New routine.
2155 (Contract): Code cleanup.
2156 (Has_Option): Remove the assumption that the only simple
2157 option is External.
2158 (Is_Synchronized_State): New routine.
2159 (Part_Of_Constituents): This attribute applies to
2160 variables and uses Elist10.
2161 (Set_Anonymous_Object): New routine.
2162 (Set_Contract): Code cleanup.
2163 (Set_Part_Of_Constituents): This attribute applies to variables and
2164 uses Elist10.
2165 (Set_SPARK_Aux_Pragma): Code cleanup.
2166 (Set_SPARK_Aux_Pragma_Inherited): Code cleanup.
2167 (Set_SPARK_Pragma): Code cleanup. This attribute applies to
2168 variables.
2169 (Set_SPARK_Pragma_Inherited): Code cleanup. This
2170 attribute applies to variables.
2171 (SPARK_Aux_Pragma): Code cleanup.
2172 (SPARK_Aux_Pragma_Inherited): Code cleanup.
2173 (SPARK_Pragma): Code cleanup. This attribute applies to variables.
2174 (SPARK_Pragma_Inherited): Code cleanup. This attribute applies
2175 to variables.
2176 (Write_Field9_Name): Remove the output for Part_Of_Constituents.
2177 (Write_Field10_Name): Add output for Part_Of_Constituents.
2178 (Write_Field30_Name): Add output for Anonymous_Object.
2179 (Write_Field34_Name): Output SPARK_Pragma
2180 for protected types and variables.
2181 * einfo.ads: New attributes Anonymous_Object and
2182 Is_Synchronized_State along with usage in entities. Update
2183 the documentation of attributes Contract Encapsulating_State
2184 Part_Of_Constituents SPARK_Aux_Pragma SPARK_Aux_Pragma_Inherited
2185 SPARK_Pragma SPARK_Pragma_Inherited (Anonymous_Object): New
2186 routine along with pragma Inline.
2187 (Is_Synchronized_State): New routine.
2188 (Set_Anonymous_Object): New routine along with pragma Inline.
2189 * freeze.adb (Freeze_Record_Type): Ensure that a non-synchronized
2190 record does not have synchronized components.
2191 * sem_ch3.adb (Analyze_Declarations): Code cleanup. Analyze the
2192 contract of protected units.
2193 * sem_ch9.adb Add with and use clauses for Sem_Prag. Code cleanup.
2194 (Analyze_Single_Protected_Declaration): Reimplemented.
2195 (Analyze_Single_Task_Declaration): Reimplemented.
2196 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Part_Of
2197 can now apply to a single concurrent type declaration. Rely on
2198 Insert_Pragma to place the pragma. Update the error message on
2199 usage to reflect the new context.
2200 (Insert_Pragma): When inserting
2201 pragmas for a protected or task type, create a definition if
2202 the type lacks one.
2203 * sem_elab.adb (Check_A_Call): Code cleanup. Issue error message
2204 related to elaboration issues for SPARK when SPARK_Mode is "on"
2205 and the offending entity comes from source.
2206 * sem_prag.adb (Analyze_Abstract_State): Add new flag
2207 Synchronous_Seen. Update the analysis of simple options Externa,
2208 Ghost and Synchronous. Update various error messages to reflect
2209 the use of single concurrent types.
2210 (Analyze_Depends_Global): Pragmas Depends and Global can now apply to
2211 a single task type or a single concurrent object created for a task
2212 type.
2213 (Analyze_Depends_In_Decl_Part): Do not push a scope when the
2214 context is a single concurrent object. (Analyze_Part_Of):
2215 Moved out of Analyze_Pragma. The routine has a new profile
2216 and comment on usage.
2217 (Analyze_Part_Of_In_Decl_Part): New routine.
2218 (Analyze_Part_Of_Option): Update the call to Analyze_Part_Of.
2219 (Analyze_Pragma): Pragma Abstract_State can
2220 now carry simple option Synchronous. Pragma Part_Of can now
2221 apply to a single concurrent type declaration. The analysis
2222 of pragma Part_Of is delayed when the context is a single
2223 concurrent object.
2224 (Analyze_Refined_Depends_In_Decl_Part): Use the anonymous object when
2225 the context is a single concurren type.
2226 (Analyze_Refined_Global_In_Decl_Part): Use the
2227 anonymous object when the context is a single concurren type.
2228 (Check_Ghost_Constituent): Removed.
2229 (Check_Matching_Constituent): Renamed to Match_Constituent.
2230 (Check_Matching_State): Renamed to Match_State.
2231 (Collect_Constituent): Update the comment
2232 on usage. Verify various legality rules related to ghost and
2233 synchronized entities.
2234 (Find_Related_Declaration_Or_Body): A single task declaration is no
2235 longer a valid context for a pragma.
2236 (Fix_Msg): Moved to Sem_Util.
2237 (Process_Overloadable): Add processing for single task objects.
2238 (Process_Visible_Part): Add processing for single concurrent
2239 types.
2240 (Relocate_Pragmas_To_Anonymous_Object): New routine.
2241 * sem_prag.ads Add new table Pragma_On_Anonymous_Object_OK.
2242 (Analyze_Part_Of_In_Decl_Part): New routine.
2243 (Relocate_Pragmas_To_Anonymous_Object): New routine.
2244 * sem_util.adb (Defining_Entity): Code cleanup.
2245 (Fix_Msg): Moved from Sem_Prag and augmented to handle
2246 mode replacements.
2247 (Has_Full_Default_Initialization): New routine.
2248 (Is_Descendant_Of_Suspension_Object): Moved out of
2249 Is_Effectively_Volatile.
2250 (Is_Single_Concurrent_Object): New routine.
2251 (Is_Single_Concurrent_Type): New routine.
2252 (Is_Single_Concurrent_Type_Declaration): New routine.
2253 (Is_Synchronized_Object): New routine.
2254 (Yields_Synchronized_Object): New routine.
2255 * sem_util.ads (Fix_Msg): Moved form Sem_Prag. Update the
2256 comment on usage.
2257 (Has_Full_Default_Initialization): New routine.
2258 (Is_Single_Concurrent_Object): New routine.
2259 (Is_Single_Concurrent_Type): New routine.
2260 (Is_Single_Concurrent_Type_Declaration): New routine.
2261 (Is_Synchronized_Object): New routine.
2262 (Yields_Synchronized_Object): New routine.
2263 * snames.ads-tmpl: Add name Synchronous.
2264
22652015-10-26 Jerome Lambourg <lambourg@adacore.com>
2266
2267 * sysdep.c (__gnat_get_task_options): Refine the workaround for
2268 the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the
2269 value of VX_DEALLOC_TCB in RTP mode, the macro value not being
2270 defined in the headers.
2271 * g-arrspl.ads: Fix typo.
2272
22732015-10-26 Jerome Lambourg <lambourg@adacore.com>
2274
2275 * sysdep.c (__gnat_get_task_options): Workaround a VxWorks
2276 bug where VX_DEALLOC_TCB task option is forbidden when calling
2277 taskCreate but allowed in VX_USR_TASK_OPTIONS.
2278
22792015-10-26 Javier Miranda <miranda@adacore.com>
2280
2281 * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): New subprogram.
2282
22832015-10-26 Ed Schonberg <schonberg@adacore.com>
2284
2285 * sem_ch4.adb (Constant_Indexing_OK): New predicate, subsidiary
2286 of Try_Container_Indexing, that implements the name resolution
2287 rules given in RM 4.1.6 (13-15).
2288
22892015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2290
2291 * sem_ch3.adb, sem_util.adb: Minor reformatting.
2292
22932015-10-26 Javier Miranda <miranda@adacore.com>
2294
2295 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
2296 generating C code.
2297 * sem_ch3.adb: Fix typos.
2298
22992015-10-26 Bob Duff <duff@adacore.com>
2300
2301 * sem_ch13.adb (Build_Predicate_Functions): Change the
2302 structure of the predicate functions to reflect the requirements
2303 of AI12-0071.
2304 (Add_Condition): New procedure to do the "and-then-ing" in Add_Call
2305 and Add_Predicates.
2306 * einfo.ads (Static_Real_Or_String_Predicate): Change the
2307 documentation to reflect the new structure.
2308 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
2309 Change the walking of the predicate expression to reflect the
2310 new structure.
2311 * exp_util.adb: Minor comment fix.
2312
23132015-10-26 Bob Duff <duff@adacore.com>
2314
2315 * s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
2316 * sem_util.ads, sem_util.adb (All_Composite_Constraints_Static):
2317 New function to check that all relevant constraints are static.
2318 * sem_aggr.adb (Resolve_Array_Aggregate): Call
2319 All_Composite_Constraints_Static on the bounds of named array
2320 aggregates.
2321 * sem_ch3.adb (Analyze_Subtype_Declaration): Call
2322 All_Composite_Constraints_Static if the type is composite and
2323 the subtype is constrained.
2324
23252015-10-26 Javier Miranda <miranda@adacore.com>
2326
2327 * exp_ch6.adb (Expand_N_Subprogram_Declaration): Skip the frontend
2328 transformation of functions that return a constrained array into
2329 a procedure when they are unchecked_conversion instances.
2330
23312015-10-26 Gary Dismukes <dismukes@adacore.com>
2332
2333 * s-os_lib.ads: Minor reformatting/rewording.
2334
23352015-10-26 Arnaud Charlet <charlet@adacore.com>
2336
2337 * debug.adb: Introduce debug flag -gnatd.5.
2338
23392015-10-26 Pascal Obry <obry@adacore.com>
2340
2341 * s-os_lib.ads, s-os_lib.adb (Kill): New routine. This routine
2342 makes visible support for killing processes in expect.c.
2343 * expect.c (__gnat_kill): Removed from here.
2344 * adaint.c (__gnat_kill): Added here to be usable in the compiler
2345 (System.OS_Lib).
2346 * make.adb (Sigint_Intercepted): Use the Kill routine from
2347 System.OS_Lib.
2348
23492015-10-26 Arnaud Charlet <charlet@adacore.com>
2350
2351 * einfo.ads, einfo.adb, exp_unst.adb (Needs_Typedef,
2352 Set_Needs_Typedef): Removed, no longer used.
2353
23542015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2355
2356 * einfo.adb (First_Component): Update the assertion to allow
2357 for concurrent types.
2358 (First_Component_Or_Discriminant): Update the assertion to allow for
2359 concurrent types.
2360 * einfo.ads: Update the documentation of attributes First_Component
2361 and First_Component_Or_Discriminant along with uses in entities.
2362
23632015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2364
2365 * sem_res.adb (Resolve_Actuals): An effectively
2366 volatile object may act as an actual when the corresponding
2367 formal is of a non-scalar effectively volatile type, not just
2368 a non-scalar volatile type.
2369
23702015-10-26 Bob Duff <duff@adacore.com>
2371
2372 * sinfo.ads, sem_util.ads: Update comments.
2373
23742015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2375
2376 * sem_prag.adb (Analyze_Refined_Depends_Global_Post): When dealing with
2377 protected entries or protected subprograms, use the enclosing protected
2378 type to ensure that the protected type declaration is declared
2379 in a package spec. Remove an obsolete attempt to ensure the
2380 aggregate for of pragma Refined_State as this routine is never
2381 called in that case.
2382
23832015-10-26 Ed Schonberg <schonberg@adacore.com>
2384
2385 * exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For
2386 an element iterator loop, the element is a constant if the
2387 container object is a constant, even if the container type has
2388 a Variable_Indexing aspect.
2389
23902015-10-26 Bob Duff <duff@adacore.com>
2391
2392 * s-fileio.adb (Fopen_Mode): Use "r+" for Out_File/Stream_IO,
2393 so the file won't be truncated on 'fopen', as required by
2394 AI95-00283-1.
2395
23962015-10-26 Bob Duff <duff@adacore.com>
2397
2398 * gnat1drv.adb, prj.adb, sem_ch6.adb, s-regpat.adb,
2399 sem_prag.adb: Fix typos.
2400 * einfo.ads, restrict.ads: Minor comment fixes.
2401 * err_vars.ads, sem_util.adb, errout.ads: Code clean up.
2402
24032015-10-26 Ed Schonberg <schonberg@adacore.com>
2404
2405 * sem_ch5.adb (Analyze_Assignment): Do not check that the
2406 Left-hand side is legal in an inlined body, check is done on
2407 the original template.
2408
24092015-10-26 Ed Schonberg <schonberg@adacore.com>
2410
2411 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): New
2412 subprogram to retrieve by name the possibly overloaded set of
2413 primitive operations of a type.
2414 * sem_ch4.adb (Try_Container_Indexing): Use
2415 Find_Primitive_Operations to handle overloaded indexing operations
2416 of a derived type.
2417
24182015-10-26 Arnaud Charlet <charlet@adacore.com>
2419
2420 * osint-c.ads: Minor comment update.
2421
24222015-10-26 Arnaud Charlet <charlet@adacore.com>
2423
2424 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2425 s-osinte-darwin.ads, s-osinte-android.ads, s-osinte-freebsd.ads,
2426 s-taprop-posix.adb (Get_Page_Size): C function returns an int. Adjust
2427 callers accordingly.
2428
24292015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2430
2431 * exp_ch4.adb (Is_OK_Object_Reference): New routine.
2432 (Substitute_Valid_Check): Perform the 'Valid subsitution but do
2433 not suggest the use of the attribute if the left hand operand
2434 does not denote an object as it leads to illegal code.
2435
24362015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2437
2438 * exp_unst.adb: Minor reformatting.
2439
24402015-10-26 Ed Schonberg <schonberg@adacore.com>
2441
2442 * sem_ch6.adb: Improve error msg.
2443
24442015-10-26 Ed Schonberg <schonberg@adacore.com>
2445
2446 * sem_disp.adb (Check_Controlling_Type): Handle properly the
2447 case of an incomplete type whose full view is tagged, when a
2448 primitive operation of the type is declared between the two views.
2449
24502015-10-26 Bob Duff <duff@adacore.com>
2451
2452 * adaint.c (__gnat_locate_exec_on_path): If the PATH environment
2453 variable is not set, do not return NULL, because we can still find
2454 the executable if it includes a directory name.
2455
24562015-10-26 Ed Schonberg <schonberg@adacore.com>
2457
2458 * sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
2459 elaboration warnings are enabled, emit proper warning header
2460 when triggered by an access attribute.
2461
24622015-10-26 Steve Baird <baird@adacore.com>
2463
2464 * exp_ch11.adb: If CodePeer_Mode is true, generate simplified
2465 SCIL for exception declarations.
2466 * exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
2467 is True, initialize the Full_Name component of the exception
2468 record to null instead of to the result of an unchecked
2469 conversion.
2470
24712015-10-26 Ed Schonberg <schonberg@adacore.com>
2472
2473 * exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
2474 that denotes a function returning a constrained array, that has
2475 been rewritten as a procedure.
2476 * makeutl.ads: Minor edit.
2477
24782015-10-26 Yannick Moy <moy@adacore.com>
2479
2480 * lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
2481 procedure for traversal.
2482 (Add_SPARK_Xrefs): Remove debugging code.
2483 (Traverse_Declaration_Or_Statement): Call the new traversal
2484 procedure.
2485
24862015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2487
2488 * sem_prag.adb (Analyze_Pragma): Pragma
2489 Extensions_Visible can now appear on an abstract subprogram
2490 declaration.
2491
24922015-10-26 Yannick Moy <moy@adacore.com>
2493
2494 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
2495 denote a reference to a constant which may have variable input, and
2496 thus may be treated as a variable in GNATprove, instead of the
2497 character 'c' used for constants.
2498
24992015-10-26 Ed Schonberg <schonberg@adacore.com>
2500
2501 * sem_util.adb (Object_Access_Level): Only aliased formals of
2502 functions have the accessibility level of the point of call;
2503 aliased formals of procedures have the same level as unaliased
2504 formals.
2505 (New_Copy_Tree): Add guard on copying itypes. From code reading.
2506
25072015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2508
2509 * inline.adb: Minor reformatting.
2510
25112015-10-26 Yannick Moy <moy@adacore.com>
2512
2513 * get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
2514 assertion.
2515 * lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
2516 New procedure to factor duplicated code and add
2517 treatment of protected entries.
2518 (Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
2519 procedure Traverse_Declaration_Or_Statement. Use same character used in
2520 normal xrefs for SPARK xrefs, for a given entity used as scope.
2521 * spark_xrefs.ads Document character used for entries.
2522 * sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
2523 introduction of declarations and statements by the expansion, between
2524 two otherwise consecutive loop pragmas.
2525 * sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
2526 function.
2527 (Is_Descendant_Of_Suspension_Object): nested function lifted.
2528
25292015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2530
2531 * sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
2532 when its prefix denotes a constant, an enumeration literal or
2533 an enumeration type. Use the expression of the attribute in the
2534 enumeration type form, otherwise use the prefix to fold.
2535
25362015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2537
2538 * aspects.adb Add an entry for entry bodies in table
2539 Has_Aspect_Specifications_Flag.
2540 (Aspects_On_Body_Or_Stub_OK): Entry bodies now allow for certain
2541 aspects.
2542 * contracts.adb (Add_Contract_Items): Code cleanup. Add
2543 processing for entry bodies, entry declarations and task units.
2544 (Analyze_Subprogram_Body_Contract): Renamed
2545 to Analyze_Entry_Or_Subprogram_Body_Contract. Do not
2546 analyze the contract of an entry body unless annotating the
2547 original tree.
2548 (Analyze_Subprogram_Contract): Renamed to
2549 Analyze_Entry_Or_Subprogram_Contract. Do not analyze the contract
2550 of an entry declaration unless annotating the original tree.
2551 (Analyze_Task_Contract): New routine.
2552 * contracts.ads (Add_Contract_Item): Update the comment on usage.
2553 (Analyze_Package_Body_Contract): Update comment on usage.
2554 (Analyze_Package_Contract): Update the comment on usage.
2555 (Analyze_Subprogram_Body_Contract): Renamed to
2556 Analyze_Entry_Or_Subprogram_Body_Contract.
2557 (Analyze_Subprogram_Body_Stub_Contract): Update the comment on usage.
2558 (Analyze_Subprogram_Contract): Renamed to
2559 Analyze_Entry_Or_Subprogram_Contract.
2560 (Analyze_Task_Contract): New routine.
2561 * einfo.adb (Contract): Restructure the assertion to include
2562 entries and task units.
2563 (SPARK_Pragma): This attribute now applies to operators.
2564 (SPARK_Pragma_Inherited): This flag now applies to operators.
2565 (Set_Contract): Restructure the assertion to include entries and task
2566 units.
2567 (Set_SPARK_Pragma): This attribute now applies to operators.
2568 (Set_SPARK_Pragma_Inherited): This flag now applies to operators.
2569 (Write_Field34_Name): Write out all Ekinds that have a contract.
2570 (Write_Field40_Name): SPARK_Pragma now applies to operators.
2571 * einfo.ads: Update the documentation of attribute Contract along
2572 with usage in nodes. Update the documentation of attributes
2573 SPARK_Pragma and SPARK_Pragma_Inherited.
2574 * exp_ch6.adb (Freeze_Subprogram): Update the call to
2575 Analyze_Subprogram_Contract.
2576 * par-ch9.adb (P_Entry_Barrier): Do not parse keyword "is" as it
2577 is not part of the entry barrier production.
2578 (P_Entry_Body): Parse the optional aspect specifications. Diagnose
2579 misplaced aspects.
2580 * sem_attr.adb (Analyze_Attribute_Old_Result): Update the call
2581 to Find_Related_Subprogram_Or_Body.
2582 * sem_aux.adb (Unit_Declaration_Node) Add an entry for entry
2583 declarations and bodies.
2584 * sem_ch3.adb (Analyze_Declarations): Analyze the contracts of
2585 entry declarations, entry bodies and task units.
2586 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2587 Update the call to Analyze_Subprogram_Body_Contract.
2588 (Analyze_Subprogram_Body_Helper): Update the call to
2589 Analyze_Subprogram_Body_Contract.
2590 * sem_ch9.adb (Analyze_Entry_Body): Analyze the aspect
2591 specifications and the contract.
2592 * sem_ch10.adb (Analyze_Compilation_Unit): Update the call to
2593 Analyze_Subprogram_Contract.
2594 * sem_ch12.adb (Save_References_In_Pragma): Update the call to
2595 Find_Related_Subprogram_Or_Body.
2596 * sem_ch13.adb (Analyze_Aspects_On_Body_Or_Stub): Use
2597 Unique_Defining_Entity rather than rummaging around in nodes.
2598 (Diagnose_Misplaced_Aspects): Update comment on usage. Update the
2599 error messages to accomondate the increasing number of contexts.
2600 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2601 Update the call to Find_Related_Subprogram_Or_Body.
2602 (Analyze_Depends_Global): Update the call to
2603 Find_Related_Subprogram_Or_Body. Add processing for entry
2604 declarations.
2605 (Analyze_Depends_In_Decl_Part): Update the call
2606 to Find_Related_Subprogram_Or_Body. Task units have no formal
2607 parameters to install. (Analyze_Global_In_Decl_Part): Update
2608 the call to Find_Related_Subprogram_Or_Body. Task units have no
2609 formal parameters to install.
2610 (Analyze_Global_Item): Use Fix_Msg to handle the increasing number of
2611 contexts.
2612 (Analyze_Pragma): Update the call to Find_Related_Subprogram_Or_Body.
2613 Perform full analysis when various pragmas appear in an entry body.
2614 (Analyze_Pre_Post_Condition): Update the call to
2615 Find_Related_Subprogram_Or_Body. Perform full analysis when the pragma
2616 appears in an entry body.
2617 (Analyze_Pre_Post_Condition_In_Decl_Part): Update the call to
2618 Find_Related_Subprogram_Or_Body.
2619 (Analyze_Refined_Depends_Global_Post): Update
2620 the call to Find_Related_Subprogram_Or_Body. Use
2621 Fix_Msg to handle the increasing number of contexts.
2622 (Analyze_Refined_Depends_In_Decl_Part): Update
2623 the call to Find_Related_Subprogram_Or_Body. Use
2624 Unique_Defining_Entity to obtain the entity of the
2625 spec. Use Fix_Msg to handle the increasing number of contexts.
2626 (Analyze_Refined_Global_In_Decl_Part): Update the call to
2627 Find_Related_Subprogram_Or_Body. Use Unique_Defining_Entity to obtain
2628 the entity of the spec. Use Fix_Msg to handle the increasing number of
2629 contexts.
2630 (Analyze_Test_Case_In_Decl_Part): Update the call to
2631 Find_Related_Subprogram_Or_Body.
2632 (Check_Dependency_Clause): Use Fix_Msg to handle the increasing number
2633 of contexts.
2634 (Check_Mode_Restriction_In_Enclosing_Context): Use
2635 Fix_Msg to handle the increasing number of contexts.
2636 (Collect_Subprogram_Inputs_Outputs): Use the refined
2637 versions of the pragmas when the context is an entry body or
2638 a task body.
2639 (Find_Related_Subprogram_Or_Body): Renamed to
2640 Find_Related_Declaration_Or_Body. Add processing for entries
2641 and task units.
2642 (Fix_Msg): New routine.
2643 (Role_Error): Use Fix_Msg to handle the increasing number of contexts.
2644 * sem_prag.ads (Find_Related_Subprogram_Or_Body): Renamed to
2645 Find_Related_Declaration_Or_Body. Update the comment on usage.
2646 * sem_util.adb (Is_Entry_Body): New routine.
2647 (Is_Entry_Declaration): New routine.
2648 * sem_util.ads (Is_Entry_Body): New routine.
2649 (Is_Entry_Declaration): New routine.
2650
26512015-10-26 Ed Schonberg <schonberg@adacore.com>
2652
2653 * inline.adb (Has_Excluded_Declaration): A subtype declaration
2654 with a predicate aspect generates a subprogram, and therefore
2655 prevents the inlining of the enclosing subprogram.
2656 * osint.ads: Fix typo.
2657
2658
26592015-10-26 Ed Schonberg <schonberg@adacore.com>
2660
2661 * sem_case.adb (Check_Choice_Set): Choose initial choice range
2662 below low bound of type, to prevent spurious errors on case
2663 statements whose expressions have an integer subtype with a
2664 static predicate.
2665 * sem_util.ads: Fix typo.
2666
26672015-10-26 Ed Schonberg <schonberg@adacore.com>
2668
2669 * exp_ch4.adb (Expand_N_Case_Expression): In the scope of a
2670 predicate function, delay the expansion of the expression only
2671 if the target type has a specified Static_ Predicate aspect,
2672 because the expression is processed later. A dynamic predicate
2673 must be expanded in standard fashion.
2674
26752015-10-26 Claire Dross <dross@adacore.com>
2676
2677 * a-nudira.ads: Remove SPARK_Mode as it currently causes an error.
2678
26792015-10-26 Arnaud Charlet <charlet@adacore.com>
2680
2681 * sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb,
2682 sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb:
2683 Fix typos.
2684
26852015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2686
2687 * sem_ch13.adb (Analyze_Aspect_Specifications): The processing
2688 for aspects Abstract_State, Ghost, Initial_Condition, Initializes
2689 and Refined_State no longer have to take SPARK_Mode into account.
2690 (Insert_After_SPARK_Mode): Removed.
2691 (Insert_Pragma): Update profile and comment on usage. The routine can
2692 now insert a pragma after the "header" of an instance.
2693 * sem_prag.adb (Analyze_If_Available): New routine.
2694 (Analyze_Pragma): Do not reset the Analyzed flag of various
2695 SPARK pragmas as they use the Is_Analyzed_Pragma attribute to
2696 avoid reanalysis. Various pragmas now trigger the analysis
2697 of related pragmas that depend on or are dependent on the
2698 current pragma. Remove the declaration order checks related
2699 to pragmas Abstract_State, Initial_Condition and Initializes.
2700 (Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and
2701 Volatile_Function prior to analyzing the pre/postcondition.
2702 (Check_Declaration_Order): Removed.
2703 (Check_Distinct_Name): Ensure that a potentially duplicated pragma
2704 Test_Case is not the pragma being analyzed.
2705 (Is_Followed_By_Pragma): Removed.
2706
27072015-10-26 Ed Schonberg <schonberg@adacore.com>
2708
2709 * sem_ch6.adb: Handle subprogram bodies without previous specs.
2710
27112015-10-26 Claire Dross <dross@adacore.com>
2712
2713 * a-nudira.ads: Specify appropriate SPARK_Mode so that the unit
2714 can be used in SPARK code.
2715
27162015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2717
2718 * contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze
2719 pragmas Refined_Global and Refined_Depends because these pragmas
2720 are now fully analyzed when encountered.
2721 (Inherit_Pragma): Update the call to attribute Is_Inherited.
2722 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard
2723 to prevent reanalysis. Mark the pragma as analyzed at the end of
2724 the processing.
2725 (Analyze_Depends_Global): New parameter profile
2726 and comment on usage. Do not fully analyze the pragma, this is
2727 now done at the outer level.
2728 (Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis.
2729 Mark the pragma as analyzed at the end of the processing.
2730 (Analyze_External_Property_In_Decl_Part): Add a guard to prevent
2731 reanalysis. Mark the pragma as analyzed at the end of the processing.
2732 (Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark
2733 the pragma as analyzed at the end of the processing.
2734 (Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent
2735 reanalysis. Mark the pragma as analyzed at the end of the processing.
2736 (Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis.
2737 Mark the pragma as analyzed at the end of the processing.
2738 (Analyze_Pragma): Reset the Analyzed flag on various pragmas that
2739 require delayed full analysis. Contract_Cases is now analyzed
2740 immediately when it applies to a subprogram body stub. Pragmas Depends,
2741 Global, Refined_Depends and Refined_Global are now analyzed
2742 in pairs when they appear in a subprogram body [stub].
2743 (Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to
2744 prevent reanalysis. Mark the pragma as analyzed at the end of
2745 the processing.
2746 (Analyze_Refined_Depends_Global_Post): Update the comment on usage.
2747 (Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent
2748 reanalysis. Mark the pragma as analyzed at the end of the processing.
2749 (Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent
2750 reanalysis. Mark the pragma as analyzed at the end of the processing.
2751 (Analyze_Refined_State_In_Decl_Part): Add a guard to prevent
2752 reanalysis. Mark the pragma as analyzed at the end of the processing.
2753 (Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis.
2754 Mark the pragma as analyzed at the end of the processing.
2755 (Is_Followed_By_Pragma): New routine.
2756 * sinfo.adb (Is_Analyzed_Pragma): New routine.
2757 (Is_Inherited): Renamed to Is_Inherited_Pragma.
2758 (Set_Is_Analyzed_Pragma): New routine.
2759 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma.
2760 * sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma
2761 and update occurrences in nodes.
2762 (Is_Analyzed_Pragma): New routine along with pragma Inline.
2763 (Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline.
2764 (Set_Is_Analyzed_Pragma): New routine along with pragma Inline.
2765 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along
2766 with pragma Inline.
2767
27682015-10-26 Ed Schonberg <schonberg@adacore.com>
2769
2770 * par-ch3.adb (P_Component_Items): When style checks are enabled,
2771 apply them to component declarations in a record type declaration
2772 or extension.
2773
27742015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2775
2776 * sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
2777 is Standard_Standard.
2778
27792015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2780
2781 * sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
2782 context for a reference to an effectively volatile object.
2783 (Resolve_Actuals): Add references to SPARK RM.
2784 (Within_Procedure_Call): Removed.
2785 (Within_Subprogram_Call): New routine.
2786
27872015-10-26 Ed Schonberg <schonberg@adacore.com>
2788
2789 * sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
2790 formal parameter in an aggregate does not need an accesibility
2791 check only if the formal is aliased.
2792
27932015-10-26 Claire Dross <dross@adacore.com>
2794
2795 * sem_aux.ads (Number_Components): Can return 0 when called on
2796 an empty record.
2797
27982015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2799
2800 * contracts.adb (Analyze_Subprogram_Body_Contract): Use
2801 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2802 * einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
2803 Node41 respectively.
2804 (SPARK_Aux_Pragma): Update the assertion and node querry.
2805 (SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
2806 (SPARK_Pragma): Update the assertion and node query.
2807 (SPARK_Pragma_Inherited): Update the assertion and node query.
2808 (Set_SPARK_Aux_Pragma): Update the assertion and node setting.
2809 (Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
2810 (Set_SPARK_Pragma): Update the assertion and node setting.
2811 (Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
2812 (Write_Field32_Name): Remove the output for SPARK_Pragma.
2813 (Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
2814 (Write_Field40_Name): Add output for SPARK_Pragma.
2815 (Write_Field41_Name): Add output for SPARK_Aux_Pragma.
2816 * einfo.ads Rewrite the documentation on attributes
2817 SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
2818 SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
2819 * exp_ch4.adb (Create_Anonymous_Master): Use
2820 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2821 * exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
2822 function as such.
2823 (Expand_N_Task_Body): Mark the task body as such.
2824 (Expand_N_Task_Type_Declaration): Mark the task body as such.
2825 * exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
2826 of Corresponding_Spec_Of.
2827 * sem_attr.adb (Analyze_Attribute_Old_Result): Use
2828 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2829 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
2830 functions do not inherit the SPARK_Mode from the context.
2831 (Build_Subprogram_Declaration): The matching spec is now marked
2832 as a source construct to mimic the original stand alone body.
2833 * sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
2834 * sem_ch9.adb Add with and use clauses for Contracts.
2835 (Analyze_Entry_Body): An entry body freezes the contract of
2836 the nearest enclosing package body. The entry body now inherits
2837 the SPARK_Mode from the context.
2838 (Analyze_Entry_Declaration): A protected entry declaration now inherits
2839 the SPARK_Mode from the context.
2840 (Analyze_Protected_Body): A protected body freezes
2841 the contract of the nearest enclosing package body. Set the
2842 Etype of a protected body as this is neede for proper aspect
2843 analysis. Protected bodies can now carry meaningful aspects and
2844 those are now analyzed.
2845 (Analyze_Protected_Type_Declaration): A protected type now inherits the
2846 SPARK_Mode from the context.
2847 (Analyze_Task_Body): A task body freezes the contract of the
2848 nearest enclosing package body. Set the Etype of a task body
2849 as this is needed for proper aspect analysis. A task body
2850 now inherits the SPARK_Mode from the context. Task bodies
2851 can now carry meaningful aspects and those are now analyzed.
2852 (Analyze_Task_Type_Declaration): A task type declaration now
2853 inherits the SPARK_Mode of from the context.
2854 * sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
2855 stubs can now carry meaningful aspects.
2856 (Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
2857 aspects.
2858 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
2859 Warnings now use routine Insert_Pragma as means of insertion into
2860 the tree.
2861 (Insert_After_SPARK_Mode): Clean up documentation.
2862 (Insert_Pragma): Clean up documentation. The routine is now
2863 capable of operating on synchronized units.
2864 * sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
2865 (Analyze_Contract_Cases_In_Decl_Part): Use
2866 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2867 (Analyze_Depends_Global): Use Unique_Defining_Entity instead
2868 of Corresponding_Spec_Of.
2869 (Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
2870 Corresponding_Spec_Of.
2871 (Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
2872 Corresponding_Spec_Of.
2873 (Analyze_Pragma): Use Unique_Defining_Entity instead of
2874 Corresponding_Spec_Of.
2875 Update the detection of an illegal pragma Ghost when it applies
2876 to a task or protected unit. Reimplement the handling of
2877 pragma SPARK_Mode.
2878 (Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
2879 instead of Corresponding_Spec_Of.
2880 (Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
2881 Corresponding_Spec_Of.
2882 (Check_Library_Level_Entity): Update the comment on usage.
2883 Reimplemented to offer a more specialized errror context.
2884 (Check_Pragma_Conformance): Update profile and comment on usage.
2885 Handle error message output on single protected or task units.
2886 (Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
2887 instead of Corresponding_Spec_Of.
2888 (Process_Body): New routine.
2889 (Process_Overloadable): New routine.
2890 (Process_Private_Part): New routine.
2891 (Process_Statement_Part): New routine.
2892 (Process_Visible_Part): New routine.
2893 (Set_SPARK_Context): New routine.
2894 (Set_SPARK_Flags): Removed.
2895 * sem_util.adb (Corresponding_Spec_Of): Removed.
2896 (Unique_Entity): Reimplemented to handle many more cases.
2897 * sem_util.ads (Corresponding_Spec_Of): Removed.
2898 (Unique_Defining_Entity): Update the comment on usage.
2899 * sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
2900 (Is_Task_Body_Procedure): New routine.
2901 (Set_Is_Entry_Barrier_Function): Update the assertion.
2902 (Set_Is_Task_Body_Procedure): New routine.
2903 * sinfo.adb Update the documentation of attribute
2904 Is_Entry_Barrier_Function along with use in nodes. Add new
2905 attribute Is_Task_Body_Procedure along with use in nodes.
2906 (Is_Task_Body_Procedure): New routine along with pragma Inline.
2907 (Set_Is_Task_Body_Procedure): New routine along with pragma Inline.
2908
29092015-10-26 Gary Dismukes <dismukes@adacore.com>
2910
2911 * sem_ch13.adb: Minor reformatting.
2912
29132015-10-26 Steve Baird <baird@adacore.com>
2914
2915 * exp_disp.adb: Omit most dispatch table initialization code
2916 if Generate_SCIL is true.
2917
29182015-10-26 Arnaud Charlet <charlet@adacore.com>
2919
2920 * sinfo.ads, exp_ch3.adb: Revert previous change.
2921 (Build_Record_Init_Proc): Do not build an aggregate if
2922 Modify_Tree_For_C.
2923
29242015-10-26 Ed Schonberg <schonberg@adacore.com>
2925
2926 * sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
2927 body whose signature is type conformant with a previous expression
2928 function.
2929
29302015-10-26 Bob Duff <duff@adacore.com>
2931
2932 * treepr.adb: Code clean up.
2933
29342015-10-26 Eric Botcazou <ebotcazou@adacore.com>
2935
2936 * freeze.adb (Check_Component_Storage_Order): Skip a record
2937 component if it has Complex_Representation.
2938 (Freeze_Record_Type): If the type has Complex_Representation, skip the
2939 regular treatment of Scalar_Storage_Order attribute and instead issue
2940 a warning if it is present.
2941
29422015-10-26 Bob Duff <duff@adacore.com>
2943
2944 * sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
2945 aspect, make sure an implicitly declared interpretation is
2946 overridden by an explicit one.
2947 * sem_util.ads: Update comment.
2948
29492015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2950
2951 * sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
2952 bodies should "freeze" the contract of the nearest enclosing
2953 package body.
2954
29552015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
2956
2957 * adaint.c (__gnat_lwp_self): Replace current implementation re-using
2958 the Linux one, which uses an __NR_gettid syscall rather than
2959 pthread_self.
2960
29612015-10-26 Arnaud Charlet <charlet@adacore.com>
2962
2963 * sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
2964 Build_Record_Init_Proc): Do not inline init procs when
2965 Modify_Tree_For_C is True.
2966
29672015-10-26 Bob Duff <duff@adacore.com>
2968
2969 * errout.ads: Minor comment fix.
2970 * einfo.ads: Minor style fix.
2971
29722015-10-26 Bob Duff <duff@adacore.com>
2973
2974 * sem_ch3.adb (Derive_Interface_Subprogram): Fix
2975 Is_Abstract_Subprogram, which might have been calculated
2976 incorrectly, because we're passing Ultimate_Alias (Subp) (and
2977 its dispatching type) to Derive_Subprogram, instead of the true
2978 parent subprogram and type.
2979
29802015-10-26 Bob Duff <duff@adacore.com>
2981
2982 * sem_ch13.adb (Check_Iterator_Functions): When
2983 printing the "default iterator must be unique" error message,
2984 also print references to the places where the duplicates are
2985 declared. This makes the message clearer.
2986
29872015-10-26 Ed Schonberg <schonberg@adacore.com>
2988
2989 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
2990 Box_Present when the formal part is (others => <>) even though
2991 it is equivalent to a formal part (<>), because ASIS tools depend
2992 on the syntactic setting of this flag.
2993
29942015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2995
2996 * sem_ch13.adb: Minor reformatting.
2997 * einfo.ads: Minor typo.
2998
29992015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
3000
3001 * adaint.c (__gnat_open_new_temp): Use mkstemp on Android.
3002
30032015-10-26 Ed Schonberg <schonberg@adacore.com>
3004
3005 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
3006 * sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
3007 of Check_Indexing_Functions, to verify that a derived type with an
3008 Indexing aspect is not inheriting such an aspect from an ancestor.
3009 (Check_Indexing_Functions): Call Check_Inherited_Indexing within
3010 an instance.
3011
30122015-10-26 Gary Dismukes <dismukes@adacore.com>
3013
3014 * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
3015 typo corrections.
3016
30172015-10-26 Ed Schonberg <schonberg@adacore.com>
3018
3019 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
3020 recheck the consistency betwen the freeze point and the end of
3021 declarations for the expression in an aspect specification,
3022 because it was done already in the analysis of the generic.
3023 Furthermore, the delayed analysis of an aspect of the instance
3024 may produce spurious errors when the generic is a child unit
3025 that references entities in the parent (which might not be in
3026 scope at the freeze point of the instance).
3027
30282015-10-26 Yannick Moy <moy@adacore.com>
3029
3030 * sem_res.adb (Resolve_Call): Issue info message
3031 instead of warning when call cannot be inlined in GNATprove mode.
3032
30332015-10-26 Arnaud Charlet <charlet@adacore.com>
3034
3035 * exp_ch6.adb (Build_Procedure_Form): Use _result as the
3036 name of the extra parameter, cleaner than a random temp name.
3037 * gnat1drv.adb (Gnat1drv): Code clean up.
3038
30392015-10-24 Eric Botcazou <ebotcazou@adacore.com>
3040
3041 * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
3042 (build_unary_op): Likewise.
3043
30442015-10-23 Arnaud Charlet <charlet@adacore.com>
3045
3046 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
3047 * doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
3048 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3049 doc/gnat_ugn/gnat_and_program_execution.rst,
3050 doc/gnat_rm/implementation_defined_attributes.rst,
3051 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3052 doc/gnat_rm/representation_clauses_and_pragmas.rst,
3053 doc/gnat_rm/implementation_defined_pragmas.rst,
3054 doc/gnat_rm/about_this_guide.rst,
3055 doc/gnat_rm/implementation_of_ada_2012_features.rst,
3056 doc/gnat_rm/implementation_of_specific_ada_features.rst,
3057 doc/gnat_rm/implementation_defined_aspects.rst,
3058 doc/gnat_rm/implementation_advice.rst: Update documentation.
3059
30602015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3061
3062 * contracts.ads, contracts.adb: New unit.
3063 * exp_ch6.adb Add with and use clauses for Contracts.
3064 (Expand_Subprogram_Contract): Moved to Contracts.
3065 * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
3066 * sem_ch3.adb Add with and use clauses for Contracts.
3067 (Analyze_Object_Contract): Moved to Contracts.
3068 (Analyze_Declarations): Remove local variable Pack_Decl. Do not
3069 capture global references in contracts. Check the hidden states
3070 of a package body.
3071 * sem_ch6.adb Add with and use clauses in Contracts.
3072 (Analyze_Generic_Subprogram_Body): Do not capture global
3073 references in contracts.
3074 (Analyze_Subprogram_Body_Contract):
3075 Moved to Contracts.
3076 (Analyze_Subprogram_Body_Helper): Freeze the
3077 contract of the nearest enclosing package body. Always analyze
3078 the subprogram body contract. Do not expand the subprogram
3079 body contract.
3080 (Analyze_Subprogram_Contract): Moved to Contracts.
3081 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
3082 (Analyze_Subprogram_Contract): Moved to Contracts.
3083 * sem_ch7.adb Add with and use clauses for Contracts.
3084 (Analyze_Package_Body_Contract): Moved to Contracts.
3085 (Analyze_Package_Body_Helper): Freeze the contract of the
3086 nearest enclosing package body.
3087 (Analyze_Package_Contract): Moved to Contracts.
3088 * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
3089 (Analyze_Package_Contract): Moved to Contracts.
3090 * sem_ch10.adb Add with and use clauses for Contracts.
3091 (Analyze_Compilation_Unit): Do not capture global references
3092 in contracts.
3093 (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
3094 * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
3095 to Contracts.
3096 * sem_ch12.adb Add with and use clauses for Contracts.
3097 (Analyze_Subprogram_Instantiation): Update the call to
3098 Instantiate_Subprogram_Contract.
3099 (Instantiate_Package_Body):
3100 Do not copy the entity of the spec when creating an entity
3101 for the body. Construct a brand new defining identifier for
3102 the body and inherit the Comes_From_Source flag from the spec.
3103 (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
3104 and update all occurrences. Construct a brand new defining
3105 identifier for the body and inherit the Comes_From_Source
3106 flag from the spec.
3107 (Instantiate_Subprogram_Contract): Moved
3108 to Contracts.
3109 (Save_Global_References_In_Aspects): Moved to
3110 the spec of Sem_Ch12.
3111 (Save_Global_References_In_Contract):
3112 Moved to Contracts.
3113 * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
3114 the body of Sem_Ch12.
3115 (Save_Global_References_In_Contract):
3116 Moved to Contracts.
3117 * sem_prag.adb Add with and use clauses for Contracts.
3118 (Add_Item): Removed. All references to this routine have been
3119 replaced with calls to Append_New_Elmt.
3120 (Analyze_Constituent):
3121 Add special diagnostics for errors caused by freezing of
3122 contracts.
3123 (Analyze_Refined_State_In_Decl_Part): Add formal
3124 parameter Freeze_Id. Add new global variable Freeze_Posted.
3125 (Collect_Body_States): Removed.
3126 (Report_Unused_States): Removed.
3127 * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
3128 parameter Freeze_Id and update comment on usage.
3129 * sem_util.adb Remove with and use clauses for
3130 Sem_Ch12.
3131 (Add_Contract_Item): Moved to Contracts.
3132 (Check_Unused_Body_States): New routine.
3133 (Collect_Body_States):
3134 New routine.
3135 (Create_Generic_Contract): Moved to Contracts.
3136 (Inherit_Subprogram_Contract): Moved to Contracts.
3137 (Report_Unused_Body_States): New routine.
3138 * sem_util.ads (Add_Contract_Item): Moved to Contracts.
3139 (Check_Unused_Body_States): New routine.
3140 (Collect_Body_States): New routine.
3141 (Create_Generic_Contract): Moved to Contracts.
3142 (Inherit_Subprogram_Contract): Moved to Contracts.
3143 (Report_Unused_Body_States): New routine.
3144 * sinfo.adb (Is_Expanded_Contract): New routine.
3145 (Set_Is_Expanded_Contract): New routine.
3146 * sinfo.ads New attribute Is_Expanded_Contract along with
3147 placement in nodes.
3148 (Is_Expanded_Contract): New routine along
3149 with pragma Inline.
3150 (Set_Is_Expanded_Contract): New routine
3151 along with pragma Inline.
3152 * gcc-interface/Make-lang.in: Add entry for contracts.o
3153
31542015-10-23 Bob Duff <duff@adacore.com>
3155
3156 * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
3157 -Es switches.
3158 * switch-b.ads: Minor comment fix.
3159 * bindusg.adb: Document new -Ea and -Es switches.
3160 * s-exctra.ads: Use -Es instead of -E.
3161
31622015-10-23 Tristan Gingold <gingold@adacore.com>
3163
3164 * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
3165 task and protected object restrictions.
3166
31672015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3168
3169 * sem_ch12.adb, exp_ch6.adb: Minor reformatting.
3170
31712015-10-23 Gary Dismukes <dismukes@adacore.com>
3172
3173 * exp_ch6.adb: Minor reformatting.
3174
31752015-10-23 Ed Schonberg <schonberg@adacore.com>
3176
3177 * sem_ch12.adb (Check_Formal_Packages): A formal package whose
3178 actual part is (others => <>) os identical to a formal package
3179 with an actual part written as (<>).
3180
31812015-10-23 Arnaud Charlet <charlet@adacore.com>
3182
3183 * a-reatim.adb ("/"): For Time_Span division convert the operands
3184 to integers and then use integer division, which conforms to
3185 the rounding required by Ada RM.
3186
31872015-10-23 Ed Schonberg <schonberg@adacore.com>
3188
3189 * sem_ch6.adb (Check_Missing_Return): Do not report a missing
3190 return statement on a function body constructed to complete a
3191 package body for a premature instantiation.
3192
31932015-10-23 Ed Schonberg <schonberg@adacore.com>
3194
3195 * exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
3196 original function with that of generated procedure, to simplify
3197 processing and avoid scoping problems with local declarations.
3198 (Rewrite_Function_Call_For_C): Handle properly the case of a
3199 parameterless function.
3200
32012015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3202
3203 * a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
3204
32052015-10-23 Arnaud Charlet <charlet@adacore.com>
3206
3207 * s-taskin.ads: Minor code clean up.
3208 (Ada_Task_Control_Block): Move fixed size field before variable sized
3209 ones.
3210 * einfo.ads: Minor editing.
3211
32122015-10-23 Ed Schonberg <schonberg@adacore.com>
3213
3214 * sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
3215 6.5 (8.3) to verify that access discriminants in an aggregate
3216 in a return statement have the proper accessibility, i.e. do
3217 not lead to dangling references.
3218
32192015-10-23 Eric Botcazou <ebotcazou@adacore.com>
3220
3221 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
3222 test on Address_Clause_Overlay_Warnings to the "constant overlays
3223 variable" warning. For the reverse case, also issue a warning if
3224 the modification is potentially made through the initialization
3225 of the variable.
3226
32272015-10-23 Jose Ruiz <ruiz@adacore.com>
3228
3229 * a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
3230 function to have access to CPU clocks for tasks other than the
3231 calling task.
3232
32332015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3234
3235 * debug.adb: Switch -gnatd.5 is no longer in use, remove the
3236 associated documentation.
3237 * exp_dbug.adb (Get_External_Name): Do not add a special prefix
3238 for ignored Ghost entities or when switch -gnatd.5 is enabled.
3239 * exp_dbug.ads Remove the documentation concerning the encoding
3240 of ignored Ghost entities.
3241
32422015-10-23 Bob Duff <duff@adacore.com>
3243
3244 * a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
3245 mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
3246 print "Exception raised".
3247 * s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
3248 Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.
3249
32502015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3251
3252 * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
3253 gnatname.adb: Minor reformatting.
3254
32552015-10-23 Steve Baird <baird@adacore.com>
3256
3257 * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
3258 a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
3259 a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
3260 a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
3261 a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
3262 a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
3263 a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
3264 a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
3265 a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
3266 a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
3267 pragmas.
3268 * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
3269 a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
3270 a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
3271 a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
3272 a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
3273 a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
3274 a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
3275 a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
3276 a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
3277 a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
3278 pragmas.
3279
32802015-10-23 Vincent Celier <celier@adacore.com>
3281
3282 * gnatname.adb: When gnatname is invoked with a project file,
3283 specified with switch -P, if gprname is available, gnatname will
3284 invoke gprname, with the target if it is a cross gnatname.
3285
32862015-10-23 Arnaud Charlet <charlet@adacore.com>
3287
3288 * exp_ch4.adb: Fix typo.
3289 * exp_ch6.adb: Update comment.
3290 * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
3291 * exp_aggr.adb (Convert_To_Positional): Only convert to
3292 positional when generating C in case of an object declaration.
3293 (In_Object_Declaration): New.
3294 (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
3295 * sinfo.ads: Update documentation.
3296
32972015-10-23 Joel Brobecker <brobecker@adacore.com brobecker>
3298
3299 * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
3300 and replace them by include of corresponding header file.
3301
33022015-10-23 Bob Duff <duff@adacore.com>
3303
3304 * a-convec.adb (Copy): Make sure C is initialized
3305 on all paths, including when Checks is False.
3306
33072015-10-23 Eric Botcazou <ebotcazou@adacore.com>
3308
3309 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
3310 error as unreachable.
3311
33122015-10-23 Arnaud Charlet <charlet@adacore.com>
3313
3314 * gnat1drv.adb (Adjust_Global_Switches): Adjust.
3315
33162015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3317
3318 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
3319 ignored Ghost entities is now ___ghost_.
3320
33212015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3322
3323 * ghost.adb (Is_Subject_To_Ghost): Check the
3324 original node when searching for pragma Ghost to catch cases
3325 where a source construct has been rewritten into something else.
3326
33272015-10-23 Ed Schonberg <schonberg@adacore.com>
3328
3329 * einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
3330 that return a constrained array type. When generating C these
3331 functions are rewritten as procedures with an out parameter,
3332 and calls to such functions are rewritten accordingly.
3333 * exp_ch6.adb (Expand_N_Subprogram_Declaration): When
3334 Modify_Tree_For_C is set and the function returns a constrained
3335 array type, generate a procedure declaration with an additional
3336 out parameter. Mark original function as Rewritten_For_C.
3337 The new declaration is inserted in tree immediately after
3338 current declaration.
3339 (Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
3340 generate body of corresponding procedure using declarations
3341 and statements for function body. Replace return statements
3342 with assignments to the out parameter, followed by a simple
3343 return statement.
3344 (Rewrite_Function_Call_For_C): New procedure to replace a function
3345 call that returns an array by a procedure call.
3346
33472015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3348
3349 * sem_util.adb (Denotes_Iterator): New routine.
3350 (Is_Iterator): Code cleanup. Factor out the detection of a
3351 predefined iterator. As a result this fixes a missing case
3352 where a tagged type implements interface Reversible_Iterator.
3353
33542015-10-23 Ed Schonberg <schonberg@adacore.com>
3355
3356 * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
3357 not within a generic unit, even if expander is not active, so
3358 that instances of container packages remain preelaborable in
3359 -gnatc mode.
3360
33612015-10-23 Tristan Gingold <gingold@adacore.com>
3362
3363 * init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
3364 (__gnat_error_handler): Use trampoline for arm64.
3365
33662015-10-23 Ed Schonberg <schonberg@adacore.com>
3367
3368 * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
3369 object is a class-wide limited interface type, the expression
3370 is not restricted to the forms specified for limited types.
3371
33722015-10-23 Vincent Celier <celier@adacore.com>
3373
3374 * gnatname.adb: Code clean up.
3375 * s-taasde.ads: Fix comment.
3376
33772015-10-23 Ed Schonberg <schonberg@adacore.com>
3378
3379 * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
3380 root type to determine whether the type is a descendant of the
3381 corresponding interface type, so take into account multiple
3382 levels of subtypes and derivations.
3383
33842015-10-23 Olivier Hainque <hainque@adacore.com>
3385
3386 * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
3387 tracebacks on x86 & x86_64.
3388 (x86 & x86_64): If !SJLJ, always pick the
3389 GCC_UNWINDER for x86_64 (not only on linux).
3390 * sem_util.ads: Minor fix in comment.
3391
33922015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3393
3394 * sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
3395 not apply to a function instantiation.
3396 * sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
3397 (Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
3398 is a volatile function when its profile contains an effectively
3399 volatile type.
3400 * sem_util.ads (Has_Effectively_Volatile_Profile): New routine.
3401
34022015-10-23 Arnaud Charlet <charlet@adacore.com>
3403
3404 * exp_unst.adb (Unnest_Subprogram): Complete previous
3405 change and update comments.
3406
34072015-10-23 Ed Schonberg <schonberg@adacore.com>
3408
3409 * sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
3410 A subprogram that has an Address parameter and is declared in a Pure
3411 package is not considered Pure, because the parameter may be used as a
3412 pointer and the referenced data may change even if the address value
3413 itself does not.
3414 * freeze.adb (Freeze_Subprogram): use it.
3415 * exp_ch6.adb (Expand_N_Subprogram_Body): Use it.
3416
34172015-10-23 Olivier Hainque <hainque@adacore.com>
3418
3419 * tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
3420 x86_64 linux
3421 * tracebak.c: Rework x86 & x86_64 sections to resort to the
3422 generic unwinder if __USING_SJLJ_EXCEPTIONS__.
3423
34242015-10-23 Javier Miranda <miranda@adacore.com>
3425
3426 * sem_util.adb (Check_Function_Writable_Actuals): For function
3427 calls restrict the check to elementary types, as requested by
3428 RM 6.4.1(6.15/3)
3429
34302015-10-23 Arnaud Charlet <charlet@adacore.com>
3431
3432 * exp_unst.adb (Unnest_Subprogram): Suppress initialization on
3433 Decl_ARECnT since we are taking care of all initializations in
3434 the generated code.
3435
34362015-10-23 Ed Schonberg <schonberg@adacore.com>
3437
3438 * sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3439 Handle properly a box-initialized aggregate component.
3440
34412015-10-23 Yannick Moy <moy@adacore.com>
3442
3443 * sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
3444 on a function.
3445
34462015-10-23 Yannick Moy <moy@adacore.com>
3447
3448 * a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
3449 a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
3450 contract on subprograms.
3451 * lib-xref-spark_specific.adb: collect scopes for stubs of
3452 protected objects
3453
34542015-10-23 Arnaud Charlet <charlet@adacore.com>
3455
3456 * gnat1drv.adb (Adjust_Global_Switches): Enable
3457 Back_Annotate_Rep_Info to get size information from gigi.
3458 (Gnat1drv): Code clean ups.
3459 * frontend.adb (Frontend): Ditto.
3460
34612015-10-23 Arnaud Charlet <charlet@adacore.com>
3462
3463 * gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
3464 * sem.adb (Semantics): Remove special case.
3465
34662015-10-23 Gary Dismukes <dismukes@adacore.com>
3467
3468 * bindgen.adb, restrict.adb: Minor spelling/grammar fixes.
3469
34702015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3471
3472 * sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
3473 elaboration issues in SPARK when the name denotes a source variable.
3474
34752015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3476
3477 * exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
3478 handle restriction No_Exception_Propagation.
3479 * exp_ch11.adb (Expand_At_End_Handler): Update the parameter
3480 profile and all references to Block.
3481 * exp_ch11.ads (Expand_At_End_Handler): Update the parameter
3482 profile and comment on usage.
3483 * exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
3484 handle restriction No_Exception_Propagation.
3485 * gnat1drv.adb, restrict.adb: Update comment.
3486
34872015-10-23 Bob Duff <duff@adacore.com>
3488
3489 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
3490 SS_Release for a block statement enclosing the return statement in the
3491 case where a build-in-place function return is returning
3492 the result on the secondary stack. This is accomplished by
3493 setting the Sec_Stack_Needed_For_Return flag on such blocks.
3494 It was already being set for the function itself, and it was
3495 already set correctly for blocks in the non-build-in-place case
3496 (in Expand_Simple_Function_Return).
3497 (Set_Enclosing_Sec_Stack_Return): New procedure to perform
3498 the Set_Sec_Stack_Needed_For_Return calls. Called in the
3499 build-in-place and non-build-in-place cases.
3500 (Expand_Simple_Function_Return): Call
3501 Set_Enclosing_Sec_Stack_Return instead of performing the loop
3502 in line.
3503
35042015-10-23 Bob Duff <duff@adacore.com>
3505
3506 * scng.adb (Char_Literal_Case): If an apostrophe
3507 follows a reserved word, treat it as a lone apostrophe, rather
3508 than the start of a character literal. This was already done for
3509 "all", but it needs to be done also for (e.g.) "Delta".
3510
35112015-10-23 Bob Duff <duff@adacore.com>
3512
3513 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
3514 Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
3515 unknown discriminants.
3516 * g-awk.ads: Minor style fix in comment
3517
35182015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3519
3520 * debug.adb: Document the use of debug switch -gnatd.5.
3521 * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
3522 * einfo.ads New synthesized attribute Is_Ghost_Enity along
3523 with usage in nodes and pragma Inline.
3524 (Is_Ghost_Entity: Moved from ghost.ads.
3525 * exp_ch3.adb Code reformatting.
3526 (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
3527 (Expand_Freeze_Class_Wide_Type): Capture, set and restore the
3528 Ghost mode.
3529 (Expand_Freeze_Enumeration_Type): Capture, set and
3530 restore the Ghost mode.
3531 (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
3532 * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
3533 contract of an ignored Ghost subprogram.
3534 * exp_ch13.adb Add with and use clauses for Ghost.
3535 (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
3536 * exp_dbug.adb (Get_External_Name): Code reformatting. Add a
3537 special prefix for ignored Ghost entities or when requested by
3538 -gnatd.5 for any Ghost entity.
3539 * exp_dbug.ads Document the use of prefix "_ghost_" for ignored
3540 Ghost entities.
3541 * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
3542 Ghost mode.
3543 (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
3544 to signal the original context.
3545 * ghost.adb (Check_Ghost_Overriding): Code cleanup.
3546 (Is_Ghost_Entity): Moved to einfo.adb. (Is_OK_Declaration):
3547 Move the assertion expression check to the outer level.
3548 (Is_OK_Ghost_Context): An assertion expression is a valid Ghost
3549 context.
3550 * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
3551 * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
3552 cannot be imported or exported. Mark internally generated objects
3553 as Ghost when applicable.
3554 (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
3555 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
3556 a stand alone subprogram body as Ghost when applicable.
3557 (Analyze_Subprogram_Declaration): Mark internally generated
3558 subprograms as Ghost when applicable.
3559 * sem_ch7.adb: Code cleanup.
3560 * sem_ch13.adb (Add_Invariants): Add various formal
3561 parameters to break dependency on global variables.
3562 (Build_Invariant_Procedure): Code cleanup. Capture, set and
3563 restore the Ghost mode.
3564 * sem_res.adb (Resolve_Actuals): The actual parameter of a source
3565 Ghost subprogram whose formal is of mode IN OUT or OUT must be
3566 a Ghost variable.
3567
35682015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3569
3570 * sem_ch8.adb Code cleanup.
3571 (Find_Expanded_Name): Replace
3572 the call to In_Pragmas_Depends_Or_Global with a call to
3573 In_Abstract_View_Pragma.
3574 (In_Abstract_View_Pragma): New routine.
3575 (In_Pragmas_Depends_Or_Global): Removed.
3576 * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
3577 Part_Of denotes the abstract view of a variable.
3578
35792015-10-23 Arnaud Charlet <charlet@adacore.com>
3580
3581 * sem_util.ads (Unique_Defining_Entity): Document the result
3582 for tasks and entries.
3583 * sem_util.adb (Unique_Entity): Return declaration entity for task and
3584 entry bodies
3585
35862015-10-22 Mikhail Maltsev <maltsevm@gmail.com>
3587
3588 * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
3589 * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
3590 * gcc-interface/utils.c (relate_alias_sets): Likewise.
3591 * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
3592 gcc_checking_assert
3593
35942015-10-21 Martin Sebor <msebor@redhat.com>
3595
3596 PR driver/68043
3597 * gcc-interface/lang.opt: End each sentence that describes
3598 an option with a period.
3599
36002015-10-20 Yannick Moy <moy@adacore.com>
3601
3602 * fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
3603 a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
3604 sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
3605 style for marking start of processing of subprograms.
3606
36072015-10-20 Yannick Moy <moy@adacore.com>
3608
3609 * lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
3610 by requesting info from stubs. (Traverse_All_Compilation_Units):
3611 Remove unused procedure.
3612 (Traverse_Declarations_Or_Statements): Handle protected and task units.
3613 * lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
3614 procedure.
3615 * restrict.adb (Check_Restriction): Do not ignore
3616 restrictions in GNATprove_Mode.
3617
36182015-10-20 Arnaud Charlet <charlet@adacore.com>
3619
3620 * s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
3621 make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
3622 sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
3623 sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
3624 exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
3625 sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
3626 a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.
3627
36282015-10-20 Arnaud Charlet <charlet@adacore.com>
3629
3630 * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
3631 freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
3632 par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
3633 sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
3634 typos.
3635
36362015-10-20 Ed Schonberg <schonberg@adacore.com>
3637
3638 * sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
3639 postcondition subprogram, do not check for useless assignments
3640 because there are no source references in such a body, and the
3641 call will lose deferred references from the enclosing subprogram.
3642
36432015-10-20 Ed Schonberg <schonberg@adacore.com>
3644
3645 * sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
3646 'Address): If either object is controlled the overlay is
3647 erroneous, but analysis must be completed so that back-end sees
3648 address clause and completes code generation. Improve text
3649 of warning.
3650
36512015-10-20 Thomas Quinot <quinot@adacore.com>
3652
3653 * exp_ch4.adb: Minor reformatting.
3654
36552015-10-20 Bob Duff <duff@adacore.com>
3656
3657 * s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
3658 arrays.
3659
36602015-10-20 Arnaud Charlet <charlet@adacore.com>
3661
3662 * sinfo.ads, g-pehage.adb, par-ch12.adb,
3663 layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
3664 sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
3665 switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
3666 lib-xref.adb: Fix typos.
3667
36682015-10-20 Tristan Gingold <gingold@adacore.com>
3669
3670 * exp_ch4.adb (Expand_Array_Comparison): Use
3671 generic code if runtime routine is not available.
3672
36732015-10-20 Yannick Moy <moy@adacore.com>
3674
3675 * a-sytaco.ads (Ada.Synchronous_Task_Control): Package
3676 now withs System.Task_Identification. The visible part
3677 of the spec has SPARK_Mode. The private part has pragma
3678 SPARK_Mode (Off).
3679 (Set_True): Added Global and Depends aspects
3680 (Set_False): Added Global and Depends aspects (Current_State):
3681 Added Volatile_Function aspect and added external state
3682 Ada.Task_Identification.Tasking_State as a Global input.
3683 (Suspend_Until_True): Added Global and Depends aspects
3684 * a-sytaco.adb (Ada.Synchronous_Task_Control):
3685 Package body has SPARK_Mode => Off
3686 * a-extiin.ads (Ada.Execution_Time.Interrupts):
3687 Package now withs Ada.Real_Time and has SPARK_Mode.
3688 (Clock): Added Volatile_Function aspect and added external state
3689 Ada.Real_Time.Clock_Time as a Global input.
3690 * a-reatim.ads (Ada.Real_Time): The visible part of the spec has
3691 SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
3692 declares external state Clock_Time with properties Async_Readers and
3693 Async_Writers.
3694 (Clock): Added Volatile_Function aspect and
3695 added external state Clock_Time as a Global input.
3696 * a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
3697 * a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
3698 The visible part of the spec has SPARK_Mode. The private part
3699 has pragma SPARK_Mode (Off).
3700 (Clock): Added Volatile_Function
3701 aspect and added external state Clock_Time as a Global input.
3702 (Clock_For_Interrupts): Added Volatile_Function aspect and added
3703 external state Ada.Real_Time.Clock_Time as a Global input.
3704 * a-exetim-mingw.adb (Ada.Execution_Time): Package body has
3705 SPARK_Mode => Off
3706 * a-interr.ads (Ada.Interrupts): Package now
3707 withs Ada.Task_Identification (Is_Reserved): Added
3708 SPARK_Mode, Volatile_Function and external state
3709 Ada.Task_Identification.Tasking_State as a Global input.
3710 (Is_Attached): Added SPARK_Mode, Volatile_Function and external
3711 state Ada.Task_Identification.Tasking_State as a Global input.
3712 (Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
3713 Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
3714 and external state Ada.Task_Identification.Tasking_State as a
3715 Global In_Out. (Reference): Added SPARK_Mode => Off
3716 * a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
3717 and external state Ada.Task_Identification.Tasking_State as a
3718 Global input.
3719 * a-taside.ads (Ada.Task_Identification): The visible part of
3720 the spec has SPARK_Mode. The private part has pragma SPARK_Mode
3721 (Off). The package declares external state Tasking_State with
3722 properties Async_Readers and Async_Writers.
3723 (Current_Task): Added
3724 Volatile_Function aspect and added external state Tasking_State
3725 as a Global input.
3726 (Environment_Task): Added SPARK_Mode => Off
3727 (Is_Terminated): Added Volatile_Function aspect and added external
3728 state Tasking_State as a Global input. (Is_Callable): Added
3729 Volatile_Function aspect and added external state Tasking_State as
3730 a Global input.
3731 (Activation_Is_Complete): Added Volatile_Function
3732 aspect and added external state Tasking_State as a Global input.
3733 * a-taside.adb (Ada.Task_Identification): Package body has
3734 SPARK_Mode => Off.
3735
37362015-10-20 Ed Schonberg <schonberg@adacore.com>
3737
3738 * atree.ads, atree.adb: Enable List38 and List39 on entities.
3739 * einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
3740 on subprograms. Holds the list of class-wide precondition
3741 functions inherited from ancestors. Each such function is an
3742 instantiation of the generic function generated from an explicit
3743 aspect specification for a class-wide precondition. A type is
3744 an ancestor of itself, and therefore a root type has such an
3745 instance on its own list.
3746 (Class_Wide_Postconds): ditto for postconditions.
3747
37482015-10-20 Vincent Celier <celier@adacore.com>
3749
3750 * prj-attr.adb: Add packages Prove and GnatTest.
3751
37522015-10-20 Steve Baird <baird@adacore.com>
3753
3754 * a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
3755 analysis of internals of container generic instances. This pragma
3756 has no other effect.
3757 * a-conhel.adb (Generic_Implementation) Add "pragma Annotate
3758 (CodePeer, Skip_Analysis);".
3759
37602015-10-20 Steve Baird <baird@adacore.com>
3761
3762 * pprint.adb: Code clean up.
3763
37642015-10-20 Bob Duff <duff@adacore.com>
3765
3766 * a-cfinve.ads, a-coboho.ads: Improve comments.
3767 * a-coboho.adb (Size_In_Storage_Elements): Improve error message
3768 in case of "Size is too big" exception.
3769
37702015-10-20 Bob Duff <duff@adacore.com>
3771
3772 * a-contai.ads: Remove check names (moved to snames.ads-tmpl).
3773 * snames.ads-tmpl: Add check names that were previously in
3774 a-contai.ads, so they are now visible in configuration files.
3775 * types.ads: Add checks corresponding to snames.ads-tmpl.
3776
37772015-10-20 Ed Schonberg <schonberg@adacore.com>
3778
3779 * sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
3780 identifier to the tree, because it may be the root of a tree
3781 traversal in Pop_Scope when freeze actions are pending.
3782
37832015-10-20 Steve Baird <baird@adacore.com>
3784
3785 * pprint.ads (Expression_Image) Add new generic formal flag
3786 Hide_Parameter_Blocks.
3787 * pprint.adb (Expression_Image) If new flag is set, then display
3788 dereferences of parameter block components accordingly.
3789
37902015-10-20 Ed Schonberg <schonberg@adacore.com>
3791
3792 * sem_prag.adb: Code clean up.
3793
37942015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3795
3796 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
3797 (Make_Build_In_Place_Call_In_Object_Declaration): Update the
3798 parameter profile. Code cleanup. Request debug info for the
3799 object renaming declaration.
3800 (Move_Activation_Chain): Add new formal parameter and update the
3801 comment on usage.
3802 * exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
3803 Update the parameter profile and comment on usage.
3804 * sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
3805 currently unused.
3806
38072015-10-20 Ed Schonberg <schonberg@adacore.com>
3808
3809 * sem_ch13.adb (Analyze_One_Aspect, case
3810 Aspect_Disable_Controlled): If expander is not active, pre-analyze
3811 expression anyway for ASIS and other tools use.
3812 * sem_prag.adb (Build_Generic_Class_Condition): Handle properly
3813 anonymous access types in parameter specifications. Make the
3814 formal type a formal derived type of the controlling type of
3815 the subprogram.
3816
38172015-10-20 Tristan Gingold <gingold@adacore.com>
3818
3819 * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
3820 * sem_prag.adb (Analyze_Pragma): Check the restriction.
3821 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
3822 Check the restriction (for aspects).
3823
38242015-10-20 Gary Dismukes <dismukes@adacore.com>
3825
3826 * sem_prag.adb: Minor reformatting.
3827
38282015-10-20 Tristan Gingold <gingold@adacore.com>
3829
3830 * sem_util.adb (Is_Protected_Self_Reference): Remove reference to
3831 UET_Address in comment.
3832 * sem_attr.adb (Check_Unit_Name): Adjust comment.
3833 (Analyze_Attribute): Remove handling of UET_Address.
3834 * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
3835 * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
3836 * exp_attr.adb (Expand_N_Attribute_Reference): Remove
3837 Attribute_UET_Address.
3838
38392015-10-20 Bob Duff <duff@adacore.com>
3840
3841 * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
3842 * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
3843 modifying the tampering counts unnecessarily.
3844 (Adjust): Zero tampering counts unconditionally.
3845
38462015-10-20 Jerome Lambourg <lambourg@adacore.com>
3847
3848 * init.c: Fix build issue on arm-vx6 when building the RTP
3849 run-time.
3850
38512015-10-20 Ed Schonberg <schonberg@adacore.com>
3852
3853 * sem_ch3.adb (Analyze_Object_Declaration): If the expression
3854 is an aggregate and compilation is in -gnatI mode (ignore rep
3855 clauses) do not delay resolution of aggregate, to prevent freeze
3856 actions out of order in the backend.
3857
38582015-10-20 Ed Schonberg <schonberg@adacore.com>
3859
3860 * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
3861 New procedure to construct a generic function for a class-wide
3862 precondition, to implement AI12-0113 concerning the new semantics
3863 of class-wide preconditions for overriding uperations.
3864
38652015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3866
3867 * sem_util.adb (Find_Actual): The routine is
3868 now capable of operating on entry calls.
3869
38702015-10-20 Ed Schonberg <schonberg@adacore.com>
3871
3872 * sem_res.adb: Remove redundant check.
3873
38742015-10-20 Jerome Lambourg <lambourg@adacore.com>
3875
3876 * init.c (__gnat_vxsim_error_handler): Completely disable on
3877 VxWorks-7 as the VSBs used to build gcc do not support vxsim
3878 architecture.
3879
38802015-10-20 Claire Dross <dross@adacore.com>
3881
3882 * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
3883 SPARK_Mode.
3884 * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.
3885
38862015-10-20 Tristan Gingold <gingold@adacore.com>
3887
3888 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
3889 Check for No_Implicit_Protected_Object_Allocations.
3890 * fe.h (Check_No_Implicit_Task_Alloc,
3891 Check_No_Implicit_Protected_Alloc): Define and declare.
3892 * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
3893 Check_No_Implicit_Protected_Alloc): New procedures to check the
3894 restrictions.
3895 * s-rident.ads (No_Implicit_Task_Allocations)
3896 (No_Implicit_Protected_Object_Allocations): Declare new
3897 restrictions.
3898
38992015-10-20 Yannick Moy <moy@adacore.com>
3900
3901 * sem_res.adb (Resolve_Selected_Component): Only set flag
3902 when component is defined in a variant part.
3903 * sem_util.adb,
3904 * sem_util.ads (Is_Declared_Within_Variant): Promote local query
3905 as publicy visible one for use in Resolve_Selected_Component.
3906
39072015-10-20 Philippe Gil <gil@adacore.com>
3908
3909 * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
3910 from foreign threads.
3911 * g-debpoo.adb (Print_Traceback): NEW print traceback if available
3912 added to support Stack_Trace_Depth = 0.
3913 (Print_Address): NEW print System.Address without no secondary
3914 stack use (Address_Image uses secondary stack)
3915
39162015-10-20 Yannick Moy <moy@adacore.com>
3917
3918 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
3919 Func.
3920
39212015-10-20 Jerome Lambourg <lambourg@adacore.com>
3922
3923 * init.c (__gnat_error_handler for vxworks): Force
3924 SPE bit in the MSR when handling signals
3925
39262015-10-20 Arnaud Charlet <charlet@adacore.com>
3927
3928 * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
3929 g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.
3930
39312015-10-20 Ed Schonberg <schonberg@adacore.com>
3932
3933 * sem_ch5.adb (Analyze_Loop_Statement): Element iterators
3934 over multidimensional arrays create additional loops during
3935 expansion. For such loops we create a label as a scope
3936 name. Attach this label properly to tree, for use in GNATProve
3937 over such element iterators.
3938 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
3939 which the attribute applies comes from source, not from expansion
3940 of an element iterator or a quantified expression.
3941 * exp_attr.adb (Expand_N_Attribute_Reference): Ditto.
3942
39432015-10-20 Ed Schonberg <schonberg@adacore.com>
3944
3945 * exp_ch6.adb (Expand_Call): Check for a call to a function
3946 declared in a Dimension I/O package, to handle the new Image
3947 function.
3948
39492015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3950
3951 * inline.ads: Minor comment fixes.
3952
39532015-10-20 Bob Duff <duff@adacore.com>
3954
3955 * a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
3956 we're doing unchecked conversions with this pointer.
3957
39582015-10-20 Ed Schonberg <schonberg@adacore.com>
3959
3960 * exp_ch9.adb (Next_Protected_Operation): An expression function
3961 used as a completion can be the next protected operation in a
3962 protected body.
3963
39642015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3965
3966 * sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
3967 possible call to an instance of Ada.Unchecked_Conversion to avoid
3968 testing protected function calls. Allow references to protected objects
3969 in prefixed protected calls.
3970 (Is_Protected_Operation_Call): New routine.
3971
39722015-10-20 Yannick Moy <moy@adacore.com>
3973
3974 * exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
3975 query public. Remove code handling with iterator loop over array
3976 of the 'in' form, which is not allowed in Ada. * exp_spark.adb
3977 (Expand_SPARK): Expand loop statements that take the form of an
3978 iterator over an array.
3979 * sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
3980 that take the form of an iterator over an array, so that the rewritten
3981 form gets analyzed instead.
3982 * sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
3983 to recognize iterators over arrays.
3984
39852015-10-20 Arnaud Charlet <charlet@adacore.com>
3986
3987 * s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
3988 parameter Message.
3989 * a-except.adb (Raise_Current_Excep): Update call to
3990 Debug_Raise_Exception.
3991 * a-except-2005.adb (Complete_Occurrence): Ditto.
3992 * sem_ch12.adb: Whitespace fix.
3993
39942015-10-20 Yannick Moy <moy@adacore.com>
3995
3996 * sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
3997 fully default initialized.
3998 * sem_ch6.adb: minor style fix in comment
3999
40002015-10-20 Ed Schonberg <schonberg@adacore.com>
4001
4002 * s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
4003 quantities, to produce a string that includes the dimension
4004 synbol for the quantity, or the vector of dimensions in standard
4005 notation.
4006 * sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
4007 Image, to include dimension information in the generated string,
4008 identical to the string produced by the Put procedure on a string
4009 for a dimensioned quantity.
4010
40112015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4012
4013 * exp_ch7.adb (Process_Declarations): A loop
4014 parameter does not require finalization actions.
4015
40162015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4017
4018 * exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
4019 actual subtype for a mutable record return type if the expression
4020 is itself a function call.
4021
40222015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
4023
4024 * s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
4025 related to new type support.
4026
40272015-10-20 Ed Schonberg <schonberg@adacore.com>
4028
4029 * sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
4030 to propagate dimension information from prefix.
4031 * sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
4032 * inline.ads: minor whitespace fix in comment
4033 * sem_ch6.adb: minor gramar fix in comment
4034
40352015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4036
4037 * sem_ch3.adb (Analyze_Object_Contract):
4038 A protected type or a protected object is allowed to have a
4039 discriminated part.
4040
40412015-10-20 Bob Duff <duff@adacore.com>
4042
4043 * sem_util.adb (Requires_Transient_Scope):
4044 Return true for mutable records if the maximum size is very large.
4045
40462015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4047
4048 * a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
4049 the same signature as in System.IO.Put.
4050
40512015-10-20 Bob Duff <duff@adacore.com>
4052
4053 * a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
4054 and then" on the check.
4055
40562015-10-20 Ed Schonberg <schonberg@adacore.com>
4057
4058 * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
4059 a misplaced "constant" keyword in a discriminant specification.
4060
40612015-10-20 Steve Baird <baird@adacore.com>
4062
4063 * einfo.ads (Is_Param_Block_Component_Type): New function decl
4064 for querying the flag.
4065 (Set_Is_Param_Block_Component_Type): New procedure decl for setting
4066 the flag.
4067 * einfo.adb (Is_Param_Block_Component_Type): New function body.
4068 (Set_Is_Param_Block_Component_Type): New procedure body.
4069 (Write_Entity_Flags): Display the new flag.
4070 * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
4071 block component types.
4072 (Expand_N_Entry_Declaration): Set flag on parameter block component
4073 types.
4074
40752015-10-20 Steve Baird <baird@adacore.com>
4076
4077 * sem_elab.adb: Do not pass an N_Attribute_Reference node to
4078 Sinfo.Set_No_Elaboration_Check.
4079 * sem_elab.adb (Check_Elab_Call) Do not pass a non-call
4080 node (specifically, an N_Attribute_Reference node) to
4081 Sinfo.Set_No_Elaboration_Check.
4082
40832015-10-20 Tristan Gingold <gingold@adacore.com>
4084
4085 * adaint.c: File names are case sensitive on aarch64-ios.
4086
40872015-10-20 Bob Duff <duff@adacore.com>
4088
4089 * a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
4090 * a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
4091 * a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
4092 * a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.
4093
40942015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4095
4096 * exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
4097 require finalization actions.
4098
40992015-10-20 Ed Schonberg <schonberg@adacore.com>
4100
4101 * par-ch3.adb (P_Declarative_Items): In case of misplaced
4102 aspect specifications, ensure that flag Done is properly set to
4103 continue parse.
4104
41052015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4106
4107 * rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
4108 and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
4109 * sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
4110 the comment on usage. Use routine Is_Suspension_Object to detect
4111 whether a type matches Suspension_Object.
4112 (Is_Suspension_Object): New routine.
4113 * snames.ads-tmpl: Add predefined names for Suspension_Object
4114 and Synchronous_Task_Control.
4115
41162015-10-20 Ed Schonberg <schonberg@adacore.com>
4117
4118 * sem_smem.adb (Check_Shared_Var): Clean up code that handles
4119 type declarations with discriminants, remove obsolete check.
4120
41212015-10-20 Arnaud Charlet <charlet@adacore.com>
4122
4123 * par_sco.adb: Minor style fixes.
4124
41252015-10-20 Vincent Celier <celier@adacore.com>
4126
4127 * debug.adb: Update documentation of -gnatdu.
4128
41292015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4130
4131 * aspects.adb Add aspect Volatile_Function to table
4132 Canonical_Aspect.
4133 * aspect.ads Add aspect Volatile_Function to tables
4134 Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
4135 and Implementation_Defined_Aspect. Aspects Async_Readers,
4136 Async_Writers, Effective_Reads and Effective_Writes are no
4137 longer Boolean.
4138 * einfo.adb (Get_Pragma): Add an entry for pragma
4139 Volatile_Function.
4140 * par-prag.adb (Prag): Pragma Volatile_Function does not need
4141 special processing by the parser.
4142 * rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
4143 table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
4144 * sem_ch3.adb Fix SPARK RM references.
4145 (Analyze_Object_Contract): Update the error guard.
4146 * sem_ch5.adb Fix SPARK RM references.
4147 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
4148 that a non-volatile function does not contain an effectively
4149 volatile parameter.
4150 (Analyze_Subprogram_Contract): Ensure
4151 that a non-volatile function does not contain an effectively
4152 volatile parameter.
4153 * sem_ch12.adb (Instantiate_Object): Remove the reference to
4154 the SPARK RM from the error message.
4155 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
4156 processing for aspects Async_Readers, Async_Writers,
4157 Effective_Reads, Effective_Writes and Volatile_Function.
4158 (Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
4159 Async_Writers, Effective_Reads, Effective_Writes and
4160 Volatile_Function do not need special processing at the freeze
4161 point.
4162 * sem_prag.adb Add an entry for pragma Volatile_Function in
4163 table Sig_Flags.
4164 (Analyze_External_Property_In_Decl_Part):
4165 Reimplemented as Async_Readers, Async_Writers, Effective_Reads
4166 and Effective_Writes are no longer Boolean pragmas.
4167 (Analyze_Global_Item): An external state or effectively
4168 volatile object cannot appear as an item in pragma
4169 [Refined_]Global.
4170 (Analyze_Pragma): Change the implementation
4171 of Async_Readers, Async_Writers, Effective_Reads and
4172 Effective_Writes as these are no longer Boolean pragmas.
4173 Use routine Check_Static_Boolean_Expression to verify the
4174 optional Boolean expression of Async_Readers, Async_Writers,
4175 Constant_After_Elaboration, Effective_Reads, Effective_Writes,
4176 Extensions_Visible and Volatile_Function. Add processing for
4177 pragma Volatile_Function.
4178 (Check_Static_Boolean_Expression): New routine.
4179 (Find_Related_Context): Update the comment on usage.
4180 (Is_Enabled_Pragma): New routine.
4181 * sem_prag.ads (Is_Enabled_Pragma): New routine.
4182 * sem_res.adb Fix SPARK RM references.
4183 (Is_OK_Volatile_Context): Add detection for return statements.
4184 (Resolve_Actuals): Remove the check concerning an effectively volatile
4185 OUT actual parameter as this is now done by the SPARK flow analyzer.
4186 (Resolve_Entity_Name): Remove the check concerning an effectively
4187 volatile OUT formal parameter as this is now done by the SPARK
4188 flow analyzer. (Within_Volatile_Function): New routine.
4189 * sem_util.adb (Add_Contract_Item): Add processing for pragma
4190 Volatile_Function.
4191 (Check_Nonvolatile_Function_Profile): New routine.
4192 (Is_Descendant_Of_Suspension_Object): New routine.
4193 (Is_Effectively_Volatile): Protected types and descendants of
4194 Suspension_Object are now treated as effectively volatile.
4195 (Is_Enabled): The optional Boolean expression of pragmas
4196 Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
4197 now appears as the first argument.
4198 (Is_Volatile_Function): New routine.
4199 * sem_util.ads Add SPARK RM references.
4200 (Add_Contract_Item): Update the comment on usage.
4201 (Check_Nonvolatile_Function_Profile): New routine.
4202 (Is_Effectively_Volatile): Update the comment on usage.
4203 (Is_Volatile_Function): New routine.
4204 * snames.ads-tmpl Add a predefined name and pragma id for
4205 Volatile_Function.
4206
42072015-10-20 Arnaud Charlet <charlet@adacore.com>
4208
4209 * gnat_ugn.texi, gnat_rm.texi: Regenerate.
4210 * doc/gnat_ugn/gnat_project_manager.rst,
4211 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4212 doc/gnat_ugn/the_gnat_compilation_model.rst,
4213 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4214 doc/gnat_rm/implementation_defined_pragmas.rst,
4215 doc/gnat_rm/the_gnat_library.rst,
4216 doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.
4217
42182015-10-20 Arnaud Charlet <charlet@adacore.com>
4219
4220 * gcc-interface/Makefile.in: Update targets.
4221
42222015-10-20 Bob Duff <duff@adacore.com>
4223
4224 * sem_ch13.adb (Analyze_One_Aspect): Avoid
4225 analyzing the expression in a 'Disable_Controlled attribute when
4226 Expander_Active is False, because otherwise, we get errors about
4227 nonstatic expressions in pragma-Preelaborate generic packages.
4228 * restrict.ads: minor whitespace cleanup in comment
4229
42302015-10-20 Bob Duff <duff@adacore.com>
4231
4232 * a-conhel.adb: Remove "use SAC;", because otherwise the compiler
4233 complains about use clauses in run-time units. Use "use type"
4234 instead.
4235 * a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
4236 * a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
4237 * a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
4238 * a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
4239 * a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
4240 * a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
4241 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4242 * a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
4243 * a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
4244 * a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
4245 * a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
4246 * a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
4247 * a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
4248 * a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
4249 * a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
4250 * a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
4251 * a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
4252 to share the tampering machinery in Ada.Containers.Helpers. This
4253 reduces the amount of duplicated code, and takes advantage of
4254 efficiency improvements in Helpers.
4255 Protect all run-time checks and supporting machinery with "if
4256 Checks" or "if T_Check", so this code can be suppressed with
4257 pragma Suppress or -gnatp.
4258 Add Pseudo_Reference and Get_Element_Access to remaining
4259 containers, so that the compiler can optimize "for ... of" loops.
4260
42612015-10-20 Bob Duff <duff@adacore.com>
4262
4263 * a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
4264 Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
4265 new package Ada.Containers.Helpers, because otherwise it's not
4266 visible everywhere it needs to be (e.g. in the package
4267 Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
4268 a component of type Tamper_Counts).
4269
42702015-10-20 Ed Schonberg <schonberg@adacore.com>
4271
4272 * sem_type.adb (Intersect_Types): Specialize error message when
4273 one operand is a limited view which is a priori incompatible
4274 with all other named types.
4275 * sem_prag.adb: minor fix in comment
4276 * sem_ch13.adb: Code clean up.
4277
42782015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4279
4280 * sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
4281 for a subprogram nested in an inlined subprogram.
4282
42832015-10-20 Bob Duff <duff@adacore.com>
4284
4285 * a-coinve.adb, a-contai.adb: Update comments.
4286 * pprint.ads: Minor reformatting.
4287
42882015-10-20 Tristan Gingold <gingold@adacore.com>
4289
4290 * env.c, init.c: Handle arm64-darwin like arm-darwin.
4291 * tracebak.c: Handle arm64-darwin.
4292
42932015-10-20 Bob Duff <duff@adacore.com>
4294
4295 * s-trasym.adb (Symbolic_Traceback): When giving the traceback
4296 as hexadecimal code addresses, separate by blanks instead of LF.
4297
42982015-10-20 Ed Schonberg <schonberg@adacore.com>
4299
4300 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
4301 node for subprogram in Compile_Only mode.
4302
43032015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
4304
4305 * s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
4306 s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
4307 iterations.
4308
43092015-10-20 Philippe Gil <gil@adacore.com>
4310
4311 * g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
4312 contributors.
4313 (Dump_Stdout): NEW print to stdout Debug_Pool statistics &
4314 main contributors.
4315 (Reset): NEW reset counters to 0.
4316 (Get_Size): NEW return size allocated at parameter.
4317 (High_Water_Mark): NEW.
4318 (Current_Water_Mark): NEW.
4319 (System_Memory_Debug_Pool): NEW tell Debug_Pools that
4320 System.Memory uses it.
4321 * g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
4322 components.
4323 (Find_Or_Create_Traceback): don't manage in System.Memory
4324 Debug_Pool Deallocate Traceback's.
4325 (Validity): add optional Handled table when System.Memory asked
4326 for Allow_Unhandled_Memory.
4327 (Allocate): handle Allocate reentrancy occuring when System.Memory
4328 uses Debug_Pools.
4329 (Deallocate): handle when Allow_Unhandled_Memory
4330 is set deallocation of unhandled memory. Dont't check
4331 Size_In_Storage_Elements if equal to Storage_Count'Last. update
4332 Frees, Total_Frees new components.
4333
43342015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4335
4336 * fe.h: Minor tweak.
4337
43382015-10-20 Vincent Celier <celier@adacore.com>
4339
4340 * sem_cat.adb (Check_Categorization_Dependencies): Do nothing
4341 when -gnatdu is specified.
4342
43432015-10-20 Ed Schonberg <schonberg@adacore.com>
4344
4345 * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
4346 formal abstract subprogram must have a controlling type.
4347 * stand.ads: Minor whitespace cleanup.
4348
43492015-10-20 Gary Dismukes <dismukes@adacore.com>
4350
4351 * sem_ch13.adb: Minor reference change (RM => AARM).
4352
43532015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4354
4355 * make.adb (Check): Skip multilib switches reinstated by the
4356 compiler only when counting the number of switches, since it is
4357 what really matters in the regular operating mode.
4358
43592015-10-20 Arnaud Charlet <charlet@adacore.com>
4360
4361 * einfo.adb: Add extra assertion for small clause.
4362 * cstand.adb: Minor style fix in comment.
4363 * debug.adb: Minor reformatting.
4364 * exp_util.adb: Fix minor typo.
4365
43662015-10-20 Ed Schonberg <schonberg@adacore.com>
4367
4368 * sem_ch12.adb (Same_Instantiated_Function): New predicate in
4369 Check_Formal_Package_Instance, used to verify that the formal
4370 and the actual of an actual package match when both are functions
4371 given as attribute references.
4372
43732015-10-20 Bob Duff <duff@adacore.com>
4374
4375 * a-coinve.ads, a-coinve.adb: Do the same efficiency
4376 improvements that were already done in the definite case
4377 (Ada.Containers.Vectors, i.e. a-convec). This includes the
4378 ability to suppress checks, the fast path for Append, inlining
4379 as appropriate, and special-casing of "for ... of" loops. Reuse
4380 the tampering machinery that is now in Ada.Containers. Simplify
4381 many operations.
4382 * a-convec.ads, a-convec.adb: Change the code to be more similar
4383 to a-coinve.
4384 * a-finali.ads, a-finali.adb: Expose the "null"-ness of the
4385 operations. This may enable optimizations in the future, and
4386 seems cleaner anyway.
4387
43882015-10-20 Ed Schonberg <schonberg@adacore.com>
4389
4390 * sem_ch13.adb (Is_Operational_Item): Attributes related to
4391 Ada 2012 iterators are operational items, and can be specified
4392 on partial views.
4393
43942015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4395
4396 * sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
4397 (Usage_Error): Remove formal parameter Item. Emit a clearer message
4398 concerning a missing dependency item and place it on the related pragma.
4399
44002015-10-20 Bob Duff <duff@adacore.com>
4401
4402 * debug.adb, expander.adb: Implement -gnatd.B switch, which
4403 triggers a bug box when an abort_statement is seen. This is
4404 useful for testing Comperr.Compiler_Abort.
4405 * gnat1drv.adb: Trigger bug box on all exceptions other than
4406 Unrecoverable_Error.
4407
44082015-10-20 Thomas Quinot <quinot@adacore.com>
4409
4410 * Makefile.rtl: add the following...
4411 * g-binenv.ads, g-binenv.adb: New unit providing runtime access
4412 to bind time captured values ("bind environment")
4413 * init.c: declare new global variable __gl_bind_env_addr.
4414 * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
4415 environment key=value pair.
4416 (Gen_Bind_Env_String): helper to produce the bind environment data
4417 called in the binder generated file.
4418 (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
4419 __gl_bind_env_addr accordingly.
4420 * switch-b.adb: Support for command line switch -V (user interface
4421 to set a build environment key=value pair)
4422 * bindusg.adb: Document the above
4423
44242015-10-20 Vincent Celier <celier@adacore.com>
4425
4426 * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
4427 entity as Pure if Debug_Flag_U is set.
4428
44292015-10-20 Bob Duff <duff@adacore.com>
4430
4431 * output.adb (Write_Int): Work with negative numbers in order to avoid
4432 negating Int'First and thereby causing overflow.
4433 * sem_util.adb: Minor comment fix.
4434
44352015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4436
4437 * make.adb (Check): Skip multilib switches reinstated by the
4438 compiler when doing the comparison with switches passed to
4439 gnatmake.
4440
44412015-10-20 Yannick Moy <moy@adacore.com>
4442
4443 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
4444 False for procedures marked No_Return.
4445 * sem_util.ads (Enclosing_Declaration): Improve comment.
4446 * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
4447
44482015-10-20 Thomas Quinot <quinot@adacore.com>
4449
4450 * types.ads: Minor reformatting.
4451
44522015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4453
4454 * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
4455 Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
4456 classification pragmas.
4457
44582015-10-20 Ed Schonberg <schonberg@adacore.com>
4459
4460 * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
4461 perform name resolution on the expressions in aspects of visible
4462 entities.
4463 * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
4464 expressions in aspects independently of whether corresponding
4465 entity is frozen. Used to complete name resolution of aspect
4466 expressions for entities declared in the visible part of a
4467 package or generic package declaration.
4468
44692015-10-20 Vincent Celier <celier@adacore.com>
4470
4471 * prj-attr.adb: Add package Codepeer and its attributes.
4472
44732015-10-20 Thomas Quinot <quinot@adacore.com>
4474
4475 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4476
44772015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4478
4479 * gnatlink.adb (Gnatlink): Do not translate --RTS switch
4480 for the linker and instead pass the switches that were
4481 reinstated by the compiler.
4482
44832015-10-20 Bob Duff <duff@adacore.com>
4484
4485 * a-contai.ads, a-convec.ads: Move Count_Type_Last from
4486 a-convec.ads to a-contai.ads, so other containers can refer to it.
4487
44882015-10-20 Ed Schonberg <schonberg@adacore.com>
4489
4490 * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
4491 Analyze_Full_Type_ Declaration, used to apply legality rules in
4492 13,1,1 (18.3.3) concerning aspects that cannot be overridden in
4493 a type extension.
4494 (Check_Duplicate_Aspects): It is not legal to specify the
4495 Implicit_Dereference aspect on a full view if partial view has
4496 known discriminants.
4497 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
4498 the specification of the aspect on a derived type confirms the
4499 value of the inherited one.
4500 * sem_util.adb (Reference_Discriminant): Return empty if none
4501 specified.
4502
45032015-10-20 Thomas Quinot <quinot@adacore.com>
4504
4505 * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
4506
45072015-10-20 Vincent Celier <celier@adacore.com>
4508
4509 * a-strsup.adb (Super_Trim): Remove statements that put NUL
4510 characters in unused portion of the Data string.
4511
45122015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4513
4514 * aspects.adb Add an entry for Constant_After_Elaboration in
4515 table Canonical_Aspect.
4516 * aspects.ads Add entries for Constant_After_Elaboration in
4517 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
4518 and Implementation_Defined_Aspect.
4519 * par-prag.adb Pragma Constant_After_Elaboration does not require
4520 special processing by the parser.
4521 * sem_ch13.adb Add an entry for Constant_After_Elaboration
4522 in table Sig_Flags.
4523 (Analyze_Aspect_Specifications):
4524 Add processing for aspect Constant_After_Elaboration.
4525 (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
4526 does not require special processing at freeze time.
4527 * sem_prag.adb (Analyze_Pragma): Add processing for pragma
4528 Constant_After_Elaboration. Use routine Find_Related_Context to
4529 retrieve the context of pragma Part_Of.
4530 (Duplication_Error): Update comment on usage.
4531 (Find_Related_Context): New routine.
4532 * sem_prag.ads Add an entry for Constant_After_Elaboration
4533 in table Aspect_Specifying_Pragma.
4534 (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
4535 * sem_util.adb (Add_Contract_Item): Add processing for pragma
4536 Constant_After_Elaboration.
4537 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
4538 * snames.ads-tmpl Add new predefined name and aspect id for
4539 Constant_After_Elaboration.
4540
45412015-10-16 Vincent Celier <celier@adacore.com>
4542
4543 * prj-pp.adb (Pretty_Print.Print): Correctly display extending
4544 packages, instead of making them renamed packages.
4545
45462015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4547
4548 * sem_ch12.adb (Analyze_Package_Instantiation):
4549 Treat a missing SPARK_Mode annotation as having mode "Off".
4550 (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
4551 annotation as having mode "Off".
4552 (Instantiate_Package_Body): Code
4553 reformatting. Treat a missing SPARK_Mode annotation as having mode
4554 "Off".
4555 (Instantiate_Subprogram_Body): Code reformatting. Treat
4556 a missing SPARK_Mode annotation as having mode "Off".
4557
45582015-10-16 Ed Schonberg <schonberg@adacore.com>
4559
4560 * exp_ch5.adb: Code clean up.
4561 * sem_ch13.adb: Minor fix in comment.
4562
45632015-10-16 Bob Duff <duff@adacore.com>
4564
4565 * a-exexda.adb: Change format of Exception_Information to be
4566 more like what we print for unhandled exceptions.
4567 * a-exstat.adb: Parse new format.
4568 * a-except-2005.adb, a-except.adb: Document new format.
4569
45702015-10-16 Javier Miranda <miranda@adacore.com>
4571
4572 * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
4573 transient scope with the renaming object declararation.
4574 * exp_util.adb (Insert_Actions): if the enclosing interator
4575 loop is marked as requiring the secondary stack then attach the
4576 actions to the transient scope.
4577
45782015-10-16 Bob Duff <duff@adacore.com>
4579
4580 * exp_ch7.adb: Minor spelling fixes.
4581
45822015-10-16 Ed Schonberg <schonberg@adacore.com>
4583
4584 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4585 If anonymous type is component type of array type declaration,
4586 analyze its declaration in the current scope, not the enclosing
4587 one.
4588
45892015-10-16 Gary Dismukes <dismukes@adacore.com>
4590
4591 * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
4592
45932015-10-16 Ed Schonberg <schonberg@adacore.com>
4594
4595 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
4596 expansion to allow element iteration over formal containers
4597 whose elements are indefinite types.
4598
45992015-10-16 Doug Rupp <rupp@adacore.com>
4600
4601 * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
4602 instead of gettimeofday.
4603 * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
4604 (clock_gettime): New imported subprogram.
4605
46062015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4607
4608 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4609 Indefinite or limited library level objects are now returned on
4610 the heap.
4611 * exp_ch7.adb (Build_Finalization_Master): Add formal
4612 parameter For_Lib_Level. Add context specific insertion for a
4613 finalization master created for an access result type related
4614 to a build-in-place function call used to initialize a library
4615 level object.
4616 * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
4617 For_Lib_Level. Update the comment on usage.
4618 * sem_util.adb (Mark_Coextensions): Code cleanup.
4619
46202015-10-16 Emmanuel Briot <briot@adacore.com>
4621
4622 * prj.adb (For_Every_Project_Imported_Context): Fix handling
4623 of aggregated projects with duplicate names.
4624 * a-ngelfu.ads: Minor whitespace fix.
4625
46262015-10-16 Ed Schonberg <schonberg@adacore.com>
4627
4628 * sem_ch13.adb (Build_Predicate_Functions): The expression for
4629 the predicate is side-effect free if it does not contain any
4630 variable references.
4631
46322015-10-16 Bob Duff <duff@adacore.com>
4633
4634 * a-convec.adb ("="): Previous version depended
4635 on "=" composing, but that doesn't quite work -- we want the "="
4636 operator passed in to the generic. So we need a loop after all.
4637
46382015-10-16 Yannick Moy <moy@adacore.com>
4639
4640 * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
4641 an object.
4642 * sem_ch6.adb: Minor fix in comment.
4643
46442015-10-16 Bob Duff <duff@adacore.com>
4645
4646 * a-contai.ads: Add two check names: Container_Checks and
4647 Tampering_Check. Move the tampering check machinery from
4648 Ada.Containers.Vectors to Ada.Containers. Later we can share it
4649 with other containers.
4650 Disable the tampering machinery in the presence of
4651 Suppress(Tampering_Check).
4652 Simplify the implementation of tampering checks. E.g. use RAII
4653 to make incrementing/decrementing of the counts more concise.
4654 * a-contai.adb: New package body, implementing the above.
4655 * a-convec.ads, a-convec.adb: Use tampering check machinery
4656 in Ada.Containers.
4657 Disable all checking code when checks are suppressed.
4658 Simplify many of the operations. Implement "&" in terms of Append,
4659 rather than "by hand".
4660 Remove: function "=" (L, R : Elements_Array) return Boolean is
4661 abstract; so we can call the predefined "=" on Elements_Array.
4662 For "=" on Vectors: Previously, we returned True immediately if
4663 Left'Address = Right'Address. That seems like a non-optimization
4664 ("if X = X" is unusual), so removed that. Simplify by using
4665 slice comparison ("=" on Element_Array will automatically call
4666 "=" on the components, even if user defined).
4667
46682015-10-16 Ed Schonberg <schonberg@adacore.com>
4669
4670 * sem_ch13.adb (Chek_Record_Representation_Clause): When
4671 iterating over components, skip anonymous subtypes created for
4672 constrained array components.
4673
46742015-10-16 Eric Botcazou <ebotcazou@adacore.com>
4675
4676 * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
4677 * s-finmas.ads (Header_Offset): Delete.
4678 * s-finmas.adb (Header_Offset): Likewise.
4679 (Finalize): Call Header_Size instead of Header_Offset.
4680 * s-stposu.adb (Allocate_Any_Controlled): Likewise.
4681 (Deallocate_Any_Controlled): Likewise.
4682
46832015-10-16 Arnaud Charlet <charlet@adacore.com>
4684
4685 * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
4686 cleanup.
4687 * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
4688 sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
4689 s-taprop-posix.adb: Minor reformatting.
4690
46912015-10-16 Bob Duff <duff@adacore.com>
4692
4693 * adadecode.h, adadecode.c (ada_demangle): Remove
4694 ada_demangle, no longer used.
4695 * a-except-2005.adb: Bring System.Traceback.Symbolic into the
4696 closure.
4697
46982015-10-16 Ed Schonberg <schonberg@adacore.com>
4699
4700 * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
4701 locate the access discriminant that supports implicit dereference on a
4702 record type.
4703 (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
4704 of Implicit_Dereference on an access_to_constant when actual
4705 parameter is a rewritten variable or function call.
4706
47072015-10-16 Bob Duff <duff@adacore.com>
4708
4709 * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
4710 elaboration circularities when polling is turned on.
4711
47122015-10-16 Ed Schonberg <schonberg@adacore.com>
4713
4714 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4715 When creating a full declaration for a formal parameter, the
4716 entity is labelled as an Itype, so set Associated_Node_For_Itype
4717 accordingly.
4718 * einfo.ads: Clarify use of Associated_Node_For_Itype.
4719
47202015-10-16 Bob Duff <duff@adacore.com>
4721
4722 * bindgen: Move pragmas Warnings earlier, otherwise
4723 we can get warnings on with_clauses.
4724
47252015-10-16 Arnaud Charlet <charlet@adacore.com>
4726
4727 * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
4728 s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
4729 Remove remaining references to OS_Primitives.Monotonic_Clock.
4730 Keep it only on windows which is a special case.
4731
47322015-10-16 Javier Miranda <miranda@adacore.com>
4733
4734 * a-textio.adb (Get_Line): Fix documentation.
4735 * einfo.ads (Interface_Name): Fix documentation.
4736 * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
4737 * exp_ch4.adb (Expand_N_In): Fix documentation.
4738
47392015-10-16 Eric Botcazou <ebotcazou@adacore.com>
4740
4741 * inline.adb (Subp_Info): Remove Listed component.
4742 (Add_Inlined_Subprogram): Take an entity instead of an index.
4743 Do not set Listed component to True.
4744 (New_Entry): Do not initialize Listed component to False.
4745 (Analyze_Inlined_Bodies): Do not test Listed component
4746 (Must_Inline): Add calls not in the main unit only
4747 if they are in a subprogram that can be inlined outside its unit.
4748 (Add_Inlined_Body): Move test around and add comment.
4749
47502015-10-16 Arnaud Charlet <charlet@adacore.com>
4751
4752 * sinfo.ads, einfo.ads: monir clean ups.
4753
47542015-10-16 Arnaud Charlet <charlet@adacore.com>
4755
4756 * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
4757 a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
4758 jgnat/dotnet removal.
4759
47602015-10-16 Arnaud Charlet <charlet@adacore.com>
4761
4762 * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
4763 s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
4764 s-osprim.ads (Monotonic_Clock): Removed, unused.
4765
47662015-10-16 Ed Schonberg <schonberg@adacore.com>
4767
4768 * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
4769 Do not reset the Obj_Type of the prefix if an interpretation
4770 involves an untagged type, to prevent a crash when analyzing an
4771 illegal program in All_Errors mode.
4772
47732015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4774
4775 * exp_ch4.adb (Expand_N_Expression_With_Actions):
4776 Force the evaluation of the expression when its type is Boolean.
4777 (Force_Boolean_Evaluation): New routine.
4778
47792015-10-16 Bob Duff <duff@adacore.com>
4780
4781 * sem_util.adb (Has_Discrim_Dep_Array): Remove
4782 this function, and the call. No longer needed now that the back
4783 end can handle such things. Should result in further speedups
4784 in some cases.
4785
47862015-10-16 Ed Schonberg <schonberg@adacore.com>
4787
4788 * sem_ch13.adb (Build_Predicate_Functions): If expression for
4789 predicate is side-effect free, indicate that the predicate
4790 function is pure, to allow for optimization of redundant
4791 predicate checks.
4792
47932015-10-16 Arnaud Charlet <charlet@adacore.com>
4794
4795 * checks.adb: Fix typo.
4796 * s-osinte-linux.ads: Add header.
4797 * projects.texi: Removed, no longer used.
4798 * gcc-interface/Make-lang.in: Update dependencies
4799 * s-multip.adb: Minor: fix header.
4800 * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
4801 a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
4802 a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
4803 .NET.
4804 * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
4805 updates.
4806
48072015-10-16 Gary Dismukes <dismukes@adacore.com>
4808
4809 * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
4810 the temporary object used for a by-copy entry parameter, to
4811 ensure that the object doesn't get its No_Initialization flag
4812 reset later in Default_Initialize_Object. Also, generate the
4813 assignment of the actual to the temporary in the additional case
4814 of a scalar out parameter whose type has a Default_Value aspect.
4815 * exp_ch3.adb: Fix minor typo in comment.
4816
48172015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4818
4819 * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
4820 Minor reformatting.
4821 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
4822 SPARK_Mode from the context.
4823
48242015-10-16 Bob Duff <duff@adacore.com>
4825
4826 * sem_util.adb (Requires_Transient_Scope):
4827 If Typ is a generic formal incomplete type, look at the actual
4828 type. Otherwise, we don't notice that the actual type is tagged,
4829 has a variant part, etc, causing a mismatch of calling conventions
4830 between caller and callee.
4831
48322015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4833
4834 * einfo.ads: Move the declaration of enumeration
4835 literal E_Abstract_State above E_Entry. Update the upper bound
4836 of subtype Overloadable_Kind.
4837
48382015-10-16 Gary Dismukes <dismukes@adacore.com>
4839
4840 * exp_attr.adb: Minor editorial changes.
4841
48422015-10-16 Arnaud Charlet <charlet@adacore.com>
4843
4844 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
4845 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
4846 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
4847 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
4848 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
4849 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
4850 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
4851 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
4852 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
4853 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
4854 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
4855 Code clean up: remove special handling for .NET and JVM.
4856
48572015-10-16 Arnaud Charlet <charlet@adacore.com>
4858
4859 * sem_ch12.adb: Minor punctuation fix in comment
4860 * s-rident.ads: Minor consistency fix in comment
4861 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
4862 * restrict.ads: Style fix in comments.
4863 * sem_prag.adb: Minor grammar fix in comment
4864
48652015-10-16 Gary Dismukes <dismukes@adacore.com>
4866
4867 * sem_ch12.adb: Minor reformatting/rewording.
4868
48692015-10-16 Arnaud Charlet <charlet@adacore.com>
4870
4871 * einfo.ads: Minor fix of duplicate words
4872 * rident.ads: Minor style fix in comment
4873
48742015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4875
4876 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
4877 set and restore the Ghost mode.
4878 (Expand_N_Object_Declaration): Do not capture, set and restore the
4879 Ghost mode.
4880 (Freeze_Type): Redo the capture and restore of the Ghost mode.
4881 (Restore_Globals): Removed.
4882 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
4883 and restore of the Ghost mode.
4884 (Restore_Globals): Removed.
4885 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
4886 Redo the capture and restore of the Ghost mode.
4887 (Expand_N_Subprogram_Body): Redo the capture, set and restore
4888 of the Ghost mode.
4889 (Expand_N_Subprogram_Declaration): Do not
4890 capture, set and restore the Ghost mode.
4891 (Restore_Globals): Removed.
4892 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
4893 and restore of the Ghost mode.
4894 (Expand_N_Package_Declaration): Do not capture, set and restore the
4895 Ghost mode.
4896 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
4897 Redo the capture and restore of the Ghost mode.
4898 (Expand_N_Object_Renaming_Declaration): Redo
4899 the capture and restore of the Ghost mode.
4900 (Expand_N_Package_Renaming_Declaration):
4901 Redo the capture and restore of the Ghost mode.
4902 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
4903 and restore of the Ghost mode.
4904 * exp_ch11.adb Remove with and use clauses for Ghost.
4905 (Expand_N_Exception_Declaration): Do not capture, set and restore
4906 the Ghost mode.
4907 * exp_disp.adb (Make_DT): Redo the capture and restore of the
4908 Ghost mode.
4909 (Restore_Globals): Removed.
4910 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
4911 and restore the Ghost mode.
4912 (Expand_Pragma_Contract_Cases):
4913 Redo the capture and restore of the Ghost mode. Preserve the
4914 original context of contract cases by setting / resetting the
4915 In_Assertion_Expr counter.
4916 (Expand_Pragma_Initial_Condition):
4917 Redo the capture and restore of the Ghost mode.
4918 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
4919 the Ghost mode.
4920 (Restore_Globals): Removed.
4921 * exp_util.adb (Make_Predicate_Call): Redo the capture and
4922 restore of the Ghost mode.
4923 (Restore_Globals): Removed.
4924 * freeze.adb (Freeze_Entity): Redo the capture and restore of
4925 the Ghost mode.
4926 (Restore_Globals): Removed.
4927 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
4928 the error message.
4929 (Is_OK_Statement): Account for statements
4930 that appear in assertion expressions.
4931 (Is_Subject_To_Ghost):
4932 Moved from spec.
4933 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
4934 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
4935 Ghost mode.
4936 * sem.adb Add with and use clauses for Ghost.
4937 (Analyze): Redo
4938 the capture and restore of the Ghost mode. Set the Ghost mode
4939 when analyzing a declaration.
4940 (Do_Analyze): Redo the capture
4941 and restore of the Ghost mode.
4942 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
4943 and restore the Ghost mode.
4944 (Analyze_Incomplete_Type_Decl):
4945 Do not capture, set and restore the Ghost mode.
4946 (Analyze_Number_Declaration): Do not capture, set and restore the
4947 Ghost mode.
4948 (Analyze_Object_Declaration): Do not capture, set and
4949 restore the Ghost mode.
4950 (Analyze_Private_Extension_Declaration):
4951 Do not capture, set and restore the Ghost mode.
4952 (Analyze_Subtype_Declaration): Do not capture, set and restore
4953 the Ghost mode.
4954 (Restore_Globals): Removed.
4955 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
4956 of the Ghost mode.
4957 (Restore_Globals): Removed.
4958 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
4959 Do not capture, set and restore the Ghost mode.
4960 (Analyze_Procedure_Call): Redo the capture and restore of the
4961 Ghost mode.
4962 (Analyze_Subprogram_Body_Helper): Redo the capture
4963 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
4964 Do not capture, set and restore the Ghost mode.
4965 (Restore_Globals): Removed.
4966 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
4967 restore of the Ghost mode.
4968 (Analyze_Package_Declaration):
4969 Do not capture, set and restore the Ghost mode.
4970 (Analyze_Private_Type_Declaration): Do not capture, set and
4971 restore the Ghost mode.
4972 (Restore_Globals): Removed.
4973 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
4974 set and restore the Ghost mode.
4975 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
4976 mode.
4977 (Analyze_Object_Renaming): Do not capture, set and restore the
4978 Ghost mode.
4979 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
4980 mode.
4981 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
4982 Ghost mode.
4983 (Restore_Globals): Removed.
4984 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
4985 set and restore the Ghost mode.
4986 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
4987 Do not capture, set and restore the Ghost mode.
4988 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
4989 and restore the Ghost mode.
4990 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
4991 the capture and restore of the Ghost mode.
4992 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4993 Redo the capture and restore of the Ghost mode.
4994 (Analyze_External_Property_In_Decl_Part):
4995 Redo the capture and restore of the Ghost mode.
4996 (Analyze_Initial_Condition_In_Decl_Part): Redo the
4997 capture and restore of the Ghost mode. (Analyze_Pragma):
4998 Do not capture, set and restore the Ghost mode for Assert.
4999 Redo the capture and restore of the Ghost mode for Check. Do
5000 not capture and restore the Ghost mode for Invariant.
5001 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
5002 restore of the Ghost mode.
5003 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
5004 when resolving a declaration.
5005 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
5006 Redo the capture and restore of the Ghost mode.
5007 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
5008 and restore of the Ghost mode.
5009
50102015-10-16 Bob Duff <duff@adacore.com>
5011
5012 * debug.adb: Document -gnatdQ switch.
5013
50142015-10-16 Ed Schonberg <schonberg@adacore.com>
5015
5016 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
5017 a formal abstract subprogram cannot have a null default: RM 12.6
5018 (4 1.2).
5019
50202015-10-16 Bob Duff <duff@adacore.com>
5021
5022 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
5023
50242015-10-16 Javier Miranda <miranda@adacore.com>
5025
5026 * inline.adb (Add_Inlined_Body): Ensure that
5027 Analyze_Inlined_Bodies will be invoked after completing the
5028 analysis of the current unit.
5029
50302015-10-16 Arnaud Charlet <charlet@adacore.com>
5031
5032 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
5033 message for bad last bit position.
5034 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
5035
50362015-10-16 Ed Schonberg <schonberg@adacore.com>
5037
5038 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
5039 compile-time known but does not obey a static predicate on
5040 its type, replace the case statement with a raise statement,
5041 as with other statically detected constraint violations.
5042
50432015-10-16 Bob Duff <duff@adacore.com>
5044
5045 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
5046 Reinstate code.
5047 * opt.ads: Minor typo.
5048
50492015-10-16 Ed Schonberg <schonberg@adacore.com>
5050
5051 * sem_util.adb (Gather_Components): When gathering components
5052 of a nested variant, the record type used in legality checks is
5053 the enclosing record type.
5054
50552015-10-13 Jakub Jelinek <jakub@redhat.com>
5056
5057 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
5058 DEF_FUNCTION_TYPE_11): Define.
5059
50602015-10-09 Eric Botcazou <ebotcazou@adacore.com>
5061
5062 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
5063 GNAT1_ADA_OBJS are compiled only after generated files are created.
5064
50652015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5066
5067 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
5068 instead of REAL_ARITHMETIC.
5069
50702015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5071
5072 * gcc-interface/trans.c (convert_with_check): Use real_less instead
5073 of REAL_VALUES_LESS.
5074
50752015-10-02 Doug Rupp <rupp@adacore.com>
5076 Olivier Hainque <hainque@adacore.com>
5077
5078 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
5079 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
5080 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
5081 flags as -g* and -m* flags past -gnatez.
5082
50832015-10-02 Eric Botcazou <ebotcazou@adacore.com>
5084
5085 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
5086 linear search with call to find_opt and issue warnings if the -W
5087 switch is not appropriate.
5088
50892015-10-02 Eric Botcazou <ebotcazou@adacore.com>
5090
5091 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
5092 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
5093 reference but whose type isn't by-ref and whose mechanism hasn't been
5094 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
5095 them instead of changing their type.
5096 * gcc-interface/trans.c (scan_rhs_r): New helper function.
5097 (independent_iterations_p): New predicate.
5098 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
5099 ivdep pragma if the iterations are independent.
5100
51012015-10-02 Eric Botcazou <ebotcazou@adacore.com>
5102
5103 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
5104 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
5105 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
5106 (build_stmt_group): Add blank lines.
5107
51082015-09-30 Thomas Schwinge <thomas@codesourcery.com>
5109
5110 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
5111
51122015-09-28 Tom de Vries <tom@codesourcery.com>
5113
5114 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
5115
51162015-09-17 Eric Botcazou <ebotcazou@adacore.com>
5117
5118 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
5119
51202015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
5121
5122 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
5123 generating STABS debugging information when not the default.
5124
51252015-09-14 Eric Botcazou <ebotcazou@adacore.com>
5126
5127 * gcc-interface/gigi.h (ref_filename): Delete.
5128 (Sloc_to_locus): Add clean_column parameter defaulting to false.
5129 (build_call_raise): Adjust comment.
5130 (build_call_raise_range): Move around.
5131 * gcc-interface/trans.c (ref_filename): Delete.
5132 (gigi): Fix formatting.
5133 (block_end_locus_sink): Delete.
5134 (Sloc_to_locus1): Tidy up and reformat. Rename into...
5135 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
5136 (set_expr_location_from_node1): Rename into...
5137 (set_expr_location_from_node): ...this.
5138 (set_end_locus_from_node): Move around. Adjust for renaming.
5139 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
5140 (add_cleanup): Likewise.
5141 * gcc-interface/utils2.c (expand_sloc): New static function.
5142 (build_call_raise): Call it.
5143 (build_call_raise_column): Likewise.
5144 (build_call_raise_range): Likewise. Move around.
5145
51462015-09-14 Eric Botcazou <ebotcazou@adacore.com>
5147
5148 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
5149 another acceptable pattern for the RHS.
5150
51512015-07-24 Micahel Darling <darlingm@gmail.com>
5152
5153 PR other/66259
5154 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
5155 * gcc-interface/Makefile.in: Likewise
5156
51572015-07-12 Aldy Hernandez <aldyh@redhat.com>
5158
5159 * gcc-interface/utils.c: Fix double word typos.
5160 * gnat_ugn.texi: Same.
5161 * init.c: Same.
5162 * par.adb: Same.
5163 * projects.texi: Same.
5164 * sem_ch4.adb: Same.
5165 * sem_ch6.adb: Same.
5166 * sem_dim.adb: Same.
5167 * sem_eval.adb: Same.
5168 * sem_prag.adb: Same.
5169 * sem_warn.adb: Same.
5170
51712015-07-07 Andrew MacLeod <amacleod@redhat.com>
5172
5173 * gcc-interface/cuintp.c: Adjust includes.
5174 * gcc-interface/decl.c: Likewise.
5175 * gcc-interface/misc.c: Likewise.
5176 * gcc-interface/targtyps.c: Likewise.
5177 * gcc-interface/trans.c: Likewise.
5178 * gcc-interface/utils.c: Likewise.
5179 * gcc-interface/utils2.c: Likewise.
5180
51812015-07-06 John Marino <gnugcc@marino.st>
5182
5183 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
5184
51852015-06-29 Eric Botcazou <ebotcazou@adacore.com>
5186
5187 PR ada/63310
5188 * gcc-interface/utils.c (gnat_write_global_declarations): Always
5189 build the dummy global variable if code was generated.
5190
51912015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5192
5193 PR fortran/66605
5194 * gcc-interface/misc.c (gnat_post_options): No need to disable
5195 warn_unused_parameter anymore.
5196
51972015-06-26 Eric Botcazou <ebotcazou@adacore.com>
5198
5199 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
5200 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
5201 at-end procedures.
5202
52032015-06-26 Eric Botcazou <ebotcazou@adacore.com>
5204
5205 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
5206 (gnat_write_global_declarations): New prototype.
5207 * gcc-interface/utils.c (type_decls): Rename back to...
5208 (global_decls): ...this.
5209 (gnat_pushdecls): Revert previous change.
5210 (create_var_decl): Do not output global variables.
5211 (note_types_used_by_globals): Rename back to...
5212 (gnat_write_global_declarations): ...this. Output variables on the
5213 global_decls vector.
5214 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
5215
52162015-06-26 Eric Botcazou <ebotcazou@adacore.com>
5217
5218 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
5219 (create_var_decl): ...this. Add default value for last parameter.
5220 (create_type_stub_decl): Adjust.
5221 (create_type_decl): Likewise.
5222 (create_field_decl): Likewise.
5223 (create_param_decl): Likewise.
5224 (create_label_decl): Likewise.
5225 (create_subprog_decl): Likewise.
5226 * gcc-interface/utils.c (create_var_decl_1): Rename into...
5227 (create_var_decl): ...this. Rename var_name into name and var_init
5228 into init, move const_decl_allowed_p last and adjust accordingly.
5229 (create_type_stub_decl): Rename type_name into name and adjust.
5230 (create_type_decl): Likewise.
5231 (create_field_decl): Likewise for field_name and field_type.
5232 (create_param_decl): Likewise for param_name and param_type.
5233 (create_label_decl): Likewise for label_name.
5234 (create_subprog_decl): Likewise for subprog_name and subprog_type.
5235 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
5236 to create_var_decl_1.
5237
52382015-06-26 Eric Botcazou <ebotcazou@adacore.com>
5239
5240 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
5241 artificial, has_checks and warned_aggressive_loop_optimizations.
5242 (gigi): Set warn_aggressive_loop_optimizations to 0.
5243 (inside_loop_p): New inline predicate.
5244 (push_range_check_info): Rename into...
5245 (find_loop_for): ...this and do not push range_check_info_d object.
5246 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
5247 fields of gnu_loop_info. Adjust detection of checks enabled by
5248 -funswitch-loops and adds one for -faggressive-loop-optimizations.
5249 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
5250 are enabled, warn for loops overrunning an array of size 1 not at the
5251 end of a record.
5252
52532015-06-25 Andrew MacLeod <amacleod@redhat.com>
5254
5255 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
5256 list.
5257 * gcc-interface/utils.c: Likewise.
5258
52592015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5260
5261 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
5262 ggc_cache_ptr_hash rather than ggc_cache_hasher.
5263 * gcc-interface/utils.c (pad_type_hasher): Likewise.
5264
52652015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5266
5267 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
5268 Delete.
5269 (value_annotation_hasher::keep_cache_entry): New function.
5270 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
5271 Delete.
5272 (pad_type_hasher::keep_cache_entry): New function.
5273
52742015-06-25 Andrew MacLeod <amacleod@redhat.com>
5275
5276 * gcc-interface/misc.c: Include calls.h not function.h.
5277
52782015-06-19 Eric Botcazou <ebotcazou@adacore.com>
5279
5280 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
5281 (tree create_type_decl): Likewise.
5282 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
5283 (create_var_decl): Likewise.
5284 (create_true_var_decl): Delete.
5285 (create_subprog_decl): Add debug_info_p parameter.
5286 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
5287 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
5288 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
5289 Remove DECL_IGNORED_P settings.
5290 <E_Enumeration_Type>: Likewise.
5291 <E_Record_Type>: Likewise.
5292 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
5293 Adjust call to create_subprog_decl.
5294 (get_minimal_subprog_decl): Likewise.
5295 (elaborate_expression_1): Adjust call to create_var_decl.
5296 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
5297 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
5298 * gcc-interface/utils.c (maybe_pad_type): Likewise.
5299 (record_builtin_type): Adjust comment.
5300 (create_type_stub_decl): Remove obsolete comment.
5301 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
5302 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
5303 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
5304 accordingly.
5305
53062015-06-19 Eric Botcazou <ebotcazou@adacore.com>
5307
5308 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
5309
53102015-06-19 Eric Botcazou <ebotcazou@adacore.com>
5311
5312 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
5313 the size of a padding type built around the return type is positive.
5314 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
5315 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
5316
53172015-06-17 Andrew MacLeod <amacleod@redhat.com>
5318
5319 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
5320 * gcc-interface/decl.c: Likewise.
5321 * gcc-interface/misc.c: Likewise.
5322 * gcc-interface/targtyps.c: Likewise.
5323 * gcc-interface/trans.c: Likewise.
5324 * gcc-interface/utils.c: Likewise.
5325 * gcc-interface/utils2.c: Likewise.
5326
53272015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5328
5329 * gcc-interface/utils.c (get_global_context): Register the main
5330 translation unit through the new debug hook.
5331
53322015-06-09 Eric Botcazou <ebotcazou@adacore.com>
5333
5334 * gcc-interface/misc.c: Remove duplicate include directives.
5335 * gcc-interface/trans.c: Likewise.
5336 * gcc-interface/utils.c: Likewise.
5337
53382015-06-08 Andrew MacLeod <amacleod@redhat.com>
5339
5340 * gcc-interface/cuintp.c : Adjust include files.
5341 * gcc-interface/decl.c : Likewise.
5342 * gcc-interface/misc.c : Likewise.
5343 * gcc-interface/targtyps.c : Likewise.
5344 * gcc-interface/trans.c : Likewise.
5345 * gcc-interface/utils.c : Likewise.
5346 * gcc-interface/utils2.c : Likewise.
5347
53482015-06-08 John Marino <gnugcc@marino.st>
5349
5350 * a-intnam-dragonfly.ads: New.
5351 * s-osinte-dragonfly.adb: Likewise.
5352 * s-osinte-dragonfly.ads: Likewise.
5353 * system-dragonfly-x86_64.ads: Likewise.
5354 * adaint.c: Add BSD macros.
5355 * cstreams.c: Likewise.
5356 * gsocket.h: Likewise.
5357 * link.c: Likewise.
5358 * socket.c: Likewise.
5359 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
5360 * init.c: Add __DragonFly__, change __gnat_install_handler
5361 prototype from empty to void.
5362 * initialize.c: Add __DragonFly__.
5363 * sysdep.c: Likewise.
5364 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
5365 * tracebak.c: Set unwinder for i386 BSD.
5366 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
5367 x86_64 FreeBSD and x86 FreeBSD.
5368
53692015-06-06 Eric Botcazou <ebotcazou@adacore.com>
5370
5371 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
5372 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
5373
53742015-06-05 Aldy Hernandez <aldyh@redhat.com>
5375
5376 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
5377 gnat_write_global_declarations.
5378 * gcc-interface/misc.c (gnat_parse_file): Call
5379 note_types_used_by_globals.
5380 Remove LANG_HOOKS_WRITE_GLOBALS.
5381 * gcc-interface/utils.c: Rename global_decls to type_decls.
5382 (gnat_write_global_declarations): Rename
5383 to note_types_used_by_globals.
5384 Remove call to finalize_compilation_unit.
5385 Remove call to debug_hooks->global_decl for globals.
5386 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
5387
53882015-06-04 Andrew MacLeod <amacleod@redhat.com>
5389
5390 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
5391 * gcc-interface/decl.c: Likewise.
5392 * gcc-interface/misc.c: Likewise.
5393 * gcc-interface/targtyps.c: Likewise.
5394 * gcc-interface/trans.c: Likewise.
5395 * gcc-interface/utils.c: Likewise.
5396 * gcc-interface/utils2.c: Likewise.
5397
53982015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
5399
5400 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
5401 processing a definition, create definitions for padding types
5402 around return types.
5403
54042015-06-03 Eric Botcazou <ebotcazou@adacore.com>
5405
5406 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
5407
54082015-06-03 Eric Botcazou <ebotcazou@adacore.com>
5409
5410 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
5411 typo in latest change.
5412
54132015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5414
5415 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
5416
54172015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
5418
5419 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
5420 call expression, process the corresponding function body. Also handle
5421 potential addends.
5422
54232015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
5424
5425 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
5426 references ones for functions that return references.
5427
54282015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5429
5430 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
5431 definition of a type coming from a limited_with, get to the full view
5432 if it is not in the main code unit.
5433
54342015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5435
5436 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
5437 specified, let the target mangle it before settting.
5438 (create_subprog_decl): Likewise and move this treatment last.
5439
54402015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5441
5442 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
5443 before first -gnatez switch. Simplify and add trailing space.
5444
54452015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5446
5447 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
5448 record has a parent field and a representation clause, make sure that
5449 it is properly aligned.
5450
54512015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5452
5453 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
5454 with character and enumeration literals as index values.
5455
54562015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5457
5458 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
5459 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
5460 address clause on aliased object with unconstrained nominal subtype.
5461 Mark the aligning variable as artificial, do not convert the address
5462 expression immediately but mark it as constant instead.
5463 * gcc-interface/utils.c (convert): If the target type contains a
5464 template, be prepared for an empty array.
5465 (maybe_unconstrained_array): Likewise.
5466 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
5467 with the pattern built for aligning types.
5468 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
5469 (build_simple_component_ref): Make public.
5470 If the base object is a constructor that contains a template, fold the
5471 result field by field.
5472
54732015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5474
5475 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
5476
54772015-05-30 Eric Botcazou <ebotcazou@adacore.com>
5478
5479 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
5480 of sun. Add missing leading underscore to AIX. Remove #elif 0.
5481 * adaint.h: Likewise.
5482 * cio.c: Likewise.
5483 * cstreams.c: Likewise.
5484 * env.c: Likewise.
5485 * gsocket.h: Likewise.
5486 * init.c: Likewise. Test for __i386__ instead of i386.
5487 * link.c: Likewise.
5488 * s-oscons-tmplt.c: Likewise.
5489 * sysdep.c: Likewise.
5490 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
5491 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
5492
54932015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5494
5495 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
5496 deal with the subtraction of a "negative" value in an unsigned type.
5497
54982015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5499
5500 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
5501 not error out on a return type which has a size that overflows if the
5502 return is done by invisible reference.
5503
55042015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5505
5506 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
5507 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
5508
55092015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5510
5511 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
5512 (rewrite_fn): Remove third parameter.
5513 (type_is_padding_self_referential): New inline predicate.
5514 (return_type_with_variable_size_p): Likewise.
5515 * gcc-interface/decl.c (allocatable_size_p): More around.
5516 (cannot_be_superflat_p): Rename into...
5517 (cannot_be_superflat ): ...this.
5518 (initial_value_needs_conversion): New predicate.
5519 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
5520 initial_value_needs_conversion and adjust to above renaming.
5521 For a renaming, force the materialization if the inner expression
5522 is compound. Adjust calls to elaborate_reference and build a
5523 compound expression if needed.
5524 (struct er_dat): Add N field.
5525 (elaborate_reference_1): Remove N parameter and adjust.
5526 (elaborate_reference): Add INIT parameter and pass it in the call to
5527 gnat_rewrite_reference. Adjust initial expression.
5528 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
5529 regular object declarations when it comes to creating a temporary.
5530 Adjust call to gnat_stabilize_reference and build a compound expression
5531 if needed. Invoke return_type_with_variable_size_p.
5532 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
5533 return a call to a function unmodified if it returns with variable size
5534 and is also the initial expression in an object declaration.
5535 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
5536 type if it is a call to a function that returns with variable size.
5537 (build_unary_op): Invoke type_is_padding_self_referential.
5538 (gnat_stabilize_reference_1): Remove N parameter and adjust.
5539 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
5540 to gnat_rewrite_reference.
5541 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
5542 <COMPOUND_EXPR>: New case.
5543
55442015-05-28 Ed Schonberg <schonberg@adacore.com>
5545
5546 * sem_ch3.adb (Is_Visible_Component): Component is visible
5547 in a derived type if inherited through an ancestor that has a
5548 partial view of the original type holding the component, if the
5549 full view of that original type is in scope.
5550 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
5551
55522015-05-28 Bob Duff <duff@adacore.com>
5553
5554 * sem_util.adb (Requires_Transient_Scope): For definite untagged
5555 subtypes, we should never have to use the secondary stack. This moves
5556 toward that goal. But there are still cases that don't work.
5557 Here, we move the check for Is_Definite first, but add a
5558 special-purpose check for Has_Discrim_Dep_Array.
5559
55602015-05-28 Bob Duff <duff@adacore.com>
5561
5562 * sem_util.adb (Requires_Transient_Scope): Avoid returning
5563 function results on the secondary stack in so many cases.
5564
55652015-05-28 Ed Schonberg <schonberg@adacore.com>
5566
5567 * sem_util.adb (Wrong_Type): In any instance, do not emit error
5568 if type of expression is the partial view of the expected type.
5569
55702015-05-28 Ed Schonberg <schonberg@adacore.com>
5571
5572 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
5573 names in named associations only needs to be done within an
5574 instance, on a call to a primitive of a formal derived type,
5575 where the actual subprogram may have different formal names than
5576 those of the primitive operation of the formal type.
5577 b) Defaulted parameters must be taken into account when obtaining
5578 the names of the formals of the actual subprogram being called.
5579
55802015-05-28 Robert Dewar <dewar@adacore.com>
5581
5582 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
5583
55842015-05-28 Ed Schonberg <schonberg@adacore.com>
5585
5586 * sem_util.adb (Set_Debug_Info_Needed): For a private type
5587 whose full view is itself a derived private type, set flag on
5588 underlying full view as well, for proper gdb display.
5589
55902015-05-28 Bob Duff <duff@adacore.com>
5591
5592 * exp_tss.ads: Minor comment fix.
5593 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
5594 Inline init_procs when the type has controlled parts. Remove
5595 obsolete comments about those init_procs -- init_procs for
5596 such types are no longer complex. A typical init_proc just
5597 initializes the 'Tag field, and calls the parent init_proc
5598 (e.g. for Limited_Controlled), which calls the grandparent
5599 (for Root_Controlled), which does nothing. This all boils down
5600 to one instruction when inlined.
5601 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
5602
56032015-05-28 Ed Schonberg <schonberg@adacore.com>
5604
5605 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
5606 is a derived type and is a generic actual, the selected component
5607 appears within an instance body, and the check over the type
5608 has failed, examine ancestor types for the desired component.
5609 (Find_Component_In_Instance): If record type is a derived type,
5610 examine all ancestors in order to locate desired component.
5611
56122015-05-27 H.J. Lu <hongjiu.lu@intel.com>
5613
5614 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
5615
56162015-05-27 Eric Botcazou <ebotcazou@adacore.com>
5617
5618 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
5619 incomplete type coming from a limited_with and whose non-limited view
5620 comes from the main unit.
5621
56222015-05-27 Eric Botcazou <ebotcazou@adacore.com>
5623
5624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
5625 code applying atomic checks to the object.
5626
56272015-05-27 Robert Dewar <dewar@adacore.com>
5628
5629 * sem_aux.adb: Minor rewording.
5630
56312015-05-27 Bob Duff <duff@adacore.com>
5632
5633 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
5634 pragma Abort_Defer do nothing if Abort_Allowed is False.
5635
56362015-05-27 Arnaud Charlet <charlet@adacore.com>
5637
5638 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
5639 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
5640 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
5641 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
5642
56432015-05-27 Doug Rupp <rupp@adacore.com>
5644
5645 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
5646 well as kernel.
5647
56482015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
5649
5650 * par_sco.adb (Process_Decision): Store sloc to
5651 condition/pragmas SCOs associations into a temporary table before
5652 moving them to the SCO_Raw_Hash_Table so that we can back them
5653 out just like we do for SCO entries that are simple decisions
5654 in an expression context.
5655
56562015-05-27 Ed Schonberg <schonberg@adacore.com>
5657
5658 * sem_ch6.adb (Process_Formals): A non-private formal type that
5659 is a limited view does not have a list of private dependents.
5660
56612015-05-27 Ed Schonberg <schonberg@adacore.com>
5662
5663 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
5664 the case statement is a compile-time known value, we look for a
5665 corresponding alternative to optimize the case statement into a
5666 single case. If the type has a static predicate and the expression
5667 does not satisfy the predicate, there is no legal alternative and
5668 this optimization is not applicable. Excecution is erroneous,
5669 or else if assertions are enabled, an exception will be raised
5670 earlier, at the point the expression is elaborated.
5671
56722015-05-27 Robert Dewar <dewar@adacore.com>
5673
5674 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
5675 warning on Finalize, Adjust, or Initialize if type involved has
5676 Warnings_Off set.
5677
56782015-05-27 Ed Schonberg <schonberg@adacore.com>
5679
5680 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
5681 applied to a type with no known discriminants.
5682
56832015-05-26 Robert Dewar <dewar@adacore.com>
5684
5685 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
5686
56872015-05-26 Bob Duff <duff@adacore.com>
5688
5689 * sem_elab.adb (Check_A_Call): In the case where we're
5690 calling something in an instance of a generic package that is
5691 within this same unit (as the call), make sure we treat it
5692 as a call to an entity within the same unit. That is, call
5693 Check_Internal_Call, rather than putting "Elaborate_All(X)"
5694 on X, which would necessarily result in an elaboration cycle in
5695 static-elaboration mode.
5696
56972015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5698
5699 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
5700 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
5701 parameter into Node parameter and remove Type parameter.
5702 Look at Is_Atomic_Or_VFA both on the type and on the object.
5703 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
5704 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
5705 (Process_Atomic_Independent_Shared_Volatile): Remove code
5706 propagating Atomic or VFA from object to locally-defined type.
5707
57082015-05-26 Bob Duff <duff@adacore.com>
5709
5710 * exp_ch7.adb: Minor comment fix.
5711
57122015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5713
5714 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
5715 bother about NaN's if Machine_Overflows is true.
5716
57172015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5718
5719 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
5720 force evaluation of the expression, if any, when the object has its
5721 elaboration delayed. Do not create a variable at global level.
5722
57232015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5724
5725 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
5726 extra-precision trick to literals. Build SAVE_EXPR manually.
5727
5728 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
5729
57302015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5731
5732 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
5733 (DECL_RENAMED_OBJECT): Adjust comment.
5734 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
5735 (invalidate_global_nonconstant_renamings): Likewise.
5736 (gnat_constant_reference_p): Likewise.
5737 (rewrite_fn): New function type.
5738 (gnat_rewrite_reference): Declare.
5739 (call_is_atomic_load): New inline predicate.
5740 * gcc-interface/decl.c (elaborate_reference_1): New function.
5741 (elaborate_reference): Likewise.
5742 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
5743 and simplify associated code. Set const_flag to true consistently in
5744 conjunction with used_by_ref.
5745 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
5746 pointers by renamed objects.
5747 (outer_atomic_access_required_p): Deal with renamings.
5748 (Compilation_Unit_to_gnu): Do not call
5749 invalidate_global_nonconstant_renamings.
5750 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
5751 (gnat_gimplify_expr): Deal with atomic loads.
5752 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
5753 (destroy_gnat_utils): Do not call
5754 invalidate_global_nonconstant_renamings.
5755 (record_global_nonconstant_renaming): Delete.
5756 (invalidate_global_nonconstant_renamings): Likewise.
5757 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
5758 (build_load_modify_store): Build a copy of the destination.
5759 (gnat_stabilize_reference_1): Adjust.
5760 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
5761 gnat_rewrite_reference and move bulk of code to...
5762 (gnat_rewrite_reference): ...here. New global function.
5763 (gnat_constant_reference_p): Delete.
5764
57652015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5766
5767 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
5768 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
5769 to detect constant renamings. Be prepared for specific pattern of
5770 renamed object based on function calls. Create a constant object
5771 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
5772 to gnat_stabilize_reference and tidy up. Remove redundant tests.
5773 (elaborate_expression_1): Remove obsolete test and tidy up.
5774 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
5775 parameters passed by reference.
5776 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
5777 side-effects.
5778 Use gnat_protect_expr instead of gnat_stabilize_reference for general
5779 protection against side-effects.
5780 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
5781 (gnat_save_expr): Invoke it.
5782 (gnat_protect_expr): Likewise.
5783 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
5784 of TREE_THIS_NOTRAP.
5785 (gnat_stabilize_reference): Remove parameter and adjust throughout.
5786 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
5787 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
5788
57892015-05-26 Ed Schonberg <schonberg@adacore.com>
5790
5791 * sinfo.ads: Minor reformatting.
5792 * sem_aux.ads: Clarify use of First_Discriminant.
5793 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
5794 view is replaced with the non-limited view in an instance body,
5795 where the enclosing unit must have a regular with_clause on the
5796 relevant unit.
5797 * sem_ch12.adb (Install_Body): Freeze instantation after its
5798 body. Remove useless freeze nodes for incomplete actuals to
5799 prevent multiple generation of internal operations.
5800 (Instantiate_Package_Body): Set sloc of body appropriately when
5801 there are incomplete actuals and the instance body is placed in
5802 the body of the enclosing unit.
5803 * errout.ads: Consistent punctuation, better alignment and trivial
5804 typos in comments.
5805 * err_vars.ads: Fix typo.
5806
58072015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5808
5809 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
5810 components of Volatile_Full_Access objects.
5811
58122015-05-26 Ed Schonberg <schonberg@adacore.com>
5813
5814 * sem_ch6.adb (Is_Non_Overriding_Operation,
5815 Get_Generic_Parent_Type): Handle properly the case of a derived
5816 scalar type by using the first subtype rather than its generated
5817 anonymous base type.
5818
58192015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5820
5821 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
5822 case to...
5823 (Write_Field19_Name): ...here.
5824
58252015-05-26 Ed Schonberg <schonberg@adacore.com>
5826
5827 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
5828 of original expression in ASIS mode: does not solve the ASIS
5829 problem of a usable type information, and crashes the back-end
5830 when performing type annotations.
5831
58322015-05-26 Robert Dewar <dewar@adacore.com>
5833
5834 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
5835 (Is_Overriding_Subprogram): Use One_Only_Parameter.
5836 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
5837
58382015-05-26 Robert Dewar <dewar@adacore.com>
5839
5840 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
5841 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
5842 exp_ch3.adb: Minor reformatting.
5843
58442015-05-26 Bob Duff <duff@adacore.com>
5845
5846 * treepr.adb: Minor improvement to debugging routines (pp, pn)
5847 robustness. Rearrange the code so passing a nonexistent Node_Id
5848 prints "No such node" rather than crashing, and causing gdb to
5849 generate confusing messages.
5850
58512015-05-26 Gary Dismukes <dismukes@adacore.com>
5852
5853 * sem_util.adb: Minor typo fix.
5854
58552015-05-26 Yannick Moy <moy@adacore.com>
5856
5857 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
5858
58592015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
5860
5861 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
5862 restore the Ghost mode.
5863 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
5864 (Freeze_Type): Update the call to Set_Ghost_Mode.
5865 (Restore_Globals): New routine.
5866 * exp_ch5.adb Add with and use clauses for Ghost.
5867 (Expand_N_Assignment_Statement): Capture, set and restore the
5868 Ghost mode.
5869 (Restore_Globals): New routine.
5870 * exp_ch6.adb Add with and use clauses for Ghost.
5871 (Expand_N_Procedure_Call_Statement): Capture, set and
5872 restore the Ghost mode.
5873 (Expand_N_Subprogram_Body):
5874 Code cleanup. Capture, set and restore the Ghost mode.
5875 (Expand_N_Subprogram_Declaration): Capture, set and restore the
5876 Ghost mode.
5877 (Restore_Globals): New routine.
5878 * exp_ch7.adb Add with and use clauses for Ghost.
5879 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
5880 (Expand_N_Package_Declaration): Capture, set and restore the
5881 Ghost mode.
5882 (Wrap_HSS_In_Block): Create a proper identifier for the block.
5883 * exp_ch8.adb Add with and use clauses for Ghost.
5884 (Expand_N_Exception_Renaming_Declaration): Code
5885 cleanup. Capture, set and restore the Ghost mode.
5886 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
5887 the Ghost mode.
5888 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
5889 Ghost mode.
5890 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
5891 restore the Ghost mode.
5892 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
5893 cleanup. Capture, set and restore the Ghost mode.
5894 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
5895 not initialize the dispatch table slot of a Ghost subprogram.
5896 * exp_prag.adb Add with and use clauses for Ghost.
5897 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
5898 (Expand_Pragma_Contract_Cases): Capture, set and restore the
5899 Ghost mode.
5900 (Expand_Pragma_Initial_Condition): Capture, set and
5901 restore the Ghost mode.
5902 (Expand_Pragma_Loop_Variant): Capture,
5903 set and restore the Ghost mode.
5904 (Restore_Globals): New routine.
5905 * exp_util.adb Add with and use clauses for Ghost.
5906 (Make_Predicate_Call): Code cleanup. Capture, set and restore
5907 the Ghost mode.
5908 (Restore_Globals): New routine.
5909 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
5910 to Set_Ghost_Mode.
5911 * ghost.adb Add with and use clause for Sem_Prag.
5912 (Check_Ghost_Completion): Code cleanup.
5913 (Check_Ghost_Overriding): New routine.
5914 (Check_Ghost_Policy): Code cleanup.
5915 (Ghost_Entity): New routine.
5916 (Is_Ghost_Declaration): Removed.
5917 (Is_Ghost_Statement_Or_Pragma): Removed.
5918 (Is_OK_Context): Reimplemented.
5919 (Is_OK_Declaration): New routine.
5920 (Is_OK_Pragma): New routine.
5921 (Is_OK_Statement): New routine.
5922 (Mark_Full_View_As_Ghost): New routine.
5923 (Mark_Pragma_As_Ghost): New routine.
5924 (Mark_Renaming_As_Ghost): New routine.
5925 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
5926 (Set_From_Entity): New routine.
5927 (Set_From_Policy): New routine.
5928 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
5929 (Set_Ghost_Mode_For_Freeze): Removed.
5930 (Set_Ghost_Mode_From_Entity): New routine.
5931 (Set_Ghost_Mode_From_Policy): Removed.
5932 * ghost.ads (Check_Ghost_Overriding): New routine.
5933 (Mark_Full_View_As_Ghost): New routine.
5934 (Mark_Pragma_As_Ghost): New routine.
5935 (Mark_Renaming_As_Ghost): New routine.
5936 (Set_Ghost_Mode): Update the parameter profile. Update the
5937 comment on usage.
5938 (Set_Ghost_Mode_For_Freeze): Removed.
5939 (Set_Ghost_Mode_From_Entity): New routine.
5940 * sem_ch3.adb (Analyze_Full_Type_Declaration):
5941 Capture and restore the Ghost mode. Mark a type
5942 as Ghost regardless of whether it comes from source.
5943 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
5944 Ghost mode.
5945 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
5946 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
5947 (Analyze_Private_Extension_Declaration): Capture and
5948 restore the Ghost mode.
5949 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
5950 (Process_Full_View): The full view inherits all Ghost-related
5951 attributes from the private view.
5952 (Restore_Globals): New routine.
5953 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
5954 Ghost mode.
5955 (Restore_Globals): New routine.
5956 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
5957 Code cleanup. Capture and restore the Ghost mode. Mark a
5958 subprogram as Ghost regarless of whether it comes from source.
5959 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
5960 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
5961 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
5962 (New_Overloaded_Entity): Ensure that a
5963 parent subprogram and an overriding subprogram have compatible
5964 Ghost policies.
5965 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
5966 the Ghost mode.
5967 (Analyze_Package_Declaration): Capture and
5968 restore the Ghost mode. Mark a package as Ghost when it is
5969 declared in a Ghost region.
5970 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
5971 (Restore_Globals): New routine.
5972 * sem_ch8.adb (Analyze_Exception_Renaming): Code
5973 reformatting. Capture and restore the Ghost mode. A renaming
5974 becomes Ghost when its name references a Ghost entity.
5975 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
5976 renaming becomes Ghost when its name references a Ghost entity.
5977 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
5978 renaming becomes Ghost when its name references a Ghost entity.
5979 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
5980 renaming becomes Ghost when its name references a Ghost entity.
5981 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
5982 mode. A renaming becomes Ghost when its name references a
5983 Ghost entity.
5984 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
5985 and restore the Ghost mode.
5986 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
5987 restore the Ghost mode.
5988 (Analyze_Generic_Subprogram_Declaration):
5989 Capture and restore the Ghost mode.
5990 * sem_ch13.adb Add with and use clauses for Ghost.
5991 (Add_Invariant): New routine.
5992 (Add_Invariants): Factor out code.
5993 (Add_Predicate): New routine.
5994 (Add_Predicates): Factor out code.
5995 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
5996 set and restore the Ghost mode.
5997 (Build_Invariant_Procedure): Code cleanup.
5998 (Build_Predicate_Functions): Capture, set and
5999 restore the Ghost mode. Mark the generated functions as Ghost.
6000 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
6001 Capture, set and restore the Ghost mode.
6002 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
6003 the Ghost mode.
6004 (Analyze_Initial_Condition_In_Decl_Part):
6005 Capture, set and restore the Ghost mode.
6006 (Analyze_Pragma):
6007 Code cleanup. Capture, set and restore the Ghost mode. Flag
6008 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
6009 Unreferenced_Objects as illegal when it applies to both Ghost
6010 and living arguments. Pragma Ghost cannot apply to synchronized
6011 objects.
6012 (Check_Kind): Moved to the spec of Sem_Prag.
6013 (Process_Inline): Flag the pragma as illegal when it applies to
6014 both Ghost and living arguments.
6015 (Restore_Globals): New routine.
6016 * sem_prag.ads Add pragma Default_Initial_Condition
6017 to table Assertion_Expression_Pragma. Add new table
6018 Is_Aspect_Specifying_Pragma.
6019 (Check_Kind): Moved from body of Sem_Prag.
6020 * sem_util.adb Add with and use clauses for Ghost.
6021 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
6022 the Ghost mode.
6023 (Build_Default_Init_Cond_Procedure_Declaration):
6024 Capture, set and restore the Ghost mode. Mark the default
6025 initial condition procedure as Ghost when it is declared
6026 in a Ghost region.
6027 (Is_Renaming_Declaration): New routine.
6028 (Policy_In_List): Account for the single argument version of
6029 Check_Pragma.
6030 * sem_util.ads (Is_Renaming_Declaration): New routine.
6031 * sinfo.adb (Is_Ghost_Pragma): New routine.
6032 (Set_Is_Ghost_Pragma): New routine.
6033 * sinfo.ads New attribute Is_Ghost_Pragma.
6034 (Is_Ghost_Pragma): New routine along with pragma Inline.
6035 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
6036
60372015-05-26 Robert Dewar <dewar@adacore.com>
6038
6039 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
6040 Minor reformatting.
6041
60422015-05-26 Gary Dismukes <dismukes@adacore.com>
6043
6044 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
6045 reformatting and typo fixes in comments.
6046
60472015-05-26 Ed Schonberg <schonberg@adacore.com>
6048
6049 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
6050 the two views of a private dependent in two separate steps,
6051 to ensure proper visibility in parent units analyzed for inlining.
6052
60532015-05-26 Yannick Moy <moy@adacore.com>
6054
6055 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
6056 (Package_Body, Package_Spec): New queries moved
6057 here from GNATprove.
6058 (Package_Specification): Simplify query to remove use of loop.
6059 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
6060 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
6061 queries moved here from GNATprove.
6062
60632015-05-26 Bob Duff <duff@adacore.com>
6064
6065 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
6066 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
6067 redundant assertions.
6068
60692015-05-26 Gary Dismukes <dismukes@adacore.com>
6070
6071 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
6072
60732015-05-26 Doug Rupp <rupp@adacore.com>
6074
6075 * init.c [vxworks]: Refine previous checkin.
6076
60772015-05-26 Robert Dewar <dewar@adacore.com>
6078
6079 * exp_ch4.adb (Wrap_MA): New function.
6080 (Expand_N_Op_Expon): Use Wrap_MA.
6081
60822015-05-26 Bob Duff <duff@adacore.com>
6083
6084 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6085 Do not use secondary stack to return limited records with
6086 defaulted discriminants. This is an efficiency improvement.
6087 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
6088 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
6089 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
6090 Is_Definite_Subtype. This is an improvement to readability (the double
6091 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
6092 disallow passing non-[sub]type entities, an unnecessary and slightly
6093 bug-prone flexibility.
6094
60952015-05-26 Robert Dewar <dewar@adacore.com>
6096
6097 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
6098 bad bounds.
6099 * debug.adb: Document -gnatd.k.
6100 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
6101
61022015-05-26 Robert Dewar <dewar@adacore.com>
6103
6104 * gnat1drv.adb (Gnat1drv): Provide new arguments for
6105 Get_Target_Parameters.
6106 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
6107 new procedure.
6108 (Set_Restriction_No_Use_Of_Attribute): new procedure.
6109 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
6110 new procedure.
6111 (Set_Restriction_No_Use_Of_Attribute): new procedure.
6112 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
6113 * targparm.adb (Get_Target_Parameters): Allow new restriction
6114 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
6115 No_Use_Of_Pragma.
6116 * targparm.ads: New parameters for Get_Target_Parameters.
6117 * tbuild.adb (Set_NOD): New name for Set_RND.
6118 (Set_NSA): New procedure.
6119 (Set_NUA): New procedure.
6120 (Set_NUP): New procedure.
6121 * tbuild.ads (Make_SC): Minor reformatting.
6122 (Set_NOD): New name for Set_RND.
6123 (Set_NSA, Set_NUA, Set_NUP): New procedure.
6124
61252015-05-26 Ed Schonberg <schonberg@adacore.com>
6126
6127 * a-stwise.adb (Find_Token): If source'first is not positive,
6128 an exception must be raised, as specified by RM 2005 A.4.3
6129 (68/1). This must be checked explicitly, given that run-time
6130 files are normally compiled without constraint checks.
6131 * a-stzsea.adb (Find_Token): Ditto.
6132
61332015-05-26 Ed Schonberg <schonberg@adacore.com>
6134
6135 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
6136 to fully implement RM 8.6 (17/3). which earlier only applied
6137 to synchronized types. Used to preanalyze aspects that include
6138 current instances of types, such as Predicate and Invariant.
6139 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
6140 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
6141 expression of aspect and analyze it to provide proper type
6142 information.
6143
61442015-05-26 Robert Dewar <dewar@adacore.com>
6145
6146 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
6147 * s-exnllf.adb (Exn_Float): New function.
6148 (Exn_Long_Float): New function.
6149 (Exn_Long_Long_Float): Rewritten interface.
6150 (Exp): New name for what used to be Exn_Long_Long_Float.
6151 * s-exnllf.ads (Exn_Float): New function.
6152 (Exn_Long_Float): New function.
6153
61542015-05-26 Ed Schonberg <schonberg@adacore.com>
6155
6156 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
6157 on a selected component when the prefix is a type name that is
6158 a Current_Instance.
6159 * einfo.ads: Minor grammar fix.
6160
61612015-05-26 Doug Rupp <rupp@adacore.com>
6162
6163 * init.c [vxworks] (sysLib.h): Only for x86.
6164
61652015-05-26 Doug Rupp <rupp@adacore.com>
6166
6167 * init-vxsim.c (CPU): define as __VXSIM_CPU__
6168 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
6169 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
6170 * sigtramp.h: Likewise.
6171
61722015-05-26 Robert Dewar <dewar@adacore.com>
6173
6174 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
6175 * sem_util.adb: Minor reformatting
6176
61772015-05-26 Yannick Moy <moy@adacore.com>
6178
6179 * inline.adb (Has_Initialized_Type): Adapt to new names.
6180 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
6181 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
6182 Subprogram_Specification): New query functions used in GNATprove.
6183 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
6184 query functions used in GNATprove.
6185 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
6186 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
6187 Is_Double_Precision_Floating_Point_Type,
6188 Is_Single_Precision_Floating_Point_Type): New query functions
6189 used in GNATprove.
6190
61912015-05-26 Bob Duff <duff@adacore.com>
6192
6193 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
6194 some huge number.
6195 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
6196 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
6197
61982015-05-26 Robert Dewar <dewar@adacore.com>
6199
6200 * sinfo.adb: Minor comment addition.
6201 * einfo.adb: Minor whitespace and punctuation fix.
6202 * sem_util.adb: Minor editing of comments.
6203
62042015-05-26 Ed Schonberg <schonberg@adacore.com>
6205
6206 * sem_ch7.adb (Install_Private_Declarations,
6207 Swap_Private_Dependents): Ensure that both views of the dependent
6208 subtype are immediately visible if we are within their scope. This
6209 may be needed when a procedure body is both the parent of an
6210 instantiated child unit, and is itself used to inline a local
6211 function.
6212
62132015-05-26 Gary Dismukes <dismukes@adacore.com>
6214
6215 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
6216
62172015-05-26 Eric Botcazou <ebotcazou@adacore.com>
6218
6219 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
6220 detecting exceptions to the rewriting, deal with implicit
6221 dereferences in the selected component case.
6222
62232015-05-26 Bob Duff <duff@adacore.com>
6224
6225 * sem_ch13.adb (Analyze_One_Aspect): Do not
6226 require the expression of the Disable_Controlled aspect to be
6227 static in a generic template, because 'Enabled is not known
6228 until the instance.
6229
62302015-05-26 Doug Rupp <rupp@adacore.com>
6231
6232 * init-vxsim.c: New file for vxsim ZCX
6233 * sigtramp-vxworks-vxsim.c: Likewise.
6234 * sigtramp-vxworks.c: Factor out target dependent bits into ...
6235 * sigtramp-vxworks-target.inc: ... here.
6236 * sigtramp.h: Add vxsim zcx protos.
6237 * init.c [vxworks...] (sysLib.h): Include.
6238 (__gnat_map_signal): Make global.
6239 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
6240 on vxsim.
6241 [...i386] (__gnat_install_handler): Test if on vxsim.
6242
62432015-05-26 Ed Schonberg <schonberg@adacore.com>
6244
6245 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
6246 iterator over an array, if the component is aliased, the loop
6247 variable is aliased as well.
6248
62492015-05-26 Ed Schonberg <schonberg@adacore.com>
6250
6251 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
6252 parameters that is rewritten as an expression_with_actions,
6253 we preserve the original function call node for further use by
6254 the caller (typically Expand_Call). In the presence of validity
6255 checks, that function call, though it is labelled Analyzed to
6256 prevent an infinite recursion, may be rewritten as a temporary
6257 by Remove_Side_Effects. Ensure that the caller has access to
6258 the original function call to continue expansion.
6259 * atree.ads: Minor typo in comment.
6260
62612015-05-26 Javier Miranda <miranda@adacore.com>
6262
6263 * sem_util.adb (Check_Function_Writable_Actuals):
6264 Add missing support to check the violation of writable actuals
6265 in array aggregates that have a nonstatic range.
6266
62672015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
6268
6269 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
6270 Expand_Pragma_Contract_Cases.
6271 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
6272 Expand_Pragma_Contract_Cases.
6273 * sem_ch13.adb (Add_Invariants): Use the original aspect name
6274 when creating the arguments of pragma Check. This ensures that
6275 'Class is properly recognized and handled.
6276
62772015-05-26 Arnaud Charlet <charlet@adacore.com>
6278
6279 * gnat1drv.adb: Minor adjustments.
6280 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
6281 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
6282 Stop_Subtree_Climbind): Code cleanup.
6283 * einfo.ads: Minor comment change.
6284
62852015-05-26 Javier Miranda <miranda@adacore.com>
6286
6287 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6288 Code cleanup.
6289 * sem_ch3.adb (Build_Derived_Record_Type,
6290 Record_Type_Declaration): Code cleanup.
6291 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
6292 Stop_Subtree_Climbind): Tables which speed up the identification
6293 of dangerous calls to Ada 2012 functions with writable actuals
6294 (AI05-0144).
6295 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
6296 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
6297 Analyze_Range): Code cleanup.
6298 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
6299 (Check_Writable_Actuals): Code cleanup using the added tables.
6300 * sem_util.adb (Check_Function_Writable_Actuals): Return
6301 immediately if the node does not have the flag Check_Actuals
6302 set to True.
6303
63042015-05-26 Eric Botcazou <ebotcazou@adacore.com>
6305
6306 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
6307 condition in the detection of the effects of Remove_Side_Effects.
6308 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
6309 * exp_util.adb (Is_Name_Reference): New predicate.
6310 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
6311 in order to decide whether to use the renaming to capture the
6312 side effects of the subexpression.
6313 (Side_Effect_Free): Remove obsolete test.
6314
63152015-05-26 Robert Dewar <dewar@adacore.com>
6316
6317 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
6318 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
6319 (Is_Controlled_Active): New function.
6320 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
6321 Is_Controlled_Active.
6322 * exp_util.adb (Needs_Finalization): Finalization not needed
6323 if Disable_Controlled set.
6324 * freeze.adb (Freeze_Array_Type): Do not set
6325 Has_Controlled_Component if the component has Disable_Controlled.
6326 (Freeze_Record_Type): ditto.
6327 * sem_ch13.adb (Decorate): Minor reformatting.
6328 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
6329 * sem_ch3.adb (Analyze_Object_Declaration): Handle
6330 Disable_Controlled.
6331 (Array_Type_Declaration): ditto.
6332 (Build_Derived_Private_Type): ditto.
6333 (Build_Derived_Type): ditto.
6334 (Record_Type_Definition): ditto.
6335 * snames.ads-tmpl: Add Name_Disable_Controlled.
6336
63372015-05-26 Eric Botcazou <ebotcazou@adacore.com>
6338
6339 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
6340 of a renaming to capture the return value of a function call.
6341 (Expand_Simple_Function_Return): Call Remove_Side_Effects
6342 instead of removing side effects manually before the call to
6343 _Postconditions.
6344
63452015-05-26 Robert Dewar <dewar@adacore.com>
6346
6347 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
6348 order in calling Duplicate_Subexpr.
6349 * einfo.ads: Fix documentation of Object/Value size for scalar types.
6350
63512015-05-26 Ed Schonberg <schonberg@adacore.com>
6352
6353 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
6354 If a component is default-initialized and its type has an
6355 invariant procedure, insert an invariant test after code for
6356 default-initialization of the component.
6357
63582015-05-26 Gary Dismukes <dismukes@adacore.com>
6359
6360 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
6361
63622015-05-26 Robert Dewar <dewar@adacore.com>
6363
6364 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
6365 making AREC entity names unique.
6366
63672015-05-26 Ed Schonberg <schonberg@adacore.com>
6368
6369 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
6370 has aspect specifications, examine the corresponding list of
6371 representation items to determine whether there is a visible
6372 stream operation. The attribute definition clause generated from
6373 the aspect will be inserted at the freeze point of the type,
6374 which may be in the private part and not directly visible,
6375 but the aspect makes the operation available to a client.
6376
63772015-05-26 Robert Dewar <dewar@adacore.com>
6378
6379 * sem_util.adb: Minor code reorganization.
6380 * sem_ch6.adb: Minor reformatting.
6381
63822015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6383
6384 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
6385 original size for elementary types before issuing the size warning.
6386
63872015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6388
6389 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
6390 (C_Get_Words_BE): Likewise.
6391 (C_Get_Bytes_BE): Likewise.
6392 (C_Get_Bits_BE): Likewise.
6393 (Width_From_Size): Remove superfluous space.
6394 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
6395 (get_target_float_words_be): ...this.
6396 (get_words_be): Rename into...
6397 (get_target_words_be): ...this.
6398 (get_bytes_be): Rename into...
6399 (get_target_bytes_be): ...this.
6400 (get_bits_be): Rename into...
6401 (get_target_bits_be): ...this.
6402 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
6403 (ptr_void_type_node): Delete.
6404 (get_target_float_size): Likewise.
6405 (get_target_double_size): Likewise.
6406 (get_target_long_double_size): Likewise.
6407 (get_float_words_be): Likewise.
6408 (get_words_be): Likewise.
6409 (get_bytes_be): Likewise.
6410 (get_bits_be): Likewise.
6411 (get_target_float_words_be): Declare.
6412 (get_target_words_be): Likewise.
6413 (get_target_bytes_be): Likewise.
6414 (get_target_bits_be): Likewise.
6415 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
6416 with ptr_type_node.
6417 (intrin_return_compatible_p): Likewise.
6418 * gcc-interface/trans.c (gigi): Likewise.
6419 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
6420 (maybe_wrap_free): Likewise.
6421 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
6422 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
6423
64242015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6425
6426 * gcc-interface/decl.c (elaborate_expression): Take a const string
6427 suffix instead of a tree.
6428 (elaborate_expression_1): Likewise.
6429 (elaborate_expression_2): Likewise.
6430 (gnat_to_gnu_entity): Adjust to above changes.
6431 (build_subst_list): Likewise.
6432 (get_entity_char): New static function.
6433
64342015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6435
6436 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
6437 <E_Exception>: Merge with E_Variable case.
6438 <E_Variable>: Remove 'object' label.
6439
64402015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6441
6442 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
6443 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
6444 * gcc-interface/utils.c (convert): Likewise and simplify.
6445 (remove_conversions): Likewise.
6446 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
6447 (build_unary_op): Likewise and simplify.
6448
64492015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6450
6451 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
6452 (build_atomic_store): Likewise.
6453 (build_load_modify_store): Declare.
6454 (VECTOR_TYPE_P): Delete.
6455 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
6456 Is_Atomic_Or_VFA throughout.
6457 <E_Array_Type>: Build a variant of the XUA type instead of forcing
6458 TYPE_VOLATILE on it.
6459 <E_Array_Subtype>: Use the main variant of the base type.
6460 Do not force TYPE_VOLATILE on the type being built.
6461 <E_Record_Type>: Likewise.
6462 <E_Array_Subtype>: Likewise.
6463 <E_Subprogram_Type>: Rename local variable.
6464 Add Atomic qualifier in conjunction with Volatile on types if needed.
6465 Force BLKmode for by-ref types only at the end of the processing.
6466 Change qualifiers only after changing the mode of the type. Set
6467 TYPE_UNIVERSAL_ALIASING_P on the type directly.
6468 (check_ok_for_atomic_type): Issue specific error message for VFA.
6469 (gnat_to_gnu_component_type): Replace Is_Atomic with
6470 Is_Atomic_Or_VFA throughout.
6471 * gcc-interface/misc.c (gnat_get_alias_set): Test
6472 TYPE_UNIVERSAL_ALIASING_P on the type directly.
6473 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
6474 Is_Atomic_Or_VFA throughout. Add missing guard.
6475 (node_is_atomic): New predicate.
6476 (node_has_volatile_full_access): Likewise.
6477 (gnat_strip_type_conversion): New function.
6478 (outer_atomic_access_required_p): New predicate.
6479 (atomic_sync_required_p): Rename into...
6480 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
6481 parent node first and then look for the atomic setting. Add support
6482 for Volatile_Full_Access.
6483 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
6484 and adjusts calls to above functions. Use load-modify-store sequence
6485 for updates of In/Out and Out parameters if required, as well as for
6486 moving the result to the target if required. Add couple of missing
6487 guards.
6488 (gnat_to_gnu): Adjust calls to above functions.
6489 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
6490 evaluate only its address.
6491 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
6492 store sequence if required.
6493 <N_Function_Call>: Adjust call to Call_to_gnu.
6494 (extract_values): Adjust comment.
6495 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
6496 use relaxed memory model if it is not set.
6497 (build_atomic_store): Likewise.
6498 (call_is_atomic_load): New predicate.
6499 (build_load_modify_store): New function.
6500 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
6501 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
6502
65032015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6504
6505 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
6506 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
6507 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
6508 (invalidate_global_renaming_pointers): Likewise.
6509 (record_global_nonconstant_renaming): New.
6510 (invalidate_global_nonconstant_renamings): Likewise.
6511 (get_inner_constant_reference): Likewise.
6512 (gnat_constant_reference_p): Likewise.
6513 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
6514 and register the renaming pointer only if the object is non-constant.
6515 (elaborate_expression_1): Call get_inner_constant_reference instead
6516 of get_inner_reference.
6517 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
6518 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
6519 object before substituting it.
6520 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
6521 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
6522 result at the global level.
6523 (N_Exception_Renaming_Declaration): Likewise.
6524 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
6525 (global_nonconstant_renamings): ...this.
6526 (destroy_gnat_utils): Adjust to above renaming.
6527 (record_global_renaming_pointer): Rename into...
6528 (record_global_nonconstant_renaming): ...this.
6529 (invalidate_global_renaming_pointers): Rename into...
6530 (invalidate_global_nonconstant_renamings): ...this and do not recheck
6531 the renamed object before invalidating.
6532 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
6533 (get_inner_constant_reference): New public function.
6534 (gnat_constant_reference_p): New predicate.
6535
65362015-05-25 Javier Miranda <miranda@adacore.com>
6537
6538 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
6539 is now present in subprograms, generic subprograms, entries and
6540 entry families.
6541 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
6542 on entries, entry families, subprograms and generic subprograms.
6543 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
6544 Minor code reorganization to ensure that the Ekind attribute
6545 of the subprogram entity is set before its formals are
6546 processed. Required to allow the use of the attribute
6547 Has_Out_Or_In_Out_Parameter on the subprogram entity.
6548 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6549 Perform the check on writable actuals only if the value of some
6550 component of the aggregate involves calling a function with
6551 out-mode parameters.
6552 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
6553 internally built aggregate.
6554 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
6555 Perform the check on writable actuals only if the initialization of
6556 some component involves calling a function with out-mode parameters.
6557 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
6558 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
6559 Analyze_Range): Check writable actuals only if the
6560 subtrees have a call to a function with out-mode parameters
6561 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
6562 has out or in-out parameters then mark its outermost enclosing
6563 construct as a node on which the writable actuals check must
6564 be performed.
6565 (Analyze_Call): Check if the flag must be set and if the outermost
6566 enclosing construct.
6567 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
6568 and reorganization. We skip processing aggregate discriminants
6569 since their precise analysis involves two phases traversal.
6570 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
6571 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
6572 check_writable_actuals.
6573
65742015-05-22 Ed Schonberg <schonberg@adacore.com>
6575
6576 * sem_ch3.adb (Constrain_Concurrent): If the context is a
6577 type declaration, generate an Itype_Reference for the anonymous
6578 subtype, to force elaboration at this point in gigi.
6579
65802015-05-22 Gary Dismukes <dismukes@adacore.com>
6581
6582 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
6583 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
6584
65852015-05-22 Ed Schonberg <schonberg@adacore.com>
6586
6587 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
6588 operation, replace the names of the actuals in named associations
6589 with the names of the actuals of the subprogram that is eventually
6590 executed. The names of the formals and the defaults can differ
6591 between the two operations when they are operations of a formal
6592 derived type.
6593
65942015-05-22 Bob Duff <duff@adacore.com>
6595
6596 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
6597 out slow path into separate procedure. Inline Append. Fast path
6598 now avoids calling Insert.
6599 (Finalize): Do the busy checking last, so the container gets emptied.
6600 (Insert, Insert_Space): Remove redundancy.
6601
66022015-05-22 Robert Dewar <dewar@adacore.com>
6603
6604 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
6605 for -gnatd.V.
6606
66072015-05-22 Arnaud Charlet <charlet@adacore.com>
6608
6609 * gnatvsn.ads: Minor code reorg to remember more easily to update
6610 variables.
6611
66122015-05-22 Ed Schonberg <schonberg@adacore.com>
6613
6614 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
6615 limited_with clause on a predefined unit is not transformed into
6616 a regular with_clause, to preserve the original tree structure.
6617 * sinfo.ads (N_With_Clause): Add comment on handling of
6618 Limited_With.
6619 * sem_ch10.adb: Minor reformatting.
6620
66212015-05-22 Ed Schonberg <schonberg@adacore.com>
6622
6623 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
6624 the profile of a subprogram renaming does not require freezing,
6625 because it is declared in a different unit.
6626
66272015-05-22 Ed Schonberg <schonberg@adacore.com>
6628
6629 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
6630 composite type) is private, go to full view. This was previously
6631 done only in an instance context, but is happen whenever a chain
6632 of private extensions includes one inherited discriminant.
6633
66342015-05-22 Robert Dewar <dewar@adacore.com>
6635
6636 * einfo.ads: Minor comment updates.
6637 * exp_unst.adb: Move Subps table to spec Don't remove old entries
6638 from table Add Last field to record last entry used.
6639 * exp_unst.ads: Move Subps table here from body So that Cprint
6640 can access saved values.
6641
66422015-05-22 Bob Duff <duff@adacore.com>
6643
6644 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
6645 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
6646 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
6647 (Pseudo_Reference, Element_Access, Get_Element_Access): New
6648 declarations added for use by performance improvements in exp_ch5.adb.
6649 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
6650 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
6651 Instead of doing literally what the RM calls for, we do something
6652 equivalent that avoids expensive operations inside the loop. If the
6653 container package has appropriate Next, Pseudo_Reference,
6654 Element_Access, Get_Element_Access declarations, we invoke the
6655 optimization.
6656 * snames.ads-tmpl: Note speed improvement.
6657
66582015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6659
6660 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
6661 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
6662 Add pattern to translate "or else" into "||".
6663
66642015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6665
6666 * einfo.ads (Has_Volatile_Full_Access): Rename into...
6667 (Is_Volatile_Full_Access): ...this.
6668 (Set_Has_Volatile_Full_Access): Rename into...
6669 (Set_Is_Volatile_Full_Access): ...this.
6670 * einfo.adb (Has_Volatile_Full_Access): Rename into...
6671 (Is_Volatile_Full_Access): ...this.
6672 (Set_Has_Volatile_Full_Access): Rename into...
6673 (Set_Is_Volatile_Full_Access): ...this.
6674 (Is_Atomic_Or_VFA): Adjust to above renaming.
6675 * errout.adb (Special_Msg_Delete): Likewise.
6676 * exp_pakd.adb (Install_PAT): Likewise.
6677 * freeze.adb (Freeze_Array_Type): Likewise.
6678 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
6679 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
6680 (Inherit_Aspects_At_Freeze_Point): Likewise.
6681 * sem_prag.adb (Set_Atomic_VFA): Likewise.
6682 (Process_Atomic_Independent_Shared_Volatile): Likewise.
6683 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
6684
66852015-05-22 Robert Dewar <dewar@adacore.com>
6686
6687 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
6688 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
6689 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
6690 change that deals with the fact that most of the special coding for
6691 Atomic should also apply to the case of Volatile_Full_Access.
6692 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
6693 references to Is_Atomic now use this new attribute.
6694
66952015-05-22 Robert Dewar <dewar@adacore.com>
6696
6697 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
6698 comparison.
6699
67002015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6701
6702 * sprint.adb (Source_Dump): When generating debug files, deal
6703 with the case of a stand-alone package instantiation by dumping
6704 together the spec and the body in the common debug file.
6705
67062015-05-22 Robert Dewar <dewar@adacore.com>
6707
6708 * sem_ch13.adb (Minimum_Size): Size is zero for null range
6709 discrete subtype.
6710
67112015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6712
6713 * einfo.adb (Anonymous_Master): This attribute now applies
6714 to package and subprogram bodies.
6715 (Set_Anonymous_Master): This attribute now applies to package and
6716 subprogram bodies.
6717 (Write_Field36_Name): Add output for package and subprogram bodies.
6718 * einfo.ads Update the documentation on attribute Anonymous_Master
6719 along with occurrences in entities.
6720 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
6721 handle spec and body anonymous masters of the same unit.
6722 (Current_Anonymous_Master): Reimplemented. Handle a
6723 package instantiation that acts as a compilation unit.
6724 (Insert_And_Analyze): Reimplemented.
6725
67262015-05-22 Ed Schonberg <schonberg@adacore.com>
6727
6728 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
6729 predefined unit is treated as a regular with_clause.
6730
67312015-05-22 Robert Dewar <dewar@adacore.com>
6732
6733 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
6734 prj-conf.adb, sem_disp.adb: Minor reformatting.
6735
67362015-05-22 Vincent Celier <celier@adacore.com>
6737
6738 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
6739 for switch -P and, if found and gprclean is available, invoke
6740 silently gprclean.
6741 * make.adb (Initialize): For native gnatmake, check for switch -P
6742 and, if found and gprbuild is available, invoke silently gprbuild.
6743
67442015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6745
6746 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
6747 specific warning for discrete types when the source is larger
6748 than the target.
6749
67502015-05-22 Ed Schonberg <schonberg@adacore.com>
6751
6752 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
6753 package instantiations. Holds the list of actuals in the instance
6754 that are incomplete types, to determine where the corresponding
6755 instance body must be placed.
6756 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
6757 actual in an instance matches an incomplete formal.
6758 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
6759 explicit dereference.
6760 (Inherited_Subprograms): In the presence of a limited view there
6761 are no subprograms to inherit.
6762 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
6763 actuals of instance, for later placement of instance body and
6764 freeze nodes for actuals.
6765 (Install_Body): In the presence of actuals that incomplete types
6766 from a limited view, the instance body cannot be placed after
6767 the declaration because full views have not been seen yet. Any
6768 use of the non-limited views in the instance body requires
6769 the presence of a regular with_clause in the enclosing unit,
6770 and will fail if this with_clause is missing. We place the
6771 instance body at the beginning of the enclosing body, which is
6772 the unit being compiled, and ensure that freeze nodes for the
6773 full views of the incomplete types appear before the instance.
6774
67752015-05-22 Pascal Obry <obry@adacore.com>
6776
6777 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
6778 (In_Place_Option): Removed.
6779 (Relocate_Build_Tree_Option): New constant.
6780 (Root_Dir_Option): New constant.
6781 (Obj_Root_Dir): Removed.
6782 (Build_Tree_Dir): New variable.
6783 (Root_Src_Tree): Removed.
6784 (Root_Dir): New variable.
6785 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
6786 for improper relocation.
6787 * prj-nmsc.adb (Locate_Directory): Add check for improper
6788 relocation.
6789
67902015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6791
6792 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
6793 attribute now applies to the base type.
6794 (Has_Default_Init_Cond): Now applies to the base type.
6795 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
6796 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
6797 applies to the base type.
6798 (Set_Has_Default_Init_Cond): Now applies to the base type.
6799 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
6800 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
6801 base type when adding a call to the Default_Initial_Condition.
6802
68032015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6804
6805 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
6806 is now unused.
6807 (Anonymous_Master): New routine.
6808 (Has_Anonymous_Master): Removed.
6809 (Set_Anonymous_Master): New routine.
6810 (Set_Has_Anonymous_Master): Removed.
6811 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
6812 (Write_Field36_Name): Add output for Anonymous_Master.
6813 * einfo.ads Add new attribute Anonymous_Master along with
6814 occurrences in nodes. Remove attribute Has_Anonymous_Master along
6815 with occurrences in nodes.
6816 (Anonymous_Master): New routine along with pragma Inline.
6817 (Has_Anonymous_Master): Removed along with pragma Inline.
6818 (Set_Anonymous_Master): New routine along with pragma Inline.
6819 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
6820 * exp_ch4.adb (Create_Anonymous_Master): New routine.
6821 (Current_Anonymous_Master): Reimplemented.
6822
68232015-05-22 Bob Duff <duff@adacore.com>
6824
6825 * freeze.adb (Freeze_Profile): Suppress warning if imported
6826 subprogram is not at library level.
6827
68282015-05-22 Robert Dewar <dewar@adacore.com>
6829
6830 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
6831 component of an object to which Volatile_Full_Access applies.
6832
68332015-05-22 Jerome Guitton <guitton@adacore.com>
6834
6835 * exp_dbug.ads: Add note about non bit-packed arrays.
6836
68372015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6838
6839 * sem_prag.adb: Fix typo.
6840 * einfo.ads: Grammar fixes in comments.
6841
68422015-05-22 Bob Duff <duff@adacore.com>
6843
6844 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
6845 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6846 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
6847 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
6848 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
6849 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6850 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
6851 Add an initialization expression "raise Program_Error". See,
6852 for example, RM-A.18.2(148.4).
6853
68542015-05-22 Robert Dewar <dewar@adacore.com>
6855
6856 * debug.adb: Update documentation.
6857 * einfo.ads, einfo.adb (Needs_Typedef): New flag
6858 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
6859 typedef's in C.
6860 * frontend.adb: Update comments.
6861 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
6862 for -gnatd.V
6863 * opt.ads (Generate_C_Code): New switch.
6864 * osint-c.adb (Write_C_File_Info): Removed, not used
6865 (Write_H_File_Info): Removed, not used
6866 * osint-c.ads (Write_C_File_Info): Removed, not used
6867 (Write_H_File_Info): Removed, not used
6868 * osint.ads (Write_Info): Minor comment updates.
6869 (Output_FD): Moved from private part to public part of spec.
6870 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
6871 mode.
6872 * atree.ads: minor typo in comment.
6873 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6874 Do not allow VFA on composite object with aliased component.
6875
68762015-05-22 Arnaud Charlet <charlet@adacore.com>
6877
6878 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
6879
68802015-05-22 Pascal Obry <obry@adacore.com>
6881
6882 * prj-util.adb: Minor comment editing.
6883
68842015-05-22 Pascal Obry <obry@adacore.com>
6885
6886 * makeutl.ads (In_Place_Option): New constant.
6887 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
6888 objects).
6889 (Root_Src_Tree): New variable (absolute path of root source tree).
6890 * prj-conf.adb (Do_Autoconf): Take into account the object root
6891 directory (if defined) to generate configuration project.
6892 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
6893 is defined.
6894 (Locate_Directory): Likewise.
6895
68962015-05-22 Pascal Obry <obry@adacore.com>
6897
6898 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
6899
69002015-05-22 Bob Duff <duff@adacore.com>
6901
6902 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
6903 interface to return Empty when not found, so we can avoid handling
6904 Program_Error in that case.
6905 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
6906 primitives.
6907 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
6908 code is expecting Empty.
6909 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
6910 Program_Error.
6911
69122015-05-22 Robert Dewar <dewar@adacore.com>
6913
6914 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
6915 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
6916 non-binary.
6917 * exp_util.adb: Add comment.
6918 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
6919 body.
6920 (Set_File_Name): New name for the above.
6921 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
6922 Close_C_File, Close_H_File): New procedure.
6923 * osint.adb: Minor reformatting.
6924 * osint.ads: Minor comment updates.
6925
69262015-05-22 Robert Dewar <dewar@adacore.com>
6927
6928 * exp_ch4.adb: Minor rewording.
6929 * exp_util.ads: Clarify that Find_Prim_Op is only for
6930 tagged types.
6931
69322015-05-22 Robert Dewar <dewar@adacore.com>
6933
6934 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
6935 Check_Actuals.
6936 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
6937 and overflow cases.
6938
69392015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6940
6941 * exp_pakd.adb (Install_PAT): Propagate representation aspects
6942 from the original array type to the PAT.
6943
69442015-05-22 Robert Dewar <dewar@adacore.com>
6945
6946 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
6947
69482015-05-22 Robert Dewar <dewar@adacore.com>
6949
6950 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
6951
69522015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6953
6954 * sem_prag.adb (Analyze_Pragma): Remove the detection
6955 of a useless Part_Of indicator when the related item is a constant.
6956 (Check_Matching_Constituent): Do not emit an error on a constant.
6957 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
6958 when the related item is a constant.
6959 (Collect_Body_States): Code cleanup.
6960 (Collect_Visible_States): Code cleanup.
6961 (Report_Unused_States): Do not emit an error on a constant.
6962 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
6963
69642015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6965
6966 * sem_ch8.adb (Analyze_Object_Renaming): Copy
6967 Has_Volatile_Full_Access from renamed to renaming entities.
6968 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6969 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
6970
69712015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6972
6973 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
6974 RM 6.9 rules.
6975 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
6976 * sem_ch3.adb (Analyze_Object_Declaration): Update references
6977 to SPARK RM 6.9 rules.
6978 (Check_Completion): Ghost entities do not require a special form of
6979 completion.
6980 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
6981 to SPARK RM 6.9 rules.
6982 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
6983 rules.
6984 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
6985 to SPARK RM 6.9 rules.
6986 (Requires_Completion_In_Body): Ghost entities do not require a special
6987 form of completion.
6988
69892015-05-22 Robert Dewar <dewar@adacore.com>
6990
6991 * a-csquin.ads: Use Ada 2012 notation.
6992 * sem_ch8.adb: Minor reformatting.
6993
69942015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6995
6996 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
6997 acts as a completion.
6998
69992015-05-22 Ed Schonberg <schonberg@adacore.com>
7000
7001 * sem_ch13.adb: Minor reformatting.
7002
70032015-05-22 Jose Ruiz <ruiz@adacore.com>
7004
7005 * a-reatim.adb: Minor change, fix typo.
7006
70072015-05-22 Robert Dewar <dewar@adacore.com>
7008
7009 * sem_util.ads: Minor addition of ??? comment.
7010 * sem_prag.adb, sem_util.adb: Minor reformatting.
7011 * sem_ch13.adb: minor reformatting.
7012
70132015-05-22 Robert Dewar <dewar@adacore.com>
7014
7015 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
7016 is 64-bits.
7017 * sem_ch13.adb: Improve error message.
7018 * exp_ch4.adb: Minor reformatting.
7019
70202015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
7021
7022 * sem_prag.adb (Analyze_Pragma): Constants without variable
7023 input do not require indicator Part_Of.
7024 (Check_Missing_Part_Of): Constants without variable input do not
7025 requrie indicator Part_Of.
7026 (Collect_Visible_States): Constants without variable input are
7027 not part of the hidden state of a package.
7028 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
7029
70302015-05-22 Robert Dewar <dewar@adacore.com>
7031
7032 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
7033 Atomic_Sync_Required for an object renaming declaration.
7034 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
7035 Is_Independent to renaming object.
7036
70372015-05-22 Ed Schonberg <schonberg@adacore.com>
7038
7039 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
7040 various illegalities in iterators over arrays and containers:
7041 a) New function Get_Cursor_Type, to verify that the cursor is
7042 not a limited type at the point of iteration.
7043 b) If the container is a constant, an element_iterator is illegal
7044 if the container type does not have a Constant_Indexing aspect.
7045 c) If the iterate function has an in-out controlling parameter,
7046 the container cannot be a constant object.
7047 d) Reject additional cases of iterators over a
7048 discriminant-dependent component of a mutable object.
7049
70502015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7051
7052 * einfo.adb (Contract): This attribute now applies to constants.
7053 (Set_Contract): This attribute now applies to constants.
7054 (Write_Field34_Name): Add output for constants.
7055 * einfo.ads Attribute Contract now applies to constants.
7056 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
7057 their Part_Of indicator verified.
7058 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
7059 constituent.
7060 (Analyze_Global_Item): A constant cannot act as an output.
7061 (Analyze_Initialization_Item): Constants are now a valid
7062 initialization item.
7063 (Analyze_Initializes_In_Decl_Part): Rename
7064 global variable States_And_Vars to States_And_Objs and update
7065 all its occurrences.
7066 (Analyze_Input_Item): Constants are now a
7067 valid initialization item. Remove SPARM RM references from error
7068 messages.
7069 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
7070 (Collect_Body_States): Collect both source constants
7071 and variables.
7072 (Collect_States_And_Objects): Collect both source constants and
7073 variables.
7074 (Collect_States_And_Variables): Rename
7075 to Collect_States_And_Objects and update all its occurrences.
7076 (Collect_Visible_States): Do not collect constants and variables
7077 used to map generic formals to actuals.
7078 (Find_Role): The role of a constant is that of an input. Separate the
7079 role of a variable from that of a constant.
7080 (Report_Unused_Constituents): Add specialized wording for constants.
7081 (Report_Unused_States): Add specialized wording for constants.
7082 * sem_util.adb (Add_Contract_Item): Add processing for constants.
7083 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
7084 (Find_Placement_In_State_Space): Update the comment on usage.
7085
70862015-05-21 Ed Schonberg <schonberg@adacore.com>
7087
7088 * sem_ch5.adb: minor reformatting.
7089
70902015-05-21 Robert Dewar <dewar@adacore.com>
7091
7092 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
7093
70942015-05-21 Robert Dewar <dewar@adacore.com>
7095
7096 * freeze.adb: Minor reformatting.
7097 * cstand.adb (Print_Standard): Fix bad printing of Duration
7098 low bound.
7099 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
7100 out of range args.
7101
71022015-05-21 Ed Schonberg <schonberg@adacore.com>
7103
7104 * sem_ch5.adb: add (useless) initial value.
7105 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
7106 Check whether the procedure has parameters before processing
7107 formals in ASIS mode.
7108
71092015-05-21 Ed Schonberg <schonberg@adacore.com>
7110
7111 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
7112 aspect as well when indexing function is illegal.
7113 (Valid_Default_Iterator): Handle properly somme illegal cases
7114 to prevent compilation abandoned messages.
7115 (Check_Primitive_Function): Verify that type and indexing function
7116 are in the same scope.
7117 * freeze.adb (Freeze_Record): Extend patch on the presence of
7118 indexing aspects to aspect Default_Iterator.
7119
71202015-05-19 David Malcolm <dmalcolm@redhat.com>
7121
7122 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
7123 from line_map * to line_map_ordinary *.
7124
71252015-05-12 Jason Merrill <jason@redhat.com>
7126
7127 * sigtramp-vxworks.c: Add space between string literal and macro
7128 name.
7129
71302015-05-12 Arnaud Charlet <charlet@adacore.com>
7131
7132 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
7133
71342015-05-12 Ed Schonberg <schonberg@adacore.com>
7135
7136 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
7137 legality checks for array and container iterators:
7138 a) The domain of iteration cannot be a component that depends
7139 on discriminants of a mutable object. The check was recently
7140 added for element iterators.
7141 b) The cursor type cannot be a limited type at the point of the
7142 iteration, because the cursor will be assigned to in the body
7143 of the loop.
7144
71452015-05-12 Robert Dewar <dewar@adacore.com>
7146
7147 * freeze.adb (Freeze_Record_Type): Make sure that if we have
7148 aspect Iterator_Element, then we have either Constant_Indexing
7149 or Variable_Indexing.
7150
71512015-05-12 Ed Schonberg <schonberg@adacore.com>
7152
7153 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
7154 and Reference_Control_Type to support element iterators over
7155 ordered multisets.
7156 * a-ciormu.ads, a-ciormu.adb: Ditto for
7157 indefinite_ordered_multisets.
7158
71592015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7160
7161 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
7162 the evaluation of the EWA expression. Code cleanup.
7163 (Process_Transient_Object): Code cleanup.
7164 * exp_util.adb (Is_Aliased): Controlled transient objects found
7165 within EWA nodes are not aliased.
7166 (Is_Finalizable_Transient): Iterators are not finalizable transients.
7167
71682015-05-12 Robert Dewar <dewar@adacore.com>
7169
7170 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
7171 Don't allow Atomic and Volatile_Full_Access for the same entity.
7172
71732015-05-12 Ed Schonberg <schonberg@adacore.com>
7174
7175 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
7176 semantics and safety checks specified in AI12-0151.
7177
71782015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
7179
7180 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
7181 for subunit in generic units.
7182
71832015-05-12 Robert Dewar <dewar@adacore.com>
7184
7185 * sem_elab.adb (Check_A_Call): Avoid checking internal call
7186 from Valid_Scalars
7187
71882015-05-12 Ed Schonberg <schonberg@adacore.com>
7189
7190 * sem_ch6.adb (Process_Formals): An untagged incomplete type
7191 is legal in the profile of a null procedure.
7192
71932015-05-12 Ed Schonberg <schonberg@adacore.com>
7194
7195 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
7196 the checks on a derived formal whose parent type is a previous
7197 formal that is not a derived type.
7198
71992015-05-12 Robert Dewar <dewar@adacore.com>
7200
7201 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
7202 * einfo.adb (Has_Volatile_Full_Access): New flag.
7203 (Has_Volatile_Full_Access): New flag.
7204 * einfo.ads (Has_Volatile_Full_Access): New flag.
7205 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
7206 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
7207 Implement new pragma.
7208 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
7209
72102015-05-12 Robert Dewar <dewar@adacore.com>
7211
7212 * targparm.ads: Minor reformatting.
7213
72142015-05-12 Robert Dewar <dewar@adacore.com>
7215
7216 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
7217 * a-reatim.ads: Minor reformatting.
7218
72192015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7220
7221 * einfo.ads: Update the documentation of flags
7222 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
7223
72242015-05-12 Robert Dewar <dewar@adacore.com>
7225
7226 * impunit.adb: Add entry for a-dhfina.ads
7227 * a-dhfina.ads: New file.
7228
72292015-05-12 Ed Schonberg <schonberg@adacore.com>
7230
7231 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
7232 type has convention Fortran, a multidimensional iterator varies
7233 the first dimension fastest.
7234
72352015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7236
7237 * einfo.adb: Node32 is now used as Encapsulating_State.
7238 Node37 is now used as Associated_Entity.
7239 (Associated_Entity): New routine.
7240 (Encapsulating_State): Update the assertion guard to include constants.
7241 (Set_Associated_Entity): New routine.
7242 (Set_Encapsulating_State): Update the assertion guard to
7243 include constants.
7244 (Write_Field10_Name): Remove the output for Encapsulating_State.
7245 (Write_Field32_Name): Add output for Encapsulating_State.
7246 (Write_Field37_Name): Add output for Associated_Entity.
7247 * einfo.ads New attribute Associated_Entity along with placement
7248 in entities. Attribute Encapsulating_State now uses Node32.
7249 (Associated_Entity): New routine along with pragma Inline.
7250 (Set_Associated_Entity): New routine along with pragma Inline.
7251 * inline.ads Code reformatting.
7252 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
7253 attribute 'Result when the context is a generic instantiation.
7254 (Analyze_Attribute_Old_Result): Pragmas Depends and
7255 Refined_Depends are a valid context for attribute 'Result.
7256 (Denote_Same_Function): Allow attribute 'Result to denote
7257 generic functions.
7258 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
7259 (Analyze_Declarations): Capture global references within the
7260 contracts of packages, subprograms and their respective bodies.
7261 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
7262 (Analyze_Completion_Contract): Removed.
7263 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
7264 creating the generic copy. Create a generic contract for the
7265 template. Analyze the aspects of the generic body. Analyze the
7266 contract of the generic body when it is a compilation unit and
7267 capture global references.
7268 (Analyze_Subprogram_Body_Contract): Code cleanup.
7269 (Analyze_Subprogram_Contract): Do not save global references here.
7270 (Save_Global_References_In_List): Removed.
7271 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
7272 (Analyze_Package_Body_Helper): Create a generic contract for
7273 the template.
7274 (Analyze_Package_Contract): Code cleanup.
7275 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
7276 (Analyze_Compilation_Unit): Capture global references in a
7277 generic subprogram declaration that acts as a compilation unit.
7278 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
7279 the implementation of generic contracts. Alphabetize various
7280 subprograms.
7281 (Analyze_Generic_Package_Declaration):
7282 Create a generic contract for the template.
7283 (Analyze_Generic_Subprogram_Declaration): Create a generic
7284 contract for the template.
7285 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
7286 subprogram.
7287 (Copy_Generic_Node): Link defining entities of the generic template
7288 with the corresponding defining entities of the generic copy. Update
7289 the processing of pragmas.
7290 (Instantiate_Contract): Removed.
7291 (Instantiate_Subprogram_Contract): New routine.
7292 (Requires_Delayed_Save): New routine.
7293 (Save_Global_References): Rename formal parameter N to Templ. Various
7294 cleanups.
7295 (Save_Global_References_In_Aspects): Moved from the spec.
7296 (Save_Global_References_In_Contract): New routine.
7297 (Save_References_In_Aggregate): New routine.
7298 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
7299 (Save_References_In_Descendants): New routine.
7300 (Save_References_In_Identifier): New routine.
7301 (Save_References_In_Operator): New routine.
7302 (Save_References_In_Pragma): New routine.
7303 * sem_ch12.ads (Save_Global_References): Rename formal
7304 parameter N to Templ. Update the comment on usage.
7305 (Save_Global_References_In_Aspects): Moved to the body.
7306 (Save_Global_References_In_Contract): New routine.
7307 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
7308 New routine.
7309 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
7310 New routine.
7311 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
7312 generic parameters.
7313 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
7314 (Analyze_Depends_Global): New routine.
7315 (Analyze_Depends_In_Decl_Part): Code cleanup.
7316 (Analyze_Global_In_Decl_Part): Code cleanup.
7317 (Analyze_Global_Item): Constants are now valid global items. Do
7318 not perform state-related checks in an instance. Change the way
7319 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
7320 Code cleanup.
7321 (Analyze_Initializes_In_Decl_Part): Code cleanup.
7322 (Analyze_Input_Output): The analysis of attribute 'Result in
7323 the context of pragmas Depends or Refined_Depends now reuses
7324 the existing attribute analysis machinery. Constants and
7325 generic parameters are now valid dependency items. Do not
7326 perform state-related checks in an instance. Change the way
7327 renamings are handled. (Analyze_Pragma): Add a "characteristics"
7328 section for pragmas Abstract_State, Contract_Cases, Depends,
7329 Extensions_Visible, Global, Initial_Condition, Initializes,
7330 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
7331 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
7332 (Analyze_Pre_Post_Condition): Do not create a generic
7333 template here.
7334 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
7335 (Analyze_Refined_Depends_Global_Post): New routine.
7336 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
7337 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
7338 (Analyze_Refined_Pragma): Removed.
7339 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
7340 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
7341 (Check_Dependency_Clause): Do not perform this check in an instance.
7342 (Check_Function_Return): Add support for generic functions.
7343 (Check_In_Out_States): Do not perform this check in an instance.
7344 (Check_Input_States): Do not perform this check in an instance.
7345 (Check_Mode_Restriction_In_Function): Add support for generic functions.
7346 (Check_Output_States): Do not perform this check in an instance.
7347 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
7348 parameter Subp_Id to Spec_Id and update comment on usage.
7349 (Check_Proof_In_States): Do not perform this check in an instance.
7350 (Check_Refined_Global_Item): Add support for constants.
7351 (Check_Refined_Global_List): Do not perform this check in an instance.
7352 (Collect_Global_Items): Reimplemented.
7353 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
7354 (Create_Generic_Template): Removed.
7355 (Find_Related_Package_Or_Body): Moved to spec.
7356 (Find_Role): Add support for generic parameters and constants.
7357 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
7358 (Match_Item): Add support for constants.
7359 (Preanalyze_Test_Case_Arg): Reimplemented.
7360 (Report_Extra_Clauses): Do not perform this check in an instance.
7361 (Report_Extra_Constituents): Do not perform this check in an instance.
7362 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
7363 the comment on usage.
7364 (Find_Related_Package_Or_Body): Moved from body.
7365 (Get_Argument): Moved from body.
7366 * sem_util.adb Add with and use clauses for Sem_Ch12.
7367 (Corresponding_Spec_Of): Add support for packages and package bodies.
7368 (Create_Generic_Contract): New routine.
7369 (Is_Contract_Annotation): Reimplemented.
7370 (Is_Generic_Declaration_Or_Body): New routine.
7371 (Is_Package_Contract_Annotation): New routine.
7372 (Is_Subprogram_Contract_Annotation): New routine.
7373 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
7374 (Create_Generic_Contract): New routine.
7375 (Is_Generic_Declaration_Or_Body): New routine.
7376 (Is_Package_Contract_Annotation): New routine.
7377 (Is_Subprogram_Contract_Annotation): New routine.
7378 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
7379 (Set_Is_Generic_Contract_Pragma): New routine.
7380 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
7381 with occurrences in nodes.
7382 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
7383 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
7384 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
7385
73862015-05-12 Robert Dewar <dewar@adacore.com>
7387
7388 * a-taster.ads: Minor comment fix: fix bad header, this is a
7389 pure RM unit.
7390
73912015-05-12 Robert Dewar <dewar@adacore.com>
7392
7393 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
7394
73952015-05-12 Robert Dewar <dewar@adacore.com>
7396
7397 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
7398 Alignment_Checks on non-strict alignment machine.
7399 * sem_ch13.adb (Validate_Address_Clauses): Don't give
7400 compile-time alignment warnings if run time Alignment_Check
7401 is suppressed.
7402
74032015-05-12 Thomas Quinot <quinot@adacore.com>
7404
7405 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
7406 Data_Rate): New literals B75, B110, B150, B300, B600.
7407
74082015-05-12 Doug Rupp <rupp@adacore.com>
7409
7410 * init.c (__gnat_init_float) [vxworks]: For e500v2,
7411 do nothing and leave the responsibility to install the handler
7412 and enable the exceptions to the BSP.
7413
74142015-05-12 Robert Dewar <dewar@adacore.com>
7415
7416 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
7417 * sem_disp.adb: Minor code reorganization (remove junk redundant
7418 null statement).
7419 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
7420 references to bounds of types coming from original type reference.
7421 * checks.ads: Minor reformatting.
7422 * checks.adb: Minor reformatting.
7423 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
7424 assertion, then make sure we do not drag in bignum stuff.
7425
74262015-05-12 Ed Schonberg <schonberg@adacore.com>
7427
7428 * sem_ch9.adb (Collect_Interfaces): Initialize
7429 Direct_Primitive_Operations for a tagged synchronized type,
7430 so it can used in ASIS mode.
7431 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
7432 disabled, attach subprogram to list of Direct_Primitive_Operations
7433 of synchronized type itself, for ASIS use, because in this case
7434 Corresponding_Record_Type is not built.
7435 * einfo.ads: Indicate use of Direct_Primitive_Operations on
7436 synchronized type.
7437
74382015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
7439
7440 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
7441 ___XP suffixes.
7442
74432015-05-12 Robert Dewar <dewar@adacore.com>
7444
7445 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
7446
74472015-05-12 Robert Dewar <dewar@adacore.com>
7448
7449 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
7450
74512015-05-12 Ed Schonberg <schonberg@adacore.com>
7452
7453 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
7454 tag to be retrieved for the generated call is the first entry
7455 in the dispatch table for the return type of the instantiated
7456 constructor.
7457
74582015-05-12 Bob Duff <duff@adacore.com>
7459
7460 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
7461 exp_util.ads: Update comments.
7462
74632015-05-12 Ed Schonberg <schonberg@adacore.com>
7464
7465 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
7466 freeze nodes for these in ASIS mode, because they lead to
7467 elaoration order issues in gigi.
7468
74692015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7470
7471 * sem_ch6.adb (Analyze_Expression_Function): Code
7472 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
7473 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
7474 prepare a stand alone body for inlining in GNATprove mode
7475 when inside a generic. (Body_Has_Contract): Reimplemented.
7476 (Build_Subprogram_Declaration): New routine.
7477 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
7478 references within generic bodies by loading them.
7479 * sem_util.adb (Copy_Parameter_List): Code cleanup.
7480 (Copy_Subprogram_Spec): New routine.
7481 (Is_Contract_Annotation): New routine.
7482 * sem_util.ads (Copy_Subprogram_Spec): New routine.
7483 (Is_Contract_Annotation): New routine.
7484
74852015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7486
7487 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
7488 body of an expression function when the prefix of attribute
7489 'Access is the body.
7490
74912015-05-12 Ed Schonberg <schonberg@adacore.com>
7492
7493 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
7494 created for a derived enumeration type is not a first subtype,
7495 even though it is defined through a full type declaration.
7496 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
7497 aspects for the anonymous base type constructed for a derived
7498 scalar type, because they will be set when the first subtype
7499 is frozen.
7500 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
7501 Default_Value and Default_Component_Value, that prevented the
7502 proper inheritance of these aspects.
7503
75042015-05-12 Gary Dismukes <dismukes@adacore.com>
7505
7506 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
7507
75082015-05-12 Robert Dewar <dewar@adacore.com>
7509
7510 * sem_ch3.adb: Minor reformatting.
7511
75122015-05-12 Vincent Celier <celier@adacore.com>
7513
7514 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
7515 -P, then check if gprbuild (gprclean) is available; if it is,
7516 use gprbuild (gprclean) instead of gnatmake (gnatclean).
7517
75182015-05-12 Robert Dewar <dewar@adacore.com>
7519
7520 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
7521 Exp_Unst.
7522 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
7523 Exp_Unst.
7524 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
7525 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
7526 for later call instead of calling Unnest_Subprogram directly
7527 (Initialize): New procedure (Unnest_Subprograms): New procedure
7528 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
7529 alpha order.
7530 (Initialize): New procedure.
7531 (Unnest_Subprograms): New procedure.
7532 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
7533 all processing to this routine which is now called late
7534 after instantiating bodies. Fully handles the case of generic
7535 instantiations now.
7536 * exp_unst.ads: Major rewrite, moving all processing to
7537 Unnest_Subprogram.
7538 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
7539 (Frontend): Add call to Unnest_Subprograms.
7540 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
7541 for Check_Nested_Access.
7542 * sem_util.adb (Build_Default_Subtype): Minor reformatting
7543 (Check_Nested_Access): Back to original VM-only form (we
7544 now do all the processing for Unnest_Subprogram at the time
7545 it is called.
7546 (Denotes_Same_Object): Minor reformatting
7547 (Note_Possible_Modification): Old calling sequence for
7548 Check_Nested_Access.
7549 * sem_util.ads (Check_Nested_Access): Back to original VM-only
7550 form (we now do all the processing for Unnest_Subprogram at the
7551 time it is called.
7552
75532015-05-12 Robert Dewar <dewar@adacore.com>
7554
7555 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
7556
75572015-05-12 Ed Schonberg <schonberg@adacore.com>
7558
7559 * sem_ch3.adb (Analyze_Object_Declaration): New function
7560 Has_Delayed_Aspect, used to defer resolution of an aggregate
7561 expression when the object declaration carries aspects Address
7562 and/or Alignment.
7563 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
7564 to Freeze_Entity. In addition to the previous processing steps
7565 at the freeze point of an object, this procedure also handles
7566 aggregates in object declarations, when the declaration carries
7567 delayed aspects that require that the initialization of the
7568 object be attached to its freeze actions.
7569
75702015-05-12 Ed Schonberg <schonberg@adacore.com>
7571
7572 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
7573 AI12-0147, null procedures and expression functions are allowed
7574 in protected bodies.
7575
75762015-05-12 Tristan Gingold <gingold@adacore.com>
7577
7578 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
7579
75802015-05-12 Ed Schonberg <schonberg@adacore.com>
7581
7582 * sem_ch3.adb (Complete_Private_Subtype): Propagate
7583 Has_Delayed_Aspects flag from private to full view, to ensure
7584 that predicate functions are constructed.
7585
75862015-05-12 Ed Schonberg <schonberg@adacore.com>
7587
7588 * sem_ch6.adb (Process_Formals): If a tagged formal is an
7589 incomplete class-wide type, the subprogram must have a delayed
7590 freeze even though the opertation is not a primitive of the
7591 type. THis ensures that the backend can recover the full view
7592 when elaborating the subprogram declaration.
7593
75942015-05-12 Ed Schonberg <schonberg@adacore.com>
7595
7596 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
7597 done if an elsif part has been rewritten so that it is not part
7598 of an enclosing if_statement.
7599
76002015-05-12 Robert Dewar <dewar@adacore.com>
7601
7602 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
7603 Minor reformatting.
7604
76052015-05-12 Bob Duff <duff@adacore.com>
7606
7607 * exp_attr.adb (Size): Remove unnecessary check for types with
7608 unknown discriminants. That was causing the compiler to build
7609 a function call _size(T), where T is a type, not an object.
7610
76112015-05-12 Ed Schonberg <schonberg@adacore.com>
7612
7613 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
7614 primitive operations of a type extension declared in the package
7615 body, to prevent duplicates in extended list.
7616
76172015-05-12 Ed Schonberg <schonberg@adacore.com>
7618
7619 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
7620 an unconstrained synchronized type with discriminants, create a
7621 constrained default subtype for it, so that the enclosing record
7622 can be given the proper size.
7623 * sem_util.adb (Build_Default_Subtype): If the subtype is created
7624 for a record discriminant, do not analyze the declarztion at
7625 once because it is added to the freezing actions of the enclosing
7626 record type.
7627
76282015-05-12 Robert Dewar <dewar@adacore.com>
7629
7630 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
7631 Null statements.
7632 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
7633 * par-prag.adb (Prag): Implement Ignore_Pragma.
7634 * sem_prag.adb: Implement Ignore_Pragma.
7635 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
7636
76372015-05-12 Javier Miranda <miranda@adacore.com>
7638
7639 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
7640 entity with its corresponding real entity.
7641 (Decorate_Type): Unconditionally build the class-wide shadow entity of
7642 tagged types.
7643 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
7644 attribute.
7645 (Non_Limited_View): Moved from field 17 to field 19 be available
7646 in class-wide entities.
7647 * exp_attr.adb (Access_Cases): Code cleanup.
7648 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
7649 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
7650 * freeze.adb (Build_Renamed_Bdody): Ditto.
7651 * sem_aux.adb (Available_View): Ditto.
7652 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
7653 (Try_One_Prefix_Interpretation): Ditto.
7654 * sem_ch5.adb (Analyze_Assignment): Ditto.
7655 * sem_ch6.adb (Detect_And_Exchange): Ditto.
7656 * sem_ch8.adb (Find_Expanded_Name): Ditto.
7657 * sem_disp.adb (Check_Controlling_Type): Ditto.
7658 * sem_res.adb (Resolve_Type_Conversion): Ditto.
7659 (Full_Designated_Type): Ditto.
7660 * sem_type.adb (Covers): Ditto.
7661 * sem_util.adb: Fix typo in comment.
7662
76632015-05-12 Robert Dewar <dewar@adacore.com>
7664
7665 * exp_unst.adb (Get_Real_Subp): New subprogram.
7666 (Unnest_Subprogram): Use Get_Real_Subp.
7667 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
7668 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
7669
76702015-05-12 Robert Dewar <dewar@adacore.com>
7671
7672 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
7673
76742015-05-12 Ed Schonberg <schonberg@adacore.com>
7675
7676 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
7677 auxiliary to Try_Primitive_Operation to handle properly prefixed
7678 calls where the operation is not a primitive of the type, but
7679 is declared in the package body that is in the immediate scope
7680 of the type.
7681
76822015-05-12 Robert Dewar <dewar@adacore.com>
7683
7684 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
7685
76862015-05-12 Ed Schonberg <schonberg@adacore.com>
7687
7688 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
7689 qualified name for an instance of a generic grand-child unit in
7690 the body its parent.
7691
76922015-05-12 Robert Dewar <dewar@adacore.com>
7693
7694 * exp_unst.adb (Upref_Name): New subprogram.
7695 (Unnest_Subprogram): Use Upref_Name.
7696 (Unnest_Subprogram): Use new Deref attribute.
7697 * exp_unst.ads: Doc updates.
7698
76992015-05-12 Thomas Quinot <quinot@adacore.com>
7700
7701 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
7702 can access files on filesystems mounted from servers that use large
7703 NFS file handles.
7704
77052015-05-09 Eric Botcazou <ebotcazou@adacore.com>
7706
7707 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
7708 method instead of global_decl for TYPE_DECLs.
7709
77102015-04-27 Jim Wilson <jim.wilson@linaro.org>
7711
7712 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
7713 and gnat1.
7714
77152015-04-13 Eric Botcazou <ebotcazou@adacore.com>
7716
7717 * gnatvsn.ads (Library_Version): Bump to 6.
7718
77192015-04-09 Iain Sandoe <iain@codesourcery.com>
7720
7721 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
7722
77232015-04-08 Eric Botcazou <ebotcazou@adacore.com>
7724
7725 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
7726 a function returning an unconstrained type 'const' for the middle-end.
7727
7728 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
7729 exact condition to detect Reason => "..." pattern.
7730
77312015-03-31 Tom de Vries <tom@codesourcery.com>
7732
7733 PR ada/65490
7734 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
7735 bzero call is the same expression as the destination'.
7736
77372015-03-26 Eric Botcazou <ebotcazou@adacore.com>
7738
7739 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
7740
77412015-03-24 Gary Dismukes <dismukes@adacore.com>
7742
7743 * sem_ch3.adb: Minor typo fix (missing paren).
7744
77452015-03-24 Robert Dewar <dewar@adacore.com>
7746
7747 * sinfo.ads: Update comment.
7748
77492015-03-24 Robert Dewar <dewar@adacore.com>
7750
7751 * exp_attr.adb: Add entry for typ'Deref.
7752 * sem_attr.adb (Deref): New GNAT attribute.
7753 * sem_attr.ads: Add entry for new GNAT attribute Deref.
7754 * snames.ads-tmpl: Add entries for new attribute Deref.
7755
77562015-03-24 Ed Schonberg <schonberg@adacore.com>
7757
7758 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
7759 on generic type.
7760
77612015-03-24 Gary Dismukes <dismukes@adacore.com>
7762
7763 * inline.adb: Minor typo fix.
7764
77652015-03-24 Arnaud Charlet <charlet@adacore.com>
7766
7767 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7768 doc/gnat_ugn/gnat_utility_programs.rst
7769 doc/gnat_rm/implementation_defined_attributes.rst
7770 doc/gnat_rm/implementation_defined_pragmas.rst
7771 doc/gnat_rm/representation_clauses_and_pragmas.rst
7772 doc/gnat_rm/about_this_guide.rst
7773 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
7774 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
7775
77762015-03-23 Jakub Jelinek <jakub@redhat.com>
7777
7778 PR bootstrap/65522
7779 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
7780
77812015-03-20 Eric Botcazou <ebotcazou@adacore.com>
7782
7783 PR ada/65451
7784 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
7785 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
7786
7787 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
7788
77892015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7790
7791 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
7792 of the expression ends up being composite.
7793
77942015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7795
7796 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
7797 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
7798 parameter types to detect circularities in ASIS mode.
7799 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
7800
78012015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7802
7803 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
7804 short-circuit the regular handling.
7805
78062015-03-13 Robert Dewar <dewar@adacore.com>
7807
7808 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
7809 references.
7810 (Actual_Ref): New function.
7811 (AREC_String): Minor reformatting.
7812 (Unnest_Subprogram): Use Actual_Ref.
7813 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
7814 before call to Instantiate_Bodies.
7815
78162015-03-13 Ed Schonberg <schonberg@adacore.com>
7817
7818 * freeze.adb (Freeze_Profile): If the return type of a function
7819 being frozen is an untagged limited view and the function is
7820 abstract, mark the type as frozen because there is no later
7821 point at which the profile of the subprogram will be elaborated.
7822
78232015-03-13 Robert Dewar <dewar@adacore.com>
7824
7825 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
7826 component to entities. Add new fields Field36-41 and Node36-41.
7827
78282015-03-13 Claire Dross <dross@adacore.com>
7829
7830 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
7831
78322015-03-13 Robert Dewar <dewar@adacore.com>
7833
7834 * exp_util.adb (Is_Volatile_Reference): Compile time known
7835 value is never considered to be a volatile reference.
7836
78372015-03-13 Robert Dewar <dewar@adacore.com>
7838
7839 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
7840 cannot be volatile" for internally generated object (such as
7841 FIRST and LAST constants).
7842
78432015-03-13 Ed Schonberg <schonberg@adacore.com>
7844
7845 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
7846 convention is specified for the formal parameter, verify that
7847 the actual has the same convention.
7848 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
7849 pragma to be set on a generic formal type.
7850 * sem_util.adb (Set_Convention): Ignore within an instance,
7851 as it has already been verified in the generic unit.
7852
78532015-03-13 Claire Dross <dross@adacore.com>
7854
7855 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
7856 subprograms with unconstrained record parameters containing
7857 Itype declarations.
7858 * sinfo.ads Document GNATprove assumption that type should match
7859 in the AST.
7860 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
7861 Do not check for Refined_Depends and Refined_Globals contracts
7862 as they are optional.
7863
78642015-03-13 Ed Schonberg <schonberg@adacore.com>
7865
7866 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
7867 capture dimension info if any, because the generated subtype
7868 declaration does not come from source and will not process dimensions.
7869 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
7870 Do not analyze expressions with an initialization procedure
7871 because aggregates will have been checked at the point of record
7872 declaration.
7873
78742015-03-13 Robert Dewar <dewar@adacore.com>
7875
7876 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
7877 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
7878 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
7879 * snames.ads-tmpl: Add entry for Name_Unimplemented.
7880
78812015-03-13 Gary Dismukes <dismukes@adacore.com>
7882
7883 * style.adb (Missing_Overriding): Apply the
7884 Comes_From_Source test to the Original_Node of the subprogram
7885 node, to handle the case of a null procedure declaration that
7886 has been rewritten as an empty procedure body.
7887
78882015-03-13 Robert Dewar <dewar@adacore.com>
7889
7890 * exp_util.ads: Minor fix to comment.
7891 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
7892 change.
7893
78942015-03-13 Robert Dewar <dewar@adacore.com>
7895
7896 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
7897 Is_Low/High_Bound params.
7898 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
7899 sequence to simplify generation of FIRST/LAST temps for bounds.
7900
79012015-03-12 Olivier Hainque <hainque@adacore.com>
7902
7903 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
7904 On targets where a function symbol designates a function descriptor,
7905 fetch the function code address from the descriptor.
7906 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
7907
79082015-03-04 Robert Dewar <dewar@adacore.com>
7909
7910 * sem_warn.adb: Minor reformatting.
7911 * init.c: Minor tweaks.
7912
79132015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
7914
7915 * a-coinho-shared.adb: Fix clear of already empty holder.
7916
79172015-03-04 Robert Dewar <dewar@adacore.com>
7918
7919 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
7920 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
7921 (Note_Uplevel_Reference): Ignore call inside generic.
7922 (Note_Uplevel_Reference): Fix check for no entity field.
7923 (Unnest_Subprogram): Ignore call inside generic.
7924 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
7925 (Visit_Node): Ignore calls to Imported subprograms.
7926 (Visit_Node): Fix problem in finding subprogram body in some cases.
7927 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
7928
79292015-03-04 Robert Dewar <dewar@adacore.com>
7930
7931 * einfo.adb (Is_ARECnF_Entity): Removed.
7932 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
7933 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
7934 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
7935 (Number_Entries): Minor reformatting.
7936 * einfo.ads (Is_ARECnF_Entity): Removed.
7937 * exp_unst.adb (Unnest_Subprogram): Remove setting of
7938 Is_ARECnF_Entity.
7939 (Add_Extra_Formal): Use normal Extra_Formal circuit.
7940 * sprint.adb (Write_Param_Specs): Properly handle case where
7941 there are no source formals, but we have at least one Extra_Formal
7942 present.
7943
79442015-03-04 Ed Schonberg <schonberg@adacore.com>
7945
7946 * sem_aggr.adb (Resolve_Record_Aggregate,
7947 Add_Discriminant_Values): If the value is a reference to the
7948 current instance of an enclosing type, use its base type to check
7949 against prefix of attribute reference, because the target type
7950 may be otherwise constrained.
7951
79522015-03-04 Robert Dewar <dewar@adacore.com>
7953
7954 * atree.h: Add entries for Flag287-Flag309.
7955 * einfo.adb: Add (unused) flags Flag287-Flag309.
7956
79572015-03-04 Ed Schonberg <schonberg@adacore.com>
7958
7959 * sem_util.adb (Collect_Interfaces, Collect): When gathering
7960 interfaces of ancestors, handle properly a subtype of a private
7961 extension.
7962
79632015-03-04 Robert Dewar <dewar@adacore.com>
7964
7965 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7966 (Next_Formal): Don't return ARECnF formal.
7967 (Last_Formal): Don't consider ARECnF formal.
7968 (Next_Formal_With_Extras): Do consider ARECnF formal.
7969 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7970 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
7971
79722015-03-04 Javier Miranda <miranda@adacore.com>
7973
7974 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
7975 object is a class-wide interface object and we generate the
7976 accessibility described in RM 6.5(8/3) then displace the pointer
7977 to the object to reference the base of the object (to get access
7978 to the TSD of the object).
7979
79802015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
7981
7982 * sem_prag.adb (Analyze_Abstract_State): Use routine
7983 Malformed_State_Error to issue general errors.
7984 (Analyze_Pragma): Diagnose a syntax error related to a state
7985 declaration with a simple option.
7986 (Malformed_State_Error): New routine.
7987
79882015-03-04 Robert Dewar <dewar@adacore.com>
7989
7990 * a-strsup.adb (Super_Slice): Deal with super flat case.
7991 * einfo.ads: Minor reformatting.
7992 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
7993 redundant code.
7994
79952015-03-04 Claire Dross <dross@adacore.com>
7996
7997 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7998 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
7999 containers.
8000
80012015-03-04 Ed Schonberg <schonberg@adacore.com>
8002
8003 * sem_warn.adb (Check_References): When checking for an unused
8004 in-out parameter of a class- wide type, use its type to determine
8005 whether it is private, in order to avoid a spurious warning when
8006 subprogram spec and body are in different units.
8007
80082015-03-04 Yannick Moy <moy@adacore.com>
8009
8010 * sem_attr.adb: Improve warning messages.
8011
80122015-03-04 Robert Dewar <dewar@adacore.com>
8013
8014 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
8015 generic subprograms.
8016 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
8017 (Note_Uplevel_Reference): Ignore uplevel references to non-types
8018 (Get_Level): Consider only subprograms, not blocks.
8019 (Visit_Node): Set proper condition for generating ARECnF entity.
8020 Ignore indirect calls. Ignore calls to subprograms
8021 outside our nest.
8022 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
8023 (Add_Form_To_Spec): Properly set Last_Entity field.
8024 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
8025 Handle case of no uplevel refs in outer subprogram
8026 Don't mark uplevel entities as aliased.
8027 Don't deal with calls with no ARECnF requirement.
8028
80292015-03-04 Robert Dewar <dewar@adacore.com>
8030
8031 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
8032 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
8033 operation in computing LZ.
8034 * sem_attr.adb: Minor typo fix
8035
80362015-03-04 Robert Dewar <dewar@adacore.com>
8037
8038 * exp_ch7.adb: Minor reformatting.
8039 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
8040 spec case.
8041 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
8042
80432015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
8044
8045 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
8046 references to formal parameters subject to pragma Unreferenced.
8047 (Suppress_Reference): New routine.
8048 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
8049 of attribute 'Old. Attributes 'Old and 'Result now share
8050 common processing.
8051 (Analyze_Old_Result_Attribute): New routine.
8052 (Check_Placement_In_Check): Removed.
8053 (Check_Placement_In_Contract_Cases): Removed.
8054 (Check_Placement_In_Test_Case): Removed.
8055 (Check_Use_In_Contract_Cases): Removed.
8056 (Check_Use_In_Test_Case): Removed.
8057 (In_Refined_Post): Removed.
8058 (Is_Within): Removed.
8059 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
8060 (Check_Low_Bound_Tested_For): New routine.
8061
80622015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
8063
8064 * exp_ch3.adb (Expand_N_Object_Declaration):
8065 Generate a runtime check to test the expression of pragma
8066 Default_Initial_Condition when the object is default initialized.
8067
80682015-03-02 Robert Dewar <dewar@adacore.com>
8069
8070 * scng.adb (Scan): Ignore illegal character in relaxed
8071 semantics mode.
8072
80732015-03-02 Ed Schonberg <schonberg@adacore.com>
8074
8075 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
8076 on left operand, so it can be properly resolved with type of
8077 alternatives of right operand.
8078 * sem_res.adb (Resolve_Set_Membership): Handle properly an
8079 overloaded left-hand side when the alternatives on the right
8080 hand side are literals of some universal type. Use first
8081 non-overloaded alternative to find expected type.
8082
80832015-03-02 Ed Schonberg <schonberg@adacore.com>
8084
8085 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
8086 type to retrieve designated type, because the purported access
8087 type may be a partial (private) view, when it is declared in
8088 the private part of a nested package, and finalization actions
8089 are generated when completing compilation of enclosing unit.
8090
80912015-03-02 Robert Dewar <dewar@adacore.com>
8092
8093 * back_end.adb (Call_Back_End): Remove previous patch,
8094 the back end now gets to see the result of -gnatd.1
8095 (Unnest_Subprogram_Mode) processing.
8096 * elists.ads, elists.adb (List_Length): New function.
8097 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
8098 * sem_util.adb (Check_Nested_Access): Handle formals in
8099 Unnest_Subprogram_Mode.
8100 (Adjust_Named_Associations): Minor reformatting.
8101 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
8102 for parameters.
8103
81042015-03-02 Robert Dewar <dewar@adacore.com>
8105
8106 * atree.ads, atree.adb (Uint24): New function
8107 (Set_Uint24): New procedure.
8108 * atree.h (Uint24): New macro for field access.
8109 * back_end.adb (Call_Back_End): For now, don't call back end
8110 if unnesting subprogs.
8111 * einfo.adb (Activation_Record_Component): New field
8112 (Subps_Index): New field.
8113 * einfo.ads (Activation_Record_Component): New field
8114 (Subps_Index): New field Minor reordering of comments into alpha order.
8115 * exp_unst.ads, exp_unst.adb: Continued development.
8116
81172015-03-02 Gary Dismukes <dismukes@adacore.com>
8118
8119 * exp_disp.ads: Minor reformatting.
8120
81212015-03-02 Ed Schonberg <schonberg@adacore.com>
8122
8123 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
8124 ancestor to list of use clauses active in descendant unit if we
8125 are within the private part of an intervening parent, to prevent
8126 circularities in use clause list.
8127
81282015-03-02 Javier Miranda <miranda@adacore.com>
8129
8130 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
8131 invariants to the corresponding record type.
8132 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
8133 which sets the value of the DTC_Entity associated with a given
8134 primitive of a tagged type and propagates the value to the
8135 wrapped subprogram.
8136 (Set_DTC_Entity_Value): Propagate the DTC
8137 value to the wrapped entity.
8138 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
8139 associated with invariants of progenitors.
8140 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
8141 of parents and progenitors.
8142 (Process_Full_View): Check hidden inheritance of class-wide type
8143 invariants.
8144 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
8145 the invariant procedure for interface types; build the invariant
8146 procedure for tagged types inheriting invariants from their
8147 progenitors.
8148 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
8149 types but do not build their invariant procedure since their
8150 invariants will be propagated to the invariant procedure of
8151 types covering the interface.
8152 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
8153 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
8154 by calls to Set_DT_Position_Value.
8155
81562015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
8157
8158 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
8159 code in Denote_Same_Function. Do not analyze attribute 'Result
8160 when it is inside procedure _Postconditions. Remove a misplaced
8161 warning diagnostic. Code cleanup.
8162 (Denote_Same_Function): New routine.
8163 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
8164 cleanup. Warn on pre/postconditions on an inlined subprogram.
8165 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
8166 an inlined subprogram.
8167 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
8168 pre/post condition on an inlined subprogram.
8169 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
8170 pre/postconditions on an inlined subprogram.
8171 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
8172
81732015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
8174
8175 * sem_prag.adb (Ensure_Aggregate_Form):
8176 Ensure that the name denoted by the Chars of a pragma argument
8177 association has the proper Sloc when converted into an aggregate.
8178
81792015-03-02 Bob Duff <duff@adacore.com>
8180
8181 * sem_ch6.adb (Check_Private_Overriding): Capture
8182 Incomplete_Or_Partial_View in a constant. This is cleaner and
8183 more efficient.
8184
81852015-03-02 Gary Dismukes <dismukes@adacore.com>
8186
8187 * einfo.ads, exp_unst.ads: Minor reformatting.
8188
81892015-03-02 Ed Schonberg <schonberg@adacore.com>
8190
8191 * a-strsea.adb (Find_Token): Ensure that the range of iteration
8192 does not perform any improper character access. This prevents
8193 erroneous access in the unusual case of an empty string target
8194 and a From parameter less than Source'First.
8195
81962015-03-02 Robert Dewar <dewar@adacore.com>
8197
8198 * elists.adb (List_Length): Fix incorrect result.
8199
82002015-03-02 Bob Duff <duff@adacore.com>
8201
8202 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
8203 checks here. It used to check that the function is merely
8204 overriding SOMEthing. Now it checks that the function is
8205 overriding a corresponding public operation. This is a correction
8206 to the implementation of the rule in RM-3.9.3(10).
8207
82082015-03-02 Robert Dewar <dewar@adacore.com>
8209
8210 * debug.adb: Document new debug flag -gnatd.1.
8211 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
8212 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
8213 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
8214 * elists.ads elists.adb (List_Length): New function.
8215 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
8216 when appropriate (Process_Preconditions): Minor code
8217 reorganization and reformatting
8218 * exp_unst.ads, exp_unst.adb: New files.
8219 * gnat1drv.adb (Adjust_Global_Switches): Set
8220 Unnest_Subprogram_Mode if -gnatd.1
8221 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
8222 string argument.
8223 * opt.ads (Unnest_Subprogram_Mode): New flag.
8224 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
8225 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
8226 Has_Nested_Subprogram flag.
8227 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
8228 Check_Nested_Access.
8229 (Find_Selected_Component): Minor comment addition.
8230 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
8231 (Note_Possible_Modification): New calling sequence for
8232 Check_Nested_Access.
8233 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
8234 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
8235
82362015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
8237
8238 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
8239 types, preserve the original type and create copies just like the C
8240 front-end does. For artificial ones, do not define a name for
8241 the original type.
8242 (create_type_decl): When gnat_pushdecl made the input type the
8243 original type for the new declaration, do not define a stub
8244 declaration for it.
8245 * gcc-interface/utils2.c (build_binary_op): Accept two different
8246 pointer types when they point to the same type.
8247
82482015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
8249
8250 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
8251 an unanalyzed node.
8252 * sem_util.adb (Kill_Current_Values): Do not invalidate and
8253 de-null a constant.
8254
82552015-03-02 Robert Dewar <dewar@adacore.com>
8256
8257 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
8258 reformatting.
8259
82602015-03-02 Ed Schonberg <schonberg@adacore.com>
8261
8262 * sem_ch8.adb: extend use of Available_Subtype.
8263
82642015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
8265
8266 * sem_prag.adb (Duplication_Error): Remove the special handling
8267 of 'Class or _Class in the context of pre/postconditions.
8268 (Process_Class_Wide_Condition): Remove the special handling of
8269 'Class or _Class in the context of pre/postconditions.
8270 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
8271 and Post_Class no longer need to be converted to _Pre and _Post.
8272 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
8273 on usage.
8274
82752015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
8276
8277 * exp_ch6.adb (Process_Preconditions): Modify the
8278 mechanism that find the first source declaration to correct exit
8279 the loop once it has been found.
8280
82812015-03-02 Gary Dismukes <dismukes@adacore.com>
8282
8283 * a-strsea.adb: Minor typo fix.
8284
82852015-03-02 Bob Duff <duff@adacore.com>
8286
8287 * einfo.ads: Minor comment fixes.
8288
82892015-03-02 Gary Dismukes <dismukes@adacore.com>
8290
8291 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
8292
82932015-03-02 Ed Schonberg <schonberg@adacore.com>
8294
8295 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
8296 is defined for the array type, use it instead of a Default_Value
8297 specified for the component type itself.
8298
82992015-03-02 Thomas Quinot <quinot@adacore.com>
8300
8301 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
8302 expanding a 'Input attribute reference for a class-wide type,
8303 do not generate a separate object declaration for the controlling
8304 tag dummy object; instead, generate the expression inline in the
8305 dispatching call. Otherwise, the declaration (which involves a
8306 call to String'Input, returning a dynamically sized value on the
8307 secondary stack) will be expanded outside of proper secondary
8308 stack mark/release operations, and will thus cause a secondary
8309 stack leak.
8310
83112015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
8312
8313 * checks.adb (Add_Validity_Check): Change the names of all
8314 formal parameters to better illustrate their purpose. Update
8315 the subprogram documentation. Update all occurrences of the
8316 formal parameters. Generate a pre/postcondition pragma by
8317 calling Build_Pre_Post_Condition.
8318 (Build_PPC_Pragma): Removed.
8319 (Build_Pre_Post_Condition): New routine.
8320 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
8321 is now used as Postconditions_Proc. Flag240 is now renamed to
8322 Has_Expanded_Contract. (First_Formal): The routine can now
8323 operate on generic subprograms.
8324 (First_Formal_With_Extras): The routine can now operate on generic
8325 subprograms.
8326 (Has_Expanded_Contract): New routine.
8327 (Has_Postconditions): Removed.
8328 (Postcondition_Proc): Removed.
8329 (Postconditions_Proc): New routine.
8330 (Set_Has_Expanded_Contract): New routine.
8331 (Set_Has_Postconditions): Removed.
8332 (Set_Postcondition_Proc): Removed.
8333 (Set_Postconditions_Proc): New routine.
8334 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
8335 the output of Has_Expanded_Contract.
8336 (Write_Field8_Name): Remove the output of Postcondition_Proc.
8337 (Write_Field14_Name): Add the output of Postconditions_Proc.
8338 * einfo.ads New attributes Has_Expanded_Contract and
8339 Postconditions_Proc along with occurrences in entities.
8340 Remove attributes Has_Postconditions and Postcondition_Proc
8341 along with occurrences in entities.
8342 (Has_Expanded_Contract): New routine along with pragma Inline.
8343 (Has_Postconditions): Removed along with pragma Inline.
8344 (Postcondition_Proc): Removed along with pragma Inline.
8345 (Postconditions_Proc): New routine along with pragma Inline.
8346 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
8347 (Set_Has_Postconditions): Removed along with pragma Inline.
8348 (Set_Postcondition_Proc): Removed along with pragma Inline.
8349 (Set_Postconditions_Proc): New routine along with pragma Inline.
8350 * exp_ch6.adb (Add_Return): Code cleanup. Update the
8351 generation of the call to the _Postconditions routine of
8352 the procedure. (Expand_Non_Function_Return): Reformat the
8353 comment on usage. Code cleanup. Update the generation of
8354 the call to the _Postconditions routine of the procedure or
8355 entry [family].
8356 (Expand_Simple_Function_Return): Update the
8357 generation of the _Postconditions routine of the function.
8358 (Expand_Subprogram_Contract): Reimplemented.
8359 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
8360 profile along the comment on usage.
8361 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
8362 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
8363 wrapper when the entry [family] has a contract with
8364 pre/postconditions.
8365 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
8366 (Expand_Contract_Cases): This routine and its subsidiaries now
8367 analyze all generated code.
8368 (Expand_Old_In_Consequence): Removed.
8369 * sem_attr.adb Add with and use clause for Sem_Prag.
8370 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
8371 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
8372 "Ensures".
8373 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
8374 a generic subprogram.
8375 (Analyze_Object_Declaration): Do not create a contract node.
8376 (Derive_Subprogram): Do not create a contract node.
8377 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
8378 not create a contract node.
8379 (Analyze_Completion_Contract): New routine.
8380 (Analyze_Function_Return): Alphabetize.
8381 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
8382 contract node. Do not copy pre/postconditions to the original
8383 generic template.
8384 (Analyze_Null_Procedure): Do not create a contract node.
8385 (Analyze_Subprogram_Body_Contract): Reimplemented.
8386 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
8387 as having postconditions. Do not create a contract node. Analyze
8388 the subprogram body contract of a body that acts as a compilation
8389 unit. Expand the subprogram contract after the declarations have
8390 been analyzed.
8391 (Analyze_Subprogram_Contract): Reimplemented.
8392 (Analyze_Subprogram_Specification): Do not create a contract node.
8393 (List_Inherited_Pre_Post_Aspects): Code cleanup.
8394 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
8395 comment on usage.
8396 (Analyze_Subprogram_Contract): Update the
8397 parameter profile and the comment on usage.
8398 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
8399 contract node.
8400 (Analyze_Package_Declaration): Do not create a
8401 contract node.
8402 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
8403 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
8404 contract node.
8405 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
8406 contract node.
8407 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
8408 their proper section and alphabetize them. Analyze the contract of
8409 a [generic] subprogram after all Pragmas_After have been analyzed.
8410 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
8411 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
8412 create a contract node.
8413 (Analyze_Generic_Subprogram_Declaration):
8414 Alphabetize local variables. Do not create a contract
8415 node. Do not generate aspects out of pragmas for ASIS.
8416 (Analyze_Subprogram_Instantiation): Instantiate
8417 the contract of the subprogram. Do not create a
8418 contract node. (Instantiate_Contract): New routine.
8419 (Instantiate_Subprogram_Body): Alphabetize local variables.
8420 (Save_Global_References_In_Aspects): New routine.
8421 (Save_References): Do not save the global references found within
8422 the aspects of a generic subprogram.
8423 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
8424 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
8425 Original_Node for establishing linkages.
8426 (Insert_Pragma): Insertion in a subprogram body takes precedence over
8427 the case where the subprogram body is also a compilation unit.
8428 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
8429 Get_Argument to obtain the proper expression. Install the generic
8430 formals when the related context is a generic subprogram.
8431 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
8432 the proper expression. Use Corresponding_Spec_Of to obtain
8433 the spec. Install the generic formal when the related context
8434 is a generic subprogram.
8435 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
8436 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
8437 generic formal when the related context is a generic subprogram.
8438 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
8439 to obtain the proper expression. Remove the call to
8440 Check_SPARK_Aspect_For_ASIS as the analysis is now done
8441 automatically.
8442 (Analyze_Pragma): Update all occurrences
8443 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
8444 Extensions_Visible, Global, Postcondition, Precondition and
8445 Test_Case now carry generic templates when the related context
8446 is a generic subprogram. The same pragmas are no longer
8447 forcefully fully analyzed when the context is a subprogram
8448 that acts as a compilation unit. Pragmas Abstract_State,
8449 Initial_Condition, Initializes and Refined_State have been clean
8450 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
8451 and Precondition now use the same routine for analysis. Pragma
8452 Refined_Post does not need to check the use of 'Result or
8453 the lack of a post-state in its expression. Reimplement the
8454 analysis of pragma Test_Case.
8455 (Analyze_Pre_Post_Condition): New routine.
8456 (Analyze_Pre_Post_Condition_In_Decl_Part):
8457 Reimplemented.
8458 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
8459 proper expression.
8460 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
8461 the proper expression.
8462 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
8463 (Check_Pre_Post): Removed.
8464 (Check_Precondition_Postcondition): Removed.
8465 (Check_SPARK_Aspect_For_ASIS): Removed.
8466 (Check_Test_Case): Removed.
8467 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
8468 to obtain the proper expression. Use Corresponding_Spec_Of to
8469 find the proper spec.
8470 (Create_Generic_Template): New routine.
8471 (Duplication_Error): New routine.
8472 (Expression_Function_Error): New routine.
8473 (Find_Related_Subprogram_Or_Body): Moved to the spec
8474 of Sem_Prag. Emit precise error messages. Account for cases of
8475 rewritten expression functions, generic instantiations, handled
8476 sequence of statements and pragmas from aspects.
8477 (Get_Argument): New routine.
8478 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8479 (Preanalyze_CTC_Args): Removed.
8480 (Process_Class_Wide_Condition): New routine.
8481 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
8482 the parameter profile along with the comment on usage.
8483 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
8484 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8485 (Test_Case_Arg): New routine.
8486 * sem_util.adb Add with and use clauses for Sem_Ch6.
8487 (Add_Contract_Item): This routine now creates a contract
8488 node the first time an item is added. Remove the duplicate
8489 aspect/pragma checks.
8490 (Check_Result_And_Post_State): Reimplemented.
8491 (Corresponding_Spec_Of): New routine.
8492 (Get_Ensures_From_CTC_Pragma): Removed.
8493 (Get_Requires_From_CTC_Pragma): Removed.
8494 (Has_Significant_Contract): New routine.
8495 (Inherit_Subprogram_Contract): Inherit only if the source
8496 has a contract.
8497 (Install_Generic_Formals): New routine.
8498 (Original_Aspect_Name): Removed.
8499 (Original_Aspect_Pragma_Name): New routine.
8500 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
8501 (Corresponding_Spec_Of): New routine.
8502 (Get_Ensures_From_CTC_Pragma): Removed.
8503 (Get_Requires_From_CTC_Pragma): Removed.
8504 (Has_Significant_Contract): New routine.
8505 (Install_Generic_Formals): New routine.
8506 (Original_Aspect_Name): Removed.
8507 (Original_Aspect_Pragma_Name): New routine.
8508 * sem_warn.adb Add with and use clauses for Sem_Prag.
8509 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
8510
85112015-03-02 Ed Schonberg <schonberg@adacore.com>
8512
8513 * sem_ch8.adb (Available_Subtype): Optimization in
8514 Find_Selected_Component: when safe, use existing subtype of
8515 array component, possibly discriminant-dependent, rather than
8516 creating new subtype declaration for it. In this fashion different
8517 occurrences of the component have the same subtype, rather than
8518 just equivalent ones. Simplifies value tracing in GNATProve.
8519
85202015-03-01 Arnaud Charlet <charlet@adacore.com>
8521
8522 PR ada/65259
8523 * doc/gnat_ugn/gnat_project_manager.rst,
8524 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
8525 image, too troublesome with texi format.
8526 * gnat_ugn.texi: Regenerate.
8527
85282015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8529
8530 PR libgomp/64625
8531 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
8532 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8533 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8534
85352015-02-23 Thomas Schwinge <thomas@codesourcery.com>
8536
8537 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
8538 arguments parameter.
8539 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8540
85412015-02-22 Arnaud Charlet <charlet@adacore.com>
8542
8543 * doc/Makefile: postprocess texinfo files to update @dircategory
8544 and update texi files under gcc/ada.
8545 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
8546
85472015-02-22 Arnaud Charlet <charlet@adacore.com>
8548
8549 * doc/gnat_ugn/project-manager-figure.png,
8550 doc/gnat_ugn/rtlibrary-structure.png: New.
8551
85522015-02-22 Tom de Vries <tom@codesourcery.com>
8553
8554 PR ada/65100
8555 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
8556 @item, and fix warning '@itemize has text but no @item'.
8557
85582015-02-20 Ed Schonberg <schonberg@adacore.com>
8559
8560 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
8561 legally applies to an abstract subprogram declaration.
8562 * freeze.adb: Minor comment addition.
8563
85642015-02-20 Robert Dewar <dewar@adacore.com>
8565
8566 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
8567 * erroutc.adb (Set_Msg_Str): Replace _xxx.
8568 (Pre/Post/Type_Invariant) by xxx'Class.
8569 * erroutc.ads (Set_Msg_Str): Replace _xxx.
8570 (Pre/Post/Type_Invariant) by xxx'Class.
8571 * sem_prag.adb (Fix_Error): Remove special casing of
8572 Name_uType_Invariant.
8573 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
8574 Name_uPre and Name_uPost in aspect case (done in Errout now).
8575
85762015-02-20 Robert Dewar <dewar@adacore.com>
8577
8578 * g-alveop.adb: Minor style fixes.
8579
85802015-02-20 Robert Dewar <dewar@adacore.com>
8581
8582 * freeze.adb (Warn_Overlay): Guard against blow up with address
8583 clause.
8584
85852015-02-20 Bob Duff <duff@adacore.com>
8586
8587 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
8588 for the compiler to guess whether the call is internal or external --
8589 it is always external.
8590 (Expand_Access_To_Protected_Op): For P'Access, where P
8591 is a protected subprogram, always create a pointer to the
8592 External_Subprogram.
8593
85942015-02-20 Robert Dewar <dewar@adacore.com>
8595
8596 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
8597
85982015-02-20 Robert Dewar <dewar@adacore.com>
8599
8600 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
8601 predicate for non-static subtype.
8602 (Build_Predicate_Functions): Do not assume subtype associated with a
8603 static predicate must be static.
8604
86052015-02-20 Robert Dewar <dewar@adacore.com>
8606
8607 * errout.adb (Set_Msg_Node): Better handling of internal names
8608 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
8609 * errout.ads: Document additional case of message deletion.
8610 * namet.adb (Is_Internal_Name): Refined to consider wide
8611 strings in brackets notation and character literals not to be
8612 internal names.
8613 * sem_ch8.adb (Find_Selected_Component): Give additional error
8614 when selector name is a subprogram whose first parameter has
8615 the same type as the prefix, but that type is untagged.
8616
86172015-02-20 Robert Dewar <dewar@adacore.com>
8618
8619 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
8620
86212015-02-20 Tristan Gingold <gingold@adacore.com>
8622
8623 * opt.ads (GNAT_Mode_Config): New variable.
8624 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
8625 to set Assertions_Enabled.
8626 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
8627 for -gnatg.
8628
86292015-02-20 Robert Dewar <dewar@adacore.com>
8630
8631 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
8632 comment regarding the handling of unterminated fixed-point
8633 constants.
8634 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
8635 corresponding to those previously added for
8636 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
8637
86382015-02-20 Olivier Hainque <hainque@adacore.com>
8639
8640 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
8641
86422015-02-20 Robert Dewar <dewar@adacore.com>
8643
8644 * sem_prag.adb: Minor comment clarification.
8645
86462015-02-20 Olivier Hainque <hainque@adacore.com>
8647
8648 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
8649 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
8650 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
8651 (vec_ctf): Now renamings as well.
8652
86532015-02-20 Robert Dewar <dewar@adacore.com>
8654
8655 * switch-c.adb, bindgen.adb: Minor reformatting.
8656
86572015-02-20 Ed Schonberg <schonberg@adacore.com>
8658
8659 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
8660 Invariant'class is allowed on an abstract type.
8661
86622015-02-20 Ed Schonberg <schonberg@adacore.com>
8663
8664 * sem_ch3.adb (Access_Definition): If the access definition is
8665 for a protected component and defines an access to protected
8666 subprogram, do not create an itype reference for it because a
8667 full type declaration will be built in order to generate the
8668 proper equivalent type.
8669 (Analyze_Subtype_Declaration): Add information of incomplete
8670 subtypes, for Ada 2012 extended uses of incomplete types.
8671
86722015-02-20 Gary Dismukes <dismukes@adacore.com>
8673
8674 * sem_res.adb: Minor reformatting.
8675
86762015-02-20 Vincent Celier <celier@adacore.com>
8677
8678 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
8679 path name for several switches --RTS, use the normalized path
8680 names.
8681
86822015-02-20 Vincent Celier <celier@adacore.com>
8683
8684 * bindgen.adb: Minor reformatting and code reorganization.
8685
86862015-02-20 Jose Ruiz <ruiz@adacore.com>
8687
8688 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
8689 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
8690 defined by Ada 2012.
8691
86922015-02-20 Arnaud Charlet <charlet@adacore.com>
8693
8694 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
8695 obsolete references to RTX, nucleus, VMS.
8696
86972015-02-20 Ed Schonberg <schonberg@adacore.com>
8698
8699 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
8700 aspect, use name that mentions Class explicitly, rather than
8701 compiler-internal name.
8702
87032015-02-20 Robert Dewar <dewar@adacore.com>
8704
8705 * debug.adb: Add documentation for -gnatd.2 (allow statements
8706 in decl sequences).
8707 * par-ch3.adb (P_Identifier_Declarations): Handle
8708 statement appearing where declaration expected more cleanly.
8709 (Statement_When_Declaration_Expected): Implement debug flag
8710 -gnatd.2.
8711
87122015-02-20 Jose Ruiz <ruiz@adacore.com>
8713
8714 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
8715 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
8716 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
8717 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
8718 defined by Ada 2005.
8719 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
8720 This is the correct name for the dispatching policy (FIFO was
8721 missing).
8722
87232015-02-20 Javier Miranda <miranda@adacore.com>
8724
8725 * sem_res.adb (Resolve_Type_Conversion): If the type of the
8726 operand is the limited-view of a class-wide type then recover
8727 the class-wide type of the non-limited view.
8728
87292015-02-20 Arnaud Charlet <charlet@adacore.com>
8730
8731 * gcc-interface/Makefile.in: Remove references to nucleus.
8732 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
8733 extern_flag to true for Inline_Always subprograms with
8734 Intrinsic convention.
8735
87362015-02-20 Yannick Moy <moy@adacore.com>
8737
8738 * sem_prag.ads: Minor typo in comment.
8739
87402015-02-20 Pascal Obry <obry@adacore.com>
8741
8742 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
8743
87442015-02-20 Vincent Celier <celier@adacore.com>
8745
8746 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
8747 if it exists.
8748
87492015-02-20 Robert Dewar <dewar@adacore.com>
8750
8751 * sem_eval.ads: Minor reformatting.
8752
87532015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8754
8755 * freeze.adb (Size_Known): Do not set the packed size for
8756 independent type or component.
8757 (Freeze_Array_Type): Check for Independent[_Components] with packing
8758 or explicit component size clause.
8759 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
8760 of independence pragmas only for non-GCC back-ends.
8761 * sem_ch13.adb (Initialize): Likewise for the initialization.
8762 * sem_prag.adb (Record_Independence_Check): New procedure to record an
8763 independence check in the table.
8764 (Analyze_Pragma): Use it throughout instead of doing it manually.
8765 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
8766 independent type or component.
8767
87682015-02-20 Thomas Quinot <quinot@adacore.com>
8769
8770 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
8771 struct direct and readdir. This is required for NFS filesystems
8772 mounted from servers that use 64-bit cookies.
8773
87742015-02-20 Ed Schonberg <schonberg@adacore.com>
8775
8776 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
8777 Build_Subprogram_Renaming, to create renaming of subprogram
8778 instance in the the declaration of the wrapper package rather
8779 than in its body, so that it is available for analysis of aspects
8780 propagated from generic to instantiation.
8781 (Check_Mismatch): An actual for a formal package that is an
8782 incomplete type matches a formal type that is incomplete.
8783 (Instantiate_Package_Body): Move code that builds subprogram
8784 renaming to Analyze_Subprogram_Instantiation.
8785 (Instantiate_Type): The generated subtype is a limited view if
8786 the actual is a limited view.
8787 (Load_Parent_Of_Generic): Retrieve instance declaration from
8788 its new position within wrapper package.
8789
87902015-02-20 Arnaud Charlet <charlet@adacore.com>
8791
8792 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
8793
87942015-02-20 Robert Dewar <dewar@adacore.com>
8795
8796 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
8797 issue of negative arguments.
8798
87992015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8800
8801 * gnat1drv.adb: Minor consistency fix.
8802
88032015-02-20 Pascal Obry <obry@adacore.com>
8804
8805 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
8806 paths.
8807
88082015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8809
8810 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
8811 renamings.
8812 * exp_ch6.adb (Expand_Call): Use back-end inlining
8813 instead of expansion for simple subprogram renamings.
8814
88152015-02-20 Robert Dewar <dewar@adacore.com>
8816
8817 * exp_util.adb: Minor reformatting.
8818
88192015-02-20 Vincent Celier <celier@adacore.com>
8820
8821 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
8822 is specified several times with different values that indicates
8823 the same runtime directory.
8824
88252015-02-20 Ed Schonberg <schonberg@adacore.com>
8826
8827 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
8828 handle properly illegal uses of attributes on prefixes on an
8829 incomplete type, both when the type of the prefix is locally
8830 incomplete, and when it is a limited view of a type whose
8831 non-limited view is not available.
8832 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
8833 'Address and others.
8834
88352015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8836
8837 * exp_ch6.adb: Fix minor typo in comment.
8838
88392015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8840
8841 * sinfo.ads: Add comment.
8842
88432015-02-20 Olivier Hainque <hainque@adacore.com>
8844
8845 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
8846 flags controlling the actual FE inlining out of pragma Inline
8847 and pragma Inline_Always.
8848 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
8849 on -fno-inline, which disables all inlining in compilers with
8850 an Ada back-end and without back-end inlining support.
8851 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
8852 flag to True on -fno-inline and leave Inline_Always alone for
8853 gcc back-ends.
8854 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
8855 names of the Opt flags it sets.
8856 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
8857 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
8858 * sem_prag.adb (Make_Inline): Remove early return conditioned
8859 on Opt.Suppress_All_Inlining.
8860 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
8861 disable the calls to Build_Body_To_Inline otherwise triggered
8862 by pragma Inline or Inline_Always. This will prevent actual
8863 front-end inlining of the subprogram on calls.
8864
88652015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8866
8867 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
8868 Abort_Undefer_Direct function.
8869 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
8870 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
8871 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
8872 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
8873 Add_Inlined_Body.
8874 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
8875 Remove call to Register_Backend_Call and move code resetting
8876 Needs_Debug_Info on inlined subprograms to...
8877 * inline.ads (Add_Inlined_Body): Add N parameter.
8878 (Register_Backend_Call): Delete.
8879 * inline.adb (Add_Inlined_Body): ...here and simplify.
8880 Register the call with Backend_Calls directly.
8881 (Register_Backend_Call): Delete.
8882 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
8883
88842015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8885
8886 * s-stalib.ads: Fix typo.
8887
88882015-02-20 Ed Schonberg <schonberg@adacore.com>
8889
8890 * exp_ch3.adb (Default_Initialize_Object): If the object has a
8891 delayed freeze, the actions associated with default initialization
8892 must be part of the freeze actions, rather that being inserted
8893 directly after the object declaration.
8894
88952015-02-20 Robert Dewar <dewar@adacore.com>
8896
8897 * lib-load.adb: Minor comment update.
8898
88992015-02-20 Vincent Celier <celier@adacore.com>
8900
8901 * prj-proc.adb (Process_Case_Construction): When there are
8902 incomplete withed projects and the case variable is unknown,
8903 skip the case construction.
8904
89052015-02-20 Ed Schonberg <schonberg@adacore.com>
8906
8907 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
8908 when an actual is a view conversion, either because the call is
8909 to an inherited operation, or because the actual is an explicit
8910 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
8911
89122015-02-20 Robert Dewar <dewar@adacore.com>
8913
8914 * einfo.ads: Minor comment updates Fix missing pragma Inline
8915 for Set_Partial_View_Has_Unknown_Discr.
8916 * einfo.adb (Write_Entity_Flags): Add missing entry for
8917 Partial_View_Has_Unknown_Discr.
8918 * sem_ch3.adb: Minor reformatting.
8919
89202015-02-20 Vincent Celier <celier@adacore.com>
8921
8922 * opt.ads: Minor cleanup: remove mention of gprmake.
8923 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
8924 * s-tataat.adb: Do not call System.Tasking.Self but directly
8925 System.Task_Primitives.Operations.Self.
8926
89272015-02-20 Arnaud Charlet <charlet@adacore.com>
8928
8929 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
8930 sphinx in the doc directory.
8931 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
8932
89332015-02-20 Robert Dewar <dewar@adacore.com>
8934
8935 * sem_res.adb: Minor reformatting.
8936 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
8937 building spec.
8938 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
8939 aspects from circuitry setting delay required to false if the
8940 argument is an integer literal.
8941
89422015-02-20 Ed Schonberg <schonberg@adacore.com>
8943
8944 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
8945 on type entities, to enforce AI12-0133: default initialization
8946 of types whose partial view has unknown discriminants does not
8947 get an invariant check, because clients of the unit can never
8948 declare objects of such types.
8949 * sem_ch3.adb (Find_Type_Name); Set new flag
8950 Partial_View_Has_Unknown_Discr when needed.
8951 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
8952 generation of invariant call on default-initialized object.
8953
89542015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8955
8956 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
8957 if the parameter either is passed by reference or if the alignment
8958 would be lowered.
8959
89602015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8961
8962 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
8963 detect primitive operations of tagged and untagged types.
8964
89652015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8966
8967 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
8968 sets in presence of derivation for subprogram types.
8969
89702015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8971
8972 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
8973 present in the same context as the declaration.
8974
89752015-02-07 Jakub Jelinek <jakub@redhat.com>
8976
8977 PR middle-end/64340
8978 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
8979 and optimization_current_node after tweaking global_options.
8980
89812015-02-05 Robert Dewar <dewar@adacore.com>
8982
8983 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
8984 prj-nmsc.adb: Minor reformatting.
8985
89862015-02-05 Ed Schonberg <schonberg@adacore.com>
8987
8988 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
8989 of a protected type may not be available, so to check conformance
8990 with an interface type, examine the interface list in the type
8991 declaration directly.
8992 (Write_Overloads): Improve information for indirect calls,
8993 for debugger use.
8994
89952015-02-05 Ed Schonberg <schonberg@adacore.com>
8996
8997 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
8998 expansion activity in ASIS mode.
8999
90002015-02-05 Javier Miranda <miranda@adacore.com>
9001
9002 * errout.adb (Error_Msg_PT): Add missing error.
9003 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
9004 RM rule. Code cleanup.
9005 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
9006 anonymous access types. Found working on the tests. Code cleanup.
9007
90082015-02-05 Vincent Celier <celier@adacore.com>
9009
9010 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
9011 when there are incomplete withs.
9012 * prj-nmsc.adb (Process_Naming): Do not try to get the value
9013 of an element when it is nil.
9014 (Check_Naming): Do not check a nil suffix for illegality
9015 * prj-proc.adb (Expression): Do not process an empty term.
9016 * prj-strt.adb (Attribute_Reference): If attribute cannot be
9017 found, parse a possible index to avoid cascading errors.
9018
90192015-02-05 Ed Schonberg <schonberg@adacore.com>
9020
9021 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
9022 for an access_to_subprogram declaration is not a derived type.
9023
90242015-02-05 Robert Dewar <dewar@adacore.com>
9025
9026 * errout.adb (Error_Msg_Internal): For non-serious error set
9027 Fatal_Error to Ignored.
9028 * lib-load.adb (Load_Unit): Minor comment updates.
9029 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
9030 setting from with'ed unit to with'ing unit.
9031 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
9032 of ambiguity.
9033
90342015-02-05 Yannick Moy <moy@adacore.com>
9035
9036 * sem_prag.adb, par-prag.adb: Minor code clean up.
9037
90382015-02-05 Yannick Moy <moy@adacore.com>
9039
9040 * par-prag.adb (Pragma_Warnings): Update for extended form
9041 of pragma Warnings. The "one" argument case may now have 2 or
9042 3 arguments.
9043 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
9044 extended form of pragma Warnings. Pragma with tool name is either
9045 rewritten as null or as an equivalent form without tool name,
9046 before reanalysis.
9047 * snames.ads-tmpl (Name_Gnatprove): New name.
9048
90492015-02-05 Robert Dewar <dewar@adacore.com>
9050
9051 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
9052 standard Boolean.
9053 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
9054 condition is standard Boolean, it can be non-standard derived
9055 Boolean.
9056
90572015-02-05 Robert Dewar <dewar@adacore.com>
9058
9059 * checks.adb (Enable_Range_Check): Disconnect attempted
9060 optimization for the case of range check for subscript of
9061 unconstrained array.
9062
90632015-02-05 Robert Dewar <dewar@adacore.com>
9064
9065 * par-ch13.adb (With_Present): New function
9066 (Aspect_Specifications_Present): Handle WHEN in place of WITH
9067 (Get_Aspect_Specifications): Comment update.
9068 * par.adb: Comment updates.
9069
90702015-02-05 Robert Dewar <dewar@adacore.com>
9071
9072 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
9073 * frontend.adb (Frontend): New setting of Fatal_Error.
9074 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
9075 Fatal_Error.
9076 (Load_Main_Source): New setting of Fatal_Error
9077 (Load_Unit): New setting of Fatal_Error.
9078 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
9079 Fatal_Error.
9080 (Ensure_System_Dependency): New setting of Fatal_Error.
9081 * lib.adb (Fatal_Error): New setting of Fatal_Error
9082 (Set_Fatal_Error): New setting of Fatal_Error.
9083 * lib.ads: New definition of Fatal_Error and associated routines.
9084 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
9085 * par-load.adb (Load): New setting of Fatal_Error.
9086 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
9087 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
9088 Fatal_Error.
9089 (Optional_Subunit): New setting of Fatal_Error.
9090 (Analyze_Proper_Body): New setting of Fatal_Error.
9091 (Load_Needed_Body): New setting of Fatal_Error.
9092
90932015-02-05 Ed Schonberg <schonberg@adacore.com>
9094
9095 * sem_res.adb (Resolve_Call): If the function being called has
9096 out parameters do not check for language version if the function
9097 comes from a predefined unit, as those are always compiled in
9098 Ada 2012 mode.
9099
91002015-02-05 Ed Schonberg <schonberg@adacore.com>
9101
9102 * sem_ch3.adb (Process_Full_View): Verify that the full view
9103 of a type extension must carry an explicit limited keyword if
9104 the partial view does (RM 7.3 (10.1)).
9105
91062015-02-05 Robert Dewar <dewar@adacore.com>
9107
9108 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
9109 sem_warn.ads: Minor reformatting.
9110 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
9111 deleted by -gnatI.
9112 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
9113 error for abstract type.
9114
91152015-02-05 Yannick Moy <moy@adacore.com>
9116
9117 * opt.ads (Warn_On_Suspicious_Contract): Update comment
9118 describing use.
9119 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
9120 suspicious uses of 'Update.
9121 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
9122 function issues warning on suspicious uses of 'Update.
9123 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
9124 package spec and body as SPARK_Mode Off.
9125
91262015-02-05 Robert Dewar <dewar@adacore.com>
9127
9128 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
9129 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
9130 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
9131 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
9132 for exported entity.
9133
91342015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
9135
9136 * sem_prag.adb (Check_Pragma_Conformance): Add
9137 local variable Arg. Ensure that all errors are associated with
9138 the pragma if it appears without an argument. Add comments on
9139 various cases.
9140
91412015-02-05 Robert Dewar <dewar@adacore.com>
9142
9143 * lib-xref.adb: Minor reformatting.
9144
91452015-02-05 Tristan Gingold <gingold@adacore.com>
9146
9147 PR ada/64349
9148 * env.c: Fix thinko: handle Darwin case before default one.
9149
91502015-01-30 Robert Dewar <dewar@adacore.com>
9151
9152 * a-assert.adb: Minor reformatting.
9153 * sem_ch13.adb: Minor comment clarification.
9154 * types.ads: Minor comment update.
9155 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
9156 when we have a predicate that is nothing but an inherited dynamic
9157 predicate.
9158
91592015-01-30 Jerome Guitton <guitton@adacore.com>
9160
9161 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
9162 include cert link spec.
9163
91642015-01-30 Robert Dewar <dewar@adacore.com>
9165
9166 * einfo.ads: Minor comment fix.
9167 * freeze.adb (Freeze_Profile): Add test for suspicious import
9168 in pure unit.
9169 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
9170 use in Pure unit is now moved to Freeze (to properly catch
9171 Pure_Function exemption).
9172
91732015-01-30 Bob Duff <duff@adacore.com>
9174
9175 * sem_res.ads: Minor comment fix.
9176 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
9177 check both operands of an operator.
9178
91792015-01-30 Yannick Moy <moy@adacore.com>
9180
9181 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
9182 policy for Pre to Ignore.
9183 (Assert): Add precondition.
9184
91852015-01-30 Robert Dewar <dewar@adacore.com>
9186
9187 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
9188 Pure unit.
9189 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
9190 documentation for some special cases of invalid attempts at
9191 based integers.
9192
91932015-01-30 Gary Dismukes <dismukes@adacore.com>
9194
9195 * errout.ads: Minor reformatting.
9196
91972015-01-30 Yannick Moy <moy@adacore.com>
9198
9199 * inline.adb (Process_Formals): Use the sloc of
9200 the inlined node instead of the sloc of the actual parameter,
9201 when replacing formal parameters by the actual one.
9202
92032015-01-30 Arnaud Charlet <charlet@adacore.com>
9204
9205 * g-expect.adb (Get_Command_Output): Use infinite timeout when
9206 calling Expect.
9207
92082015-01-30 Ed Schonberg <schonberg@adacore.com>
9209
9210 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
9211 defaulted in an instantiation, add an entry in the list of actuals
9212 to indicate the default value of the formal (as is already done
9213 for defaulted subprograms).
9214
92152015-01-30 Javier Miranda <miranda@adacore.com>
9216
9217 * errout.adb (Error_Msg_PT): Minor error phrasing update.
9218
92192015-01-30 Robert Dewar <dewar@adacore.com>
9220
9221 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
9222 for object case.
9223
92242015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
9225
9226 * exp_dbug.adb (Get_Encoded_Name): When
9227 -fgnat-encodings=minimal, do not generate names for biased types.
9228
92292015-01-30 Tristan Gingold <gingold@adacore.com>
9230
9231 PR ada/64349
9232 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
9233
92342015-01-30 Gary Dismukes <dismukes@adacore.com>
9235
9236 * freeze.adb: Minor reformatting.
9237
92382015-01-30 Javier Miranda <miranda@adacore.com>
9239
9240 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
9241 improve its documentation.
9242 * errout.adb (Error_Msg_PT): Improve the error message.
9243 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
9244 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
9245 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
9246
92472015-01-30 Robert Dewar <dewar@adacore.com>
9248
9249 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
9250 message for False case.
9251
92522015-01-30 Doug Rupp <rupp@adacore.com>
9253
9254 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
9255 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
9256 kernel.
9257
92582015-01-30 Gary Dismukes <dismukes@adacore.com>
9259
9260 * sem_attr.adb (Declared_Within_Generic_Unit):
9261 New function to test whether an entity is declared within the
9262 declarative region of a given generic unit.
9263 (Resolve_Attribute): For checking legality of subprogram'Access within
9264 a generic unit, call new Boolean function Declared_Within_Generic_Unit
9265 instead of simply comparing the results of Enclosing_Generic_Unit on
9266 the prefix and access type. Correct minor comment typos.
9267
92682015-01-30 Robert Dewar <dewar@adacore.com>
9269
9270 * freeze.adb, exp_util.ads: Update comment.
9271 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
9272 * sem_util.adb: Minor: fix typo.
9273
92742015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
9275
9276 * sem_attr.adb (Analyze_Attribute): Ensure that
9277 the check concerning Refined_Post takes precedence over the
9278 other cases.
9279
92802015-01-30 Gary Dismukes <dismukes@adacore.com>
9281
9282 * sem_prag.adb: Minor typo fixes and reformatting.
9283
92842015-01-30 Yannick Moy <moy@adacore.com>
9285
9286 * sem_attr.adb: Code clean up.
9287
92882015-01-30 Robert Dewar <dewar@adacore.com>
9289
9290 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
9291 * ali.ads (Unit_Record): Add new field Serious_Errors.
9292 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
9293 attribute in U line.
9294 * lib-writ.ads: New attribute SE (serious erors) in unit line.
9295
92962015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
9297
9298 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
9299 Lit_Indexes, Scale_Value, Storage_Size_Variable,
9300 String_Literal_Low_Bound along associated routines and
9301 Write_FieldX_Name.
9302 (Pending_Access_Types): New routine.
9303 (Set_Pending_Access_Types): New routine.
9304 (Write_Field15_Name): Add an entry for Pending_Access_Types.
9305 * einfo.ads Add new attribute Pending_Access_Types along
9306 with usage in nodes. Update the usage of attributes
9307 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
9308 Storage_Size_Variable, String_Literal_Low_Bound.
9309 (Pending_Access_Types): New routine along with pragma Inline.
9310 (Set_Pending_Access_Types): New routine along with pragma Inline.
9311 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
9312 Ins_Node. Determine the insertion node for anonynous access type
9313 that acts as a component type of an array. Update the call to
9314 Build_Finalization_Master.
9315 (Expand_Freeze_Record_Type): Update
9316 the calls to Build_Finalization_Master.
9317 (Freeze_Type): Remove
9318 local variable RACW_Seen. Factor out the code that deals with
9319 remote access-to-class-wide types. Create a finalization master
9320 when the designated type contains a private component. Fully
9321 initialize all pending access types.
9322 (Process_RACW_Types): New routine.
9323 (Process_Pending_Access_Types): New routine.
9324 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
9325 needs to set primitive Finalize_Address.
9326 (Expand_N_Allocator): Allocation no longer sets primitive
9327 Finalize_Address.
9328 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
9329 Update the call to Build_Finalization_Master.
9330 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
9331 needs to set primitive Finalize_Address.
9332 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
9333 (Build_Finalization_Master): New parameter profile. Associate
9334 primitive Finalize_Address with the finalization master if the
9335 designated type has been frozen, otherwise treat the access
9336 type as pending. Simplify the insertion of the master and
9337 related initialization code.
9338 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
9339 abstract types.
9340 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
9341 Simplify the implementation.
9342 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
9343 along with comment on usage.
9344 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
9345 the comment on usage.
9346 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
9347 Finalize_Address to retrieve the primitive.
9348 (Finalize_Address): New routine.
9349 (Find_Finalize_Address): Removed.
9350 * exp_util.ads (Finalize_Address): New routine.
9351 * freeze.adb (Freeze_All): Remove the generation of finalization
9352 masters.
9353 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
9354 pending access types from the partial to the full view.
9355
93562015-01-30 Robert Dewar <dewar@adacore.com>
9357
9358 * sem_disp.adb: Minor reformatting.
9359 * sem_disp.ads: Documentation update.
9360
93612015-01-30 Ed Schonberg <schonberg@adacore.com>
9362
9363 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
9364 or a function call, return True if type is class-wide.
9365 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
9366 Apply RM 4.5.7 (17/3): all or none of the dependent expression
9367 of a conditional expression must be dynamically tagged.
9368
93692015-01-30 Ed Schonberg <schonberg@adacore.com>
9370
9371 * sem_ch6.adb (Analyze_Function_Return): In an extended return
9372 statement, apply accessibility check to result object when there
9373 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
9374
93752015-01-30 Robert Dewar <dewar@adacore.com>
9376
9377 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
9378 Boolean for case where ELSE is omitted.
9379 * sem_res.adb: Minor reformatting.
9380
93812015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
9382
9383 Fix build under cygwin/64.
9384 * adaint.h: Add check for __CYGWIN__.
9385 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
9386
93872015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
9388
9389 PR ada/64640
9390 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
9391 * mingw32.h: Don't include <tchar.h> under cygwin.
9392 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
9393
93942015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9395
9396 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
9397 (DEF_FUNCTION_TYPE_VAR_12): New macros.
9398
93992015-01-09 Michael Collison <michael.collison@linaro.org>
9400
9401 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
9402 vec.h, double-int.h, input.h, alias.h, symtab.h,
9403 fold-const.h, wide-int.h, and inchash.h due to
9404 flattening of tree.h.
9405 * gcc-interface/decl.c: Ditto.
9406 * gcc-interface/misc.c: Ditto.
9407 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
9408 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
9409 fold-const.h, wide-int.h, and inchash.h due to
9410 flattening of tree.h.
9411 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
9412 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
9413 fold-const.h, wide-int.h, inchash.h due to
9414 flattening of tree.h.
9415 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
9416 vec.h, double-int.h, input.h, alias.h, symtab.h,
9417 fold-const.h, wide-int.h, and inchash.h due to
9418 flattening of tree.h.
9419 * gcc-interface/utils2.c: Ditto.
9420
94212015-01-07 Robert Dewar <dewar@adacore.com>
9422
9423 * sem_warn.adb (Check_One_Unit): Don't give unused entities
9424 warning for a package which is used as a generic parameter.
9425
94262015-01-07 Bob Duff <duff@adacore.com>
9427
9428 * usage.adb (Usage): Correct documentation of
9429 -gnatw.f switches.
9430
94312015-01-07 Robert Dewar <dewar@adacore.com>
9432
9433 * s-fileio.adb: Minor reformatting.
9434
94352015-01-07 Ed Schonberg <schonberg@adacore.com>
9436
9437 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
9438 access to subprogram, replace its formals with new entities when
9439 building the object declaration, both if actual is present and
9440 when it is defaulted.
9441
94422015-01-07 Ed Schonberg <schonberg@adacore.com>
9443
9444 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
9445 conversion and type of expression has invariant, apply invariant
9446 check on expression.
9447
94482015-01-07 Ed Schonberg <schonberg@adacore.com>
9449
9450 * sem_ch3.adb (Create_Constrained_Components): A call to
9451 Gather_Components may detect an error if an inherited discriminant
9452 that controls a variant is non-static.
9453 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
9454 Gather_Components may report an error if an inherited discriminant
9455 in a variant in non-static.
9456 * sem_util.adb (Gather_Components): If a non-static discriminant
9457 is inherited do not report error here, but let caller handle it.
9458 (Find_Actual): Small optimization.
9459
94602015-01-07 Bob Duff <duff@adacore.com>
9461
9462 * usage.adb (Usage): Document -gnatw.f switch.
9463
94642015-01-07 Ed Schonberg <schonberg@adacore.com>
9465
9466 * sem_ch12.adb: Code clean up and minor reformatting.
9467
94682015-01-07 Robert Dewar <dewar@adacore.com>
9469
9470 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
9471 Raise_Accessibility_Error call.
9472 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
9473 on handling of invalid digits in based constants.
9474 * s-fatgen.ads: Minor reformatting.
9475 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
9476 Avoid noting bogus modification for Valid test.
9477 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
9478 * einfo.ads: Minor reformatting.
9479 * sem_warn.adb: Minor comment clarification.
9480 * sem_ch12.adb: Minor reformatting.
9481
94822015-01-07 Ed Schonberg <schonberg@adacore.com>
9483
9484 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
9485 over static predicates when the loop parameter specification
9486 carries a Reverse indicator.
9487
94882015-01-07 Ed Schonberg <schonberg@adacore.com>
9489
9490 * sem_ch12.adb (Instantiate_Object): If formal has a default,
9491 actual is missing and formal has an anonymous access type, copy
9492 access definition in full so that tree for instance is properly
9493 formatted for ASIS use.
9494
94952015-01-07 Bob Duff <duff@adacore.com>
9496
9497 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
9498 for P'Access, where P is a subprogram in the same package as
9499 the P'Access, and the P'Access is evaluated at elaboration
9500 time, and occurs before the body of P. For example, "X : T :=
9501 P'Access;" would allow a subsequent call to X.all to be an
9502 access-before-elaboration error; hence the warning. This warning
9503 is enabled by the -gnatw.f switch.
9504 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
9505 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
9506 * gnat_ugn.texi: Document the new warning.
9507
95082015-01-07 Johannes Kanig <kanig@adacore.com>
9509
9510 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
9511 cross ref files.
9512
95132015-01-07 Robert Dewar <dewar@adacore.com>
9514
9515 * s-taprop-linux.adb, clean.adb: Minor reformatting.
9516
95172015-01-07 Arnaud Charlet <charlet@adacore.com>
9518
9519 * s-tassta.adb: Relax some overzealous assertions.
9520
95212015-01-07 Ed Schonberg <schonberg@adacore.com>
9522
9523 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
9524 view of a type is legal when context is a thunk generated for
9525 operation inherited from an interface.
9526 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
9527 a thunk and return type is an incomplete type do not continue
9528 expansion; thunk will be fully elaborated when generating code.
9529
95302015-01-07 Doug Rupp <rupp@adacore.com>
9531
9532 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
9533 (QueryPerformanceFrequency): New imported procedure.
9534 * s-taprop-mingw.adb (RT_Resolution): Call above and return
9535 resolution vice a hardcoded value.
9536 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
9537 resolution vice a hardcoded value.
9538 * s-linux-android.ads (clockid_t): New subtype.
9539 * s-osinte-aix.ads (clock_getres): New imported subprogram.
9540 * s-osinte-android.ads (clock_getres): Likewise.
9541 * s-osinte-freebsd.ads (clock_getres): Likewise.
9542 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
9543 * s-osinte-darwin.ads (clock_getres): New subprogram.
9544 * s-osinte-darwin.adb (clock_getres): New subprogram.
9545 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
9546 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
9547 calculate resolution vice hard coded value.
9548
95492015-01-07 Ed Schonberg <schonberg@adacore.com>
9550
9551 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
9552 limited view, use non-limited view when available to create
9553 equivalent record type.
9554
95552015-01-07 Vincent Celier <celier@adacore.com>
9556
9557 * gnatcmd.adb: Remove command Sync and any data and processing
9558 related to this command. Remove project processing for gnatstack.
9559 * prj-attr.adb: Remove package Synchonize and its attributes.
9560
95612015-01-07 Vincent Celier <celier@adacore.com>
9562
9563 * clean.adb: Minor error message change.
9564
95652015-01-07 Tristan Gingold <gingold@adacore.com>
9566
9567 PR ada/64349
9568 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
9569
95702015-01-07 Javier Miranda <miranda@adacore.com>
9571
9572 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
9573 protect the frontend against never ending recursion caused by
9574 circularities in the sources.
9575
95762015-01-07 Robert Dewar <dewar@adacore.com>
9577
9578 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
9579 exp_ch3.adb: Minor reformatting.
9580
95812015-01-07 Doug Rupp <rupp@adacore.com>
9582
9583 * s-linux.ads (clockid_t): New subtype.
9584 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
9585 (clockid_t): New subtype.
9586 (clock_getres): Import system call.
9587 * s-taprop-linux.adb (System.OS_Constants): With and rename.
9588 (RT_Resolution): Remove
9589 hardcoded value and call clock_getres.
9590 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
9591 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
9592
95932015-01-07 Robert Dewar <dewar@adacore.com>
9594
9595 * sem_warn.adb (Check_One_Unit): Guard against context item
9596 with no Entity field.
9597
95982015-01-07 Vincent Celier <celier@adacore.com>
9599
9600 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
9601 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
9602
96032015-01-07 Vincent Celier <celier@adacore.com>
9604
9605 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
9606 errors/warnings in the first parsing of the project files,
9607 to display the warnings when there is no errors.
9608
96092015-01-07 Tristan Gingold <gingold@adacore.com>
9610
9611 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
9612
96132015-01-07 Doug Rupp <rupp@adacore.com>
9614
9615 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
9616 value from Int_Lock as parameter to Int_Unlock.
9617 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
9618 * s-vxwext.ads (Int_Unlock): Likewise.
9619 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
9620 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
9621 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
9622 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
9623
96242015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
9625
9626 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
9627 keep ___XP suffixes
9628
96292015-01-07 Tristan Gingold <gingold@adacore.com>
9630
9631 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
9632 handle overlap.
9633
96342015-01-07 Eric Botcazou <ebotcazou@adacore.com>
9635
9636 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
9637 automatically set No_Strict_Aliasing on access types.
9638 * fe.h (No_Strict_Aliasing_CP): Declare.
9639 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
9640 No_Strict_Aliasing_CP is set.
9641
96422015-01-07 Johannes Kanig <kanig@adacore.com>
9643
9644 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
9645 not build function wrapper in gnatprove mode when the package
9646 is externally axiomatized.
9647
96482015-01-07 Jose Ruiz <ruiz@adacore.com>
9649
9650 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
9651 intermediate computations when the parameters have different signs.
9652
96532015-01-07 Javier Miranda <miranda@adacore.com>
9654
9655 * exp_ch3.adb (Build_Init_Procedure): For derived types,
9656 improve the code which takes care of identifying and moving to
9657 the beginning of the init-proc the call to the init-proc of the
9658 parent type.
9659
96602015-01-07 Olivier Hainque <hainque@adacore.com>
9661
9662 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
9663 Elaborate the expression as part of the same stmt group as the actions.
9664
96652015-01-07 Robert Dewar <dewar@adacore.com>
9666
9667 * sem_ch3.adb: Minor error message change.
9668
96692015-01-07 Ed Schonberg <schonberg@adacore.com>
9670
9671 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
9672 Following AI05-028, the pragam applies legally to any composite type.
9673
96742015-01-07 Arnaud Charlet <charlet@adacore.com>
9675
9676 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
9677 (sigwait, sigwaitinfo): Removed, not needed after all on any
9678 VxWorks configurations.
9679
96802015-01-07 Robert Dewar <dewar@adacore.com>
9681
9682 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
9683
96842015-01-07 Javier Miranda <miranda@adacore.com>
9685
9686 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
9687 generation of accessibility check.
9688
96892015-01-07 Ed Schonberg <schonberg@adacore.com>
9690
9691 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
9692 illegal completion from a class- wide type, set etype of the
9693 derived type properly to prevent cascaded errors.
9694
96952015-01-07 Robert Dewar <dewar@adacore.com>
9696
9697 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
9698 reformatting.
9699
97002015-01-07 Robert Dewar <dewar@adacore.com>
9701
9702 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
9703 New procedure.
9704 (OK_No_Use_Of_Entity_Name): New function.
9705 (Set_Restriction_No_Use_Of_Entity): New procedure.
9706 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
9707 New procedure.
9708 (OK_No_Use_Of_Entity_Name): New function.
9709 (Set_Restriction_No_Use_Of_Entity): New procedure.
9710 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
9711 No_Use_Of_Entity.
9712 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9713 Add processing for new restriction No_Use_Of_Entity.
9714
97152015-01-07 Eric Botcazou <ebotcazou@adacore.com>
9716
9717 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
9718 component type as to Has_Atomic_Components type. Remove useless
9719 test on Is_Aliased component type.
9720
97212015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
9722
9723 * alloc.ads Alphabetize several declarations. Add constants
9724 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
9725 * atree.adb Add with and use clauses for Opt.
9726 (Allocate_Initialize_Node): Mark a node as ignored Ghost
9727 if it is created in an ignored Ghost region.
9728 (Ekind_In): New variant.
9729 (Is_Ignored_Ghost_Node): New routine.
9730 (Set_Is_Ignored_Ghost_Node): New routine.
9731 * atree.adb Aplhabetize several subprograms declarations. Flag
9732 Spare0 is now known as Is_Ignored_Ghost_Node.
9733 (Ekind_In): New variant.
9734 (Is_Ignored_Ghost_Node): New routine.
9735 (Set_Is_Ignored_Ghost_Node): New routine.
9736 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
9737 (Contains_Ignored_Ghost_Code): New routine.
9738 (Set_Contains_Ignored_Ghost_Code): New routine.
9739 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
9740 It is now possible to set this property on an unanalyzed entity.
9741 (Write_Entity_Flags): Output the status of flag
9742 Contains_Ignored_Ghost_Code.
9743 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
9744 usage in nodes.
9745 (Contains_Ignored_Ghost_Code): New routine
9746 along with pragma Inline.
9747 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
9748 * exp_ch3.adb Add with and use clauses for Ghost.
9749 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
9750 Set the Ghost_Mode in effect.
9751 (Restore_Globals): New routine.
9752 * exp_ch7.adb (Process_Declarations): Do not process a context
9753 that invoves an ignored Ghost entity.
9754 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
9755 construct that has been rewritten as a null statement.
9756 * exp_disp.adb Add with and use clauses for Ghost.
9757 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
9758 the Ghost_Mode in effect.
9759 (Restore_Globals): New routine.
9760 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
9761 does not require any clean up. Add two missing cases that deal
9762 with block statements.
9763 * freeze.adb Add with and use clauses for Ghost.
9764 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
9765 Set the Ghost_Mode in effect.
9766 (Restore_Globals): New routine.
9767 * frontend.adb Add with and use clauses for Ghost. Remove any
9768 ignored Ghost code from all units that qualify.
9769 * ghost.adb New unit.
9770 * ghost.ads New unit.
9771 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
9772 the table in package Ghost.
9773 * lib.ads: Alphabetize several subprogram declarations.
9774 * lib-xref.adb (Output_References): Do not generate reference
9775 information for ignored Ghost entities.
9776 * opt.ads Add new type Ghost_Mode_Type and new global variable
9777 Ghost_Mode.
9778 * rtsfind.adb (Load_RTU): Provide a clean environment when
9779 loading a runtime unit.
9780 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
9781 entry/exit as the node may set a different mode.
9782 (Do_Analyze):
9783 Capture/restore the value of Ghost_Mode on entry/exit as the
9784 unit may be withed from a unit with a different Ghost mode.
9785 * sem_ch3.adb Add with and use clauses for Ghost.
9786 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
9787 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
9788 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
9789 the entity as Ghost when there is a Ghost_Mode in effect.
9790 (Array_Type_Declaration): The implicit base type inherits the
9791 "ghostness" from the array type.
9792 (Derive_Subprogram): The
9793 alias inherits the "ghostness" from the parent subprogram.
9794 (Make_Implicit_Base): The implicit base type inherits the
9795 "ghostness" from the parent type.
9796 * sem_ch5.adb Add with and use clauses for Ghost.
9797 (Analyze_Assignment): Set the Ghost_Mode in effect.
9798 * sem_ch6.adb Add with and use clauses for Ghost.
9799 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
9800 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
9801 Set the Ghost_Mode in effect. Mark the entity as Ghost when
9802 there is a Ghost_Mode in effect.
9803 * sem_ch7.adb Add with and use clauses for Ghost.
9804 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
9805 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
9806 effect. Mark the entity as Ghost when there is a Ghost_Mode
9807 in effect.
9808 * sem_ch8.adb Add with and use clauses for Ghost.
9809 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9810 Analyze_Object_Renaming, Analyze_Package_Renaming,
9811 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
9812 the entity as Ghost when there is a Ghost_Mode in effect.
9813 (Find_Type): Check the Ghost context of a type.
9814 * sem_ch11.adb Add with and use clauses for Ghost.
9815 (Analyze_Exception_Declaration): Set the Ghost_Mode in
9816 effect. Mark the entity as Ghost when there is a Ghost_Mode
9817 in effect.
9818 * sem_ch12.adb Add with and use clauses for Ghost.
9819 (Analyze_Generic_Package_Declaration,
9820 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
9821 Mark the entity as Ghost when there is a Ghost_Mode in effect.
9822 * sem_prag.adb Add with and use clauses for Ghost.
9823 (Analyze_Pragma): Ghost-related checks are triggered when there
9824 is a Ghost mode in effect.
9825 (Create_Abstract_State): Mark the
9826 entity as Ghost when there is a Ghost_Mode in effect.
9827 * sem_res.adb Add with and use clauses for Ghost.
9828 (Check_Ghost_Context): Removed.
9829 * sem_util.adb (Check_Ghost_Completion): Removed.
9830 (Check_Ghost_Derivation): Removed.
9831 (Incomplete_Or_Partial_View):
9832 Add a guard in case the entity has not been analyzed yet
9833 and does carry a scope.
9834 (Is_Declaration): New routine.
9835 (Is_Ghost_Entity): Removed.
9836 (Is_Ghost_Statement_Or_Pragma):
9837 Removed.
9838 (Is_Subject_To_Ghost): Removed.
9839 (Set_Is_Ghost_Entity):
9840 Removed.
9841 (Within_Ghost_Scope): Removed.
9842 * sem_util.adb (Check_Ghost_Completion): Removed.
9843 (Check_Ghost_Derivation): Removed.
9844 (Is_Declaration): New routine.
9845 (Is_Ghost_Entity): Removed.
9846 (Is_Ghost_Statement_Or_Pragma): Removed.
9847 (Is_Subject_To_Ghost): Removed.
9848 (Set_Is_Ghost_Entity): Removed.
9849 (Within_Ghost_Scope): Removed.
9850 * sinfo.ads Add a section on Ghost mode.
9851 * treepr.adb (Print_Header_Flag): New routine.
9852 (Print_Node_Header): Factor out code. Output flag
9853 Is_Ignored_Ghost_Node.
9854 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
9855
98562015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9857
9858 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
9859 true test and unreachable 'else' arm.
9860
98612015-01-06 Vincent Celier <celier@adacore.com>
9862
9863 * prj-conf.adb (Check_Target): Improve error message when
9864 there are mismatched targets between the on in the configuration
9865 project file and the specified one, either in the main project
9866 file or in the --target= switch.
9867
98682015-01-06 Pascal Obry <obry@adacore.com>
9869
9870 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
9871 Install_Name attribute definitions.
9872
98732015-01-06 Ed Schonberg <schonberg@adacore.com>
9874
9875 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
9876 generated Import pragma for the internal imported procedure does
9877 not come from an aspect, so that Is_Imported can be properly
9878 set for it.
9879
98802015-01-06 Gary Dismukes <dismukes@adacore.com>
9881
9882 * sem_ch12.adb (Might_Inline_Subp): Record whether
9883 any subprograms in the generic package are marked with
9884 pragma Inline_Always (setting flag Has_Inline_Always).
9885 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
9886 alongside existing test of Front_End_Inlining as alternative
9887 conditions for setting Inline_Now. Also add test of
9888 Has_Inline_Always along with Front_End_Inlining test as an
9889 alternative condition for setting Needs_Body to False.
9890
98912015-01-06 Tristan Gingold <gingold@adacore.com>
9892
9893 * i-cpoint.adb (Copy_Array): Handle overlap.
9894
98952015-01-06 Pascal Obry <obry@adacore.com>
9896
9897 * bindgen.adb: Minor style fix.
9898
98992015-01-06 Robert Dewar <dewar@adacore.com>
9900
9901 * sem_util.ads, sem_util.adb: Minor reformatting.
9902
99032015-01-06 Vincent Celier <celier@adacore.com>
9904
9905 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
9906 with flags before parsing the projects.
9907 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
9908 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
9909 to True in the flags, when Ignore_Missing_With is True and an
9910 imported project cannot be found.
9911 * prj-proc.adb (Expression): When there are incomplete withs and
9912 a variable or attribute is not found, set the variable/attribute
9913 to unknown.
9914 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
9915 defaulted to False.
9916
99172015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
9918
9919 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
9920 prj-err.adb: Add new switch --no-command-line.
9921
99222015-01-06 Ed Schonberg <schonberg@adacore.com>
9923
9924 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
9925
99262015-01-06 Robert Dewar <dewar@adacore.com>
9927
9928 * sem_ch11.adb: Minor reformatting.
9929
99302015-01-06 Ed Schonberg <schonberg@adacore.com>
9931
9932 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
9933 Build_Array_Aggr_Code, used to initialized components covered
9934 by a box association. If the component type is scalar and has
9935 a default aspect, use it to initialize such components.
9936
99372015-01-06 Pascal Obry <obry@adacore.com>
9938
9939 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
9940 control the setup of the exception handler.
9941 * initialize.c: Remove unused declaration.
9942 * bindgen.adb: Always call __gnat_runtime_initialize and pass
9943 whether the exeception handler must be set or not.
9944
99452015-01-06 Thomas Quinot <quinot@adacore.com>
9946
9947 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
9948 order to native from default, make sure to also adjust bit order.
9949 * exp_aggr.adb: Minor reformatting.
9950
99512015-01-06 Robert Dewar <dewar@adacore.com>
9952
9953 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
9954 s-valrea.adb, s-valrea.ads: Add some additional guards for
9955 Str'Last = Positive'Last.
9956
99572015-01-06 Ed Schonberg <schonberg@adacore.com>
9958
9959 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
9960 subprograms.
9961
99622015-01-06 Javier Miranda <miranda@adacore.com>
9963
9964 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
9965
99662015-01-06 Thomas Quinot <quinot@adacore.com>
9967
9968 * sem_util.ads: Minor reformatting.
9969 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
9970 (In_RCI_Declaration) Return to old name, as proper checking of
9971 entity being in the visible part depends on entity kind and must
9972 be done by the caller.
9973
99742015-01-06 Ed Schonberg <schonberg@adacore.com>
9975
9976 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
9977 for operators in SPARK.
9978
99792015-01-06 Ed Schonberg <schonberg@adacore.com>
9980
9981 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
9982 expression in an others association before making copies for
9983 separate resolution and accessibility checks. This ensures that
9984 the type of the expression is available to ASIS in all cases,
9985 in particular if the expression is itself an aggregate.
9986
99872015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9988
9989 * einfo.ads (Has_Independent_Components): Document extended
9990 usage.
9991 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
9992 (Set_Has_Independent_Components): Adjust assertion.
9993 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
9994 for pragma Atomic_Components. Set Has_Independent_Components
9995 on the object instead of the type for an object declaration with
9996 pragma Independent_Components.
9997
99982015-01-06 Olivier Hainque <hainque@adacore.com>
9999
10000 * set_targ.adb (Read_Target_Dependent_Values): Set
10001 Long_Double_Index when "long double" is read.
10002 (elaboration code): Register_Back_End_Types only when not reading from
10003 config files. Doing otherwise is pointless and error prone.
10004
100052015-01-06 Robert Dewar <dewar@adacore.com>
10006
10007 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
10008
100092015-01-06 Robert Dewar <dewar@adacore.com>
10010
10011 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
10012 Str'Last = Positive'Last.
10013
100142015-01-06 Ed Schonberg <schonberg@adacore.com>
10015
10016 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
10017 where the non-limited type is a generic actual and appears as
10018 a subtype of the non-limited view of the other.
10019 * freeze.adb (Build_Renamed_Body): If the return type of the
10020 declaration that is being completed is a limited view and the
10021 non-limited view is available, use it in the specification of
10022 the generated body.
10023
100242015-01-06 Ed Schonberg <schonberg@adacore.com>
10025
10026 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
10027 incomplete view, the type of the classwide type common to both
10028 views is the type being declared.
10029
100302015-01-06 Eric Botcazou <ebotcazou@adacore.com>
10031
10032 * einfo.ads (Is_Independent): Further document extended usage.
10033
100342015-01-06 Eric Botcazou <ebotcazou@adacore.com>
10035
10036 * einfo.ads (Is_Independent): Document extended usage.
10037 * einfo.adb (Is_Independent): Remove obsolete assertion.
10038 (Set_Is_Independent): Likewise.
10039 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
10040 (Process_Atomic_Independent_Shared_Volatile): ...this.
10041 Deal with pragma Independent here.
10042 (Analyze_Pragma): Adjust
10043 to above renaming and also invoke it for pragma Independent.
10044 Adjust comment for Independent_Components.
10045
100462015-01-06 Robert Dewar <dewar@adacore.com>
10047
10048 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
10049 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
10050
100512015-01-06 Robert Dewar <dewar@adacore.com>
10052
10053 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
10054 = Positive'Last.
10055 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
10056 Str'Last = Positive'Last.
10057
100582015-01-06 Robert Dewar <dewar@adacore.com>
10059
10060 * sem_prag.adb (Process_Inline): Remove redundant construct
10061 warning (-gnatw.r) for an ineffective pragma Inline.
10062
100632015-01-06 Robert Dewar <dewar@adacore.com>
10064
10065 * s-valint.adb: Fix typo in last checkin.
10066 * s-valuns.adb (Value_Unsigned): More efficient fix for
10067 Positive'Last case.
10068 * sem_attr.adb (Analyze_Attribute): Minor reformatting
10069 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
10070
100712015-01-06 Robert Dewar <dewar@adacore.com>
10072
10073 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
10074 Str'Last = Positive'Last
10075
100762015-01-06 Thomas Quinot <quinot@adacore.com>
10077
10078 * xoscons.adb: Display exception information and return non-zero
10079 exit status in top level exception handler.
10080
100812015-01-06 Ed Schonberg <schonberg@adacore.com>
10082
10083 * sem_ch8.adb: Code clean up.
10084
100852015-01-06 Tristan Gingold <gingold@adacore.com>
10086
10087 * targparm.ads: Remove obsolete comment.
10088
100892015-01-06 Olivier Hainque <hainque@adacore.com>
10090
10091 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
10092 constructing a ref to variable, update inner_const_flag from the
10093 variable TREE_READONLY attribute.
10094 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
10095 definition.
10096 (get_target_float_size): Remove.
10097 (get_target_double_size): Remove.
10098 (get_target_long_double_size): Remove.
10099
101002015-01-06 Pascal Obry <obry@adacore.com>
10101
10102 * adaint.c (ProcListEvt): Set to NULL.
10103 * rtinit.c: New file.
10104 (__gnat_rt_init_count): New reference counter set to 0.
10105 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
10106 this code is actually needed for the runtime initialization. This
10107 routine returns immediately if the initialization has already been done.
10108 * final.c: Revert previous change.
10109 * rtfinal.c: New file.
10110 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
10111 section and event. The default version of this routine is empty (except
10112 for the reference counting code). This routine returns immediately if
10113 some others libraries are referencing the runtime.
10114 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
10115 remove circuitry to initialize the signal handler as this is
10116 now done by the runtime initialization routine.
10117 (Gen_Adafinal): Generate call to Runtime_Finalize.
10118 * gnat_ugn.texi: Update documentation about concurrency and
10119 initialization/finalization of the run-time.
10120 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
10121 references to rtfinal.o and rtinit.o
10122
101232015-01-06 Robert Dewar <dewar@adacore.com>
10124
10125 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
10126 for Enum_Image.
10127 * sem_attr.adb: Implement Enum_Image attribute.
10128 * snames.ads-tmpl: Add entries for Enum_Image attribute.
10129
101302015-01-06 Robert Dewar <dewar@adacore.com>
10131
10132 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
10133 * restrict.ads (No_Use_Of_Entity): New table.
10134 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
10135 Ignore No_Use_Of_Entity (will be processed in parser).
10136 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
10137
101382015-01-06 Vincent Celier <celier@adacore.com>
10139
10140 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
10141 to check for an extended project, if a project does not have
10142 yet a project declaration.
10143
101442015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
10145
10146 * scos.ads: Update documentation about the SCO table build
10147 process and about table records format.
10148 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
10149 (SCO_Record_Filtered): New procedure.
10150 (Set_SCO_Logical_Operator): New procedure.
10151 (dsco): Update documentation.
10152 * par_sco.adb: Update library-level comments.
10153 (SCO_Generation_State_Type): New type.
10154 (SCO_Generation_State): New variable.
10155 (SCO_Raw_Table): New package instanciation.
10156 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
10157 ("<"): New.
10158 (Tristate): New type.
10159 (Is_Logical_Operator): Return Tristate and update documentation.
10160 (Has_Decision): Update call to Is_Logical_Operator and complete
10161 documentation.
10162 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
10163 comment, add an assertion for state checking and change
10164 references to SCO_Table into SCO_Raw_Table.
10165 (dsco): Refactor to dump the raw and the filtered tables.
10166 (Process_Decisions.Output_Decision_Operand): Handle putative
10167 short-circuit operators.
10168 (Process_Decisions.Output_Element): Update references
10169 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
10170 (Process_Decisions.Process_Decision_Operand): Update call
10171 to Is_Logical_Operator.
10172 (Process_Decisions.Process_Node): Handle putative short-circuit
10173 operators and change references to
10174 SCO_Table into SCO_Raw_Table.
10175 (SCO_Output): Add an assertion
10176 for state checking and remove code that used to stamp out SCO entries.
10177 (SCO_Pragma_Disabled): Change reference to SCO_Table
10178 into SCO_Raw_Table.
10179 (SCO_Record): Rename to SCO_Record_Raw,
10180 add an assertion for state checking and change references
10181 to SCO_Table into SCO_Raw_Table.
10182 (Set_SCO_Condition): Add an assertion for state checking, update
10183 references to Condition_Pragma_Hash_Table and change references to
10184 SCO_Table into SCO_Raw_Table.
10185 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
10186 change references to SCO_Table into SCO_Raw_Table.
10187 (Set_SCO_Logical_Operator): New procedure.
10188 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
10189 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
10190 (SCO_Record_Fildered): New procedure.
10191 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
10192 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
10193 output SCOs.
10194 * par-load.adb (Load): Update reference to SCO_Record.
10195 * par.adb (Par): Update reference to SCO_Record.
10196 * put_scos.adb (Put_SCOs): Add an assertion to check that no
10197 putative SCO condition reaches this end.
10198 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
10199 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
10200 when corresponding to an "and"/"or" operator affected by the
10201 Short_Circuit_And_Or pragma.
10202
102032015-01-06 Robert Dewar <dewar@adacore.com>
10204
10205 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
10206 msg for attempted USE of generic subprogram or subprogram.
10207
102082015-01-06 Robert Dewar <dewar@adacore.com>
10209
10210 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
10211 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
10212 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
10213
102142015-01-06 Ed Schonberg <schonberg@adacore.com>
10215
10216 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
10217 that specify stream subprograms, if the prefix is a class-wide
10218 type then the generated attribute definition clause must apply
10219 to the same class-wide type.
10220 (Default_Iterator): An iterator defined by an aspect of some
10221 container type T must have a first parameter of type T, T'class,
10222 or an access to such (from code reading RM 5.5.1 (2/3)).
10223
102242015-01-06 Arnaud Charlet <charlet@adacore.com>
10225
10226 * gnat1drv.adb: Minor: complete previous change.
10227
102282015-01-06 Olivier Hainque <hainque@adacore.com>
10229
10230 * set_targ.ads (C_Type_For): New function. Return the name of
10231 a C type supported by the back-end and suitable as a basis to
10232 construct the standard Ada floating point type identified by
10233 the T parameter. This is used as a common ground to feed both
10234 ttypes values and the GNAT tree nodes for the standard floating
10235 point types.
10236 * set_targ.adb (Long_Double_Index): The index at which "long
10237 double" gets registered in the FPT_Mode_Table. This is useful to
10238 know whether we have a "long double" available at all and get at
10239 it's characteristics without having to search the FPT_Mode_Table
10240 when we need to decide which C type should be used as the
10241 basis for Long_Long_Float in Ada.
10242 (Register_Float_Type): Fill Long_Double_Index.
10243 (FPT_Mode_Index_For): New function. Return the index in
10244 FPT_Mode_Table that designates the entry corresponding to the
10245 provided C type name.
10246 (FPT_Mode_Index_For): New function. Return the index in
10247 FPT_Mode_Table that designates the entry for a back-end type
10248 suitable as a basis to construct the standard Ada floating point
10249 type identified by the input T parameter.
10250 (elaboration code): Register_Back_End_Types unconditionally,
10251 so C_Type_For can operate regardless of -gnateT. Do it
10252 early so we can query it for the floating point sizes, via
10253 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
10254 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
10255 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
10256 which C type should be used as the basis for the construction
10257 of the Standard Ada floating point types.
10258 * get_targ.ads (Get_Float_Size, Get_Double_Size,
10259 Get_Long_Double_Size): Remove.
10260 * get_targ.adb: Likewise.
10261
102622015-01-06 Thomas Quinot <quinot@adacore.com>
10263
10264 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
10265 parameter and rename to...
10266 (In_RCI_Visible_Declarations): Fix handling of private part of nested
10267 package.
10268 (Validate_RCI_Subprogram_Declaration): Reject illegal function
10269 returning anonymous access in RCI unit.
10270
102712015-01-06 Ed Schonberg <schonberg@adacore.com>
10272
10273 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
10274 function wrapper may be a homonym of another local declaration.
10275 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
10276 build function and operator wrappers after the actual subprogram
10277 has been resolved, and replace the standard renaming declaration
10278 with the declaration of wrapper.
10279 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
10280 make public for use elsewhere.
10281 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
10282 rewrite, now that actual is fully resolved when wrapper is
10283 constructed.
10284
102852015-01-06 Javier Miranda <miranda@adacore.com>
10286
10287 * exp_disp.adb: Revert previous change.
10288
102892015-01-06 Robert Dewar <dewar@adacore.com>
10290
10291 * exp_util.adb: Change name Name_Table_Boolean to
10292 Name_Table_Boolean1.
10293 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
10294 Introduce Name_Table_Boolean2/3.
10295 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
10296 Introduce Name_Table_Boolean2/3.
10297 * par-ch13.adb: Change name Name_Table_Boolean to
10298 Name_Table_Boolean1.
10299
103002015-01-06 Bob Duff <duff@adacore.com>
10301
10302 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
10303
103042015-01-06 Ed Schonberg <schonberg@adacore.com>
10305
10306 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
10307 others choice that covers multiple components, analyze each
10308 copy with the type of the component even in compile-only mode,
10309 to detect potential accessibility errors.
10310
103112015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10312
10313 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
10314 (Resolve_Actuals): An effectively volatile out
10315 parameter cannot act as an in or in out actual in a call.
10316 (Resolve_Entity_Name): An effectively volatile out parameter
10317 cannot be read.
10318
103192015-01-06 Ed Schonberg <schonberg@adacore.com>
10320
10321 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
10322 the expansion of an expression function it may be pre-analyzed
10323 if a 'access attribute is applied to the function, in which case
10324 last_entity may have been assigned already.
10325
103262015-01-06 Ed Schonberg <schonberg@adacore.com>
10327
10328 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
10329 type and actual has the corresponding full view, there is no
10330 error, but a case of use of incomplete type in a predicate or
10331 invariant expression.
10332
103332015-01-06 Vincent Celier <celier@adacore.com>
10334
10335 * makeutl.adb (Insert_No_Roots): Make sure that the same source
10336 in two different project tree is checked in both trees, if they
10337 are sources of two different projects, extended or not.
10338
103392015-01-06 Arnaud Charlet <charlet@adacore.com>
10340
10341 * gnat1drv.adb: Minor code clean up.
10342 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
10343
103442015-01-06 Bob Duff <duff@adacore.com>
10345
10346 * osint.adb (Read_Source_File): Don't print out
10347 file name unless T = Source.
10348
103492015-01-06 Ed Schonberg <schonberg@adacore.com>
10350
10351 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
10352 recognize improper uses of constant_reference types as actuals
10353 for in-out parameters.
10354 (Check_Function_Call): Do not collect identifiers if function
10355 name is missing because of previous error.
10356
103572015-01-06 Robert Dewar <dewar@adacore.com>
10358
10359 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
10360 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
10361 Minor change of name Name_Table_Info => Name_Table_Int.
10362
103632015-01-06 Robert Dewar <dewar@adacore.com>
10364
10365 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
10366 in previous checkin.
10367 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
10368 of bounds.
10369 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
10370
103712015-01-06 Vincent Celier <celier@adacore.com>
10372
10373 * a-strsup.adb (Times (Natural;String;Positive)): Raise
10374 Length_Error, not Index_Error, when the result is too long.
10375
103762015-01-06 Thomas Quinot <quinot@adacore.com>
10377
10378 * a-direct.adb (Create_Path): Minor error handling and
10379 performance improvement.
10380
103812015-01-06 Robert Dewar <dewar@adacore.com>
10382
10383 * checks.ads, sem_ch12.adb: Minor reformatting.
10384 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
10385 zero check for fixed-point case if Backend_Divide_Checks_On_Target
10386 is False.
10387
103882015-01-06 Robert Dewar <dewar@adacore.com>
10389
10390 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
10391 Do not set restriction No_Elaboration_Code unless the pragma
10392 appears in the main unit).
10393
103942015-01-06 Ed Schonberg <schonberg@adacore.com>
10395
10396 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
10397 that with clause has already been analyzed before checking kind
10398 of with_clause.
10399
104002015-01-06 Robert Dewar <dewar@adacore.com>
10401
10402 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
10403 (as required by RM).
10404
104052015-01-06 Arnaud Charlet <charlet@adacore.com>
10406
10407 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
10408
104092015-01-06 Robert Dewar <dewar@adacore.com>
10410
10411 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
10412 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
10413
104142015-01-06 Javier Miranda <miranda@adacore.com>
10415
10416 * exp_disp.adb (Expand_Interface_Conversion): No displacement
10417 of the pointer to the object needed when the type of the operand
10418 is not an interface type and the interface is one of its parent
10419 types (since they share the primary dispatch table).
10420
104212015-01-06 Vincent Celier <celier@adacore.com>
10422
10423 * prj-env.adb: Minor comment update.
10424
104252015-01-06 Javier Miranda <miranda@adacore.com>
10426
10427 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
10428 access types whose target type is an interface type to operands
10429 that are access types; required to report an error when the
10430 operand is not an access type.
10431
104322015-01-06 Bob Duff <duff@adacore.com>
10433
10434 * a-cfinve.adb (Copy): Set the discriminant to the Length when
10435 Capacity = 0.
10436 * a-cofove.ads (Capacity): Add a postcondition.
10437 * a-cfinve.ads (Capacity): Add a postcondition.
10438 (Reserve_Capacity): Correct the postcondition in the case where
10439 Capacity = 0; that means "Capacity => Length (Container)".
10440 * a-cofove.adb (Elems[c]): Add a comment
10441 explaining the dangers and how to avoid them.
10442
104432015-01-06 Ed Schonberg <schonberg@adacore.com>
10444
10445 * sem_ch12.adb: Code clean up.
10446
104472015-01-06 Arnaud Charlet <charlet@adacore.com>
10448
10449 * gnatvsn.ads: Bump copyright year.
10450
104512015-01-06 Robert Dewar <dewar@adacore.com>
10452
10453 * s-taskin.ads, s-traces.ads: Minor reformatting.
10454 * exp_util.adb: Minor typo fix.
10455
104562015-01-06 Vincent Celier <celier@adacore.com>
10457
10458 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
10459 with the runtime name.
10460 * prj-env.adb (Initialize_Default_Project_Path): When both
10461 Target_Name and Runtime_Name are not empty string, add to the
10462 project path the two directories .../lib/gnat and .../share/gpr
10463 related to the runtime.
10464 * prj-env.ads (Initialize_Default_Project_Path): New String
10465 parameter Runtime_Name, defaulted to the empty string.
10466
104672015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10468
10469 * frontend.adb: Guard against the case where a configuration
10470 pragma may be split into multiple pragmas and the original
10471 rewritten as a null statement.
10472 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
10473 pragma using Insert_Before rather than Insert_Action. This
10474 takes care of the configuration pragma case where Insert_Action
10475 would fail.
10476
104772015-01-06 Bob Duff <duff@adacore.com>
10478
10479 * a-coboho.ads (Element_Access): Add "pragma
10480 No_Strict_Aliasing (Element_Access);". This is needed because
10481 we are unchecked-converting from Address to Element_Access.
10482 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
10483 result to be 1.
10484
104852015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10486
10487 * sem_res.adb (Resolve_Actuals): Remove the
10488 restriction which prohibits volatile actual parameters with
10489 enabled external propery Async_Writers to act appear in procedure
10490 calls where the corresponding formal is of mode OUT.
10491
104922015-01-05 Jakub Jelinek <jakub@redhat.com>
10493
10494 * gnat_ugn.texi: Bump @copying's copyright year.
10495
104962015-01-05 Eric Botcazou <ebotcazou@adacore.com>
10497
10498 PR ada/64492
10499 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
10500
105012015-01-04 Uros Bizjak <ubizjak@gmail.com>
10502
10503 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
10504 of unchecked asprintf.
10505
10506\f
10507Copyright (C) 2015 Free Software Foundation, Inc.
10508
10509Copying and distribution of this file, with or without modification,
10510are permitted in any medium without royalty provided the copyright
10511notice and this notice are preserved.