fe.h (Serious_Errors_Detected): New macro.
[gcc.git] / gcc / ada / ChangeLog
1 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
2
3 * fe.h (Serious_Errors_Detected): New macro.
4 * gcc-interface/gigi.h (build_atomic_load): Declare.
5 (build_atomic_store): Likewise.
6 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
7 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
8 Build an atomic load for an In or In Out parameter if needed.
9 Build an atomic store for the assignment of an Out parameter if needed.
10 Build an atomic store to the target if ATOMIC_SYNC is true.
11 (present_in_lhs_or_actual_p): New predicate.
12 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
13 <N_Explicit_Dereference>: Likewise.
14 <N_Indexed_Component>: Likewise.
15 <N_Selected_Component>: Likewise.
16 <N_Assignment_Statement>: Adjust call to call_to_gnu.
17 Build an atomic store to the LHS if needed.
18 <N_Function_Call>: Adjust call to call_to_gnu.
19 * gcc-interface/utils2.c: Include toplev.h.
20 (resolve_atomic_size): New static function.
21 (build_atomic_load): New function.
22 (build_atomic_store): Likewise.
23 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
24
25 2011-11-07 Olivier Hainque <hainque@adacore.com>
26
27 * sigtramp-ppcvxw.c: Add general comments.
28 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
29 rules for r2 to r13, plus CTR and XER.
30 (CFA_REG): New, register number used to hold the local CFA.
31 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
32 Make that 15, not 14, with documentation.
33 (TCR): Undef before definition, preventing conflict with reg number in
34 VxWorks headers.
35
36 2011-11-07 Robert Dewar <dewar@adacore.com>
37
38 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
39 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
40 * gcc-interface/Make-lang.in: Update dependencies.
41
42 2011-11-07 Ed Schonberg <schonberg@adacore.com>
43
44 * exp_ch6.adb: A tagged type is a legal actual for an aliased
45 formal.
46
47 2011-11-07 Pascal Obry <obry@adacore.com>
48
49 * g-socket.adb, g-socket.ads: Minor reformatting.
50
51 2011-11-07 Robert Dewar <dewar@adacore.com>
52
53 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
54
55 2011-11-07 Robert Dewar <dewar@adacore.com>
56
57 * gnat_ugn.texi: Add discussion of default mode handling of
58 source representation with no -gnatW option given, in particular
59 noting that NEL (next line) is not recognized in this context.
60
61 2011-11-07 Yannick Moy <moy@adacore.com>
62
63 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
64 generate a reference for a modification even when the modification
65 does not come from source.
66
67 2011-11-07 Ed Schonberg <schonberg@adacore.com>
68
69 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
70 use the indexing attributes rather than the Element function,
71 to obtain variable references.
72 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
73 Find_Aspect rather than iterating over representation
74 items. Improve error message.
75 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
76 of Reference functions.
77
78 2011-11-07 Yannick Moy <moy@adacore.com>
79
80 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
81 body that has a corresponding parameter on the subprogram
82 declaration, define the unique entity as being the declaration
83 one.
84
85 2011-11-07 Ed Schonberg <schonberg@adacore.com>
86
87 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
88 return type of a function is the class-wide type of an incomplete
89 type T, T can be a Taft-amendment type and does not have to be
90 completed in the current private part.
91
92 2011-11-07 Ed Schonberg <schonberg@adacore.com>
93
94 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
95 that are inherited by default, and apply to the class-wide type
96 as well.
97 * aspects.adb (Find_Aspect): If the entity is class-wide and the
98 aspect is inherited, use the aspect of the specific type.
99
100 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
101
102 * exp_alfa.adb: Remove with and use clause for
103 Exp_Ch8. Add with and use clause for Exp_Util.
104 Remove local constant Disable_Processing_Of_Renamings.
105 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
106 object renamings has been reenabled.
107 (Expand_Possible_Renaming):
108 The expansion of identifier and expanded names has been
109 reenabled. Perform the substitutions only for entities that
110 denote an object.
111 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
112 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
113 (Remove_Side_Effects): Alphabetize local variables. Add a guard
114 to avoid the infinite expansion of an expression in Alfa mode. Add
115 processing for function calls in Alfa mode.
116 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
117
118 2011-11-07 Ed Schonberg <schonberg@adacore.com>
119
120 * freeze.adb (Freeze_Entity): If the entity is an access to
121 subprogram whose designated type is itself a subprogram type,
122 its own return type must be decorated with size information.
123
124 2011-11-04 Arnaud Charlet <charlet@adacore.com>
125
126 * gcc-interface/Make-lang.in: Update dependencies.
127
128 2011-11-04 Robert Dewar <dewar@adacore.com>
129
130 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
131 Avoid junk semicolon after argument of machine code Asm operand.
132
133 2011-11-04 Robert Dewar <dewar@adacore.com>
134
135 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
136 CodePeer mode or if restriction No_Exception_Handlers is present.
137 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
138 nodes in CodePeer mode or if restriction No_Exception_Handlers
139 is present.
140
141 2011-11-04 Robert Dewar <dewar@adacore.com>
142
143 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
144
145 2011-11-04 Ed Schonberg <schonberg@adacore.com>
146
147 * sem_ch6.adb (Analyze_Subprogram_Specification): The
148 specification is legal if it is a function that returns an
149 abstract type, if it comes from an attribute renaming of a stream
150 attribute of an abstract type.
151
152 2011-11-04 Gary Dismukes <dismukes@adacore.com>
153
154 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
155 components, check whether recursively check whether the prefix
156 denotes an unaligned object.
157
158 2011-11-04 Ed Schonberg <schonberg@adacore.com>
159
160 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
161 the pragma is legal if it is an expanded name that denotes a
162 procedure that be can called without parameters.
163
164 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
165
166 * gnat_ugn.texi (Performance Considerations) <Vectorization
167 of loops>: New sub-section. <Other Optimization Switches>:
168 Minor tweak.
169
170 2011-11-04 Robert Dewar <dewar@adacore.com>
171
172 * gnat_rm.texi: Minor reformatting.
173
174 2011-11-04 Matthew Heaney <heaney@adacore.com>
175
176 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
177 when Target and Source denote same non-empty object
178 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
179
180 2011-11-04 Robert Dewar <dewar@adacore.com>
181
182 * exp_attr.adb: Minor reformatting.
183
184 2011-11-04 Ed Schonberg <schonberg@adacore.com>
185
186 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
187 discriminant assignment within an initialization proc if the
188 record is an unchecked union, as it can only come from the
189 initialization of an unchecked union component.
190
191 2011-11-04 Robert Dewar <dewar@adacore.com>
192
193 * gnat_ugn.texi: Minor reformatting.
194
195 2011-11-04 Robert Dewar <dewar@adacore.com>
196
197 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
198 warning message.
199
200 2011-11-04 Robert Dewar <dewar@adacore.com>
201
202 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
203 var Save_Space).
204
205 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
206
207 * exp_alfa.adb: Add local constant
208 Disable_Processing_Of_Renamings;
209 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
210 the name evaluation of object renamings for now.
211 (Expand_Potential_Renaming): Do not perform the substitution
212 for now.
213 * exp_util.adb (Remove_Side_Effects): Remove processing for
214 functions with side effects in Alfa mode.
215
216 2011-11-04 Gary Dismukes <dismukes@adacore.com>
217
218 * bindgen.adb (Gen_Elab_Calls): In the case
219 of the AAMP target, set elaboration entities to 1 rather than
220 incrementing.
221
222 2011-11-04 Ed Schonberg <schonberg@adacore.com>
223
224 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
225 proper entities on the ancestors of a child unit that appear
226 in a limited_with clause, follow the unit links because the
227 units are not analyzed and scope information is incomplete.
228
229 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
230
231 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
232 setting the Atomic_Sync_Required flag to detect one more case.
233 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
234 setting the Atomic_Sync_Required flag to exclude more cases,
235 depending on the parent of the node to be examined.
236
237 2011-11-04 Bob Duff <duff@adacore.com>
238
239 * g-excact.adb: Minor: use named notation.
240
241 2011-11-04 Ed Schonberg <schonberg@adacore.com>
242
243 * sem_ch5.adb: Improve error messages for illegal iterators.
244
245 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
246
247 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
248 Sem_Util.
249 (Expand_Alfa): Alphabetize cases on first choice. Add
250 processing for object renaming declarations, identifiers and
251 expanded names.
252 (Expand_Alfa_N_In): Remove useless return.
253 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
254 (Expand_Potential_Renaming): New routine.
255 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
256 (Expand_N_Object_Declaration): Alphabetize local variables. Move
257 Evaluate_Name out to the top level.
258 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
259 * exp_util.adb (Remove_Side_Effects): Add processing for
260 functions with side effects in Alfa mode.
261
262 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
263
264 * gnat_rm.texi: Add entries for
265 restrictions No_Relative_Delay, No_Requeue_Statements and
266 No_Stream_Optimizations.
267
268 2011-11-04 Ed Schonberg <schonberg@adacore.com>
269
270 * sem_ch4.adb: Set type of entity in prefixed call, for
271 completeness in a generic context.
272
273 2011-11-04 Yannick Moy <moy@adacore.com>
274
275 * sem_prag.adb: Minor refactoring (renaming of a parameter).
276
277 2011-11-04 Robert Dewar <dewar@adacore.com>
278
279 * atree.ads: Minor reformatting.
280
281 2011-11-04 Robert Dewar <dewar@adacore.com>
282
283 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
284 and -gnatd.e here
285 * exp_ch2.adb (Expand_Entity_Reference): Use
286 Activate_Atomic_Synchronization
287 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
288 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
289 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
290 Use Activate_Atomic_Synchronization
291 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
292 procedure.
293 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
294 N_Selected_Component node
295
296 2011-11-04 Robert Dewar <dewar@adacore.com>
297
298 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
299
300 2011-11-04 Yannick Moy <moy@adacore.com>
301
302 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
303 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
304 In ASIS mode, no splitting of aspects between conjuncts.
305 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
306 expressions refer to the original aspect expressions through
307 the Original_Node link. This is used in semantic analysis for
308 ASIS mode, so that the original expression also gets analyzed.
309 * sem_prag.adb (Preanalyze_TC_Args,
310 Check_Precondition_Postcondition,
311 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
312 generated from a source aspect, also analyze the original aspect
313 expression.
314 (Check_Expr_Is_Static_Expression): New procedure
315 similar to existing procedure Check_Arg_Is_Static_Expression,
316 except called on expression inside pragma.
317
318 2011-11-04 Tristan Gingold <gingold@adacore.com>
319
320 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
321 Find_Project.Try_Path_Name.
322 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
323
324 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
325
326 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
327
328 2011-11-04 Pascal Obry <obry@adacore.com>
329
330 * projects.texi: Add short description for qualifiers aggregate
331 and aggregate library.
332
333 2011-11-04 Matthew Heaney <heaney@adacore.com>
334
335 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
336 * a-cgaaso.adb: Replaced implementation with instantiation
337 of Generic_Sort.
338 * a-cogeso.ad[sb] This is the new Ada 2012 unit
339 Ada.Containers.Generic_Sort
340
341 2011-11-04 Robert Dewar <dewar@adacore.com>
342
343 * exp_ch2.adb (Expand_Entity_Reference): Do not set
344 Atomic_Sync_Required for the case of a prefix of an attribute.
345 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
346 atomic synchronization
347 (Expand_N_Indexed_Component): Ditto.
348 (Expand_B_Selected_Component): Ditto.
349 * sem_prag.adb (Process_Suppress_Unsuppress):
350 Disable/Enable_Atomic_Synchronization can now occur for array
351 types with pragma Atomic_Components.
352 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
353 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
354
355 2011-11-04 Gary Dismukes <dismukes@adacore.com>
356
357 * gnat_ugn.texi: Editorial corrections for gnattest section.
358
359 2011-11-04 Robert Dewar <dewar@adacore.com>
360
361 * sem_prag.adb: Minor reformatting.
362 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
363 "***") usage.
364 * exp_ch2.adb (Expand_Entity_Reference): Only set
365 Atomic_Sync_Required on entities that are variables. Doesn't
366 make any sense on anything else.
367
368 2011-11-04 Robert Dewar <dewar@adacore.com>
369
370 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
371 atomic sync to type case.
372 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
373 apply to types.
374
375 2011-11-04 Robert Dewar <dewar@adacore.com>
376
377 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
378 for call vs assign.
379 * gcc-interface/Make-lang.in: Update dependencies.
380
381 2011-11-04 Robert Dewar <dewar@adacore.com>
382
383 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
384 compile time.
385
386 2011-11-04 Matthew Heaney <heaney@adacore.com>
387
388 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
389 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
390 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
391 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
392 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
393 a-sulcin.ad[sb]: New files.
394
395 2011-11-04 Geert Bosch <bosch@adacore.com>
396
397 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
398 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
399 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
400 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
401 * gcc-interface/Makefile.in: Remove libgnala and related objects.
402
403 2011-11-04 Matthew Heaney <heaney@adacore.com>
404
405 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
406 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
407 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
408 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
409 added to package.
410
411 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
412
413 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
414 that the type of the parameters isn't dummy in type_annotate_only mode.
415
416 2011-11-04 Robert Dewar <dewar@adacore.com>
417
418 * sem_ch12.adb: Minor reformatting
419
420 2011-11-04 Gary Dismukes <dismukes@adacore.com>
421
422 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
423 initialize elaboration entities to zero when specs are processed.
424
425 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
426 Eric Botcazou <ebotcazou@adacore.com>
427
428 PR target/50678
429 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
430 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
431
432 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
433
434 PR ada/50842
435 * gcc-interface/Makefile.in (SYMDEPS): Delete.
436 (LIBICONV): New variable.
437 (LIBICONV_DEP): Likewise.
438 (LIBS): Add $(LIBICONV).
439 (LIBDEPS): Add $(LIBICONV_DEP).
440 (EXTRA_GNATTOOLS_OBJS): Merge into...
441 (TOOLS_LIBS): ...this. Add $(LIBICONV).
442
443 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
444
445 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
446 variable. Always create the elaboration variable, if any, as constant.
447
448 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
449
450 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
451 make a packable type for fields of union types as well.
452 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
453 (gnat_to_gnu_component_type): Try to make a packable type for fields
454 of union types as well.
455 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
456 (maybe_pad_type): Try to make a packable type for fields of union types
457 as well.
458 (gnat_to_gnu_field): Likewise.
459 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
460 (set_rm_size): Likewise.
461 (rm_size): Likewise.
462 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
463 * gcc-interface/trans.c (add_decl_expr): Likewise.
464 * gcc-interface/utils.c (finish_record_type): Likewise.
465 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
466
467 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
468
469 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
470 declared as atomic. Move around conditionally executed code.
471
472 2011-10-24 Robert Dewar <dewar@adacore.com>
473
474 * sem.adb (Initialize): Fix bug that blew up if called a second time.
475
476 2011-10-24 Robert Dewar <dewar@adacore.com>
477
478 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
479 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
480
481 2011-10-24 Robert Dewar <dewar@adacore.com>
482
483 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
484 name in error msg.
485
486 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
487
488 * gnat_rm.texi: Add an entry for restriction No_Finalization.
489
490 2011-10-24 Ed Schonberg <schonberg@adacore.com>
491
492 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
493 current instance is within the one that contains the generic,
494 the freeze node for the current one must appear in the current
495 declarative part. Ditto if the current instance is within another
496 package instance. In both of these cases the freeze node of the
497 previous instance is not relevant.
498
499 2011-10-24 Gary Dismukes <dismukes@adacore.com>
500
501 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
502 of AAMP-specific switches -univ and -aamp_target.
503
504 2011-10-24 Robert Dewar <dewar@adacore.com>
505
506 * a-tienau.adb (Put): Deal properly with limited line length.
507
508 2011-10-24 Robert Dewar <dewar@adacore.com>
509
510 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
511
512 2011-10-24 Tristan Gingold <gingold@adacore.com>
513
514 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
515 on AIX.
516
517 2011-10-24 Ed Schonberg <schonberg@adacore.com>
518
519 * sem_ch12.adb (Earlier): make available globally. If both
520 nodes have the same sloc, the freeze node that does not come
521 from source is the later one.
522 (True_Parent): Make available globally.
523 (Previous_Instance): Subsidiary of
524 Insert_Freeze_Node_For_Instance, to check whether the generic
525 parent of the current instance is declared within a previous
526 instance in the same unit or declarative part, in which case the
527 freeze nodes of both instances must appear in order to prevent
528 elaboration problems in gigi.
529 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
530 freeze point, and the freeze node of a preceding instantiation
531 must be inserted before it.
532
533 2011-10-24 Robert Dewar <dewar@adacore.com>
534
535 * checks.ads, checks.adb: Add handling of Synchronization_Check
536 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
537 atomic sync).
538 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
539 flag Minor code reorganization.
540 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
541 * par-prag.adb: Add dummy entries for pragma
542 Disable/Enable_Atomic_Synchronization.
543 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
544 case of Atomic_Synchronization specially (not suppressed
545 by All_Checks, cannot be set from Source).
546 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
547 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
548 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
549 entry for pragma Disable/Enable_Atomic_Synchronization
550 * switch-c.adb: The -gnatp switch does not disable
551 Atomic_Synchronization Add -gnatep switch to disable
552 Atomic_Synchronization.
553 * types.ads: Add entry for Synchronization_Check
554 * usage.adb: Add line for -gnated switch
555 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
556
557 2011-10-24 Geert Bosch <bosch@adacore.com>
558
559 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
560 at Integer'First.
561
562 2011-10-24 Robert Dewar <dewar@adacore.com>
563
564 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
565
566 2011-10-24 Robert Dewar <dewar@adacore.com>
567
568 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
569 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
570
571 2011-10-24 Emmanuel Briot <briot@adacore.com>
572
573 * prj-proc.adb (Process_Expression_Variable_Decl): No special
574 handling for Project_Path unless it is an attribute.
575
576 2011-10-24 Javier Miranda <miranda@adacore.com>
577
578 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
579 (Install_Hidden_Primitives): New subprogram.
580 (Restore_Hidden_Primitives): New subprogram.
581 (Analyze_Formal_Package_Declaration,
582 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
583 Invoke Check_Hidden_Primitives after every call to
584 Analyze_Associations, and invoke Restore_Hidden_Primitives to
585 restore their visibility after processing the instantiation.
586 (Instantiate_Package_Body): Install visible primitives before
587 analyzing the instantiation and uninstall them to restore their
588 visibility when the instantiation has been analyzed.
589 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
590 (Remove_Suffix): New subprogram
591 * sem_ch3.adb (Derive_Subprogram): When handling
592 a derived subprogram for the instantiation of a formal derived
593 tagged type, inherit the dispatching attributes from the actual
594 subprogram (not from the parent type).
595
596 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
597
598 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
599
600 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
601
602 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
603 update its uses.
604 (Build_Discriminant_Assignments): Add local variable D_Loc and update
605 its uses.
606 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
607 Var_Loc and update their uses.
608 (Build_Record_Init_Proc): Code reformatting.
609 (Increment_Counter): Add formal parameter Loc.
610 (Make_Counter): Add formal parameter Loc.
611
612 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
613
614 * sem_disp.adb (Covers_Some_Interface): Fix typo.
615
616 2011-10-24 Matthew Heaney <heaney@adacore.com>
617
618 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
619 of predicate.
620
621 2011-10-24 Yannick Moy <moy@adacore.com>
622
623 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
624 Translate arguments in positional notation into pragma argument
625 association arguments for the generated pragma.
626
627 2011-10-24 Arnaud Charlet <charlet@adacore.com>
628
629 * exp_ch5.adb: Fix minor typo.
630
631 2011-10-24 Ed Schonberg <schonberg@adacore.com>
632
633 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
634 the case of a component reference in an instance body, when the
635 enclosing type is private.
636
637 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
638
639 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
640 driver for getting the project support into gnatelim section.
641
642 2011-10-24 Robert Dewar <dewar@adacore.com>
643
644 * gnat_rm.texi: Minor correction to documentation on address clause.
645
646 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
647
648 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
649 (Attach_Unprotected): New routine.
650 (Delete_Finalize_Address): Removed.
651 (Delete_Finalize_Address_Unprotected): New routine.
652 (Detach): Synchronize and call the unprotected version.
653 (Detach_Unprotected): Remove locking.
654 (Finalize): Add various comment on synchronization. Lock the critical
655 region and call the unprotected versions of routines.
656 (Finalize_Address): Removed.
657 (Finalize_Address_Unprotected): New routine.
658 (Set_Finalize_Address): Synchronize and call
659 the unprotected version.
660 (Set_Finalize_Address_Unprotected): New routine.
661 (Set_Heterogeneous_Finalize_Address): Removed.
662 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
663 (Set_Is_Heterogeneous): Add comment on synchronization and
664 locking.
665 * s-finmas.ads: Flag Finalization_Started is no longer atomic
666 because synchronization uses task locking / unlocking.
667 (Attach): Add comment on usage.
668 (Attach_Unprotected): New routine.
669 (Delete_Finalize_Address): Renamed to
670 Delete_Finalize_Address_Unprotected.
671 (Detach): Add comment on usage.
672 (Detach_Unprotected): New routine.
673 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
674 (Set_Finalize_Address): Add comment on usage.
675 (Set_Finalize_Address_Unprotected): New routine.
676 (Set_Heterogeneous_Finalize_Address): Renamed to
677 Set_Heterogeneous_Finalize_Address_Unprotected.
678 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
679 Allocation_Locked. Add various comments on synchronization. Lock
680 the critical region and call the unprotected version of
681 routines.
682 (Deallocate_Any_Controlled): Add various comments on
683 synchronization. Lock the critical region and call the unprotected
684 version of routines.
685
686 2011-10-24 Ed Schonberg <schonberg@adacore.com>
687
688 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
689 are universal and must carry the corresponding type.
690 * sem_eval.adb (Check_Non_Static_Context): If the type of the
691 expression is universal real, as may be the case for a fixed point
692 expression with constant operands in the context of a conversion,
693 there is nothing to check.
694 * s-finmas.adb: Minor reformatting
695
696 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
697
698 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
699
700 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
701
702 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
703 TRACE): Reintroduce.
704 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
705 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
706
707 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
708
709 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
710 (unchecked_conversion_nop): Use it.
711 (gnat_to_gnu): Likewise.
712
713 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
714
715 * back_end.adb (Call_Back_End): Pass the maximum logical line number
716 instead of the maximum physical line number to gigi.
717 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
718
719 2011-10-16 Tom Tromey <tromey@redhat.com>
720 Dodji Seketeli <dodji@redhat.com>
721
722 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
723 public ordinary map interface.
724
725 2011-10-16 Tristan Gingold <gingold@adacore.com>
726
727 * link.c (_AIX): Add support for GNU ld.
728
729 2011-10-16 Fedor Rybin <frybin@adacore.com>
730
731 * gnat_ugn.texi: Fixing gnattest example names in the doc.
732 Adding explanation to additional tests usage.
733
734 2011-10-16 Robert Dewar <dewar@adacore.com>
735
736 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
737
738 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
739
740 * a-convec.adb: Fix minor inconsistencies.
741
742 2011-10-16 Matthew Heaney <heaney@adacore.com>
743
744 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
745 Implementation): Specify pragma Implementation_Defined.
746
747 2011-10-15 Nicolas Roche <roche@adacore.com>
748
749 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
750 either rtp-smp or ravenscar-cert-rtp runtimes.
751
752 2011-10-15 Bob Duff <duff@adacore.com>
753
754 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
755 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
756 is available.
757 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
758 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
759 available.
760 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
761 pool only if RE_Root_Storage_Pool_Ptr is available.
762 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
763 pool actual unless RE_Root_Storage_Pool_Ptr is available.
764 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
765 formal only if RE_Root_Storage_Pool_Ptr is available.
766
767 2011-10-15 Matthew Heaney <heaney@adacore.com>
768
769 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
770 type): Specify Priority aspect for protected type.
771
772 2011-10-14 Ed Schonberg <schonberg@adacore.com>
773
774 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
775 is a generic actual, it is a subtype of a type that was frozen
776 by the instantiation, and even if not marked frozen it does not
777 affect the construction of the dispatch table.
778
779 2011-10-14 Robert Dewar <dewar@adacore.com>
780
781 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
782 reformatting.
783 * s-rident.ads: Add missing Compiler_Unit pragma.
784
785 2011-10-14 Gary Dismukes <dismukes@adacore.com>
786
787 * sem_res.adb: Minor reformatting.
788
789 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
790
791 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
792 Code and comment reformatting. Use BIP_Task_Master
793 when creating a _master.
794 (BIP_Formal_Suffix): Code reformatting. Correct the case for
795 BIP_Task_Master.
796 (Make_Build_In_Place_Call_In_Object_Declaration): Use
797 BIP_Task_Master when creating a reference to the enclosing
798 function's _master formal.
799 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
800 to the _master.
801 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
802 (Needs_BIP_Finalization_Master): Alphabetized.
803 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
804 BIP_Task_Master.
805
806 2011-10-14 Ed Schonberg <schonberg@adacore.com>
807
808 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
809 reject an aliased keyword on the object declaration of an extended
810 return statement. In older versions of the language indicate
811 that this is illegal in the standard.
812
813 2011-10-14 Pascal Obry <obry@adacore.com>
814
815 * sem_util.adb, sem_ch4.adb: Minor reformatting.
816
817 2011-10-14 Ed Schonberg <schonberg@adacore.com>
818
819 * sem_ch13.adb: Recognize properly procedure calls that are
820 transformed into code statements.
821
822 2011-10-14 Vincent Celier <celier@adacore.com>
823
824 * projects.texi: Minor fix in project example.
825
826 2011-10-14 Ed Schonberg <schonberg@adacore.com>
827
828 * sem_util.adb: Return objects are aliased if their type is
829 immutably limited as per AI05-0053.
830
831 2011-10-14 Gary Dismukes <dismukes@adacore.com>
832
833 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
834 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
835 Short_Circuit_And_Or expansion code (moved to sem_res).
836 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
837 "and" and "or" operators as short-circuit "and then" and "or
838 else", when pragma Short_Circuit_And_Or is active.
839
840 2011-10-13 Robert Dewar <dewar@adacore.com>
841
842 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
843 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
844
845 2011-10-13 Arnaud Charlet <charlet@adacore.com>
846
847 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
848
849 2011-10-13 Jerome Guitton <guitton@adacore.com>
850
851 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
852
853 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
854
855 * a-convec.ads (Cursor): Minor reformatting.
856 * a-convec.adb (Next): Fix minor inconsistencies.
857 (Previous): Likewise.
858
859 2011-10-13 Ed Schonberg <schonberg@adacore.com>
860
861 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
862 New predicate to determine whether some operations on an array
863 type are available when the full view of its component may differ
864 from the view of the point of the array declaration.
865 * sem_ch4.adb (Find_Equality_Types): Use
866 Available_Full_View_Of_Component.
867 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
868
869 2011-10-13 Ed Schonberg <schonberg@adacore.com>
870
871 * sem_ch9.adb: Analyze aspects while discriminants of protected
872 type are visible.
873
874 2011-10-13 Geert Bosch <bosch@adacore.com>
875
876 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
877 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
878 longer depend on an external library.
879 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
880 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
881 Update dependencies.
882 * gcc-interface/Make-lang.in: Update dependencies.
883
884 2011-10-13 Cyrille Comar <comar@adacore.com>
885
886 * gnat_ugn.texi: Minor editing.
887
888 2011-10-13 Vincent Celier <celier@adacore.com>
889
890 * projects.texi: Add documentation on packages and attributes
891 that are inherited from a project being extended into the
892 extended project.
893
894 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
895
896 * exp_ch3.adb (Build_Master): Rewritten.
897 (Expand_N_Full_Type_Declaration): Reformat the declarative
898 region. Update the call to Build_Master_Renaming.
899 (Expand_Previous_Access_Type): Rewritten.
900 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
901 Add local constant Result_Subt and update related usage.
902 (Expand_N_Extended_Return_Statement): Add local constant
903 Result_Subt and update related usage.
904 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
905 new context detection mechanism.
906 (Build_Class_Wide_Master):
907 Use Insert_Action to add the renaming into the tree.
908 (Build_Master_Entity): Rewritten to use the new context detection
909 mechanism.
910 (Build_Master_Renaming): Add formal parameter Ins_Nod
911 and related usage. Use Insert_Action to add the renaming into the
912 tree.
913 (Find_Enclosing_Context): New subsidiary routine. Rather
914 than relying on enclosing scopes, this routine looks at the
915 tree structure to figure out the proper context for a _master
916 or a _chain. This approach eliminates the issues with transient
917 scopes which have not been converted into blocks.
918 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
919 to better reflect the new usage. Update the related comment.
920 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
921 the comment on usage.
922 * sem_ch3.adb (Access_Definition): Update the calls to
923 Build_Master_Entity and Build_Master_Renaming.
924 * sem_ch6.adb (Create_Extra_Formals): Add local variable
925 Full_Subt. Code reformatting.
926 * sem_util.adb (Is_Iterator): Alphabetized.
927 (Is_LHS): Alphabetized.
928 (Is_Limited_Class_Wide_Type): New routine.
929 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
930
931 2011-10-13 Geert Bosch <bosch@adacore.com>
932
933 * a-ngrear.adb (Solve): Make generic and move to
934 System.Generic_Array_Operations.
935 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
936 New generic solvers to compute a vector resp. matrix Y such
937 that A * Y = X, approximately.
938 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
939 Implement using Forward_Eliminate and Back_Substitute
940 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
941 on BLAS and LAPACK.
942 * a-ngcoar.ads ("abs"): Fix return type to be real.
943
944 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
945
946 PR ada/50589
947 * s-linux-alpha.ads: Do not "with" Interfaces.C.
948 * s-linux-sparc.ads: Likewise.
949
950 2011-10-13 Geert Bosch <bosch@adacore.com>
951
952 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
953 returning a Real.
954 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
955 and use formal.
956 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
957 new profile.
958
959 2011-10-13 Geert Bosch <bosch@adacore.com>
960
961 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
962 move to System.Generic_Array_Operations.
963
964 2011-10-13 Geert Bosch <bosch@adacore.com>
965
966 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
967 * s-gearop.ads (L2_Norm): Change profile to be suitable for
968 Complex_Vector
969 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
970 not inner product
971
972 2011-10-13 Robert Dewar <dewar@adacore.com>
973
974 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
975 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
976 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
977 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
978 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
979 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
980
981 2011-10-13 Geert Bosch <bosch@adacore.com>
982
983 * s-gearop.adb: Minor comment additions.
984
985 2011-10-13 Fedor Rybin <frybin@adacore.com>
986
987 * gnat_ugn.texi: Add gnattest section.
988
989 2011-10-13 Ed Schonberg <schonberg@adacore.com>
990
991 * freeze.adb: Do not create body of renaming if declaration has
992 errors.
993
994 2011-10-13 Olivier Hainque <hainque@adacore.com>
995
996 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
997 further, to the ppc+kernel case only.
998
999 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1000
1001 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
1002 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1003 Do not create a pool formal on .NET/JVM.
1004 (Expand_N_Extended_Return_Statement): Alphabetize local
1005 variables. Do not create a renaming of the build-in-place pool
1006 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
1007 Add the user-defined pool only on non-VM targets.
1008 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
1009 local variables. Do not add a pool actual on .NET/JVM.
1010 * sem_ch6.adb: Add with and use clause for Targparm.
1011 (Create_Extra_Formals): Add build-in-place pool formal only on
1012 non-VM targets.
1013 * rtsfind.ads: Alphabetize entries.
1014
1015 2011-10-13 Sergey Rybin <rybin@adacore.com>
1016
1017 * gnat_ugn.texi: Minor correction.
1018
1019 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1020
1021 * sem_ch8.adb: Minor error message improvement.
1022
1023 2011-10-13 Robert Dewar <dewar@adacore.com>
1024
1025 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1026
1027 2011-10-13 Gary Dismukes <dismukes@adacore.com>
1028
1029 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1030 of a for loop for an enumeration type with an enumeration rep
1031 clause, which involves moving the original loop parameter into
1032 a nested block, the loop parameter's entity must be removed from
1033 the entity list of the loop scope.
1034
1035 2011-10-13 Bob Duff <duff@adacore.com>
1036
1037 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
1038 that gets passed in the same cases where BIP_Alloc_Form is passed
1039 (caller-unknown-size results). BIP_Storage_Pool is used when
1040 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
1041 to the user-defined storage pool is passed at the call site,
1042 and this pool is used in callee to allocate the result.
1043 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
1044 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
1045 the additional BIP_Storage_Pool actual.
1046 (Expand_N_Extended_Return_Statement): Allocate the function
1047 result using the user-defined storage pool, if BIP_Alloc_Form =
1048 User_Storage_Pool.
1049 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
1050 * exp_ch4.adb: Don't overwrite storage pool set by
1051 Expand_N_Extended_Return_Statement.
1052 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
1053 for use in build-in-place function calls within allocators
1054 where the access type has a user-defined storage pool.
1055
1056 2011-10-13 Sergey Rybin <rybin@adacore.com>
1057
1058 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
1059 literal casing.
1060
1061 2011-10-13 Nicolas Roche <roche@adacore.com>
1062
1063 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
1064 with 'rtp'.
1065
1066 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1067
1068 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
1069 account that an unchecked union type can be limited.
1070
1071 2011-10-13 Olivier Hainque <hainque@adacore.com>
1072
1073 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
1074 the use of the signal trampoline for PPC in the sjlj case as well.
1075 Add legitimate casts, preventing compile time warnings on the
1076 (sighandler *) profile.
1077
1078 2011-10-13 Yannick Moy <moy@adacore.com>
1079
1080 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
1081 in Alfa mode.
1082
1083 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1084
1085 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
1086 expressions are legal limited return values if each one of their
1087 dependent expressions are legal.
1088
1089 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1090
1091 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
1092 if the prefix of the call is a qualified expression, rewrite as
1093 a code statement.
1094 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
1095 code statement is legal if it is a rewriting of a procedure call.
1096
1097 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1098
1099 * exp_aggr.adb (Flatten): If a component association has a box,
1100 assume that aggregate is not static.
1101 (Safe_Aggregate): If a component association in a non-limited
1102 aggregate has a box, assume that it cannot be expanded in place.
1103
1104 2011-10-13 Vincent Celier <celier@adacore.com>
1105
1106 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
1107 Process_Project_Tree_Phase_1 with Packages_To_Check.
1108 (Process_Project_And_Apply_Config): Ditto
1109 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
1110 Remove default for argument Packages_To_Check.
1111 * prj-proc.adb (Recursive_Process): New argument
1112 Packages_To_Check.
1113 (Process): Ditto.
1114 (Process_Project_Tree_Phase_1): Ditto.
1115 (Recursive_Project.Process_Aggregated_Projects): Call
1116 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
1117 Packages_To_Check.
1118 * prj-proc.ads (Process): New argument Packages_To_Check
1119 (Process_Project_Tree_Phase_1): Ditto
1120
1121 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1122
1123 * gcc-interface/Makefile.in: Fix typo.
1124
1125 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1126
1127 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
1128 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
1129 Use sloc of defining identifier of farmal type declaration,
1130 as sloc of generated internal entity, to prevent misplaced
1131 references in ali.
1132
1133 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1134
1135 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
1136 is fully defined before checking that it is a numeric type.
1137
1138 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1139
1140 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
1141 association for component X has a box, then X is covered in the
1142 aggregate even if there is not default value for X in the type
1143 declaration, and X has to be default-initialized.
1144
1145 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1146
1147 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
1148 literals as referenced only if reference is in current source unit.
1149
1150 2011-10-13 Matthew Heaney <heaney@adacore.com>
1151
1152 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
1153
1154 2011-10-13 Olivier Hainque <hainque@adacore.com>
1155
1156 * sigtramp.h: New file. Prototype and spec of the signal
1157 trampoline to be called by an established handler to provide
1158 dwarf call frame info before the real signal processing code.
1159 * sigtramp-ppcvxw.c: New file. Implementation of the signal
1160 trampoline for ppc-vxworks.
1161 * init.c (vxworks section): Use it for ppc.
1162
1163 2011-10-13 Thomas Quinot <quinot@adacore.com>
1164
1165 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
1166 (Check_Future_Identifier): New subprogram,
1167 factors duplicated code from Par.Ch2.P_Identifier and
1168 Par.Ch3.P_Defining_Identifier.
1169
1170 2011-10-13 Thomas Quinot <quinot@adacore.com>
1171
1172 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
1173 if we fail to initialize CV attributes or CV.
1174
1175 2011-10-13 Thomas Quinot <quinot@adacore.com>
1176
1177 * s-tasren.adb (Timed_Selective_Wait, case
1178 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
1179 we know abortion is already deferred.
1180
1181 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1182
1183 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
1184 (Build_Master_Renaming (function)): Removed.
1185 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
1186 (Expand_Full_Type_Declaration): Alphabetize
1187 variables. Reformatting of code and comments. Rewrite the
1188 section on processing of anonymous access-to-task types in
1189 record components.
1190 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
1191 (Build_Master_Renaming): Moved to exp_ch9.
1192 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
1193 (Build_Master_Entity): Add formal parameter
1194 Use_Current. Reformatting of code and comments.
1195 (Build_Master_Renaming): Moved from exp_ch3.
1196 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
1197 exp_ch3. Update comment on usage.
1198 (Build_Master_Entity):
1199 Add formal parameter Use_Current. Update comment on usage.
1200 (Build_Master_Renaming): Moved from exp_ch3.
1201 * sem_ch3.adb (Access_Definition): Remove redundant code to
1202 create a _master and a renaming.
1203
1204 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1205
1206 * lib-xref.adb: Do no emit reference to overridden operation,
1207 if it is internally generated.
1208
1209 2011-10-13 Vincent Celier <celier@adacore.com>
1210
1211 * bindgen.adb: Remove any processing related to g-trasym
1212 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
1213 * mlib-prj.adb: Remove any processing related to g-trasym.
1214
1215 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1216
1217 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
1218 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
1219 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
1220 (ADA_FLAGS_TO_PASS): Likewise.
1221 (COMMON_FLAGS_TO_PASS): New.
1222 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
1223 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
1224 (gnatlib): Use COMMON_FLAGS_TO_PASS.
1225 (ada.install-common): Likewise.
1226 (install-gnatlib): Likewise.
1227 (install-gnatlib-obj): Likewise.
1228 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
1229 (gnat-cross): Delete.
1230 (gnatboot): Likewise.
1231 (gnatboot2): Likewise.
1232 (gnatboot3): Likewise.
1233 (gnatstage1): Likewise.
1234 (gnatstage2): Likewise.
1235 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
1236 (MOST_ADAFLAGS): Likewise.
1237 (LOOSE_CFLAGS): Likewise.
1238 (gnat-cross): Likewise.
1239 (GNATLIBFLAGS): Add -W -Wall.
1240 (GNATLIBCFLAGS_FOR_C): Likewise.
1241 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
1242 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
1243
1244 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1245
1246 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
1247 (push_range_check_info): Likewise.
1248 (gnat_to_gnu) <N_Code_Statement>: Likewise.
1249 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
1250 (gnat_invariant_expr): Likewise.
1251 * gcc-interface/utils.c (compute_related_constant): Likewise.
1252 (max_size): Fix handling of SAVE_EXPR.
1253 (remove_conversions): Fix formatting.
1254
1255 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1256
1257 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
1258 (DECL_INDUCTION_VAR): New macro.
1259 (SET_DECL_INDUCTION_VAR): Likewise.
1260 * gcc-interface/gigi.h (convert_to_index_type): Declare.
1261 (gnat_invariant_expr): Likewise.
1262 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
1263 parameter, set DECL_LOOP_PARM_P on it.
1264 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
1265 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
1266 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
1267 (struct range_check_info_d): New type.
1268 (struct loop_info_d): Likewise.
1269 (gnu_loop_stack): New stack.
1270 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
1271 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
1272 is set, do not test DECL_RENAMED_OBJECT.
1273 (push_range_check_info): New function.
1274 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
1275 the label. Reference the label and the iteration variable from it.
1276 Build the special induction variable in the unsigned version of the
1277 size type, if it is larger than the base type. And attach it to the
1278 iteration variable if the latter isn't by-ref. In the iteration scheme
1279 case, initialize the invariant conditions in front of the loop if
1280 deemed profitable. Use gnu_loop_stack.
1281 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
1282 <N_Raise_Constraint_Error>: Always process the reason. In the range
1283 check and related cases, and if loop unswitching is enabled, compute
1284 invariant conditions and push this information onto the stack.
1285 Do not translate again the condition if it has been already translated.
1286 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
1287 DECL_LOOP_PARM_P isn't set.
1288 (convert_to_index_type): New function.
1289 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
1290 to convert the index from the base index type to sizetype.
1291 (gnat_invariant_expr): New function.
1292
1293 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1294
1295 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
1296 two parallel arrays to hold standard builtin declarations, and
1297 replace it with a function based interface that can support
1298 creating builtins on the fly in the future.
1299 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
1300 (gnat_to_gnu): Ditto.
1301
1302 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1303
1304 PR lto/50492
1305 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
1306 * gcc-interface/utils.c (global_context): New variable.
1307 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
1308 that are either public external or at top level. Use "No" macro.
1309 (end_subprog_body): Call decl_function_context.
1310 (rest_of_subprog_body_compilation): Likewise.
1311
1312 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1313
1314 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
1315 (rest_of_subprog_body_compilation): Likewise.
1316 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
1317 test for useless conversions by means of gnat_useless_type_conversion.
1318 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
1319 (language_function): Add named_ret_val and other_ret_val.
1320 (f_named_ret_val): New macro.
1321 (f_other_ret_val): Likewise.
1322 (gigi): Call rest_of_subprog_body_compilation.
1323 (struct nrv_data): New structure.
1324 (is_nrv_p): New predicate.
1325 (prune_nrv_r): New helper function.
1326 (prune_nrv_in_block): New function.
1327 (finalize_nrv_r): New helper function.
1328 (finalize_nrv): New function.
1329 (return_value_ok_for_nrv_p): New predicate.
1330 (build_return_expr): If optimization is enabled, record candidates for
1331 the Named Return Value optimization.
1332 (build_function_stub): Call rest_of_subprog_body_compilation.
1333 (Subprogram_Body_to_gnu): If optimization is enabled and there are
1334 candidates, finalize the Named Return Value optimization.
1335 Call rest_of_subprog_body_compilation.
1336 (call_to_gnu): At the end, if a return value is needed, simplify the
1337 result before wrapping it up in a COMPOUND_EXPR.
1338 * gcc-interface/utils.c (end_subprog_body): Split into...
1339 (rest_of_subprog_body_compilation): ...this. New function.
1340 (gnat_useless_type_conversion): Likewise.
1341
1342 2011-10-06 Thomas Quinot <quinot@adacore.com>
1343
1344 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
1345 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
1346 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1347 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
1348 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1349 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
1350 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
1351 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
1352
1353 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1354
1355 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
1356 references.
1357
1358 2011-10-06 Matthew Heaney <heaney@adacore.com>
1359
1360 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
1361 (Dequeue_Only_High_Priority): Protected procedure now implemented.
1362
1363 2011-10-06 Vincent Celier <celier@adacore.com>
1364
1365 * g-trasym.adb: Replace old implementation with the default
1366 implementation that returns list of addresses as "0x...".
1367 * g-trasym.ads: Update the list of platforms with the full
1368 capability. Indicate that there is a default implementation
1369 for other platforms.
1370 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
1371 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
1372 is now a default implementation for all platforms without the full
1373 capability.
1374
1375 2011-10-06 Robert Dewar <dewar@adacore.com>
1376
1377 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
1378 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
1379 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
1380 reorganization (use conditional expressions).
1381
1382 2011-10-06 Robert Dewar <dewar@adacore.com>
1383
1384 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
1385 floating divide by zero.
1386
1387 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1388
1389 * sem_ch6.adb: Limited interfaces that are not immutably limited
1390 are OK in return statements.
1391
1392 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
1393
1394 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
1395 change to powerpc section.
1396
1397 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
1398
1399 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
1400 across the port.
1401
1402 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1403
1404 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
1405 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
1406 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
1407 indefinite sets.
1408 * a-coorma.ads: Minor reformmating.
1409 * einfo.ads: Improve the comment describing the
1410 Directly_Designated_Type function.
1411 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
1412 ordered maps.
1413 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1414 dependencies.
1415
1416 2011-09-27 Robert Dewar <dewar@adacore.com>
1417
1418 * a-comutr.ads: Minor reformatting.
1419
1420 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1421
1422 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1423 iterators to multiway trees.
1424
1425 2011-09-27 Yannick Moy <moy@adacore.com>
1426
1427 * debug.adb (d.D): New option for strict Alfa mode.
1428 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1429 permissions as strictly as possible.
1430 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1431 Alfa mode, now, interpret ranges of base types like GNAT does; in
1432 strict mode, simply change the range of the implicit base Itype.
1433 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1434
1435 2011-09-27 Robert Dewar <dewar@adacore.com>
1436
1437 * exp_ch9.adb: Minor comment fixes.
1438
1439 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1440
1441 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1442 trees.
1443
1444 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1445
1446 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1447 instead of Directly_Designated_Type in the indirect array case.
1448
1449 2011-09-27 Robert Dewar <dewar@adacore.com>
1450
1451 * exp_util.adb, exp_aggr.adb: Minor reformatting.
1452
1453 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1454
1455 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1456 on subtype declarations.
1457 * exp_aggr.adb: Minor comment update.
1458
1459 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1460
1461 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1462 test in the N_Explicit_Dereference case. Fold double logical
1463 negation in the special loop case and conditionalize it on
1464 Variable_Ref being true.
1465
1466 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1467
1468 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1469 single protected object and the selector is a discriminant or an
1470 entry family, this is a non-overloaded candidate interpretation,
1471 and possible primitive operations of the type must not be
1472 examined.
1473
1474 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1475
1476 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1477
1478 2011-09-27 Pascal Obry <obry@adacore.com>
1479
1480 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1481 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1482 Add dummy definitions for pthread_rwlock_t
1483 and pthread_rwlockattr_t on all POSIX platforms.
1484 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1485 reference.
1486 (Finalize_Lock): Likewise.
1487 (Write_Lock): Likewise.
1488 (Unlock): Likewise.
1489
1490 2011-09-27 Tristan Gingold <gingold@adacore.com>
1491
1492 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1493 windows 64.
1494
1495 2011-09-27 Pascal Obry <obry@adacore.com>
1496
1497 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1498 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1499 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1500 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1501 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1502 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1503 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1504 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1505 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1506 s-taprop-posix.adb: Revert previous changes.
1507 (Lock): Now a record containing the two possible lock
1508 (mutex and read/write) defined in OS_Interface.
1509 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1510 'R' locking policy.
1511 (Initialize_Protection): Likewise.
1512 (Lock): Likewise.
1513 (Lock_Read_Only): Likewise.
1514 (Unlock): Likewise.
1515
1516 2011-09-27 Pascal Obry <obry@adacore.com>
1517
1518 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1519 OS_Interface.pthread_rwlock_t.
1520
1521 2011-09-27 Robert Dewar <dewar@adacore.com>
1522
1523 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1524 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1525 sem_ch5.adb, sem_util.adb: Minor reformatting.
1526
1527 2011-09-27 Pascal Obry <obry@adacore.com>
1528
1529 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1530 (Finalize_Lock)[RW_Lock]: Likewise.
1531 (Write_Lock)[RW_Lock]: Likewise.
1532 (Unlock)[RW_Lock]: Likewise.
1533 (Read_Lock): Define L as RW_Lock (instead of Lock).
1534 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1535 routine for r/w lock.
1536 (Finalize_Lock)[RW_Lock]: Likewise.
1537 (Write_Lock)[RW_Lock]: Likewise.
1538 (Unlock)[RW_Lock]: Likewise.
1539 (Read_Lock): Define L as RW_Lock (instead of Lock).
1540
1541 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1542 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1543 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1544 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1545 routine for standard lock.
1546 (Finalize_Lock)[RW_Lock]: Likewise.
1547 (Write_Lock)[RW_Lock]: Likewise.
1548 (Unlock)[RW_Lock]: Likewise.
1549 (Read_Lock): Define L as RW_Lock (instead of Lock).
1550 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1551 in the record definition.
1552 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1553 lock for 'R' locking policy.
1554 (Initialize_Protection): Likewise.
1555 (Lock): Likewise.
1556 (Lock_Read_Only): Likewise.
1557 (Unlock): Likewise.
1558 * s-taspri-posix.ads (RW_Lock): New type defined as
1559 OS_Interface.pthread_rwlock_t.
1560
1561 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1562 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1563 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1564 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1565
1566 2011-09-27 Pascal Obry <obry@adacore.com>
1567
1568 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1569
1570 2011-09-27 Pascal Obry <obry@adacore.com>
1571
1572 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1573 s-osinte-hpux.ads, s-osinte-irix.ads,
1574 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1575 pthread_mutex_t.
1576 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1577 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1578 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1579 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1580 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1581 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1582
1583 2011-09-27 Pascal Obry <obry@adacore.com>
1584
1585 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1586 (RE_Id): Add RE_Lock_Read_Only.
1587 (RE_Unit_Table): Likewise.
1588 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1589 to lift restriction on first character. Handle now the
1590 Name_Concurrent_Readers_Locking where policy character is set to
1591 'R'.
1592 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1593 constant.
1594 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1595 read only lock for function in protected object.
1596 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1597 this routine is now used.
1598
1599 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1600
1601 * s-atocou-x86.adb (Decrement): Use %;.
1602 (Increment): Likewise.
1603
1604 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1605
1606 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1607 dereference of the pointer to the storage area. Remove useless type
1608 conversions and factor out common code.
1609
1610 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1611
1612 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1613 variable and use it throughout.
1614 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1615 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1616 first step. Also convert to the unpadded type as a last step.
1617
1618 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1619
1620 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1621 DECL_CHAIN in comment.
1622 * gcc-interface/trans.c (gigi): Likewise.
1623 (Attribute_to_gnu): Likewise.
1624 (build_function_stub): Likewise.
1625 (gnat_to_gnu): Likewise.
1626 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1627 (convert_vms_descriptor64): Likewise.
1628 (convert_vms_descriptor32): Likewise.
1629
1630 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1631
1632 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1633 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1634 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1635 the type of the record is TYPE_READONLY.
1636
1637 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1638 Robert Dewar <dewar@adacore.com>
1639
1640 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1641 OUT formal parameter which is of an null-exclusion access subtype.
1642
1643 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1644
1645 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1646 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1647 (gnat_to_gnu_param): Likewise.
1648 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1649 maybe_unconstrained_array instead of doing the work manually.
1650 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1651 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1652 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1653 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1654 (gnat_stabilize_reference): Likewise.
1655
1656 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1657
1658 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1659 (SET_TYPE_NULL_BOUNDS): Likewise.
1660 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1661 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1662 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1663 pointer types.
1664 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1665 check that the initializer is a valid constant expression for use in
1666 initializing a static variable. Add missing guard.
1667 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1668 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1669 pointer for the bounds.
1670 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1671 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1672
1673 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1674
1675 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1676 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1677 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1678 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1679 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1680 to the indirect case.
1681 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1682 the TREE_THIS_NOTRAP flag.
1683
1684 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1685
1686 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1687 iteration scheme, always generate the do-while form if optimization
1688 is enabled. Use more straightforward test at the end.
1689
1690 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1691
1692 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1693 XNEW instead of xmalloc. Do not build useless pointer type.
1694 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1695 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1696 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1697
1698 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1699
1700 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1701 the alignment if this doesn't prevent BLKmode access to the object.
1702
1703 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1704
1705 * gcc-interface/Makefile.in (darwin): Do not issue the
1706 '-flat_namespace' linker flag during Ada build.
1707 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1708 default shared library options.
1709
1710 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1711
1712 * gcc-interface/decl.c (annotate_value): Look up expression for
1713 insertion in the cache at the end.
1714
1715 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1716
1717 * gcc-interface/Make-lang.in: Update dependencies.
1718
1719 2011-09-19 Steve Baird <baird@adacore.com>
1720
1721 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1722 configuration pragma names so that Is_Configuration_Pragma_Name
1723 will return True for Name_Annotate. Make corresponding change in
1724 Pragma_Id enumeration type. This is needed to allow an Annotate
1725 pragma to occur in a configuration pragma file (typically,
1726 a gnat.adc file).
1727 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1728 * gnat_rm.texi: Note that pragma Annotate may be used as a
1729 configuration pragma.
1730
1731 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1732
1733 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1734 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1735
1736 2011-09-19 Yannick Moy <moy@adacore.com>
1737
1738 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1739 for expansion of set membership.
1740 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1741 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1742 visible for use in Alfa expansion.
1743 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1744 variable in Alfa mode.
1745
1746 2011-09-19 Thomas Quinot <quinot@adacore.com>
1747
1748 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1749
1750 2011-09-19 Thomas Quinot <quinot@adacore.com>
1751
1752 * exp_ch9.adb: Minor reformatting.
1753
1754 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1755
1756 * freeze.adb (Build_Renamed_Body): Generic subprograms
1757 instantiations cannot be poperly inlined by the compiler, do
1758 not set the Body_To_Inline attribute in such cases.
1759 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1760 inlining-related flags from the generic subprogram declaration.
1761
1762 2011-09-19 Thomas Quinot <quinot@adacore.com>
1763
1764 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1765 (Build_Stub_Type): Remove, instead copy components from
1766 System.Partition_Interface.RACW_Stub_Type.
1767 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1768 (Copy_Component_List): New subprogram.
1769
1770 2011-09-19 Yannick Moy <moy@adacore.com>
1771
1772 * lib-xref.adb (Generate_Reference): Ignore references to
1773 constants in Standard.
1774
1775 2011-09-19 Robert Dewar <dewar@adacore.com>
1776
1777 * err_vars.ads, errout.ads: Minor reformatting.
1778
1779 2011-09-19 Robert Dewar <dewar@adacore.com>
1780
1781 * aspects.ads (Impl_Defined_Aspects): New array
1782 * lib-writ.adb (No_Dependences): New name for No_Dependence
1783 * restrict.adb (No_Dependences): New name for No_Dependence
1784 (Check_Restriction_No_Specification_Of_Aspect): New
1785 procedure.
1786 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1787 (Restricted_Profile_Result): New variable
1788 (No_Specification_Of_Aspects): New variable
1789 (No_Specification_Of_Aspect_Warning): New variable
1790 * restrict.ads (No_Dependences): New name for No_Dependence
1791 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1792 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1793 * s-rident.ads: Add restriction
1794 No_Implementation_Aspect_Specifications, this is also added to
1795 the No_Implementation_Extensions profile.
1796 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1797 No_Implementation_Defined_Aspects
1798 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1799 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1800 No_Implementation_Aspects
1801 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1802 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1803
1804 2011-09-19 Yannick Moy <moy@adacore.com>
1805
1806 * lib-xref.adb (Generate_Reference): Take into account multiple
1807 renamings for Alfa refs.
1808
1809 2011-09-19 Thomas Quinot <quinot@adacore.com>
1810
1811 * g-socthi-mingw.adb: Minor reformatting.
1812
1813 2011-09-19 Yannick Moy <moy@adacore.com>
1814
1815 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1816 expansion to False in mode Alfa
1817
1818 2011-09-19 Pascal Obry <obry@adacore.com>
1819
1820 * mingw32.h: Remove obsolete code needed for old versions
1821 of MingW.
1822
1823 2011-09-19 Robert Dewar <dewar@adacore.com>
1824
1825 * errout.ads: Minor reformatting.
1826
1827 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1828
1829 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1830 function is transformed into a declaration and a body, insert
1831 body at the end of the declarative part, to prevent premature
1832 freeze actions, and preserve original specification in the
1833 subprogram declaration.
1834
1835 2011-09-19 Vincent Celier <celier@adacore.com>
1836
1837 * projects.texi: Minor editing.
1838
1839 2011-09-19 Robert Dewar <dewar@adacore.com>
1840
1841 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1842 exp_aggr.adb: Minor reformatting.
1843
1844 2011-09-19 Yannick Moy <moy@adacore.com>
1845
1846 * lib-xref.adb (Generate_Reference): Change entity referenced
1847 to underlying object if any, or else reference to the HEAP.
1848
1849 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1850
1851 * gcc-interface/Make-lang.in: Update dependencies.
1852
1853 2011-09-15 Robert Dewar <dewar@adacore.com>
1854
1855 * tree_io.ads: Minor reformatting.
1856 * a-intnam.ads: Fix bad header.
1857
1858 2011-09-15 Thomas Quinot <quinot@adacore.com>
1859
1860 * a-exexpr-gcc.adb: Minor reformatting.
1861
1862 2011-09-15 Yannick Moy <moy@adacore.com>
1863
1864 * sem_ch6.adb: Propagate information that an expression function comes
1865 from source (otherwise references to this entity are not stored).
1866
1867 2011-09-15 Robert Dewar <dewar@adacore.com>
1868
1869 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1870 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1871 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1872
1873 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1874
1875 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1876 if the expression function is not a completion, create a
1877 new specification for the generated declaration, and keep the
1878 original specification in the generated body. Shorter code also
1879 ensures that proper warnings are generated for unused formals
1880 in all cases.
1881
1882 2011-09-15 Sergey Rybin <rybin@adacore.com>
1883
1884 * tree_io.ads: Update ASIS_Version_Number because of the changes
1885 in the tree structures for expression functions.
1886
1887 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1888
1889 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1890 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1891 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1892 (CLOCK_REALTIME): Fix wrong value on some OSes.
1893 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1894
1895 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1896
1897 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1898 to unconstrained array case, deal with each branch of a COND_EXPR.
1899 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1900 a COND_EXPR in the initializer, if present.
1901
1902 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1903
1904 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1905 of an addressable type.
1906 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1907 Deal with those cases for which creating a temporary is mandatory.
1908
1909 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1910
1911 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1912 this is a real formal parameter before testing whether it is by ref.
1913
1914 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1915
1916 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1917 (build_call_1_expr): Likewise.
1918 (build_call_2_expr): Likewise.
1919 (build_call_n_expr): New prototype.
1920 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1921 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1922 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1923 (Exception_Handler_to_gnu_zcx): Likewise.
1924 (gnat_to_gnu): Likewise.
1925 (build_binary_op_trapv): Likewise.
1926 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1927 (build_call_1_expr): Likewise.
1928 (build_call_2_expr): Likewise.
1929 (build_call_n_expr): New function.
1930 (build_call_raise): Use build_call_n_expr.
1931 (build_call_raise_range): Likewise.
1932 (build_call_raise_column): Likewise.
1933 (build_call_alloc_dealloc_proc): Likewise.
1934 (maybe_wrap_malloc): Likewise.
1935 (maybe_wrap_free): Likewise.
1936
1937 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1938
1939 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1940 MODIFY_EXPR.
1941 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1942 the result type is null if ENABLE_CHECKING. Set operation_type at the
1943 end unconditionally if not set in the previous cases.
1944 Use build2 and void_type_node for MODIFY_EXPR.
1945 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1946
1947 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1948
1949 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1950 precision when converting to or from an integral type whose precision
1951 is not equal to its size.
1952
1953 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1954
1955 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1956
1957 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1958
1959 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1960 implementation.
1961 * system-darwin-ppc64.ads: New file.
1962
1963 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1964
1965 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1966 reference to "-lm".
1967
1968 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1969
1970 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1971 size switches to the link phase for shared libs.
1972
1973 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1974
1975 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1976 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1977
1978 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1979
1980 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1981 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1982 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1983 New targets.
1984 (TOOLS_FLAGS_TO_PASS): New.
1985 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1986
1987 2011-09-06 Robert Dewar <dewar@adacore.com>
1988
1989 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1990 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1991
1992 2011-09-06 Robert Dewar <dewar@adacore.com>
1993
1994 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1995 * s-rident.ads: New restriction No_Implementation_Units
1996 (this restriction is also part of the profile
1997 No_Implementation_Extensions)
1998 * sem_ch10.adb (Analyze_With_Clause): Add check for
1999 No_Implementation_Units restriction.
2000
2001 2011-09-06 Jerome Guitton <guitton@adacore.com>
2002
2003 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
2004 on vThreads.
2005
2006 2011-09-06 Thomas Quinot <quinot@adacore.com>
2007
2008 * s-solita.adb: Minor reformatting.
2009
2010 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2011
2012 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
2013 is a rewriting of an expression function does not freeze previous
2014 entities.
2015
2016 2011-09-06 Robert Dewar <dewar@adacore.com>
2017
2018 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
2019
2020 2011-09-06 Tristan Gingold <gingold@adacore.com>
2021
2022 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
2023 powerpc-wrs-vxworksae.
2024
2025 2011-09-06 Thomas Quinot <quinot@adacore.com>
2026
2027 * s-os_lib.ads (Spawn): Minor documentation clarification,
2028 Success is True for a zero exit status.
2029
2030 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2031
2032 * sem_ch5.adb: Add message for common iterator error.
2033
2034 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2035
2036 * exp_ch3.adb (Build_Initialization_Call): If the target is a
2037 selected component discriminated by a current instance, replace
2038 the constraint with a reference to the target object, regardless
2039 of whether the context is an init_proc.
2040
2041 2011-09-06 Robert Dewar <dewar@adacore.com>
2042
2043 * exp_attr.adb: Descriptor_Size is never static.
2044
2045 2011-09-06 Robert Dewar <dewar@adacore.com>
2046
2047 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
2048
2049 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2050
2051 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
2052 non-static.
2053
2054 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2055
2056 * sem_res.adb (Resolve): An expression that is the body of an
2057 expression function does not freeze.
2058
2059 2011-09-06 Matthew Heaney <heaney@adacore.com>
2060
2061 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
2062 a-cuprqu.adb: Changed copyright notice to indicate current
2063 year only.
2064
2065 2011-09-06 Vincent Celier <celier@adacore.com>
2066
2067 * prj.adb: Minor spelling error fix in comment
2068 * sem_res.adb: Minor reformatting
2069
2070 2011-09-06 Pascal Obry <obry@adacore.com>
2071
2072 * sysdep.c (winflush_nt): Removed as not needed anymore.
2073 (winflush_95): Likewise.
2074 (winflush_init): Likewise.
2075 (winflush_function): Likewise.
2076 (getc_immediate_common): Remove call to winflush_function.
2077
2078 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2079
2080 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
2081 processing for Descriptor_Size.
2082 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
2083 to account for its broader usage.
2084 * sem_attr.adb (Analyze_Attribute): Change the error detection
2085 circuitry for Descriptor_Size as the attribute is now applicable
2086 to all types.
2087
2088 2011-09-06 Robert Dewar <dewar@adacore.com>
2089
2090 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
2091
2092 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2093
2094 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
2095 in a parameter association must not set the Referenced flag on
2096 the formal.
2097 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
2098
2099 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2100
2101 * gnat_rm.texi: Add a section on attribute Descriptor_Size
2102
2103 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2104
2105 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
2106 gnatlink-re): Speed up by using -j0.
2107
2108 2011-09-06 Yannick Moy <moy@adacore.com>
2109
2110 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2111 Set_Corresponding_Aspect when creating pragma from aspect.
2112 (Add_Predicates): Use new field Corresponding_Aspect.
2113 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
2114 name when present, for the purpose of issuing error messages;
2115 remove local procedure Error_Pragma_Arg_Alternate_Name.
2116 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
2117 N_Pragma node.
2118 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
2119 N_Pragma node.
2120
2121 2011-09-06 Robert Dewar <dewar@adacore.com>
2122
2123 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
2124
2125 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2126
2127 * exp_ch6.adb (Build_Heap_Allocator): Add new
2128 local variable Desig_Typ. Code and comment reformatting. Add
2129 machinery to ensure that the allocation uses a fat pointer when
2130 the type of the return object is a constrained array and the
2131 function return type is an unconstrained array.
2132
2133 2011-09-06 Vincent Celier <celier@adacore.com>
2134
2135 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
2136 parameters in subprograms.
2137
2138 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2139
2140 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
2141
2142 2011-09-06 Thomas Quinot <quinot@adacore.com>
2143
2144 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
2145 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
2146 subprogram.
2147 (System.Tasking.Primitive_Operations.Specific.Set): If argument
2148 is null, destroy task specific data, to make API consistent with
2149 other platforms, and thus compatible with the shared version
2150 of s-tpoaal.adb.
2151 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
2152 Document the above assumption.
2153
2154 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2155
2156 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
2157 variable for type of return value when return type is
2158 unconstrained and context is an assignment.
2159
2160 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2161
2162 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
2163 class-wide operation if expansion is not enabled.
2164
2165 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
2166
2167 * checks.adb (Apply_Scalar_Range_Check): Deal with access
2168 type prefix.
2169
2170 2011-09-06 Yannick Moy <moy@adacore.com>
2171
2172 * sem_ch13.adb (Analyze_Aspect_Specifications, case
2173 Aspect_Invariant): Do not issue error at this point on illegal
2174 pragma placement, as this is checked later on when analyzing
2175 the corresponding pragma.
2176 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
2177 similar to Error_Pragma_Arg, except the source name of the
2178 aspect/pragma to use in warnings may be equal to parameter
2179 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
2180 message to distinguish source name of pragma/aspect, and whether
2181 the illegality resides in the type being public, or being private
2182 without a public declaration
2183
2184 2011-09-06 Thomas Quinot <quinot@adacore.com>
2185
2186 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
2187 size check (fd_set is implemented differently on that platform).
2188
2189 2011-09-06 Thomas Quinot <quinot@adacore.com>
2190
2191 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2192 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2193 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
2194 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2195 (ATCB_Allocation): New subpackage of
2196 System.Tasking.Primitive_Operations, shared across all targets
2197 with full tasking runtime.
2198 (ATCB_Allocation.New_ATCB): Moved there (from target specific
2199 s-taprop bodies).
2200 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
2201 taking care of establishing a local temporary ATCB if the one
2202 being deallocated is Self, to avoid a reference to the freed
2203 ATCB in Abort_Undefer.
2204
2205 2011-09-06 Thomas Quinot <quinot@adacore.com>
2206
2207 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
2208 terminated, mark it for deallocation upon termination.
2209 (Terminate_Task): Call Free_Task again if the task is marked
2210 for automatic deallocation upon termination.
2211
2212 2011-09-06 Robert Dewar <dewar@adacore.com>
2213
2214 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
2215 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
2216 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
2217 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
2218 a-intnam-solaris.ads, a-intnam-tru64.ads,
2219 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
2220 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
2221 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
2222 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
2223 * s-rident.ads: Add new restriction No_Implementation_Identifiers
2224 Add new profile No_Implementation_Extensions
2225 * sem_prag.adb: Implement pragma Implementation_Defined Implement
2226 profile No_Implementation_Extensions
2227 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
2228 Check violation of restriction No_Implementation_Identifiers
2229 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
2230 Add entry for Name_No_Implementation_Extensions
2231
2232 2011-09-06 Robert Dewar <dewar@adacore.com>
2233
2234 * impunit.ads: Minor reformatting.
2235
2236 2011-09-06 Robert Dewar <dewar@adacore.com>
2237
2238 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
2239
2240 2011-09-06 Pascal Obry <obry@adacore.com>
2241
2242 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
2243 types.
2244
2245 2011-09-06 Robert Dewar <dewar@adacore.com>
2246
2247 * g-socket.adb: Minor reformatting
2248
2249 2011-09-06 Javier Miranda <miranda@adacore.com>
2250
2251 * ali.adb (Scan_ALI): Add missing support to load references of
2252 entities imported from other languages.
2253 * ali.ads (Xref_Record): Adding new fields to store the language and
2254 name of an imported entity.
2255 * lib-xref.adb (Output_Import_Export_Info): Fix typo
2256 in comment.
2257
2258 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2259
2260 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
2261 is allowed on a full type declaration if it is the completion of
2262 a private declarations.
2263 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
2264 aspect is allowed on a full type declaration in the private part
2265 of a package.
2266
2267 2011-09-06 Robert Dewar <dewar@adacore.com>
2268
2269 * sem_ch8.ads: Minor reformatting
2270
2271 2011-09-06 Thomas Quinot <quinot@adacore.com>
2272
2273 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
2274 Guard against socket values that are not in [0;FD_SETSIZE[
2275
2276 2011-09-06 Robert Dewar <dewar@adacore.com>
2277
2278 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
2279 reformatting.
2280
2281 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2282
2283 * s-linux-alpha.ads: Minor reformatting
2284 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
2285 Use sizeof instead of corresponding C defines in s-oscons template.
2286
2287 2011-09-06 Vadim Godunko <godunko@adacore.com>
2288
2289 * a-convec.ads, a-iteint.ads: Minor reformatting.
2290
2291 2011-09-06 Vincent Celier <celier@adacore.com>
2292
2293 * projects.texi: Add menus and @node lines.
2294
2295 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2296
2297 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
2298 where the return type is an unconstrained array and the context
2299 is an assignment. Optimize the case when the target of the
2300 assignment is a selected component.
2301
2302 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2303
2304 * s-solita.adb: Update comments.
2305
2306 2011-09-06 Pascal Obry <obry@adacore.com>
2307
2308 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
2309 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
2310 * s-oscons-tmplt.c: Add support for generating pthread related
2311 types size on GNU/Linux as done for Darwin.
2312 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
2313
2314 2011-09-06 Robert Dewar <dewar@adacore.com>
2315
2316 * exp_ch6.adb: Fix minor typo.
2317
2318 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2319
2320 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2321 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
2322 (Double_Size_Of): Alphabetized. Update the comment on usage.
2323 (Make_Finalize_Address_Stmts): Update comments and reformat code.
2324 (Nearest_Multiple_Rounded_Up): New routine.
2325 (Size_Of): Update comment on usage. The generated expression now
2326 accounts for alignment gaps by rounding the size of the type to the
2327 nearest multiple rounded up of the type's alignment.
2328
2329 2011-09-06 Robert Dewar <dewar@adacore.com>
2330
2331 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
2332
2333 2011-09-06 Steve Baird <baird@adacore.com>
2334
2335 * exp_ch4.adb (Expand_Allocator_Expression): Look through
2336 derived subprograms in checking for presence of an
2337 Extra_Accessibility_Of_Result formal parameter.
2338 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
2339 checking for presence of an Extra_Accessibility_Of_Result formal
2340 parameter.
2341 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
2342 case where the Parameter_Associatiations attribute is already set,
2343 but set to an empty list.
2344 (Needs_Result_Accessibility_Level):
2345 Unconditionally return False. This is a temporary
2346 change, disabling the Extra_Accessibility_Of_Result
2347 mechanism.
2348 (Expand_Simple_Function_Return): Check for
2349 Extra_Accessibility_Of_Result parameter's presence instead of
2350 testing Ada_Version when generating a runtime accessibility
2351 check which makes use of the parameter.
2352
2353 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2354
2355 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
2356 expression in a given case alternative must be attached to the
2357 statement list of the ccrresponding case statement alternative
2358 They cannot be propagated ahead of the case statement, because
2359 the validity of the expression that generated the action may
2360 hold only for that alternative.
2361
2362 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2363
2364 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2365 (Alignment_Of): Remove the code for strict alignment targets.
2366 (Double_Alignment_Of): Removed.
2367 (Double_Size_Of): New routine.
2368 (Make_Finalize_Address_Stmts): Change the
2369 calculation of the dope's size. Update relevant comments.
2370 (Size_Of): New routine.
2371
2372 2011-09-06 Steve Baird <baird@adacore.com>
2373
2374 * einfo.ads (Extra_Accessibility): Update associated comment to use
2375 the term "present" correctly ("present" just means that it is not
2376 an error to query the value of the attribute - it does not imply
2377 that the value must be non-null).
2378 (Extra_Constrained): Ditto.
2379 (Is_Visible_Formal): Ditto.
2380 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
2381 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
2382 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
2383 * exp_ch6.adb (Expand_Call): The callee may require an
2384 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
2385 < Ada_2012. This can occur if the callee is exported from a Gnat
2386 runtimes unit. Also improve a comment.
2387
2388 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2389
2390 * exp_ch7.adb: Add with and use clauses for Get_Targ.
2391 (Alignment_Of): Rename formal parameter Some_Typ
2392 to Typ, update related comment. Use the allocator alignment on
2393 strict alignment targets such as SPARC.
2394 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
2395 related comment.
2396
2397 2011-09-06 Gary Dismukes <dismukes@adacore.com>
2398
2399 * sem_ch9.adb (Check_Interfaces): Test
2400 Is_Limited_Type rather than Is_Limited_Record when checking that
2401 the partial view of a synchronized full view must be limited.
2402
2403 2011-09-06 Emmanuel Briot <briot@adacore.com>
2404
2405 * g-comlin.adb (Free): Fix memory leak.
2406
2407 2011-09-06 Robert Dewar <dewar@adacore.com>
2408
2409 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
2410
2411 2011-09-06 Steve Baird <baird@adacore.com>
2412
2413 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
2414 (Ada2012) cases described in AI05-0234 where the accessibility
2415 level of a function result is "determined by the point of
2416 call", an implicit parameter representing that accessibility
2417 level is passed in. Extra_Accessibilty_Of_Result yields this
2418 additional formal parameter. Extra_Accessibility_Of_Result
2419 is analogous to the existing Extra_Accessibility
2420 function used in the implementation of access parameters.
2421 (Set_Extra_Accessibility_Of_Result): New procedure; sets
2422 Extra_Accessibility_Of_Result attribute.
2423 * einfo.adb (Extra_Accessibility_Of_Result): New function.
2424 (Set_Extra_Accessibility_Of_Result): New procedure.
2425 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2426 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2427 an accessibility level literal to Natural; introduce a nested
2428 function, Make_Level_Literal, to do this.
2429 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2430 determines whether a given function (or access-to-function
2431 type) needs to have an implicitly-declared accessibility-level
2432 parameter added to its profile.
2433 (Add_Extra_Actual_To_Call): Export an existing procedure which was
2434 previously declared in the body of Exp_Ch6.
2435 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2436 it to exp_ch6.ads.
2437 (Has_Unconstrained_Access_Discriminants): New Function; a
2438 predicate on subtype entities which returns True if the given
2439 subtype is unconstrained and has one or more access discriminants.
2440 (Expand_Call): When expanding a call to a function which takes an
2441 Extra_Accessibility_Of_Result parameter, pass in the appropriate
2442 actual parameter value. In the case of a function call which is
2443 used to initialize an allocator, this may not be possible because
2444 the Etype of the allocator may not have been set yet. In this
2445 case, we defer passing in the parameter and handle it later in
2446 Expand_Allocator_Expression.
2447 (Expand_Simple_Function_Return): When returning from a function which
2448 returns an unconstrained subtype having at least one access
2449 discriminant, generate the accessibility check needed to ensure that
2450 the function result will not outlive any objects designated by its
2451 discriminants.
2452 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2453 description.
2454 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2455 is used to initialize an allocator, we may need to pass in "the
2456 accessibility level determined by the point of call" (AI05-0234)
2457 to the function. Expand_Call, where such actual parameters are
2458 usually generated, is too early in this case because the Etype of
2459 the allocator (which is used in determining the level to be passed
2460 in) may not have been set yet when Expand_Call executes. Instead,
2461 we generate code to pass in the appropriate actual parameter
2462 in Expand_Allocator_Expression.
2463 * sem_ch6.adb (Create_Extra_Formals): Create
2464 the new Extra_Accessibility_Of_Result formal if
2465 Needs_Result_Accessibility_Level returns True. This includes the
2466 introduction of a nested procedure, Check_Against_Result_Level.
2467
2468 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2469
2470 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2471 declaration.
2472
2473 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2474
2475 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2476 for the synchronization. Move the test for null from
2477 s-stposu.Allocate_Any_Controlled to this routine since the check
2478 needs to be protected too.
2479 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2480 synchronization code.
2481 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2482 explaining the context in which this routine is used.
2483 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2484 to s-finmas.Set_Finalize_Address.
2485
2486 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2487
2488 * einfo.ads: Document that itypes have no parent field.
2489
2490 2011-09-05 Robert Dewar <dewar@adacore.com>
2491
2492 * rtsfind.adb (Check_CRT): Check for overloaded entity
2493 * rtsfind.ads: Document that entities to be found by rtsfind
2494 cannot be overloaded
2495 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2496 (Lock_Entries_With_Status): New name for Lock_Entries with two
2497 arguments (changed to meet rtsfind no overloading rule).
2498
2499 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2500
2501 * s-finmas.adb (Set_Finalize_Address (Address,
2502 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2503 (Set_Finalize_Address (in out Finalization_Master,
2504 Finalize_Address_Ptr): Add synchronization code.
2505 * s-finmas.ads (Set_Finalize_Address (Address,
2506 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2507 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2508 Set_Finalize_Address for the heterogeneous case.
2509
2510 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2511
2512 * sem_ch3.adb: Undo previous change, not suitable after all.
2513
2514 2011-09-05 Robert Dewar <dewar@adacore.com>
2515
2516 * einfo.ads: Minor comment clarification.
2517
2518 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2519
2520 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2521 no longer needs to search through the entities of the return
2522 statement scope to find the _chain.
2523 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2524 (Analyze_Block_Statement): Add local variable
2525 Is_BIP_Return_Statement. Add machinery to install all entities
2526 produced by the expansion of the return object declaration.
2527 (Install_Return_Entities): New routine.
2528 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2529
2530 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2531
2532 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2533 of subunit is incomplete.
2534 (Analyze_Proper_Body): If parent spec is not available, do not
2535 attempt analysis.
2536
2537 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2538
2539 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2540 interface type conversions, that are expanded into dereferences.
2541
2542 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2543
2544 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2545 Examine the parameter and return profile of a subprogram and swap
2546 any incomplete types coming from a limited context with their
2547 corresponding non-limited views.
2548 (Exchange_Limited_Views): New routine.
2549
2550 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2551
2552 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2553 of internal entity to the subtype declaration, so that when
2554 entities are subsequently exchanged in a package body, the tree
2555 remains properly formatted for ASIS.
2556
2557 2011-09-05 Johannes Kanig <kanig@adacore.com>
2558
2559 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2560 message.
2561 (Display_Help): display the user given help message, if available.
2562
2563 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2564
2565 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2566 is legal if the original node is an identifier that is a
2567 parameterless function call.
2568
2569 2011-09-05 Pascal Obry <obry@adacore.com>
2570
2571 * prj-nmsc.adb: Minor reformatting.
2572 Add support for standalone aggregate library.
2573 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2574 * projects.texi: Fix documentation for aggregate library projects.
2575
2576 2011-09-05 Robert Dewar <dewar@adacore.com>
2577
2578 * sem_ch6.adb: Minor reformatting.
2579
2580 2011-09-05 Matthew Gingell <gingell@adacore.com>
2581
2582 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2583 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2584 the bottom of the stack is not overwritten.
2585
2586 2011-09-05 Thomas Quinot <quinot@adacore.com>
2587
2588 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2589
2590 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2591
2592 * sem_ch3.adb (Access_Definition): If an access type declaration
2593 appears in a child unit, the scope of whatever anonymous type
2594 may be generated is the child unit itself.
2595
2596 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2597
2598 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2599 Comes_From_Source on rewritten body.
2600 (Analyze_Subprogram_Body_Helper): Check that the original node for
2601 the body comes from source, when determining whether expansion
2602 of a protected operation is needed.
2603
2604 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2605
2606 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2607 a selected component and the right-hand side is a self-referential
2608 access, the proper prefix of the rewritten attribute is a copy
2609 of the left-hand side, not of its prefix.
2610
2611 2011-09-05 Robert Dewar <dewar@adacore.com>
2612
2613 * sem_ch5.adb: Minor reformatting.
2614 * sem_ch3.adb: Minor code clean up.
2615
2616 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2617
2618 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2619 restriction No_Dynamic_Attachment is in effect or not should
2620 not influence the default priority associated to a protected
2621 object. With this change, when the restriction is in effect (as
2622 is the case for the Ravenscar profile) the default priority of
2623 a protected object with an interrupt handler is in the range of
2624 interrupt priorities (Default_Interrupt_Priority) as required
2625 by D.3(10).
2626
2627 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2628
2629 * a-iteint.ads: Fix header.
2630
2631 2011-09-05 Vincent Celier <celier@adacore.com>
2632
2633 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2634 with a directory separator to avoid output such as:
2635 "/path/to/objauto.cgpr" has been deleted.
2636
2637 2011-09-05 Robert Dewar <dewar@adacore.com>
2638
2639 * sem_ch3.adb: Minor reformatting.
2640
2641 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2642
2643 * sem_ch5.adb: Better error message.
2644
2645 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2646
2647 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2648 (Expand_Array_Aggregate): Detect a special case of an aggregate
2649 which contains tasks in the context of an unexpanded return
2650 statement of a build-in-place function.
2651 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2652 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2653 which contains tasks and expand it now that the original simple
2654 return statement has been rewritten.
2655 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2656 reformatting. Do not create a chain for an extended return
2657 statement if one is already available.
2658 (Has_Activation_Chain): New routine.
2659
2660 2011-09-05 Marc Sango <sango@adacore.com>
2661
2662 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2663 the wrong test and add the correct test to detect the violation
2664 of illegal use of unconstrained string type in SPARK mode.
2665
2666 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2667
2668 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2669 message on an iterator over an array.
2670
2671 2011-09-05 Robert Dewar <dewar@adacore.com>
2672
2673 * lib-xref-alfa.adb: Minor reformatting.
2674
2675 2011-09-05 Robert Dewar <dewar@adacore.com>
2676
2677 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2678 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2679
2680 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2681
2682 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2683
2684 2011-09-05 Johannes Kanig <kanig@adacore.com>
2685
2686 * lib-xref-alfa.adb: Update comments.
2687
2688 2011-09-05 Thomas Quinot <quinot@adacore.com>
2689
2690 * sem_res.adb: Minor reformatting
2691
2692 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2693
2694 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2695 present, create them now. Needed in case the return type was
2696 a limited view in the function declaration.
2697 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2698 tasks, build the activation chain for it. Pass a reference to
2699 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2700 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2701 with build_in_place calls.
2702 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2703 incomplete, inatialize its Corresponding_Record_Type component.
2704 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2705 of limited views.
2706
2707 2011-09-05 Johannes Kanig <kanig@adacore.com>
2708
2709 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2710 information.
2711
2712 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2713
2714 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2715 appears within a package specification and the token after "IS"
2716 is not a parenthesis, assume that this is an unparenthesized
2717 expression function, even if the token appears in a line by
2718 itself.
2719 * par.adb: Clarify use of Labl field of scope stack in error
2720 recovery.
2721
2722 2011-09-05 Bob Duff <duff@adacore.com>
2723
2724 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2725 conversions instead of normal type conversions in all cases where a
2726 type conversion would be illegal. In particular, use unchecked
2727 conversions when the operand types are private.
2728
2729 2011-09-05 Johannes Kanig <kanig@adacore.com>
2730
2731 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2732 objects of task type or protected type.
2733
2734 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2735
2736 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2737 function comes from source, indicate that so does its rewriting,
2738 so it is compatible with any subsequent expansion of the
2739 subprogram body (e.g. when it is a protected operation).
2740 * sem_ch4.adb: minor reformatting
2741
2742 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2743
2744 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2745 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2746 may lead to wrong ancestor package in the case of instantiated subunit
2747 bodies. If a subunit is instantiated, follow the chain of instantiations
2748 rather than the stub structure.
2749
2750 2011-09-02 Robert Dewar <dewar@adacore.com>
2751
2752 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2753 * gcc-interface/Make-lang.in: Update dependencies.
2754
2755 2011-09-02 Marc Sango <sango@adacore.com>
2756
2757 * sem_ch3.adb (Analyze_Object_Declaration): Change
2758 comment and add additional check to differentiate constant of
2759 type string from others unconstrained type.
2760
2761 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2762
2763 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2764 present in incomplete type declarations to refine the error
2765 message the full declaration is in the same unit.
2766 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2767 an incomplete type, set the Premature_Use for additional message.
2768 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2769 and Premature_Use is set, place additional information at the
2770 point of premature use.
2771
2772 2011-09-02 Bob Duff <duff@adacore.com>
2773
2774 * sem_ch6.adb: (Check_Post_State): Suppress warning
2775 "postcondition refers only to pre-state" when the expression has not
2776 yet been analyzed, because it causes false alarms. This can happen when
2777 the postcondition contains a quantified expression, because those are
2778 analyzed later. This is a temporary/partial fix.
2779 (Process_Post_Conditions): Minor: change wording of warning.
2780
2781 2011-09-02 Marc Sango <sango@adacore.com>
2782
2783 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2784 illegal use of unconstrained string type in SPARK mode.
2785 * sem_res.adb (Analyze_Operator_Symbol): Set the
2786 right place where the string operand of concatenation should be
2787 violate in SPARK mode.
2788
2789 2011-09-02 Robert Dewar <dewar@adacore.com>
2790
2791 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2792 exp_ch3.adb: Minor reformatting.
2793
2794 2011-09-02 Vincent Celier <celier@adacore.com>
2795
2796 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2797 as the compiler driver so Is_Compilable returns True for sources.
2798 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2799 for the body.
2800
2801 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2802
2803 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2804 condition, a reference to a controlling formal must be interpreted
2805 as having the class-wide type (or an access to such) so that the
2806 inherited condition can be properly applied to any overriding
2807 operation (see ARM12 6.6.1 (7)).
2808
2809 2011-09-02 Tristan Gingold <gingold@adacore.com>
2810
2811 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2812 for LIB$GETSYI.
2813
2814 2011-09-02 Javier Miranda <miranda@adacore.com>
2815
2816 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2817 initializing expression of a class-wide interface object declaration
2818 if its type is limited.
2819
2820 2011-09-02 Johannes Kanig <kanig@adacore.com>
2821
2822 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2823 literals, take into account the type name; the type is *not*
2824 the scope for an enumeration literal.
2825
2826 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2827
2828 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2829 to reject an overriding indicator on a user-defined Adjust
2830 subprogram for a limited controlled type.
2831
2832 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2833
2834 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2835 for an actual that is a function call returning an unconstrained
2836 limited controlled type.
2837
2838 2011-09-02 Tristan Gingold <gingold@adacore.com>
2839
2840 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2841
2842 2011-09-02 Johannes Kanig <kanig@adacore.com>
2843
2844 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2845 from "HEAP" to __HEAP Change comment that refers to that variable
2846 * put_alfa.adb: Change comment that refers to that variable
2847
2848 2011-09-02 Robert Dewar <dewar@adacore.com>
2849
2850 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2851
2852 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2853
2854 * exp_util.adb (Extract_Renamed_Object): Renamed to
2855 Find_Renamed_Object. This routine has been reimplemented and now uses
2856 tree traversal to locate a renamed object.
2857 (Is_Aliased): Replace call to Extract_Renamed_Object with
2858 Find_Renamed_Object.
2859
2860 2011-09-02 Tristan Gingold <gingold@adacore.com>
2861
2862 * init.c: (__gnat_is_vms_v7): New function.
2863
2864 2011-09-02 Olivier Hainque <hainque@adacore.com>
2865
2866 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2867 that have a misaligned backchain, necessarily bogus.
2868
2869 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2870
2871 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2872 TSS routine Finalize_Address when compiling in Alfa mode.
2873 (Expand_Freeze_Record_Type): Do not create TSS routine
2874 Finalize_Address when compiling in Alfa mode.
2875 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2876 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2877 not built.
2878 (Expand_N_Allocator): Do not produce a call to
2879 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2880 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2881 produce a call to primitive Set_Finalize_Address in Alfa mode because
2882 Finalize_Address is not built.
2883 * exp_ch7.adb (Build_Finalization_Master): Do not create
2884 finalization masters in Afa mode since they are not needed.
2885 (Build_Finalizer): Do not create scope and library-level
2886 finalizers in Alfa mode since they are not needed.
2887 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2888 "new" and "free" when applied to controlled objects in Alfa mode since
2889 this is not needed.
2890
2891 2011-09-02 Vincent Celier <celier@adacore.com>
2892
2893 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2894 only library names with the syntax of Ada identifiers, to avoid errors
2895 when compiling the binder generated files.
2896 * projects.texi: Document restriction on SAL library names
2897
2898 2011-09-02 Thomas Quinot <quinot@adacore.com>
2899
2900 * a-chtgbo.adb: Minor comment fix.
2901
2902 2011-09-02 Robert Dewar <dewar@adacore.com>
2903
2904 * lib-xref.adb: Minor reformatting
2905
2906 2011-09-02 Vincent Celier <celier@adacore.com>
2907
2908 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2909 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2910 --version and --help in usage.
2911 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2912
2913 2011-09-02 Bob Duff <duff@adacore.com>
2914
2915 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2916 compilers don't understand it.
2917
2918 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2919
2920 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2921 underlying subtype rather than its base type on the call to
2922 Build_Record_Or_Elementary_Input_Function, so that any
2923 constraints on a discriminated subtype will be available for
2924 doing the check required by AI05-0192.
2925 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2926 If the prefix subtype of the 'Input attribute is a constrained
2927 discriminated subtype, then check each constrained discriminant value
2928 against the corresponding value read from the stream.
2929
2930 2011-09-02 Yannick Moy <moy@adacore.com>
2931
2932 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2933 warnings on suspicious contracts, and enable them with -gnatwa.
2934
2935 2011-09-02 Robert Dewar <dewar@adacore.com>
2936
2937 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2938 reformatting.
2939
2940 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2941
2942 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2943 which ensure that restriction No_Dynamic_Attachment has not been
2944 violated.
2945 (Make_Initialize_Protection): Protected types with attach or
2946 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2947 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2948 which ensures that restriction No_Dynamic_Attachment has not been
2949 violated.
2950 * sem_attr.adb: (Eval_Attribute): Transform
2951 VAX_Float_Type'First and 'Last into references to
2952 the temporaries which store the corresponding bounds. The
2953 transformation is needed since the back end cannot evaluate
2954 'First and 'Last on VAX.
2955 (Is_VAX_Float): New routine.
2956
2957 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2958
2959 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2960 generic unit is not intrinsic and has an explicit convention,
2961 the instance inherits it.
2962
2963 2011-09-02 Robert Dewar <dewar@adacore.com>
2964
2965 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2966 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2967
2968 2011-09-02 Thomas Quinot <quinot@adacore.com>
2969
2970 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2971 Guard against a prefix that is an N_Has_Entity but has no
2972 associated entity.
2973
2974 2011-09-02 Yannick Moy <moy@adacore.com>
2975
2976 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2977 references.
2978
2979 2011-09-02 Yannick Moy <moy@adacore.com>
2980
2981 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2982 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2983 contracts.
2984 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2985 procedure looking for suspicious postconditions.
2986 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2987 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2988 options -gnatw.t and -gnatw.T.
2989
2990 2011-09-02 Pascal Obry <obry@adacore.com>
2991
2992 * prj.adb: Minor code refactoring. Move check for null project in
2993 Project_Changed.
2994 * projects.texi: Fix minor typos.
2995
2996 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2997
2998 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2999 of iteration is an expression, its value must be captured in a
3000 renaming declaration, so that modification of the elements is
3001 propagated to the original container.
3002
3003 2011-09-02 Pascal Obry <obry@adacore.com>
3004
3005 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
3006 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
3007 prj-tree.adb: Minor reformatting and style fixes.
3008
3009 2011-09-02 Robert Dewar <dewar@adacore.com>
3010
3011 * s-rident.ads: Add new restriction No_Implicit_Aliasing
3012 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
3013 No_Implicit_Aliasing
3014 (Analyze_Attribute, case Address): ditto
3015 (Analyze_Attribute, case Unrestricted_Access): ditto
3016 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
3017 No_Implicit_Aliasing restriction.
3018 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
3019
3020 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3021
3022 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
3023 is an unchecked conversion, apply test to its expression.
3024
3025 2011-09-02 Javier Miranda <miranda@adacore.com>
3026
3027 * sem_ch3.adb (Check_Abstract_Overriding): When
3028 traversing the chain of aliased subprograms avoid reporting a
3029 redundant error on the current entity.
3030
3031 2011-09-02 Sergey Rybin <rybin@adacore.com>
3032
3033 * gnat_ugn.texi: Minor clean up.
3034
3035 2011-09-02 Bob Duff <duff@adacore.com>
3036
3037 * s-htable.adb (Set_If_Not_Present): Use renaming
3038 instead of ":=", because the type Key is limited in the generic (even
3039 if not in the instances).
3040
3041 2011-09-02 Robert Dewar <dewar@adacore.com>
3042
3043 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
3044 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
3045 reformatting.
3046
3047 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3048
3049 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
3050 inherited component with the enclosing derived type. Code reformatting.
3051
3052 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3053
3054 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
3055 return done when overflow checks are enabled, since comparisons against
3056 Lor and Hir should not be done when OK1 is False.
3057
3058 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3059
3060 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3061 Add new formal Master_Exp. When present, add that expression to the
3062 call as an extra actual.
3063 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
3064 Fmaster_Actual and in the case of a BIP call initializing a return
3065 object of an enclosing BIP function set it to a
3066 new reference to the implicit finalization master
3067 formal of the enclosing function. Fmaster_Actual is
3068 then passed to the new formal Master_Exp on the call to
3069 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
3070 initializations of Enclosing_Func to its declaration.
3071
3072 2011-09-02 Thomas Quinot <quinot@adacore.com>
3073
3074 * csets.ads: Minor reformatting
3075
3076 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3077
3078 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
3079 the full view of a private type coming from an instantiation.
3080 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
3081 loop to iterate over the declarations rather than use the
3082 First_Entity / Next_Entity scheme.
3083
3084 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3085
3086 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
3087 X'range (N) into X'First (N) .. X'Last (N), do not share the
3088 dimension indicator N, if present. Even though it is a static
3089 constant, its source location may be modified when printing
3090 expanded code under -gnatDL, and node sharing will lead to chaos
3091 in Sprint on large files, by generating a sloc value that does
3092 not correspond to any source file.
3093
3094 2011-09-02 Bob Duff <duff@adacore.com>
3095
3096 * einfo.adb: (Has_Xref_Entry): Do not call
3097 Implementation_Base_Type. Lib.Xref has been
3098 rewritten to avoid the need for it, and it was costly.
3099 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
3100 functions in support of efficient xref.
3101 * lib-xref-alfa.adb: Misc changes related to Key component of
3102 type Xref_Entry.
3103 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
3104 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
3105 no longer does. This is the one place where it is needed.
3106
3107 2011-09-02 Johannes Kanig <kanig@adacore.com>
3108
3109 * g-comlin.adb (Getopt): New optional argument Concatenate to have
3110 similar interface as the other Getopt function.
3111
3112 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3113
3114 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
3115 a call to Set_Finalize_Address if there is no allocator available.
3116 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
3117 a case of allocator expansion where the allocator is not expanded but
3118 needs a custom allocate routine. Code reformatting.
3119 (Is_Finalizable_Transient): Remove local variables Has_Rens and
3120 Ren_Obj. Code reformatting.
3121 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
3122 through the use of 'reference.
3123 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
3124 as part of build-in-place expansion. They are intentionally marked as
3125 coming from source, but their parents are not.
3126
3127 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3128
3129 * sem_ch10.adb (Analyze_With_Clause): If the library unit
3130 is the generated subprogram declaration for a child unit body
3131 that acts as spec, use the original body in the with_clause,
3132 to prevent binding errors.
3133
3134 2011-09-02 Vincent Celier <celier@adacore.com>
3135
3136 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
3137 qualifier /MULTI_UNIT_INDEX=
3138
3139 2011-09-02 Johannes Kanig <kanig@adacore.com>
3140
3141 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
3142 instead of calling the callback function
3143
3144 2011-09-02 Robert Dewar <dewar@adacore.com>
3145
3146 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
3147 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
3148
3149 2011-09-02 Vincent Celier <celier@adacore.com>
3150
3151 * prj-nmsc.adb: (Find_Sources): When the list of sources is
3152 explicitly declared in an extending project, do not warn if a source
3153 for an inherited naming exception is not found.
3154
3155 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3156
3157 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
3158 expansion is inactive.
3159
3160 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3161
3162 * sem_util.adb (Note_Possible_Modification): If the entity
3163 being modified is the renaming generated for an Ada2012 iterator
3164 element, the enclosing container or array is modified as well.
3165
3166 2011-09-02 Jose Ruiz <ruiz@adacore.com>
3167
3168 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
3169 Initialize): Define and initialize the
3170 mutex attributes and condition variable attributes locally.
3171
3172 2011-09-02 Vincent Celier <celier@adacore.com>
3173
3174 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
3175 exception replaced in an extending project.
3176 (Check_Object): No error when the other source is locally removed.
3177
3178 2011-09-02 Yannick Moy <moy@adacore.com>
3179
3180 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
3181 unresolved calls.
3182
3183 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3184
3185 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
3186 run-time files.
3187 * gcc-interface/Make-lang.in: Update dependencies.
3188
3189 2011-09-01 Robert Dewar <dewar@adacore.com>
3190
3191 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
3192
3193 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3194
3195 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
3196 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
3197 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
3198 specific for systems where their glibc version does not define the
3199 routines to handle dynamically allocated CPU sets.
3200
3201 2011-09-01 Vincent Celier <celier@adacore.com>
3202
3203 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
3204 prj-env.adb: Implement inheritance of naming exceptions in extending
3205 projects.
3206
3207 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
3208
3209 * gnatls.adb: Display simple message instead of content of
3210 gnatlic.adl.
3211
3212 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3213
3214 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
3215 access discriminant and anonymous access component scopes.
3216 (Inherit_Component): Reuse the itype of an access discriminant
3217 or anonymous access component by copying it in order to set the proper
3218 scope. This is done only when the parent and the derived type
3219 are in different scopes.
3220 (Set_Anonymous_Etype): New routine.
3221
3222 2011-09-01 Robert Dewar <dewar@adacore.com>
3223
3224 * a-convec.adb: Minor reformatting throughout.
3225
3226 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3227
3228 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
3229 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
3230 CPU_ALLOC_SIZE and CPU_FREE linux macros.
3231 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
3232 CPU_SET_S respectively because we are now using dynamically allocated
3233 CPU sets which are more portable across different glibc versions.
3234 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
3235 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
3236 masks dynamically according to the number of processors in the target
3237 platform.
3238 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
3239 respectively, so we need to pass the size of the masks as
3240 parameters.
3241 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
3242 created cpu_set_t masks
3243 with the number of processors available in the target platform,
3244 instead of static bit arrays. It enhances portability because
3245 it uses the information from the target platform.
3246 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
3247 are using a restricted run-time library, use the flag
3248 Configurable_Run_Time_Mode instead of Restricted_Profile.
3249
3250 2011-09-01 Vincent Celier <celier@adacore.com>
3251
3252 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
3253 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
3254
3255 2011-09-01 Nicolas Roche <roche@adacore.com>
3256
3257 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
3258 on VxWorks in kernel mode.
3259
3260 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3261
3262 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
3263 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
3264 directly the bit array.
3265 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
3266 the linux macros with the same name.
3267 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
3268 wrappers around the CPU_ZERO and CPU_SET linux macros.
3269
3270 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3271
3272 * exp_ch7.adb (Find_Insertion_List): Removed.
3273 (Process_Transient_Objects): Insert the declarations of the hook
3274 access type and the hook object before the associated transient object.
3275
3276 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3277
3278 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
3279 package System.Aux_Dec when using restricted run-time libraries which
3280 do not have this package.
3281
3282 2011-09-01 Tristan Gingold <gingold@adacore.com>
3283
3284 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
3285
3286 2011-09-01 Bob Duff <duff@adacore.com>
3287
3288 * sem_attr.adb (Analyze_Access_Attribute): Do not call
3289 Kill_Current_Values for P'Unrestricted_Access, where P is library level
3290
3291 2011-09-01 Thomas Quinot <quinot@adacore.com>
3292
3293 * exp_ch5.adb: Minor reformatting
3294 * gnat_ugn.texi: Fix minor typos.
3295 * gcc-interface/Make-lang.in: Update dependencies.
3296
3297 2011-09-01 Robert Dewar <dewar@adacore.com>
3298
3299 * inline.adb, sem_aggr.adb: Minor reformatting.
3300
3301 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3302
3303 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
3304
3305 2011-09-01 Robert Dewar <dewar@adacore.com>
3306
3307 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
3308
3309 2011-09-01 Bob Duff <duff@adacore.com>
3310
3311 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
3312 body" the same as "in inlined body", because visibility shouldn't
3313 apply there.
3314
3315 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
3316
3317 * inline.adb (Add_Inlined_Body): Refine previous change.
3318
3319 2011-09-01 Gary Dismukes <dismukes@adacore.com>
3320
3321 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
3322 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3323 Test for case where call
3324 initializes an object of a return statement before testing for
3325 a constrained call, to ensure that all such cases get handled
3326 by simply passing on the caller's parameters. Also, in that
3327 case call Needs_BIP_Alloc_Form to determine whether to pass on
3328 the BIP_Alloc_Form parameter of the enclosing function rather
3329 than testing Is_Constrained. Add similar tests for the return
3330 of a BIP call to later processing to ensure consistent handling.
3331 (Needs_BIP_Alloc_Form): New utility function.
3332 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
3333 a BIP_Alloc_Form formal with call to new utility function
3334 Needs_BIP_Alloc_Form.
3335
3336 2011-09-01 Pascal Obry <obry@adacore.com>
3337
3338 * prj-part.adb: Minor reformatting.
3339
3340 2011-09-01 Vincent Celier <celier@adacore.com>
3341
3342 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
3343 half character in the unit name.
3344
3345 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3346
3347 * exp_ch4.adb: Minor code and comment reformatting.
3348
3349 2011-09-01 Thomas Quinot <quinot@adacore.com>
3350
3351 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
3352 for Is_Limited_Type and Is_Tagged_Type in condition checking
3353 for by-reference type.
3354 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
3355 subprograms may have a completion because of a previous
3356 Inline_Always clause, but the enclosing package must be marked
3357 inlined for the subprogram body to become visible to the backend.
3358
3359 2011-09-01 Thomas Quinot <quinot@adacore.com>
3360
3361 * sem_aux.adb, exp_ch4.adb: Minor reformatting
3362
3363 2011-09-01 Pascal Obry <obry@adacore.com>
3364
3365 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
3366
3367 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3368
3369 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
3370 the formals of a subprogram stub that acts as a spec.
3371
3372 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3373
3374 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
3375 type, declare a renaming for it, not an object declaration.
3376
3377 2011-09-01 Yannick Moy <moy@adacore.com>
3378
3379 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
3380 Ignore_Errors to ignore failures to read ALI files when True.
3381
3382 2011-09-01 Javier Miranda <miranda@adacore.com>
3383
3384 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
3385 constructor calls associated with non-tagged record types.
3386
3387 2011-09-01 Robert Dewar <dewar@adacore.com>
3388
3389 * g-socthi-vms.adb: Minor reformatting.
3390
3391 2011-09-01 Nicolas Roche <roche@adacore.com>
3392
3393 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
3394 in order to avoid impact of imcompatible changes.
3395 * cstreams.c: Likewise
3396 * cio.c: Likewise
3397 * aux-io.c: Likewise
3398
3399 2011-09-01 Yannick Moy <moy@adacore.com>
3400
3401 * lib-writ.adb (Write_With_Lines): Always output complete information
3402 on "with" line in Alfa mode, as this is required by formal verification
3403 back-end.
3404
3405 2011-09-01 Tristan Gingold <gingold@adacore.com>
3406
3407 * g-socthi-vms.adb: Add comments.
3408
3409 2011-09-01 Pascal Obry <obry@adacore.com>
3410
3411 * prj.ads: Minor reformatting.
3412
3413 2011-09-01 Vincent Celier <celier@adacore.com>
3414
3415 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
3416 exceptions in the config pragmas file.
3417
3418 2011-09-01 Tristan Gingold <gingold@adacore.com>
3419
3420 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3421
3422 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3423
3424 * exp_ch7.adb (Find_Insertion_List): New routine.
3425 (Process_Transient_Objects): Add code to handle the abnormal
3426 finalization of a controlled transient associated with a subprogram
3427 call. Since transients are cleaned up right after the associated
3428 context, an exception raised during a subprogram call may bypass the
3429 finalization code.
3430
3431 2011-09-01 Robert Dewar <dewar@adacore.com>
3432
3433 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3434 aliased.
3435
3436 2011-09-01 Robert Dewar <dewar@adacore.com>
3437
3438 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3439
3440 2011-09-01 Robert Dewar <dewar@adacore.com>
3441
3442 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3443
3444 2011-09-01 Thomas Quinot <quinot@adacore.com>
3445
3446 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3447 GNATRTL_NONTASKING_OBJS.
3448
3449 2011-09-01 Robert Dewar <dewar@adacore.com>
3450
3451 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3452 possibility of this flag being set for formals in Ada 2012 mode.
3453 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3454 2012.
3455 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3456 mode.
3457 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3458 Ada 2012.
3459 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3460 Ada 2012.
3461
3462 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3463
3464 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3465 insertion node in a tree of nested Expression_With_Actions nodes.
3466 (Process_Transient_Object): In the case where a complex if statement
3467 has been converted into nested Expression_With_Actions nodes, the
3468 "hook" object and the associated access type must be inserted before
3469 the top most Expression_With_Actions.
3470
3471 2011-09-01 Robert Dewar <dewar@adacore.com>
3472
3473 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3474 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3475
3476 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3477
3478 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3479
3480 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3481
3482 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3483 aspect.
3484 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3485 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3486 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3487 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3488 Dispatching_Domains_Frozen): Move this local data to package
3489 System.Tasking because with the CPU aspect we need to have access
3490 to this data when creating the task in System.Tasking.Stages.Create_Task
3491 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3492 Move these variables from the body of
3493 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3494 we need to have access to this data when creating the task in
3495 System.Tasking.Stages.Create_Task.
3496 * s-taskin.adb (Initialize): Signal the allocation of the environment
3497 task to a CPU, if any, so that we know whether the CPU can be
3498 transferred to a different dispatching domain.
3499 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3500 is being allocated belongs to the dispatching domain where the task
3501 lives. Signal the allocation of the task to a CPU, if any, so that we
3502 know whether the CPU can be transferred to a different dispatching
3503 domain.
3504
3505 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3506
3507 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3508 attributes Same_Storage and Overlaps_Storage.
3509
3510 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3511
3512 * exp_strm.adb: Remove with and use clause for Opt.
3513 (Build_Array_Input_Function): Remove the version-dependent generation
3514 of the return statement. The Ada 2005 tree is now the default.
3515
3516 2011-09-01 Yannick Moy <moy@adacore.com>
3517
3518 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3519 it is never empty when compiling in Alfa mode.
3520
3521 2011-09-01 Robert Dewar <dewar@adacore.com>
3522
3523 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3524 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3525 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3526 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3527
3528 2011-09-01 Matthew Heaney <heaney@adacore.com>
3529
3530 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3531 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3532 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3533 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3534 unbounded queue container.
3535 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3536 bounded queue container.
3537 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3538 unbounded priority queue container.
3539 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3540 bounded priority queue container.
3541
3542 2011-08-31 Pascal Obry <obry@adacore.com>
3543
3544 * a-direct.adb: Do not try to create an UNC path on Windows.
3545 (Create_Path): Skip leading computer name in UNC path if any.
3546
3547 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3548
3549 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3550 version-dependent generation of the return statement. The Ada 2005 tree
3551 is now the default.
3552
3553 2011-08-31 Thomas Quinot <quinot@adacore.com>
3554
3555 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3556 types Stream_Element_Offset and Storage_Offset have a different native
3557 type depending on whether the platform is 32 or 64 bits. When
3558 exchanging them, always convert to 64 bits.
3559
3560 2011-08-31 Yannick Moy <moy@adacore.com>
3561
3562 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3563 --force-alfa to gnat2why.
3564
3565 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3566
3567 * sem_ch12.adb (Save_References): If the node has aspects, save
3568 references within the corresponding expressions in a separate step,
3569 because the aspects are not directly in the tree for the declaration
3570 to which they belong.
3571
3572 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3573
3574 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3575 in CodePeer mode, since representation clauses are partially ignored.
3576 * gcc-interface/Make-lang.in: Update dependencies.
3577
3578 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3579
3580 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3581 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3582 to any dispatching domain.
3583
3584 2011-08-31 Thomas Quinot <quinot@adacore.com>
3585
3586 * exp_ch4.adb: Minor reformatting.
3587
3588 2011-08-31 Bob Duff <duff@adacore.com>
3589
3590 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3591 on nodes for which it is not defined.
3592 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3593 parent type.
3594
3595 2011-08-31 Bob Duff <duff@adacore.com>
3596
3597 * sem_ch3.adb (Process_Full_View): Disable legality check if
3598 In_Instance, to avoid spurious errors.
3599 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3600 if In_Instance, to avoid spurious errors.
3601
3602 2011-08-31 Pascal Obry <obry@adacore.com>
3603
3604 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3605 directory speparators.
3606 (Compose): Use Dir_Seps to handle both forms.
3607 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3608 changes.
3609 (Extension): Use Dir_Seps to handle both forms.
3610
3611 2011-08-31 Pascal Obry <obry@adacore.com>
3612
3613 * prj-conf.adb: Minor reformatting.
3614
3615 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3616
3617 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3618 dispatching domain aspect.
3619 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3620 aspect.
3621 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3622 Dispatching_Domain aspect in a similar way as we do for the Priority
3623 aspect.
3624 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3625 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3626 is present.
3627 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3628 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3629 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3630 Dispatching_Domain and add it to the task definition.
3631 (Sig_Flags): Add Pragma_Dispatching_Domain.
3632 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3633 support to find the types Dispatching_Domain and
3634 Dispatching_Domain_Access.
3635 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3636 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3637 query the availability of a pragma Dispatching_Domain.
3638 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3639 the expander to pass the Dispatching_Domain when creating a task.
3640 (Name_Dispatching_Domain): Add this new name for a pragma.
3641 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3642 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3643 task has been allocated at creation time.
3644 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3645 Ravenscar is always null.
3646 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3647 the task has been allocated at creation time.
3648 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3649 a specific dispatching domain.
3650 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3651 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3652 and CPU are specified for the task, and the CPU value is not contained
3653 within the range of processors for the domain.
3654
3655 2011-08-31 Vincent Celier <celier@adacore.com>
3656
3657 * make.adb (Original_Gcc) : New constant String_Access.
3658 (Gnatmake): For VM targets, do not use VM version of the compiler if
3659 --GCC= has been specified.
3660
3661 2011-08-31 Thomas Quinot <quinot@adacore.com>
3662
3663 * sem_ch5.adb: Minor reformatting.
3664
3665 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3666
3667 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3668 not reanalyze it.
3669
3670 2011-08-31 Bob Duff <duff@adacore.com>
3671
3672 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3673 the access type is private; we don't care about privacy in expansion.
3674
3675 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3676
3677 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3678 subcomponents tnat may be limited, because they originate in view
3679 conflicts. If the original aggregate is legal and the actuals are
3680 legal, the aggregate itself is legal.
3681
3682 2011-08-31 Matthew Heaney <heaney@adacore.com>
3683
3684 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3685 status.
3686
3687 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3688
3689 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3690 errors in B tests.
3691
3692 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3693
3694 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3695 Interrupt_Priority aspects, force the analysis of the aspect expression
3696 (when building the equivalent pragma). Otherwise, its analysis is done
3697 too late, after the task or protected object has been created.
3698 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3699 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3700 to the object declaration because they are needed in the type
3701 declaration.
3702
3703 2011-08-31 Robert Dewar <dewar@adacore.com>
3704
3705 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3706 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3707 reformatting.
3708
3709 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3710
3711 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3712 if the corresponding type is malformed due to restriction violations.
3713
3714 2011-08-31 Robert Dewar <dewar@adacore.com>
3715
3716 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3717
3718 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3719
3720 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3721 would cause the generation of Set_Finalize_Address if the target is a
3722 VM and the designated type is not derived from [Limited_]Controlled.
3723
3724 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3725
3726 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3727 subprogram.
3728 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3729 case of a compilation error.
3730
3731 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3732
3733 * init.c (__gnat_error_handler): Standardize the stack overflow or
3734 erroneous memory access message.
3735 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3736 or erroneous memory access message.
3737
3738 2011-08-31 Robert Dewar <dewar@adacore.com>
3739
3740 * sem_ch4.adb: Minor reformatting.
3741 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3742
3743 2011-08-31 Thomas Quinot <quinot@adacore.com>
3744
3745 * scos.ads: Minor documentation clarification.
3746 * put_scos.adb: Do not generate SCO unit header line for a unit that
3747 has no SCO lines.
3748
3749 2011-08-31 Robert Dewar <dewar@adacore.com>
3750
3751 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3752
3753 2011-08-31 Tristan Gingold <gingold@adacore.com>
3754
3755 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3756 hold variables between these following subprograms.
3757 (Build_Exception_Handler, Build_Object_Declarations,
3758 Build_Raise_Statement): Use the above type as parameter.
3759 Make the above adjustments.
3760 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3761
3762 2011-08-31 Pascal Obry <obry@adacore.com>
3763
3764 * projects.texi: Minor reformatting.
3765
3766 2011-08-31 Tristan Gingold <gingold@adacore.com>
3767
3768 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3769 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3770
3771 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3772
3773 * exp_ch5.adb: Minor code cleanup.
3774 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3775 prevent cascaded errors.
3776 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3777 variable of an iterator specification in current scope.
3778 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3779 postconditions on the stack, as they contain no return statements.
3780
3781 2011-08-31 Yannick Moy <moy@adacore.com>
3782
3783 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3784 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3785 call Qualify_Entity_Names.
3786 (Expand_Alfa): call Qualify_Entity_Names in more cases
3787 * lib-xref-alfa.adb: Take into account system package.
3788 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3789 CodePeer mode in which we are interested in finding bugs even if
3790 compiler cannot compile source.
3791 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3792 deferred constant.
3793
3794 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3795
3796 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3797 denoted by the subtype mark to ensure getting the concurrent type in
3798 the case where the subtype mark denotes a private subtype of a
3799 concurrent type (needed when using -gnatc).
3800 (Process_Subtype): For the processing specific to type kinds, case on
3801 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3802 subtype denotes a private subtype whose base type is nonprivate (needed
3803 for subtypes of private fulfilled by task types when compiling with
3804 -gnatc).
3805
3806 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3807
3808 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3809 late primitives that override interface operations when the full
3810 expander is not active, to avoid blowups in Register_Primitive when
3811 types don't have associated secondary dispatch tables.
3812
3813 2011-08-31 Yannick Moy <moy@adacore.com>
3814
3815 * alfa_test.adb: Code clean up.
3816
3817 2011-08-31 Marc Sango <sango@adacore.com>
3818
3819 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3820 by Comes_From_Source (Original_Node (N)) in order to treat also the
3821 nodes which have been rewritten.
3822 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3823 explicit dereference and slice violation in spark mode on the nodes
3824 coming only from the source code.
3825
3826 2011-08-31 Robert Dewar <dewar@adacore.com>
3827
3828 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3829 lib-xref-alfa.adb: Minor reformatting.
3830
3831 2011-08-31 Matthew Heaney <heaney@adacore.com>
3832
3833 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3834
3835 2011-08-31 Javier Miranda <miranda@adacore.com>
3836
3837 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3838 only for class-wide subprograms conflicting with entities of concurrent
3839 tagged types.
3840
3841 2011-08-31 Matthew Heaney <heaney@adacore.com>
3842
3843 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3844 node to null value.
3845
3846 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3847
3848 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3849 general description of the routine.
3850
3851 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3852
3853 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3854 doubly-linked lists.
3855
3856 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3857
3858 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3859 check is needed for a left-hand side that is a dereference, and the
3860 base type is private without discriminants (whereas the full type does
3861 have discriminants), an extra retrieval of the underlying type may be
3862 needed in the case where the subtype is a record subtype whose base
3863 type is private. Update comments.
3864
3865 2011-08-31 Javier Miranda <miranda@adacore.com>
3866
3867 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3868 found check if there is a class-wide subprogram covering the primitive.
3869
3870 2011-08-31 Yannick Moy <moy@adacore.com>
3871
3872 * sem_res.adb: Further cases where full expansion test is needed,
3873 rather than expansion test.
3874
3875 2011-08-31 Pascal Obry <obry@adacore.com>
3876
3877 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3878
3879 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3880
3881 * exp_ch5.adb: Handle iterators over derived container types.
3882
3883 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3884
3885 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3886 (Has_Anonymous_Master): New routine.
3887 (Set_Has_Anonymous_Master): New routine.
3888 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3889 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3890 (Current_Anonymous_Master): New routine.
3891 (Current_Unit_First_Declaration): Removed.
3892 (Current_Unit_Scope): Removed.
3893 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3894 their objects on a per-unit heterogeneous finalization master.
3895
3896 2011-08-31 Matthew Heaney <heaney@adacore.com>
3897
3898 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3899 array.
3900
3901 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3902
3903 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3904 when not needed.
3905
3906 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3907
3908 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3909 where the actual is an unexpanded call to 'Input.
3910
3911 2011-08-31 Yannick Moy <moy@adacore.com>
3912
3913 * sem_ch4.adb: Code clean up.
3914
3915 2011-08-31 Yannick Moy <moy@adacore.com>
3916
3917 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3918
3919 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3920
3921 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3922 and TSS primitive Finalize_Address if finalization is suppressed.
3923 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3924 primitive Finalize_Address if finalization is suppressed.
3925
3926 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3927
3928 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3929 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3930 sure that the underlying task has already been created before trying
3931 to change its affinity.
3932 (Set_CPU): Use the term processor instead of CPU, as we do in
3933 Assign_Task.
3934
3935 2011-08-31 Vincent Celier <celier@adacore.com>
3936
3937 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3938 * prj-nmsc.adb (Process_Compiler): Process attribute
3939 Source_File_Switches.
3940 * prj.ads (Language_Config): New name list component
3941 Name_Source_File_Switches.
3942 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3943
3944 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3945
3946 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3947 discriminated component of an actual, expand at once to prevent
3948 ouf-of-order references with generated subtypes.
3949
3950 2011-08-31 Yannick Moy <moy@adacore.com>
3951
3952 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3953 reference to operator in Alfa xrefs.
3954
3955 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3956
3957 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3958 where the parent instance was frozen before the current instance due to
3959 the presence of a source body. Update calls to Insert_After_Last_Decl.
3960 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3961 Update the comment which illustrates the purpose of the routine.
3962 Package instances are now frozen by source bodies which appear after
3963 the instance. This ensures that entities coming from within the
3964 instance are available for use in the said bodies.
3965 (Install_Body): Add code to handle the case where the parent instance
3966 was frozen before the current instance due to the presence of a source
3967 body. Update calls to Insert_After_Last_Decl.
3968
3969 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3970
3971 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3972 access types.
3973 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3974
3975 2011-08-31 Yannick Moy <moy@adacore.com>
3976
3977 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3978 full-expander test.
3979 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3980 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3981 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3982 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3983 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3984 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3985 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3986 ALFA in Alfa (we dropped acronym).
3987 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3988 operations in a case where it returned previously No_Elist.
3989
3990 2011-08-31 Robert Dewar <dewar@adacore.com>
3991
3992 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3993 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3994 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3995 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3996 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3997 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3998 reformatting.
3999
4000 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4001
4002 * sem_ch12 (Check_Private_View): Revert previous change.
4003 * sem_res.adb (Conversion_Check): Do not emit the error message if the
4004 conversion is in a generic instance.
4005
4006 2011-08-31 Matthew Heaney <heaney@adacore.com>
4007
4008 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
4009 * a-chtgbo.adb (Free): Allow 0 as index value.
4010
4011 2011-08-31 Matthew Heaney <heaney@adacore.com>
4012
4013 * a-cborma.adb (Insert): Add comment to explain why no element
4014 assignment.
4015
4016 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4017
4018 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
4019 spec discriminant is already a concurrent type, in which case just use
4020 it, otherwise fetch the Corresponding_Concurrent_Type as before.
4021
4022 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4023
4024 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4025 system-linux-mips.ads, system-linux-mipsel.ads,
4026 system-linux-mips64el.ads, system-linux-ppc64.ads,
4027 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4028
4029 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4030
4031 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4032 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4033 (build_unary_op): Likewise.
4034
4035 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4036
4037 * raise-gcc.c: Do not include coretypes.h and tm.h.
4038 (setup_to_install): Remove test for compiler macro.
4039 * targext.c: Document use for the library.
4040 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
4041
4042 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4043
4044 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
4045 the expression to the nominal type if the latter is a record type with
4046 a variant part and the type of the former is a record type without one.
4047
4048 2011-08-30 Yannick Moy <moy@adacore.com>
4049
4050 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4051 expansion in Alfa mode.
4052 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
4053 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
4054 Alfa mode.
4055 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
4056 * sem_res.adb: Ditto.
4057 * gcc-interface/Make-lang.in: Update dependencies.
4058
4059 2011-08-30 Thomas Quinot <quinot@adacore.com>
4060
4061 * g-socket.ads: Minor documentation adjustment.
4062
4063 2011-08-30 Robert Dewar <dewar@adacore.com>
4064
4065 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
4066
4067 2011-08-30 Yannick Moy <moy@adacore.com>
4068
4069 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
4070 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
4071 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
4072 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
4073 Revert change which introduced files for "light"
4074 expansion, to be replaced by a single file for Alfa expansion.
4075
4076 2011-08-30 Robert Dewar <dewar@adacore.com>
4077
4078 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
4079 Minor code reorg/reformatting.
4080
4081 2011-08-30 Yannick Moy <moy@adacore.com>
4082
4083 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
4084 common shorthand for (Expander_Active and not ALFA_Mode) that can be
4085 used for testing full expansion, that is active expansion not in the
4086 reduced mode for Alfa
4087 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
4088 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
4089 of the verbose (Expander_Active and not ALFA_Mode)
4090
4091 2011-08-30 Tristan Gingold <gingold@adacore.com>
4092
4093 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
4094 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
4095 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
4096 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
4097
4098 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4099
4100 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
4101 access conversions to check that the conversion is a rewritten node,
4102 rather than just having Comes_From_Source set to False, which wasn't
4103 sufficient.
4104
4105 2011-08-30 Robert Dewar <dewar@adacore.com>
4106
4107 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
4108 g-socket.ads: Minor reformatting.
4109
4110 2011-08-30 Thomas Quinot <quinot@adacore.com>
4111
4112 * sem_util.adb: Minor reformatting.
4113
4114 2011-08-30 Tristan Gingold <gingold@adacore.com>
4115
4116 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
4117 to be compliant with the ABI.
4118
4119 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4120
4121 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
4122 of a designated type when the related access type is an actual in an
4123 instance. This ensures that the full view of designated type is
4124 available when inside the body of the instance.
4125
4126 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4127
4128 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
4129 in a position to be modified, a slice is treated like an indexed
4130 component.
4131
4132 2011-08-30 Thomas Quinot <quinot@adacore.com>
4133
4134 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
4135 field tv_sec in struct timeval.
4136
4137 2011-08-30 Yannick Moy <moy@adacore.com>
4138
4139 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
4140 blocks of code doing full expansion, previously only guarded by
4141 Expander_Active, by anding the test that ALFA_Mode is not set
4142
4143 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4144
4145 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
4146 add the function to the list of private dependents, for subsequent
4147 legality check on Taft amendment types.
4148 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
4149 Private_Dependents, as for other incomplete types.
4150 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
4151 Taft-amendment type is used as the return type of a function.
4152
4153 2011-08-30 Javier Miranda <miranda@adacore.com>
4154
4155 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
4156 which emits an error by a call to a new routine which report the error.
4157 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
4158 entity does not cover an existing interface.
4159 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
4160 code.
4161 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
4162 protected procedures or entries whose mode is not conformant.
4163 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
4164 an error by a call to a new routine which report the error.
4165
4166 2011-08-30 Robert Dewar <dewar@adacore.com>
4167
4168 * gnat_rm.texi: Minor change.
4169 * exp_attr_light.adb: Minor reformatting.
4170
4171 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4172
4173 * sem_ch3.adb: Patch inheritance of aspects in
4174 Complete_Private_Subtype, to avoid infinite loop.
4175
4176 2011-08-30 Javier Miranda <miranda@adacore.com>
4177
4178 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
4179 been reported and a subprogram covering an interface primitive is not
4180 found then skip generating the internal entity. Done to avoid crashing
4181 the frontend.
4182 (Check_Abstract_Overriding): Change text of error of wrong formal of
4183 protected subprogram or entry. Done for consistency to emit exactly the
4184 same error reported by Check_Synchronized_Overriding. In addition, the
4185 error is restricted to protected types (bug found working on AI05-0090)
4186
4187 2011-08-30 Yannick Moy <moy@adacore.com>
4188
4189 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4190 expansion in Alfa mode.
4191 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
4192 * exp_light.adb, exp_light.ads: New package defining light expansion.
4193 * expander.adb (Expand): Call light expansion in Alfa mode
4194 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
4195 constructs.
4196 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
4197 constructs.
4198 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
4199 * gnat1drv.adb (Adjust_Global_Switches): Comment
4200
4201 2011-08-30 Yannick Moy <moy@adacore.com>
4202
4203 * lib-xref-alfa.adb: Minor refactoring.
4204
4205 2011-08-30 Yannick Moy <moy@adacore.com>
4206
4207 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
4208 mode.
4209 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
4210 expansion in Alfa mode.
4211 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
4212 mode.
4213
4214 2011-08-30 Robert Dewar <dewar@adacore.com>
4215
4216 * debug_a.adb: Update comment.
4217
4218 2011-08-30 Robert Dewar <dewar@adacore.com>
4219
4220 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
4221 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
4222 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
4223 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
4224
4225 2011-08-30 Robert Dewar <dewar@adacore.com>
4226
4227 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
4228 volatile.
4229
4230 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4231
4232 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
4233 Build_Finalization_Master by supplying an insertion node and enclosing
4234 scope. In its old version, the call did not generate a finalization
4235 master.
4236 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
4237 recognize anonymous access-to-controlled components. Rewrite the
4238 machinery which creates finalization masters to service anonymous
4239 access-to-controlled components of a record type. In its current state,
4240 only one heterogeneous master is necessary to handle multiple anonymous
4241 components.
4242 (Freeze_Type): Comment reformatting.
4243 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
4244 RE_Unit_Table.
4245 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
4246 associates TSS primitive Finalize_Address with either the master itself
4247 or with the internal hash table depending on the mode of operation of
4248 the master.
4249
4250 2011-08-30 Javier Miranda <miranda@adacore.com>
4251
4252 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
4253 interface type then do not generate code to compare this component.
4254 Required since they have no components and their equality operator is
4255 abstract.
4256
4257 2011-08-30 Steve Baird <baird@adacore.com>
4258
4259 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
4260 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
4261 returns the (static) accessibility level of the object. Otherwise, the
4262 same as Type_Access_Level.
4263 (Dynamic_Accessibility_Level): New function; given an expression which
4264 could occur as the rhs of an assignment to a saooaaat (i.e., an
4265 expression of an access-to-object type), return the new value for the
4266 saooaaat's associated Extra_Accessibility object.
4267 (Effective_Extra_Accessibility): New function; same as
4268 Einfo.Extra_Accessibility except that object renames are looked through.
4269 * sem_util.adb
4270 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
4271 (Dynamic_Accessibility_Level): New function; see sem_util.ads
4272 description.
4273 (Effective_Extra_Accessibility): New function; see sem_util.ads
4274 description.
4275 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
4276 (Extra_Accessibility): Update comments.
4277 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
4278 except RM_Size field (which is only for types) is unaffected.
4279 * einfo.adb
4280 (Extra_Accessibility): Expand domain to allow objects, not just formals.
4281 (Set_Extra_Accessibility): Expand domain to allow objects, not just
4282 formals.
4283 (Init_Size): Add assertion that we are not trashing the
4284 Extra_Accessibility attribute of an object.
4285 (Init_Size_Align): Add assertion that we are not trashing the
4286 Extra_Accessibility attribute of an object.
4287 (Init_Object_Size_Align): New procedure; see einfo.ads description.
4288 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
4289 differently for the type of a (non-library-level) saooaaat depending
4290 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
4291 is queried in this set of changes - everything else (in particular,
4292 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
4293 driven off of the setting of the Is_Local_Anonymous_Access attribute.
4294 The special treatment of library-level saooaaats is an optimization,
4295 not required for correctnesss. This is based on the observation that the
4296 Ada2012 rules (static and dynamic) for saooaaats turn out to be
4297 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
4298 * exp_ch3.adb
4299 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
4300 false for the type of a saooaaat, declare and initialize its
4301 accessibility level object and set the Extra_Accessibility attribute
4302 of the saooaaat to refer to this object.
4303 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
4304 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
4305 calls to Effective_Extra_Accessibility in order to support
4306 renames of saooaaats.
4307 (Expand_N_Type_Conversion): Add new local function,
4308 Has_Extra_Accessibility, and call it when determining whether an
4309 accessibility check is needed.
4310 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
4311 evaluate to True (without raising an exception).
4312 * exp_ch5.adb
4313 (Expand_N_Assignment_Statement): When assigning to an Ada2012
4314 saooaaat, update its associated Extra_Accessibility object (if
4315 it has one). This includes an accessibility check.
4316 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
4317 a saooaaat, update its Extra_Accessibility object too (if it
4318 has one).
4319 (Expand_Call): Replace a couple of calls to Type_Access_Level
4320 with calls to Dynamic_Access_Level to handle cases where
4321 passing a literal (any literal) is incorrect.
4322 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
4323 checks associated with "Saooaat := Some_Object'Access;"; this must
4324 be rejected if Some_Object is declared in a more nested scope
4325 than Saooaat.
4326 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
4327 assignment to a saooaaat even if Is_Local_Anonymous_Access
4328 returns False for its type (indicating a 2012-style saooaaat).
4329 * sem_ch8.adb
4330 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
4331 (which is only appropriate for objects, not types) with a call
4332 of Init_Object_Size_Align in order to avoid trashing the
4333 Extra_Accessibility attribute of a rename (the two attributes
4334 share storage).
4335 * sem_res.adb
4336 (Valid_Conversion) Replace six calls to Type_Access_Level with
4337 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
4338 Ada2012 non-library-level saooaaat, the former returns library level
4339 while the latter returns the (static) accessibility level of the
4340 saooaaat. A type conversion to the anonymous type of a saooaaat
4341 can only occur as part of an assignment to the saooaaat, so we
4342 know that such a conversion must be in a lhs context, so Deepest
4343 yields the result that we need. If such a conversion could occur,
4344 say, as the operand of an equality operator, then this might not
4345 be right. Also add a test so that static accessibilty checks are
4346 performed for converting to a saooaaat's type even if
4347 Is_Local_Anonymous_Access yields False for the type.
4348
4349 2011-08-30 Javier Miranda <miranda@adacore.com>
4350
4351 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
4352 controls generation of a warning associated with late declaration of
4353 dispatching functions. Required to avoid generating spurious
4354 warnings.
4355
4356 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4357
4358 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
4359 return object has an anonymous access type and the function's type is
4360 a named access type.
4361 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
4362 conversions on implicit conversions, since such conversions can occur
4363 for anonymous access cases due to expansion. Issue error for attempt
4364 to rename an anonymous expression as an object of a named access type.
4365 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
4366 to indicate whether this function should report errors on invalid
4367 conversions.
4368 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
4369 the expression is of an anonymous access type and the expected type is
4370 a named general access type, rewrite the expression as a type
4371 conversion, unless this is an expression of a membership test.
4372 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
4373 calling of Error_Msg_N on new formal Report_Errs.
4374 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
4375 calling of Error_Msg_NE on new formal Report_Errs.
4376 (Valid_Conversion): Move declaration of this function to the package
4377 spec, to allow calls from membership test processing. For Ada 2012,
4378 enforce legality restrictions on implicit conversions of anonymous
4379 access values to general access types, disallowing such conversions in
4380 cases where the expression has a dynamic accessibility level (access
4381 parameters, stand-alone anonymous access objects, or a component of a
4382 dereference of one of the first two cases).
4383 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
4384 in the context of a named general access expected type.
4385 * exp_ch4.adb Add with and use of Exp_Ch2.
4386 (Expand_N_In): Add processing for membership tests applied to
4387 expressions of an anonymous access type. First, Valid_Conversion is
4388 called to check whether the test is statically False, and then the
4389 conversion is expanded to test that the expression's accessibility
4390 level is no deeper than that of the tested type. In the case of
4391 anonymous access-to-tagged types, a tagged membership test is applied
4392 as well.
4393 (Tagged_Membership): Extend to handle access type cases, applying the
4394 test to the designated types.
4395 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
4396 accessibility level, and the actual is a 'Access applied to a current
4397 instance, pass the accessibility level of the type of the current
4398 instance rather than applying Object_Access_Level to the prefix. Add a
4399 ??? comment, since this level isn't quite right either (will eventually
4400 need to pass an implicit level parameter to init procs).
4401
4402 2011-08-30 Bob Duff <duff@adacore.com>
4403
4404 * s-taskin.ads: Minor comment fix.
4405
4406 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4407
4408 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
4409 component and the selector is a dispatching operation, check if it is
4410 a prefixed call before rewriting as a parameterless function call.
4411
4412 2011-08-29 Jakub Jelinek <jakub@redhat.com>
4413
4414 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
4415 tsystem.h into $(RTSDIR) instead of rts.
4416
4417 2011-08-29 Robert Dewar <dewar@adacore.com>
4418
4419 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4420 reformatting.
4421 * gcc-interface/Make-lang.in: Update dependencies.
4422
4423 2011-08-29 Yannick Moy <moy@adacore.com>
4424
4425 * alfa.ads (Name_Of_Heap_Variable): New constant name.
4426 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4427 table to hold dereferences.
4428 (Add_ALFA_Xrefs): Take into account dereferences as special
4429 reads/writes to the variable "HEAP".
4430 (Enclosing_Subprogram_Or_Package): Move subprogram here.
4431 (Generate_Dereference): New procedure to store a read/write dereferencew
4432 in the table Drefs.
4433 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4434 the special "HEAP" var.
4435 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4436 in ALFA mode.
4437 * sem_util.adb (Note_Possible_Modification): Store write dereference
4438 in ALFA mode.
4439
4440 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4441
4442 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4443 ensures that the level of the subpool access type is not deeper than
4444 that of the pool object.
4445 * sem_util.adb (Object_Access_Level): Expand to handle defining
4446 identifiers.
4447 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4448 subpool handle name of a rewritten allocator.
4449
4450 2011-08-29 Robert Dewar <dewar@adacore.com>
4451
4452 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4453
4454 2011-08-29 Thomas Quinot <quinot@adacore.com>
4455
4456 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4457 values, we generate multiple triples of parameters in the TypeCode.
4458 Bump Choice_Index for each such triple so that a subsequent default
4459 choice is associated with the correct index in the typecode.
4460
4461 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4462
4463 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4464 container.
4465 (First, Last): Handle properly an iterator over a null container.
4466
4467 2011-08-29 Bob Duff <duff@adacore.com>
4468
4469 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4470 processing if we run across a node with no Scope. This can happen if
4471 we're with-ing an library-level instance, and that instance got errors
4472 that caused "instantiation abandoned".
4473 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4474 an exception instead of using Assert, so it won't go into an infinite
4475 loop, even when assertions are turned off.
4476
4477 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4478
4479 * a-coorse.adb: Proper handling of empty ordered sets.
4480
4481 2011-08-29 Johannes Kanig <kanig@adacore.com>
4482
4483 * debug.adb: Add comments.
4484
4485 2011-08-29 Thomas Quinot <quinot@adacore.com>
4486
4487 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4488 reformatting.
4489
4490 2011-08-29 Yannick Moy <moy@adacore.com>
4491
4492 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4493 declaration for Itypes in Alfa mode.
4494
4495 2011-08-29 Robert Dewar <dewar@adacore.com>
4496
4497 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4498 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4499 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4500 reformatting.
4501
4502 2011-08-29 Tristan Gingold <gingold@adacore.com>
4503
4504 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4505 package spec.
4506 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4507 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4508 while raising PE.
4509
4510 2011-08-29 Robert Dewar <dewar@adacore.com>
4511
4512 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4513
4514 2011-08-29 Javier Miranda <miranda@adacore.com>
4515
4516 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4517 renamings of formal subprograms when the actual for a formal type is
4518 class-wide.
4519
4520 2011-08-29 Matthew Heaney <heaney@adacore.com>
4521
4522 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4523 to Target.
4524
4525 2011-08-29 Matthew Heaney <heaney@adacore.com>
4526
4527 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4528 components of record type.
4529 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4530 to Target.
4531
4532 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4533
4534 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4535 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4536 container packages.
4537
4538 2011-08-29 Robert Dewar <dewar@adacore.com>
4539
4540 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4541 reformatting.
4542
4543 2011-08-29 Matthew Heaney <heaney@adacore.com>
4544
4545 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4546 components of record type.
4547
4548 2011-08-29 Bob Duff <duff@adacore.com>
4549
4550 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4551 by the termination handler.
4552
4553 2011-08-29 Yannick Moy <moy@adacore.com>
4554
4555 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4556 created in Alfa mode, instead of inserting artificial declarations of
4557 non-Itypes in the tree.
4558 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4559 know if an Itype has a corresponding declaration, as defined in
4560 itypes.ads.
4561
4562 2011-08-29 Yannick Moy <moy@adacore.com>
4563
4564 * gnat1drv.adb: Minor rewrite.
4565
4566 2011-08-29 Bob Duff <duff@adacore.com>
4567
4568 * s-tasuti.adb (Make_Passive): Work around race condition in
4569 Make_Independent, which can cause Wait_Count to be zero. So instead of
4570 asserting that Wait_Count > 0, and then decrementing it, decrement it
4571 only if Wait_Count > 0.
4572 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4573 should be nonnegative, so declare them Natural instead of Integer.
4574
4575 2011-08-29 Robert Dewar <dewar@adacore.com>
4576
4577 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4578 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4579 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4580 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4581 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4582
4583 2011-08-29 Tristan Gingold <gingold@adacore.com>
4584
4585 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4586
4587 2011-08-29 Vadim Godunko <godunko@adacore.com>
4588
4589 * s-parint.ads: Minor comment clarification.
4590
4591 2011-08-29 Vincent Celier <celier@adacore.com>
4592
4593 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4594 may be used as identifiers.
4595
4596 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4597
4598 * a-coinho.ads: Minor reformating.
4599
4600 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4601
4602 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4603 container of a derived type.
4604
4605 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4606
4607 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4608 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4609
4610 2011-08-29 Pascal Obry <obry@adacore.com>
4611
4612 * exp_disp.adb: Minor comment fix.
4613 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4614 to avoid warnings when compiling with -Wall.
4615 (Make_Disp_Conditional_Select_Body): Likewise.
4616 (Make_Disp_Timed_Select_Body): Likewise.
4617
4618 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4619
4620 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4621 an entity name, generate reference for it.
4622
4623 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4624
4625 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4626 iterator form.
4627 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4628 the class-wide type.
4629 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4630
4631 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4632
4633 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4634 subtype for an object whose type is an unconstrained union.
4635
4636 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4637
4638 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4639 is allowed in a component definition, by AI95-406.
4640
4641 2011-08-29 Matthew Heaney <heaney@adacore.com>
4642
4643 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4644
4645 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4646
4647 * a-except-2005.adb: Alphabetize all routines.
4648 (Triggered_By_Abort): New routine.
4649 * a-except-2005.ads (Triggered_By_Abort): New routine.
4650 * a-except.adb Alphabetize all routines.
4651 (Triggered_By_Abort): New routine.
4652 * a-except.ads (Triggered_By_Abort): New routine.
4653 * exp_ch7.adb: Update all comments involving the detection of aborts in
4654 finalization code.
4655 (Build_Object_Declarations): Do not generate code to detect the
4656 presence of an abort at the start of finalization code, use a runtime
4657 routine istead.
4658 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4659 RE_Unit_Table.
4660 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4661 allocate a task on a subpool.
4662 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4663 The flag disables all actions related to the maintenance of
4664 Finalize_Address_Table when subpools are not in use.
4665 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4666 use.
4667 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4668 performs costly task locking when subpools are not in use.
4669
4670 2011-08-29 Yannick Moy <moy@adacore.com>
4671
4672 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4673 types and dispatching calls in Alfa mode.
4674 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4675 correspondance between body and spec scopes, to reuse utility functions
4676 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4677 by testing the presence of the library unit for the body
4678 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4679 mode the expansion of accept statements is skipped
4680 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4681 the unique entity corresponding to the one returned by
4682 Unique_Defining_Entity applied to the enclosing declaration of the
4683 argument.
4684
4685 2011-08-29 Bob Duff <duff@adacore.com>
4686
4687 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4688 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4689 an alias for pn. ppp is an alias for pt.
4690
4691 2011-08-29 Javier Miranda <miranda@adacore.com>
4692
4693 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4694 aggregate to take a consistent decision on the need to convert into
4695 assignments aggregates that initialize constant objects.
4696
4697 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4698
4699 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4700 Build_Allocate_Deallocate_Proc in order to handle allocation of
4701 non-controlled objects on subpools.
4702 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4703 to be end-user visible.
4704 * s-finmas.adb: Add with and use clause for System.HTable.
4705 Add an instantiation of Simple_HTable which provides a mapping between
4706 the address of a controlled object and the corresponding
4707 Finalize_Address used to clean up the object. The table is used when a
4708 master is operating in heterogeneous mode.
4709 (Attach): Explain why the input node is not verified on being already
4710 attached.
4711 (Delete_Finalize_Address): New routine.
4712 (Detach): Add pragma Assert which ensures that a node is already
4713 attached.
4714 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4715 since nodes are no longer removed on traversal. Explain why node
4716 detachment is undesirable in this case.
4717 (Get_Finalize_Address): New routine.
4718 (Hash): New routine.
4719 (Is_Empty_List): Removed.
4720 (pm): Renamed to Print_Master. Add output for discriminant
4721 Is_Homogeneous.
4722 Comment reformatting.
4723 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4724 * s-finmas.ads: Various comments additions / improvements.
4725 Type Finalization_Master has a discriminant which determines the mode of
4726 operation.
4727 (Delete_Finalize_Address): New routine.
4728 (Get_Finalize_Address): New routine.
4729 (pm): Renamed to Print_Master.
4730 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4731 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4732 use clause for System.IO.
4733 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4734 Finalize_Address depending on the mode of allocation and the mode of
4735 the master.
4736 (Deallocate_Any_Controlled): Remove the relation pair object -
4737 Finalize_Address regardless of the master mode. Add comment explaining
4738 the reason.
4739 (Detach): Ensure that fields Prev and Next are null after detachment.
4740 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4741 scheme to check whether the list of subpools is empty. There is no
4742 longer need to store the next subpool or advance the current pointer.
4743 (Is_Empty_List): New routine.
4744 (Print_Pool): New routine.
4745 (Print_Subpool): New routine.
4746 * s-stposu.ads: Various comments additions / improvements.
4747 Field Master of type Root_Subpool is now a heterogeneous collection.
4748 (Print_Pool): New routine.
4749 (Print_Subpool): New routine.
4750
4751 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4752
4753 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4754 forms, using aspects of container types.
4755 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4756 Has_Implicit_Dereference flags, that may be set on the partial view.
4757 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4758 container type with an indexing aspect.
4759 (Analyze_Quantified_Expression): Analyze construct with expansion
4760 disabled, because it will be rewritten as a loop during expansion.
4761 (Try_Container_Indexing): The prefix itself may be a container type
4762 with an indexing aspect, as with a vector of vectors.
4763 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4764 the original doamin of iteration, for name capture.
4765 (Analyze_Iterator_Specification): If the domain is an expression that
4766 needs finalization, create a separate declaration for it.
4767 For an iterator with "of" retrieve default iterator info from aspect of
4768 container type. For "in" iterator, retrieve type of Iterate function.
4769 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4770 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4771 analysis, to prevent spurious errors about late attributes.
4772 * sprint.adb: Handle quantified expression with either loop or iterator
4773 specification.
4774 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4775 iterator.
4776
4777 2011-08-29 Vincent Celier <celier@adacore.com>
4778
4779 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4780 Binder or Linker of the main project file.
4781
4782 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4783
4784 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4785 unit.
4786
4787 2011-08-29 Yannick Moy <moy@adacore.com>
4788
4789 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4790
4791 2011-08-29 Yannick Moy <moy@adacore.com>
4792
4793 * exp_ch11.adb: Minor expansion of comment.
4794
4795 2011-08-29 Yannick Moy <moy@adacore.com>
4796
4797 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4798
4799 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4800
4801 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4802 interpretation, set the type before resolving the operands, because
4803 legality checks on an exponention operand need to know the type of the
4804 context.
4805
4806 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4807
4808 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4809 cleanups on a master if the instance is within a generic unit.
4810 Complement to the corresponding fix to inline.adb for K520-030.
4811
4812 2011-08-29 Tristan Gingold <gingold@adacore.com>
4813
4814 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4815 occurrence.
4816 * exp_intr.adb: Minor comment fix.
4817
4818 2011-08-29 Bob Duff <duff@adacore.com>
4819
4820 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4821 Delay_Required was used as an uninitialized variable.
4822
4823 2011-08-29 Robert Dewar <dewar@adacore.com>
4824
4825 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4826 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4827 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4828
4829 2011-08-29 Thomas Quinot <quinot@adacore.com>
4830
4831 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4832 Remove unused variables.
4833
4834 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4835
4836 * sem_res.adb: Remove Build_Explicit_Dereference.
4837 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4838 from sem_res.adb, used in analysis of additional constructs.
4839 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4840 expansion of iterators.
4841 (Is_Object_Reference): Recognize variables rewritten as explicit
4842 dereferences in Ada2012.
4843 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4844 Reversible_Iterator names, for expansion of Ada2012 iterators.
4845 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4846 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4847 linked list container.
4848 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4849 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4850
4851 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4852
4853 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4854 containers.
4855
4856 2011-08-29 Vincent Celier <celier@adacore.com>
4857
4858 * make.adb (Gnatmake): Get the maximum number of simultaneous
4859 compilation processes after the Builder switches has been scanned, as
4860 there may include -jnn.
4861
4862 2011-08-29 Matthew Heaney <heaney@adacore.com>
4863
4864 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4865
4866 2011-08-29 Tristan Gingold <gingold@adacore.com>
4867
4868 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4869 GNAT_DRIVER_COMMAND_LINE to 255.
4870
4871 2011-08-29 Pascal Obry <obry@adacore.com>
4872
4873 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4874 reformatting and style fix (class attribute casing).
4875
4876 2011-08-29 Yannick Moy <moy@adacore.com>
4877
4878 * exp_ch11.adb: Yet another case where expansion should be common
4879 between CodePeer and Alfa.
4880
4881 2011-08-29 Yannick Moy <moy@adacore.com>
4882
4883 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4884
4885 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4886
4887 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4888 incomplete type and its completion match.
4889
4890 2011-08-29 Yannick Moy <moy@adacore.com>
4891
4892 * exp_ch13.adb: Adjust previous change.
4893
4894 2011-08-29 Robert Dewar <dewar@adacore.com>
4895
4896 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4897 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4898 Minor reformatting.
4899
4900 2011-08-29 Emmanuel Briot <briot@adacore.com>
4901
4902 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4903 initialize aggregated projects.
4904
4905 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4906
4907 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4908 depth of candidates to resolve a potentially spurious ambiguity between
4909 two visible subprograms.
4910
4911 2011-08-29 Yannick Moy <moy@adacore.com>
4912
4913 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4914 Requires/Ensures.
4915 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4916 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4917 Requires/Ensures.
4918
4919 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4920
4921 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4922 Add comment.
4923
4924 2011-08-29 Thomas Quinot <quinot@adacore.com>
4925
4926 * sem_res.adb: Minor reformatting.
4927
4928 2011-08-29 Johannes Kanig <kanig@adacore.com>
4929
4930 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4931 mode.
4932 * gnat1drv.adb (Adjust_Global_Switches): Set
4933 Use_Expressions_With_Actions to False in ALFA mode.
4934 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4935 ALFA mode.
4936
4937 2011-08-29 Yannick Moy <moy@adacore.com>
4938
4939 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4940 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4941 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4942 tagged types and dispatching calls in Alfa mode.
4943
4944 2011-08-29 Javier Miranda <miranda@adacore.com>
4945
4946 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4947 we do not report an error on an Empty node.
4948
4949 2011-08-29 Geert Bosch <bosch@adacore.com>
4950
4951 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4952 a-nlrear.o and a-nurear.o.
4953
4954 2011-08-29 Robert Dewar <dewar@adacore.com>
4955
4956 * freeze.adb: Minor code reorganization.
4957 Minor reformatting.
4958 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4959 sem_ch6.adb: Minor reformatting
4960
4961 2011-08-29 Tristan Gingold <gingold@adacore.com>
4962
4963 * s-except.ads, s-except.adb: Provide dummy body.
4964
4965 2011-08-29 Yannick Moy <moy@adacore.com>
4966
4967 * sem_warn.adb (Within_Postcondition): Take into account the case of
4968 an Ensures component in a Test_Case.
4969
4970 2011-08-29 Tristan Gingold <gingold@adacore.com>
4971
4972 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4973 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4974 System_Exceptions_Debug
4975 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4976 * a-except.adb: With and use System.Exceptions_Debug instead of
4977 System.Exceptions.
4978 * a-except-2005.adb: Likewise.
4979 * s-assert.adb: Likewise.
4980 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4981 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4982 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4983 s-excdeb. Update dependencies.
4984 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4985 as these no longer need external libraries.
4986
4987 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4988
4989 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4990 exponentiation operator on universal values in a context that requires
4991 a fixed-point type.
4992
4993 2011-08-29 Tristan Gingold <gingold@adacore.com>
4994
4995 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4996 before calling notify_handled_exception.
4997 * a-exextr.adb: Fix comment.
4998
4999 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5000
5001 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
5002 Finalize_Address of the access type's finalization master.
5003 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
5004 access type's finalization master. Add a guard to prevent
5005 Associated_Storage_Pool from being set on .NET/JVM.
5006 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
5007 attribute Finalize_Address of the access type's finalization master.
5008 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
5009 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
5010 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
5011 RE_Unit_Table.
5012 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
5013 use clause for System.IO
5014 (Detach): Relax the assertion, to be reinstated later.
5015 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
5016 Relax the assertion on Finalize_Address, to be reinstated later.
5017 (Is_Empty_List): New routine.
5018 (pm): New debug routine.
5019 (Set_Finalize_Address): New routine.
5020 * s-finmas.ads (pm): New debug routine.
5021 (Set_Finalize_Address): New routine.
5022 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5023
5024 2011-08-29 Tristan Gingold <gingold@adacore.com>
5025
5026 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5027 Remove convention C.
5028
5029 2011-08-29 Tristan Gingold <gingold@adacore.com>
5030
5031 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5032 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5033 (Finalize_TCB): Remove its finalization.
5034 (Initialize): Remove assignment of GET_Exc_Stack_Addr
5035 * s-soflin.adb (NT_Exc_Stack): Remove
5036 (Get_Exc_Stack_Addr_NT): Likewise.
5037 (Get_Exc_Stack_Addr_Soft): Likewise.
5038 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
5039 (Get_Exc_Stack_Addr): Likewise.
5040 (Get_Exc_Stack_Addr_Soft): Likewise
5041 * s-taspri-vms.ads (Exc_Stack_T): Remove.
5042 (Exc_Stack_Ptr_T): Likewise.
5043 (Private_Data): Remove Exc_Stack_Ptr component.
5044
5045 2011-08-29 Tristan Gingold <gingold@adacore.com>
5046
5047 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
5048
5049 2011-08-29 Tristan Gingold <gingold@adacore.com>
5050
5051 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
5052
5053 2011-08-29 Geert Bosch <bosch@adacore.com>
5054
5055 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
5056 L2_Norm, Swap_Column): New generic subprograms
5057 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
5058 L2_Norm, Swap_Column): Implement new subprograms in order to
5059 eliminate dependency on BLAS and LAPACK libraries in
5060 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
5061 version. Forward_Eliminate/Back_Substitute can be used to put a
5062 matrix in row echelon or reduced row echelon form using partial
5063 pivoting.
5064 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
5065 Swap_Column): Instantiate from System.Generic_Array_Operations.
5066 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
5067 (Sqrt): Local function for simple computation of square root without
5068 adding dependencies on Generic_Elementary_Functions.
5069 (Swap): New subprogram to exchange floating point numbers.
5070 (Inverse): Reimplement using Jordan-Gauss elimination.
5071 (Jacobi): New procedure implementing Jacobi's method for computation
5072 of eigensystems, based on Rutishauser's implementation.
5073 (L2_Norm): Implement directly using the inner product.
5074 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
5075 decreasing eigenvalue as required by the Ada RM.
5076 (Swap_Column): New helper procedure for Sort_Eigensystem.
5077 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
5078 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
5079 Sort_Eigensystems.
5080
5081 2011-08-29 Thomas Quinot <quinot@adacore.com>
5082
5083 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
5084 statements line.
5085
5086 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5087
5088 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
5089 than the current node.
5090 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
5091 Finalization_Master. The list headers have two fields instead of three.
5092 This should fix alignment issue but subpool allocations are now
5093 unusable. Alphabetize subprograms.
5094 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
5095 the size of the header when converting the beginning of the object to
5096 a FM_Node. Set the master's Finalize_Address attribute if not already
5097 set.
5098 (Deallocate_Any_Controlled): Use the offset rather than the size of the
5099 header when converting the beginning of the object to a FM_Node.
5100
5101 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5102
5103 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
5104 reraise when compiling for CodePeer.
5105
5106 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5107
5108 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
5109 now needed by a-convec.adb. Fix warning.
5110
5111 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5112
5113 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
5114 processing of TSS routine Finalize_Address when compiling in
5115 CodePeer_Mode.
5116
5117 2011-08-29 Thomas Quinot <quinot@adacore.com>
5118
5119 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
5120 sem_warn.adb: Minor reformatting.
5121
5122 2011-08-29 Emmanuel Briot <briot@adacore.com>
5123
5124 * prj-conf.adb (Get_Config_Switches): Also collect the list of
5125 languages from aggregated projects.
5126
5127 2011-08-29 Yannick Moy <moy@adacore.com>
5128
5129 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
5130 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5131 Traverse_Package_Declaration, Traverse_Subprogram_Body,
5132 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
5133 for stubs are traversed too when parameter is set
5134 (Traverse_All_Compilation_Units): Traverse without going inside stubs
5135 (Traverse_Declarations_Or_Statements): Do the special traversing for
5136 stubs when required.
5137 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
5138 return subprogram or package body from stub.
5139 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
5140 stubs without prior subprogram decl.
5141
5142 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5143
5144 * gnat_ugn.texi: Fix typo.
5145
5146 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5147
5148 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
5149 which accounts for size vs alignment issues and calculates the size of
5150 the list header.
5151 (Deallocate_Any_Controlled): Ditto.
5152 (Nearest_Multiple_Rounded_Up): New routine.
5153
5154 2011-08-29 Tristan Gingold <gingold@adacore.com>
5155
5156 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
5157 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
5158 (Set_Exception_Msg): Ditto.
5159 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
5160 Private_Data.
5161 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
5162 Use Save_Occurrence instead of Save_Occurrence_No_Private.
5163 (Raise_With_Msg): Remove Cleanup_Flag.
5164 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
5165 Clean_Flag and Private_Data components.
5166
5167 2011-08-29 Yannick Moy <moy@adacore.com>
5168
5169 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
5170 in CodePeer mode.
5171 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
5172 of an explicitly declared type, so that the base types of the original
5173 type and this generated type are the same, and a "type" (not a subtype
5174 like previously).
5175 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
5176 small" in Alfa mode, like in CodePeer mode.
5177 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
5178 clauses in Alfa mode.
5179
5180 2011-08-29 Javier Miranda <miranda@adacore.com>
5181
5182 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
5183 function to the package spec.
5184 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
5185 internally generated bodies of null procedures locate the internally
5186 generated spec enforcing mode conformance.
5187 (Is_Interface_Conformant): Ensure that the controlling formal of the
5188 primitives match.
5189
5190 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5191
5192 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
5193 reject the pragma if it appears to apply to a formal subprogram.
5194
5195 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5196
5197 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
5198 inner expression, to prevent double evaluation.
5199
5200 2011-08-29 Tristan Gingold <gingold@adacore.com>
5201
5202 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
5203 they were unused.
5204 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
5205 * a-except-2005.adb (Propagate_Exception): Adjust spec.
5206 (Raise_Current_Excep): Adjust call.
5207 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
5208
5209 2011-08-29 Thomas Quinot <quinot@adacore.com>
5210
5211 * exp_disp.adb: Minor reformatting.
5212
5213 2011-08-29 Tristan Gingold <gingold@adacore.com>
5214
5215 * a-exexpr.adb (Setup_Exception): Removed.
5216 * a-exexpr-gcc.adb (Setup_Exception): Removed.
5217 * a-except.adb (Exception_Propagation): Removed.
5218 * a-except-2005.adb (Setup_Exception): Removed.
5219 (Reraise): Remove call to Setup_Exception.
5220 (Reraise_Occurrence): Ditto.
5221 (Reraise_Occurrence_Always): Ditto.
5222 (Reraise_Occurrence_No_Defer): Ditto.
5223 (Transfer_Occurrence): Ditto.
5224 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
5225 (Set_Exception_Msg): Ditto.
5226
5227 2011-08-29 Robert Dewar <dewar@adacore.com>
5228
5229 * a-convec.adb, exp_disp.adb: Minor reformatting.
5230
5231 2011-08-29 Tristan Gingold <gingold@adacore.com>
5232
5233 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
5234
5235 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5236
5237 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
5238 Exception_Handlers to No_List instead of Empty_List in the case where
5239 there are no handlers.
5240
5241 2011-08-29 Tristan Gingold <gingold@adacore.com>
5242
5243 * gcc-interface/gigi.h (enum standard_datatypes): Add
5244 ADT_reraise_zcx_decl
5245 (reraise_zcx_decl): New macro.
5246 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
5247 (gigi): Set reraise_zcx_decl.
5248 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
5249 (gnat_to_gnu): Handle N_Raise_Statement.
5250
5251 2011-08-29 Robert Dewar <dewar@adacore.com>
5252
5253 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
5254 a-undesu.adb: Minor reformatting.
5255
5256 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5257
5258 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
5259 table, accept an unfrozen untagged component if it is an actual for a
5260 formal incomplete type.
5261 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
5262 provide new iterator forms over vectors.
5263 Introduce type Iterator in package body to implement operations of
5264 Reversible_Iterator interface.
5265 * a-iteint.ads: Make package pure so it is usable with new container
5266 packages, that are categorized Remote_Types.
5267
5268 2011-08-29 Robert Dewar <dewar@adacore.com>
5269
5270 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
5271
5272 2011-08-29 Bob Duff <duff@adacore.com>
5273
5274 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
5275 of <>, because this is the routine that checks for dimensionality
5276 errors (for example, for a two-dimensional array, (others => <>) should
5277 be (others => (others => <>)).
5278
5279 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5280
5281 * impunit.adb: Add new run-time units.
5282 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
5283 s-stposu.ads, s-stposu.adb: Code clean up.
5284 Handle protected class-wide or task class-wide types
5285 Handle C/C++/CIL/Java types.
5286 * s-spsufi.adb, s-spsufi.ads: New files.
5287
5288 2011-08-29 Yannick Moy <moy@adacore.com>
5289
5290 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
5291 library-level subprogram.
5292 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
5293 placement.
5294 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
5295 component.
5296 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
5297 component.
5298 * gnat_rm.texi: Update doc for Test_Case pragma.
5299
5300 2011-08-29 Tristan Gingold <gingold@adacore.com>
5301
5302 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
5303 convention C.
5304 (GCC_Exception_Access): New type.
5305 (Unwind_DeleteException): New imported procedure
5306 (Foreign_Exception): Import it.
5307 (GNAT_GCC_Exception): Simply have the occurrence inside.
5308 (To_GCC_Exception): New function.
5309 (To_GNAT_GCC_Exception): New function.
5310 (GNAT_GCC_Exception_Cleanup): New procedure..
5311 (Propagate_GCC_Exception): New procedure.
5312 (Reraise_GCC_Exception): New procedure.
5313 (Setup_Current_Excep): New procedure.
5314 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
5315 (Unwind_RaiseException): Ditto.
5316 (Unwind_ForcedUnwind): Ditto.
5317 (Remove): Removed.
5318 (Begin_Handler): Change type of parameter.
5319 (End_Handler): Ditto. Now delete the exception if still present.
5320 (Setup_Key): Removed.
5321 (Is_Setup_And_Not_Propagated): Removed.
5322 (Set_Setup_And_Not_Propagated): Ditto.
5323 (Clear_Setup_And_Not_Propagated): Ditto.
5324 (Save_Occurrence_And_Private): Ditto.
5325 (EID_For): Add 'not null' constraint on parameter.
5326 (Setup_Exception): Does nothing.
5327 (Propagate_Exception): Simplified.
5328 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
5329 re-raise is not expanded anymore.
5330 * s-except.ads (Foreign_Exception): New exception - placeholder for
5331 non Ada exceptions.
5332 * raise-gcc.c (__gnat_setup_current_excep): Declare
5333 (CXX_EXCEPTION_CLASS): Define (not yet used)
5334 (GNAT_EXCEPTION_CLASS): Define.
5335 (is_handled_by): Handle foreign exceptions.
5336 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
5337
5338 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5339
5340 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
5341
5342 2011-08-29 Thomas Quinot <quinot@adacore.com>
5343
5344 * a-synbar-posix.adb: Minor reformatting.
5345
5346 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5347
5348 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
5349 a-exetim-default.ads (Interrupt_Clocks_Supported,
5350 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5351 definitions to be compliant with AI-0171. The target systems do not
5352 support separate account for the execution time of interrupt handlers.
5353
5354 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5355
5356 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
5357 in the barrier to put first the easiest to evaluate (and the one which
5358 will be True more often). More efficient.
5359
5360 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5361
5362 * s-atocou-x86.adb: Fix constraint in machine code insertion.
5363
5364 2011-08-29 Bob Duff <duff@adacore.com>
5365
5366 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
5367 attributes that are now aspects, as specified by AI05-0229-1.
5368 * sem_ch13.adb (Analyze_Aspect_Specifications,
5369 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
5370 pragmas or attribute references, as appropriate.
5371
5372 2011-08-29 Robert Dewar <dewar@adacore.com>
5373
5374 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
5375 a-synbar-posix.ads: Minor reformatting.
5376
5377 2011-08-29 Yannick Moy <moy@adacore.com>
5378
5379 * snames.ads-tmpl: Add name Force.
5380
5381 2011-08-29 Pascal Obry <obry@adacore.com>
5382
5383 * prj-nmsc.adb: Minor reformatting.
5384
5385 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5386
5387 * a-exetim.ads (Interrupt_Clocks_Supported,
5388 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5389 definitions to be compliant with AI-0171.
5390
5391 2011-08-29 Robert Dewar <dewar@adacore.com>
5392
5393 * a-ngelfu.adb: Add comments.
5394
5395 2011-08-29 Geert Bosch <bosch@adacore.com>
5396
5397 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
5398 the closest machine number to Pi / 2.0.
5399
5400 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5401
5402 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
5403 package Ada.Synchronous_Barriers.
5404 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
5405 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
5406 default implementation using protected objects and another one
5407 a-synbar-posix using POSIX barriers as the underlying support.
5408 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
5409 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
5410 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
5411 Clean up dependencies.
5412 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
5413
5414 2011-08-29 Robert Dewar <dewar@adacore.com>
5415
5416 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
5417 exp_dist.adb: Minor code reorganization.
5418 Minor reformatting.
5419
5420 2011-08-29 Thomas Quinot <quinot@adacore.com>
5421
5422 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5423 primitive operation must support external streaming if it is not a
5424 controlling access result.
5425
5426 2011-08-29 Thomas Quinot <quinot@adacore.com>
5427
5428 * sinfo.ads, sem_ch7.adb: Minor reformatting.
5429
5430 2011-08-29 Bob Duff <duff@adacore.com>
5431
5432 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5433 restriction on allocators, as required by AI05-0013-1.
5434 * restrict.ads: Minor comment fix.
5435
5436 2011-08-29 Tristan Gingold <gingold@adacore.com>
5437
5438 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5439 (To_Jmpbuf_Address): Ditto
5440 (builtin_longjmp): Ditto
5441
5442 2011-08-29 Thomas Quinot <quinot@adacore.com>
5443
5444 * sem_res.adb: Minor reformatting.
5445
5446 2011-08-29 Vincent Celier <celier@adacore.com>
5447
5448 * make.adb (Gnatmake): Move special processing for VM targets after the
5449 call to Get_Target_Parameters.
5450
5451 2011-08-29 Thomas Quinot <quinot@adacore.com>
5452
5453 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5454
5455 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5456
5457 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5458 where an anonymous access discriminant of a limited designated type
5459 appears in a non-immutably limited discriminated type and issue an
5460 error message. Add local variable Desig_T and replace all occurrences
5461 of Designated_Type.
5462
5463 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5464
5465 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5466 implementation is compliant to RM D.15(15/2) after the modification
5467 imposed by AI05-0094-1 (binding interpretation).
5468
5469 2011-08-29 Robert Dewar <dewar@adacore.com>
5470
5471 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5472 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5473
5474 2011-08-29 Thomas Quinot <quinot@adacore.com>
5475
5476 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5477 the scope name, do not report a missing label as a style violation (it
5478 will be diagnosed as an illegality).
5479 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5480 variant records: Get_Enum_Lit_From_Pos already returns a usage
5481 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5482 on Expr in Integer_Literal case so that it can be used by
5483 Build_To_Any_Call.
5484
5485 2011-08-29 Tristan Gingold <gingold@adacore.com>
5486
5487 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5488 Adjust comment.
5489 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5490 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5491 exception handler.
5492 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5493 Build_Abort_Block_Handler to build the exception handler. Do not
5494 undefer aborts for the Abort_Signal exception handler if back-end
5495 exception mechanism.
5496 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5497 back_end exceptions for all others and abort_signal.
5498 * s-except.ads (ZCX_By_Default): New constant.
5499 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5500 (Raise_Exception_Always): Ditto.
5501 (Raise_From_Signal_Handler): Ditto.
5502 (Raise_With_Location_And_Msg): Ditto.
5503 (Raise_With_Msg): Ditto.
5504 (Reraise): Ditto.
5505 (Reraise_Occurence): Ditto.
5506 (Reraise_Occurrence_Always): Ditto.
5507 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5508 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5509
5510 2011-08-29 Thomas Quinot <quinot@adacore.com>
5511
5512 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5513
5514 2011-08-29 Robert Dewar <dewar@adacore.com>
5515
5516 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5517 Minor code reorganization.
5518
5519 2011-08-29 Bob Duff <duff@adacore.com>
5520
5521 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5522 2012, not just Ada 2005.
5523
5524 2011-08-29 Vincent Celier <celier@adacore.com>
5525
5526 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5527 with a project file or with gprbuid, if -gnatep= is specified, the
5528 builder may need to be invoked with -x.
5529
5530 2011-08-29 Tristan Gingold <gingold@adacore.com>
5531
5532 * a-exexpr-gcc.adb: Minor comment fix.
5533
5534 2011-08-29 Robert Dewar <dewar@adacore.com>
5535
5536 * sem_ch8.adb: Minor reformatting.
5537
5538 2011-08-29 Bob Duff <duff@adacore.com>
5539
5540 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5541 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5542 treating "some" as unreserved in earlier Ada versions. This is now
5543 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5544 rather than Name_Some, since Tok_Some is now recognized as reserved.
5545 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5546 reserved word.
5547 * scans.ads: Minor comment fixes.
5548 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5549 for other language versions.
5550 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5551 treating "some" as unreserved in earlier Ada versions. This is now
5552 handled in Snames.Is_Keyword_Name.
5553 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5554 Ada 2012.
5555 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5556 unreserved in earlier Ada versions. This is now handled in
5557 Snames.Is_Keyword_Name.
5558 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5559 words as for other language versions.
5560 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5561 Ada 2012, not just Ada 2005.
5562
5563 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5564
5565 * sem_ch13.adb: Additional semantic checks for aspects involved in
5566 iterators.
5567
5568 2011-08-29 Matthew Heaney <heaney@adacore.com>
5569
5570 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5571 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5572 Container parameter.
5573 (Ancestor_Find): ditto.
5574
5575 2011-08-29 Thomas Quinot <quinot@adacore.com>
5576
5577 * par-endh.adb: Minor reformatting.
5578
5579 2011-08-29 Tristan Gingold <gingold@adacore.com>
5580
5581 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5582 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5583 (Adjust_N_CLeanups_For): Remove.
5584 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5585 stack is reached.
5586 (Propgate_Exception): Adjust.
5587 * raise-gcc.c: Add a few static/const.
5588 (Adjust_N_Cleanups_For): Remove declaration.
5589 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5590
5591 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5592
5593 * sem_ch8.adb: Use type of function return when rewriting as object
5594 declaration.
5595
5596 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5597
5598 * sem_type.adb: Minor reformatting.
5599
5600 2011-08-29 Robert Dewar <dewar@adacore.com>
5601
5602 * makeutl.adb: Minor reformatting.
5603
5604 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5605
5606 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5607 function call of a limited type, the expansion of the renaming is
5608 complicated by the presence of various temporaries and subtypes that
5609 capture constraints of the renamed object.
5610 Rewrite node as an object declaration, whose expansion is simpler.
5611 Given that the object is limited there is no copy involved and no
5612 performance hit.
5613
5614 2011-08-29 Robert Dewar <dewar@adacore.com>
5615
5616 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5617 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5618
5619 2011-08-29 Tristan Gingold <gingold@adacore.com>
5620
5621 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5622 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5623 system-linux-hppa.ads, system-linux-s390.ads,
5624 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5625 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5626 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5627 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5628 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5629 system-solaris-sparc.ads, system-lynxos-x86.ads,
5630 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5631 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5632 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5633 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5634 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5635 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5636 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5637 * opt.ads: Adjust comment.
5638 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5639 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5640 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5641
5642 2011-08-29 Emmanuel Briot <briot@adacore.com>
5643
5644 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5645 file name is specified on the gnatmake or gprbuild command line, and
5646 before we search for that file in the project.
5647
5648 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5649
5650 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5651 used to determine whether a possible interpretation for an overloadable
5652 entity is declared within the current instantiation and should be
5653 included in the candidate set.
5654
5655 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5656
5657 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5658
5659 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5660
5661 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5662 access subtype is access_to_subprogram, when applying checks for
5663 RM 3.10.2 (27).
5664
5665 2011-08-29 Matthew Heaney <heaney@adacore.com>
5666
5667 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5668 for sibling when common parent.
5669
5670 2011-08-29 Thomas Quinot <quinot@adacore.com>
5671
5672 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5673 "pragma_".
5674
5675 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5676
5677 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5678 for the return type when in ASIS mode.
5679
5680 2011-08-29 Vincent Celier <celier@adacore.com>
5681
5682 * make.adb (Gnatmake): Get the default search dirs, then the target
5683 parameters after getting the Builder switches, as the Builder switches
5684 may include --RTS= and that could change the default search dirs.
5685
5686 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5687
5688 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5689 Make_Final_Call. Move the processing for class-wide types before the
5690 processing for derivations from [Limited_]Controlled.
5691 (Make_Final_Call): Move the processing for class-wide types before the
5692 processing for derivations from [Limited_]Controlled.
5693 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5694 Add code to account for alignments larger than the list header. Add a
5695 comment illustrating the structure of the allocated object + padding +
5696 header.
5697 (Deallocate_Any_Controlled): Add code to account for alignments larger
5698 than the list header.
5699
5700 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5701
5702 * sinfo.ads, sinfo.adb: New node kind
5703 N_Formal_Incomplete_Type_Definition, related flags.
5704 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5705 Parse formal incomplete types.
5706 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5707 sem_ch12.
5708 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5709 Formal incomplete types do not need completion.
5710 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5711 Validate_Incomplete_Type_Instance): New procedures to handle formal
5712 incomplete types.
5713 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5714 that corresponds to a formal incomplete type.
5715 * sprint.adb: Handle formal incomplete type declarations.
5716 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5717 an insertion point.
5718
5719 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5720
5721 * a-fihema.ads, a-fihema.adb: Unit removed.
5722 * a-undesu.ads, a-undesu.adb: New unit implementing
5723 Ada.Unchecked_Deallocate_Subpool.
5724 * einfo.adb: Remove Associated_Collection from the node usage.
5725 Add Finalization_Master to the node usage.
5726 (Associated_Collection): Removed.
5727 (Finalization_Master): New routine.
5728 (Set_Associated_Collection): Removed.
5729 (Set_Finalization_Master): New routine.
5730 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5731 Finalization_Master to the output.
5732 * einfo.ads: Remove attribute Associated_Collection and its uses in
5733 entities.
5734 Add new attribute Finalization_Master along with its uses in entitites.
5735 (Associated_Collection): Removed along with its pragma import.
5736 (Finalization_Master): New routine along with a pragma import.
5737 (Set_Associated_Collection): Removed along with its pragma import.
5738 (Set_Finalization_Master): New routine along with a pragma import.
5739 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5740 Build_Finalization_Collection with Build_Finalization_Master.
5741 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5742 before the bodies of the predefined routines. Add comment explaining
5743 this. Replace call to Build_Finalization_Collection with
5744 Build_Finalization_Master.
5745 (Freeze_Type): Replace call to Build_Finalization_Collection with
5746 Build_Finalization_Master.
5747 (Make_Finalize_Address_Body): Comment reformatting.
5748 (Make_Predefined_Primitive_Specs): Code reformatting.
5749 (Stream_Operation_OK): Update comment mentioning finalization
5750 collections. Replace RE_Finalization_Collection with
5751 RE_Finalization_Master.
5752 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5753 Associated_Collection with Finalization_Master. Replace call to
5754 Build_Finalization_Collection with Build_Finalization_Master.
5755 (Expand_Allocator_Expression): Replace call to Associated_Collection
5756 with Finalization_Master. Replace call to Set_Associated_Collection with
5757 Set_Finalization_Master. Remove the generation of
5758 Set_Finalize_Address_Ptr.
5759 (Expand_N_Allocator): Replace call to Associated_Collection with
5760 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5761 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5762 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5763 comment on usage. Replace call to Needs_BIP_Collection with
5764 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5765 BIP_Finalization_Master. Update all comments which mention finalization
5766 collections. Replace Associated_Collection with
5767 Finalization_Master. Replace Build_Finalization_Collection with
5768 Build_Finalization_Master.
5769 (BIP_Formal_Suffix): Update BIP_Collection's case.
5770 (Build_Heap_Allocator): Update the related comment. Rename local
5771 variable Collect to Fin_Mas_Id and update its occurrences. Update
5772 comments which mention finalization collections. Replace
5773 Set_Associated_Collection with Set_Finalization_Master.
5774 (Expand_Call): Update the code which detects a special piece of library
5775 code for .NET/JVM.
5776 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5777 Add_Collection_Actual_To_Build_In_Place_Call with
5778 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5779 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5780 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5781 Add_Collection_Actual_To_Build_In_Place_Call with
5782 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5783 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5784 Add_Collection_Actual_To_Build_In_Place_Call with
5785 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5786 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5787 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5788 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5789 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5790 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5791 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5792 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5793 Replace the call to Associated_Collection with Finalization_Master.
5794 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5795 Update the way finalization master names are generated. Update the
5796 retrieval of the correct access type which will carry the pool and
5797 master attributes.
5798 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5799 (Make_Finalize_Address_Body): Abstract types do not need
5800 Finalize_Address. Code reformatting.
5801 (Make_Finalize_Address_Stmts): Update comment on usage.
5802 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5803 (Process_Declarations): Update comments.
5804 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5805 Build_Finalization_Master. Update associated comment.
5806 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5807 * exp_ch13.adb: Update comments which mention finalization collections.
5808 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5809 with Finalization_Master.
5810 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5811 create calls to routines Allocate_Any_Controlled and
5812 Deallocate_Any_Controlled.
5813 (Find_Finalize_Address): New routine.
5814 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5815 comparison.
5816 (Requires_Cleanup_Actions): Update the comment on freeze node
5817 inspection.
5818 * exp_util.ads: Remove comment on generated code for
5819 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5820 is better to simply look in the body.
5821 * freeze.adb (Freeze_All): Update the comment of finalization
5822 collections. Replace the call to Associated_Collection with
5823 Finalization_Master. Replace the call to Build_Finalization_Collection
5824 with Build_Finalization_Master.
5825 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5826 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5827 a-fihema.
5828 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5829 Ada.Finalization. Add processing for children of System.Storage_Pools.
5830 * rtsfind.ads: Remove the naming of second level children of
5831 Ada.Finalization.
5832 Remove Ada_Finalization_Heap_Management from the list of units.
5833 Remove subtype Ada_Finalization_Child.
5834 Remove the following subprogram entities:
5835
5836 RE_Allocate
5837 RE_Deallocate
5838 RE_Finalization_Collection
5839 RE_Finalization_Collection_Ptr
5840 RE_Set_Finalize_Address_Ptr
5841
5842 Add the naming of second level children of System.Storage_Pools.
5843 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5844 the list of units.
5845 Add subtype System_Storage_Pools_Child.
5846 Add the following subprogram entities to System.Finalization_Masters:
5847
5848 RE_Finalization_Master
5849 RE_Finalization_Master_Ptr
5850
5851 Add the following subprogram entities to System.Storage_Pools.Subpools:
5852
5853 RE_Allocate_Any_Controlled
5854 RE_Deallocate_Any_Controlled
5855 RE_Root_Storage_Pool_With_Subpools
5856 RE_Root_Subpool
5857 RE_Subpool_Handle
5858
5859 Move the following subprogram entities from
5860 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5861
5862 RE_Add_Offset_To_Address
5863 RE_Attach
5864 RE_Base_Pool
5865 RE_Detach
5866
5867 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5868 Set_Associated_Collection with Set_Finalization_Master.
5869 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5870 BIP_Finalization_Master is created.
5871 * s-finmas.adb: New unit System.Finalization_Masters.
5872 * s-finmas.ads: New unit System.Finalization_Masters.
5873 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5874 * s-stposu.ads, s-stposu.adb: New unit implementing
5875 System.Storage_Pools.Subpools.
5876
5877 2011-08-29 Bob Duff <duff@adacore.com>
5878
5879 * tbuild.adb: Add assertion.
5880
5881 2011-08-29 Thomas Quinot <quinot@adacore.com>
5882
5883 * s-pooglo.adb: Minor reformatting.
5884
5885 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5886
5887 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5888 an indexed component of a packed array whose element type is a record
5889 with a representation clause different from that of the right-hand
5890 side, generate a temporary to minimuze the number of bit-field
5891 operations generated.
5892
5893 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5894
5895 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5896 declarations, and thus are likely insertion points for actions.
5897
5898 2011-08-29 Bob Duff <duff@adacore.com>
5899
5900 * einfo.ads: Minor comment fix.
5901
5902 2011-08-29 Robert Dewar <dewar@adacore.com>
5903
5904 * frontend.adb, gnat1drv.adb: Minor reformatting.
5905
5906 2011-08-29 Tristan Gingold <gingold@adacore.com>
5907
5908 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5909 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5910 space in front of the header.
5911
5912 2011-08-29 Johannes Kanig <kanig@adacore.com>
5913
5914 * frontend.adb (Frontend): Exit after creating Standard package when
5915 -gnatd.H is present.
5916 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5917 present.
5918
5919 2011-08-29 Robert Dewar <dewar@adacore.com>
5920
5921 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5922 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5923 snames.ads-tmpl: Minor reformatting.
5924
5925 2011-08-29 Philippe Gil <gil@adacore.com>
5926
5927 * prj.adb (Reset_Units_In_Table): New procedure.
5928 Reset units to avoid access to freed memory.
5929
5930 2011-08-29 Thomas Quinot <quinot@adacore.com>
5931
5932 * get_scos.adb: When reading a P statement SCO without a pragma name
5933 (from an older ALI file), ensure that the Pragma_Name component is set
5934 to Unknown_Pragma (not left uninitialized).
5935
5936 2011-08-29 Vincent Celier <celier@adacore.com>
5937
5938 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5939 modified to compute correctly the object path of a SAL project that is
5940 extending another library project.
5941 (Write_Path_File): New procedure.
5942 * makeutl.ads (Directories): New table moved from Buildgpr
5943 (Get_Directories): New procedure moved from Buildgpr
5944 (Write_Path_File): New procedure
5945 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5946 paths before binding SALs, instead of Set_Ada_Paths.
5947 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5948 Prj.
5949 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5950 (Current_Source_Path_File_Of): New function
5951 (Set_Current_Object_Path_File_Of): New procedure
5952 (Current_Source_Object_File_Of): New function
5953 (Set_Current_Object_Path_File_Of): New procedure
5954 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5955 (Current_Source_Path_File_Of): New function
5956 (Set_Current_Object_Path_File_Of): New procedure
5957 (Current_Source_Object_File_Of): New function
5958 (Set_Current_Object_Path_File_Of): New procedure
5959
5960 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5961
5962 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5963 packed entity, use a bit-field assignment only if there is no change of
5964 representation.
5965
5966 2011-08-29 Thomas Quinot <quinot@adacore.com>
5967
5968 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5969 Is_RTU instead of using Chars comparisons.
5970
5971 2011-08-29 Thomas Quinot <quinot@adacore.com>
5972
5973 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5974 temporary object if the actual is constrained, and the discriminants
5975 read from the stream don't match.
5976
5977 2011-08-29 Tristan Gingold <gingold@adacore.com>
5978
5979 * sem_attr.adb, exp_attr.adb: Add handling of
5980 Attribute_System_Allocator_Alignment
5981 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5982 Attribute_System_Allocator_Alignment.
5983 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5984 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5985 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5986 get_target_system_allocator_alignment.
5987
5988 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5989
5990 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5991 dependencies.
5992
5993 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5994
5995 * exp_ch3.adb (In_Runtime): Fix typo.
5996
5997 2011-08-29 Bob Duff <duff@adacore.com>
5998
5999 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
6000
6001 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6002
6003 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
6004 and a separate tag assignment is generated, ensure that the tag
6005 assignment is analyzed.
6006
6007 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6008
6009 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
6010 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
6011 of statement lists that may contain local declarations.
6012 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
6013 duplicate the triggering statements needed for the expansion of this
6014 construct, when the trigger is a dispatching call to a synchronized
6015 primitive.
6016
6017 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6018
6019 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
6020 * bindgen.adb: Add comments.
6021 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6022 in CodePeer mode.
6023
6024 2011-08-29 Robert Dewar <dewar@adacore.com>
6025
6026 * exp_attr.adb: Minor reformatting.
6027 Minor code reorganization and commenting.
6028 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6029 reformatting.
6030
6031 2011-08-29 Thomas Quinot <quinot@adacore.com>
6032
6033 * get_scos.adb: Ignore chaining indicators not currently supported
6034 by Ada.
6035
6036 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6037
6038 * system.ads: Minor editing.
6039
6040 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6041
6042 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
6043 CodePeer mode.
6044 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
6045 Attribute_Elab_Subp_Body.
6046 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
6047 * sem_util.adb: Update comments.
6048
6049 2011-08-29 Thomas Quinot <quinot@adacore.com>
6050
6051 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
6052 pragma name for each SCO statement corresponding to a pragma.
6053
6054 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6055
6056 * opt.ads: Minor editing.
6057
6058 2011-08-29 Yannick Moy <moy@adacore.com>
6059
6060 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
6061 that only made sense for CodePeer mode.
6062
6063 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6064
6065 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
6066 which is no longer used.
6067 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
6068 handling of the 64-bit division check.
6069 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
6070 division available.
6071 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
6072 longer used.
6073
6074 2011-08-29 Thomas Quinot <quinot@adacore.com>
6075
6076 * get_scos.adb: Minor reformatting.
6077
6078 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6079
6080 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
6081 statement list is wrapped in a block, the block is explicitly analyzed
6082 in order to properly redecorate the entities and create a servicing
6083 finalizer.
6084
6085 2011-08-29 Tristan Gingold <gingold@adacore.com>
6086
6087 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
6088 (Set_Zero_Cost_Handling): Remove.
6089
6090 2011-08-29 Thomas Quinot <quinot@adacore.com>
6091
6092 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
6093
6094 2011-08-29 Geert Bosch <bosch@adacore.com>
6095
6096 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
6097 instruction, as the latter may produce -0.0, which is not a valid VAX
6098 F float number.
6099 (Neg_G): Likewise for VAX F float.
6100
6101 2011-08-29 Robert Dewar <dewar@adacore.com>
6102
6103 * exp_util.adb: Minor reformatting.
6104
6105 2011-08-29 Yannick Moy <moy@adacore.com>
6106
6107 * sem_ch3.adb: Minor comment update.
6108
6109 2011-08-29 Thomas Quinot <quinot@adacore.com>
6110
6111 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
6112 the operand type.
6113
6114 2011-08-29 Thomas Quinot <quinot@adacore.com>
6115
6116 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
6117 current statement sequence on a generic instantiation or a subprogram
6118 declaration.
6119
6120 2011-08-29 Robert Dewar <dewar@adacore.com>
6121
6122 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
6123 Minor reformatting.
6124
6125 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6126
6127 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6128 Correct the check which involves the freeze node of a controlled or
6129 access-to-controlled type.
6130
6131 2011-08-29 Geert Bosch <bosch@adacore.com>
6132
6133 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
6134 statements.
6135 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
6136 Asm statements.
6137
6138 2011-08-29 Yannick Moy <moy@adacore.com>
6139
6140 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
6141 for every index type and component type that is not a subtype_mark.
6142 (Process_Subtype): Set Etype of subtype.
6143
6144 2011-08-29 Robert Dewar <dewar@adacore.com>
6145
6146 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
6147 reorganization. Minor reformatting.
6148
6149 2011-08-29 Steve Baird <baird@adacore.com>
6150
6151 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
6152 for CodePeer and ALFA modes.
6153
6154 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6155
6156 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
6157 that comes from an enclosing scope if it is not the renaming of an
6158 actual, to handle properly a spurious ambiguity in an instance.
6159
6160 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6161
6162 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
6163 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
6164 use it instead of the Esize of the first parameter.
6165 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
6166 above change.
6167 <Size>: Likewise. Call it for composite types on the RM size.
6168
6169 2011-08-29 Yannick Moy <moy@adacore.com>
6170
6171 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
6172 * sem_util.adb (Unique_Name): Correct behaviour for names of
6173 compilation units.
6174
6175 2011-08-29 Yannick Moy <moy@adacore.com>
6176
6177 * sem_prag.adb (Check_Precondition_Postcondition): In formal
6178 verification mode, analyze pragma expression for correctness, for
6179 pre/post on library-level subprogram, as it is not expanded later.
6180
6181 2011-08-29 Yannick Moy <moy@adacore.com>
6182
6183 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
6184 in formal verification.
6185
6186 2011-08-29 Thomas Quinot <quinot@adacore.com>
6187
6188 * sem_util.adb: Minor reformatting.
6189 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
6190 there's no pragma.
6191 * par_sco.ads, par_sco.adb: Update comments.
6192
6193 2011-08-29 Yannick Moy <moy@adacore.com>
6194
6195 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
6196 associated getter/setter.
6197 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
6198
6199 2011-08-29 Vincent Celier <celier@adacore.com>
6200
6201 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
6202 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
6203 with declarations for Language_Kind and Dependency_Kind for Ada.
6204 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
6205 (Process_Compiler): Take into account the new attributes Dependency_Kind
6206 and Language_Kind.
6207 (Check_Configuration): Check if language kind is unit based, not if the
6208 language name is Ada.
6209 (Process_Exceptions_Unit_Based): Ditto
6210 (Add_Language): Remove default additions of language and dependency kind
6211 * prj.ads: Minor comment change
6212 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
6213
6214 2011-08-29 Johannes Kanig <kanig@adacore.com>
6215
6216 * debug.adb: Update comments.
6217
6218 2011-08-24 Joseph Myers <joseph@codesourcery.com>
6219
6220 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
6221 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
6222 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
6223 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
6224 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
6225
6226 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6227
6228 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
6229 (GNATLIBCFLAGS_FOR_C): Replace
6230 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
6231 (gnatlib-shared-default, gnatlib-shared-dual-win32)
6232 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
6233 (gnatlib-sjlj, gnatlib-zcx): Likewise.
6234
6235 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
6236
6237 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
6238
6239 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
6240
6241 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
6242
6243 2011-08-05 Nicolas Roche <roche@adacore.com>
6244
6245 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
6246 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
6247 canadian cross.
6248 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
6249
6250 2011-08-05 Matthew Heaney <heaney@adacore.com>
6251
6252 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
6253 subprogram bodies declared out-of-order.
6254
6255 2011-08-05 Yannick Moy <moy@adacore.com>
6256
6257 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
6258 entities directly in package Standard, otherwise skip the standard
6259 prefix.
6260
6261 2011-08-05 Robert Dewar <dewar@adacore.com>
6262
6263 * a-cbmutr.adb: Minor reformatting
6264 (Allocate_Node): refactor node allocation algorithm
6265
6266 2011-08-05 Robert Dewar <dewar@adacore.com>
6267
6268 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
6269 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
6270 mode.
6271 (Analyze_Pragma, case Check_Policy): Ditto.
6272 * sem_prag.ads (Check_Disabled): New function
6273 * snames.ads-tmpl: Add Name_Disable.
6274
6275 2011-08-05 Robert Dewar <dewar@adacore.com>
6276
6277 * gnat_rm.texi: Document implementation-defined policy DISABLE for
6278 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
6279
6280 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6281
6282 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
6283 that appears in a generic formal part and applies to a formal
6284 subprogram.
6285
6286 2011-08-05 Robert Dewar <dewar@adacore.com>
6287
6288 * a-cbmutr.ads: Minor reformatting.
6289
6290 2011-08-05 Matthew Heaney <heaney@adacore.com>
6291
6292 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
6293 to check count, check sign of value instead.
6294 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
6295 (Copy_Subtree): allocate copy of source element
6296 (Equal_Subtree): compare elements, not access objects
6297
6298 2011-08-05 Vincent Celier <celier@adacore.com>
6299
6300 * gnat_ugn.texi: Fix VMS alternative.
6301
6302 2011-08-05 Thomas Quinot <quinot@adacore.com>
6303
6304 * sem_ch11.adb: Add comment.
6305
6306 2011-08-05 Robert Dewar <dewar@adacore.com>
6307
6308 * exp_util.adb: Minor comment fix.
6309
6310 2011-08-05 Robert Dewar <dewar@adacore.com>
6311
6312 * scng.adb (Error_Unterminated_String): Improve flag position when
6313 comma present.
6314
6315 2011-08-05 Matthew Heaney <heaney@adacore.com>
6316
6317 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
6318 tree containers).
6319 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
6320 multiway tree containers.
6321
6322 2011-08-05 Robert Dewar <dewar@adacore.com>
6323
6324 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
6325 * stylesw.adb: Implement -gnatyC to control comment spacing
6326 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
6327 -gnatyc/C).
6328 * usage.adb: Add line for -gnatyC.
6329
6330 2011-08-05 Robert Dewar <dewar@adacore.com>
6331
6332 * gnat_ugn.texi: Document -gnatyC.
6333 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
6334 synonym for COMMENTS2).
6335
6336 2011-08-05 Robert Dewar <dewar@adacore.com>
6337
6338 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
6339 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
6340 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6341 a-comutr.ads, lib-xref.adb: Minor reformatting.
6342
6343 2011-08-05 Robert Dewar <dewar@adacore.com>
6344
6345 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
6346 warning if there is an exception handler present.
6347
6348 2011-08-05 Pascal Obry <obry@adacore.com>
6349
6350 * a-iteint.ads: Fix copyright year.
6351
6352 2011-08-05 Thomas Quinot <quinot@adacore.com>
6353
6354 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
6355 statement SCO for a USE clause or a representation clause.
6356
6357 2011-08-05 Yannick Moy <moy@adacore.com>
6358
6359 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
6360 between body and spec for stub.
6361 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
6362 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
6363 pragma precondition or postcondition, for which the enclosing
6364 subprogram or package in the AST is not the desired one, return empty.
6365
6366 2011-08-05 Thomas Quinot <quinot@adacore.com>
6367
6368 * g-expect.adb: Minor reformatting.
6369
6370 2011-08-05 Bob Duff <duff@adacore.com>
6371
6372 * a-fihema.adb: Comment out OS_Lib.
6373
6374 2011-08-05 Matthew Heaney <heaney@adacore.com>
6375
6376 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
6377 (unbounded multiway tree containers) and a-iteint.ads.
6378 * a-comutr.ads, a-comutr.adb:
6379 This is the new Ada 2012 unit for unbounded multiway tree containers
6380 * a-cimutr.ads, a-cimutr.adb
6381 This is the new Ada 2012 unit for indefinite multiway tree containers
6382 * a-iteint.ads: New file.
6383
6384 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6385
6386 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
6387
6388 2011-08-05 Bob Duff <duff@adacore.com>
6389
6390 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
6391 subpools.
6392 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
6393
6394 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6395
6396 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
6397 general indexing aspects of Ada2012. Called when analyzing indexed
6398 components when other interpretations fail.
6399 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
6400 in an expression context where overloading is meaningful. This excludes
6401 the occurrence in an aspect specification (efficiency only).
6402 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
6403 related to iterators can be set by an attribute specification, but
6404 cannot be queried.
6405 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
6406 Constant_Indexing and Variable_Indexing.
6407 (Check_Indexing_Functions): New procedure to perform legality checks.
6408 Additional semantic checks at end of declarations.
6409
6410 2011-08-05 Sergey Rybin <rybin@adacore.com>
6411
6412 * tree_io.ads: Update ASIS_Version_Number because of the change of the
6413 order of calling Tree_Write/Tree_Read routines made for aspects.
6414
6415 2011-08-05 Bob Duff <duff@adacore.com>
6416
6417 * a-fihema.adb (Finalize): Fix race condition.
6418
6419 2011-08-05 Yannick Moy <moy@adacore.com>
6420
6421 * sem_ch12.adb (Analyze_Package_Instantiation,
6422 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6423 mode.
6424
6425 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6426
6427 * sem_type.adb (Specific_Type): in an instance, the type-specific
6428 operand of an equality check that involves null may have a private
6429 type. Use full view to determine legality of construct.
6430
6431 2011-08-05 Vincent Celier <celier@adacore.com>
6432
6433 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6434 delete or close the file when the call to gnatmake was successful.
6435
6436 2011-08-05 Yannick Moy <moy@adacore.com>
6437
6438 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6439 Global_Discard_Names.
6440
6441 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6442
6443 * sinfo.ads: comments on use of entity field for aspect specifications.
6444
6445 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6446
6447 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6448 node is not itself an entity but a selected component, it is a
6449 rewritten parameterless call to an en enclosing synchronized operation,
6450 and this expansion will be performed again in the instance, so there is
6451 no global information to preserve.
6452
6453 2011-08-05 Javier Miranda <miranda@adacore.com>
6454
6455 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6456 for renamings of predefined primitives.
6457 (In_Predef_Prims_DT): New subprogram.
6458
6459 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6460
6461 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6462 possible interpretation of name is a reference type, add an
6463 interpretation that is the designated type of the reference
6464 discriminant of that type.
6465 * sem_res.adb (resolve): If the interpretation imposed by context is an
6466 implicit dereference, rewrite the node as the deference of the
6467 reference discriminant.
6468 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6469 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6470 parent type or base type.
6471 * sem_ch4.adb (Process_Indexed_Component,
6472 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6473 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6474 Check for implicit dereference.
6475 (List_Operand_Interps): Indicate when an implicit dereference is
6476 ambiguous.
6477 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6478
6479 2011-08-05 Thomas Quinot <quinot@adacore.com>
6480
6481 * scos.ads: Update documentation of SCO table. Pragma statements can now
6482 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6483 * par_sco.ads, par_sco.adb: Implement the above change.
6484 (Process_Decisions_Defer): Generate a P decision for the first parameter
6485 of a dyadic pragma Debug.
6486 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6487 necessary.
6488 * put_scos.adb: Code simplification based on above change.
6489
6490 2011-08-05 Robert Dewar <dewar@adacore.com>
6491
6492 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6493 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6494 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6495 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6496
6497 2011-08-05 Bob Duff <duff@adacore.com>
6498
6499 * a-stunau.ads, g-spipat.adb: Update comments.
6500
6501 2011-08-05 Bob Duff <duff@adacore.com>
6502
6503 * a-fihema.ads: Minor comment fix.
6504 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6505 correct.
6506 (Attach, Detach): Remove some unnecessary code.
6507 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6508
6509 2011-08-05 Bob Duff <duff@adacore.com>
6510
6511 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6512 allocation for Objects component. This simplifies the code somewhat. It
6513 is also a little more efficient in the not-so-unusual case where there
6514 are no controlled objects allocated.
6515 Make Finalization_Started flag atomic.
6516 (Finalize): Avoid unnecessary detachment of items from the list.
6517 (pcol): Minor cleanup.
6518
6519 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6520
6521 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6522 package whose name is the same as that of the generic unit, or its
6523 ultimate prefix.
6524
6525 2011-08-05 Bob Duff <duff@adacore.com>
6526
6527 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6528 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6529 Minor comment fixes.
6530
6531 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6532
6533 * make.adb (Linking_Phase): No longer need to set source search path
6534 before calling gnatlink in CodePeer mode.
6535 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6536 gcc in CodePeer mode, since the binder generated file no longer has a
6537 'with Main'.
6538 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6539 * switch-c.adb: Update comment.
6540
6541 2011-08-05 Thomas Quinot <quinot@adacore.com>
6542
6543 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6544
6545 2011-08-05 Nicolas Roche <roche@adacore.com>
6546
6547 * gnat_ugn.texi: Fix minor syntax error issue.
6548
6549 2011-08-05 Vincent Celier <celier@adacore.com>
6550
6551 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6552 delete or close the file when the call to gnatmake returns a non
6553 successful return code.
6554
6555 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6556
6557 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6558 check, indicate that the copy of the original node does not come from
6559 source, to prevent an infinite recursion of the expansion.
6560
6561 2011-08-05 Johannes Kanig <kanig@adacore.com>
6562
6563 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6564 VC generation for subprogram bodies.
6565
6566 2011-08-05 Yannick Moy <moy@adacore.com>
6567
6568 * einfo.ads: Typo.
6569 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6570 the base type with the smallest allowed base type.
6571
6572 2011-08-05 Sergey Rybin <rybin@adacore.com>
6573
6574 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6575 aspects.
6576
6577 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6578
6579 * sem_ch12.ads: minor comment updates.
6580
6581 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6582
6583 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6584 instantiation and a formal package the compiler generates a package
6585 renaming declaration so that the generic name within the declaration
6586 is interpreted as a renaming of the instance. At the end of a formal
6587 package declaration, this renaming must become invisible.
6588
6589 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6590
6591 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6592 comparison and rely on concrete entities instead.
6593
6594 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6595
6596 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6597 and discriminants, to indicate that the type has an access discriminant
6598 that supports implicit dereference.
6599 * snames.ads-tmpl: Add names of aspects and attributes related to
6600 Ada2012 iterators: constant_indexing, default_iterator,
6601 iterator_element, implicit_dereference, variable_indexing.
6602 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6603 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6604 iterator-related aspects.
6605 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6606
6607 2011-08-05 Sergey Rybin <rybin@adacore.com>
6608
6609 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6610 metrics in gnatmetric to cover new kinds of coupling mentrics.
6611
6612 2011-08-05 Steve Baird <baird@adacore.com>
6613
6614 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6615 of calling the user-defined main subprogram.
6616 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6617 is set) Call_Main_Subprogram ahead of, as opposed to
6618 inside of, Main.
6619 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6620 generation of a "with" of the user-defined main subprogram.
6621 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6622 (which is now called from Gen_Main instead).
6623
6624 2011-08-05 Emmanuel Briot <briot@adacore.com>
6625
6626 * projects.texi: Added reference to the Makefile package.
6627
6628 2011-08-05 Thomas Quinot <quinot@adacore.com>
6629
6630 * exp_ch7.adb: Minor comment rewording.
6631
6632 2011-08-05 Ed Falis <falis@adacore.com>
6633
6634 * env.c: Fix comment.
6635
6636 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6637
6638 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6639 character comparison and rely on concrete entities instead.
6640
6641 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6642
6643 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6644 suggested by AI95-0068.
6645
6646 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6647
6648 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6649 the two potential initialization calls. This accounts for any
6650 access-before-elaboration checks which may precede the initialization
6651 calls.
6652 (Next_Suitable_Statement): New routine. Returns the next real statement
6653 after the input node while skipping generated checks.
6654 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6655 with comment on usage.
6656 Do not generate Elaborate_All when the trigger is a finalization call
6657 coming from a type init proc.
6658 (Check_Elab_Call): Propagate the initialization procedure context to
6659 subsequent calls to Check_A_Call.
6660 (Check_Internal_Call_Continue): Propagate the initialization procedure
6661 context to subsequent calls to Check_Elab_Call.
6662 (Is_Finalization_Procedure): New routine. Returns True if the input
6663 entity denotes a [Deep_]Finalize routine.
6664 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6665 along with comment on usage.
6666
6667 2011-08-05 Vadim Godunko <godunko@adacore.com>
6668
6669 * s-atocou.ads: Add list of supported platforms.
6670
6671 2011-08-05 Yannick Moy <moy@adacore.com>
6672
6673 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6674
6675 * opt.ads (Disable_ALI_File): new Boolean flag
6676 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6677
6678 2011-08-05 Ed Falis <falis@adacore.com>
6679
6680 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6681 environ is properly defined.
6682
6683 2011-08-05 Vincent Celier <celier@adacore.com>
6684
6685 * make.adb (Compilation_Phase): Exit immediately when all objects have
6686 been found up to date, to avoid multiple exit messages.
6687 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6688 same project for languages with no compiler.
6689 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6690 -eI.
6691 2011-08-05 Robert Dewar <dewar@adacore.com>
6692
6693 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6694 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6695 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6696 s-atocou-builtin.adb: Minor reformatting.
6697
6698 2011-08-05 Yannick Moy <moy@adacore.com>
6699
6700 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6701 if the node to wrap is a pragma check, this node and enclosed
6702 expression are not expanded, so do not apply any transformations here.
6703 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6704 introducing transient scopes.
6705
6706 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6707
6708 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6709 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6710 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6711 routine is available, so we use the default implementation of these
6712 functions.
6713 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6714 support for copying attributes on VxWorks 6.
6715
6716 2011-08-05 Yannick Moy <moy@adacore.com>
6717
6718 * debug.adb: Remove use of -gnatd.D.
6719 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6720 * opt.ads: Simplify variables for ALFA mode, to keep one only
6721 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6722 to ALFA mode.
6723
6724 2011-08-05 Vincent Celier <celier@adacore.com>
6725
6726 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6727 Builder'Default_Switches.
6728
6729 2011-08-05 Vincent Celier <celier@adacore.com>
6730
6731 * makeusg.adb: Add lines for --create-map-file switches.
6732
6733 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6734
6735 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6736 profile is incomplete and the full view is available, replace it with
6737 the full view.
6738 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6739 incomplete, freezing the subprogram is delayed until the full view is
6740 frozen.
6741 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6742 fixed-point multiplication operator and the predefined operator is
6743 resolved in favor of the user-defined one.
6744
6745 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6746
6747 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6748 CONST_CAST.
6749
6750 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6751
6752 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6753 whether a type lacks user-defined Read or Write operations, or has a
6754 component that lacks them.
6755 * sem_attr.adb (Check_Stream_Attribute): if restriction
6756 No_Default_Stream_Attributes is active, verify that all subcomponent
6757 types of the target have user-defined stream operations, and report
6758 error otherwise.
6759 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6760 * exp_strm.adb: Build_Elementary_Input_Call,
6761 Build_Elementary_Write_Call): remove checks for restriction
6762 No_Default_Stream_Attributes, now checked in semantics.
6763
6764 2011-08-04 Vincent Celier <celier@adacore.com>
6765
6766 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6767 switches on the command line, look for all valid --RTS switches in the
6768 Builder switches and for each language use the first runtime name found
6769 to invoke gprconfig.
6770 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6771 command line and there is no auto-configuration.
6772 (Runtime_Name_Set_For): New function.
6773
6774 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6775
6776 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6777 elaborate initialization expression for variable Abort when processing
6778 a package body or a declaration.
6779 (Create_Finalizer): Propagate the package context when creating the
6780 exception-related variables.
6781 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6782 For_Package along with usage comment.
6783
6784 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6785
6786 * gcc-interface/Makefile.in: Clean up targets.
6787 Enable new package for atomic counters and copy-on-write implementation
6788 of unbounded strings on x86 platforms.
6789 * gcc-interface/Make-lang.in: Update dependencies.
6790
6791 2011-08-04 Robert Dewar <dewar@adacore.com>
6792
6793 * exp_ch7.adb: Minor reformatting.
6794
6795 2011-08-04 Robert Dewar <dewar@adacore.com>
6796
6797 * exp_strm.adb: Minor reformatting.
6798
6799 2011-08-04 Vadim Godunko <godunko@adacore.com>
6800
6801 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6802 operations are not supported.
6803 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6804 * s-atocou-x86.adb: New file.
6805 * Makefile.rtl: Add s-atocou.o file
6806
6807 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6808
6809 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6810 (Compilation_Phase): ... here.
6811 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6812
6813 2011-08-04 Thomas Quinot <quinot@adacore.com>
6814
6815 * Make-generated.in: Fix minor typo in comment.
6816
6817 2011-08-04 Thomas Quinot <quinot@adacore.com>
6818
6819 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6820 the project path.
6821
6822 2011-08-04 Robert Dewar <dewar@adacore.com>
6823
6824 * a-coinho.adb: Minor reformatting.
6825
6826 2011-08-04 Robert Dewar <dewar@adacore.com>
6827
6828 * a-coinho.ads: Minor reformatting.
6829
6830 2011-08-04 Vadim Godunko <godunko@adacore.com>
6831
6832 * s-atocou.ads, s-atocou.adb: New files.
6833 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6834 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6835 direct use of GCC's atomic builtins and replace them by use of new
6836 atomic counter package.
6837
6838 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6839
6840 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6841
6842 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6843
6844 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6845 with a call to Get_External_Tag.
6846 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6847 subprogram usage. Remove the guard against package declarations and
6848 bodies since Build_Cleanup_Statements is no longer invoked in that
6849 context.
6850 (Build_Components): Initialize Tagged_Type_Stmts when the context
6851 contains at least one library-level tagged type.
6852 (Build_Finalizer): New local variables Has_Tagged_Types and
6853 Tagged_Type_Stmts along with associated comments on usage. Update the
6854 logic to include tagged type processing.
6855 (Create_Finalizer): Insert all library-level tagged type unregistration
6856 code before the jump block circuitry.
6857 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6858 (Expand_N_Package_Declaration): Remove the call to
6859 Build_Cleanup_Statements.
6860 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6861 unregister the external tag of a tagged type.
6862 (Processing_Actions): Reimplemented to handle tagged types.
6863 (Process_Declarations): Detect the declaration of a library-level
6864 tagged type and carry out the appropriate actions.
6865 (Unregister_Tagged_Types): Removed. The machinery has been directly
6866 merged with Build_Finalizer.
6867
6868 2011-08-04 Robert Dewar <dewar@adacore.com>
6869
6870 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6871 gnatls.adb, exp_ch3.adb: Minor reformatting.
6872
6873 2011-08-04 Marc Sango <sango@adacore.com>
6874
6875 * sem_attr.adb (Analyze_Attribute): Replace the message
6876 "invisible attribute of}" of the spark restriction violation in
6877 attribute reference by the simple message "invisible attribute of type".
6878 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6879 two insertion characters: '&' and '}'.
6880
6881 2011-08-04 Vadim Godunko <godunko@adacore.com>
6882
6883 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6884 * a-coinho.ads, a-coinho.adb: New file.
6885 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6886
6887 2011-08-04 Nicolas Roche <roche@adacore.com>
6888
6889 * alfa_test.adb: Not all ali files are containing alfa information even
6890 if compiled with -gnatd.F. So suppress warning about missing ALFA
6891 information.
6892
6893 2011-08-04 Yannick Moy <moy@adacore.com>
6894
6895 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6896 scope.
6897 * put_alfa.adb: Check that scope name is not empty.
6898
6899 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6900
6901 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6902 Needs_Elementary_Stream_Operation, to determine whether user-defined
6903 Read and Write attributes are available for the elementary components
6904 of the given type. If only the predefined attributes are available,
6905 then when restriction No_Default_Stream_Attributes is active the
6906 predefined stream attributes for the composite type cannot be created.
6907
6908 2011-08-04 Robert Dewar <dewar@adacore.com>
6909
6910 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6911 Put routines in alpha order
6912
6913 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6914
6915 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6916 * gcc-interface/Make-lang.in: Update dependencies.
6917
6918 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6919
6920 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6921 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6922 gnat1why).
6923
6924 2011-08-04 Robert Dewar <dewar@adacore.com>
6925
6926 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6927 lib-xref-alfa.adb: Minor reformatting.
6928
6929 2011-08-04 Marc Sango <sango@adacore.com>
6930
6931 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6932 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6933 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6934 mode.
6935
6936 2011-08-04 Tristan Gingold <gingold@adacore.com>
6937
6938 * bindgen.adb (Gen_Adainit_C): Remove.
6939 (Gen_Adafinal_C): Ditto.
6940 (Gen_Elab_Externals_C): Ditto.
6941 (Gen_Elab_Calls_C): Ditto.
6942 (Gen_Elab_Order_C): Ditto.
6943 (Gen_Elab_Defs_C): Ditto.
6944 (Gen_Finalize_Library_C): Ditto.
6945 (Gen_Finalize_Library_Defs_C): Ditto.
6946 (Gen_Main_C): Ditto.
6947 (Gen_Output_File_C): Ditto.
6948 (Gen_Restrictions_C): Ditto.
6949 (Gen_Versions_C): Ditto.
6950 (Write_Info_Ada_C): Ditto.
6951 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6952 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6953 Always call Gen_Output_File_Ada.
6954 * gnatlink.adb (Begin_Info): Now a constant.
6955 (End_Info): Ditto.
6956 (Ada_Bind_File): Remove
6957 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6958 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6959 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6960 * opt.ads (Ada_Bind_File): Remove.
6961
6962 2011-08-04 Thomas Quinot <quinot@adacore.com>
6963
6964 * projects.texi: Document target-specific directory in default project
6965 path for gnatmake.
6966
6967 2011-08-04 Thomas Quinot <quinot@adacore.com>
6968
6969 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6970 path in all cases .
6971
6972 2011-08-04 Yannick Moy <moy@adacore.com>
6973
6974 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6975 opt.ads, lib-xref.ads: Code clean up.
6976
6977 2011-08-04 Yannick Moy <moy@adacore.com>
6978
6979 * gnat_rm.texi: Update description of Test_Case
6980 * gnat_ugn.texi: Typo.
6981
6982 2011-08-04 Ed Falis <falis@adacore.com>
6983
6984 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6985
6986 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6987
6988 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6989 it is of type Root_Controlled. This action eliminates fields Prev and
6990 Next from type equality.
6991
6992 2011-08-04 Yannick Moy <moy@adacore.com>
6993
6994 * lib-xref-alfa.adb: Correct typo.
6995
6996 2011-08-04 Matthew Heaney <heaney@adacore.com>
6997
6998 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6999 component.
7000
7001 2011-08-04 Yannick Moy <moy@adacore.com>
7002
7003 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
7004 (Analyze_Pragma): allow static string expression for name of Test_Case,
7005 instead of simply string literals.
7006 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
7007 expressions.
7008
7009 2011-08-04 Vincent Celier <celier@adacore.com>
7010
7011 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
7012 case suffixes to find truncated main sources.
7013
7014 2011-08-04 Tristan Gingold <gingold@adacore.com>
7015
7016 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
7017 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
7018 (Compute_Current_Task): Ditto.
7019
7020 2011-08-04 Tristan Gingold <gingold@adacore.com>
7021
7022 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7023
7024 2011-08-04 Yannick Moy <moy@adacore.com>
7025
7026 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7027 library-level constant.
7028 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7029 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7030 used as selector of parameter association, in ALFA mode.
7031
7032 2011-08-04 Robert Dewar <dewar@adacore.com>
7033
7034 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7035 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
7036 reformatting.
7037
7038 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7039
7040 * make.adb (Linking_Phase): Set source search path before calling
7041 gnatlink in CodePeer mode.
7042
7043 2011-08-04 Javier Miranda <miranda@adacore.com>
7044
7045 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
7046 Remove code which takes care of building TSDs.
7047 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
7048 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
7049 the accessibility check in VM targets.
7050 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
7051 (Building_Static_DT): Now returns false for VM targets.
7052 (Build_VM_TSDs): Removed.
7053 (Expand_Interface_Conversion): Generate missing runtime check for
7054 conversions to interface types whose target type is unknown at compile
7055 time.
7056 (Make_VM_TSD): Add missing code to disable the generation of calls to
7057 Check_TSD if the tagged type is not defined at library level, or not
7058 has a representation clause specifying its external tag, or -gnatdQ is
7059 active.
7060 * exp_disp.ads (Build_VM_TSDs): Removed.
7061 (Make_VM_TSDs): Spec relocated from exp_disp.adb
7062 * sem_disp.adb (Check_Dispatching_Operation): No code required to
7063 register primitives in the dispatch tables in VM targets.
7064 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
7065 initialization of class-wide interface objects in VM targets.
7066 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
7067 of Make_DT).
7068
7069 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7070
7071 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
7072 when dotnet-ld cannot be found.
7073
7074 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7075
7076 * bindgen.adb: Simplify significantly generation of binder body file in
7077 CodePeer mode.
7078 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
7079 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
7080 not expanded).
7081
7082 2011-08-04 Yannick Moy <moy@adacore.com>
7083
7084 * sem_prag.adb, sem.ads: Code cleanup.
7085
7086 2011-08-04 Tristan Gingold <gingold@adacore.com>
7087
7088 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
7089 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
7090 results if possible.
7091 * s-stusta.adb (Print): Adjust after changes in s-stausa.
7092 * gnat_ugn.texi: Update dynamic stack usage section.
7093
7094 2011-08-04 Steve Baird <baird@adacore.com>
7095
7096 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
7097 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
7098 contains only a call to the user-defined main subprogram.
7099 (Gen_Main_Ada) - If CodePeer_Mode is set, then
7100 call the "wrapper" subprogram instead of directly
7101 calling the user-defined main subprogram.
7102
7103 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7104
7105 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
7106 alternatives of a case statement for controlled objects. Rename local
7107 variable A to Dead_Alt.
7108 (Expand_N_If_Statement): Check the then and else statements of an if
7109 statement for controlled objects. Check the then statements of all
7110 elsif parts of an if statement for controlled objects.
7111 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
7112 objects.
7113 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
7114 detects a loop associated with the expansion of an array object.
7115 Augment the processing of the loop statements to account for a possible
7116 wrap done by Process_Statements_For_Controlled_Objects.
7117 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
7118 statements and abortable part of an asynchronous select for controlled
7119 objects.
7120 (Expand_N_Conditional_Entry_Call): Check the else statements of a
7121 conditional entry call for controlled objects.
7122 (Expand_N_Selective_Accept): Check the alternatives of a selective
7123 accept for controlled objects.
7124 (Expand_N_Timed_Entry_Call): Check the entry call and delay
7125 alternatives of a timed entry call for controlled objects.
7126 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
7127 exception handler for controlled objects.
7128 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7129 Add formal parameter Nested_Constructs along with its associated
7130 comment.
7131 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
7132 Requires_Cleanup_Actions.
7133 (Process_Statements_For_Controlled_Objects): New routine.
7134 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
7135 routine. Inspect a node which contains a non-handled sequence of
7136 statements for controlled objects. If such an object is found, the
7137 statements are wrapped in a block.
7138
7139 2011-08-04 Bob Duff <duff@adacore.com>
7140
7141 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
7142 need to compare with Class_Wide_Type (T2), in order to get at the
7143 original class-wide type node.
7144 * sem_type.ads (Covers): Improve the comment.
7145 * einfo.ads (Class_Wide_Type): Improve the comment.
7146 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
7147 the type of the Deref.
7148
7149 2011-08-04 Yannick Moy <moy@adacore.com>
7150
7151 * gnat_rm.texi: Document that Test_Case pragma can only appear on
7152 separate declarations.
7153 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
7154 check identifier of pragma argument.
7155 (Chain_TC): check that no other test case associated to the same entity
7156 share the same name.
7157 (Check_Test_Case): disallow test case inside subprogram body
7158 (Analyze_Pragma): correct call to check identifier and not argument
7159 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
7160 function gets name from test case pragma.
7161
7162 2011-08-04 Yannick Moy <moy@adacore.com>
7163
7164 * gnat_rm.texi: Document new pragma and aspect.
7165 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
7166 (No_Duplicates_Allowed): new constant array defining whether duplicates
7167 aspects of each kind can appear on the same declaration.
7168 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
7169 field, which points to a node holding the previous Spec_PPC_List.
7170 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
7171 through the indirection with Contract.
7172 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
7173 * par-prag.adb (Prag): do nothing on Test_Case pragma
7174 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
7175 be called directly.
7176 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
7177 component Ensures of Test_Case.
7178 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
7179 (Analyze_Generic_Subprogram_Declaration,
7180 Analyze_Subprogram_Instantiation,
7181 Analyze_Abstract_Subprogram_Declaration,
7182 Analyze_Subprogram_Body_Helper,
7183 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
7184 insert contract in subprogram node at point of definition
7185 * sem_ch13.adb
7186 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
7187 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
7188 corresponding pragma
7189 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
7190 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
7191 similar to the analysis of pre/post
7192 (Derive_Subprogram): insert contract in subprogram node at point of
7193 derivation.
7194 * sem_prag.adb, sem_prag.ads
7195 (Check_Arg_Is_String_Literal, Check_Identifier):
7196 new checking procedures to be called in treatment of pragmas
7197 (Check_Test_Case): new procedure to check that a Test_Case aspect or
7198 pragma is well-formed. This does not check currently that 'Result is
7199 used only in the Ensures component of a Test_Case.
7200 (Analyze_Pragma): add case for Test_Case
7201 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
7202 components of a Test_Case.
7203 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
7204 expressions in the 3rd (and 4th if present) arguments of a Test_Case
7205 pragma, treated as spec expressions.
7206 (Sig_Flags): add value -1 for Test_Case.
7207 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
7208 Get_Requires_From_Test_Case_Pragma): getters for both expression
7209 components of a Test_Case.
7210 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
7211 indirection between an entry or [generic] subprogram entity and its
7212 pre/post + test-cases.
7213 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
7214 get/set for fields of an N_Contract node.
7215 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
7216 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
7217 names and pragma for Test_Case.
7218 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
7219
7220 2011-08-04 Vincent Celier <celier@adacore.com>
7221
7222 * gnat_ugn.texi: Improve documentation of gnatmake switch
7223 --source-info-file=.
7224
7225 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7226
7227 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
7228 type). Initialize Atyp to the appropriate type which is later checked
7229 for completion. Rewrite the assertion associated with private type
7230 completion.
7231
7232 2011-08-04 Ed Falis <falis@adacore.com>
7233
7234 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
7235 initialize the number of CPUs.
7236
7237 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7238
7239 * sem_type.adb (Disambiguate): New subsidiary routine
7240 In_Same_Declaration_List, to implement AI05-0020: a user-defined
7241 equality on an anonymous access type whose designated type is private
7242 does not lead to an ambiguity with the universal access equality
7243 operator in the body or child units of the defining package. The same
7244 is true for a multiplication operator on a private type completed with
7245 a fixed-point-type.
7246
7247 2011-08-04 Javier Miranda <miranda@adacore.com>
7248
7249 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
7250 (Normalize_Scalars_Config): Removed.
7251 * opt.adb
7252 (Register_Opt_Config_Switches): Remove registering config values of
7253 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
7254 (Restore_Opt_Config_Switches): Remove code which restores the values of
7255 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7256 Init_Or_Norm_Scalars.
7257 (Save_Opt_Config_Switches): Remove code which saves values of
7258 Init_Or_Norm_Scalars and Normalize_Scalars.
7259 (Set_Opt_Config_Switches): Remove code which restores config values of
7260 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7261 Init_Or_Norm_Scalars.
7262
7263 2011-08-04 Yannick Moy <moy@adacore.com>
7264
7265 * frontend.adb (Frontend): remove previous patch to avoid full
7266 qualification in ALFA mode.
7267 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
7268 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
7269 unique name for an entity, which could be used to identify the entity
7270 across compilation units.
7271
7272 2011-08-04 Thomas Quinot <quinot@adacore.com>
7273
7274 * prj-env.adb
7275 (Initialize_Default_Project_Path): Add target specific directory
7276 ($prefix/$target/lib/gnat) in front of project path in all cases
7277 (making gnatmake's behaviour consistent with gprbuild).
7278 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
7279 Pass target name from Sdefault to project subsystem.
7280 * gnatls.adb: Show new target specific default project directory.
7281
7282 2011-08-04 Johannes Kanig <kanig@adacore.com>
7283
7284 * cstand.adb: Add Information to Identifier in Standard
7285 (Identifer_For): Set Entity to the corresponding entity
7286
7287 2011-08-04 Sergey Rybin <rybin@adacore.com>
7288
7289 * gnat_ugn.texi: Update doc on gnatcheck.
7290
7291 2011-08-04 Yannick Moy <moy@adacore.com>
7292
7293 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
7294 xrefs in a scope.
7295
7296 2011-08-04 Yannick Moy <moy@adacore.com>
7297
7298 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
7299 performing expansion.
7300 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
7301 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
7302 it is not called in ALFA mode.
7303
7304 2011-08-04 Emmanuel Briot <briot@adacore.com>
7305
7306 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
7307 after all, so removed.
7308
7309 2011-08-04 Sergey Rybin <rybin@adacore.com>
7310
7311 * vms_data.ads: Add missing VMS qualifiers.
7312
7313 2011-08-04 Emmanuel Briot <briot@adacore.com>
7314
7315 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
7316 the list of files on the command line after processing it through
7317 Complete_Mains.
7318
7319 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7320
7321 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
7322 processing for .NET/JVM. These targets can now benefit from
7323 Raise_From_Controlled_Operation and they share the same processing with
7324 standard targets.
7325 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
7326 These targets need transient scopes in order to properly finalize short
7327 lived controlled objects.
7328 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
7329 NET/JVM. These targets can now benefit from
7330 Raise_From_Controlled_Operation and they share the same processing with
7331 standard targets.
7332
7333 2011-08-04 Geert Bosch <bosch@adacore.com>
7334
7335 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
7336
7337 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7338
7339 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
7340 Expand_Record_Aggregate, to determine whether aggregate must be
7341 expanded into assignments. This is the case if the ancestor part is
7342 private, regarless of the setting of the flag Has_Private_Ancestor.
7343
7344 2011-08-04 Ed Falis <falis@adacore.com>
7345
7346 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
7347
7348 2011-08-04 Bob Duff <duff@adacore.com>
7349
7350 * sinfo.ads: Fix comment.
7351
7352 2011-08-04 Steve Baird <baird@adacore.com>
7353
7354 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
7355 choose a package name in much the same way as is
7356 done for JGNAT when VM_Target /= No_VM, except that
7357 a slightly more distinctive prefix string is used.
7358
7359 2011-08-04 Emmanuel Briot <briot@adacore.com>
7360
7361 * makeutl.adb (Complete_Mains): no longer accept unit names on the
7362 gnatmake command line.
7363 This behavior was never documented (and was supported only because of
7364 an early bug in the code). This case might lead to ambiguous cases
7365 (between unit names and truncated base names without suffixes).
7366
7367 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7368
7369 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
7370 Remove the external tag of a tagged type from the internal hash table.
7371 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
7372 expanded usage of the routine. Strenghten the check for Is_Master. Add
7373 processing for tagged types.
7374 (Build_Finalizer): Create all the necessary lists used in finalizer
7375 creation when the processed context is a package that may contain
7376 tagged types.
7377 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
7378 Requires_Cleanup_Actions.
7379 (Expand_N_Package_Body): Package bodies may need clean up code
7380 depending on whether they contain tagged types.
7381 (Expand_N_Package_Declaration): Package declarations may need clean up
7382 code depending on whether they contain tagged types.
7383 (Unregister_Tagged_Types): New routine. Search through a list of
7384 declarations or statements, looking for non-abstract Ada tagged types.
7385 For each such type, generate code to unregister the external tag.
7386 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
7387 Requires_Cleanup_Actions.
7388 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
7389 through a list of declarations or statements looking for non-abstract
7390 Ada tagged types or controlled objects.
7391 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
7392 Requires_Cleanup_Actions.
7393 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
7394 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
7395 RE_Unit_Table.
7396
7397 2011-08-04 Vincent Celier <celier@adacore.com>
7398
7399 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
7400 has Ada sources, not project Project, because if the root project
7401 Project has no sources of its own, all projects will be deemed without
7402 sources.
7403
7404 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7405
7406 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
7407 of the No_Param_Proc acc-to-subp type used for initialization of
7408 __gnat_finalize_library_objects so that it's declared at library level
7409 rather than nested inside of the adainit routine.
7410
7411 2011-08-04 Javier Miranda <miranda@adacore.com>
7412
7413 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
7414 if the tagged type has a representation clause which specifies its
7415 external tag.
7416
7417 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7418
7419 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7420 Remove previous procedure with that name.
7421 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7422 when appropriate.
7423 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7424 subtype mark, the ancestor cannot have unknown discriminants.
7425 (Resolve_Record_Aggregate): if the type has invisible components
7426 because of a private ancestor, the aggregate is illegal.
7427
7428 2011-08-04 Vincent Celier <celier@adacore.com>
7429
7430 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7431 account switches -gnat2005, -gnat12 and -gnat2012.
7432
7433 2011-08-04 Bob Duff <duff@adacore.com>
7434
7435 * s-tasdeb.ads: Minor comment fix.
7436
7437 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7438
7439 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7440 CodePeer mode.
7441 * switch.ads, switch.adb (Is_Language_Switch): New function.
7442
7443 2011-08-04 Vincent Celier <celier@adacore.com>
7444
7445 * switch-c.adb: Minor comment addition.
7446
7447 2011-08-04 Vincent Celier <celier@adacore.com>
7448
7449 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7450 ending with '=' is followed by a space (missing file name).
7451
7452 2011-08-04 Pascal Obry <obry@adacore.com>
7453
7454 * g-regist.ads: Fix size of HKEY on x86_64-windows.
7455
7456 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7457
7458 * sem_ch12.adb (Analyze_Associations): New routine
7459 Check_Overloaded_Formal_Subprogram to reject a formal package when
7460 there is a named association or a box initialisation for an overloaded
7461 formal subprogram of the corresponding generic.
7462
7463 2011-08-04 Yannick Moy <moy@adacore.com>
7464
7465 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7466 * get_alfa.adb, put_alfa.adb: Read and write new component of
7467 cross-reference.
7468 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7469
7470 2011-08-04 Pascal Obry <obry@adacore.com>
7471
7472 * urealp.adb: Minor reformatting.
7473
7474 2011-08-04 Tristan Gingold <gingold@adacore.com>
7475
7476 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7477 Handle the case when Cleanup_Protected_Object returns Empty.
7478
7479 2011-08-04 Yannick Moy <moy@adacore.com>
7480
7481 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7482
7483 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7484
7485 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7486 call, ignore functions.
7487
7488 2011-08-04 Geert Bosch <bosch@adacore.com>
7489
7490 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7491 point.
7492
7493 2011-08-04 Emmanuel Briot <briot@adacore.com>
7494
7495 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7496 as an index for Builder'Switches. This conforms to the documentation.
7497 * make.adb (Insert_Project_Sources): avoid duplicate code
7498
7499 2011-08-04 Emmanuel Briot <briot@adacore.com>
7500
7501 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7502 name on the command line (for instance "../dummy"), never assume it can
7503 be a unit name.
7504
7505 2011-08-04 Tristan Gingold <gingold@adacore.com>
7506
7507 * bindgen.adb: Remove code the reference or create the
7508 Break_Start/__gnat_break_start procedure.
7509 * s-stalib.adb (Break_Start): Removed.
7510
7511 2011-08-04 Emmanuel Briot <briot@adacore.com>
7512
7513 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7514 shared with gprbuild.
7515
7516 2011-08-04 Yannick Moy <moy@adacore.com>
7517
7518 * par-ch4.adb (P_Primary): preferentially issue an error message about
7519 a missing parenthesis arount a conditional or case expression in Ada
7520 2012 mode, if we detect that the alignment is not correct for a
7521 statement.
7522
7523 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7524
7525 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7526 tag-to-class-wide conversion as needing finalization actions.
7527 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7528 a tag-to-class-wide conversion as needing finalization actions.
7529 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7530 conversion does not need finalization actions.
7531 (Is_Tag_To_CW_Conversion): New routine.
7532 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7533 whether an object is the result of a tag-to-class-wide conversion.
7534
7535 2011-08-04 Yannick Moy <moy@adacore.com>
7536
7537 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7538 the left-hand-side and right-hand-side of a conjunct are inserted when
7539 translating a pre- or postcondition
7540 * sem_ch6.adb: Correct typo in comment
7541
7542 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7543
7544 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7545 Unchecked_Conversion and Unchecked_Deallocation.
7546
7547 2011-08-04 Thomas Quinot <quinot@adacore.com>
7548
7549 * make.adb: Minor reformatting.
7550
7551 2011-08-04 Emmanuel Briot <briot@adacore.com>
7552
7553 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7554 sources in the project and its imported projects, but not in the whole
7555 tree.
7556
7557 2011-08-04 Emmanuel Briot <briot@adacore.com>
7558
7559 * make.adb: Remove debug trace.
7560
7561 2011-08-04 Vincent Celier <celier@adacore.com>
7562
7563 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7564 path in canonical form, to be able to compare path names on platforms
7565 such as Windows or Darwin.
7566
7567 2011-08-04 Thomas Quinot <quinot@adacore.com>
7568
7569 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7570 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7571 * scos.ads: Update documentation accordingly.
7572 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7573 pragmas.
7574
7575 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7576
7577 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7578 attribute only if prefix type is scalar.
7579
7580 2011-08-04 Emmanuel Briot <briot@adacore.com>
7581
7582 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7583 in gnatmake for specifying mains on the command line that do not belong
7584 to the main project. These mains must currently all belong to the same
7585 project, though.
7586 (Ultimate_Extension_Of): removed, since duplicated
7587 Ultimate_Extending_Project.
7588
7589 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7590
7591 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7592 instead.
7593 (CodePeer_Mode_String): New.
7594 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7595 CodePeer mode.
7596 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7597 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7598 mode, since no useful elaboration subprogram is needed by CodePeer.
7599 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7600 In this mode, compile binder file with -gnatC and do stop after this
7601 step.
7602
7603 2011-08-04 Vincent Celier <celier@adacore.com>
7604
7605 * exp_ch7.adb: Minor comment fix.
7606
7607 2011-08-04 Robert Dewar <dewar@adacore.com>
7608
7609 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7610 exp_ch4.adb, makeutl.adb: Minor reformatting.
7611
7612 2011-08-04 Emmanuel Briot <briot@adacore.com>
7613
7614 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7615 Create several new subprograms to move code out of Make. This makes the
7616 code more readable, removes code duplication, and is a preparation work
7617 for adding support for aggregate projects.
7618
7619 2011-08-04 Tristan Gingold <gingold@adacore.com>
7620
7621 * s-po32gl.ads, s-po32gl.adb: New files.
7622 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7623 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7624 (Build_Finalization_Collection): Use it.
7625 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7626 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7627 literals.
7628 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7629 * gcc-interface/Make-lang.in: Update dependencies.
7630
7631 2011-08-04 Emmanuel Briot <briot@adacore.com>
7632
7633 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7634 the command line.
7635
7636 2011-08-04 Emmanuel Briot <briot@adacore.com>
7637
7638 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7639 command line is not a file name, also check whether it could be a unit
7640 name.
7641
7642 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7643
7644 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7645 the header of the finalization routine.
7646 If the unit has no finalizer but is a body whose spec has one, then
7647 generate the decrement of the elaboration entity only.
7648 If the unit has a finalizer and is a spec, then do not generate the
7649 decrement of the elaboration entity.
7650 (Gen_Finalize_Library_C): Likewise.
7651
7652 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7653
7654 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7655 (Bounds_Size_Expression): Removed.
7656 (Double_Alignment_Of): New subsidiary routine.
7657 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7658 for a hole in the dope vector of unconstrained arrays due to different
7659 index and element alignments.
7660
7661 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7662
7663 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7664 raise program_error because body has not been seen yet.
7665
7666 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7667
7668 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7669 an unresolved name.
7670
7671 2011-08-04 Vincent Celier <celier@adacore.com>
7672
7673 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7674
7675 2011-08-04 Yannick Moy <moy@adacore.com>
7676
7677 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7678 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7679
7680 2011-08-04 Thomas Quinot <quinot@adacore.com>
7681
7682 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7683 instantiation in RCI.
7684
7685 2011-08-04 Emmanuel Briot <briot@adacore.com>
7686
7687 * make.adb: Share more code with gprbuild
7688
7689 2011-08-04 Emmanuel Briot <briot@adacore.com>
7690
7691 * projects.texi: Added documentation for the IDE'Gnat project file
7692 attribute.
7693
7694 2011-08-04 Nicolas Roche <roche@adacore.com>
7695
7696 * gnat_rm.texi: Minor editing.
7697
7698 2011-08-04 Javier Miranda <miranda@adacore.com>
7699
7700 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7701 and the library case for VM targets.
7702 (Gen_Adainit_Ada): Likewise.
7703
7704 2011-08-04 Robert Dewar <dewar@adacore.com>
7705
7706 * g-altive.ads: Minor comment updates.
7707 * prj-nmsc.adb: Minor reformatting.
7708
7709 2011-08-04 Javier Miranda <miranda@adacore.com>
7710
7711 * opt.ads
7712 (Normalize_Scalars_Config): Value of the configuration switch set by
7713 pragma Normalize_Scalars when it appears in the gnat.adc file.
7714 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7715 to save and restore settings of this pragma.
7716 * opt.adb
7717 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7718 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7719
7720 2011-08-04 Vincent Celier <celier@adacore.com>
7721
7722 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7723
7724 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7725
7726 * makeutl.adb: Minor reformatting.
7727
7728 2011-08-04 Olivier Hainque <hainque@adacore.com>
7729
7730 * g-altive.ads: Update comments to reflect that only the soft
7731 binding is available today.
7732
7733 2011-08-04 Robert Dewar <dewar@adacore.com>
7734
7735 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7736 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7737 * gcc-interface/Make-lang.in: Update dependencies.
7738
7739 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7740
7741 * prj-env.adb: Remove local debug traces.
7742
7743 2011-08-04 Yannick Moy <moy@adacore.com>
7744
7745 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7746 was used instead of Hi_OK, which could cause a read of an uninitialized
7747 value later on. Detected while working on the new warning.
7748 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7749 to local variable.
7750 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7751 in more cases, in order to detect more unreferenced values.
7752 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7753 object for expression, if any.
7754
7755 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7756
7757 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7758 the operand types instead of the Esize.
7759
7760 2011-08-04 Steve Baird <baird@adacore.com>
7761
7762 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7763 enable CodePeer_Mode.
7764 * bindusg.adb (Display): Add help message describing -P binder switch.
7765 * gnat_ugn.texi: Document -P binder switch.
7766 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7767 user-defined main program directly.
7768 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7769 user-defined main program in the context clause of the package body.
7770
7771 2011-08-04 Yannick Moy <moy@adacore.com>
7772
7773 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7774 duplicate of Defining_Entity
7775 (Get_Unique_Entity_For_Decl): rename function into
7776 Unique_Defining_Entity
7777 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7778 (Formal_Proof_On): remove synthesized flag
7779 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7780 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7781 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7782 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7783 Annotate (Formal_Proof)
7784
7785 2011-08-04 Emmanuel Briot <briot@adacore.com>
7786
7787 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7788 source files with non-standard naming schemes, in imported projects
7789
7790 2011-08-04 Emmanuel Briot <briot@adacore.com>
7791
7792 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7793 specified on the gprbuild command line, we need to compile all units
7794 within that file, not just the first one we find
7795 Fix error message for mains that are not found.
7796
7797 2011-08-04 Thomas Quinot <quinot@adacore.com>
7798
7799 * sem_ch6.adb: Update comment.
7800 * sem_ch12.adb: Minor reformatting.
7801
7802 2011-08-04 Bob Duff <duff@adacore.com>
7803
7804 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7805 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7806 race condition whose symptom is to fail to lock Parent. That, in turn,
7807 causes Parent.Awake_Count to be accessed without locking Parent, which
7808 causes another race condition whose symptom is that Parent.Awake_Count
7809 can be off by 1 (either too high or too low). The solution is to lock
7810 Parent unconditionally, and then lock Acceptor, before reading
7811 Acceptor.Terminate_Alternative.
7812
7813 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7814
7815 * debug.adb: Update comment.
7816
7817 2011-08-04 Robert Dewar <dewar@adacore.com>
7818
7819 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7820 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7821 exp_ch6.adb: Minor reformatting.
7822
7823 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7824
7825 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7826 checks for -gnateE.
7827
7828 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7829
7830 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7831
7832 2011-08-04 Thomas Quinot <quinot@adacore.com>
7833
7834 * sinfo.ads: Minor reformatting.
7835
7836 2011-08-04 Emmanuel Briot <briot@adacore.com>
7837
7838 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7839 even if there is no location.
7840
7841 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7842
7843 * sem_res.adb, sem_ch4.adb: move check for restriction
7844 No_Task_Hierarchy to resolve_allocator.
7845
7846 2011-08-04 Thomas Quinot <quinot@adacore.com>
7847
7848 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7849 This flag of N_Pragma nodes is not used, remove it as well as all of
7850 the associated circuitry.
7851
7852 2011-08-04 Javier Miranda <miranda@adacore.com>
7853
7854 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7855 runtime check on duplicated externa tags
7856 * debug.adb Document switch -gnatdQ.
7857
7858 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7859
7860 * a-fihema.ads: Minor typo fix.
7861
7862 2011-08-04 Yannick Moy <moy@adacore.com>
7863
7864 * sem_ch10.adb: Minor comment update.
7865
7866 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7867
7868 * einfo.adb: Update the node field usage to reflect the renaming of
7869 Return_Flag to Return_ Flag_Or_Transient_Decl.
7870 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7871 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7872 (Write_Field15_Name): Change Return_Flag to
7873 Return_Flag_Or_Transient_Decl.
7874 * einfo.ads: Rename node field Return_Flag to
7875 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7876 occurrences in entities.
7877 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7878 associated Inline pragma.
7879 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7880 associated Inline pragma.
7881 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7882 routine.
7883 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7884 Return_Flag and Set_Return_Flag.
7885 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7886 objects generated for controlled transients declared inside an
7887 Exception_With_Actions. Update the calls to Return_Flag.
7888 (Process_Object_Declaration): Add code to add a null guard for hook
7889 objects generated for controlled transients declared inside an
7890 Exception_With_Actions. Update related comment.
7891 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7892 objects generated for controlled transients declared inside an
7893 Exception_With_Actions. Update the calls to Return_Flag.
7894 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7895
7896 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7897
7898 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7899 positional aggregate.
7900
7901 2011-08-04 Vincent Celier <celier@adacore.com>
7902
7903 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7904 SLOC only for pragmas.
7905
7906 2011-08-04 Emmanuel Briot <briot@adacore.com>
7907
7908 * projects.texi: Minor typo fix.
7909
7910 2011-08-04 Emmanuel Briot <briot@adacore.com>
7911
7912 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7913 on case-sensitive file systems.
7914
7915 2011-08-04 Thomas Quinot <quinot@adacore.com>
7916
7917 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7918 nested in a disabled pragma.
7919 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7920 enclosing pragma, if any, for X decisions.
7921
7922 2011-08-04 Thomas Quinot <quinot@adacore.com>
7923
7924 * sem_prag.adb: Minor reformatting.
7925
7926 2011-08-04 Vincent Celier <celier@adacore.com>
7927
7928 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7929 allowed in no run time mode.
7930
7931 2011-08-04 Vincent Celier <celier@adacore.com>
7932
7933 * make.adb (Check): When -gnatc is used, check for the source file
7934 inside the ALI file with a canonical case file name.
7935
7936 2011-08-04 Emmanuel Briot <briot@adacore.com>
7937
7938 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7939 overriding the separator.
7940
7941 2011-08-04 Robert Dewar <dewar@adacore.com>
7942
7943 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7944 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7945
7946 2011-08-04 Robert Dewar <dewar@adacore.com>
7947
7948 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7949
7950 2011-08-04 Yannick Moy <moy@adacore.com>
7951
7952 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7953 'Result only appears in postcondition of function.
7954
7955 2011-08-04 Thomas Quinot <quinot@adacore.com>
7956
7957 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7958 external tag, include the value of the external tag in the exception
7959 message.
7960
7961 2011-08-04 Yannick Moy <moy@adacore.com>
7962
7963 * sem_attr.adb (Result): modify error message for misplaced 'Result
7964
7965 2011-08-04 Sergey Rybin <rybin@adacore.com>
7966
7967 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7968 clear that the second argument must be an identifier.
7969
7970 2011-08-04 Thomas Quinot <quinot@adacore.com>
7971
7972 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7973 -fpreserve-control-flow, insert an IF statement on the barrier
7974 condition to ensure that a conditional branch instruction is generated.
7975
7976 2011-08-04 Emmanuel Briot <briot@adacore.com>
7977
7978 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7979 (Processing_Flags.Ignore_Missing_With): new flag.
7980
7981 2011-08-04 Emmanuel Briot <briot@adacore.com>
7982
7983 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7984 Source_List_File on case-insensitive systems where the file is actually
7985 on a case-sensitive file system (NFS,...).
7986
7987 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7988
7989 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7990 function return contains a controlled [extension] aggregate and the
7991 return statement is not part of a handled sequence of statements, wrap
7992 the return in a block. This ensures that all controlled temporaries
7993 generated during aggregate resolution will be picked up by the
7994 finalization machinery.
7995
7996 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7997
7998 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7999 components, freeze type before resolution, to ensure that default
8000 initializations are present for all components.
8001 * sem_res.adb (Resolve_Actuals): the designated object of an
8002 accces-to-constant type is a legal actual in a call to an
8003 initialization procedure.
8004
8005 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8006
8007 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
8008 N_Unchecked_Type_Conversion to the possible containers of a renamed
8009 transient variable.
8010
8011 2011-08-04 Yannick Moy <moy@adacore.com>
8012
8013 * par-ch13.adb (Aspect_Specifications_Present): recognize
8014 "with Identifier'Class =>" as an aspect, so that a meaningful warning
8015 is issued in Strict mode.
8016 * par.adb: Fix typos in comments.
8017
8018 2011-08-04 Yannick Moy <moy@adacore.com>
8019
8020 * sem_attr.adb (Result): modify error message to take into account Post
8021 aspect when compiling Ada 2012 (or newer) code.
8022
8023 2011-08-04 Nicolas Roche <roche@adacore.com>
8024
8025 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8026 remove need for GCC exceptions.
8027
8028 2011-08-04 Vincent Celier <celier@adacore.com>
8029
8030 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8031 project, not the source file name.
8032 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8033 excluded, continue looking. This excluded source will only be returned
8034 if there is no other source with the same base name that is not locally
8035 removed.
8036
8037 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8038
8039 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
8040 private and one of the operands is a real literal, use a qualified
8041 expression rather than a conversion which is not meaningful to the
8042 back-end.
8043
8044 2011-08-04 Yannick Moy <moy@adacore.com>
8045
8046 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
8047 corresponding aspect X'Class are allowed, proceed with analysis of the
8048 aspect instead of skipping it.
8049
8050 2011-08-04 Tristan Gingold <gingold@adacore.com>
8051
8052 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
8053 This will allow to have an Ada implementation for the subprogram.
8054
8055 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8056
8057 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
8058 completion and aspects are present, apply them to the entity for the
8059 type which is currently the partial view, but which is the one that
8060 will be frozen.
8061 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
8062 applies to a partial view, indicate that the full view has predicates
8063 and delayed aspects.
8064 (Replace_Type_Reference): Handle properly predicates that apply to the
8065 full view of a private completion.
8066
8067 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8068
8069 * layout.adb (Layout_Type): For composite types, do not set Esize.
8070 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
8071 set Esize.
8072 (Size_Known): Look at the RM size of components instead of the Esize.
8073 (Freeze_Record_Type): Look at the RM size instead of the Esize to
8074 issue warning and activate Implicit_Packing.
8075 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
8076 if the Esize is not known.
8077 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
8078 for elementary types only.
8079 (Analyze_Record_Representation_Clause): Look at the RM size instead
8080 of the Esize to issue errors.
8081 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
8082 is not known.
8083 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
8084 obsolete block.
8085 Look at the RM size instead of the Esize for types if the latter is
8086 not known.
8087 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
8088
8089 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8090
8091 * sem_type.adb: proper handling of equality not involving anonymous
8092 access types.
8093
8094 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8095
8096 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
8097 Vis_Decls. When creating a library-level finalizer for a package spec,
8098 both the declaration and body of the finalizer are inserted either in
8099 the visible or private declarations of the package spec.
8100
8101 2011-08-04 Javier Miranda <miranda@adacore.com>
8102
8103 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
8104 use of the full-view of a type when invoking Is_Ancestor.
8105 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
8106 the full-view of private parents is requested, then use also the
8107 full-view of the parent of the first derivation.
8108
8109 2011-08-04 Tristan Gingold <gingold@adacore.com>
8110
8111 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
8112 instead of the locally imported procedure.
8113 * s-taprop-mingw.adb (Enter_Task): Ditto.
8114 * s-valrea.adb (Scan_Real): Ditto.
8115 * s-imgrea.adb (Set_Image_Real): Ditto.
8116 * s-flocon.ads: Make the package pure.
8117
8118 2011-08-04 Thomas Quinot <quinot@adacore.com>
8119
8120 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
8121 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
8122 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
8123 New subprogram, moved here from...
8124 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
8125 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
8126 rewriting of the last argument into a procedure call statement here...
8127 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
8128 instead.
8129
8130 2011-08-04 Thomas Quinot <quinot@adacore.com>
8131
8132 * par_sco.adb: Minor reformatting.
8133
8134 2011-08-04 Robert Dewar <dewar@adacore.com>
8135
8136 * erroutc.adb: Minor reformatting.
8137
8138 2011-08-04 Thomas Quinot <quinot@adacore.com>
8139
8140 * par_sco.adb: Comment update.
8141
8142 2011-08-04 Tristan Gingold <gingold@adacore.com>
8143
8144 * s-flocon.ads: New file.
8145 * g-flocon.ads: Now a renaming of s-flocon.
8146 * Makefile.rtl: Add s-flocon.o
8147
8148 2011-08-04 Javier Miranda <miranda@adacore.com>
8149
8150 * exp_strm.adb (Build_Array_Input_Function): if the array type is
8151 constrained, do not attempt to build a subtype of it.
8152
8153 2011-08-04 Yannick Moy <moy@adacore.com>
8154
8155 * errout.ads Change comments: remove 'R'M as an example where quotes
8156 are needed; add ALFA as another case where quotes are not needed
8157 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
8158 case where quotes are not needed.
8159 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8160 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
8161 Remove all occurrences of 'A'L'F'A
8162
8163 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8164
8165 * sem_ch13.adb: check legality of invariant pragma.
8166
8167 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8168
8169 * bindgen.adb: Add comments.
8170
8171 2011-08-04 Yannick Moy <moy@adacore.com>
8172
8173 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
8174 synthesized flag.
8175 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
8176 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
8177
8178 2011-08-04 Robert Dewar <dewar@adacore.com>
8179
8180 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
8181 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
8182 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
8183
8184 2011-08-04 Thomas Quinot <quinot@adacore.com>
8185
8186 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
8187
8188 2011-08-04 Thomas Quinot <quinot@adacore.com>
8189
8190 PR ada/47880
8191 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
8192 allocated object.
8193
8194 2011-08-04 Robert Dewar <dewar@adacore.com>
8195
8196 * einfo.ads, exp_ch4.adb: Minor reformatting.
8197
8198 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8199
8200 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
8201
8202 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8203
8204 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
8205 type in all cases to compute list of primitive operations, because full
8206 view may be an itype that is not attached to the list of declarations.
8207
8208 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8209
8210 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
8211 library has already been finalized.
8212 (Gen_Adafinal_C): Likewise.
8213 (Gen_Adainit_Ada): Generate an early return if the library has
8214 already been elaborated.
8215 (Gen_Adainit_C): Likewise.
8216 (Gen_Output_File_Ada): Generate an elaboration flag.
8217 (Gen_Output_File_C): Likewise.
8218
8219 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8220
8221 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
8222 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
8223 built in the first place.
8224 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
8225 for CodePeer because Finalize_Address was not built to begin with.
8226 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
8227
8228 2011-08-04 Pascal Obry <obry@adacore.com>
8229
8230 * adaint.c (__gnat_tmp_name): Use current process id to create temp
8231 filenames, this ensures unicity of filenames across processes.
8232
8233 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8234
8235 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
8236 Raise_Controlled to Raise_From_Controlled_Operation. Update the
8237 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
8238 Add False as the actual to From_Abort in the generated call to
8239 Raise_From_Controlled_Operation.
8240
8241 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8242
8243 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
8244 so that the ali file name can be retrieved from outside of this package.
8245 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
8246 doing nothing in the general case, but used to update the object file
8247 timestamp if directly generated by the backend.
8248 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
8249 to a later time than the ali file one.
8250
8251 2011-08-04 Yannick Moy <moy@adacore.com>
8252
8253 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
8254 entities whose body contains an Annotate pragma which forces formal
8255 proof on this body.
8256 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8257 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8258 Mark_Non_ALFA_Subprogram to pass in a message and node.
8259 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
8260 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
8261 surrounding subprogram.
8262 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
8263 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
8264 as not in ALFA is annotated with Formal_Proof being On, then an error
8265 is issued based on the additional parameters for message and node.
8266 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
8267 * gcc-interface/Make-lang.in: Update dependencies.
8268
8269 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8270
8271 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
8272 Finalize_Address when CodePeer is enabled.
8273
8274 2011-08-04 Pascal Obry <obry@adacore.com>
8275
8276 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
8277 the latter returns a pointer to a static buffer which is deallocated
8278 at the end of the routine.
8279
8280 2011-08-04 Yannick Moy <moy@adacore.com>
8281
8282 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
8283 after index creation; mark unconstrained base array type generated as
8284 being in/not in ALFA as well
8285 (Make_Index): mark subtype created as in/not in ALFA
8286 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
8287 over a loop as in/not in ALFA, depending on its type and form of loop
8288 iteration.
8289
8290 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8291
8292 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
8293 directly to False on .NET and JVM.
8294
8295 2011-08-04 Yannick Moy <moy@adacore.com>
8296
8297 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
8298 constraint that subtype must come from source code to be in ALFA, so
8299 that anonymous subtypes can be in ALFA too.
8300
8301 2011-08-04 Yannick Moy <moy@adacore.com>
8302
8303 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
8304 reference for ALFA mode.
8305 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
8306 procedure public so as to use it from formal verification back-end.
8307
8308 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8309
8310 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
8311 invalid checks of the Parameter, making Remove_Switch not working
8312 correctly.
8313
8314 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8315
8316 * targparm.ads: Update header: no run-time exception is needed on this
8317 file.
8318
8319 2011-08-04 Vincent Celier <celier@adacore.com>
8320
8321 * a-fihema.adb: Use System.IO instead of GNAT.IO
8322
8323 2011-08-04 Thomas Quinot <quinot@adacore.com>
8324
8325 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
8326 are forbidden in Compiler_Unit mode.
8327
8328 2011-08-04 Robert Dewar <dewar@adacore.com>
8329
8330 * sem_util.adb: Minor reformatting.
8331
8332 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8333
8334 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
8335 library-level finalizers.
8336 (Gen_Finalize_Library_C): Update the import string for library-level
8337 finalizers.
8338 (Gen_Finalize_Library_Defs_C): Update the definition name of a
8339 library-level finalizer.
8340 * exp_ch7.adb: Remove with and use clauses for Stringt.
8341 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
8342 Spec_Decl. Add local variable Body_Id. The names of library-level
8343 finalizers are now manually fully qualified and are no longer external.
8344 A single name is now capable of servicing .NET, JVM and non-VM targets.
8345 Pragma Export is no longer required to provide visibility for the name.
8346 (Create_Finalizer_String): Removed.
8347 (New_Finalizer_Name): New routine which mimics New_..._Name.
8348
8349 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8350
8351 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
8352 elaboration counter to Standard_Short_Integer.
8353 * sem_util.adb (Build_Elaboration_Entity): Likewise.
8354 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
8355 (Gen_Elab_Externals_C): Likewise.
8356
8357 2011-08-04 Ed Falis <falis@adacore.com>
8358
8359 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
8360 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
8361 system-vxworks-mips.ads, system-vxworks-x86.ads
8362 (Always_Compatible_Rep): set to False for all VxWorks targets.
8363
8364 2011-08-04 Robert Dewar <dewar@adacore.com>
8365
8366 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
8367 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
8368 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
8369 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
8370 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
8371 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
8372 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
8373 Minor reformatting and code reorganization.
8374
8375 2011-08-04 Emmanuel Briot <briot@adacore.com>
8376
8377 * projects.texi: Added doc for aggregate projects.
8378
8379 2011-08-04 Emmanuel Briot <briot@adacore.com>
8380
8381 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
8382 Add support for overriding the Project_Path in aggregate projects.
8383
8384 2011-08-04 Robert Dewar <dewar@adacore.com>
8385
8386 * a-cofove.ads: Minor reformatting.
8387
8388 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8389
8390 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
8391 on the generated code.
8392 (Build_Finalize_Statements): Update the comment on the generated code.
8393 (Build_Initialize_Statements): Update the comment on the generated code.
8394 (Build_Object_Declarations): Add local variable Result. The object
8395 declarations are now built in sequence.
8396 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
8397 RE_Unit_Table.
8398
8399 2011-08-04 Robert Dewar <dewar@adacore.com>
8400
8401 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
8402
8403 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8404
8405 * einfo.ads (Elaboration_Entity): Document new definition and use.
8406 (Elaboration_Entity_Required): Adjust to above change.
8407 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
8408 * exp_ch12.adb: And with and use for Snames.
8409 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
8410 * exp_util.adb (Set_Elaboration_Flag): Likewise.
8411 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
8412 <Check_Unit_Name>: Deal with N_Expanded_Name.
8413 <Attribute_Elaborated>: Extend to all unit names.
8414 * sem_elab.adb: And with and use for Uintp.
8415 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
8416 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
8417 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
8418 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
8419 from Gen_Adainit_Ada.
8420 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8421 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
8422 case, do not call System.Standard_Library.Adafinal; instead call
8423 finalize_library if needed.
8424 (Gen_Adafinal_C): Likewise.
8425 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8426 non-main program case.
8427 (Gen_Adainit_C): Generate a couple of external declarations here.
8428 In the main program case, set SSL.Finalize_Library_Objects.
8429 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8430 (Gen_Elab_Calls_C): Likewise.
8431 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
8432 (Gen_Finalize_Library_C): Likewise. Generate a full function.
8433 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8434 objects here.
8435 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8436 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
8437 Gen_Adafinal_Ada.
8438 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8439 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
8440 of external declarations. Call Gen_Finalize_Library_C.
8441
8442 2011-08-04 Emmanuel Briot <briot@adacore.com>
8443
8444 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8445 Compute_Compilation_Phases): new subprogram.
8446 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8447 The number of mains as well as the various compilation phases that
8448 need to be run are now project tree specific, since various
8449 aggregated trees might have different requirements. In particular,
8450 they do not all require bind or link phases.
8451
8452 2011-08-04 Emmanuel Briot <briot@adacore.com>
8453
8454 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8455 (Project_Tree_Appdata): New type.
8456 It is now possible to associate application-specific data to a project
8457 tree. In particular, this is used in the gprbuild builder to avoid a
8458 number of global tables and htables, especially now that there can be
8459 several project trees loaded at once because of aggregate projects.
8460 (Debug_Name): new procedure.
8461 * projects.texi: Clarify syntax of "**" for Source_Dirs
8462
8463 2011-08-03 Emmanuel Briot <briot@adacore.com>
8464
8465 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8466 the "roots" for a main.
8467 (Fill_From_Project): add support for aggregate projects. Main units
8468 in aggregated projects are now automatically added in the list of
8469 files to build (although this fails later on in gprbuild, because
8470 these files are not using the root proejct tree, so this needs
8471 further cleanup)
8472 * gcc-interface/Make-lang.in: Update dependencies.
8473
8474 2011-08-03 Yannick Moy <moy@adacore.com>
8475
8476 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8477 conditional expression in ALFA.
8478 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8479 expressions as not in ALFA.
8480
8481 2011-08-03 Robert Dewar <dewar@adacore.com>
8482
8483 * a-cofove.adb: Minor reformatting.
8484
8485 2011-08-03 Emmanuel Briot <briot@adacore.com>
8486
8487 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8488 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8489 gprbuild sources.
8490 These packages are more logically placed in the Queue package, since
8491 they manipulate the queue. It is also likely that they can be adapted
8492 for gnatmake, thus sharing more code.
8493 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8494 that we could move the above.
8495
8496 2011-08-03 Emmanuel Briot <briot@adacore.com>
8497
8498 * errutil.adb (Finalize): clean up the list of error messages on exit.
8499 Calling this subprogram multiple times will no longer show duplicate
8500 error messages on stderr.
8501
8502 2011-08-03 Emmanuel Briot <briot@adacore.com>
8503
8504 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8505 Getopt_Switches when we have already define a command line
8506 configuration.
8507
8508 2011-08-03 Yannick Moy <moy@adacore.com>
8509
8510 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8511 in ALFA. Instead, they are considered as assertions to prove.
8512 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8513 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8514 if they have no ELSE part, or if they occur in pre- and postconditions,
8515 where the Condition cannot have side-effects in ALFA
8516 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8517 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8518 Instead, include type conversion between scalar types in ALFA.
8519 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8520 if-and-only-if its type is in ALFA.
8521
8522 2011-08-03 Thomas Quinot <quinot@adacore.com>
8523
8524 * scos.adb, get_scos.adb, put_scos.adb
8525 New code letter for decisions: G (entry guard)
8526 * par_sco.adb
8527 (Traverse_Subprogram_Body): Rename to...
8528 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8529 (Traverse_Protected_Body): New subprogram
8530 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8531 protected bodies and entry bodies.
8532
8533 2011-08-03 Yannick Moy <moy@adacore.com>
8534
8535 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8536 entities with get/set subprograms, which is set on procedure entities
8537 generated by the compiler for a postcondition.
8538 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8539 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8540 entity for a declaration
8541 (Get_Unique_Entity_For_Decl): new function returning an entity which
8542 represents a declaration, so that matching spec and body have the same
8543 entity.
8544
8545 2011-08-03 Robert Dewar <dewar@adacore.com>
8546
8547 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8548 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8549
8550 2011-08-03 Yannick Moy <moy@adacore.com>
8551
8552 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8553 library-level because retriction No_Implicit_Dynamic_Code in the
8554 front-end prevents its definition as a local subprogram
8555 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8556 for reuse in other contexts
8557 (Traverse_Declarations_Or_Statements,
8558 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8559 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8560 procedures take a callback parameter to be called on all declarations
8561 * lib-xref.ads
8562 (Traverse_All_Compilation_Units): new generic function to traverse a
8563 compilation unit and call a callback parameter on all declarations
8564
8565 2011-08-03 Javier Miranda <miranda@adacore.com>
8566
8567 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8568 in Java since they are always enclosed in a namespace that
8569 differentiates them, and overloaded entities are supported by the VM.
8570
8571 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8572
8573 * checks.adb (Determine_Range): If a computed bound of an operation is
8574 outside the range of the base type of the expression, and overflow
8575 checks are enabled, the result is unknown and cannot be used for any
8576 subsequent constant folding.
8577 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8578 unknown, so is the result of the comparison.
8579
8580 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8581
8582 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8583 From_Abort. When finalization was triggered by an abort, propagate
8584 Standard'Abort_Signal rather than Program_Error.
8585 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8586 From_Abort.
8587 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8588 From_Abort. When finalization was triggered by an abort, propagate
8589 Standard'Abort_Signal rather than Program_Error.
8590 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8591 From_Abort.
8592 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8593 Abort_Id. Update the calls to Build_Object_Declarations and
8594 Build_Raise_Statement to include Abort_Id.
8595 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8596 calls to Build_Object_Declarations and Build_Raise_Statement to include
8597 Abort_Id.
8598 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8599 calls to Build_Object_Declarations and Build_Raise_Statement to include
8600 Abort_Id.
8601 (Build_Components): Create an entity for Abort_Id when exceptions are
8602 allowed on the target.
8603 (Build_Finalizer): New local variable Abort_Id.
8604 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8605 calls to Build_Object_Declarations and Build_Raise_Statement to include
8606 Abort_Id.
8607 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8608 declaration of flag Abort_Id to preserve the original abort status
8609 before finalization code is executed.
8610 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8611 runtime routine Raise_From_Controlled_Operation.
8612 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8613 Abort_Id. Update the call to Build_Object_Declarations to include
8614 Abort_Id. Update the layout of the finalizer body.
8615 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8616 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8617 clunky code to create all flags and objects related to
8618 exception propagation and replace it with a call to
8619 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8620 include Abort_Id.
8621 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8622 Add new formal Abort_Id and associated comment on its use.
8623 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8624 on its use.
8625 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8626 Remove the clunky code to create all flags and objects related to
8627 exception propagation and replace it with a call to
8628 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8629
8630 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8631
8632 * s-tassta.adb: Fix minor typos.
8633
8634 2011-08-03 Robert Dewar <dewar@adacore.com>
8635
8636 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8637 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8638
8639 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8640
8641 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8642 to packages. This ensures that the finalizer body will not end up
8643 inside the freeze node.
8644 (Process_Declarations): Add code to detect whether a freeze node has a
8645 nested finalization collection.
8646
8647 2011-08-03 Pascal Obry <obry@adacore.com>
8648
8649 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8650 (Current_Session): Return a not null access to Session_Type.
8651 (Default_Session): Likewise.
8652
8653 2011-08-03 Robert Dewar <dewar@adacore.com>
8654
8655 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8656 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8657
8658 2011-08-03 Pascal Obry <obry@adacore.com>
8659
8660 * g-awk.ads: Minor comment fix.
8661
8662 2011-08-03 Sergey Rybin <rybin@adacore.com>
8663
8664 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8665 the tree structure related to discriminant constraints.
8666 Original_Discriminant cannot be used any more for computing the
8667 defining name for the reference to a discriminant.
8668
8669 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8670
8671 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8672 function is not visibly tagged, this is not a dispatching call and
8673 therfore is not Tag_Indeterminate, even if the function is marked as
8674 dispatching on result.
8675
8676 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8677
8678 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8679 (Expand_N_Free_Statement): Add a guard to protect against run-times
8680 which do not support controlled types.
8681 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8682 against run-times which do not support controlled types.
8683 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8684 against run-times which do not support controlled types.
8685 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8686 against run-times which do not support controlled types.
8687 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8688 protect against run-times which do not support controlled types.
8689
8690 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8691
8692 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8693 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8694
8695 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8696
8697 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8698 modified in the source, to prevent spurious warnings when compiling
8699 with -gnatg.
8700
8701 2011-08-03 Thomas Quinot <quinot@adacore.com>
8702
8703 * a-except-2005.adb: Minor reformatting.
8704
8705 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8706
8707 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8708 is a renaming declaration in the private part of a package, do not emit
8709 a warning that the with_clause could be moved because the renaming may
8710 be used in the body or in a child unit.
8711
8712 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8713
8714 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8715 Propagate the Comes_From_Source attribute from the original return
8716 object to the renaming.
8717
8718 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8719
8720 * exp_ch7.adb (Build_Raise_Statement): Do not call
8721 Raise_From_Controlled_Operation when this routine is not present in
8722 the run-time library.
8723 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8724 libraries (Ravenscar), tasks are non-terminating, and protected objects
8725 and tasks can only appear at library level, so we do not want
8726 finalization of protected objects nor tasks.
8727 * exp_intr.adb: Minor clarification in comment.
8728 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8729 Gen_Output_File_C): Remove references to finalization of library-level
8730 objects when using restricted run-time libraries.
8731
8732 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8733
8734 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8735 Original_Discriminant only if the parent type is a generic formal.
8736
8737 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8738
8739 * exp_ch13.adb: Add with and use clause for Targparm;
8740 (Expand_N_Free_Statement): Prevent the generation of a custom
8741 Deallocate on .NET/JVM targets since this requires pools and address
8742 arithmetic.
8743 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8744 .NET/JVM targets, attach the newly allocated object to the access
8745 type's finalization collection. Do not generate a call to
8746 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8747 exist in the runtime.
8748 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8749 create a custom Allocate for object that do not require initialization.
8750 Attach a newly allocated object to the access type's finalization
8751 collection on .NET/JVM.
8752 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8753 assignment of controlled types on .NET/JVM. The two hidden pointers
8754 Prev and Next and stored and later restored after the assignment takes
8755 place.
8756 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8757 kludge for .NET/JVM to recognize a particular piece of code coming from
8758 Heap_Management and change the call to Finalize into Deep_Finalize.
8759 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8760 finalization collections on .NET/JVM only for types derived from
8761 Controlled. Separate the association of storage pools with a collection
8762 and only allow it on non-.NET/JVM targets.
8763 (Make_Attach_Call): New routine.
8764 (Make_Detach_Call): New routine.
8765 (Process_Object_Declarations): Suppress the generation of
8766 build-in-place return object clean up code on .NET/JVM since it uses
8767 pools.
8768 * exp_ch7.ads (Make_Attach_Call): New routine.
8769 (Make_Detach_Call): New routine.
8770 * exp_intr.adb Add with and use clause for Targparm.
8771 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8772 on .NET/JVM targets.
8773 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8774 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8775 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8776 names used in finalization.
8777
8778 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8779
8780 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8781 (Attach, Detach): Lock the current task when chaining an object onto a
8782 collection.
8783
8784 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8785
8786 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8787 Rewritten to create the message strings when the exception is not
8788 raised by an abort during finalization.
8789 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8790 Raise_From_Controlled_Operation and update its associated comment.
8791 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8792 Ada.Finalization.Heap_Management provides key functionality
8793 associated with controlled objects on the heap, their creation,
8794 finalization and reclamation. Type Finalization_Collection is
8795 effectively a wrapper which sits ontop of a storage pool and performs
8796 all necessary bookkeeping for all the objects it contains. Each
8797 access-to-controlled or access-to-class-wide type receives a collection
8798 as part of its expansion. The compiler generates buffer code and
8799 invokes Allocate / Deallocate to create and destroy allocated
8800 controlled objects.
8801 * a-finali.adb ("="): Removed.
8802 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8803 fields Prev and Next.
8804 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8805 A library unit with at least one controlled object on the library level
8806 has a special finalizer which is invoked by the binder. To signal this,
8807 ali files carry field PF.
8808 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8809 associated comment on field usage.
8810 * a-tags.adb (Get_RC_Offset): Removed.
8811 (Needs_Finalization): New routine.
8812 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8813 Dispatch tables now carry field Needs_Finalization which provides
8814 runtime indication whether a type is controlled or has controlled
8815 components or both. Remove field RC_Offset.
8816 (Get_RC_Offset): Removed along with its associated pragma Export.
8817 Since tagged types with controlled components no longer carry hidden
8818 field _controller, the special mechanism to retrieve its location is no
8819 longer needed.
8820 (Needs_Finalization): New routine.
8821 * atree.ads, atree.adb (Elist24): New routine.
8822 (Set_Elist24): New routine.
8823 * atree.h: Add a define clause for Elist24.
8824 * bindgen.adb New library-level variable Lib_Final_Built.
8825 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8826 presence of a VM target, the routine generates calls to the proper
8827 library finalization routine.
8828 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8829 targets. Set the correct library finalization routine depending on
8830 whether the library has controlled objects or this is a VM compilation.
8831 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8832 to library-level finalizers of compiled units in reverse order of
8833 elaboration. It also produces exception management code and reraises a
8834 potential exception after all units have been finalized.
8835 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8836 library-level finalizers of compiled units in reverse order of
8837 elaboration.
8838 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8839 definitions of all library-level finalizers available to the compilation
8840 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8841 dependent code.
8842 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8843 System.Standard_Library.Adafinal directly. If the library needs
8844 finalization actions, create the sequence of finalization calls.
8845 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8846 Generate a with clause for System.Soft_Links when compiling for a VM.
8847 Remove the code which imports System.Standard_Library.Adafinal as
8848 Do_Finalize. Generate the library finalization routine.
8849 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8850 If the library needs finalization actions, create all the definitions
8851 of library- level finalizers.
8852 (Has_Finalizer): New routine. Determines whether at least one compiled
8853 unit has a library-level finalizer.
8854 Add type Qualification_Mode.
8855 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8856 * einfo.adb: New usage of field 15 as Return_Flag.
8857 Remove Finalization_Chain_Entity from the usages of field 19.
8858 Remove Associated_Final_Chain from the usages of field 23.
8859 New usage of field 23 as Associated_Collection.
8860 New usage of field 24 as Finalizer.
8861 New usage of flag 252 as Is_Processed_Transient.
8862 (Associated_Final_Chain): Removed.
8863 (Associated_Collection): New routine.
8864 (Finalization_Chain_Entity): Removed.
8865 (Finalizer): New routine.
8866 (Is_Finalizer): New routine.
8867 (Is_Processed_Transient): New routine.
8868 (Return_Flag): New routine.
8869 (Set_Associated_Final_Chain): Removed.
8870 (Set_Associated_Collection): New routine.
8871 (Set_Finalization_Chain_Entity): Removed.
8872 (Set_Finalizer): New routine.
8873 (Set_Is_Processed_Transient): New routine.
8874 (Set_Return_Flag): New routine.
8875 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8876 displayed flags.
8877 (Write_Field8_Name): Alphabetize the output.
8878 (Write_Field11_Name): Alphabetize the output.
8879 (Write_Field12_Name): Alphabetize the output.
8880 (Write_Field13_Name): Alphabetize the output.
8881 (Write_Field14_Name): Alphabetize the output.
8882 (Write_Field15_Name): Alphabetize the output.
8883 (Write_Field16_Name): Alphabetize the output.
8884 (Write_Field17_Name): Alphabetize the output.
8885 (Write_Field18_Name): Alphabetize the output.
8886 (Write_Field19_Name): Alphabetize the output. Remove the output of
8887 Finalization_Chain_Entity.
8888 (Write_Field20_Name): Alphabetize the output.
8889 (Write_Field21_Name): Alphabetize the output.
8890 (Write_Field22_Name): Alphabetize the output.
8891 (Write_Field23_Name): Alphabetize the output. Remove the output of
8892 Associated_Final_Chain. Add output for Associated_Collection.
8893 (Write_Field24_Name): Alphabetize the output.
8894 (Write_Field25_Name): Add output for Finalizer.
8895 (Write_Field26_Name): Alphabetize the output.
8896 (Write_Field27_Name): Alphabetize the output.
8897 (Write_Field28_Name): Alphabetize the output.
8898 * einfo.ads: Add new field description for Associated_Collection and
8899 its uses in nodes.
8900 Remove Associated_Final_Chain and its uses in nodes.
8901 Remove Finalization_Chain_Entity and its uses in nodes.
8902 Add new field description for Finalizer and its uses in nodes.
8903 Add new synthesized attribute Is_Finalizer.
8904 Add new flag description for Is_Processed_Transient and its uses in
8905 nodes.
8906 Add new field description for Return_Flag and its uses in nodes.
8907 (Associated_Final_Chain): Removed along with its pragma Inline.
8908 (Associated_Collection): New routine and pragma Inline.
8909 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8910 (Finalizer): New routine and pragma Inline.
8911 (Is_Finalizer): New routine and pragma Inline.
8912 (Is_Processed_Transient): New routine and pragma Inline.
8913 (Return_Flag): New routine and pragma Inline.
8914 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8915 (Set_Associated_Collection): New routine and pragma Inline.
8916 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8917 (Set_Finalizer): New routine and pragma Inline.
8918 (Set_Is_Processed_Transient): New routine and pragma Inline.
8919 (Set_Return_Flag): New routine and pragma Inline.
8920 * exp_aggr.adb: Alphabetize subprograms.
8921 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8922 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8923 associated comments. Remove local variables External_Final_List and
8924 Attach.
8925 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8926 Ancestor. Remove the retrieval of finalization lists. Update the call to
8927 Make_Adjust_Call.
8928 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8929 lists. Update the call to Late_Expansion.
8930 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8931 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8932 (Gen_Assign): Remove the retrieval of the finalization list used to
8933 build the assignment. Update the calls to Make_Init_Call and
8934 Make_Adjust_Call.
8935 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8936 Remove the mechanism to determine attachment levels and finalization
8937 list retrieval. Remove the processing for coextensions.
8938 (Init_Controller): Removed. Controllers no longer exist.
8939 (Late_Expansion): Remove formals Flist and Obj along with their
8940 associated comments. Update the calls to Build_Record_Aggr_Code and
8941 Build_Array_Aggr_Code.
8942 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8943 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8944 appear in entry bodies, protected subprograms and task bodies.
8945 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8946 * exp_ch3.adb (Add_Final_Chain): Removed.
8947 (Build_Array_Init_Proc): Alphabetize local variables.
8948 (Build_Assignment): Alphabetize local variables. Update the call to
8949 Maked_Adjust_Call.
8950 (Build_Class_Wide_Master): Rename local variables to better reflect
8951 their role.
8952 (Build_Discriminant_Assignments): Code reformatting.
8953 (Build_Init_Call_Thru): Code reformatting.
8954 (Build_Init_Procedure): Code reformatting. Generate a special version
8955 of Deep_Finalize which is capable of finalizing all initialized
8956 components and ignore the rest.
8957 (Build_Init_Statements): Rename local variables to better reflect their
8958 role.
8959 Reimplement the mechanism to include the creation and update of an index
8960 variable called a "counter". It is used as a bookmark for tracing
8961 initialized and non-initialized components.
8962 (Build_Initialization_Call): Remove local variable Controller_Typ.
8963 Alphabetize all local variables. Remove the initialization of the
8964 record controller and update the call to Make_Init_Call.
8965 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8966 New local variable Counter.
8967 (Constrain_Array): Alphabetize.
8968 (Expand_Freeze_Array_Type): Create a collection instead of a
8969 finalization list.
8970 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8971 Finalize_Address which is used in conjunction with allocated controlled
8972 objects.
8973 (Expand_N_Object_Declaration): Remove the creation of a finalization
8974 list for anonymous access types. Update the calls to Make_Init_Call and
8975 Make_Adjust_Call.
8976 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8977 retrieval of finalization lists. Remove the expansion of the record
8978 controller. Create TSS primitive Finalize_Address used in conjunction
8979 with controlled objects on the heap. Create finalization collections
8980 for access-to-controlled record components.
8981 (Expand_Record_Controller): Removed.
8982 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8983 class-wide types now requires additional processing. Create
8984 finalization collections for access-to-controlled types.
8985 (Increment_Counter): New routine.
8986 (Make_Counter): New routine.
8987 (Make_Eq_If): Remove the mention of Name_uController.
8988 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8989 types coming from System.Finalization_Root.
8990 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8991 (Predefined_Primitive_Bodies): There is no longer need to skip types
8992 coming from System.Finalization_Root.
8993 (Stream_Operation_OK): Do not generate stream routines for
8994 type Ada.Finalization.Heap_Management.Finalization_Collection.
8995 * exp_ch3.ads: Alphabetize subprograms.
8996 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8997 Add with and use clause for Lib.
8998 (Complete_Coextension_Finalization): Removed.
8999 (Complete_Controlled_Allocation): New routine. Create a finalization
9000 collection for anonymous access-to-controlled types. Create a custom
9001 Allocate which interfaces with the back end and the machinery in
9002 Heap_Management.
9003 (Expand_Allocator_Expression): Add necessary calls to
9004 Complete_Controlled_Allocation. Remove the retrieval of finalization
9005 lists. Update the calls to Make_Adjust_Call. Generate a call to
9006 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9007 the associated collection.
9008 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
9009 Code clean up. Remove the retrieval of finalization lists and
9010 attachment levels.
9011 Update the call to Make_Init_Call. Generate a call to
9012 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9013 the associated collection.
9014 (Get_Allocator_Final_List): Removed. Finalization lists are not
9015 available.
9016 (Suitable_Element): Remove the mention of Name_uController.
9017 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
9018 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
9019 the left hand side, carry out the assignment and adjust the left hand
9020 side.
9021 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
9022 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
9023 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9024 BIP_Collection and BIPcollection.
9025 (Build_Heap_Allocator): New routine used to allocate the return object
9026 of a build-in-place function onto a collection.
9027 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9028 (Expand_Call): Do not replace direct calls to Deep routines with their
9029 aliases.
9030 (Expand_N_Extended_Return_Statement): Give all variables shorter names
9031 and update their occurrences. Add a special return flag to monitor the
9032 [ab]normal execution of the function. The flag is set right before the
9033 return statement.
9034 Rewrite the mechanism used to allocate a build-in-place return object
9035 on the heap or on a storage pool.
9036 (Is_Direct_Deep_Call): New routine.
9037 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
9038 build-in-place function call instead of a final list. Build a call to
9039 Set_Finalize_Address_Ptr to decorate the associated collection.
9040 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
9041 order to name the build-in-place function call's result for later
9042 finalization. Add a collection to a build-in-place function call
9043 instead of a final list.
9044 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
9045 build-in-place function call instead of a final list. Remove the code
9046 which moves one final list and transforms it into the actual in a
9047 nested build-in-place call.
9048 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
9049 build-in-place function call instead of a final list.
9050 (Move_Final_List): Removed.
9051 (Needs_BIP_Collection): New routine.
9052 (Needs_BIP_Final_List): Removed.
9053 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
9054 enumeration type BIP_Formal_Kind.
9055 Update the related comment.
9056 (Needs_BIP_Collection): New routine.
9057 (Needs_BIP_Final_List): Removed.
9058 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
9059 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
9060 majority of subprograms in this unit. Add Name_Finalize_Address to
9061 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
9062 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
9063 statements for an array type.
9064 (Build_Adjust_Statements): Create the adjust statements for a record
9065 type.
9066 (Build_Cleanup_Statements): New routine. A procedure which given any
9067 construct containing asynchronous calls, references to _master, or is a
9068 task body, a task allocation or a protected body produces the necessary
9069 runtime calls to clean up these constructs.
9070 (Build_Exception_Handler): New routine.
9071 (Build_Final_List): Removed.
9072 (Build_Finalization_Collection): New routine. A core procedure which
9073 creates a collection to service heap allocated controlled objects
9074 associated with an access-to-controlled type.
9075 (Build_Finalize_Statements): Create the finalization statements for a
9076 record types.
9077 (Build_Finalizer): New routine. A core procedure which given any
9078 construct with declarations and/or statements detects all objects which
9079 need any type of clean up (controlled objects, protected objects) and
9080 generates all necessary code to clean up the said objects in the proper
9081 order.
9082 (Build_Finalizer_Call): New routine.
9083 (Build_Initialize_Statements): Create the initialization statements for
9084 an array type. The generated routine contains code to finalize partially
9085 initialized arrays.
9086 (Build_Object_Declarations): New routine.
9087 (Build_Raise_Statement): New routine.
9088 (Clean_Simple_Protected_Objects): Removed.
9089 (Controller_Component): Removed.
9090 (Enclosing_Function): New routine.
9091 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
9092 either declarations or statements or both.
9093 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
9094 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
9095 package.
9096 (Find_Final_List): Removed.
9097 (Global_Flist_Ref): Removed.
9098 (In_Finalization_Root): Removed.
9099 (Insert_Actions_In_Scope_Around): Determine the range of the transient
9100 scope in terms of tree nodes. Process all transient variables within
9101 that range.
9102 (Make_Adjust_Call): Rewritten. There is no longer an attach call
9103 generated after the adjust.
9104 (Make_Attach_Call): Removed.
9105 (Make_Call): New routine.
9106 (Make_Clean): Removed.
9107 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
9108 build routines.
9109 (Make_Deep_Proc): Rewritten to generate the new profile signature used
9110 in Deep routines.
9111 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
9112 build routines.
9113 (Make_Final_Call): Modified to simply create a call to either
9114 Deep_Finalize or Finalize.
9115 (Make_Finalize_Address_Body): New routine.
9116 (Make_Finalize_Address_Stmts): New routine. A function which produces
9117 TSS primitive Finalize_Address used in conjunction with heap allocated
9118 controlled objects.
9119 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
9120 (Make_Init_Call): Rewritten. There is no longer an attach call
9121 generated after initialization.
9122 (Make_Local_Deep_Finalize): New routine.
9123 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9124 (Make_Transient_Block): Remove the finalization list retrieval and
9125 manipulation.
9126 (Needs_Finalization): Moved to Exp_Util.
9127 (Parent_Field_Type): New routine.
9128 (Preprocess_Components): New routine.
9129 (Process_Transient_Objects): New routine.
9130 (Wrap_HSS_In_Block): New routine.
9131 (Wrap_Transient_Declaration): Remove finalization list management and
9132 controller insertion.
9133 (Wrap_Transient_Expression): Code reformatting.
9134 (Wrap_Transient_Statement): Code reformatting.
9135 * exp_ch7.ads (Build_Final_List): Removed.
9136 (Build_Finalization_Collection): New routine.
9137 (Build_Raise_Statement): New routine.
9138 (Controller_Component): Removed.
9139 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
9140 (Find_Final_List): Removed.
9141 (In_Finalization_Root): Removed.
9142 (Is_Simple_Protected_Type): Update related comment.
9143 (Make_Adjust_Call): New parameter profile and associated comments.
9144 (Make_Attach_Call): Removed.
9145 (Make_Final_Call): New parameter profile and associated comments.
9146 (Make_Finalize_Address_Body): New routine.
9147 (Make_Init_Call): New parameter profile and associated comments.
9148 (Make_Local_Deep_Finalize): New routine.
9149 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9150 (Needs_Finalization): Moved to Exp_Util.
9151 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
9152 (Expand_N_Protected_Body): Remove the handling of finalization lists.
9153 (Find_Protection_Type): Moved to Exp_Util.
9154 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
9155 (Make_DT): Update sequence of dispatch table initialization. Remove the
9156 initialization of field RC_Offset. Add initialization of field Needs_
9157 Finalization.
9158 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
9159 Reimplement how an object is first finalized, then deallocated.
9160 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
9161 Code reformatting.
9162 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
9163 Register TSS_Finalize_Address with type TSS_Names.
9164 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
9165 procedure provides the interface between an allocation / deallocation
9166 and the support machinery in Ada.Finalization.Heap_Management.
9167 (Find_Init_Call): Code reformatting.
9168 (Find_Init_Call_In_List): Code reformatting.
9169 (Find_Protection_Type): Moved from Exp_Ch9.
9170 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
9171 (Has_Controlled_Coextensions): Removed.
9172 (Has_Controlled_Objects): New routine.
9173 (In_Library_Level_Package_Body): New routine.
9174 (Insert_Action_After): New routine.
9175 (Is_Finalizable_Transient): New routine. This predicate determines
9176 whether an object declaration is one of the many variants of controlled
9177 transients.
9178 (Is_Null_Access_BIP_Func_Call): New routine.
9179 (Is_Non_BIP_Func_Call): New routine.
9180 (Is_Related_To_Func_Return): New routine.
9181 (Needs_Finalization): Moved from Exp_Ch7.
9182 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
9183 (Find_Protection_Type): Moved from Exp_Ch9.
9184 (Has_Controlled_Coextensions): Removed.
9185 (Has_Controlled_Objects): New routine.
9186 (In_Library_Level_Package_Body): New routine.
9187 (Insert_Action_After): New routine.
9188 (Is_Finalizable_Transient): New routine.
9189 (Is_Null_Access_BIP_Func_Call): New routine.
9190 (Is_Non_BIP_Func_Call): New routine.
9191 (Is_Related_To_Func_Return): New routine.
9192 (Needs_Finalization): Moved from Exp_ch7.
9193 * expander.adb (Expand): Add a case for N_Free_Statement.
9194 * freeze.adb (Freeze_All): Replace the generation of a finalization
9195 list with a collection for access-to-controlled types.
9196 (Freeze_Entity): Code reformatting.
9197 (Freeze_Record_Type): Remove the freezing of a record controller
9198 component.
9199 (Freeze_Subprogram): Code reformatting.
9200 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
9201 finalization list.
9202 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
9203 has a library-level finalizer.
9204 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
9205 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
9206 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
9207 files. Add a-fihema to the list of object files.
9208 * par-ch4.adb:
9209 Alphabetize the associations in type Is_Parameterless_Attribute.
9210 * rtsfind.ads: Ada.Finalization_List.Controller and
9211 System.Finalization_Implementation are no longer a GNAT unit.
9212 Update the range of type Ada_Finalization_Child. Remove the following
9213 recoverable entities:
9214
9215 RE_Attach_To_Final_List
9216 RE_Deep_Tag_Attach
9217 RE_Finalize_List
9218 RE_Finalize_One
9219 RE_Finalizable_Ptr_Ptr
9220 RE_Global_Final_List
9221 RE_Limited_Record_Controller
9222 RE_List_Controller
9223 RE_Move_Final_List
9224 RE_Record_Controller
9225 RE_Simple_List_Controller
9226
9227 Add the following recoverable entities:
9228
9229 RE_Add_Offset_To_Address
9230 RE_Allocate
9231 RE_Base_Pool
9232 RE_Deallocate
9233 RE_Exception_Identity
9234 RE_Finalization_Collection
9235 RE_Finalization_Collection_Ptr
9236 RE_Needs_Finalization
9237 RE_Save_Library_Occurrence
9238 RE_Set_Finalize_Address_Ptr
9239 RE_Set_Storage_Pool_Ptr
9240 RE_Storage_Count
9241 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
9242 Name_uController.
9243 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
9244 (First_Stored_Discriminant): Remove the mention of Name_uController.
9245 * sem_aux.ads: Comment reformatting.
9246 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
9247 to redecorate an already existing class-wide type.
9248 (Decorate_Tagged_Type): New parameter profile and associated comment.
9249 Create a "shadow class-wide type" for a shadow entity.
9250 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
9251 of the final chain along with the associated comment.
9252 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
9253 Full_Desig and set it to the full view of the designated type.
9254 Initialize the finalization collection to empty.
9255 (Build_Derived_Record_Type): Alphabetize local variables. Code
9256 reformatting.
9257 (Collect_Fixed_Components): Remove the mention of Name_uController.
9258 (Create_Constrained_Components): Remove the mention of Name_uController.
9259 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
9260 class-wide type of a shadow entity.
9261 (Process_Full_View): Update the machinery which marks type
9262 Limited_Controlled's entity as limited.
9263 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
9264 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
9265 list, instead make a collection build-in-place formal.
9266 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
9267 a designated type in order to establish a match between the renaming
9268 and the renamed entity.
9269 (Find_Selected_Component): Add guard to prevent spurious exceptions
9270 from being raised on .NET/JVM.
9271 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
9272 to the list of primitive that need special processing. Update arrays
9273 C_Names and D_Names.
9274 (Replace_Types): Handle class-wide types.
9275 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
9276 different parameter profile, look at the first formal.
9277 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
9278 use clauses for Exp_Util.
9279 * sem_res.adb: Remove with and use clauses for Elists.
9280 (Propagate_Coextensions): Removed.
9281 (Resolve_Allocator): Do not propagate the list of coextensions from one
9282 allocator to another.
9283 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
9284 Deaccessed_T to Desig_Typ.
9285 (Enter_Name): Remove the mention of Name_uController.
9286 (Gather_Components): Remove the mention of Name_uController.
9287 (Incomplete_Or_Private_View): New routine.
9288 (Is_Coextension_Root): Removed.
9289 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
9290 * sem_util.ads (Incomplete_Or_Private_View): New routine.
9291 (Is_Coextension_Root): Removed.
9292 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
9293 Controlled types are now derived from a null tagged record. Remove
9294 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
9295 * sinfo.adb (Coextensions): Removed.
9296 (Set_Coextensions): Removed.
9297 * sinfo.ads: Remove Coextensions from the explanation of node fields
9298 and its uses in nodes.
9299 Update the field usage of N_Allocator.
9300 (Coextensions): Removed along with its pragma Inline.
9301 (Set_Coextensions): Removed along with its pragma Inline.
9302 * snames.ads-tmpl: Remove names
9303
9304 Name_uClean
9305 Name_uController
9306 Name_uFinal_List
9307 Name_uLocal_Final_List
9308 Name_Finalization_Root
9309 Name_Next
9310 Name_Prev
9311
9312 Add names
9313
9314 Name_uFinalizer
9315 Name_Finalize_Address
9316 * s-pooglo.adb (Allocate): Add overriding indicator.
9317 (Deallocate): Add overriding indicator.
9318 (Storage_Size): Add overriding indicator.
9319 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
9320 than Finalize_Global_List.
9321 (Null_Finalize_Global_List): Removed.
9322 (Save_Library_Occurrence): New routine.
9323 * s-soflin.ads: Remove variable Finalize_Global_List along with its
9324 initialization. Add variable Finalize_Library_Objects along with its
9325 pragma Export. Add variables Library_Exception and
9326 Library_Exception_Set along with their pragma Export.
9327 (Null_Finalize_Global_List): Removed.
9328 (Save_Library_Occurrence): New routine.
9329 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
9330 rather than Finalize_Global_List.
9331 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
9332 of the constructed node.
9333
9334 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9335
9336 * link.c: Include "auto-host.h" before system headers.
9337
9338 2011-08-03 Vincent Celier <celier@adacore.com>
9339
9340 * make.adb (Gnatmake): Add to table Library_Projs only library projects
9341 that are not extended. Do not check if a library project that is
9342 extended should be regenerated. Do not add to table Library_Paths the
9343 libraries that are in extended projects. Link only with libraries that
9344 are in libray projects that are not extended.
9345 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
9346 for a library project that is extended.
9347
9348 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9349
9350 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
9351 conforming subprogram renamings that appear to be completions if they
9352 are not fully conformant.
9353 Such renamings are homographs but not completions.
9354 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
9355 names in a subprogram renaming that appears in an instance.
9356
9357 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9358
9359 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
9360 not immutably limited, build actual subtype from expression to provide
9361 proper bounds to caller.
9362
9363 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9364
9365 * sem_ch8.adb: Minor comment correction.
9366
9367 2011-08-03 Thomas Quinot <quinot@adacore.com>
9368
9369 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
9370 returning a limited array, use an extended return statement.
9371
9372 2011-08-03 Vincent Celier <celier@adacore.com>
9373
9374 * make.adb (Initialize): If --subdirs= is used, but no project file is
9375 specified, attempt to create the specify subdir if it does not already
9376 exist and use it as the object directory as if -D had been specified.
9377
9378 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9379
9380 * s-tpopsp-vms.adb: New file.
9381 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
9382 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
9383
9384 2011-08-03 Emmanuel Briot <briot@adacore.com>
9385
9386 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
9387 package.
9388
9389 2011-08-03 Yannick Moy <moy@adacore.com>
9390
9391 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
9392 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
9393 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
9394 detect that an array has static bounds.
9395
9396 2011-08-03 Thomas Quinot <quinot@adacore.com>
9397
9398 * exp_dist.adb: Minor reformatting.
9399
9400 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9401
9402 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
9403 (ATCB_Key): Removed, not always used.
9404
9405 2011-08-03 Emmanuel Briot <briot@adacore.com>
9406
9407 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
9408 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
9409 most remaining global variables.
9410
9411 2011-08-03 Robert Dewar <dewar@adacore.com>
9412
9413 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
9414 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
9415 reformatting.
9416
9417 2011-08-03 Javier Miranda <miranda@adacore.com>
9418
9419 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9420 that must be passed by copy in VM targets.
9421
9422 2011-08-03 Emmanuel Briot <briot@adacore.com>
9423
9424 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9425 duplicates a similar htable now in the project tree.
9426
9427 2011-08-03 Claire Dross <dross@adacore.com>
9428
9429 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9430 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9431 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9432 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9433 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9434 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9435 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9436 update.
9437
9438 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9439
9440 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9441 (ATCB_Key): Removed, not always used.
9442 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9443 s-taprop-posix.adb.
9444 * s-tpopsp-tls.adb: New file.
9445 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9446 x86/x64/ia64/powerpc/sparc Linux.
9447
9448 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9449
9450 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9451 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9452
9453 2011-08-03 Thomas Quinot <quinot@adacore.com>
9454
9455 * rtsfind.ads, exp_dist.adb, exp_dist.ads
9456 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9457 Fix type selection for mapping integer types to PolyORB types.
9458
9459 2011-08-03 Bob Duff <duff@adacore.com>
9460
9461 * sem_ch7.adb: Minor comment clarification.
9462
9463 2011-08-03 Bob Duff <duff@adacore.com>
9464
9465 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9466 an error analyzing a choice, skip further processing. Further
9467 processing could cause a crash or cascade errors.
9468
9469 2011-08-03 Emmanuel Briot <briot@adacore.com>
9470
9471 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9472 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9473 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9474 prj-env.ads (Shared_Project_Tree_Data): new type
9475 An aggregate project and its aggregated trees need to share the common
9476 data structures used for lists of strings, packages,... This makes the
9477 code simpler since otherwise we have to pass the root tree (also used
9478 for the configuration file data) in addition to the current project
9479 tree. This also avoids ambiguities as to which tree should be used.
9480 And finally this saves a bit of memory.
9481 (For_Every_Project_Imported): new parameter Tree.
9482 Since aggregated projects are using a different tree, we need to let
9483 the caller know which tree to use to manipulate the returned project.
9484
9485 2011-08-03 Robert Dewar <dewar@adacore.com>
9486
9487 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9488 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9489 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9490 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9491
9492 2011-08-03 Javier Miranda <miranda@adacore.com>
9493
9494 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9495 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9496
9497 2011-08-03 Bob Duff <duff@adacore.com>
9498
9499 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9500 the Base_Type.
9501
9502 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9503
9504 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9505 g-sehash.ads: Fix typo. Update header.
9506
9507 2011-08-03 Thomas Quinot <quinot@adacore.com>
9508
9509 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9510 expansion.
9511
9512 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9513
9514 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9515 prefixes of private types along with records, since the selector may be
9516 a discriminant.
9517 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9518 private types along with records, since the selector may be a
9519 discriminant.
9520
9521 2011-08-03 Emmanuel Briot <briot@adacore.com>
9522
9523 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9524
9525 2011-08-03 Javier Miranda <miranda@adacore.com>
9526
9527 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9528 Tagged_Type_Expansion.
9529
9530 2011-08-03 Yannick Moy <moy@adacore.com>
9531
9532 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9533 violation when the argument of concatenation is the name of a
9534 constant.
9535
9536 2011-08-03 Emmanuel Briot <briot@adacore.com>
9537
9538 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9539 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9540 (Process_Declarative_Items): new parameter Child_Env.
9541
9542 2011-08-03 Yannick Moy <moy@adacore.com>
9543
9544 * alfa.ads: Update format of ALFA section in ALI file in order to
9545 add a mapping from bodies to specs when both are present.
9546 (ALFA_Scope_Record): Add components for spec file/scope.
9547 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9548 present.
9549 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9550 collected, fill in the spec information when relevant.
9551 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9552 present.
9553
9554 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9555
9556 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9557 code unit to decide whether to add internally generated subprograms.
9558
9559 2011-08-03 Javier Miranda <miranda@adacore.com>
9560
9561 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9562 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9563 be handled by copy in VM targets.
9564
9565 2011-08-03 Emmanuel Briot <briot@adacore.com>
9566
9567 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9568 code with Makeutl.Get_Switches.
9569 * prj-tree.adb: Update comment.
9570
9571 2011-08-03 Thomas Quinot <quinot@adacore.com>
9572
9573 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9574 subprogram with a limited formal that does not support external
9575 streaming.
9576
9577 2011-08-03 Yannick Moy <moy@adacore.com>
9578
9579 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9580 continuation line
9581 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9582 not from current unit in two phases, because it is not possible to
9583 change the table while iterating over its content.
9584 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9585
9586 2011-08-03 Sergey Rybin <rybin@adacore.com>
9587
9588 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9589 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9590
9591 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9592
9593 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9594 and the component type is composite, this is ambiguous for predefined
9595 concatenation, but if the node is not overloaded and the entity is a use
9596 -defined function its profile can be used to resolve that aggregate.
9597
9598 2011-08-03 Robert Dewar <dewar@adacore.com>
9599
9600 * exp_ch4.adb: Minor code cleanup.
9601
9602 2011-08-03 Thomas Quinot <quinot@adacore.com>
9603
9604 * exp_dist.adb: Do not generate distribution stubs if serious errors
9605 have been diagnosed.
9606
9607 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9608
9609 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9610 the first formal of a primitive operation, go to the base type to
9611 handle properly an access to a derived type with constrained
9612 discriminants.
9613 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9614 user-defined function that is only use-visible.
9615
9616 2011-08-03 Robert Dewar <dewar@adacore.com>
9617
9618 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9619 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9620 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9621 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9622 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9623 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9624 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9625 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9626
9627 2011-08-03 Robert Dewar <dewar@adacore.com>
9628
9629 * repinfo.adb (List_Mechanism): Add handling of
9630 Convention_Ada_Pass_By_XXX.
9631 * sem_mech.adb (Set_Mechanism): Ditto.
9632 * sem_prag.adb (Process_Convention): Add entries for
9633 Convention_Ada_Pass_By_XXX.
9634 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9635
9636 2011-08-03 Pascal Obry <obry@adacore.com>
9637
9638 * makeutl.adb: Minor reformatting.
9639
9640 2011-08-03 Vincent Celier <celier@adacore.com>
9641
9642 * fname-uf.adb
9643 (Get_File_Name) If the file cannot be found when there are no config
9644 pragmas file and May_Fail is True, return No_File instead of the file
9645 name, to be consistent.
9646
9647 2011-08-03 Pascal Obry <obry@adacore.com>
9648
9649 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9650 to null pointer.
9651
9652 2011-08-03 Javier Miranda <miranda@adacore.com>
9653
9654 * sem_ch13.adb
9655 (Same_Representation): In VM targets the representation of arrays with
9656 aliased components differs from arrays with non-aliased components.
9657
9658 2011-08-03 Emmanuel Briot <briot@adacore.com>
9659
9660 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9661 not systematically lower case attribute indexes that contain no "."
9662 Fix definition of several Naming attributes, which take
9663 a unit name as index and therefore should be case insensitive.
9664 Minor refactoring (reduce length of variable names).
9665
9666 2011-08-03 Emmanuel Briot <briot@adacore.com>
9667
9668 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9669
9670 2011-08-03 Emmanuel Briot <briot@adacore.com>
9671
9672 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9673 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9674 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9675 prj-tree.ads (Prj.Tree.Environment): new type.
9676
9677 2011-08-03 Emmanuel Briot <briot@adacore.com>
9678
9679 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9680 prj-tree.adb, prj-tree.ads (Environment): new type.
9681
9682 2011-08-03 Emmanuel Briot <briot@adacore.com>
9683
9684 * prj-tree.ads: Remove unused variable.
9685
9686 2011-08-03 Yannick Moy <moy@adacore.com>
9687
9688 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9689 issuing messages related to SPARK restriction violation.
9690
9691 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9692
9693 * sem_ch6.adb: guard against error nodes in return statements.
9694
9695 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9696
9697 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9698 a warning can only appear on a configuration file, so emit warning
9699 without further checks.
9700
9701 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9702
9703 * s-interr.ads: add overriding keyword.
9704
9705 2011-08-03 Geert Bosch <bosch@adacore.com>
9706
9707 * exp_attr.adb: Fix minor typo.
9708
9709 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9710
9711 * par-ch4.adb: improve error recovery.
9712
9713 2011-08-03 Emmanuel Briot <briot@adacore.com>
9714
9715 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9716 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9717 to Errout_Handling.
9718
9719 2011-08-03 Emmanuel Briot <briot@adacore.com>
9720
9721 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9722 "external" as an attribute name in aggregate projects.
9723
9724 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9725
9726 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9727 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9728 from 0, so we need to adjust.
9729
9730 2011-08-03 Emmanuel Briot <briot@adacore.com>
9731
9732 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9733 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9734
9735 2011-08-03 Yannick Moy <moy@adacore.com>
9736
9737 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9738 restriction on overloaded entity if the entity is not an operator.
9739
9740 2011-08-03 Yannick Moy <moy@adacore.com>
9741
9742 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9743 restrict.ads: Rename remaining Check_Formal_Restriction* into
9744 Check_SPARK_Restriction*.
9745
9746 2011-08-03 Emmanuel Briot <briot@adacore.com>
9747
9748 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9749 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9750 qualifier.
9751 (Project_Empty): removed
9752 (Empty_Project): new parameter Qualifier
9753 This is used to have fields specific to aggregate projects, cleaner
9754 New field to store the list of aggregated projects.
9755 (Check_Aggregate_Project): removed
9756 (Process_Aggregated_Projects, Free): new subprograms.
9757
9758 2011-08-03 Olivier Hainque <hainque@adacore.com>
9759
9760 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9761
9762 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9763
9764 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9765 explicit dereference of an unconstrained type, create a constrained
9766 subtype for it, as is done for function calls that return an
9767 unconstrained type.
9768
9769 2011-08-03 Thomas Quinot <quinot@adacore.com>
9770
9771 * g-pehage.adb (Finalize): Avoid possible double-free.
9772
9773 2011-08-03 Steve Baird <baird@adacore.com>
9774
9775 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9776 Elab_Spec/Body attrs in CodePeer_Mode.
9777
9778 2011-08-03 Javier Miranda <miranda@adacore.com>
9779
9780 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9781 low bound is not known at compile time but they have no others choice.
9782 Done because in this case the bounds can be obtained directly from the
9783 aggregate.
9784
9785 2011-08-03 Ed Falis <falis@adacore.com>
9786
9787 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9788 on VxWorks SMP. Remove unusable constant ANY_CPU.
9789
9790 2011-08-03 Emmanuel Briot <briot@adacore.com>
9791
9792 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9793 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9794 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9795 Prj.Env.Initialize_Empty): new subprograms
9796 (Get_Env, Find_Project): remove parameter Target_Name.
9797
9798 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9799
9800 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9801 as a condition for the delayed call to Derived_Subprograms done for the
9802 case of the rewriting of a derived type that constrains the
9803 discriminants of its parent type.
9804 Avoids redundant subprogram derivations for private subtype derivations.
9805
9806 2011-08-03 Javier Miranda <miranda@adacore.com>
9807
9808 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9809 Build_Record_Aggr_Code.
9810 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9811 discriminants in extension aggregates.
9812
9813 2011-08-03 Emmanuel Briot <briot@adacore.com>
9814
9815 * prj-pp.adb (Print): also output project qualifiers, since in
9816 particular "aggregate" is mandatory in an aggregate project.
9817
9818 2011-08-03 Emmanuel Briot <briot@adacore.com>
9819
9820 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9821 (Debug_Output): new function.
9822
9823 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9824
9825 * gnat_ugn.texi: Document -Wstack-usage.
9826 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9827
9828 2011-08-03 Thomas Quinot <quinot@adacore.com>
9829
9830 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9831 have keyword LIMITED.
9832
9833 2011-08-03 Yannick Moy <moy@adacore.com>
9834
9835 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9836 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9837 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9838 section (does not happen in compiler, only if code directly calls
9839 Scan_ALI).
9840 * get_alfa.adb, get_alfa.ads: New files.
9841 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9842 needed.
9843 * lib-xref-alfa.adb: New file.
9844 * lib-xref.adb, lib-xref.ads
9845 (Xref_Entry): redefine information needed in cross-references for ALFA.
9846 Push ALFA treatments in separated local package.
9847 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9848 identifiers. Return entity of package body instead of spec. Return
9849 Empty for a scope with no location.
9850 (Generate_Reference): adapt to new components for ALFA information.
9851 Remove the need for D references on definitions.
9852 (Is_Local_Reference): moved to ALFA local package
9853 (Output_References): extract subfunction as Extract_Source_Name
9854 (Output_Local_References): remove procedure, replaced by filtering of
9855 cross-references in package ALFA and printing in Put_ALFA.
9856 (Write_Entity_Name): remove procedure
9857 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9858 print exact name of entity as it appears in source file
9859 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9860 * put_alfa.adb, put_alfa.ads: New files.
9861 * xref_lib.adb (Search_Xref): protect read of cross-references against
9862 reading other sections of the ALI file, in gnatxref
9863 (Search): protect read of cross-references against reading other
9864 sections of the ALI file, in gnatfind.
9865 * gcc-interface/Make-lang.in: Update dependencies.
9866
9867 2011-08-03 Thomas Quinot <quinot@adacore.com>
9868
9869 * sem_ch3.adb: Minor reformatting.
9870
9871 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9872
9873 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9874 raising an exception.
9875
9876 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9877
9878 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9879 type, always use 1 as the lower bound or string, even if lower bound of
9880 context is not static, to handle properly null strings in a non-static
9881 context.
9882
9883 2011-08-03 Bob Duff <duff@adacore.com>
9884
9885 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9886 always legal on the right-hand side of an assignment statement; there
9887 is always an applicable index constraint in this case. Therefore, the
9888 check for Pkind = N_Assignment_Statement is now unconditional -- it
9889 doesn't depend on whether Is_Constrained (Typ).
9890
9891 2011-08-03 Robert Dewar <dewar@adacore.com>
9892
9893 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9894
9895 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9896
9897 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9898 for an itype created within a generic unit.
9899
9900 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9901
9902 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9903 suppresses all inlining.
9904
9905 2011-08-03 Robert Dewar <dewar@adacore.com>
9906
9907 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9908 exp_aggr.adb: Minor reformatting.
9909
9910 2011-08-03 Thomas Quinot <quinot@adacore.com>
9911
9912 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9913 tagged assignment when discriminant checks are suppressed. This is
9914 useless and extremely costly in terms of static stack usage.
9915
9916 2011-08-03 Bob Duff <duff@adacore.com>
9917
9918 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9919 of generics, because this leads to the wrong entity in the wrong scope,
9920 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9921 an instance.
9922 (Process_Interface_Name): Follow Alias for instances of generics, to
9923 correct for the above change.
9924
9925 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9926
9927 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9928 is an integer literal it is always safe to replace the reference. In
9929 addition, if the reference appears in the generated code for an object
9930 declaration it is necessary to copy because otherwise the reference
9931 might be to the uninitilized value of the discriminant of the object
9932 itself.
9933
9934 2011-08-03 Pascal Obry <obry@adacore.com>
9935
9936 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9937 ACL used, in this case we want to check for ending .exe, not .exe
9938 anywhere in the path.
9939
9940 2011-08-03 Sergey Rybin <rybin@adacore.com>
9941
9942 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9943 the tree structure (semantic decoration of references to record
9944 discriminants).
9945
9946 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9947
9948 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9949 choices of a named array aggregate, bail out when any choices are
9950 marked as Errors_Posted.
9951
9952 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9953
9954 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9955 in which entity is frozen, to handle properly loop variables in
9956 iterators.
9957
9958 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9959
9960 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9961 subtype is not static, compute the upper bound using attributes, to
9962 handle properly index types that are not integer types.
9963
9964 2011-08-03 Bob Duff <duff@adacore.com>
9965
9966 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9967 Update copyright notice.
9968
9969 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9970
9971 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9972 Original_Discriminant if within an instance.
9973 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9974
9975 2011-08-03 Thomas Quinot <quinot@adacore.com>
9976
9977 * einfo.ads: Minor reformatting.
9978
9979 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9980
9981 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9982 composite type with an unfrozen subcomponent, in the profile of a
9983 primitive operation.
9984
9985 2011-08-03 Robert Dewar <dewar@adacore.com>
9986
9987 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9988
9989 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9990
9991 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9992 unconstrained type with discriminants is initialized with an aggregate,
9993 use the constrained subtype of the aggregate as the type of the object,
9994 because it is immutable, and this allows the back-end to generate no
9995 code for the object declaration.
9996
9997 2011-08-03 Robert Dewar <dewar@adacore.com>
9998
9999 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
10000 comparison operand is variable, and turns out to be zero or negative.
10001
10002 2011-08-03 Javier Miranda <miranda@adacore.com>
10003
10004 * exp_intr.adb
10005 (Expand_Dispatching_Constructor_Call): Disable expansion of
10006 code required for native targets. Done to avoid generating
10007 references to unavailable runtime entities in VM targets.
10008 * exp_ch3.adb
10009 (Expand_N_Object_Declaration): Add missing support to handle
10010 the explicit initialization of class-wide interface objects.
10011 Fix documentation.
10012
10013 2011-08-03 Matthew Heaney <heaney@adacore.com>
10014
10015 * a-cobove.adb (Merge): Move source onto target, instead of using
10016 Assign.
10017
10018 2011-08-03 Matthew Heaney <heaney@adacore.com>
10019
10020 * a-cbdlli.adb (Splice): Move source items from first to last.
10021
10022 2011-08-03 Yannick Moy <moy@adacore.com>
10023
10024 * sem_util.ads: Add comment.
10025
10026 2011-08-03 Javier Miranda <miranda@adacore.com>
10027
10028 * exp_aggr.adb
10029 (Expand_Record_Aggregate): In VM targets disable the expansion into
10030 assignments of aggregates whose type is not known at compile time.
10031
10032 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10033
10034 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10035 protected entries and task entries, to build the proper renaming
10036 declaration for entry formals, used in debugging.
10037 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
10038 parameters in the same way.
10039
10040 2011-08-02 Robert Dewar <dewar@adacore.com>
10041
10042 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
10043 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
10044 code reorganization.
10045
10046 2011-08-02 Robert Dewar <dewar@adacore.com>
10047
10048 * debug.adb: Debug flag d.P to suppress length comparison optimization
10049 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
10050 comparison of Length by comparing First/Last instead.
10051
10052 2011-08-02 Matthew Heaney <heaney@adacore.com>
10053
10054 * a-cobove.ads: Code clean up.
10055
10056 2011-08-02 Vincent Celier <celier@adacore.com>
10057
10058 * adaint.c (file_names_case_sensitive_cache): New static int.
10059 (__gnat_get_file_names_case_sensitive): Cache the return value in
10060 file_names_case_sensitive_cache at the first invocation, to avoid
10061 multiple calls to getenv.
10062
10063 2011-08-02 Bob Duff <duff@adacore.com>
10064
10065 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
10066
10067 2011-08-02 Yannick Moy <moy@adacore.com>
10068
10069 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
10070 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
10071 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
10072 indicate that we are in a precondition or postcondition. This is used in
10073 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
10074 decide whether to flag the spec or body of the current subprogram as
10075 not in ALFA.
10076
10077 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
10078
10079 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
10080 list.
10081 * a-extiin.ads: New file.
10082
10083 2011-08-02 Bob Duff <duff@adacore.com>
10084
10085 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
10086 now raises Name_Error instead of Use_Error in certain cases. The other
10087 parts of this AI were already implemented properly.
10088
10089 2011-08-02 Vincent Celier <celier@adacore.com>
10090
10091 * link.c: Only import "auto-host.h" when building the gnattools.
10092
10093 2011-08-02 Yannick Moy <moy@adacore.com>
10094
10095 * sem_util.adb: Inter-unit inlining does not work for a subprogram
10096 which calls a local subprogram, so extract subprogram
10097 from Mark_Non_ALFA_Subprogram_Body.
10098
10099 2011-08-02 Javier Miranda <miranda@adacore.com>
10100
10101 * exp_ch9.adb
10102 (Extract_Dispatching_Call): If the type of the dispatching object is an
10103 access type then return an explicit dereference in the Object out-mode
10104 parameter.
10105
10106 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10107
10108 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
10109 compatibility checks for all indexes of an array subtype, not just the
10110 first. Reset Has_Dynamic_Range_Check on the subtype before each
10111 potential check to ensure that Insert_Range_Checks will not elide any
10112 of the dynamic checks.
10113
10114 2011-08-02 Yannick Moy <moy@adacore.com>
10115
10116 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
10117 SPARK restriction at parsing time.
10118 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
10119 directive only if the SPARK restriction is set for this unit.
10120
10121 2011-08-02 Yannick Moy <moy@adacore.com>
10122
10123 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
10124 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
10125 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
10126 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
10127 Mark_Non_ALFA_Subprogram_Body.
10128 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
10129 inlined.
10130
10131 2011-08-02 Yannick Moy <moy@adacore.com>
10132
10133 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
10134 might be costly.
10135
10136 2011-08-02 Robert Dewar <dewar@adacore.com>
10137
10138 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
10139 exp_ch3.adb: Minor reformatting.
10140
10141 2011-08-02 Emmanuel Briot <briot@adacore.com>
10142
10143 * adaint.c (__gnat_locate_exec_on_path): only returns executable
10144 files, not any regular file.
10145 (__gnat_locate_file_with_predicate): new subprogram.
10146
10147 2011-08-02 Yannick Moy <moy@adacore.com>
10148
10149 * sinfo.adb, sinfo.ads: Restrict the use of flags
10150 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
10151 nodes, plus N_Subtype_Declaration for the 2nd one.
10152
10153 2011-08-02 Sergey Rybin <rybin@adacore.com>
10154
10155 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10156 - fix bugs in the description of Source_Trace;
10157 - get rid of UNIT_NAME;
10158
10159 2011-08-02 Javier Miranda <miranda@adacore.com>
10160
10161 * exp_ch9.adb
10162 (Build_Dispatching_Requeue): Adding support for VM targets
10163 since we cannot directly reference the Tag entity.
10164 * exp_sel.adb (Build_K): Adding support for VM targets.
10165 (Build_S_Assignment): Adding support for VM targets.
10166 * exp_disp.adb
10167 (Default_Prim_Op_Position): In VM targets do not restrict availability
10168 of predefined interface primitives to compiling in Ada 2005 mode.
10169 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10170 restricted to compiling in Ada 2005 mode.
10171 (Make_VM_TSD): Generate code that declares and initializes the OSD
10172 record. Needed to support dispatching calls through synchronized
10173 interfaces.
10174 * exp_ch3.adb
10175 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10176 primitives associated with synchronized interfaces.
10177 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10178 primitives associated with synchronized interfaces.
10179
10180 2011-08-02 Yannick Moy <moy@adacore.com>
10181
10182 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10183 statements hidden in SPARK if preceded by the HIDE directive
10184 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10185 exception handlers as hidden in SPARK if preceded by the HIDE directive
10186 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10187 if starting with the HIDE directive
10188 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10189 starting with the HIDE directive; mark the declarations in a private
10190 part as hidden in SPARK if the private part starts with the HIDE
10191 directive
10192 * restrict.adb, restrict.ads
10193 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10194 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10195 argument node belongs to a part which is hidden in SPARK
10196 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10197 parts in SPARK; protect the possibly costly call to
10198 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10199 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10200 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10201 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10202 Tok_SPARK_Hide.
10203 (Scan): recognize special comment starting with '#' and followed by
10204 SPARK keyword "hide" as a HIDE directive.
10205
10206 2011-08-02 Yannick Moy <moy@adacore.com>
10207
10208 * types.ads, erroutc.ads: Minor reformatting.
10209
10210 2011-08-02 Vincent Celier <celier@adacore.com>
10211
10212 * link.c: Add response file support for cross platforms.
10213
10214 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10215
10216 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10217 in an association, set parent field of copy before partial analysis.
10218 * sem_res.adb (Resolve_Slice): create reference to itype only when
10219 expansion is enabled.
10220
10221 2011-08-02 Yannick Moy <moy@adacore.com>
10222
10223 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10224 for new flag denoting which subprogram bodies are in ALFA
10225 * restrict.adb, sem_ch7.adb: Update comment
10226 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10227 sem_ch9.adb, sem_res.adb: Add calls to
10228 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10229 * sem_ch6.adb (Analyze_Function_Return): add calls to
10230 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10231 middle of the body, and extended return.
10232 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10233 False when missing return.
10234 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10235 to True for subprograms whose spec is in ALFA. Remove later on the flag
10236 on the entity used for a subprogram body when there exists a separate
10237 declaration.
10238 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10239 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10240 False, otherwise do nothing.
10241
10242 2011-08-02 Robert Dewar <dewar@adacore.com>
10243
10244 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10245
10246 2011-08-02 Yannick Moy <moy@adacore.com>
10247
10248 * sem_ch4.ads: minor formatting.
10249
10250 2011-08-02 Yannick Moy <moy@adacore.com>
10251
10252 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10253 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10254 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10255 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10256 opt.ads: cleanup of SPARK mode
10257
10258 2011-08-02 Yannick Moy <moy@adacore.com>
10259
10260 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10261 types.
10262 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10263 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10264 * sem_ch3.adb
10265 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10266 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10267 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10268 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10269 types.
10270 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10271 non-static range.
10272 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10273 functions whose return type is not in ALFA.
10274 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10275 specifications.
10276 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10277 parameter's type is not in ALFA.
10278 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10279 types are in ALFA.
10280
10281 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10282
10283 * sem_ch6 (Analyze_Expression_Function): treat the function as
10284 Inline_Always, and introduce a subprogram declaration for it when it is
10285 not a completion.
10286 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10287 expression functions, so that the back-end can determine whether they
10288 can in fact be inlined.
10289 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10290 a function body comes from an expression function.
10291
10292 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10293
10294 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10295 null exclusions to test Can_Never_Be_Null on the anonymous access types
10296 of the formals rather than testing the formals themselves. Exclude this
10297 check in cases where the Old_Formal is marked as a controlling formal,
10298 to avoid issuing spurious errors for bodies completing dispatching
10299 operations (due to the flag not getting set on controlling access
10300 formals in body specs).
10301 (Find_Corresponding_Spec): When checking full and subtype conformance of
10302 subprogram bodies in instances, pass Designated and E in that order, for
10303 consistency with the expected order of the formals (New_Id followed by
10304 Old_Id).
10305
10306 2011-08-02 Robert Dewar <dewar@adacore.com>
10307
10308 * sem_ch8.adb: Minor reformatting.
10309
10310 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10311
10312 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10313 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10314 primitive operations of class-wide actuals.
10315
10316 2011-08-02 Javier Miranda <miranda@adacore.com>
10317
10318 * exp_atag.ads, exp_atag.adb
10319 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10320 since its value is implicitly passed in argument Typ.
10321 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10322 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10323 Build_Common_Dispatching_Select_Statements.
10324
10325 2011-08-02 Robert Dewar <dewar@adacore.com>
10326
10327 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10328 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10329 Minor reformatting.
10330
10331 2011-08-02 Robert Dewar <dewar@adacore.com>
10332
10333 * sem_res.adb: Minor reformatting.
10334 * sem_prag.adb: Minor reformatting.
10335
10336 2011-08-02 Javier Miranda <miranda@adacore.com>
10337
10338 * exp_atag.adb, exp_atags.ads
10339 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10340 by the tagged type Entity. Required to use this routine in the VM
10341 targets since we do not have available the Tag entity in the VM
10342 platforms.
10343 * exp_ch6.adb
10344 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10345 Ada.Tags has not been previously loaded.
10346 * exp_ch7.adb
10347 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10348 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10349 * sem_aux.adb
10350 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10351 view of enclosing scopes. Required to handle enclosing scopes that
10352 are synchronized types whose full view is a task type.
10353 * exp_disp.adb
10354 (Build_VM_TSDs): Minor code improvement to avoid generating and
10355 analyzing lists with empty nodes.
10356 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10357 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10358 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10359 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10360 (Make_Select_Specific_Data_Table): Add support for VM targets.
10361 (Make_VM_TSD): Generate code to initialize the SSD structure of
10362 the TSD.
10363
10364 2011-08-02 Yannick Moy <moy@adacore.com>
10365
10366 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10367 cross-references section in ALI.
10368 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10369 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10370 Sub).
10371 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10372 subprogram or package entity of a node
10373 (Is_Local_Reference_Type): new function returns True for references
10374 selected in local cross-references.
10375 (Lt): function extracted from Lt in Output_References
10376 (Write_Entity_Name): function extracted from Output_References
10377 (Generate_Definition): generate reference with type 'D' for definition
10378 of objects (object declaration and parameter specification), with
10379 appropriate locations and units, for use in local cross-references.
10380 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10381 references of type 'I' for initialization in object definition.
10382 (Output_References): move part of function Lt and procedure
10383 Write_Entity_Name outside of the body. Ignore references of types 'D'
10384 and 'I' introduced for local cross-references.
10385 (Output_Local_References): new procedure to output the local
10386 cross-references sections.
10387 (Lref_Entity_Status): new array defining whether an entity is a local
10388 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10389 with 'I' type when initialization expression is present.
10390 * get_scos.adb, get_scos.ads: Correct comments and typos
10391
10392 2011-08-02 Javier Miranda <miranda@adacore.com>
10393
10394 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10395 the JVM target.
10396 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10397 the JVM target.
10398 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10399 TSD support.
10400
10401 2011-08-02 Vincent Celier <celier@adacore.com>
10402
10403 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10404 (No_Space_Img): New function
10405 (Find_Excluded_Sources): When reading from a file, record the file name
10406 and the line number for each excluded source.
10407 (Mark_Excluded_Sources): When reporting an error, if the excluded
10408 sources were read from a file, include file name and line number in
10409 the error message.
10410
10411 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10412
10413 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10414
10415 2011-08-02 Robert Dewar <dewar@adacore.com>
10416
10417 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10418
10419 2011-08-02 Javier Miranda <miranda@adacore.com>
10420
10421 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10422 generation of TSDs to the DOTNET compiler.
10423 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10424 generation of TSDs to the DOTNET compiler.
10425
10426 2011-08-02 Javier Miranda <miranda@adacore.com>
10427
10428 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10429 record of all the tagged types declared inside library level package
10430 declarations, library level package bodies or library level subprograms.
10431 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10432 associated with a given tagged type.
10433 (Build_VM_TSDs): New subprogram.
10434 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10435 compilation units that are subprograms.
10436 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10437 compilation units that are package bodies.
10438 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10439 units that are a package declaration or a package instantiation.
10440 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10441 reorganization to improve the error generated by the frontend when the
10442 function Ada.Tags.Secondary_Tag is not available.
10443 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10444 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10445
10446 2011-08-02 Javier Miranda <miranda@adacore.com>
10447
10448 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10449
10450 2011-08-02 Robert Dewar <dewar@adacore.com>
10451
10452 * s-imenne.ads: Minor reformatting.
10453
10454 2011-08-02 Robert Dewar <dewar@adacore.com>
10455
10456 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10457 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10458 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10459
10460 2011-08-02 Robert Dewar <dewar@adacore.com>
10461
10462 * einfo.ads (Materialize_Entity): Document this is only for renamings
10463 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10464 required debug information in the case where we transform the object
10465 declaration into a renaming declaration.
10466 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10467 object
10468 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10469 Materialize_Entity.
10470
10471 2011-08-02 Robert Dewar <dewar@adacore.com>
10472
10473 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10474 Suppress_Init_Procs.
10475 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10476 Suppress_Initialization/Initialization_Suppressed.
10477 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10478 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10479 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10480 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10481
10482 2011-08-02 Robert Dewar <dewar@adacore.com>
10483
10484 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10485 Minor reformatting.
10486
10487 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10488
10489 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10490 only have inheritable classwide pre/postconditions.
10491
10492 2011-08-02 Javier Miranda <miranda@adacore.com>
10493
10494 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10495 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10496 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10497 checks if the external tag of a type is the same as the external tag
10498 of some other declaration.
10499
10500 2011-08-02 Thomas Quinot <quinot@adacore.com>
10501
10502 * s-taskin.ads: Minor reformatting.
10503
10504 2011-08-02 Emmanuel Briot <briot@adacore.com>
10505
10506 * g-comlin.adb (Display_Help): swap the order in which it prints the
10507 short help and the general usage.
10508
10509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10510
10511 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10512 the aspect declarations and attach them to the generic copy for
10513 subsequent analysis.
10514 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10515 declarations of the generic tree to the new subprogram declarations.
10516 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10517 conditions that apply to a subprogram instance.
10518
10519 2011-08-02 Robert Dewar <dewar@adacore.com>
10520
10521 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10522
10523 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10524
10525 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10526 private type with a tagged full view is not derived in the immediate
10527 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10528
10529 2011-08-02 Robert Dewar <dewar@adacore.com>
10530
10531 * exp_ch4.adb: Minor reformatting.
10532
10533 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10534
10535 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10536 Ada2012 iterator, the loop will be rewritten during expansion into a
10537 while loop with a cursor and an element declaration. Do not analyze the
10538 body in this case, because if the container is for indefinite types the
10539 actual subtype of the elements will only be determined when the cursor
10540 declaration is analyzed.
10541
10542 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10543
10544 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10545 size/alignment related attributes in CodePeer_Mode.
10546
10547 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10548
10549 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10550 Prepend_Element, since this can result in the operation getting the
10551 wrong slot in the full type's dispatch table if the full type has
10552 inherited operations. The incomplete type's operation will get added
10553 to the proper position in the full type's primitives
10554 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10555 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10556 dispatching operations, since there are cases where nonprimitive
10557 subprograms can get added to the list of incomplete dependents (such
10558 as subprograms in nested packages).
10559 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10560 private part when determining whether to add a primitive with a
10561 parameter of a tagged incomplete type to the Private_Dependents list.
10562 Such primitives can also occur in the visible part, and should not have
10563 been excluded from being private dependents.
10564 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10565 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10566 list of a Taft-amendment incomplete type is a primitive before issuing
10567 an error that the full type must appear in the same unit. There are
10568 cases where nonprimitives can be in the list (such as subprograms in
10569 nested packages).
10570 * sem_disp.adb (Derives_From): Use correct condition for checking that
10571 a formal's type is derived from the type of the corresponding formal in
10572 the parent subprogram (the condition was completely wrong). Add
10573 checking that was missing for controlling result types being derived
10574 from the result type of the parent operation.
10575
10576 2011-08-02 Yannick Moy <moy@adacore.com>
10577
10578 * errout.adb (First_Node): minor renaming
10579 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10580 first node.
10581
10582 2011-08-02 Yannick Moy <moy@adacore.com>
10583
10584 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10585 before accessing operands.
10586 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10587 decide whether an initialization expression respects SPARK rules, as
10588 the plain node is the expanded one. This allows for more valid warnings
10589 to be issued.
10590 * gnat_rm.texi: Minor update.
10591
10592 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10593
10594 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10595 previous change.
10596
10597 2011-08-02 Robert Dewar <dewar@adacore.com>
10598
10599 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10600
10601 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10602
10603 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10604 loop statements and the element renaming declaration with a block when
10605 the element type is controlled.
10606
10607 2011-08-02 Yannick Moy <moy@adacore.com>
10608
10609 * sinfo.ads: Minor formatting.
10610
10611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10612
10613 * sem_aggr.adb (Add_Association): if the association has a box and no
10614 expression, use the Sloc of the aggregate itself for the new
10615 association.
10616 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10617 the Original_Node.
10618
10619 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10620
10621 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10622 When a container is provided via a function call, generate a renaming
10623 of the function result. This avoids the creation of a transient scope
10624 and the premature finalization of the container.
10625 * exp_ch7.adb (Is_Container_Cursor): Removed.
10626 (Wrap_Transient_Declaration): Remove the supression of the finalization
10627 of the list controller when the declaration denotes a container cursor,
10628 it is not needed.
10629
10630 2011-08-02 Yannick Moy <moy@adacore.com>
10631
10632 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10633 node is from source, instead of the original node being from source.
10634 * sem_aggr.adb
10635 (Resolve_Array_Aggregate): refine the check for a static expression, to
10636 recognize also static ranges
10637 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10638 Array_Type_Declaration): postpone the test for the type being a subtype
10639 mark after the type has been resolved, so that component-selection and
10640 expanded-name are discriminated.
10641 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10642 to distinguish the case of an iteration scheme, so that an error is
10643 issed on a non-static range in SPARK except in an iteration scheme.
10644 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10645 In_Iter_Schm = True.
10646 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10647 user-defined operators so that they are allowed in renaming
10648 * sem_ch8.adb
10649 (Find_Selected_Component): refine the check for prefixing of operators
10650 so that they are allowed in renaming. Move the checks for restrictions
10651 on selector name after analysis discriminated between
10652 component-selection and expanded-name.
10653 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10654 concatenation argument of string type if it is static.
10655 * sem_util.adb, sem_util.ads
10656 (Check_Later_Vs_Basic_Declarations): add a new function
10657 Is_Later_Declarative_Item to decice which declarations are allowed as
10658 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10659 mode, add that renamings are considered as later items.
10660 (Enclosing_Package): new function to return the enclosing package
10661 (Enter_Name): correct the rule for homonyms in SPARK
10662 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10663 from source (result of expansion) to avoid issuing wrong warnings.
10664
10665 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10666
10667 * errout.adb: On anything but an expression First_Node returns its
10668 argument.
10669
10670 2011-08-02 Pascal Obry <obry@adacore.com>
10671
10672 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10673
10674 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10675
10676 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10677 Set the associated loop as the related expression of internally
10678 generated cursors.
10679 * exp_ch7.adb (Is_Container_Cursor): New routine.
10680 (Wrap_Transient_Declaration): Supress the finalization of the list
10681 controller when the declaration denotes a container cursor.
10682
10683 2011-08-02 Yannick Moy <moy@adacore.com>
10684
10685 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10686 command line now.
10687 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10688 expression is a simple expression. This check cannot be performed in
10689 the semantics, so just drop it.
10690 (P_Index_Or_Discriminant_Constraint): move check that the index or
10691 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10692 semantics. Other cases were previously checked in the semantics.
10693 * par-ch4.adb (P_Name): move checks that a selector name is not
10694 character literal or an operator symbol to Find_Selected_Component in
10695 the semantics
10696 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10697 declarations are not placed after later declarations in a separate
10698 procedure in Sem_Util (possibly not the best choice?), to be used both
10699 during parsing, for Ada 83 mode, and during semantic analysis, for
10700 SPARK mode.
10701 * par-endh.adb (Check_End): move check that end label is not missing
10702 to Process_End_Label in the semantics
10703 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10704 the special case for SPARK restriction
10705 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10706 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10707 parameter Force to issue the error message even on internal node (used
10708 for generated end label). Call Check_Restriction to check when an error
10709 must be issued. In SPARK mode, issue an error message even if the
10710 restriction is not set.
10711 (Check_Restriction): new procedure with an additional out parameter to
10712 inform the caller that a message has been issued
10713 * sem_aggr.adb: Minor modification of message
10714 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10715 instead of issuing an error message directly
10716 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10717 declarations are not placed after later declarations, by calling
10718 Check_Later_Vs_Basic_Declarations
10719 (Analyze_Subtype_Declaration): move here the check that an index or
10720 discriminant constraint must be a subtype mark. Change the check that
10721 a subtype of String must start at one so that it works on subtype marks.
10722 * sem_ch4.adb (Analyze_Call): move here the check that a named
10723 association cannot follow a positional one in a call
10724 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10725 instead of issuing an error message directly
10726 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10727 selector name is not a character literal or an operator symbol. Move
10728 here the check that the prefix of an expanded name cannot be a
10729 subprogram or a loop statement.
10730 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10731 procedure called from parsing and semantics to check that basic
10732 declarations are not placed after later declarations
10733 (Process_End_Label): move here the check that end label is not missing
10734
10735 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10736
10737 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10738 representation clause in codepeer mode, since it confuses CodePeer and
10739 does not bring useful info.
10740
10741 2011-08-02 Ed Falis <falis@adacore.com>
10742
10743 * init.c: initialize fp hw on MILS.
10744
10745 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10746
10747 * errout.adb (First_Node): for bodies, return the node itself (small
10748 optimization). For other nodes, do not check source_unit if the node
10749 comes from Standard.
10750
10751 2011-08-02 Robert Dewar <dewar@adacore.com>
10752
10753 * exp_ch3.adb: Minor comment additions.
10754 * sem_ch13.adb: Minor reformatting.
10755
10756 2011-08-02 Pascal Obry <obry@adacore.com>
10757
10758 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10759
10760 2011-08-02 Robert Dewar <dewar@adacore.com>
10761
10762 * sem_attr.adb: Minor reformatting.
10763
10764 2011-08-02 Robert Dewar <dewar@adacore.com>
10765
10766 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10767 (Has_Default_Component_Value): Removed
10768 * einfo.ads Comment updates
10769 (Has_Default_Aspect): Replaces Has_Default_Value
10770 (Has_Default_Component_Value): Removed
10771 * exp_ch13.adb
10772 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10773 * exp_ch3.adb
10774 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10775 (Get_Simple_Init_Val): Handle Default_Value aspect
10776 (Needs_Simple_Initialization): Handle Default_Value aspect
10777 * exp_ch3.ads: Needs_Simple_Initialization
10778 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10779 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10780 * sem_ch13.adb
10781 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10782 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10783 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10784
10785 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10786
10787 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10788 package containing iteration primitives.
10789 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10790
10791 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10792
10793 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10794 "of", pre-analyze expression in case it is a function call with
10795 finalization actions that must be placed ahead of the loop.
10796 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10797 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10798
10799 2011-08-02 Geert Bosch <bosch@adacore.com>
10800
10801 * cstand.adb (Create_Float_Types): Only consider C's long double for
10802 Long_Long_Float, in addition to double.
10803
10804 2011-08-02 Robert Dewar <dewar@adacore.com>
10805
10806 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10807 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10808 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10809 Minor reformatting.
10810
10811 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10812
10813 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10814 indexed component.
10815
10816 2011-08-02 Javier Miranda <miranda@adacore.com>
10817
10818 * einfo.ads, einfo.adb
10819 (Original_Access_Type): Move this attribute to Node26 since there was
10820 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10821 which causes conflicts and breaks the generation of the .NET compiler.
10822 (Interface_Name): Add missing documentation on JGNAT only uses of
10823 this attribute.
10824
10825 2011-08-02 Geert Bosch <bosch@adacore.com>
10826
10827 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10828 (Find_Back_End_Float_Type): Likewise
10829 (Create_Back_End_Float_Types): Likewise
10830 (Create_Float_Types): Likewise
10831 (Register_Float_Type): Likewise
10832 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10833 Nlist and split out type selection in new local Find_Base_Type function.
10834 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10835 Nlist
10836 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10837
10838 2011-08-02 Robert Dewar <dewar@adacore.com>
10839
10840 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10841 alpha order).
10842 * opt.ads: Minor comment change.
10843 * sem_ch12.adb: Minor code reorganization.
10844
10845 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10846
10847 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10848 subtype's list of rep items to the list on the full subtype in the case
10849 where the lists are the same.
10850
10851 2011-08-02 Geert Bosch <bosch@adacore.com>
10852
10853 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10854 using the one from System.Strings, which also deallocates all strings.
10855
10856 2011-08-02 Geert Bosch <bosch@adacore.com>
10857
10858 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10859 function.
10860 * gcc-interface/Make-lang.in: Update dependencies.
10861
10862 2011-08-02 Olivier Hainque <hainque@adacore.com>
10863
10864 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10865 end_locus.
10866
10867 2011-08-02 Javier Miranda <miranda@adacore.com>
10868
10869 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10870 associated with anonymous access to subprograms.
10871
10872 2011-08-02 Geert Bosch <bosch@adacore.com>
10873
10874 * opt.ads
10875 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10876 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10877 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10878 (Add_Symbol_Definition): Move to switch-c.adb
10879 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10880 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10881 (Add_Symbol_Definition): Move to switch-c.adb.
10882 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10883 * sem_warn.adb
10884 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10885 Move to warnsw.adb.
10886 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10887 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10888 Move to warnsw.adb.
10889 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10890 (Add_Symbol_Definition): Moved from Prepcomp.
10891 * switch-c.ads: Update copyright notice. Use String_List instead of
10892 Argument_List, removing dependency on System.OS_Lib.
10893
10894 2011-08-02 Yannick Moy <moy@adacore.com>
10895
10896 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10897 mode on initialization expression which does not respect SPARK
10898 restrictions.
10899 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10900 if the tree referenced by its argument represents an initialization
10901 expression in SPARK, suitable for initializing an object in an object
10902 declaration.
10903
10904 2011-08-02 Javier Miranda <miranda@adacore.com>
10905
10906 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10907 internally generated access to subprogram with its associated protected
10908 subprogram type.
10909 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10910
10911 2011-08-02 Geert Bosch <bosch@adacore.com>
10912
10913 * cstand.adb (Register_Float_Type): Print information about type to
10914 register, if the Debug_Flag_Dot_B is set.
10915 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10916 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10917 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10918 with a requested precision of more than Max_Digits digits and no more
10919 than Max_Base_Digits digits, if a range specification is present and the
10920 Predefined_Float_Types list has a suitable type to derive from.
10921 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10922 case of type completion with pragma Import
10923 * sem_prag.adb
10924 (Process_Import_Predefined_Type): Processing to complete a type
10925 with pragma Import. Currently supports floating point types only.
10926 (Set_Convention_From_Pragma): Do nothing without underlying type.
10927 (Process_Convention): Guard against absence of underlying type,
10928 which may happen when importing incomplete types.
10929 (Process_Import_Or_Interface): Handle case of importing predefined
10930 types. Tweak error message.
10931
10932 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10933
10934 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10935 functions to previous change. Reorganize code slightly.
10936
10937 2011-08-02 Geert Bosch <bosch@adacore.com>
10938
10939 * back_end.ads (Register_Type_Proc): New call back procedure type for
10940 allowing the back end to provide information about available types.
10941 (Register_Back_End_Types): New procedure to register back end types.
10942 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10943 available types.
10944 * cstand.adb (Back_End_Float_Types): New list for floating point types
10945 supported by the back end.
10946 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10947 (Copy_Float_Type): New procedure to make new copies of predefined types.
10948 (Register_Float_Type): New call back procedure to populate the BEFT list
10949 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10950 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10951 (Create_Float_Types): New procedure to create entities for floating
10952 point types predefined in Standard, and put these and any remaining
10953 BEFTs on the Predefined_Float_Types list.
10954 * stand.ads (Predefined_Float_Types): New list for predefined floating
10955 point types that do not have declarations in package Standard.
10956
10957 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10958
10959 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10960 entity node for the unit containing the parameter.
10961 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10962 (Add_Inlined_Subprogram): Likewise.
10963 * gcc-interface/Make-lang.in: Update dependencies.
10964
10965 2011-08-02 Thomas Quinot <quinot@adacore.com>
10966
10967 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10968 suitable value.
10969
10970 2011-08-02 Geert Bosch <bosch@adacore.com>
10971
10972 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10973
10974 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10975
10976 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10977 computed value of Base_Type.
10978
10979 2011-08-02 Yannick Moy <moy@adacore.com>
10980
10981 * restrict.adb (Check_Restriction): issue an error for any use of
10982 class-wide, even if the No_Dispatch restriction is not set.
10983 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10984 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10985 when completing a private extension, the type named in the private part
10986 is not the same as that named in the visible part.
10987 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10988 of an inherited primitive operations of a tagged type or type extension
10989 that returns the tagged type.
10990 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10991 function which returns True for an implicit operation inherited by the
10992 derived type declaration for the argument type.
10993 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10994 order.
10995
10996 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10997
10998 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10999 Process_Bounds, to perform analysis with expansion of a range or an
11000 expression that is the iteration scheme for a loop.
11001 (Analyze_Iterator_Specification): If domain of iteration is given by a
11002 function call with a controlled result, as is the case if call returns
11003 a predefined container, ensure that finalization actions are properly
11004 generated.
11005 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11006
11007 2011-08-02 Javier Miranda <miranda@adacore.com>
11008
11009 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11010 * gcc-interface/Make-lang.in: Update dependencies.
11011
11012 2011-08-02 Javier Miranda <miranda@adacore.com>
11013
11014 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11015 determine if the analysis is performed using N or Original_Node (N).
11016 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11017 functionality of routine Is_Variable avoids code duplication.
11018 * checks.adb (Determine_Range): Handle temporaries generated by
11019 Remove_Side_Effects.
11020
11021 2011-08-02 Javier Miranda <miranda@adacore.com>
11022
11023 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11024 expansion of the condition. Required since the previous analysis was
11025 done with expansion disabled (see Resolve_Quantified_Expression) and
11026 hence checks were not inserted and record comparisons have not been
11027 expanded.
11028
11029 2011-08-02 Ed Falis <falis@adacore.com>
11030
11031 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11032 Update header.
11033
11034 2011-08-02 Bob Duff <duff@adacore.com>
11035
11036 * opt.ads: Minor comment fix.
11037
11038 2011-08-02 Bob Duff <duff@adacore.com>
11039
11040 * sem_ch12.adb (Analyze_Package_Instantiation,
11041 Analyze_Subprogram_Instantiation): Turn off style checking while
11042 analyzing an instance. Whatever style checks that apply to the generic
11043 unit should apply, so it makes no sense to apply them in an instance.
11044 This was causing trouble when compiling an instance of a runtime
11045 unit that violates the -gnatyO switch.
11046 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11047 one of the two case statements, causing spurious errors.
11048
11049 2011-08-02 Robert Dewar <dewar@adacore.com>
11050
11051 * uname.adb: Minor reformatting.
11052 * gnatcmd.adb: Minor reformatting.
11053 * exp_attr.adb: Minor reformatting.
11054
11055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11056
11057 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11058 No_Dispatching_Calls, do not look for the Assign primitive, because
11059 predefined primitives are not created in this case.
11060
11061 2011-08-02 Bob Duff <duff@adacore.com>
11062
11063 * stylesw.ads: Minor comment fixes.
11064
11065 2011-08-02 Robert Dewar <dewar@adacore.com>
11066
11067 * freeze.adb (Add_To_Result): New procedure.
11068
11069 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11070
11071 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11072 time, if the specific run-time routines for handling streams of strings
11073 are not available, use the default mechanism.
11074
11075 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11076
11077 * s-regpat.ads: Fix typo.
11078
11079 2011-08-02 Vincent Celier <celier@adacore.com>
11080
11081 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11082 not null, call it to create the in memory config project file without
11083 parsing an existing default config project file.
11084
11085 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11086
11087 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11088
11089 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11090
11091 * sem_elim.adb: an abstract subprogram does not need an eliminate
11092 pragma for its descendant to be eliminable.
11093
11094 2011-08-02 Ed Falis <falis@adacore.com>
11095
11096 * init.c: revert to handling before previous checkin for VxWorks
11097 * s-intman-vxworks.adb: delete unnecessary declarations related to
11098 using Ada interrupt facilities for handling signals.
11099 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11100 * s-intman-vxworks.ads: Import __gnat_install_handler as
11101 Initialize_Interrupts.
11102 * s-taprop-vxworks.adb: Delete Signal_Mask.
11103 (Abort_Handler): change construction of mask to unblock exception
11104 signals.
11105
11106 2011-08-02 Jerome Guitton <guitton@adacore.com>
11107
11108 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11109 Debug_Raise_Exception before propagation starts.
11110
11111 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11112
11113 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11114 to Restriction_Check_Required.
11115 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11116 * sem_res.adb (Resolve_Call): Likewise.
11117 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11118
11119 2011-08-02 Bob Duff <duff@adacore.com>
11120
11121 * stylesw.ads: Update comment.
11122 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11123 * errout.ads: Remove obsolete comment.
11124
11125 2011-08-02 Javier Miranda <miranda@adacore.com>
11126
11127 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11128 (Set_Is_Safe_To_Reevaluate): new procedure.
11129 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11130 assignment is allowed on safe-to-reevaluate variables.
11131 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11132 temporary created to remove side effects in expressions that use
11133 the secondary stack as safe-to-reevaluate.
11134 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11135 variables that are not true constants.
11136
11137 2011-08-02 Robert Dewar <dewar@adacore.com>
11138
11139 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11140 sem_res.adb, sem_ch6.adb: Minor reformatting.
11141
11142 2011-08-02 Jerome Guitton <guitton@adacore.com>
11143
11144 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11145
11146 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11147
11148 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11149 not set Overridden_Operation if subprogram is an initialization
11150 procedure.
11151
11152 2011-08-02 Yannick Moy <moy@adacore.com>
11153
11154 * par-ch6.adb: Correct obsolete name in comments
11155 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11156 which takes two message arguments (existing function takes one), with
11157 second message used for continuation.
11158 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11159 block statements that originate from a source block statement, not
11160 generated block statements
11161 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11162 symmetry with procedure case
11163 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11164 function to issue an error in formal mode if a package specification
11165 contains more than one tagged type or type extension.
11166 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11167 parameters matching formals of tagged types are objects (or ancestor
11168 type conversions of objects), not general expressions. Issue an error
11169 on view conversions that are not involving ancestor conversion of an
11170 extended type.
11171 (Resolve_Type_Conversion): in formal mode, issue an error on the
11172 operand of an ancestor type conversion which is not an object
11173 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11174 procedure so that it works also for actuals of function calls
11175 (Is_Actual_Tagged_Parameter): new function which determines if its
11176 argument is an actual parameter of a formal of tagged type in a
11177 subprogram call
11178 (Is_SPARK_Object_Reference): new function which determines if the tree
11179 referenced by its argument represents an object in SPARK
11180
11181 2011-08-02 Robert Dewar <dewar@adacore.com>
11182
11183 * sem_ch3.adb: Minor reformatting
11184 Minor comment addition
11185 Minor error msg text change
11186
11187 2011-08-02 Javier Miranda <miranda@adacore.com>
11188
11189 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11190 function. Used to be more precise when we generate a variable plus one
11191 assignment to remove side effects in the evaluation of the Bound
11192 expressions.
11193 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11194 of the bound expression to force its re-analysis and thus expand the
11195 associated transient scope (if required). Code cleanup replacing the
11196 previous code that declared the constant entity by an invocation to
11197 routine Force_Evaluation which centralizes this work in the frontend.
11198
11199 2011-08-02 Robert Dewar <dewar@adacore.com>
11200
11201 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11202 (Base_Type): Now uses improved Is_Base_Type function
11203 * einfo.ads (Base_Type): Inline this function
11204
11205 2011-08-02 Robert Dewar <dewar@adacore.com>
11206
11207 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11208 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11209
11210 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11211
11212 * gcc-interface/Make-lang.in: Update dependencies.
11213 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11214 targets.
11215
11216 2011-08-02 Yannick Moy <moy@adacore.com>
11217
11218 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11219 non-simple expression used in delta constraint
11220 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11221 index constraint which is not a subtype mark
11222 * par.adb: With and use Restrict
11223 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11224 mode on component type which is not a subtype mark and default
11225 expression on component
11226 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11227 of string which does not have a lower index bound equal to 1
11228 (Array_Type_Declaration): issue an error in formal mode on index or
11229 component type which is not a subtype mark, and on aliased keyword on
11230 component
11231 (Derived_Type_Declaration): issue an error in formal mode on interface,
11232 limited or abstract type
11233 (Record_Type_Declaration): issue an error in formal mode on interface
11234 (Record_Type_Definition): issue an error in formal mode on tagged types
11235 and type extensions not declared in the specification of a library unit
11236 package; on null non-tagged record; on variant part
11237
11238 2011-08-02 Vincent Celier <celier@adacore.com>
11239
11240 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11241 not declared for qualified library project when Library_Name is not
11242 declared, but Library_Dir is.
11243
11244 2011-08-02 Robert Dewar <dewar@adacore.com>
11245
11246 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11247 pragmas (affects aspects [Component_]Default_Value
11248 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11249 component type for the resolution
11250
11251 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11252
11253 * einfo.adb (Base_Type): Tune implementation for speed.
11254
11255 2011-08-02 Robert Dewar <dewar@adacore.com>
11256
11257 * freeze.adb: Minor reformatting.
11258
11259 2011-08-02 Thomas Quinot <quinot@adacore.com>
11260
11261 * scos.ads: Update comments.
11262
11263 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11264
11265 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11266 base type, because the parent may be a subtype of a private type whose
11267 convention is established in a private part.
11268
11269 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11270
11271 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11272 statement in a block when the expansion of the return expression has
11273 created a finalization chain.
11274 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11275 with the parent node.
11276 Add N_Extended_Return_Statement to handle the case where a transient
11277 object declaration appears in the Return_Object_Declarations list of
11278 an extended return statement.
11279
11280 2011-08-02 Matthew Gingell <gingell@adacore.com>
11281
11282 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11283 unused parameter 'name'.
11284
11285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11286
11287 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11288 inherited operation, check whether its alias, which is the source
11289 operastion that it renames, has been marked eliminated.
11290
11291 2011-08-02 Javier Miranda <miranda@adacore.com>
11292
11293 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11294 in-mode parameter whose type is an access type since it can be used to
11295 modify its designated object. Enforce code that handles as safe an
11296 access type that is not access-to-constant but it is the result of a
11297 previous removal of side-effects.
11298 (Remove_Side_Effects): Minor code reorganization of cases which require
11299 no action. Done to incorporate documentation on new cases uncovered
11300 working in this ticket: no action needed if this routine was invoked
11301 too early and the nodes are not yet decorated.
11302 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11303 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11304 were issued with actuals that are implicitly provided by
11305 Force_Evaluation.
11306
11307 2011-08-02 Robert Dewar <dewar@adacore.com>
11308
11309 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11310
11311 2011-08-02 Yannick Moy <moy@adacore.com>
11312
11313 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11314 to issue an error in formal mode on attribute not supported in this mode
11315 (Analyze_Attribute): issue errors on standard attributes not supported
11316 in formal mode.
11317 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11318 comment, and issue error in formal mode on modulus which is not a power
11319 of 2.
11320 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11321 range.
11322 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11323 subtype mark.
11324 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11325 operator on modular type (except 'not').
11326
11327 2011-08-02 Robert Dewar <dewar@adacore.com>
11328
11329 * gnat_rm.texi: Minor reformatting.
11330
11331 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11332
11333 * s-osinte-linux.ads: Minor comment update and reformatting.
11334 * i-cexten.ads: Make this unit pure, as for its parent.
11335 Will allow its usage in more contexts if needed.
11336
11337 2011-08-02 Robert Dewar <dewar@adacore.com>
11338
11339 * s-utf_32.ads: Minor comment fix.
11340
11341 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11342
11343 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11344 operation of a tagged synchronized type, handle the case where the
11345 controlling argument is overloaded.
11346
11347 2011-08-02 Yannick Moy <moy@adacore.com>
11348
11349 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11350 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11351 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11352 SPARK mode and formal verification mode on processing SPARK restriction
11353 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11354 requiring consistency checking.
11355
11356 2011-08-02 Robert Dewar <dewar@adacore.com>
11357
11358 * sem_res.adb: Minor reformatting.
11359
11360 2011-08-02 Robert Dewar <dewar@adacore.com>
11361
11362 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11363 a-cforse.ads: Remove unneeded with of Ada.Containers
11364 Remove commented out pragma Inline's
11365 Move specifications of new subprograms to the actual specs
11366
11367 2011-08-02 Yannick Moy <moy@adacore.com>
11368
11369 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11370 a-cforse.ads: Update comments.
11371
11372 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11373
11374 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11375
11376 2011-08-02 Robert Dewar <dewar@adacore.com>
11377
11378 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11379 a-cforse.ads, a-cofove.ads: Minor reformatting.
11380
11381 2011-08-02 Claire Dross <dross@adacore.com>
11382
11383 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11384 a-cofove.ads: Add comments.
11385
11386 2011-08-02 Yannick Moy <moy@adacore.com>
11387
11388 * gnat_rm.texi: Document formal containers.
11389
11390 2011-08-02 Emmanuel Briot <briot@adacore.com>
11391
11392 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11393 are empty sections.
11394
11395 2011-08-02 Robert Dewar <dewar@adacore.com>
11396
11397 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11398 reformatting.
11399
11400 2011-08-02 Robert Dewar <dewar@adacore.com>
11401
11402 * aspects.adb: New aspects Default_Value and Default_Component_Value
11403 New format of Aspect_Names table checks for omitted entries
11404 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11405 handling of boolean aspects for derived types.
11406 New aspects Default_Value and Default_Component_Value
11407 New format of Aspect_Names table checks for omitted entries
11408 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11409 (Has_Default_Value): New flag
11410 (Has_Default_Component_Value): New flag
11411 (Has_Default_Value): New flag
11412 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11413 table.
11414 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11415 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11416 Default_Value and Default_Component_Value
11417 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11418 New aspects Default_Value and Default_Component_Value
11419 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11420 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11421
11422 2011-08-02 Vincent Celier <celier@adacore.com>
11423
11424 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11425 inherit library kind.
11426
11427 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11428
11429 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11430 Minor reformatting.
11431
11432 2011-08-02 Robert Dewar <dewar@adacore.com>
11433
11434 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11435
11436 2011-08-02 Yannick Moy <moy@adacore.com>
11437
11438 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11439
11440 2011-08-02 Robert Dewar <dewar@adacore.com>
11441
11442 * impunit.adb: Add comment.
11443
11444 2011-08-02 Yannick Moy <moy@adacore.com>
11445
11446 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11447 qualification of aggregates in formal mode
11448 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11449 another aggregate
11450 (Resolve_Aggregate): complete the test that an aggregate is adequately
11451 qualified in formal mode
11452
11453 2011-08-02 Pascal Obry <obry@adacore.com>
11454
11455 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11456 * mlib-prj.adb: Supress warning when compiling binder generated file.
11457 (Build_Library): Supress all warnings when compiling the binder
11458 generated file.
11459
11460 2011-08-02 Yannick Moy <moy@adacore.com>
11461
11462 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11463 from here...
11464 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11465 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11466 Add with/use clauses to make Check_Formal_Restriction visible
11467
11468 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11469
11470 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11471 in-parameters when type of the generic formal is private in the generic
11472 spec and non-private in the body.
11473
11474 2011-08-02 Claire Dross <dross@adacore.com>
11475
11476 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11477 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11478 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11479 * impunit.adb, Makefile.rtl: Take new files into account.
11480
11481 2011-08-02 Robert Dewar <dewar@adacore.com>
11482
11483 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11484 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11485
11486 2011-08-02 Yannick Moy <moy@adacore.com>
11487
11488 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11489 formal mode
11490 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11491 matching static array bounds, taking into account the special case of
11492 string literals
11493 * sem_ch3.adb: Typo in comment.
11494
11495 2011-08-02 Yannick Moy <moy@adacore.com>
11496
11497 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11498 which issues an error in formal mode if its argument node is originally
11499 from source
11500 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11501 has a discriminant specification so that it does not include the case
11502 of derived types
11503 (Derived_Type_Declaration): move here the test that a derived type has a
11504 discriminant specification
11505 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11506 first element of a component association before accessing its choices
11507 (presence of component association is not enough)
11508 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11509 declaration is a library item before accessing the next element in a
11510 list, as library items are not member of lists
11511 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11512 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11513 Check_Formal_Restriction whenever possible.
11514
11515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11516
11517 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11518 reference when needed.
11519
11520 2011-08-02 Bob Duff <duff@adacore.com>
11521
11522 * gnat_ugn.texi: Fix typo.
11523
11524 2011-08-02 Vincent Celier <celier@adacore.com>
11525
11526 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11527 archive file name. Do not use the full path name of archives for Open
11528 VMS.
11529
11530 2011-08-02 Robert Dewar <dewar@adacore.com>
11531
11532 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11533 Analyze_Aspect_Specifications
11534 * sem_ch13.adb
11535 (Analyze_Aspect_Specifications): New handling for boolean aspects
11536 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11537 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11538 sequence for Analyze_Aspect_Specifications
11539 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11540 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11541
11542 2011-08-02 Robert Dewar <dewar@adacore.com>
11543
11544 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11545 aspects, since these no longer exist.
11546
11547 2011-08-02 Robert Dewar <dewar@adacore.com>
11548
11549 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11550 semicolon, do not try to see if there are aspects following it.
11551 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11552 aspect spec.
11553
11554 2011-08-02 Robert Dewar <dewar@adacore.com>
11555
11556 * sem_ch8.adb, aspects.ads: Minor reformatting.
11557
11558 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11559
11560 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11561 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11562 extracted from...
11563 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11564
11565 2011-08-02 Yannick Moy <moy@adacore.com>
11566
11567 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11568 mode on subprogram declaration outside of package specification, unless
11569 it is followed by a pragma Import
11570 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11571 Access_Type_Declaration): issue error in formal mode on access type
11572 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11573 incomplete type
11574 (Analyze_Object_Declaration): issue error in formal mode on object
11575 declaration which does not respect SPARK restrictions
11576 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11577 declaration which does not respect SPARK restrictions
11578 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11579 error in formal mode on digits or delta constraint
11580 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11581 decimal fixed point type
11582 (Derived_Type_Declaration): issue error in formal mode on derived type
11583 other than type extensions of tagged record types
11584 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11585 with check on access definition
11586 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11587 mode on protected definition.
11588 (Analyze_Task_Definition): issue error in formal mode on task definition
11589
11590 2011-08-02 Robert Dewar <dewar@adacore.com>
11591
11592 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11593
11594 2011-08-02 Javier Miranda <miranda@adacore.com>
11595
11596 * sem_ch6.adb (Can_Override_Operator): New function.
11597 (Verify_Overriding_Indicator): Add missing code to check overriding
11598 indicator in operators. Fixes regression.
11599 (Check_Overriding_Indicator): Minor reformating after replacing the
11600 code that evaluates if the subprogram can override an operator by
11601 invocations to the above new function.
11602 * einfo.adb
11603 (Write_Field26_Name): Add missing code to ensure that, following
11604 the documentation in einfo.ads, this field is not shown as attribute
11605 "Static_Initialization" on non-dispatching functions.
11606
11607 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11608
11609 * sem_res.adb (Resolve_Call): A call to
11610 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11611 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11612 i.e., when the second parameter is of type Time_Span.
11613
11614 2011-08-02 Vincent Celier <celier@adacore.com>
11615
11616 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11617 with an archive instead of -L<library dir> -l<library name>.
11618
11619 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11620
11621 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11622 mark the base types In_Use in addition to making the operations
11623 use_visible.
11624
11625 2011-08-02 Ed Falis <falis@adacore.com>
11626
11627 * init.c: add and setup __gnat_signal_mask for the exception signals
11628 * s-inmaop-vxworks.adb: new file.
11629 * s-intman-vxworks.adb: remove unnecessary initializations and
11630 simplify remaining
11631 * s-intman-vxworks.ads: remove unnecessary variable
11632 * s-taprop-vxworks.adb: simplify signal initialization
11633
11634 2011-08-02 Robert Dewar <dewar@adacore.com>
11635
11636 * sem_ch8.adb: Minor code reorganization, comment updates.
11637
11638 2011-08-02 Robert Dewar <dewar@adacore.com>
11639
11640 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11641 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11642 here from Sem_Res.
11643 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11644 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11645
11646 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11647
11648 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11649 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11650 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11651 use_type_clauses, to handle more efficiently use_type and use_all_type
11652 constructs.
11653 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11654 Ada2012 Use_All_Type clause.
11655 (Use_Class_Wide_Operations): new procedure.
11656
11657 2011-08-02 Robert Dewar <dewar@adacore.com>
11658
11659 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11660 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11661 expression to expression function.
11662
11663 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11664
11665 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11666 if types are compatible.
11667
11668 2011-08-02 Yannick Moy <moy@adacore.com>
11669
11670 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11671 returns True if its argument array types have same dimension and same
11672 static bounds at each index.
11673 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11674 OUT or IN OUT paramaters which are not view conversions in SPARK.
11675 (Resolve_Arithmetic_Op): issue an error in formal mode on
11676 multiplication or division with operands of fixed point types which are
11677 not qualified or explicitly converted.
11678 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11679 Boolean or array type (except String) operands.
11680 (Resolve_Equality_Op): issue an error in formal mode on equality
11681 operators for array types other than String with non-matching static
11682 bounds.
11683 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11684 for array types with non-matching static bounds. Factorize the code in
11685 Matching_Static_Array_Bounds.
11686 (Resolve_Qualified_Expression): issue an error in formal mode on
11687 qualified expressions for array types with non-matching static bounds.
11688 (Resolve_Type_Conversion): issue an error in formal mode on type
11689 conversion for array types with non-matching static bounds
11690
11691 2011-08-02 Robert Dewar <dewar@adacore.com>
11692
11693 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11694
11695 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11696
11697 * par-ch9.adb: save location of entry for proper error message.
11698
11699 2011-08-02 Javier Miranda <miranda@adacore.com>
11700
11701 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11702 (Use_Full_View) which permits this routine to climb through the
11703 ancestors using the full-view of private parents.
11704 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11705 Use_Full_View to true in calls to Is_Ancestor.
11706 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11707 true in call to Is_Ancestor.
11708 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11709 Use_Full_View to true in call to Is_Ancestor.
11710 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11711 call to Is_Ancestor.
11712 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11713 Use_Full_View to true in calls to Is_Ancestor.
11714 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11715 Make_Select_Specific_Data_Table, Register_Primitive,
11716 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11717 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11718 to true in call to Is_Ancestor.
11719 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11720 Use_Full_View to true in calls to Is_Ancestor.
11721 * exp_cg.adb
11722 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11723 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11724
11725 2011-08-02 Robert Dewar <dewar@adacore.com>
11726
11727 * gnat_rm.texi: Minor reformatting.
11728 * sem_prag.adb: Minor reformatting.
11729
11730 2011-08-02 Tristan Gingold <gingold@adacore.com>
11731
11732 * vms_data.ads: Add VMS qualifier for -gnateP.
11733
11734 2011-08-02 Robert Dewar <dewar@adacore.com>
11735
11736 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11737 * par-ch7.adb (P_Package): Proper placement of aspects for package
11738 decl/instantiation.
11739 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11740 (End_Statements): Add Is_Sloc parameterr
11741 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11742 (Check_End): Ad Is_Sloc parameter
11743 (End_Statements): Add Is_Sloc parameterr
11744
11745 2011-08-02 Vincent Celier <celier@adacore.com>
11746
11747 * ug_words: Add VMS qualifier equivalent to -gnateP:
11748 /SYMBOL_PREPROCESSING.
11749
11750 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11751
11752 * gnat-style.texi: For hexadecimal numeric literals the typical
11753 grouping of digits is 4 to represent 2 bytes.
11754 A procedure spec which is split into several lines is indented two
11755 characters.
11756
11757 2011-08-02 Yannick Moy <moy@adacore.com>
11758
11759 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11760 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11761 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11762 properly qualified
11763 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11764 choice in array aggregate
11765 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11766 mark as ancestor
11767 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11768 positional and named aggregate for record, or others in record
11769 aggregate, or multiple choice in record aggregate
11770 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11771 array operands to logical operations AND, OR and XOR do not have the
11772 same static lower and higher bounds
11773 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11774
11775 2011-08-01 Robert Dewar <dewar@adacore.com>
11776
11777 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11778 Replaces Last_Source_Node_In_Sequence.
11779 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11780 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11781 parens and blank in string (this was inconsistently implemented).
11782 * errout.ads
11783 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11784 blank in string (this was inconsistently implemented).
11785 * gnat1drv.adb
11786 (Set_Global_Switches): Set formal mode switches appropriately
11787 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11788 * par-prag.adb
11789 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11790 call Set_Error_Msg_Lang to set "spark" as language name.
11791 * par.adb: Remove unnecessary call to set formal language for errout
11792 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11793 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11794 name.
11795 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11796 calls to it, moved after resolution so that types are known
11797 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11798 result of concatenation is not of type String
11799 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11800 concatenation is not properly restricted
11801 * gnat_rm.texi: Add doc on pragma Spark_95.
11802 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11803 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11804 * gcc-interface/Make-lang.in: Update dependencies.
11805
11806 2011-08-01 Javier Miranda <miranda@adacore.com>
11807
11808 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11809 condition that detects if the overridden operation must replace an
11810 existing entity.
11811
11812 2011-08-01 Javier Miranda <miranda@adacore.com>
11813
11814 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11815 code declarations inserted by Insert_Actions in each alternative of the
11816 N_Case_Expression node.
11817
11818 2011-08-01 Robert Dewar <dewar@adacore.com>
11819
11820 * sem_ch6.adb: Minor code reorganization.
11821 * sem_util.adb: Minor reformatting.
11822
11823 2011-08-01 Pascal Obry <obry@adacore.com>
11824
11825 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11826 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11827
11828 2011-08-01 Yannick Moy <moy@adacore.com>
11829
11830 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11831 literal or operator symbol which is prefixed
11832 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11833 mode on access attributes.
11834 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11835 that concatenation operands are properly restricted in formal mode
11836 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11837 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11838 result of the concatenation has a type different from String.
11839 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11840 Analyze_Quantified_Expression, Analyze_Slice,
11841 Analyze_Null): issue an error in formal mode on unsupported constructs
11842 * sem_ch5.adb
11843 (Analyze_Block_Statement): only issue error on source block statement
11844 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11845 function which returns the last node in a list of nodes for which
11846 Comes_From_Source returns True, if any
11847 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11848 Last_Source_Node_In_Sequence
11849 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11850 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11851 mode on unsupported constructs
11852 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11853 rest of the actions may be needed later on since the error is marked as
11854 not serious.
11855 * sinfo.ads: Typos in comments.
11856
11857 2011-08-01 Pascal Obry <obry@adacore.com>
11858
11859 * projects.texi: Minor editing.
11860
11861 2011-08-01 Yannick Moy <moy@adacore.com>
11862
11863 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11864 insertion character ~~
11865 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11866 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11867 with insertion character ~~
11868 (Set_Msg_Text): treat insertion character ~~
11869 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11870 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11871 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11872 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11873 errors related to the formal language restriction not serious
11874 (insertion character |).
11875 * par.adb (Par): set formal language for error messages if needed
11876 * sem_ch6.adb (Check_Missing_Return): take into account possible
11877 generated statements at the end of the function
11878 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11879 enumeration value to define a new pragma SPARK_95
11880 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11881 SPARK_Version): new type and variables to store the SPARK version
11882 (none by default).
11883 (SPARK_Mode): return True when SPARK_Version is set
11884 * par-prag.adb: Correct indentation
11885 (Prag): take Pragma_SPARK_95 into account
11886 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11887 into account.
11888
11889 2011-08-01 Robert Dewar <dewar@adacore.com>
11890
11891 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11892 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11893 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11894
11895 2011-08-01 Pascal Obry <obry@adacore.com>
11896
11897 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11898 Target_Name to Get_Path call.
11899 (Parse_Single_Project): Likewise.
11900 (Post_Parse_Context_Clause): Likewise.
11901 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11902 Call Initialise_Project_Path with the proper Target_Name.
11903 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11904 search path.
11905 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11906 with the proper Target_Name.
11907 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11908 Part.Parse routine.
11909 (Parse_Project_And_Apply_Config): Likewise.
11910 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11911 This is fine as this part of the code is supporting only native
11912 compilation.
11913 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11914 is fine as this part of the code is supporting only native compilation.
11915
11916 2011-08-01 Yannick Moy <moy@adacore.com>
11917
11918 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11919 of homonym, unless the homonym is one of the cases allowed in SPARK
11920 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11921 package declaration occurring after a body.
11922
11923 2011-08-01 Robert Dewar <dewar@adacore.com>
11924
11925 * checks.adb, exp_ch4.adb: Minor reformatting.
11926
11927 2011-08-01 Javier Miranda <miranda@adacore.com>
11928
11929 * einfo.ads (Access_Disp_Table): Fix documentation.
11930 (Dispatch_Table_Wrappers): Fix documentation.
11931
11932 2011-08-01 Pascal Obry <obry@adacore.com>
11933
11934 * prj-env.adb, prj-env.ads: Minor reformatting.
11935
11936 2011-08-01 Yannick Moy <moy@adacore.com>
11937
11938 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11939 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11940 procedures out of these packages.
11941 * errout.ads, errout.adb
11942 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11943 procedures in of this package
11944 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11945 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11946 on misplaced later vs initial declarations, like in Ada 83
11947 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11948 formal mode on attribute of private type whose full type declaration
11949 is not visible
11950 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11951 package declaration inside a package specification
11952 (Analyze_Full_Type_Declaration): issue error in formal mode on
11953 controlled type or discriminant type
11954 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11955 user-defined operator means that it should come from the source
11956 (New_Overloaded_Entity): issue error in formal mode on overloaded
11957 entity.
11958 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11959
11960 2011-08-01 Thomas Quinot <quinot@adacore.com>
11961
11962 * atree.adb: Minor reformatting.
11963 * checks.adb: Minor reformatting.
11964
11965 2011-08-01 Vincent Celier <celier@adacore.com>
11966
11967 * s-parame-vms-ia64.ads: Fix typo in comment
11968 Minor reformatting
11969 * s-parame-vms-restrict.ads: Removed, unused.
11970
11971 2011-08-01 Javier Miranda <miranda@adacore.com>
11972
11973 * exp_ch3.adb
11974 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11975 * sem_ch3.adb
11976 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11977 * sem_ch3.ads, sem_ch3.adb
11978 (Is_Constant_Bound): New extended version of the subprogram that was
11979 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11980 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11981 * sem_aux.ads (Constant_Value): Fix typo in comment.
11982 * checks.adb (Generate_Index_Checks): New implementation which, for
11983 array objects with constant bounds, generates the runtime check
11984 referencing the bounds of the array type. For other cases this routine
11985 provides its previous behavior obtaining such values from the array
11986 object.
11987 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11988 parent type.
11989 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11990 we cannot have semantic interpretations of the new node.
11991
11992 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11993
11994 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11995 expressions.
11996
11997 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11998
11999 * sem_ch8.adb: Minor code editing.
12000 * s-vxwext.adb: Remove trailing space.
12001 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12002 consistency with other files.
12003
12004 2011-08-01 Thomas Quinot <quinot@adacore.com>
12005
12006 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12007
12008 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12009
12010 * par-ch10.adb: reject parameterized expressions as compilation unit.
12011 * sem_ch4.adb: handle properly conditional expression with overloaded
12012 then_clause and no else_clause.
12013
12014 2011-08-01 Tristan Gingold <gingold@adacore.com>
12015
12016 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12017 like done by System.Aux_DEC.
12018 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12019
12020 2011-08-01 Yannick Moy <moy@adacore.com>
12021
12022 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12023 missing label at end of declaration (subprogram or package)
12024 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12025 of positional and named parameter association
12026 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12027 Error_Msg_SP which adds a prefix to the error message giving the name
12028 of the formal language analyzed
12029 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12030 access result type in subprogram, unconstrained array as result type,.
12031 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12032 procedure
12033 * sem_ch8.adb: Code clean up.
12034
12035 2011-08-01 Javier Miranda <miranda@adacore.com>
12036
12037 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12038 * einfo.ads (Access_Disp_Table): Fix documentation.
12039 (Dispatch_Table_Wrappers): Fix documentation.
12040 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12041 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12042 to enforce the documentation of this attribute.
12043 (Set_Is_Interface): Cleanup the assertion.
12044 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12045 the Underlying_Type entity before reading attribute Access_Disp_Table.
12046 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12047 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12048 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12049 the Underlying_Type entity before reading attribute Access_Disp_Table.
12050 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12051 Locate the Underlying_Type entity before reading attribute
12052 Access_Disp_Table.
12053
12054 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12055
12056 * s-poosiz.ads: Additional overriding indicators.
12057
12058 2011-08-01 Yannick Moy <moy@adacore.com>
12059
12060 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12061 formal mode.
12062 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12063 parameter specification does not include a subtype mark.
12064 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12065 formal mode on abstract subprogram.
12066 (Analyze_Subprogram_Specification): issue error in formal mode on
12067 user-defined operator.
12068 (Process_Formals): issue error in formal mode on access parameter and
12069 default expression.
12070 * sem_ch9.adb (Analyze_Abort_Statement,
12071 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12072 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12073 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12074 Analyze_Requeue, Analyze_Selective_Accept,
12075 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12076 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12077 issue error in formal mode on user-defined raise statement.
12078
12079 2011-08-01 Thomas Quinot <quinot@adacore.com>
12080
12081 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12082 declaration being hidden when overriding an implicit inherited
12083 subprogram.
12084 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12085 (-gnats), do not complain about a source file that contains only a
12086 pragma No_Body.
12087
12088 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12089
12090 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12091 variable if already set.
12092
12093 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12094
12095 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12096 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12097 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12098 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12099 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12100 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12101 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12102 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12103 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12104 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12105 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12106 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12107 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12108 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12109 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12110 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12111 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12112 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12113 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12114 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12115 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12116 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12117 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12118 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12119 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12120 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12121 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12122 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12123 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12124 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12125 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12126 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12127 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12128 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12129 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12130 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12131 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12132 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12133 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12134 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12135 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12136 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12137 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12138 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12139 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12140 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12141 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12142 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12143 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12144 Use GNAT instead of GNARL.
12145
12146 2011-08-01 Bob Duff <duff@adacore.com>
12147
12148 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12149 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12150 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12151 reformatting.
12152
12153 2011-08-01 Yannick Moy <moy@adacore.com>
12154
12155 * debug.adb (d.D) reverve flag for the SPARK mode
12156 (d.E) reverve flag for SPARK generation mode
12157 (d.F) reverve flag for Why generation mode
12158 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12159 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12160 functions which return True when the corresponding modes are set
12161 (Formal_Language): return "spark" or "alfa" when in formal verification
12162 mode.
12163 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12164 Error_Msg to prefix the error message with a tag giving the formal
12165 language
12166 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12167 message with a tag giving the formal language
12168 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12169 block statement
12170 (Analyze_Case_Statement): issue error in formal mode on case statement
12171 with a single "others" case alternative
12172 (Analyze_Exit_Statement): issue errors in formal mode on exit
12173 statements which do not respect SPARK restrictions
12174 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12175 (Check_Unreachable_Code): always issue an error (not a warning) in
12176 formal mode on unreachable code (concerns both code after an infinite
12177 loop and after an unconditional jump, both not allowed in SPARK)
12178 * sem_ch6.adb (Analyze_Return_Statement): add call to
12179 Set_Return_Present for a procedure containing a return statement
12180 (already done for functions in Analyze_Function_Return)
12181 (Analyze_Function_Return): issue error in formal mode on extended
12182 return or if return is not last statement in function
12183 (Check_Missing_Return): issue error in formal mode if function does
12184 not end with return or if procedure contains a return
12185 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12186 function to detect if there is an inner scope of its parameter S which
12187 is a loop.
12188
12189 2011-08-01 Thomas Quinot <quinot@adacore.com>
12190
12191 * sem_ch6.ads: Minor reformatting.
12192
12193 2011-08-01 Javier Miranda <miranda@adacore.com>
12194
12195 * sem_util.adb (Abstract_Interface_List): Complete condition when
12196 processing private type declarations to avoid reading unavailable
12197 attribute.
12198 (Is_Synchronized_Tagged_Type): Complete condition when processing
12199 private extension declaration nodes to avoid reading unavailable
12200 attribute.
12201
12202 2011-08-01 Thomas Quinot <quinot@adacore.com>
12203
12204 * sem_ch3.adb: Minor reformatting.
12205
12206 2011-08-01 Thomas Quinot <quinot@adacore.com>
12207
12208 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12209 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12210 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12211 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12212 for VMS, instead parametrize the common implementation with
12213 System.Parameters declarations.
12214
12215 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12216
12217 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12218
12219 2011-08-01 Tristan Gingold <gingold@adacore.com>
12220
12221 * seh_init.c: Fix SEH handler installation on win64.
12222
12223 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12224
12225 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12226 double analysis of an anonymous access to subprogram, because it can
12227 lead to improper sharing of profiles and a back-end crash.
12228
12229 2011-08-01 Robert Dewar <dewar@adacore.com>
12230
12231 * make.adb, sem_ch4.adb: Minor reformatting.
12232 * gcc-interface/Make-lang.in: Update dependencies.
12233 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12234
12235 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12236
12237 * gnat_rm.texi: Fix definition of Long_Integer.
12238
12239 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12240
12241 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12242 to prevent storage exhaustion.
12243 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12244 finalized is a function body, insert the cleanup code before the final
12245 return statement, to prevent spurious warnings.
12246 * s-pooglo.ads: add overriding indicator.
12247
12248 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12249
12250 * sem_ch4.adb (Operator_Check): improve error message when both a
12251 with_clause and a use_clause are needed to make operator usage legal.
12252 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12253 determine whether a compilation unit is visible within an other,
12254 either through a with_clause in the current unit, or a with_clause in
12255 its library unit or one one of its parents.
12256
12257 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12258
12259 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12260 over an arbitrary expression of an array or container type.
12261 * lib-xref.adb: clarify comment.
12262
12263 2011-08-01 Bob Duff <duff@adacore.com>
12264
12265 * einfo.ads: Minor reformatting.
12266 * debug.adb: Minor comment improvement.
12267
12268 2011-08-01 Javier Miranda <miranda@adacore.com>
12269
12270 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12271 consider hidden subprograms as valid candidates.
12272
12273 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12274
12275 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12276
12277 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12278
12279 * gnat_ugn.texi: Fix typo.
12280
12281 2011-08-01 Robert Dewar <dewar@adacore.com>
12282
12283 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12284 lib-xref.adb: Minor reformatting
12285
12286 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12287
12288 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12289 when to generate a call to Move_Final_List.
12290 (Has_Controlled_Parts): Remove this function.
12291
12292 2011-08-01 Geert Bosch <bosch@adacore.com>
12293
12294 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12295 "," in choice list.
12296
12297 2011-08-01 Thomas Quinot <quinot@adacore.com>
12298
12299 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12300 explicit raise of a predefined exception as Comes_From_Source if the
12301 original N_Raise_Statement comes from source.
12302
12303 2011-08-01 Robert Dewar <dewar@adacore.com>
12304
12305 * sinfo.ads: Add comment.
12306 * sem_ch6.adb: Minor reformatting.
12307
12308 2011-08-01 Robert Dewar <dewar@adacore.com>
12309
12310 * freeze.adb (Freeze_Entity): Refine check for bad component size
12311 clause to avoid rejecting confirming clause when atomic/aliased present.
12312
12313 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12314
12315 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12316 better determine whether an entity reference is a write.
12317 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12318 subcomponent.
12319 * lib-xref.adb (Output_References): Do no suppress a read reference at
12320 the same location as an immediately preceeding modify-reference, to
12321 handle properly in-out actuals.
12322
12323 2011-08-01 Tristan Gingold <gingold@adacore.com>
12324
12325 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12326
12327 2011-08-01 Quentin Ochem <ochem@adacore.com>
12328
12329 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12330 heap to compute the result.
12331
12332 2011-08-01 Robert Dewar <dewar@adacore.com>
12333
12334 * atree.ads: Minor reformatting.
12335
12336 2011-08-01 Emmanuel Briot <briot@adacore.com>
12337
12338 * g-expect.adb (Get_Command_Output): Fix memory leak.
12339
12340 2011-08-01 Geert Bosch <bosch@adacore.com>
12341
12342 * cstand.adb (P_Float_Type): New procedure to print the definition of
12343 predefined fpt types.
12344 (P_Mixed_Name): New procedure to print a name using mixed case
12345 (Print_Standard): Use P_Float_Type for printing floating point types
12346 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12347 precision IEEE float.
12348
12349 2011-08-01 Thomas Quinot <quinot@adacore.com>
12350
12351 * sem_ch3.adb: Minor reformatting.
12352
12353 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12354
12355 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12356 the completion of a generic function, insert the new body rather than
12357 rewriting the original.
12358
12359 2011-08-01 Yannick Moy <moy@adacore.com>
12360
12361 * sinfo.ads, errout.ads: Typos in comments.
12362
12363 2011-08-01 Robert Dewar <dewar@adacore.com>
12364
12365 * par-endh.adb: Minor reformatting.
12366
12367 2011-08-01 Robert Dewar <dewar@adacore.com>
12368
12369 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12370 (Pre_Post_Aspects): New subtype.
12371 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12372 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12373 * par-ch7.adb (P_Package): Remove Decl parameter
12374 (P_Package): Handle new syntax for aspects (before IS)
12375 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12376 new aspect syntax
12377 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12378 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12379 (P_Package): Remove Decl parameter
12380 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12381 aspects
12382 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12383 specs
12384 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12385 * sinfo.ads: Document new syntax for aspects in packages etc.
12386 * sprint.adb: Handle new syntax of aspects before IS in package
12387
12388 2011-08-01 Thomas Quinot <quinot@adacore.com>
12389
12390 * atree.ads: Minor reformatting.
12391 * sem_prag.adb: Minor reformatting.
12392
12393 2011-08-01 Robert Dewar <dewar@adacore.com>
12394
12395 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12396 case expr alternative.
12397
12398 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12399
12400 * sem_ch12.adb: Fix typo.
12401
12402 2011-08-01 Geert Bosch <bosch@adacore.com>
12403
12404 * sem_prag.adb (Check_No_Link_Name): New procedure.
12405 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12406 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12407 instead of Standard_Long_Long_Float_Size global. Preparation for
12408 eventual removal of per type constants.
12409 * exp_util.ads (Get_Stream_Size): New function returning the stream
12410 size value of subtype E.
12411 * exp_util.adb (Get_Stream_Size): Implement new function.
12412 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12413 function.
12414 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12415 * einfo.adb:
12416 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12417
12418 2011-08-01 Geert Bosch <bosch@adacore.com>
12419
12420 * cstand.adb: Fix comments.
12421 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12422 count of arguments.
12423
12424 2011-08-01 Robert Dewar <dewar@adacore.com>
12425
12426 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12427
12428 2011-08-01 Geert Bosch <bosch@adacore.com>
12429
12430 * atree.ads: Fix comment.
12431
12432 2011-08-01 Robert Dewar <dewar@adacore.com>
12433
12434 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12435 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12436 * par.adb: Add with for Namet.Sp.
12437 * par-tchk.adb: Minor reformatting.
12438
12439 2011-08-01 Vincent Celier <celier@adacore.com>
12440
12441 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12442 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12443 of the init procedure of a SAL.
12444 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12445 New procedure.
12446
12447 2011-08-01 Thomas Quinot <quinot@adacore.com>
12448
12449 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12450 reformatting.
12451
12452 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12453
12454 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12455
12456 2011-08-01 Thomas Quinot <quinot@adacore.com>
12457
12458 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12459 conformant with its spec (return True only for types that have
12460 an overriding Initialize primitive operation that prevents them from
12461 having preelaborable initialization).
12462 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12463 initialization for controlled types in Ada 2005 or later mode.
12464
12465 2011-08-01 Robert Dewar <dewar@adacore.com>
12466
12467 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12468 Postcondition.
12469 (Same_Aspect): New function.
12470 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12471 Type_Invariant, Precondition, Postcondition.
12472 * snames.ads-tmpl: Add Name_Type_Invariant.
12473
12474 2011-08-01 Robert Dewar <dewar@adacore.com>
12475
12476 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12477 here.
12478 (Freeze_All_Ent): Fix error in handling inherited aspects.
12479 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12480 already analyzed, but don't skip entire processing of a declaration,
12481 that's wrong in some cases of declarations being rewritten.
12482 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12483 Don't delay for integer, string literals
12484 Treat predicates in usual manner for delay, remove special case code,
12485 not needed.
12486 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12487 (Build_Predicate_Function): Update saved expression in aspect
12488 (Build_Invariant_Procedure): Update saved expression in aspect
12489 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12490 of replacement of discriminant references if the reference is simple.
12491
12492 2011-08-01 Robert Dewar <dewar@adacore.com>
12493
12494 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12495 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12496 Static_Predicate and Dynamic_Predicate.
12497 (Build_Predicate_Function): Add processing for Static_Predicate
12498 and Dynamic_Predicate.
12499 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12500 (From_Static_Predicate): New flag
12501 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12502
12503 2011-08-01 Robert Dewar <dewar@adacore.com>
12504
12505 * usage.adb: Documentation cleanup for Ada version modes in usage.
12506 * expander.adb: Minor reformatting.
12507
12508 2011-08-01 Robert Dewar <dewar@adacore.com>
12509
12510 * atree.ads: Minor comment fix.
12511 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12512 a-witeio.ads, sem_prag.adb: Minor reformatting.
12513
12514 2011-08-01 Doug Rupp <rupp@adacore.com>
12515
12516 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12517 pointers. Use descrip.h header file for convenience. Add some
12518 comments.
12519
12520 2011-08-01 Robert Dewar <dewar@adacore.com>
12521
12522 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12523 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12524 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12525 New procedure.
12526 (Check_Aspect_At_End_Of_Declarations): New procedure
12527 (Analye_Aspect_Specification): Minor changes for above procedures
12528 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12529 specification node as well.
12530
12531 2011-08-01 Pascal Obry <obry@adacore.com>
12532
12533 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12534 Windows files. Use GetFilesAttributes() in this case to check for file
12535 existence instead of returning with an error code.
12536
12537 2011-08-01 Vincent Celier <celier@adacore.com>
12538
12539 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12540 High is above Source length.
12541
12542 2011-08-01 Robert Dewar <dewar@adacore.com>
12543
12544 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12545
12546 2011-08-01 Robert Dewar <dewar@adacore.com>
12547
12548 * aspects.ads (Boolean_Aspects): New subtype.
12549 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12550 for derived types in cases where the parent type and derived type have
12551 aspects.
12552 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12553 with aspects when parent type also has aspects.
12554 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12555 boolean expression at this point).
12556 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12557 accordance with final decision on the Ada 2012 feature.
12558 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12559
12560 2011-08-01 Matthew Heaney <heaney@adacore.com>
12561
12562 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12563
12564 2011-08-01 Pascal Obry <obry@adacore.com>
12565
12566 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12567 Fix Replace_Slice when High is above current string size.
12568 (Replace_Slice): Fix DL computation when High is above current
12569 string length.
12570
12571 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12572
12573 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12574
12575 2011-08-01 Matthew Heaney <heaney@adacore.com>
12576
12577 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12578 of node.
12579
12580 2011-08-01 Pascal Obry <obry@adacore.com>
12581
12582 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12583 reformatting.
12584
12585 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12586
12587 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12588 access to protected subprograms in generic bodies.
12589 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12590 protected type, indicate that the convention of the subprogram is
12591 Convention_Protected, because it may be used in subsequent declarations
12592 within the protected declaration.
12593
12594 2011-08-01 Vincent Celier <celier@adacore.com>
12595
12596 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12597 and "final" procedures when the name of the library is "ada", to avoid
12598 duplicate symbols "adainit" and "adafinal" in executables.
12599
12600 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12601
12602 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12603 quantified expression that appears within a postcondition and uses the
12604 Ada2012 'Result attribute.
12605
12606 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12607
12608 * init.c (__gnat_error_handler): Cast reason to int.
12609 (__gnat_install_handler): Explain sa_sigaction use.
12610
12611 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12612
12613 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12614 subprogram has copy-in copy-out parameters, try to promote the mode of
12615 the return type if it is passed in registers.
12616
12617 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12618
12619 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12620 left operand as addressable.
12621
12622 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12623
12624 * gcc-interface/gigi.h (build_function_stub): Remove.
12625 (build_return_expr): Likewise.
12626 (convert_vms_descriptor): Declare.
12627 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12628 (build_function_stub): Move to...
12629 * gcc-interface/utils2.c (build_return_expr): Move to...
12630 * gcc-interface/trans.c (build_function_stub): ...here.
12631 (build_return_expr): ...here.
12632 (Subprogram_Body_to_gnu): Add local variable for language_function.
12633 Disconnect the parameter attributes cache, if any, once done with it.
12634 Call end_subprog_body only after setting the end_locus.
12635 Build the stub associated with the function, if any, at the very end.
12636 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12637 variables and streamline control flow.
12638
12639 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12640
12641 PR ada/49819
12642 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12643 g-trasym-dwarf.adb.
12644
12645 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12646
12647 PR bootstrap/49794
12648 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12649 Assign to act.sa_sigaction.
12650 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12651 current->return_address to char * before arithmetic.
12652
12653 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12654
12655 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12656 Correct argument types.
12657 Extract code from reason.
12658 (__gnat_install_handler): Assign to act.sa_sigaction.
12659
12660 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12661
12662 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12663 (GNAT1_OBJS): ...here.
12664
12665 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12666
12667 PR ada/48711
12668 * g-socthi-mingw.adb (Fill): Fix formatting.
12669
12670 * gcc-interface/gigi.h: Move around comment.
12671
12672 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12673
12674 PR ada/46350
12675 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12676
12677 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12678
12679 PR ada/48711
12680 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12681
12682 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12683
12684 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12685 range comparison if Pmode is SImode.
12686
12687 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12688 Eric Botcazou <ebotcazou@adacore.com>
12689
12690 * adadecode.c: Wrap up in extern "C" block.
12691 * adadecode.h: Likewise.
12692 * adaint.c: Likewise. Remove 'const' keyword.
12693 * adaint.h: Likewise.
12694 * argv.c: Likewise.
12695 * atree.h: Likewise.
12696 * cio.c: Likewise.
12697 * cstreams.c: Likewise.
12698 * env.c: Likewise.
12699 * exit.c: Likewise.
12700 * fe.h: Likewise.
12701 * final.c: Likewise.
12702 * init.c: Likewise.
12703 * initialize.c: Likewise.
12704 * link.c: Likewise.
12705 * namet.h: Likewise.
12706 * nlists.h: Likewise.
12707 * raise.c: Likewise.
12708 * raise.h: Likewise.
12709 * repinfo.h: Likewise.
12710 * seh_init.c: Likewise.
12711 * targext.c: Likewise.
12712 * tracebak.c: Likewise.
12713 * uintp.h: Likewise.
12714 * urealp.h: Likewise.
12715 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12716 * xsinfo.adb: Likewise.
12717 * xsnamest.adb: Likewise.
12718 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12719 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12720 * gcc-interface/misc.c: Likewise.
12721 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12722 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12723 ada/targext.o here...
12724 (GNAT_ADA_OBJS): ...and not here.
12725 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12726 (GNATBIND_OBJS): Reorder.
12727
12728 2011-07-07 Richard Henderson <rth@redhat.com>
12729
12730 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12731 dwarf2out_frame_init.
12732
12733 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12734
12735 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12736
12737 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12738
12739 PR target/39150
12740 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12741
12742 2011-07-06 Richard Guenther <rguenther@suse.de>
12743
12744 * gcc-interface/misc.c (gnat_init): Merge calls to
12745 build_common_tree_nodes and build_common_tree_nodes_2.
12746 Re-initialize boolean_false_node.
12747
12748 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12749 Olivier Hainque <hainque@adacore.com>
12750 Nicolas Setton <setton@adacore.com>
12751
12752 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12753 the type according to the ARTIFICIAL_P parameter.
12754 (create_type_decl): Likewise.
12755 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12756
12757 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12758
12759 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12760 (gnatbind): Likewise.
12761
12762 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12763
12764 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12765
12766 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12767
12768 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12769 local variable throughout. Remove useless call to Base_Type.
12770 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12771 Take it also into account for the volatileness of the field. Set the
12772 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12773
12774 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12775
12776 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12777 on a dereference built for a by-ref object if it has an address clause.
12778
12779 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12780
12781 * einfo.ads (Address_Taken): Document use for the second argument of
12782 Asm_Input and Asm_Output attributes.
12783 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12784 argument is an entity name, then set Address_Taken on it.
12785 <Attribute_Asm_Output>: Likewise.
12786 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12787 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12788 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12789 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12790
12791 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12792
12793 PR middle-end/46500
12794 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12795
12796 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12797
12798 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12799 (ada/utils.o): Update dependencies.
12800 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12801 ../../../libcpp/libcpp.a.
12802 * gcc-interface/utils.c: Include common/common-target.h.
12803 (process_attributes): Use targetm_common.have_named_sections.
12804
12805 2011-06-07 Richard Guenther <rguenther@suse.de>
12806
12807 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12808 set_sizetype.
12809
12810 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12811
12812 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12813 TREE_THIS_NOTRAP flag.
12814
12815 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12816
12817 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12818 Fix thinko.
12819
12820 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12821
12822 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12823 constants whose full view has discriminants specially.
12824
12825 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12826
12827 * gcc-interface/utils.c: Include diagnostic.h.
12828 (gnat_write_global_declarations): Output debug information for all
12829 global type declarations before finalizing the compilation unit.
12830 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12831
12832 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12833
12834 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12835
12836 2011-05-25 Kai Tietz <ktietz@redhat.com>
12837
12838 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12839 initialization instead of const/none-const pointer assignment.
12840
12841 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12842
12843 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12844 $(EXTRA_GNAT1_OBJS).
12845 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12846 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12847 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12848 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12849 libcommon-target.a instead of prefix.o.
12850
12851 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12852
12853 PR ada/49097
12854 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12855
12856 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12857
12858 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12859 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12860 instead of version.o.
12861
12862 2011-05-18 Kai Tietz <ktietz@redhat.com>
12863
12864 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12865 boolean_false_node instead of integer_zero_node.
12866 (convert_with_check): Likewise.
12867 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12868
12869 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12870
12871 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12872 type of the parameter is an unconstrained array, convert the actual to
12873 the type of the formal in the In Out and Out cases as well.
12874
12875 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12876
12877 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12878 call build_function_type_array or build_varargs_function_type_array
12879 instead.
12880 (create_subprog_type): Don't call build_function_type; call
12881 build_function_type_vec instead.
12882
12883 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12884
12885 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12886 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12887 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12888
12889 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12890
12891 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12892
12893 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12894 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12895
12896 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12897
12898 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12899
12900 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12901
12902 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12903 instead of accessing TYPE_ARG_TYPES directly.
12904 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12905
12906 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12907
12908 PR ada/48844
12909 * gcc-interface/gigi.h (get_variant_part): Declare.
12910 * gcc-interface/decl.c (get_variant_part): Make global.
12911 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12912 types have the same constant size, are record types and T1 has a
12913 variant part while T2 doesn't.
12914
12915 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12916
12917 * gcc-interface/utils.c (begin_subprog_body): Do not call
12918 get_pending_sizes.
12919 (end_subprog_body): Likewise.
12920
12921 2011-05-04 Richard Guenther <rguenther@suse.de>
12922
12923 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12924 int_const_binop.
12925 (pos_to_constructor): Likewise.
12926
12927 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12928 Eric Botcazou <ebotcazou@adacore.com>
12929
12930 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12931 of build_function_type. Adjust calls to...
12932 (build_raise_check): ...this. Do not take a void_tree parameter.
12933 Call build_function_type_list instead of build_function_type.
12934 Fix head comment and swap couple of conditional blocks.
12935
12936 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12937
12938 * gnatvsn.ads (Library_Version): Bump to 4.7.
12939 (Current_Year): Bump to 2011.
12940
12941 2011-04-29 Michael Matz <matz@suse.de>
12942
12943 * gcc-interface/misc.c (gnat_handle_option): Set
12944 warn_maybe_uninitialized.
12945
12946 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12947
12948 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12949 the Watson/McCabe paper.
12950
12951 2011-04-23 Jim Meyering <meyering@redhat.com>
12952
12953 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12954
12955 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12956
12957 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12958 onto the new type.
12959
12960 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12961
12962 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12963 parameter.
12964 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12965 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12966 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12967 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12968 <all>: Do not set flags on the reused DECL node coming from an alias.
12969 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12970 don't need debug info here...
12971 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12972 (gigi): Adjust calls to create_subprog_decl.
12973 (build_raise_check): Likewise.
12974 (establish_gnat_vms_condition_handler): Likewise.
12975 (Compilation_Unit_to_gnu): Likewise.
12976 (gnat_to_gnu): Likewise.
12977
12978 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12979
12980 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12981 (NO_REORDER_ADAFLAGS): New variable.
12982 (EXTRA_GNATTOOLS): Always define.
12983 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12984 Clean up and adjust list of files compiled with special options.
12985 * gcc-interface/Make-lang.in: Likewise.
12986 (ada/decl.o): Cosmetical change.
12987 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12988
12989 2011-04-20 Jim Meyering <meyering@redhat.com>
12990
12991 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12992
12993 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12994
12995 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12996 $(CFLAGS) on the link line.
12997
12998 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12999
13000 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13001 padded type built for the return type if it is unconstrained.
13002
13003 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13004
13005 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13006
13007 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13008
13009 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13010 before calling TREE_CHAIN.
13011 * gcc-interface/misc.c (gnat_init_ts): New function.
13012 (LANG_HOOKS_INIT_TS): Define.
13013
13014 2011-04-12 Martin Jambor <mjambor@suse.cz>
13015
13016 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13017 instead of cgraph_node.
13018
13019 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13020
13021 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13022 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13023 mechanism.
13024
13025 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13026
13027 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13028 of aggregate types that contain a placeholder.
13029
13030 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13031
13032 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13033 TYPE_ARG_TYPES.
13034 (handle_type_generic_attribute): Likewise.
13035
13036 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13037
13038 PR ada/47163
13039 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13040
13041 2011-04-04 Kai Tietz <ktietz@redhat.com>
13042
13043 PR ada/47163
13044 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13045 to flag value.
13046
13047 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13048
13049 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13050 type case, do not strip a padding type around the array type.
13051
13052 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13053
13054 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13055 types.
13056
13057 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13058
13059 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13060 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13061 code for -feliminate-unused-debug-types.
13062 (gnat_post_options): Likewise.
13063
13064 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13065
13066 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13067 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13068 distinct copy.
13069
13070 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13071
13072 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13073 DECL_ARTIFICIAL flag on enumeration types.
13074
13075 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13076
13077 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13078 fat pointer types artificial unconditionally.
13079 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13080 isn't artificial.
13081
13082 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13083
13084 * gcc-interface/gigi.h (get_dummy_type): Declare.
13085 (build_dummy_unc_pointer_types): Likewise.
13086 (finish_fat_pointer_type): Likewise.
13087 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13088 fat pointer type has been built, complete it in place.
13089 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13090 and thin pointers. Remove useless variable.
13091 (finish_fat_pointer_type): Make global and move to...
13092 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13093 (get_dummy_type): New function.
13094 (build_dummy_unc_pointer_types): Likewise.
13095 (gnat_pushdecl): Propage the name to the anonymous variants only.
13096 (update_pointer_to): Only adjust the pointer types in the unconstrained
13097 array case.
13098
13099 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13100
13101 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13102 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13103 if this is a Taft amendment type and the full declaration is available.
13104 * gcc-interface/trans.c (process_type): Likewise.
13105 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13106 (process_freeze_entity): Likewise.
13107 * gcc-interface/utils.c (dummy_global): New static variable.
13108 (gnat_write_global_declarations): If there are types declared as used
13109 at the global level, insert them in the global hash table.
13110
13111 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13112
13113 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13114 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13115 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13116 copy.
13117 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13118 flag of the type accordingly.
13119 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13120
13121 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13122
13123 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13124 finalizing types when updating the pointers to the designated type.
13125 <all>: Finalize the deferred types even if we didn't defer processing
13126 of incomplete types in this invocation.
13127
13128 2011-04-01 Olivier Hainque <hainque@adacore.com>
13129 Nicolas Setton <setton@adacore.com>
13130 Eric Botcazou <ebotcazou@adacore.com>
13131
13132 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13133 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13134
13135 2011-03-28 Kai Tietz <ktietz@redhat.com>
13136
13137 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13138 Windows targets.
13139 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13140 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13141
13142 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13143
13144 2011-03-28 Tristan Gingold <gingold@adacore.com>
13145
13146 PR ada/44431
13147 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13148 Use ada output of gnatbind.
13149 (ada/b_gnatb.adb): Ditto.
13150 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13151 (ada.mostlyclean, ada.stage1)
13152 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13153 (ada.stagefeedback): Adjust.
13154 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13155 Use ada output of gnatbind.
13156 (b_gnatm.adb): Ditto.
13157 (b_gnatl.o, b_gnatm.o): New rules.
13158
13159 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13160
13161 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13162 for the padded type built to support a specified size or alignment.
13163
13164 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13165
13166 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13167 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13168 unconditionally to the end of the unit when the designated type is
13169 limited_with'ed.
13170 <all>: Rename local variable. Attempt to un-defer types only and do it
13171 for limited_with'ed types as well.
13172 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13173 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13174 consistently and remove redundant call to finalize_from_with_types.
13175
13176 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13177
13178 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13179 subprograms without a previous spec declared in the same unit.
13180 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13181 subprograms at the end of the unit instead of at the beginning.
13182 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13183 isn't public for the special handling of non-inline functions nested
13184 inside inline external functions.
13185
13186 2011-03-25 Jeff Law <law@redhat.com>
13187
13188 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13189
13190 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13191
13192 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13193 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13194 to compute Set_Size_Depends_On_Discriminant.
13195 (Layout_Type): Call it on array types in back-end layout mode.
13196 * sem_util.adb (Requires_Transient_Scope): Return true for array
13197 types only if the size depends on the value of discriminants.
13198 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13199 type if the RHS is a call to a function that returns an unconstrained
13200 type with default discriminant.
13201
13202 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13203
13204 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13205 non-conversion to the nominal result type at the end.
13206
13207 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13208
13209 * gcc-interface/trans.c (create_temporary): New function taken from...
13210 (create_init_temporary): ...here. Call it.
13211 (call_to_gnu): Create the temporary for the return value early, if any.
13212 Create it for a function with copy-in/copy-out parameters if there is
13213 no target; in other cases of copy-in/copy-out, use another temporary.
13214 Push the new binding level lazily. Add and rename local variables.
13215
13216 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13217
13218 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13219 error message.
13220 (set_rm_size): Likewise.
13221
13222 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13223
13224 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13225 for the padded type built in order to support a specified alignment.
13226 Fix incorrect formatting.
13227
13228 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13229
13230 PR bootstrap/48216
13231 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13232
13233 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13234
13235 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13236 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13237 to the end of the list. Adjust recursive call. Rename local variable.
13238 If REORDER is true, reorder components of the record type.
13239 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13240 components_to_record and adjust the parameter list.
13241
13242 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13243
13244 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13245 disabled, use the variable for bounds of loop iteration scheme.
13246
13247 2011-03-21 Kai Tietz <ktietz@redhat.com>
13248
13249 PR target/12171
13250 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13251
13252 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13253
13254 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13255 out whether the expression is read-only. Short-circuit placeholder
13256 case and rename a couple of local variables.
13257
13258 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13259
13260 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13261 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13262 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13263 (convert): Deal with conversions from a smaller form type specially.
13264
13265 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13266
13267 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13268 its argument, except for the special -I- switch.
13269
13270 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13271
13272 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13273 "Ada Issues".
13274
13275 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13276
13277 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13278
13279 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13280
13281 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13282 GNAT_FORMAL.
13283 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13284 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13285 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13286 Do not generate the check directly, instead instantiate the template
13287 check present in the descriptor.
13288 (make_descriptor_field): Move around.
13289 (build_vms_descriptor32): Build a template check in the POINTER field.
13290 (build_vms_descriptor): Remove useless suffixes.
13291 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13292
13293 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13294
13295 PR bootstrap/47467
13296 * targext.c: Include target files if IN_RTS is defined.
13297
13298 2011-01-26 Richard Guenther <rguenther@suse.de>
13299
13300 PR bootstrap/47467
13301 * targext.c: Include config.h.
13302 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13303 dependency.
13304
13305 2011-01-04 Pascal Obry <obry@adacore.com>
13306 Eric Botcazou <ebotcazou@adacore.com>
13307
13308 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13309
13310 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13311
13312 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13313 end-of-case on the end label and its associated gotos, if any.
13314
13315 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13316
13317 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13318 expressions of the parameter cache within the statement group of
13319 the CICO mechanism.
13320
13321 2011-01-04 Olivier Hainque <hainque@adacore.com>
13322 Eric Botcazou <ebotcazou@adacore.com>
13323
13324 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13325 (set_end_locus_from_node): New function.
13326 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13327 make and the function end_locus.
13328 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13329 for the elaboration subprogram.
13330 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13331 set the end_locus of the expression as well.
13332
13333 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13334
13335 PR ada/47131
13336 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13337 variables that are referenced in exception handlers volatile.
13338
13339
13340 \f
13341 Copyright (C) 2011 Free Software Foundation, Inc.
13342
13343 Copying and distribution of this file, with or without modification,
13344 are permitted in any medium without royalty provided the copyright
13345 notice and this notice are preserved.
13346
13347 * gnat_rm.texi: Ramification of pragma Eliminate documentation
13348 - fix bugs in the description of Source_Trace;
13349 - get rid of UNIT_NAME;
13350
13351 2011-08-02 Javier Miranda <miranda@adacore.com>
13352
13353 * exp_ch9.adb
13354 (Build_Dispatching_Requeue): Adding support for VM targets
13355 since we cannot directly reference the Tag entity.
13356 * exp_sel.adb (Build_K): Adding support for VM targets.
13357 (Build_S_Assignment): Adding support for VM targets.
13358 * exp_disp.adb
13359 (Default_Prim_Op_Position): In VM targets do not restrict availability
13360 of predefined interface primitives to compiling in Ada 2005 mode.
13361 (Is_Predefined_Interface_Primitive): In VM targets this service is not
13362 restricted to compiling in Ada 2005 mode.
13363 (Make_VM_TSD): Generate code that declares and initializes the OSD
13364 record. Needed to support dispatching calls through synchronized
13365 interfaces.
13366 * exp_ch3.adb
13367 (Make_Predefined_Primitive_Specs): Enable generation of predefined
13368 primitives associated with synchronized interfaces.
13369 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
13370 primitives associated with synchronized interfaces.
13371
13372 2011-08-02 Yannick Moy <moy@adacore.com>
13373
13374 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
13375 statements hidden in SPARK if preceded by the HIDE directive
13376 (Parse_Exception_Handlers): mark each exception handler in a sequence of
13377 exception handlers as hidden in SPARK if preceded by the HIDE directive
13378 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
13379 if starting with the HIDE directive
13380 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
13381 starting with the HIDE directive; mark the declarations in a private
13382 part as hidden in SPARK if the private part starts with the HIDE
13383 directive
13384 * restrict.adb, restrict.ads
13385 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
13386 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
13387 argument node belongs to a part which is hidden in SPARK
13388 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
13389 parts in SPARK; protect the possibly costly call to
13390 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
13391 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
13392 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
13393 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
13394 Tok_SPARK_Hide.
13395 (Scan): recognize special comment starting with '#' and followed by
13396 SPARK keyword "hide" as a HIDE directive.
13397
13398 2011-08-02 Yannick Moy <moy@adacore.com>
13399
13400 * types.ads, erroutc.ads: Minor reformatting.
13401
13402 2011-08-02 Vincent Celier <celier@adacore.com>
13403
13404 * link.c: Add response file support for cross platforms.
13405
13406 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13407
13408 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
13409 in an association, set parent field of copy before partial analysis.
13410 * sem_res.adb (Resolve_Slice): create reference to itype only when
13411 expansion is enabled.
13412
13413 2011-08-02 Yannick Moy <moy@adacore.com>
13414
13415 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
13416 for new flag denoting which subprogram bodies are in ALFA
13417 * restrict.adb, sem_ch7.adb: Update comment
13418 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
13419 sem_ch9.adb, sem_res.adb: Add calls to
13420 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13421 * sem_ch6.adb (Analyze_Function_Return): add calls to
13422 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13423 middle of the body, and extended return.
13424 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13425 False when missing return.
13426 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13427 to True for subprograms whose spec is in ALFA. Remove later on the flag
13428 on the entity used for a subprogram body when there exists a separate
13429 declaration.
13430 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13431 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13432 False, otherwise do nothing.
13433
13434 2011-08-02 Robert Dewar <dewar@adacore.com>
13435
13436 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13437
13438 2011-08-02 Yannick Moy <moy@adacore.com>
13439
13440 * sem_ch4.ads: minor formatting.
13441
13442 2011-08-02 Yannick Moy <moy@adacore.com>
13443
13444 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13445 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13446 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13447 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13448 opt.ads: cleanup of SPARK mode
13449
13450 2011-08-02 Yannick Moy <moy@adacore.com>
13451
13452 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13453 types.
13454 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13455 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13456 * sem_ch3.adb
13457 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13458 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13459 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13460 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13461 types.
13462 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13463 non-static range.
13464 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13465 functions whose return type is not in ALFA.
13466 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13467 specifications.
13468 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13469 parameter's type is not in ALFA.
13470 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13471 types are in ALFA.
13472
13473 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13474
13475 * sem_ch6 (Analyze_Expression_Function): treat the function as
13476 Inline_Always, and introduce a subprogram declaration for it when it is
13477 not a completion.
13478 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13479 expression functions, so that the back-end can determine whether they
13480 can in fact be inlined.
13481 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13482 a function body comes from an expression function.
13483
13484 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13485
13486 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13487 null exclusions to test Can_Never_Be_Null on the anonymous access types
13488 of the formals rather than testing the formals themselves. Exclude this
13489 check in cases where the Old_Formal is marked as a controlling formal,
13490 to avoid issuing spurious errors for bodies completing dispatching
13491 operations (due to the flag not getting set on controlling access
13492 formals in body specs).
13493 (Find_Corresponding_Spec): When checking full and subtype conformance of
13494 subprogram bodies in instances, pass Designated and E in that order, for
13495 consistency with the expected order of the formals (New_Id followed by
13496 Old_Id).
13497
13498 2011-08-02 Robert Dewar <dewar@adacore.com>
13499
13500 * sem_ch8.adb: Minor reformatting.
13501
13502 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13503
13504 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13505 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13506 primitive operations of class-wide actuals.
13507
13508 2011-08-02 Javier Miranda <miranda@adacore.com>
13509
13510 * exp_atag.ads, exp_atag.adb
13511 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13512 since its value is implicitly passed in argument Typ.
13513 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13514 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13515 Build_Common_Dispatching_Select_Statements.
13516
13517 2011-08-02 Robert Dewar <dewar@adacore.com>
13518
13519 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13520 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13521 Minor reformatting.
13522
13523 2011-08-02 Robert Dewar <dewar@adacore.com>
13524
13525 * sem_res.adb: Minor reformatting.
13526 * sem_prag.adb: Minor reformatting.
13527
13528 2011-08-02 Javier Miranda <miranda@adacore.com>
13529
13530 * exp_atag.adb, exp_atags.ads
13531 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13532 by the tagged type Entity. Required to use this routine in the VM
13533 targets since we do not have available the Tag entity in the VM
13534 platforms.
13535 * exp_ch6.adb
13536 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13537 Ada.Tags has not been previously loaded.
13538 * exp_ch7.adb
13539 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13540 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13541 * sem_aux.adb
13542 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13543 view of enclosing scopes. Required to handle enclosing scopes that
13544 are synchronized types whose full view is a task type.
13545 * exp_disp.adb
13546 (Build_VM_TSDs): Minor code improvement to avoid generating and
13547 analyzing lists with empty nodes.
13548 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13549 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13550 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13551 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13552 (Make_Select_Specific_Data_Table): Add support for VM targets.
13553 (Make_VM_TSD): Generate code to initialize the SSD structure of
13554 the TSD.
13555
13556 2011-08-02 Yannick Moy <moy@adacore.com>
13557
13558 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13559 cross-references section in ALI.
13560 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13561 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13562 Sub).
13563 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13564 subprogram or package entity of a node
13565 (Is_Local_Reference_Type): new function returns True for references
13566 selected in local cross-references.
13567 (Lt): function extracted from Lt in Output_References
13568 (Write_Entity_Name): function extracted from Output_References
13569 (Generate_Definition): generate reference with type 'D' for definition
13570 of objects (object declaration and parameter specification), with
13571 appropriate locations and units, for use in local cross-references.
13572 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13573 references of type 'I' for initialization in object definition.
13574 (Output_References): move part of function Lt and procedure
13575 Write_Entity_Name outside of the body. Ignore references of types 'D'
13576 and 'I' introduced for local cross-references.
13577 (Output_Local_References): new procedure to output the local
13578 cross-references sections.
13579 (Lref_Entity_Status): new array defining whether an entity is a local
13580 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13581 with 'I' type when initialization expression is present.
13582 * get_scos.adb, get_scos.ads: Correct comments and typos
13583
13584 2011-08-02 Javier Miranda <miranda@adacore.com>
13585
13586 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13587 the JVM target.
13588 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13589 the JVM target.
13590 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13591 TSD support.
13592
13593 2011-08-02 Vincent Celier <celier@adacore.com>
13594
13595 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13596 (No_Space_Img): New function
13597 (Find_Excluded_Sources): When reading from a file, record the file name
13598 and the line number for each excluded source.
13599 (Mark_Excluded_Sources): When reporting an error, if the excluded
13600 sources were read from a file, include file name and line number in
13601 the error message.
13602
13603 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13604
13605 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13606
13607 2011-08-02 Robert Dewar <dewar@adacore.com>
13608
13609 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13610
13611 2011-08-02 Javier Miranda <miranda@adacore.com>
13612
13613 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13614 generation of TSDs to the DOTNET compiler.
13615 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13616 generation of TSDs to the DOTNET compiler.
13617
13618 2011-08-02 Javier Miranda <miranda@adacore.com>
13619
13620 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13621 record of all the tagged types declared inside library level package
13622 declarations, library level package bodies or library level subprograms.
13623 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13624 associated with a given tagged type.
13625 (Build_VM_TSDs): New subprogram.
13626 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13627 compilation units that are subprograms.
13628 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13629 compilation units that are package bodies.
13630 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13631 units that are a package declaration or a package instantiation.
13632 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13633 reorganization to improve the error generated by the frontend when the
13634 function Ada.Tags.Secondary_Tag is not available.
13635 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13636 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13637
13638 2011-08-02 Javier Miranda <miranda@adacore.com>
13639
13640 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13641
13642 2011-08-02 Robert Dewar <dewar@adacore.com>
13643
13644 * s-imenne.ads: Minor reformatting.
13645
13646 2011-08-02 Robert Dewar <dewar@adacore.com>
13647
13648 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13649 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13650 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13651
13652 2011-08-02 Robert Dewar <dewar@adacore.com>
13653
13654 * einfo.ads (Materialize_Entity): Document this is only for renamings
13655 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13656 required debug information in the case where we transform the object
13657 declaration into a renaming declaration.
13658 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13659 object
13660 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13661 Materialize_Entity.
13662
13663 2011-08-02 Robert Dewar <dewar@adacore.com>
13664
13665 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13666 Suppress_Init_Procs.
13667 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13668 Suppress_Initialization/Initialization_Suppressed.
13669 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13670 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13671 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13672 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13673
13674 2011-08-02 Robert Dewar <dewar@adacore.com>
13675
13676 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13677 Minor reformatting.
13678
13679 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13680
13681 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13682 only have inheritable classwide pre/postconditions.
13683
13684 2011-08-02 Javier Miranda <miranda@adacore.com>
13685
13686 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13687 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13688 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13689 checks if the external tag of a type is the same as the external tag
13690 of some other declaration.
13691
13692 2011-08-02 Thomas Quinot <quinot@adacore.com>
13693
13694 * s-taskin.ads: Minor reformatting.
13695
13696 2011-08-02 Emmanuel Briot <briot@adacore.com>
13697
13698 * g-comlin.adb (Display_Help): swap the order in which it prints the
13699 short help and the general usage.
13700
13701 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13702
13703 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13704 the aspect declarations and attach them to the generic copy for
13705 subsequent analysis.
13706 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13707 declarations of the generic tree to the new subprogram declarations.
13708 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13709 conditions that apply to a subprogram instance.
13710
13711 2011-08-02 Robert Dewar <dewar@adacore.com>
13712
13713 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13714
13715 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13716
13717 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13718 private type with a tagged full view is not derived in the immediate
13719 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13720
13721 2011-08-02 Robert Dewar <dewar@adacore.com>
13722
13723 * exp_ch4.adb: Minor reformatting.
13724
13725 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13726
13727 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13728 Ada2012 iterator, the loop will be rewritten during expansion into a
13729 while loop with a cursor and an element declaration. Do not analyze the
13730 body in this case, because if the container is for indefinite types the
13731 actual subtype of the elements will only be determined when the cursor
13732 declaration is analyzed.
13733
13734 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13735
13736 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13737 size/alignment related attributes in CodePeer_Mode.
13738
13739 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13740
13741 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13742 Prepend_Element, since this can result in the operation getting the
13743 wrong slot in the full type's dispatch table if the full type has
13744 inherited operations. The incomplete type's operation will get added
13745 to the proper position in the full type's primitives
13746 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13747 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13748 dispatching operations, since there are cases where nonprimitive
13749 subprograms can get added to the list of incomplete dependents (such
13750 as subprograms in nested packages).
13751 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13752 private part when determining whether to add a primitive with a
13753 parameter of a tagged incomplete type to the Private_Dependents list.
13754 Such primitives can also occur in the visible part, and should not have
13755 been excluded from being private dependents.
13756 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13757 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13758 list of a Taft-amendment incomplete type is a primitive before issuing
13759 an error that the full type must appear in the same unit. There are
13760 cases where nonprimitives can be in the list (such as subprograms in
13761 nested packages).
13762 * sem_disp.adb (Derives_From): Use correct condition for checking that
13763 a formal's type is derived from the type of the corresponding formal in
13764 the parent subprogram (the condition was completely wrong). Add
13765 checking that was missing for controlling result types being derived
13766 from the result type of the parent operation.
13767
13768 2011-08-02 Yannick Moy <moy@adacore.com>
13769
13770 * errout.adb (First_Node): minor renaming
13771 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13772 first node.
13773
13774 2011-08-02 Yannick Moy <moy@adacore.com>
13775
13776 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13777 before accessing operands.
13778 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13779 decide whether an initialization expression respects SPARK rules, as
13780 the plain node is the expanded one. This allows for more valid warnings
13781 to be issued.
13782 * gnat_rm.texi: Minor update.
13783
13784 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13785
13786 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13787 previous change.
13788
13789 2011-08-02 Robert Dewar <dewar@adacore.com>
13790
13791 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13792
13793 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13794
13795 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13796 loop statements and the element renaming declaration with a block when
13797 the element type is controlled.
13798
13799 2011-08-02 Yannick Moy <moy@adacore.com>
13800
13801 * sinfo.ads: Minor formatting.
13802
13803 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13804
13805 * sem_aggr.adb (Add_Association): if the association has a box and no
13806 expression, use the Sloc of the aggregate itself for the new
13807 association.
13808 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13809 the Original_Node.
13810
13811 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13812
13813 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13814 When a container is provided via a function call, generate a renaming
13815 of the function result. This avoids the creation of a transient scope
13816 and the premature finalization of the container.
13817 * exp_ch7.adb (Is_Container_Cursor): Removed.
13818 (Wrap_Transient_Declaration): Remove the supression of the finalization
13819 of the list controller when the declaration denotes a container cursor,
13820 it is not needed.
13821
13822 2011-08-02 Yannick Moy <moy@adacore.com>
13823
13824 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13825 node is from source, instead of the original node being from source.
13826 * sem_aggr.adb
13827 (Resolve_Array_Aggregate): refine the check for a static expression, to
13828 recognize also static ranges
13829 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13830 Array_Type_Declaration): postpone the test for the type being a subtype
13831 mark after the type has been resolved, so that component-selection and
13832 expanded-name are discriminated.
13833 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13834 to distinguish the case of an iteration scheme, so that an error is
13835 issed on a non-static range in SPARK except in an iteration scheme.
13836 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13837 In_Iter_Schm = True.
13838 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13839 user-defined operators so that they are allowed in renaming
13840 * sem_ch8.adb
13841 (Find_Selected_Component): refine the check for prefixing of operators
13842 so that they are allowed in renaming. Move the checks for restrictions
13843 on selector name after analysis discriminated between
13844 component-selection and expanded-name.
13845 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13846 concatenation argument of string type if it is static.
13847 * sem_util.adb, sem_util.ads
13848 (Check_Later_Vs_Basic_Declarations): add a new function
13849 Is_Later_Declarative_Item to decice which declarations are allowed as
13850 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13851 mode, add that renamings are considered as later items.
13852 (Enclosing_Package): new function to return the enclosing package
13853 (Enter_Name): correct the rule for homonyms in SPARK
13854 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13855 from source (result of expansion) to avoid issuing wrong warnings.
13856
13857 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13858
13859 * errout.adb: On anything but an expression First_Node returns its
13860 argument.
13861
13862 2011-08-02 Pascal Obry <obry@adacore.com>
13863
13864 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13865
13866 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13867
13868 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13869 Set the associated loop as the related expression of internally
13870 generated cursors.
13871 * exp_ch7.adb (Is_Container_Cursor): New routine.
13872 (Wrap_Transient_Declaration): Supress the finalization of the list
13873 controller when the declaration denotes a container cursor.
13874
13875 2011-08-02 Yannick Moy <moy@adacore.com>
13876
13877 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13878 command line now.
13879 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13880 expression is a simple expression. This check cannot be performed in
13881 the semantics, so just drop it.
13882 (P_Index_Or_Discriminant_Constraint): move check that the index or
13883 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13884 semantics. Other cases were previously checked in the semantics.
13885 * par-ch4.adb (P_Name): move checks that a selector name is not
13886 character literal or an operator symbol to Find_Selected_Component in
13887 the semantics
13888 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13889 declarations are not placed after later declarations in a separate
13890 procedure in Sem_Util (possibly not the best choice?), to be used both
13891 during parsing, for Ada 83 mode, and during semantic analysis, for
13892 SPARK mode.
13893 * par-endh.adb (Check_End): move check that end label is not missing
13894 to Process_End_Label in the semantics
13895 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13896 the special case for SPARK restriction
13897 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13898 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13899 parameter Force to issue the error message even on internal node (used
13900 for generated end label). Call Check_Restriction to check when an error
13901 must be issued. In SPARK mode, issue an error message even if the
13902 restriction is not set.
13903 (Check_Restriction): new procedure with an additional out parameter to
13904 inform the caller that a message has been issued
13905 * sem_aggr.adb: Minor modification of message
13906 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13907 instead of issuing an error message directly
13908 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13909 declarations are not placed after later declarations, by calling
13910 Check_Later_Vs_Basic_Declarations
13911 (Analyze_Subtype_Declaration): move here the check that an index or
13912 discriminant constraint must be a subtype mark. Change the check that
13913 a subtype of String must start at one so that it works on subtype marks.
13914 * sem_ch4.adb (Analyze_Call): move here the check that a named
13915 association cannot follow a positional one in a call
13916 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13917 instead of issuing an error message directly
13918 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13919 selector name is not a character literal or an operator symbol. Move
13920 here the check that the prefix of an expanded name cannot be a
13921 subprogram or a loop statement.
13922 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13923 procedure called from parsing and semantics to check that basic
13924 declarations are not placed after later declarations
13925 (Process_End_Label): move here the check that end label is not missing
13926
13927 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13928
13929 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13930 representation clause in codepeer mode, since it confuses CodePeer and
13931 does not bring useful info.
13932
13933 2011-08-02 Ed Falis <falis@adacore.com>
13934
13935 * init.c: initialize fp hw on MILS.
13936
13937 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13938
13939 * errout.adb (First_Node): for bodies, return the node itself (small
13940 optimization). For other nodes, do not check source_unit if the node
13941 comes from Standard.
13942
13943 2011-08-02 Robert Dewar <dewar@adacore.com>
13944
13945 * exp_ch3.adb: Minor comment additions.
13946 * sem_ch13.adb: Minor reformatting.
13947
13948 2011-08-02 Pascal Obry <obry@adacore.com>
13949
13950 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13951
13952 2011-08-02 Robert Dewar <dewar@adacore.com>
13953
13954 * sem_attr.adb: Minor reformatting.
13955
13956 2011-08-02 Robert Dewar <dewar@adacore.com>
13957
13958 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13959 (Has_Default_Component_Value): Removed
13960 * einfo.ads Comment updates
13961 (Has_Default_Aspect): Replaces Has_Default_Value
13962 (Has_Default_Component_Value): Removed
13963 * exp_ch13.adb
13964 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13965 * exp_ch3.adb
13966 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13967 (Get_Simple_Init_Val): Handle Default_Value aspect
13968 (Needs_Simple_Initialization): Handle Default_Value aspect
13969 * exp_ch3.ads: Needs_Simple_Initialization
13970 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13971 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13972 * sem_ch13.adb
13973 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13974 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13975 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13976
13977 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13978
13979 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13980 package containing iteration primitives.
13981 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13982
13983 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13984
13985 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13986 "of", pre-analyze expression in case it is a function call with
13987 finalization actions that must be placed ahead of the loop.
13988 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13989 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13990
13991 2011-08-02 Geert Bosch <bosch@adacore.com>
13992
13993 * cstand.adb (Create_Float_Types): Only consider C's long double for
13994 Long_Long_Float, in addition to double.
13995
13996 2011-08-02 Robert Dewar <dewar@adacore.com>
13997
13998 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13999 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
14000 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
14001 Minor reformatting.
14002
14003 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14004
14005 * sem_attr.adb: handle properly 'Result when it is a prefix of an
14006 indexed component.
14007
14008 2011-08-02 Javier Miranda <miranda@adacore.com>
14009
14010 * einfo.ads, einfo.adb
14011 (Original_Access_Type): Move this attribute to Node26 since there was
14012 an undocumented use of Node21 in E_Access_Subprogram_Type entities
14013 which causes conflicts and breaks the generation of the .NET compiler.
14014 (Interface_Name): Add missing documentation on JGNAT only uses of
14015 this attribute.
14016
14017 2011-08-02 Geert Bosch <bosch@adacore.com>
14018
14019 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
14020 (Find_Back_End_Float_Type): Likewise
14021 (Create_Back_End_Float_Types): Likewise
14022 (Create_Float_Types): Likewise
14023 (Register_Float_Type): Likewise
14024 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14025 Nlist and split out type selection in new local Find_Base_Type function.
14026 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14027 Nlist
14028 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14029
14030 2011-08-02 Robert Dewar <dewar@adacore.com>
14031
14032 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14033 alpha order).
14034 * opt.ads: Minor comment change.
14035 * sem_ch12.adb: Minor code reorganization.
14036
14037 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14038
14039 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
14040 subtype's list of rep items to the list on the full subtype in the case
14041 where the lists are the same.
14042
14043 2011-08-02 Geert Bosch <bosch@adacore.com>
14044
14045 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
14046 using the one from System.Strings, which also deallocates all strings.
14047
14048 2011-08-02 Geert Bosch <bosch@adacore.com>
14049
14050 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
14051 function.
14052 * gcc-interface/Make-lang.in: Update dependencies.
14053
14054 2011-08-02 Olivier Hainque <hainque@adacore.com>
14055
14056 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
14057 end_locus.
14058
14059 2011-08-02 Javier Miranda <miranda@adacore.com>
14060
14061 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
14062 associated with anonymous access to subprograms.
14063
14064 2011-08-02 Geert Bosch <bosch@adacore.com>
14065
14066 * opt.ads
14067 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
14068 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
14069 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
14070 (Add_Symbol_Definition): Move to switch-c.adb
14071 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
14072 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
14073 (Add_Symbol_Definition): Move to switch-c.adb.
14074 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
14075 * sem_warn.adb
14076 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14077 Move to warnsw.adb.
14078 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
14079 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14080 Move to warnsw.adb.
14081 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
14082 (Add_Symbol_Definition): Moved from Prepcomp.
14083 * switch-c.ads: Update copyright notice. Use String_List instead of
14084 Argument_List, removing dependency on System.OS_Lib.
14085
14086 2011-08-02 Yannick Moy <moy@adacore.com>
14087
14088 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
14089 mode on initialization expression which does not respect SPARK
14090 restrictions.
14091 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
14092 if the tree referenced by its argument represents an initialization
14093 expression in SPARK, suitable for initializing an object in an object
14094 declaration.
14095
14096 2011-08-02 Javier Miranda <miranda@adacore.com>
14097
14098 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
14099 internally generated access to subprogram with its associated protected
14100 subprogram type.
14101 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
14102
14103 2011-08-02 Geert Bosch <bosch@adacore.com>
14104
14105 * cstand.adb (Register_Float_Type): Print information about type to
14106 register, if the Debug_Flag_Dot_B is set.
14107 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
14108 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
14109 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
14110 with a requested precision of more than Max_Digits digits and no more
14111 than Max_Base_Digits digits, if a range specification is present and the
14112 Predefined_Float_Types list has a suitable type to derive from.
14113 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
14114 case of type completion with pragma Import
14115 * sem_prag.adb
14116 (Process_Import_Predefined_Type): Processing to complete a type
14117 with pragma Import. Currently supports floating point types only.
14118 (Set_Convention_From_Pragma): Do nothing without underlying type.
14119 (Process_Convention): Guard against absence of underlying type,
14120 which may happen when importing incomplete types.
14121 (Process_Import_Or_Interface): Handle case of importing predefined
14122 types. Tweak error message.
14123
14124 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14125
14126 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
14127 functions to previous change. Reorganize code slightly.
14128
14129 2011-08-02 Geert Bosch <bosch@adacore.com>
14130
14131 * back_end.ads (Register_Type_Proc): New call back procedure type for
14132 allowing the back end to provide information about available types.
14133 (Register_Back_End_Types): New procedure to register back end types.
14134 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
14135 available types.
14136 * cstand.adb (Back_End_Float_Types): New list for floating point types
14137 supported by the back end.
14138 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
14139 (Copy_Float_Type): New procedure to make new copies of predefined types.
14140 (Register_Float_Type): New call back procedure to populate the BEFT list
14141 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
14142 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
14143 (Create_Float_Types): New procedure to create entities for floating
14144 point types predefined in Standard, and put these and any remaining
14145 BEFTs on the Predefined_Float_Types list.
14146 * stand.ads (Predefined_Float_Types): New list for predefined floating
14147 point types that do not have declarations in package Standard.
14148
14149 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14150
14151 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
14152 entity node for the unit containing the parameter.
14153 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
14154 (Add_Inlined_Subprogram): Likewise.
14155 * gcc-interface/Make-lang.in: Update dependencies.
14156
14157 2011-08-02 Thomas Quinot <quinot@adacore.com>
14158
14159 * s-stusta.adb (Print): Make sure Pos is always initialized to a
14160 suitable value.
14161
14162 2011-08-02 Geert Bosch <bosch@adacore.com>
14163
14164 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
14165
14166 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14167
14168 * sem_type.adb (Covers): Move trivial case to the top and reuse the
14169 computed value of Base_Type.
14170
14171 2011-08-02 Yannick Moy <moy@adacore.com>
14172
14173 * restrict.adb (Check_Restriction): issue an error for any use of
14174 class-wide, even if the No_Dispatch restriction is not set.
14175 * sem_aggr.adb: Correct typos in comments and messages in formal mode
14176 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
14177 when completing a private extension, the type named in the private part
14178 is not the same as that named in the visible part.
14179 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
14180 of an inherited primitive operations of a tagged type or type extension
14181 that returns the tagged type.
14182 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
14183 function which returns True for an implicit operation inherited by the
14184 derived type declaration for the argument type.
14185 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
14186 order.
14187
14188 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14189
14190 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
14191 Process_Bounds, to perform analysis with expansion of a range or an
14192 expression that is the iteration scheme for a loop.
14193 (Analyze_Iterator_Specification): If domain of iteration is given by a
14194 function call with a controlled result, as is the case if call returns
14195 a predefined container, ensure that finalization actions are properly
14196 generated.
14197 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
14198
14199 2011-08-02 Javier Miranda <miranda@adacore.com>
14200
14201 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
14202 * gcc-interface/Make-lang.in: Update dependencies.
14203
14204 2011-08-02 Javier Miranda <miranda@adacore.com>
14205
14206 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
14207 determine if the analysis is performed using N or Original_Node (N).
14208 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
14209 functionality of routine Is_Variable avoids code duplication.
14210 * checks.adb (Determine_Range): Handle temporaries generated by
14211 Remove_Side_Effects.
14212
14213 2011-08-02 Javier Miranda <miranda@adacore.com>
14214
14215 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
14216 expansion of the condition. Required since the previous analysis was
14217 done with expansion disabled (see Resolve_Quantified_Expression) and
14218 hence checks were not inserted and record comparisons have not been
14219 expanded.
14220
14221 2011-08-02 Ed Falis <falis@adacore.com>
14222
14223 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
14224 Update header.
14225
14226 2011-08-02 Bob Duff <duff@adacore.com>
14227
14228 * opt.ads: Minor comment fix.
14229
14230 2011-08-02 Bob Duff <duff@adacore.com>
14231
14232 * sem_ch12.adb (Analyze_Package_Instantiation,
14233 Analyze_Subprogram_Instantiation): Turn off style checking while
14234 analyzing an instance. Whatever style checks that apply to the generic
14235 unit should apply, so it makes no sense to apply them in an instance.
14236 This was causing trouble when compiling an instance of a runtime
14237 unit that violates the -gnatyO switch.
14238 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
14239 one of the two case statements, causing spurious errors.
14240
14241 2011-08-02 Robert Dewar <dewar@adacore.com>
14242
14243 * uname.adb: Minor reformatting.
14244 * gnatcmd.adb: Minor reformatting.
14245 * exp_attr.adb: Minor reformatting.
14246
14247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14248
14249 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
14250 No_Dispatching_Calls, do not look for the Assign primitive, because
14251 predefined primitives are not created in this case.
14252
14253 2011-08-02 Bob Duff <duff@adacore.com>
14254
14255 * stylesw.ads: Minor comment fixes.
14256
14257 2011-08-02 Robert Dewar <dewar@adacore.com>
14258
14259 * freeze.adb (Add_To_Result): New procedure.
14260
14261 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14262
14263 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
14264 time, if the specific run-time routines for handling streams of strings
14265 are not available, use the default mechanism.
14266
14267 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14268
14269 * s-regpat.ads: Fix typo.
14270
14271 2011-08-02 Vincent Celier <celier@adacore.com>
14272
14273 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
14274 not null, call it to create the in memory config project file without
14275 parsing an existing default config project file.
14276
14277 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14278
14279 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
14280
14281 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14282
14283 * sem_elim.adb: an abstract subprogram does not need an eliminate
14284 pragma for its descendant to be eliminable.
14285
14286 2011-08-02 Ed Falis <falis@adacore.com>
14287
14288 * init.c: revert to handling before previous checkin for VxWorks
14289 * s-intman-vxworks.adb: delete unnecessary declarations related to
14290 using Ada interrupt facilities for handling signals.
14291 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
14292 * s-intman-vxworks.ads: Import __gnat_install_handler as
14293 Initialize_Interrupts.
14294 * s-taprop-vxworks.adb: Delete Signal_Mask.
14295 (Abort_Handler): change construction of mask to unblock exception
14296 signals.
14297
14298 2011-08-02 Jerome Guitton <guitton@adacore.com>
14299
14300 * a-except-2005.adb (Raise_From_Signal_Handler): Call
14301 Debug_Raise_Exception before propagation starts.
14302
14303 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14304
14305 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
14306 to Restriction_Check_Required.
14307 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
14308 * sem_res.adb (Resolve_Call): Likewise.
14309 * sem_attr.adb (Check_Stream_Attribute): Likewise.
14310
14311 2011-08-02 Bob Duff <duff@adacore.com>
14312
14313 * stylesw.ads: Update comment.
14314 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
14315 * errout.ads: Remove obsolete comment.
14316
14317 2011-08-02 Javier Miranda <miranda@adacore.com>
14318
14319 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
14320 (Set_Is_Safe_To_Reevaluate): new procedure.
14321 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
14322 assignment is allowed on safe-to-reevaluate variables.
14323 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
14324 temporary created to remove side effects in expressions that use
14325 the secondary stack as safe-to-reevaluate.
14326 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
14327 variables that are not true constants.
14328
14329 2011-08-02 Robert Dewar <dewar@adacore.com>
14330
14331 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
14332 sem_res.adb, sem_ch6.adb: Minor reformatting.
14333
14334 2011-08-02 Jerome Guitton <guitton@adacore.com>
14335
14336 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
14337
14338 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14339
14340 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
14341 not set Overridden_Operation if subprogram is an initialization
14342 procedure.
14343
14344 2011-08-02 Yannick Moy <moy@adacore.com>
14345
14346 * par-ch6.adb: Correct obsolete name in comments
14347 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
14348 which takes two message arguments (existing function takes one), with
14349 second message used for continuation.
14350 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
14351 block statements that originate from a source block statement, not
14352 generated block statements
14353 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
14354 symmetry with procedure case
14355 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
14356 function to issue an error in formal mode if a package specification
14357 contains more than one tagged type or type extension.
14358 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
14359 parameters matching formals of tagged types are objects (or ancestor
14360 type conversions of objects), not general expressions. Issue an error
14361 on view conversions that are not involving ancestor conversion of an
14362 extended type.
14363 (Resolve_Type_Conversion): in formal mode, issue an error on the
14364 operand of an ancestor type conversion which is not an object
14365 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
14366 procedure so that it works also for actuals of function calls
14367 (Is_Actual_Tagged_Parameter): new function which determines if its
14368 argument is an actual parameter of a formal of tagged type in a
14369 subprogram call
14370 (Is_SPARK_Object_Reference): new function which determines if the tree
14371 referenced by its argument represents an object in SPARK
14372
14373 2011-08-02 Robert Dewar <dewar@adacore.com>
14374
14375 * sem_ch3.adb: Minor reformatting
14376 Minor comment addition
14377 Minor error msg text change
14378
14379 2011-08-02 Javier Miranda <miranda@adacore.com>
14380
14381 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
14382 function. Used to be more precise when we generate a variable plus one
14383 assignment to remove side effects in the evaluation of the Bound
14384 expressions.
14385 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
14386 of the bound expression to force its re-analysis and thus expand the
14387 associated transient scope (if required). Code cleanup replacing the
14388 previous code that declared the constant entity by an invocation to
14389 routine Force_Evaluation which centralizes this work in the frontend.
14390
14391 2011-08-02 Robert Dewar <dewar@adacore.com>
14392
14393 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
14394 (Base_Type): Now uses improved Is_Base_Type function
14395 * einfo.ads (Base_Type): Inline this function
14396
14397 2011-08-02 Robert Dewar <dewar@adacore.com>
14398
14399 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
14400 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
14401
14402 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14403
14404 * gcc-interface/Make-lang.in: Update dependencies.
14405 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
14406 targets.
14407
14408 2011-08-02 Yannick Moy <moy@adacore.com>
14409
14410 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
14411 non-simple expression used in delta constraint
14412 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
14413 index constraint which is not a subtype mark
14414 * par.adb: With and use Restrict
14415 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
14416 mode on component type which is not a subtype mark and default
14417 expression on component
14418 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
14419 of string which does not have a lower index bound equal to 1
14420 (Array_Type_Declaration): issue an error in formal mode on index or
14421 component type which is not a subtype mark, and on aliased keyword on
14422 component
14423 (Derived_Type_Declaration): issue an error in formal mode on interface,
14424 limited or abstract type
14425 (Record_Type_Declaration): issue an error in formal mode on interface
14426 (Record_Type_Definition): issue an error in formal mode on tagged types
14427 and type extensions not declared in the specification of a library unit
14428 package; on null non-tagged record; on variant part
14429
14430 2011-08-02 Vincent Celier <celier@adacore.com>
14431
14432 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14433 not declared for qualified library project when Library_Name is not
14434 declared, but Library_Dir is.
14435
14436 2011-08-02 Robert Dewar <dewar@adacore.com>
14437
14438 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14439 pragmas (affects aspects [Component_]Default_Value
14440 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14441 component type for the resolution
14442
14443 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14444
14445 * einfo.adb (Base_Type): Tune implementation for speed.
14446
14447 2011-08-02 Robert Dewar <dewar@adacore.com>
14448
14449 * freeze.adb: Minor reformatting.
14450
14451 2011-08-02 Thomas Quinot <quinot@adacore.com>
14452
14453 * scos.ads: Update comments.
14454
14455 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14456
14457 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14458 base type, because the parent may be a subtype of a private type whose
14459 convention is established in a private part.
14460
14461 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14462
14463 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14464 statement in a block when the expansion of the return expression has
14465 created a finalization chain.
14466 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14467 with the parent node.
14468 Add N_Extended_Return_Statement to handle the case where a transient
14469 object declaration appears in the Return_Object_Declarations list of
14470 an extended return statement.
14471
14472 2011-08-02 Matthew Gingell <gingell@adacore.com>
14473
14474 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14475 unused parameter 'name'.
14476
14477 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14478
14479 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14480 inherited operation, check whether its alias, which is the source
14481 operastion that it renames, has been marked eliminated.
14482
14483 2011-08-02 Javier Miranda <miranda@adacore.com>
14484
14485 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14486 in-mode parameter whose type is an access type since it can be used to
14487 modify its designated object. Enforce code that handles as safe an
14488 access type that is not access-to-constant but it is the result of a
14489 previous removal of side-effects.
14490 (Remove_Side_Effects): Minor code reorganization of cases which require
14491 no action. Done to incorporate documentation on new cases uncovered
14492 working in this ticket: no action needed if this routine was invoked
14493 too early and the nodes are not yet decorated.
14494 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14495 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14496 were issued with actuals that are implicitly provided by
14497 Force_Evaluation.
14498
14499 2011-08-02 Robert Dewar <dewar@adacore.com>
14500
14501 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14502
14503 2011-08-02 Yannick Moy <moy@adacore.com>
14504
14505 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14506 to issue an error in formal mode on attribute not supported in this mode
14507 (Analyze_Attribute): issue errors on standard attributes not supported
14508 in formal mode.
14509 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14510 comment, and issue error in formal mode on modulus which is not a power
14511 of 2.
14512 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14513 range.
14514 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14515 subtype mark.
14516 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14517 operator on modular type (except 'not').
14518
14519 2011-08-02 Robert Dewar <dewar@adacore.com>
14520
14521 * gnat_rm.texi: Minor reformatting.
14522
14523 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14524
14525 * s-osinte-linux.ads: Minor comment update and reformatting.
14526 * i-cexten.ads: Make this unit pure, as for its parent.
14527 Will allow its usage in more contexts if needed.
14528
14529 2011-08-02 Robert Dewar <dewar@adacore.com>
14530
14531 * s-utf_32.ads: Minor comment fix.
14532
14533 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14534
14535 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14536 operation of a tagged synchronized type, handle the case where the
14537 controlling argument is overloaded.
14538
14539 2011-08-02 Yannick Moy <moy@adacore.com>
14540
14541 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14542 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14543 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14544 SPARK mode and formal verification mode on processing SPARK restriction
14545 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14546 requiring consistency checking.
14547
14548 2011-08-02 Robert Dewar <dewar@adacore.com>
14549
14550 * sem_res.adb: Minor reformatting.
14551
14552 2011-08-02 Robert Dewar <dewar@adacore.com>
14553
14554 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14555 a-cforse.ads: Remove unneeded with of Ada.Containers
14556 Remove commented out pragma Inline's
14557 Move specifications of new subprograms to the actual specs
14558
14559 2011-08-02 Yannick Moy <moy@adacore.com>
14560
14561 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14562 a-cforse.ads: Update comments.
14563
14564 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14565
14566 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14567
14568 2011-08-02 Robert Dewar <dewar@adacore.com>
14569
14570 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14571 a-cforse.ads, a-cofove.ads: Minor reformatting.
14572
14573 2011-08-02 Claire Dross <dross@adacore.com>
14574
14575 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14576 a-cofove.ads: Add comments.
14577
14578 2011-08-02 Yannick Moy <moy@adacore.com>
14579
14580 * gnat_rm.texi: Document formal containers.
14581
14582 2011-08-02 Emmanuel Briot <briot@adacore.com>
14583
14584 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14585 are empty sections.
14586
14587 2011-08-02 Robert Dewar <dewar@adacore.com>
14588
14589 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14590 reformatting.
14591
14592 2011-08-02 Robert Dewar <dewar@adacore.com>
14593
14594 * aspects.adb: New aspects Default_Value and Default_Component_Value
14595 New format of Aspect_Names table checks for omitted entries
14596 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14597 handling of boolean aspects for derived types.
14598 New aspects Default_Value and Default_Component_Value
14599 New format of Aspect_Names table checks for omitted entries
14600 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14601 (Has_Default_Value): New flag
14602 (Has_Default_Component_Value): New flag
14603 (Has_Default_Value): New flag
14604 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14605 table.
14606 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14607 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14608 Default_Value and Default_Component_Value
14609 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14610 New aspects Default_Value and Default_Component_Value
14611 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14612 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14613
14614 2011-08-02 Vincent Celier <celier@adacore.com>
14615
14616 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14617 inherit library kind.
14618
14619 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14620
14621 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14622 Minor reformatting.
14623
14624 2011-08-02 Robert Dewar <dewar@adacore.com>
14625
14626 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14627
14628 2011-08-02 Yannick Moy <moy@adacore.com>
14629
14630 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14631
14632 2011-08-02 Robert Dewar <dewar@adacore.com>
14633
14634 * impunit.adb: Add comment.
14635
14636 2011-08-02 Yannick Moy <moy@adacore.com>
14637
14638 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14639 qualification of aggregates in formal mode
14640 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14641 another aggregate
14642 (Resolve_Aggregate): complete the test that an aggregate is adequately
14643 qualified in formal mode
14644
14645 2011-08-02 Pascal Obry <obry@adacore.com>
14646
14647 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14648 * mlib-prj.adb: Supress warning when compiling binder generated file.
14649 (Build_Library): Supress all warnings when compiling the binder
14650 generated file.
14651
14652 2011-08-02 Yannick Moy <moy@adacore.com>
14653
14654 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14655 from here...
14656 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14657 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14658 Add with/use clauses to make Check_Formal_Restriction visible
14659
14660 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14661
14662 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14663 in-parameters when type of the generic formal is private in the generic
14664 spec and non-private in the body.
14665
14666 2011-08-02 Claire Dross <dross@adacore.com>
14667
14668 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14669 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14670 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14671 * impunit.adb, Makefile.rtl: Take new files into account.
14672
14673 2011-08-02 Robert Dewar <dewar@adacore.com>
14674
14675 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14676 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14677
14678 2011-08-02 Yannick Moy <moy@adacore.com>
14679
14680 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14681 formal mode
14682 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14683 matching static array bounds, taking into account the special case of
14684 string literals
14685 * sem_ch3.adb: Typo in comment.
14686
14687 2011-08-02 Yannick Moy <moy@adacore.com>
14688
14689 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14690 which issues an error in formal mode if its argument node is originally
14691 from source
14692 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14693 has a discriminant specification so that it does not include the case
14694 of derived types
14695 (Derived_Type_Declaration): move here the test that a derived type has a
14696 discriminant specification
14697 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14698 first element of a component association before accessing its choices
14699 (presence of component association is not enough)
14700 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14701 declaration is a library item before accessing the next element in a
14702 list, as library items are not member of lists
14703 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14704 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14705 Check_Formal_Restriction whenever possible.
14706
14707 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14708
14709 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14710 reference when needed.
14711
14712 2011-08-02 Bob Duff <duff@adacore.com>
14713
14714 * gnat_ugn.texi: Fix typo.
14715
14716 2011-08-02 Vincent Celier <celier@adacore.com>
14717
14718 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14719 archive file name. Do not use the full path name of archives for Open
14720 VMS.
14721
14722 2011-08-02 Robert Dewar <dewar@adacore.com>
14723
14724 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14725 Analyze_Aspect_Specifications
14726 * sem_ch13.adb
14727 (Analyze_Aspect_Specifications): New handling for boolean aspects
14728 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14729 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14730 sequence for Analyze_Aspect_Specifications
14731 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14732 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14733
14734 2011-08-02 Robert Dewar <dewar@adacore.com>
14735
14736 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14737 aspects, since these no longer exist.
14738
14739 2011-08-02 Robert Dewar <dewar@adacore.com>
14740
14741 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14742 semicolon, do not try to see if there are aspects following it.
14743 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14744 aspect spec.
14745
14746 2011-08-02 Robert Dewar <dewar@adacore.com>
14747
14748 * sem_ch8.adb, aspects.ads: Minor reformatting.
14749
14750 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14751
14752 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14753 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14754 extracted from...
14755 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14756
14757 2011-08-02 Yannick Moy <moy@adacore.com>
14758
14759 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14760 mode on subprogram declaration outside of package specification, unless
14761 it is followed by a pragma Import
14762 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14763 Access_Type_Declaration): issue error in formal mode on access type
14764 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14765 incomplete type
14766 (Analyze_Object_Declaration): issue error in formal mode on object
14767 declaration which does not respect SPARK restrictions
14768 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14769 declaration which does not respect SPARK restrictions
14770 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14771 error in formal mode on digits or delta constraint
14772 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14773 decimal fixed point type
14774 (Derived_Type_Declaration): issue error in formal mode on derived type
14775 other than type extensions of tagged record types
14776 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14777 with check on access definition
14778 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14779 mode on protected definition.
14780 (Analyze_Task_Definition): issue error in formal mode on task definition
14781
14782 2011-08-02 Robert Dewar <dewar@adacore.com>
14783
14784 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14785
14786 2011-08-02 Javier Miranda <miranda@adacore.com>
14787
14788 * sem_ch6.adb (Can_Override_Operator): New function.
14789 (Verify_Overriding_Indicator): Add missing code to check overriding
14790 indicator in operators. Fixes regression.
14791 (Check_Overriding_Indicator): Minor reformating after replacing the
14792 code that evaluates if the subprogram can override an operator by
14793 invocations to the above new function.
14794 * einfo.adb
14795 (Write_Field26_Name): Add missing code to ensure that, following
14796 the documentation in einfo.ads, this field is not shown as attribute
14797 "Static_Initialization" on non-dispatching functions.
14798
14799 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14800
14801 * sem_res.adb (Resolve_Call): A call to
14802 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14803 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14804 i.e., when the second parameter is of type Time_Span.
14805
14806 2011-08-02 Vincent Celier <celier@adacore.com>
14807
14808 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14809 with an archive instead of -L<library dir> -l<library name>.
14810
14811 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14812
14813 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14814 mark the base types In_Use in addition to making the operations
14815 use_visible.
14816
14817 2011-08-02 Ed Falis <falis@adacore.com>
14818
14819 * init.c: add and setup __gnat_signal_mask for the exception signals
14820 * s-inmaop-vxworks.adb: new file.
14821 * s-intman-vxworks.adb: remove unnecessary initializations and
14822 simplify remaining
14823 * s-intman-vxworks.ads: remove unnecessary variable
14824 * s-taprop-vxworks.adb: simplify signal initialization
14825
14826 2011-08-02 Robert Dewar <dewar@adacore.com>
14827
14828 * sem_ch8.adb: Minor code reorganization, comment updates.
14829
14830 2011-08-02 Robert Dewar <dewar@adacore.com>
14831
14832 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14833 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14834 here from Sem_Res.
14835 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14836 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14837
14838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14839
14840 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14841 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14842 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14843 use_type_clauses, to handle more efficiently use_type and use_all_type
14844 constructs.
14845 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14846 Ada2012 Use_All_Type clause.
14847 (Use_Class_Wide_Operations): new procedure.
14848
14849 2011-08-02 Robert Dewar <dewar@adacore.com>
14850
14851 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14852 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14853 expression to expression function.
14854
14855 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14856
14857 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14858 if types are compatible.
14859
14860 2011-08-02 Yannick Moy <moy@adacore.com>
14861
14862 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14863 returns True if its argument array types have same dimension and same
14864 static bounds at each index.
14865 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14866 OUT or IN OUT paramaters which are not view conversions in SPARK.
14867 (Resolve_Arithmetic_Op): issue an error in formal mode on
14868 multiplication or division with operands of fixed point types which are
14869 not qualified or explicitly converted.
14870 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14871 Boolean or array type (except String) operands.
14872 (Resolve_Equality_Op): issue an error in formal mode on equality
14873 operators for array types other than String with non-matching static
14874 bounds.
14875 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14876 for array types with non-matching static bounds. Factorize the code in
14877 Matching_Static_Array_Bounds.
14878 (Resolve_Qualified_Expression): issue an error in formal mode on
14879 qualified expressions for array types with non-matching static bounds.
14880 (Resolve_Type_Conversion): issue an error in formal mode on type
14881 conversion for array types with non-matching static bounds
14882
14883 2011-08-02 Robert Dewar <dewar@adacore.com>
14884
14885 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14886
14887 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14888
14889 * par-ch9.adb: save location of entry for proper error message.
14890
14891 2011-08-02 Javier Miranda <miranda@adacore.com>
14892
14893 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14894 (Use_Full_View) which permits this routine to climb through the
14895 ancestors using the full-view of private parents.
14896 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14897 Use_Full_View to true in calls to Is_Ancestor.
14898 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14899 true in call to Is_Ancestor.
14900 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14901 Use_Full_View to true in call to Is_Ancestor.
14902 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14903 call to Is_Ancestor.
14904 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14905 Use_Full_View to true in calls to Is_Ancestor.
14906 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14907 Make_Select_Specific_Data_Table, Register_Primitive,
14908 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14909 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14910 to true in call to Is_Ancestor.
14911 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14912 Use_Full_View to true in calls to Is_Ancestor.
14913 * exp_cg.adb
14914 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14915 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14916
14917 2011-08-02 Robert Dewar <dewar@adacore.com>
14918
14919 * gnat_rm.texi: Minor reformatting.
14920 * sem_prag.adb: Minor reformatting.
14921
14922 2011-08-02 Tristan Gingold <gingold@adacore.com>
14923
14924 * vms_data.ads: Add VMS qualifier for -gnateP.
14925
14926 2011-08-02 Robert Dewar <dewar@adacore.com>
14927
14928 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14929 * par-ch7.adb (P_Package): Proper placement of aspects for package
14930 decl/instantiation.
14931 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14932 (End_Statements): Add Is_Sloc parameterr
14933 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14934 (Check_End): Ad Is_Sloc parameter
14935 (End_Statements): Add Is_Sloc parameterr
14936
14937 2011-08-02 Vincent Celier <celier@adacore.com>
14938
14939 * ug_words: Add VMS qualifier equivalent to -gnateP:
14940 /SYMBOL_PREPROCESSING.
14941
14942 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14943
14944 * gnat-style.texi: For hexadecimal numeric literals the typical
14945 grouping of digits is 4 to represent 2 bytes.
14946 A procedure spec which is split into several lines is indented two
14947 characters.
14948
14949 2011-08-02 Yannick Moy <moy@adacore.com>
14950
14951 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14952 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14953 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14954 properly qualified
14955 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14956 choice in array aggregate
14957 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14958 mark as ancestor
14959 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14960 positional and named aggregate for record, or others in record
14961 aggregate, or multiple choice in record aggregate
14962 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14963 array operands to logical operations AND, OR and XOR do not have the
14964 same static lower and higher bounds
14965 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14966
14967 2011-08-01 Robert Dewar <dewar@adacore.com>
14968
14969 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14970 Replaces Last_Source_Node_In_Sequence.
14971 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14972 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14973 parens and blank in string (this was inconsistently implemented).
14974 * errout.ads
14975 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14976 blank in string (this was inconsistently implemented).
14977 * gnat1drv.adb
14978 (Set_Global_Switches): Set formal mode switches appropriately
14979 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14980 * par-prag.adb
14981 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14982 call Set_Error_Msg_Lang to set "spark" as language name.
14983 * par.adb: Remove unnecessary call to set formal language for errout
14984 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14985 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14986 name.
14987 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14988 calls to it, moved after resolution so that types are known
14989 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14990 result of concatenation is not of type String
14991 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14992 concatenation is not properly restricted
14993 * gnat_rm.texi: Add doc on pragma Spark_95.
14994 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14995 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14996 * gcc-interface/Make-lang.in: Update dependencies.
14997
14998 2011-08-01 Javier Miranda <miranda@adacore.com>
14999
15000 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
15001 condition that detects if the overridden operation must replace an
15002 existing entity.
15003
15004 2011-08-01 Javier Miranda <miranda@adacore.com>
15005
15006 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
15007 code declarations inserted by Insert_Actions in each alternative of the
15008 N_Case_Expression node.
15009
15010 2011-08-01 Robert Dewar <dewar@adacore.com>
15011
15012 * sem_ch6.adb: Minor code reorganization.
15013 * sem_util.adb: Minor reformatting.
15014
15015 2011-08-01 Pascal Obry <obry@adacore.com>
15016
15017 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
15018 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
15019
15020 2011-08-01 Yannick Moy <moy@adacore.com>
15021
15022 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
15023 literal or operator symbol which is prefixed
15024 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15025 mode on access attributes.
15026 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15027 that concatenation operands are properly restricted in formal mode
15028 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15029 Analyze_Concatenation_Operand. Issue an error in formal mode if the
15030 result of the concatenation has a type different from String.
15031 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15032 Analyze_Quantified_Expression, Analyze_Slice,
15033 Analyze_Null): issue an error in formal mode on unsupported constructs
15034 * sem_ch5.adb
15035 (Analyze_Block_Statement): only issue error on source block statement
15036 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
15037 function which returns the last node in a list of nodes for which
15038 Comes_From_Source returns True, if any
15039 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
15040 Last_Source_Node_In_Sequence
15041 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
15042 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
15043 mode on unsupported constructs
15044 * sem_ch9.adb Do not return after issuing error in formal mode, as the
15045 rest of the actions may be needed later on since the error is marked as
15046 not serious.
15047 * sinfo.ads: Typos in comments.
15048
15049 2011-08-01 Pascal Obry <obry@adacore.com>
15050
15051 * projects.texi: Minor editing.
15052
15053 2011-08-01 Yannick Moy <moy@adacore.com>
15054
15055 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
15056 insertion character ~~
15057 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
15058 (Set_Error_Msg_Lang): new procedure which fixes the language for use
15059 with insertion character ~~
15060 (Set_Msg_Text): treat insertion character ~~
15061 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
15062 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
15063 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
15064 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
15065 errors related to the formal language restriction not serious
15066 (insertion character |).
15067 * par.adb (Par): set formal language for error messages if needed
15068 * sem_ch6.adb (Check_Missing_Return): take into account possible
15069 generated statements at the end of the function
15070 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
15071 enumeration value to define a new pragma SPARK_95
15072 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
15073 SPARK_Version): new type and variables to store the SPARK version
15074 (none by default).
15075 (SPARK_Mode): return True when SPARK_Version is set
15076 * par-prag.adb: Correct indentation
15077 (Prag): take Pragma_SPARK_95 into account
15078 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
15079 into account.
15080
15081 2011-08-01 Robert Dewar <dewar@adacore.com>
15082
15083 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
15084 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
15085 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
15086
15087 2011-08-01 Pascal Obry <obry@adacore.com>
15088
15089 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
15090 Target_Name to Get_Path call.
15091 (Parse_Single_Project): Likewise.
15092 (Post_Parse_Context_Clause): Likewise.
15093 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
15094 Call Initialise_Project_Path with the proper Target_Name.
15095 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
15096 search path.
15097 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
15098 with the proper Target_Name.
15099 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
15100 Part.Parse routine.
15101 (Parse_Project_And_Apply_Config): Likewise.
15102 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
15103 This is fine as this part of the code is supporting only native
15104 compilation.
15105 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
15106 is fine as this part of the code is supporting only native compilation.
15107
15108 2011-08-01 Yannick Moy <moy@adacore.com>
15109
15110 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
15111 of homonym, unless the homonym is one of the cases allowed in SPARK
15112 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
15113 package declaration occurring after a body.
15114
15115 2011-08-01 Robert Dewar <dewar@adacore.com>
15116
15117 * checks.adb, exp_ch4.adb: Minor reformatting.
15118
15119 2011-08-01 Javier Miranda <miranda@adacore.com>
15120
15121 * einfo.ads (Access_Disp_Table): Fix documentation.
15122 (Dispatch_Table_Wrappers): Fix documentation.
15123
15124 2011-08-01 Pascal Obry <obry@adacore.com>
15125
15126 * prj-env.adb, prj-env.ads: Minor reformatting.
15127
15128 2011-08-01 Yannick Moy <moy@adacore.com>
15129
15130 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
15131 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15132 procedures out of these packages.
15133 * errout.ads, errout.adb
15134 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15135 procedures in of this package
15136 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
15137 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
15138 on misplaced later vs initial declarations, like in Ada 83
15139 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
15140 formal mode on attribute of private type whose full type declaration
15141 is not visible
15142 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
15143 package declaration inside a package specification
15144 (Analyze_Full_Type_Declaration): issue error in formal mode on
15145 controlled type or discriminant type
15146 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
15147 user-defined operator means that it should come from the source
15148 (New_Overloaded_Entity): issue error in formal mode on overloaded
15149 entity.
15150 * sem_ch6.ads, sem_ch13.ads: typos in comments.
15151
15152 2011-08-01 Thomas Quinot <quinot@adacore.com>
15153
15154 * atree.adb: Minor reformatting.
15155 * checks.adb: Minor reformatting.
15156
15157 2011-08-01 Vincent Celier <celier@adacore.com>
15158
15159 * s-parame-vms-ia64.ads: Fix typo in comment
15160 Minor reformatting
15161 * s-parame-vms-restrict.ads: Removed, unused.
15162
15163 2011-08-01 Javier Miranda <miranda@adacore.com>
15164
15165 * exp_ch3.adb
15166 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
15167 * sem_ch3.adb
15168 (Constrain_Index): Remove side effects in the evaluation of the bounds.
15169 * sem_ch3.ads, sem_ch3.adb
15170 (Is_Constant_Bound): New extended version of the subprogram that was
15171 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
15172 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
15173 * sem_aux.ads (Constant_Value): Fix typo in comment.
15174 * checks.adb (Generate_Index_Checks): New implementation which, for
15175 array objects with constant bounds, generates the runtime check
15176 referencing the bounds of the array type. For other cases this routine
15177 provides its previous behavior obtaining such values from the array
15178 object.
15179 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
15180 parent type.
15181 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
15182 we cannot have semantic interpretations of the new node.
15183
15184 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15185
15186 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
15187 expressions.
15188
15189 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15190
15191 * sem_ch8.adb: Minor code editing.
15192 * s-vxwext.adb: Remove trailing space.
15193 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
15194 consistency with other files.
15195
15196 2011-08-01 Thomas Quinot <quinot@adacore.com>
15197
15198 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
15199
15200 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15201
15202 * par-ch10.adb: reject parameterized expressions as compilation unit.
15203 * sem_ch4.adb: handle properly conditional expression with overloaded
15204 then_clause and no else_clause.
15205
15206 2011-08-01 Tristan Gingold <gingold@adacore.com>
15207
15208 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
15209 like done by System.Aux_DEC.
15210 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
15211
15212 2011-08-01 Yannick Moy <moy@adacore.com>
15213
15214 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
15215 missing label at end of declaration (subprogram or package)
15216 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
15217 of positional and named parameter association
15218 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
15219 Error_Msg_SP which adds a prefix to the error message giving the name
15220 of the formal language analyzed
15221 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
15222 access result type in subprogram, unconstrained array as result type,.
15223 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
15224 procedure
15225 * sem_ch8.adb: Code clean up.
15226
15227 2011-08-01 Javier Miranda <miranda@adacore.com>
15228
15229 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
15230 * einfo.ads (Access_Disp_Table): Fix documentation.
15231 (Dispatch_Table_Wrappers): Fix documentation.
15232 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
15233 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
15234 to enforce the documentation of this attribute.
15235 (Set_Is_Interface): Cleanup the assertion.
15236 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
15237 the Underlying_Type entity before reading attribute Access_Disp_Table.
15238 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
15239 Locate the Underlying_Type before reading attribute Access_Disp_Table.
15240 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
15241 the Underlying_Type entity before reading attribute Access_Disp_Table.
15242 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
15243 Locate the Underlying_Type entity before reading attribute
15244 Access_Disp_Table.
15245
15246 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15247
15248 * s-poosiz.ads: Additional overriding indicators.
15249
15250 2011-08-01 Yannick Moy <moy@adacore.com>
15251
15252 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
15253 formal mode.
15254 (Analyze_Iteration_Scheme): issue error in formal mode when loop
15255 parameter specification does not include a subtype mark.
15256 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
15257 formal mode on abstract subprogram.
15258 (Analyze_Subprogram_Specification): issue error in formal mode on
15259 user-defined operator.
15260 (Process_Formals): issue error in formal mode on access parameter and
15261 default expression.
15262 * sem_ch9.adb (Analyze_Abort_Statement,
15263 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
15264 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
15265 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
15266 Analyze_Requeue, Analyze_Selective_Accept,
15267 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
15268 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
15269 issue error in formal mode on user-defined raise statement.
15270
15271 2011-08-01 Thomas Quinot <quinot@adacore.com>
15272
15273 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
15274 declaration being hidden when overriding an implicit inherited
15275 subprogram.
15276 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
15277 (-gnats), do not complain about a source file that contains only a
15278 pragma No_Body.
15279
15280 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15281
15282 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
15283 variable if already set.
15284
15285 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15286
15287 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
15288 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
15289 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
15290 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
15291 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
15292 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
15293 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
15294 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
15295 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
15296 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
15297 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
15298 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
15299 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
15300 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
15301 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
15302 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
15303 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
15304 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
15305 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
15306 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
15307 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
15308 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
15309 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
15310 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
15311 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
15312 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
15313 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
15314 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
15315 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
15316 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
15317 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
15318 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
15319 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
15320 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
15321 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
15322 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
15323 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
15324 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
15325 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
15326 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
15327 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
15328 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
15329 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
15330 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
15331 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
15332 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
15333 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
15334 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
15335 s-osinte-mingw.ads: Update to GPLv3 run-time license.
15336 Use GNAT instead of GNARL.
15337
15338 2011-08-01 Bob Duff <duff@adacore.com>
15339
15340 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
15341 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
15342 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
15343 reformatting.
15344
15345 2011-08-01 Yannick Moy <moy@adacore.com>
15346
15347 * debug.adb (d.D) reverve flag for the SPARK mode
15348 (d.E) reverve flag for SPARK generation mode
15349 (d.F) reverve flag for Why generation mode
15350 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
15351 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
15352 functions which return True when the corresponding modes are set
15353 (Formal_Language): return "spark" or "alfa" when in formal verification
15354 mode.
15355 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
15356 Error_Msg to prefix the error message with a tag giving the formal
15357 language
15358 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
15359 message with a tag giving the formal language
15360 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
15361 block statement
15362 (Analyze_Case_Statement): issue error in formal mode on case statement
15363 with a single "others" case alternative
15364 (Analyze_Exit_Statement): issue errors in formal mode on exit
15365 statements which do not respect SPARK restrictions
15366 (Analyze_Goto_Statement): issue error in formal mode on goto statement
15367 (Check_Unreachable_Code): always issue an error (not a warning) in
15368 formal mode on unreachable code (concerns both code after an infinite
15369 loop and after an unconditional jump, both not allowed in SPARK)
15370 * sem_ch6.adb (Analyze_Return_Statement): add call to
15371 Set_Return_Present for a procedure containing a return statement
15372 (already done for functions in Analyze_Function_Return)
15373 (Analyze_Function_Return): issue error in formal mode on extended
15374 return or if return is not last statement in function
15375 (Check_Missing_Return): issue error in formal mode if function does
15376 not end with return or if procedure contains a return
15377 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
15378 function to detect if there is an inner scope of its parameter S which
15379 is a loop.
15380
15381 2011-08-01 Thomas Quinot <quinot@adacore.com>
15382
15383 * sem_ch6.ads: Minor reformatting.
15384
15385 2011-08-01 Javier Miranda <miranda@adacore.com>
15386
15387 * sem_util.adb (Abstract_Interface_List): Complete condition when
15388 processing private type declarations to avoid reading unavailable
15389 attribute.
15390 (Is_Synchronized_Tagged_Type): Complete condition when processing
15391 private extension declaration nodes to avoid reading unavailable
15392 attribute.
15393
15394 2011-08-01 Thomas Quinot <quinot@adacore.com>
15395
15396 * sem_ch3.adb: Minor reformatting.
15397
15398 2011-08-01 Thomas Quinot <quinot@adacore.com>
15399
15400 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
15401 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
15402 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
15403 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
15404 for VMS, instead parametrize the common implementation with
15405 System.Parameters declarations.
15406
15407 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
15408
15409 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
15410
15411 2011-08-01 Tristan Gingold <gingold@adacore.com>
15412
15413 * seh_init.c: Fix SEH handler installation on win64.
15414
15415 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15416
15417 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
15418 double analysis of an anonymous access to subprogram, because it can
15419 lead to improper sharing of profiles and a back-end crash.
15420
15421 2011-08-01 Robert Dewar <dewar@adacore.com>
15422
15423 * make.adb, sem_ch4.adb: Minor reformatting.
15424 * gcc-interface/Make-lang.in: Update dependencies.
15425 * sem_util.adb, exp_ch5.adb: Minor reformatting.
15426
15427 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15428
15429 * gnat_rm.texi: Fix definition of Long_Integer.
15430
15431 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15432
15433 * exp_aggr.adb: check limit size of static aggregate unconditionally,
15434 to prevent storage exhaustion.
15435 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15436 finalized is a function body, insert the cleanup code before the final
15437 return statement, to prevent spurious warnings.
15438 * s-pooglo.ads: add overriding indicator.
15439
15440 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15441
15442 * sem_ch4.adb (Operator_Check): improve error message when both a
15443 with_clause and a use_clause are needed to make operator usage legal.
15444 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15445 determine whether a compilation unit is visible within an other,
15446 either through a with_clause in the current unit, or a with_clause in
15447 its library unit or one one of its parents.
15448
15449 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15450
15451 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15452 over an arbitrary expression of an array or container type.
15453 * lib-xref.adb: clarify comment.
15454
15455 2011-08-01 Bob Duff <duff@adacore.com>
15456
15457 * einfo.ads: Minor reformatting.
15458 * debug.adb: Minor comment improvement.
15459
15460 2011-08-01 Javier Miranda <miranda@adacore.com>
15461
15462 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15463 consider hidden subprograms as valid candidates.
15464
15465 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15466
15467 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15468
15469 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15470
15471 * gnat_ugn.texi: Fix typo.
15472
15473 2011-08-01 Robert Dewar <dewar@adacore.com>
15474
15475 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15476 lib-xref.adb: Minor reformatting
15477
15478 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15479
15480 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15481 when to generate a call to Move_Final_List.
15482 (Has_Controlled_Parts): Remove this function.
15483
15484 2011-08-01 Geert Bosch <bosch@adacore.com>
15485
15486 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15487 "," in choice list.
15488
15489 2011-08-01 Thomas Quinot <quinot@adacore.com>
15490
15491 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15492 explicit raise of a predefined exception as Comes_From_Source if the
15493 original N_Raise_Statement comes from source.
15494
15495 2011-08-01 Robert Dewar <dewar@adacore.com>
15496
15497 * sinfo.ads: Add comment.
15498 * sem_ch6.adb: Minor reformatting.
15499
15500 2011-08-01 Robert Dewar <dewar@adacore.com>
15501
15502 * freeze.adb (Freeze_Entity): Refine check for bad component size
15503 clause to avoid rejecting confirming clause when atomic/aliased present.
15504
15505 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15506
15507 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15508 better determine whether an entity reference is a write.
15509 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15510 subcomponent.
15511 * lib-xref.adb (Output_References): Do no suppress a read reference at
15512 the same location as an immediately preceeding modify-reference, to
15513 handle properly in-out actuals.
15514
15515 2011-08-01 Tristan Gingold <gingold@adacore.com>
15516
15517 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15518
15519 2011-08-01 Quentin Ochem <ochem@adacore.com>
15520
15521 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15522 heap to compute the result.
15523
15524 2011-08-01 Robert Dewar <dewar@adacore.com>
15525
15526 * atree.ads: Minor reformatting.
15527
15528 2011-08-01 Emmanuel Briot <briot@adacore.com>
15529
15530 * g-expect.adb (Get_Command_Output): Fix memory leak.
15531
15532 2011-08-01 Geert Bosch <bosch@adacore.com>
15533
15534 * cstand.adb (P_Float_Type): New procedure to print the definition of
15535 predefined fpt types.
15536 (P_Mixed_Name): New procedure to print a name using mixed case
15537 (Print_Standard): Use P_Float_Type for printing floating point types
15538 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15539 precision IEEE float.
15540
15541 2011-08-01 Thomas Quinot <quinot@adacore.com>
15542
15543 * sem_ch3.adb: Minor reformatting.
15544
15545 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15546
15547 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15548 the completion of a generic function, insert the new body rather than
15549 rewriting the original.
15550
15551 2011-08-01 Yannick Moy <moy@adacore.com>
15552
15553 * sinfo.ads, errout.ads: Typos in comments.
15554
15555 2011-08-01 Robert Dewar <dewar@adacore.com>
15556
15557 * par-endh.adb: Minor reformatting.
15558
15559 2011-08-01 Robert Dewar <dewar@adacore.com>
15560
15561 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15562 (Pre_Post_Aspects): New subtype.
15563 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15564 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15565 * par-ch7.adb (P_Package): Remove Decl parameter
15566 (P_Package): Handle new syntax for aspects (before IS)
15567 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15568 new aspect syntax
15569 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15570 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15571 (P_Package): Remove Decl parameter
15572 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15573 aspects
15574 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15575 specs
15576 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15577 * sinfo.ads: Document new syntax for aspects in packages etc.
15578 * sprint.adb: Handle new syntax of aspects before IS in package
15579
15580 2011-08-01 Thomas Quinot <quinot@adacore.com>
15581
15582 * atree.ads: Minor reformatting.
15583 * sem_prag.adb: Minor reformatting.
15584
15585 2011-08-01 Robert Dewar <dewar@adacore.com>
15586
15587 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15588 case expr alternative.
15589
15590 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15591
15592 * sem_ch12.adb: Fix typo.
15593
15594 2011-08-01 Geert Bosch <bosch@adacore.com>
15595
15596 * sem_prag.adb (Check_No_Link_Name): New procedure.
15597 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15598 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15599 instead of Standard_Long_Long_Float_Size global. Preparation for
15600 eventual removal of per type constants.
15601 * exp_util.ads (Get_Stream_Size): New function returning the stream
15602 size value of subtype E.
15603 * exp_util.adb (Get_Stream_Size): Implement new function.
15604 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15605 function.
15606 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15607 * einfo.adb:
15608 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15609
15610 2011-08-01 Geert Bosch <bosch@adacore.com>
15611
15612 * cstand.adb: Fix comments.
15613 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15614 count of arguments.
15615
15616 2011-08-01 Robert Dewar <dewar@adacore.com>
15617
15618 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15619
15620 2011-08-01 Geert Bosch <bosch@adacore.com>
15621
15622 * atree.ads: Fix comment.
15623
15624 2011-08-01 Robert Dewar <dewar@adacore.com>
15625
15626 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15627 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15628 * par.adb: Add with for Namet.Sp.
15629 * par-tchk.adb: Minor reformatting.
15630
15631 2011-08-01 Vincent Celier <celier@adacore.com>
15632
15633 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15634 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15635 of the init procedure of a SAL.
15636 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15637 New procedure.
15638
15639 2011-08-01 Thomas Quinot <quinot@adacore.com>
15640
15641 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15642 reformatting.
15643
15644 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15645
15646 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15647
15648 2011-08-01 Thomas Quinot <quinot@adacore.com>
15649
15650 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15651 conformant with its spec (return True only for types that have
15652 an overriding Initialize primitive operation that prevents them from
15653 having preelaborable initialization).
15654 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15655 initialization for controlled types in Ada 2005 or later mode.
15656
15657 2011-08-01 Robert Dewar <dewar@adacore.com>
15658
15659 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15660 Postcondition.
15661 (Same_Aspect): New function.
15662 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15663 Type_Invariant, Precondition, Postcondition.
15664 * snames.ads-tmpl: Add Name_Type_Invariant.
15665
15666 2011-08-01 Robert Dewar <dewar@adacore.com>
15667
15668 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15669 here.
15670 (Freeze_All_Ent): Fix error in handling inherited aspects.
15671 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15672 already analyzed, but don't skip entire processing of a declaration,
15673 that's wrong in some cases of declarations being rewritten.
15674 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15675 Don't delay for integer, string literals
15676 Treat predicates in usual manner for delay, remove special case code,
15677 not needed.
15678 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15679 (Build_Predicate_Function): Update saved expression in aspect
15680 (Build_Invariant_Procedure): Update saved expression in aspect
15681 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15682 of replacement of discriminant references if the reference is simple.
15683
15684 2011-08-01 Robert Dewar <dewar@adacore.com>
15685
15686 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15687 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15688 Static_Predicate and Dynamic_Predicate.
15689 (Build_Predicate_Function): Add processing for Static_Predicate
15690 and Dynamic_Predicate.
15691 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15692 (From_Static_Predicate): New flag
15693 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15694
15695 2011-08-01 Robert Dewar <dewar@adacore.com>
15696
15697 * usage.adb: Documentation cleanup for Ada version modes in usage.
15698 * expander.adb: Minor reformatting.
15699
15700 2011-08-01 Robert Dewar <dewar@adacore.com>
15701
15702 * atree.ads: Minor comment fix.
15703 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15704 a-witeio.ads, sem_prag.adb: Minor reformatting.
15705
15706 2011-08-01 Doug Rupp <rupp@adacore.com>
15707
15708 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15709 pointers. Use descrip.h header file for convenience. Add some
15710 comments.
15711
15712 2011-08-01 Robert Dewar <dewar@adacore.com>
15713
15714 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15715 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15716 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15717 New procedure.
15718 (Check_Aspect_At_End_Of_Declarations): New procedure
15719 (Analye_Aspect_Specification): Minor changes for above procedures
15720 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15721 specification node as well.
15722
15723 2011-08-01 Pascal Obry <obry@adacore.com>
15724
15725 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15726 Windows files. Use GetFilesAttributes() in this case to check for file
15727 existence instead of returning with an error code.
15728
15729 2011-08-01 Vincent Celier <celier@adacore.com>
15730
15731 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15732 High is above Source length.
15733
15734 2011-08-01 Robert Dewar <dewar@adacore.com>
15735
15736 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15737
15738 2011-08-01 Robert Dewar <dewar@adacore.com>
15739
15740 * aspects.ads (Boolean_Aspects): New subtype.
15741 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15742 for derived types in cases where the parent type and derived type have
15743 aspects.
15744 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15745 with aspects when parent type also has aspects.
15746 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15747 boolean expression at this point).
15748 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15749 accordance with final decision on the Ada 2012 feature.
15750 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15751
15752 2011-08-01 Matthew Heaney <heaney@adacore.com>
15753
15754 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15755
15756 2011-08-01 Pascal Obry <obry@adacore.com>
15757
15758 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15759 Fix Replace_Slice when High is above current string size.
15760 (Replace_Slice): Fix DL computation when High is above current
15761 string length.
15762
15763 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15764
15765 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15766
15767 2011-08-01 Matthew Heaney <heaney@adacore.com>
15768
15769 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15770 of node.
15771
15772 2011-08-01 Pascal Obry <obry@adacore.com>
15773
15774 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15775 reformatting.
15776
15777 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15778
15779 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15780 access to protected subprograms in generic bodies.
15781 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15782 protected type, indicate that the convention of the subprogram is
15783 Convention_Protected, because it may be used in subsequent declarations
15784 within the protected declaration.
15785
15786 2011-08-01 Vincent Celier <celier@adacore.com>
15787
15788 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15789 and "final" procedures when the name of the library is "ada", to avoid
15790 duplicate symbols "adainit" and "adafinal" in executables.
15791
15792 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15793
15794 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15795 quantified expression that appears within a postcondition and uses the
15796 Ada2012 'Result attribute.
15797
15798 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15799
15800 * init.c (__gnat_error_handler): Cast reason to int.
15801 (__gnat_install_handler): Explain sa_sigaction use.
15802
15803 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15804
15805 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15806 subprogram has copy-in copy-out parameters, try to promote the mode of
15807 the return type if it is passed in registers.
15808
15809 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15810
15811 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15812 left operand as addressable.
15813
15814 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15815
15816 * gcc-interface/gigi.h (build_function_stub): Remove.
15817 (build_return_expr): Likewise.
15818 (convert_vms_descriptor): Declare.
15819 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15820 (build_function_stub): Move to...
15821 * gcc-interface/utils2.c (build_return_expr): Move to...
15822 * gcc-interface/trans.c (build_function_stub): ...here.
15823 (build_return_expr): ...here.
15824 (Subprogram_Body_to_gnu): Add local variable for language_function.
15825 Disconnect the parameter attributes cache, if any, once done with it.
15826 Call end_subprog_body only after setting the end_locus.
15827 Build the stub associated with the function, if any, at the very end.
15828 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15829 variables and streamline control flow.
15830
15831 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15832
15833 PR ada/49819
15834 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15835 g-trasym-dwarf.adb.
15836
15837 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15838
15839 PR bootstrap/49794
15840 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15841 Assign to act.sa_sigaction.
15842 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15843 current->return_address to char * before arithmetic.
15844
15845 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15846
15847 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15848 Correct argument types.
15849 Extract code from reason.
15850 (__gnat_install_handler): Assign to act.sa_sigaction.
15851
15852 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15853
15854 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15855 (GNAT1_OBJS): ...here.
15856
15857 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15858
15859 PR ada/48711
15860 * g-socthi-mingw.adb (Fill): Fix formatting.
15861
15862 * gcc-interface/gigi.h: Move around comment.
15863
15864 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15865
15866 PR ada/46350
15867 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15868
15869 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15870
15871 PR ada/48711
15872 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15873
15874 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15875
15876 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15877 range comparison if Pmode is SImode.
15878
15879 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15880 Eric Botcazou <ebotcazou@adacore.com>
15881
15882 * adadecode.c: Wrap up in extern "C" block.
15883 * adadecode.h: Likewise.
15884 * adaint.c: Likewise. Remove 'const' keyword.
15885 * adaint.h: Likewise.
15886 * argv.c: Likewise.
15887 * atree.h: Likewise.
15888 * cio.c: Likewise.
15889 * cstreams.c: Likewise.
15890 * env.c: Likewise.
15891 * exit.c: Likewise.
15892 * fe.h: Likewise.
15893 * final.c: Likewise.
15894 * init.c: Likewise.
15895 * initialize.c: Likewise.
15896 * link.c: Likewise.
15897 * namet.h: Likewise.
15898 * nlists.h: Likewise.
15899 * raise.c: Likewise.
15900 * raise.h: Likewise.
15901 * repinfo.h: Likewise.
15902 * seh_init.c: Likewise.
15903 * targext.c: Likewise.
15904 * tracebak.c: Likewise.
15905 * uintp.h: Likewise.
15906 * urealp.h: Likewise.
15907 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15908 * xsinfo.adb: Likewise.
15909 * xsnamest.adb: Likewise.
15910 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15911 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15912 * gcc-interface/misc.c: Likewise.
15913 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15914 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15915 ada/targext.o here...
15916 (GNAT_ADA_OBJS): ...and not here.
15917 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15918 (GNATBIND_OBJS): Reorder.
15919
15920 2011-07-07 Richard Henderson <rth@redhat.com>
15921
15922 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15923 dwarf2out_frame_init.
15924
15925 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15926
15927 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15928
15929 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15930
15931 PR target/39150
15932 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15933
15934 2011-07-06 Richard Guenther <rguenther@suse.de>
15935
15936 * gcc-interface/misc.c (gnat_init): Merge calls to
15937 build_common_tree_nodes and build_common_tree_nodes_2.
15938 Re-initialize boolean_false_node.
15939
15940 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15941 Olivier Hainque <hainque@adacore.com>
15942 Nicolas Setton <setton@adacore.com>
15943
15944 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15945 the type according to the ARTIFICIAL_P parameter.
15946 (create_type_decl): Likewise.
15947 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15948
15949 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15950
15951 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15952 (gnatbind): Likewise.
15953
15954 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15955
15956 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15957
15958 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15959
15960 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15961 local variable throughout. Remove useless call to Base_Type.
15962 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15963 Take it also into account for the volatileness of the field. Set the
15964 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15965
15966 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15967
15968 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15969 on a dereference built for a by-ref object if it has an address clause.
15970
15971 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15972
15973 * einfo.ads (Address_Taken): Document use for the second argument of
15974 Asm_Input and Asm_Output attributes.
15975 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15976 argument is an entity name, then set Address_Taken on it.
15977 <Attribute_Asm_Output>: Likewise.
15978 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15979 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15980 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15981 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15982
15983 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15984
15985 PR middle-end/46500
15986 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15987
15988 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15989
15990 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15991 (ada/utils.o): Update dependencies.
15992 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15993 ../../../libcpp/libcpp.a.
15994 * gcc-interface/utils.c: Include common/common-target.h.
15995 (process_attributes): Use targetm_common.have_named_sections.
15996
15997 2011-06-07 Richard Guenther <rguenther@suse.de>
15998
15999 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
16000 set_sizetype.
16001
16002 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16003
16004 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
16005 TREE_THIS_NOTRAP flag.
16006
16007 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16008
16009 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
16010 Fix thinko.
16011
16012 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16013
16014 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
16015 constants whose full view has discriminants specially.
16016
16017 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16018
16019 * gcc-interface/utils.c: Include diagnostic.h.
16020 (gnat_write_global_declarations): Output debug information for all
16021 global type declarations before finalizing the compilation unit.
16022 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16023
16024 2011-05-25 Jakub Jelinek <jakub@redhat.com>
16025
16026 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16027
16028 2011-05-25 Kai Tietz <ktietz@redhat.com>
16029
16030 * adaint.c (__gnat_to_canonical_file_list_next): Use array
16031 initialization instead of const/none-const pointer assignment.
16032
16033 2011-05-24 Joseph Myers <joseph@codesourcery.com>
16034
16035 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16036 $(EXTRA_GNAT1_OBJS).
16037 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
16038 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
16039 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
16040 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
16041 libcommon-target.a instead of prefix.o.
16042
16043 2011-05-21 Joseph Myers <joseph@codesourcery.com>
16044
16045 PR ada/49097
16046 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
16047
16048 2011-05-20 Joseph Myers <joseph@codesourcery.com>
16049
16050 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
16051 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
16052 instead of version.o.
16053
16054 2011-05-18 Kai Tietz <ktietz@redhat.com>
16055
16056 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
16057 boolean_false_node instead of integer_zero_node.
16058 (convert_with_check): Likewise.
16059 * gcc-interface/decl.c (choices_to_gnu): Likewise.
16060
16061 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
16062
16063 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
16064 type of the parameter is an unconstrained array, convert the actual to
16065 the type of the formal in the In Out and Out cases as well.
16066
16067 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16068
16069 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
16070 call build_function_type_array or build_varargs_function_type_array
16071 instead.
16072 (create_subprog_type): Don't call build_function_type; call
16073 build_function_type_vec instead.
16074
16075 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16076
16077 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
16078 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
16079 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
16080
16081 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
16082
16083 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
16084
16085 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
16086 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
16087
16088 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16089
16090 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
16091
16092 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16093
16094 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
16095 instead of accessing TYPE_ARG_TYPES directly.
16096 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
16097
16098 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16099
16100 PR ada/48844
16101 * gcc-interface/gigi.h (get_variant_part): Declare.
16102 * gcc-interface/decl.c (get_variant_part): Make global.
16103 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
16104 types have the same constant size, are record types and T1 has a
16105 variant part while T2 doesn't.
16106
16107 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16108
16109 * gcc-interface/utils.c (begin_subprog_body): Do not call
16110 get_pending_sizes.
16111 (end_subprog_body): Likewise.
16112
16113 2011-05-04 Richard Guenther <rguenther@suse.de>
16114
16115 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
16116 int_const_binop.
16117 (pos_to_constructor): Likewise.
16118
16119 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
16120 Eric Botcazou <ebotcazou@adacore.com>
16121
16122 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
16123 of build_function_type. Adjust calls to...
16124 (build_raise_check): ...this. Do not take a void_tree parameter.
16125 Call build_function_type_list instead of build_function_type.
16126 Fix head comment and swap couple of conditional blocks.
16127
16128 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
16129
16130 * gnatvsn.ads (Library_Version): Bump to 4.7.
16131 (Current_Year): Bump to 2011.
16132
16133 2011-04-29 Michael Matz <matz@suse.de>
16134
16135 * gcc-interface/misc.c (gnat_handle_option): Set
16136 warn_maybe_uninitialized.
16137
16138 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
16139
16140 * gnat_ugn.texi (Complexity Metrics Control): Update link to
16141 the Watson/McCabe paper.
16142
16143 2011-04-23 Jim Meyering <meyering@redhat.com>
16144
16145 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
16146
16147 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16148
16149 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
16150 onto the new type.
16151
16152 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16153
16154 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
16155 parameter.
16156 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
16157 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
16158 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
16159 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
16160 <all>: Do not set flags on the reused DECL node coming from an alias.
16161 Set DECL_IGNORED_P on the DECL node built for subprograms if they
16162 don't need debug info here...
16163 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
16164 (gigi): Adjust calls to create_subprog_decl.
16165 (build_raise_check): Likewise.
16166 (establish_gnat_vms_condition_handler): Likewise.
16167 (Compilation_Unit_to_gnu): Likewise.
16168 (gnat_to_gnu): Likewise.
16169
16170 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
16171
16172 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
16173 (NO_REORDER_ADAFLAGS): New variable.
16174 (EXTRA_GNATTOOLS): Always define.
16175 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
16176 Clean up and adjust list of files compiled with special options.
16177 * gcc-interface/Make-lang.in: Likewise.
16178 (ada/decl.o): Cosmetical change.
16179 (ada/misc.o): Remove dependency on $(PLUGIN_H).
16180
16181 2011-04-20 Jim Meyering <meyering@redhat.com>
16182
16183 * initialize.c (__gnat_initialize): Remove useless if-before-free.
16184
16185 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16186
16187 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
16188 $(CFLAGS) on the link line.
16189
16190 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16191
16192 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
16193 padded type built for the return type if it is unconstrained.
16194
16195 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
16196
16197 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
16198
16199 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
16200
16201 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
16202 before calling TREE_CHAIN.
16203 * gcc-interface/misc.c (gnat_init_ts): New function.
16204 (LANG_HOOKS_INIT_TS): Define.
16205
16206 2011-04-12 Martin Jambor <mjambor@suse.cz>
16207
16208 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
16209 instead of cgraph_node.
16210
16211 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16212
16213 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
16214 alignment on fields of the RETURN type built for the Copy-In Copy-Out
16215 mechanism.
16216
16217 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16218
16219 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
16220 of aggregate types that contain a placeholder.
16221
16222 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
16223
16224 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
16225 TYPE_ARG_TYPES.
16226 (handle_type_generic_attribute): Likewise.
16227
16228 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
16229
16230 PR ada/47163
16231 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
16232
16233 2011-04-04 Kai Tietz <ktietz@redhat.com>
16234
16235 PR ada/47163
16236 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
16237 to flag value.
16238
16239 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16240
16241 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
16242 type case, do not strip a padding type around the array type.
16243
16244 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16245
16246 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
16247 types.
16248
16249 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16250
16251 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
16252 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
16253 code for -feliminate-unused-debug-types.
16254 (gnat_post_options): Likewise.
16255
16256 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16257
16258 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16259 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
16260 distinct copy.
16261
16262 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16263
16264 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
16265 DECL_ARTIFICIAL flag on enumeration types.
16266
16267 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16268
16269 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
16270 fat pointer types artificial unconditionally.
16271 <E_Array_Subtype>: Attach the base array type as a parallel type if it
16272 isn't artificial.
16273
16274 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16275
16276 * gcc-interface/gigi.h (get_dummy_type): Declare.
16277 (build_dummy_unc_pointer_types): Likewise.
16278 (finish_fat_pointer_type): Likewise.
16279 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
16280 fat pointer type has been built, complete it in place.
16281 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
16282 and thin pointers. Remove useless variable.
16283 (finish_fat_pointer_type): Make global and move to...
16284 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
16285 (get_dummy_type): New function.
16286 (build_dummy_unc_pointer_types): Likewise.
16287 (gnat_pushdecl): Propage the name to the anonymous variants only.
16288 (update_pointer_to): Only adjust the pointer types in the unconstrained
16289 array case.
16290
16291 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16292
16293 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
16294 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
16295 if this is a Taft amendment type and the full declaration is available.
16296 * gcc-interface/trans.c (process_type): Likewise.
16297 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
16298 (process_freeze_entity): Likewise.
16299 * gcc-interface/utils.c (dummy_global): New static variable.
16300 (gnat_write_global_declarations): If there are types declared as used
16301 at the global level, insert them in the global hash table.
16302
16303 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16304
16305 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
16306 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16307 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
16308 copy.
16309 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
16310 flag of the type accordingly.
16311 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
16312
16313 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16314
16315 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16316 finalizing types when updating the pointers to the designated type.
16317 <all>: Finalize the deferred types even if we didn't defer processing
16318 of incomplete types in this invocation.
16319
16320 2011-04-01 Olivier Hainque <hainque@adacore.com>
16321 Nicolas Setton <setton@adacore.com>
16322 Eric Botcazou <ebotcazou@adacore.com>
16323
16324 * gcc-interface/misc.c (gnat_descriptive_type): New function.
16325 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
16326
16327 2011-03-28 Kai Tietz <ktietz@redhat.com>
16328
16329 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
16330 Windows targets.
16331 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
16332 * system-mingw.ads (System): Change ZCX_By_Default default to True.
16333
16334 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
16335
16336 2011-03-28 Tristan Gingold <gingold@adacore.com>
16337
16338 PR ada/44431
16339 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
16340 Use ada output of gnatbind.
16341 (ada/b_gnatb.adb): Ditto.
16342 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
16343 (ada.mostlyclean, ada.stage1)
16344 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
16345 (ada.stagefeedback): Adjust.
16346 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
16347 Use ada output of gnatbind.
16348 (b_gnatm.adb): Ditto.
16349 (b_gnatl.o, b_gnatm.o): New rules.
16350
16351 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16352
16353 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16354 for the padded type built to support a specified size or alignment.
16355
16356 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16357
16358 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
16359 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16360 unconditionally to the end of the unit when the designated type is
16361 limited_with'ed.
16362 <all>: Rename local variable. Attempt to un-defer types only and do it
16363 for limited_with'ed types as well.
16364 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
16365 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
16366 consistently and remove redundant call to finalize_from_with_types.
16367
16368 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16369
16370 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
16371 subprograms without a previous spec declared in the same unit.
16372 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
16373 subprograms at the end of the unit instead of at the beginning.
16374 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
16375 isn't public for the special handling of non-inline functions nested
16376 inside inline external functions.
16377
16378 2011-03-25 Jeff Law <law@redhat.com>
16379
16380 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
16381
16382 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16383
16384 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
16385 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
16386 to compute Set_Size_Depends_On_Discriminant.
16387 (Layout_Type): Call it on array types in back-end layout mode.
16388 * sem_util.adb (Requires_Transient_Scope): Return true for array
16389 types only if the size depends on the value of discriminants.
16390 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
16391 type if the RHS is a call to a function that returns an unconstrained
16392 type with default discriminant.
16393
16394 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16395
16396 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
16397 non-conversion to the nominal result type at the end.
16398
16399 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16400
16401 * gcc-interface/trans.c (create_temporary): New function taken from...
16402 (create_init_temporary): ...here. Call it.
16403 (call_to_gnu): Create the temporary for the return value early, if any.
16404 Create it for a function with copy-in/copy-out parameters if there is
16405 no target; in other cases of copy-in/copy-out, use another temporary.
16406 Push the new binding level lazily. Add and rename local variables.
16407
16408 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16409
16410 * gcc-interface/decl.c (validate_size): Improve comments and tweak
16411 error message.
16412 (set_rm_size): Likewise.
16413
16414 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16415
16416 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16417 for the padded type built in order to support a specified alignment.
16418 Fix incorrect formatting.
16419
16420 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16421
16422 PR bootstrap/48216
16423 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16424
16425 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16426
16427 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16428 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16429 to the end of the list. Adjust recursive call. Rename local variable.
16430 If REORDER is true, reorder components of the record type.
16431 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16432 components_to_record and adjust the parameter list.
16433
16434 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16435
16436 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16437 disabled, use the variable for bounds of loop iteration scheme.
16438
16439 2011-03-21 Kai Tietz <ktietz@redhat.com>
16440
16441 PR target/12171
16442 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16443
16444 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16445
16446 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16447 out whether the expression is read-only. Short-circuit placeholder
16448 case and rename a couple of local variables.
16449
16450 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16451
16452 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16453 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16454 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16455 (convert): Deal with conversions from a smaller form type specially.
16456
16457 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
16458
16459 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16460 its argument, except for the special -I- switch.
16461
16462 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16463
16464 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16465 "Ada Issues".
16466
16467 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16468
16469 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16470
16471 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16472
16473 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16474 GNAT_FORMAL.
16475 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16476 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16477 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16478 Do not generate the check directly, instead instantiate the template
16479 check present in the descriptor.
16480 (make_descriptor_field): Move around.
16481 (build_vms_descriptor32): Build a template check in the POINTER field.
16482 (build_vms_descriptor): Remove useless suffixes.
16483 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16484
16485 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16486
16487 PR bootstrap/47467
16488 * targext.c: Include target files if IN_RTS is defined.
16489
16490 2011-01-26 Richard Guenther <rguenther@suse.de>
16491
16492 PR bootstrap/47467
16493 * targext.c: Include config.h.
16494 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16495 dependency.
16496
16497 2011-01-04 Pascal Obry <obry@adacore.com>
16498 Eric Botcazou <ebotcazou@adacore.com>
16499
16500 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16501
16502 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16503
16504 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16505 end-of-case on the end label and its associated gotos, if any.
16506
16507 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16508
16509 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16510 expressions of the parameter cache within the statement group of
16511 the CICO mechanism.
16512
16513 2011-01-04 Olivier Hainque <hainque@adacore.com>
16514 Eric Botcazou <ebotcazou@adacore.com>
16515
16516 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16517 (set_end_locus_from_node): New function.
16518 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16519 make and the function end_locus.
16520 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16521 for the elaboration subprogram.
16522 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16523 set the end_locus of the expression as well.
16524
16525 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16526
16527 PR ada/47131
16528 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16529 variables that are referenced in exception handlers volatile.
16530
16531
16532 \f
16533 Copyright (C) 2011 Free Software Foundation, Inc.
16534
16535 Copying and distribution of this file, with or without modification,
16536 are permitted in any medium without royalty provided the copyright
16537 notice and this notice are preserved.