re PR target/50678 (FAIL: c52104y on x86_64-apple-darwin10)
[gcc.git] / gcc / ada / ChangeLog
1 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
2 Eric Botcazou <ebotcazou@adacore.com>
3
4 PR target/50678
5 * init.c (Darwin/__gnat_error_handler): Apply a work-around to the
6 bug [filed as radar #10302855], which is inconsistent unwind data
7 for sigtramp.
8
9 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
10
11 PR ada/50842
12 * gcc-interface/Makefile.in (SYMDEPS): Delete.
13 (LIBICONV): New variable.
14 (LIBICONV_DEP): Likewise.
15 (LIBS): Add $(LIBICONV).
16 (LIBDEPS): Add $(LIBICONV_DEP).
17 (EXTRA_GNATTOOLS_OBJS): Merge into...
18 (TOOLS_LIBS): ...this. Add $(LIBICONV).
19
20 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
21
22 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
23 variable. Always create the elaboration variable, if any, as constant.
24
25 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
26
27 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
28 make a packable type for fields of union types as well.
29 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
30 (gnat_to_gnu_component_type): Try to make a packable type for fields
31 of union types as well.
32 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
33 (maybe_pad_type): Try to make a packable type for fields of union types
34 as well.
35 (gnat_to_gnu_field): Likewise.
36 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
37 (set_rm_size): Likewise.
38 (rm_size): Likewise.
39 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
40 * gcc-interface/trans.c (add_decl_expr): Likewise.
41 * gcc-interface/utils.c (finish_record_type): Likewise.
42 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
43
44 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
45
46 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
47 declared as atomic. Move around conditionally executed code.
48
49 2011-10-24 Robert Dewar <dewar@adacore.com>
50
51 * sem.adb (Initialize): Fix bug that blew up if called a second
52 time.
53
54 2011-10-24 Robert Dewar <dewar@adacore.com>
55
56 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
57 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
58
59 2011-10-24 Robert Dewar <dewar@adacore.com>
60
61 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
62 name in error msg.
63
64 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
65
66 * gnat_rm.texi Add an entry for restriction No_Finalization.
67
68 2011-10-24 Ed Schonberg <schonberg@adacore.com>
69
70 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
71 current instance is within the one that contains the generic,
72 the freeze node for the current one must appear in the current
73 declarative part. Ditto if the current instance is within another
74 package instance. In both of these cases the freeze node of the
75 previous instance is not relevant.
76
77 2011-10-24 Gary Dismukes <dismukes@adacore.com>
78
79 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
80 of AAMP-specific switches -univ and -aamp_target.
81
82 2011-10-24 Robert Dewar <dewar@adacore.com>
83
84 * a-tienau.adb (Put): Deal properly with limited line length.
85
86 2011-10-24 Robert Dewar <dewar@adacore.com>
87
88 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
89
90 2011-10-24 Tristan Gingold <gingold@adacore.com>
91
92 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
93 on AIX.
94
95 2011-10-24 Ed Schonberg <schonberg@adacore.com>
96
97 * sem_ch12.adb (Earlier): make available globally. If both
98 nodes have the same sloc, the freeze node that does not come
99 from source is the later one.
100 (True_Parent): Make available globally.
101 (Previous_Instance): Subsidiary of
102 Insert_Freeze_Node_For_Instance, to check whether the generic
103 parent of the current instance is declared within a previous
104 instance in the same unit or declarative part, in which case the
105 freeze nodes of both instances must appear in order to prevent
106 elaboration problems in gigi.
107 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
108 freeze point, and the freeze node of a preceding instantiation
109 must be inserted before it.
110
111 2011-10-24 Robert Dewar <dewar@adacore.com>
112
113 * checks.ads, checks.adb: Add handling of Synchronization_Check
114 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
115 atomic sync).
116 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
117 flag Minor code reorganization.
118 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
119 * par-prag.adb: Add dummy entries for pragma
120 Disable/Enable_Atomic_Synchronization.
121 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
122 case of Atomic_Synchronization specially (not suppressed
123 by All_Checks, cannot be set from Source).
124 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
125 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
126 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
127 entry for pragma Disable/Enable_Atomic_Synchronization
128 * switch-c.adb: The -gnatp switch does not disable
129 Atomic_Synchronization Add -gnatep switch to disable
130 Atomic_Synchronization.
131 * types.ads: Add entry for Synchronization_Check
132 * usage.adb: Add line for -gnated switch
133 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
134
135 2011-10-24 Geert Bosch <bosch@adacore.com>
136
137 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix
138 bounds start at Integer'First.
139
140 2011-10-24 Robert Dewar <dewar@adacore.com>
141
142 * sem_ch12.adb, s-gearop.adb: Minor reformatting
143
144 2011-10-24 Robert Dewar <dewar@adacore.com>
145
146 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings
147 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings
148
149 2011-10-24 Emmanuel Briot <briot@adacore.com>
150
151 * prj-proc.adb (Process_Expression_Variable_Decl): No special
152 handling for Project_Path unless it is an attribute.
153
154 2011-10-24 Javier Miranda <miranda@adacore.com>
155
156 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
157 (Install_Hidden_Primitives): New subprogram.
158 (Restore_Hidden_Primitives): New subprogram.
159 (Analyze_Formal_Package_Declaration,
160 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
161 Invoke Check_Hidden_Primitives after every call to
162 Analyze_Associations, and invoke Restore_Hidden_Primitives to
163 restore their visibility after processing the instantiation.
164 (Instantiate_Package_Body): Install visible primitives before
165 analyzing the instantiation and uninstall them to restore their
166 visibility when the instantiation has been analyzed.
167 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
168 (Remove_Suffix): New subprogram
169 * sem_ch3.adb (Derive_Subprogram): When handling
170 a derived subprogram for the instantiation of a formal derived
171 tagged type, inherit the dispatching attributes from the actual
172 subprogram (not from the parent type).
173
174 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
175
176 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
177
178 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
179
180 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
181 update its uses.
182 (Build_Discriminant_Assignments): Add local variable D_Loc and update
183 its uses.
184 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
185 Var_Loc and update their uses.
186 (Build_Record_Init_Proc): Code reformatting.
187 (Increment_Counter): Add formal parameter Loc.
188 (Make_Counter): Add formal parameter Loc.
189
190 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
191
192 * sem_disp.adb (Covers_Some_Interface): Fix typo.
193
194 2011-10-24 Matthew Heaney <heaney@adacore.com>
195
196 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority):
197 Predicate had wrong sense.
198
199 2011-10-24 Yannick Moy <moy@adacore.com>
200
201 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
202 Translate arguments in positional notation into pragma argument
203 association arguments for the generated pragma.
204
205 2011-10-24 Arnaud Charlet <charlet@adacore.com>
206
207 * exp_ch5.adb: Fix minor typo.
208
209 2011-10-24 Ed Schonberg <schonberg@adacore.com>
210
211 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
212 the case of a component reference in an instance body, when the
213 enclosing type is private.
214
215 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
216
217 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
218 driver for getting the project support into gnatelim section.
219
220 2011-10-24 Robert Dewar <dewar@adacore.com>
221
222 * gnat_rm.texi: Minor correction to documentation on address
223 clause.
224
225 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
226
227 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
228 (Attach_Unprotected): New routine.
229 (Delete_Finalize_Address): Removed.
230 (Delete_Finalize_Address_Unprotected): New routine.
231 (Detach): Synchronize and call the unprotected version.
232 (Detach_Unprotected): Remove locking.
233 (Finalize): Add various comment on synchronization. Lock the critical
234 region and call the unprotected versions of routines.
235 (Finalize_Address): Removed.
236 (Finalize_Address_Unprotected): New routine.
237 (Set_Finalize_Address): Synchronize and call
238 the unprotected version.
239 (Set_Finalize_Address_Unprotected): New routine.
240 (Set_Heterogeneous_Finalize_Address): Removed.
241 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
242 (Set_Is_Heterogeneous): Add comment on synchronization and
243 locking.
244 * s-finmas.ads: Flag Finalization_Started is no longer atomic
245 because synchronization uses task locking / unlocking.
246 (Attach): Add comment on usage.
247 (Attach_Unprotected): New routine.
248 (Delete_Finalize_Address): Renamed to
249 Delete_Finalize_Address_Unprotected.
250 (Detach): Add comment on usage.
251 (Detach_Unprotected): New routine.
252 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
253 (Set_Finalize_Address): Add comment on usage.
254 (Set_Finalize_Address_Unprotected): New routine.
255 (Set_Heterogeneous_Finalize_Address): Renamed to
256 Set_Heterogeneous_Finalize_Address_Unprotected.
257 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
258 Allocation_Locked. Add various comments on synchronization. Lock
259 the critical region and call the unprotected version of
260 routines.
261 (Deallocate_Any_Controlled): Add various comments on
262 synchronization. Lock the critical region and call the unprotected
263 version of routines.
264
265 2011-10-24 Ed Schonberg <schonberg@adacore.com>
266
267 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
268 are universal and must carry the corresponding type.
269 * sem_eval.adb (Check_Non_Static_Context): If the type of the
270 expression is universal real, as may be the case for a fixed point
271 expression with constant operands in the context of a conversion,
272 there is nothing to check.
273 * s-finmas.adb: Minor reformatting
274
275 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
276
277 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
278
279 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
280
281 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
282 TRACE): Reintroduce.
283 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
284 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
285
286 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
287
288 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
289 (unchecked_conversion_nop): Use it.
290 (gnat_to_gnu): Likewise.
291
292 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
293
294 * back_end.adb (Call_Back_End): Pass the maximum logical line number
295 instead of the maximum physical line number to gigi.
296 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
297
298 2011-10-16 Tom Tromey <tromey@redhat.com>
299 Dodji Seketeli <dodji@redhat.com>
300
301 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the
302 new public ordinary map interface.
303
304 2011-10-16 Tristan Gingold <gingold@adacore.com>
305
306 * link.c (_AIX): Add support for GNU ld.
307
308 2011-10-16 Fedor Rybin <frybin@adacore.com>
309
310 * gnat_ugn.texi: Fixing gnattest example names in the doc.
311 Adding explanation to additional tests usage.
312
313 2011-10-16 Robert Dewar <dewar@adacore.com>
314
315 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
316
317 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
318
319 * a-convec.adb: Fix minor inconsistencies.
320
321 2011-10-16 Matthew Heaney <heaney@adacore.com>
322
323 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
324 Implementation): Specify pragma Implementation_Defined.
325
326 2011-10-15 Nicolas Roche <roche@adacore.com>
327
328 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
329 either rtp-smp or ravenscar-cert-rtp runtimes.
330
331 2011-10-15 Bob Duff <duff@adacore.com>
332
333 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
334 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
335 is available.
336 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
337 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
338 available.
339 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
340 pool only if RE_Root_Storage_Pool_Ptr is available.
341 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
342 pool actual unless RE_Root_Storage_Pool_Ptr is available.
343 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
344 formal only if RE_Root_Storage_Pool_Ptr is available.
345
346 2011-10-15 Matthew Heaney <heaney@adacore.com>
347
348 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
349 type): Specify Priority aspect for protected type.
350
351 2011-10-14 Ed Schonberg <schonberg@adacore.com>
352
353 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
354 is a generic actual, it is a subtype of a type that was frozen
355 by the instantiation, and even if not marked frozen it does not
356 affect the construction of the dispatch table.
357
358 2011-10-14 Robert Dewar <dewar@adacore.com>
359
360 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
361 reformatting.
362 * s-rident.ads: Add missing Compiler_Unit pragma.
363
364 2011-10-14 Gary Dismukes <dismukes@adacore.com>
365
366 * sem_res.adb: Minor reformatting.
367
368 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
369
370 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
371 Code and comment reformatting. Use BIP_Task_Master
372 when creating a _master.
373 (BIP_Formal_Suffix): Code reformatting. Correct the case for
374 BIP_Task_Master.
375 (Make_Build_In_Place_Call_In_Object_Declaration): Use
376 BIP_Task_Master when creating a reference to the enclosing
377 function's _master formal.
378 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
379 to the _master.
380 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
381 (Needs_BIP_Finalization_Master): Alphabetized.
382 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
383 BIP_Task_Master.
384
385 2011-10-14 Ed Schonberg <schonberg@adacore.com>
386
387 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
388 reject an aliased keyword on the object declaration of an extended
389 return statement. In older versions of the language indicate
390 that this is illegal in the standard.
391
392 2011-10-14 Pascal Obry <obry@adacore.com>
393
394 * sem_util.adb, sem_ch4.adb: Minor reformatting.
395
396 2011-10-14 Ed Schonberg <schonberg@adacore.com>
397
398 * sem_ch13.adb: Recognize properly procedure calls that are
399 transformed into code statements.
400
401 2011-10-14 Vincent Celier <celier@adacore.com>
402
403 * projects.texi: Minor fix in project example.
404
405 2011-10-14 Ed Schonberg <schonberg@adacore.com>
406
407 * sem_util.adb: Return objects are aliased if their type is
408 immutably limited as per AI05-0053.
409
410 2011-10-14 Gary Dismukes <dismukes@adacore.com>
411
412 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
413 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
414 Short_Circuit_And_Or expansion code (moved to sem_res).
415 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
416 "and" and "or" operators as short-circuit "and then" and "or
417 else", when pragma Short_Circuit_And_Or is active.
418
419 2011-10-13 Robert Dewar <dewar@adacore.com>
420
421 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
422 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
423
424 2011-10-13 Arnaud Charlet <charlet@adacore.com>
425
426 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
427
428 2011-10-13 Jerome Guitton <guitton@adacore.com>
429
430 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
431
432 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
433
434 * a-convec.ads (Cursor): Minor reformatting.
435 * a-convec.adb (Next): Fix minor inconsistencies.
436 (Previous): Likewise.
437
438 2011-10-13 Ed Schonberg <schonberg@adacore.com>
439
440 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
441 New predicate to determine whether some operations on an array
442 type are available when the full view of its component may differ
443 from the view of the point of the array declaration.
444 * sem_ch4.adb (Find_Equality_Types): Use
445 Available_Full_View_Of_Component.
446 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
447
448 2011-10-13 Ed Schonberg <schonberg@adacore.com>
449
450 * sem_ch9.adb: Analyze aspects while discriminants of protected
451 type are visible.
452
453 2011-10-13 Geert Bosch <bosch@adacore.com>
454
455 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
456 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
457 longer depend on an external library.
458 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
459 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
460 Update dependencies.
461 * gcc-interface/Make-lang.in: Update dependencies.
462
463 2011-10-13 Cyrille Comar <comar@adacore.com>
464
465 * gnat_ugn.texi: Minor editing.
466
467 2011-10-13 Vincent Celier <celier@adacore.com>
468
469 * projects.texi: Add documentation on packages and attributes
470 that are inherited from a project being extended into the
471 extended project.
472
473 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
474
475 * exp_ch3.adb (Build_Master): Rewritten.
476 (Expand_N_Full_Type_Declaration): Reformat the declarative
477 region. Update the call to Build_Master_Renaming.
478 (Expand_Previous_Access_Type): Rewritten.
479 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
480 Add local constant Result_Subt and update related usage.
481 (Expand_N_Extended_Return_Statement): Add local constant
482 Result_Subt and update related usage.
483 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
484 new context detection mechanism.
485 (Build_Class_Wide_Master):
486 Use Insert_Action to add the renaming into the tree.
487 (Build_Master_Entity): Rewritten to use the new context detection
488 mechanism.
489 (Build_Master_Renaming): Add formal parameter Ins_Nod
490 and related usage. Use Insert_Action to add the renaming into the
491 tree.
492 (Find_Enclosing_Context): New subsidiary routine. Rather
493 than relying on enclosing scopes, this routine looks at the
494 tree structure to figure out the proper context for a _master
495 or a _chain. This approach eliminates the issues with transient
496 scopes which have not been converted into blocks.
497 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
498 to better reflect the new usage. Update the related comment.
499 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
500 the comment on usage.
501 * sem_ch3.adb (Access_Definition): Update the calls to
502 Build_Master_Entity and Build_Master_Renaming.
503 * sem_ch6.adb (Create_Extra_Formals): Add local variable
504 Full_Subt. Code reformatting.
505 * sem_util.adb (Is_Iterator): Alphabetized.
506 (Is_LHS): Alphabetized.
507 (Is_Limited_Class_Wide_Type): New routine.
508 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
509
510 2011-10-13 Geert Bosch <bosch@adacore.com>
511
512 * a-ngrear.adb (Solve): Make generic and move to
513 System.Generic_Array_Operations.
514 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
515 New generic solvers to compute a vector resp. matrix Y such
516 that A * Y = X, approximately.
517 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
518 Implement using Forward_Eliminate and Back_Substitute
519 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
520 on BLAS and LAPACK.
521 * a-ngcoar.ads ("abs"): Fix return type to be real.
522
523 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
524
525 PR ada/50589
526 * s-linux-alpha.ads: Do not "with" Interfaces.C.
527 * s-linux-sparc.ads: Likewise.
528
529 2011-10-13 Geert Bosch <bosch@adacore.com>
530
531 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
532 returning a Real.
533 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
534 and use formal.
535 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
536 new profile.
537
538 2011-10-13 Geert Bosch <bosch@adacore.com>
539
540 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
541 move to System.Generic_Array_Operations.
542
543 2011-10-13 Geert Bosch <bosch@adacore.com>
544
545 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
546 * s-gearop.ads (L2_Norm): Change profile to be suitable for
547 Complex_Vector
548 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
549 not inner product
550
551 2011-10-13 Robert Dewar <dewar@adacore.com>
552
553 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
554 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
555 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
556 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
557 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
558 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
559
560 2011-10-13 Geert Bosch <bosch@adacore.com>
561
562 * s-gearop.adb: Minor comment additions.
563
564 2011-10-13 Fedor Rybin <frybin@adacore.com>
565
566 * gnat_ugn.texi: Add gnattest section.
567
568 2011-10-13 Ed Schonberg <schonberg@adacore.com>
569
570 * freeze.adb: Do not create body of renaming if declaration has
571 errors.
572
573 2011-10-13 Olivier Hainque <hainque@adacore.com>
574
575 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
576 further, to the ppc+kernel case only.
577
578 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
579
580 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
581 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
582 Do not create a pool formal on .NET/JVM.
583 (Expand_N_Extended_Return_Statement): Alphabetize local
584 variables. Do not create a renaming of the build-in-place pool
585 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
586 Add the user-defined pool only on non-VM targets.
587 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
588 local variables. Do not add a pool actual on .NET/JVM.
589 * sem_ch6.adb: Add with and use clause for Targparm.
590 (Create_Extra_Formals): Add build-in-place pool formal only on
591 non-VM targets.
592 * rtsfind.ads: Alphabetize entries.
593
594 2011-10-13 Sergey Rybin <rybin@adacore.com>
595
596 * gnat_ugn.texi: Minor correction.
597
598 2011-10-13 Ed Schonberg <schonberg@adacore.com>
599
600 * sem_ch8.adb: Minor error message improvement.
601
602 2011-10-13 Robert Dewar <dewar@adacore.com>
603
604 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
605
606 2011-10-13 Gary Dismukes <dismukes@adacore.com>
607
608 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
609 of a for loop for an enumeration type with an enumeration rep
610 clause, which involves moving the original loop parameter into
611 a nested block, the loop parameter's entity must be removed from
612 the entity list of the loop scope.
613
614 2011-10-13 Bob Duff <duff@adacore.com>
615
616 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
617 that gets passed in the same cases where BIP_Alloc_Form is passed
618 (caller-unknown-size results). BIP_Storage_Pool is used when
619 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
620 to the user-defined storage pool is passed at the call site,
621 and this pool is used in callee to allocate the result.
622 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
623 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
624 the additional BIP_Storage_Pool actual.
625 (Expand_N_Extended_Return_Statement): Allocate the function
626 result using the user-defined storage pool, if BIP_Alloc_Form =
627 User_Storage_Pool.
628 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
629 * exp_ch4.adb: Don't overwrite storage pool set by
630 Expand_N_Extended_Return_Statement.
631 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
632 for use in build-in-place function calls within allocators
633 where the access type has a user-defined storage pool.
634
635 2011-10-13 Sergey Rybin <rybin@adacore.com>
636
637 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
638 literal casing.
639
640 2011-10-13 Nicolas Roche <roche@adacore.com>
641
642 * gnatlink.adb: Ensure that -mrtp is passed when
643 runtime name ends with 'rtp'.
644
645 2011-10-13 Ed Schonberg <schonberg@adacore.com>
646
647 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
648 unchecked union type can be limited.
649
650 2011-10-13 Olivier Hainque <hainque@adacore.com>
651
652 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
653 the use of the signal trampoline for PPC in the sjlj case as well.
654 Add legitimate casts, preventing compile time warnings on the
655 (sighandler *) profile.
656
657 2011-10-13 Yannick Moy <moy@adacore.com>
658
659 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
660 analysis in Alfa mode.
661
662 2011-10-13 Ed Schonberg <schonberg@adacore.com>
663
664 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
665 expressions are legal limited return values if each one of their
666 dependent expressions are legal.
667
668 2011-10-13 Ed Schonberg <schonberg@adacore.com>
669
670 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
671 if the prefix of the call is a qualified expression, rewrite as
672 a code statement.
673 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
674 code statement is legal if it is a rewriting of a procedure call.
675
676 2011-10-13 Ed Schonberg <schonberg@adacore.com>
677
678 * exp_aggr.adb (Flatten): If a component association has a box,
679 assume that aggregate is not static.
680 (Safe_Aggregate): If a component association in a non-limited
681 aggregate has a box, assume that it cannot be expanded in place.
682
683 2011-10-13 Vincent Celier <celier@adacore.com>
684
685 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
686 Process_Project_Tree_Phase_1 with Packages_To_Check.
687 (Process_Project_And_Apply_Config): Ditto
688 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
689 Remove default for argument Packages_To_Check.
690 * prj-proc.adb (Recursive_Process): New argument
691 Packages_To_Check.
692 (Process): Ditto.
693 (Process_Project_Tree_Phase_1): Ditto.
694 (Recursive_Project.Process_Aggregated_Projects): Call
695 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
696 Packages_To_Check.
697 * prj-proc.ads (Process): New argument Packages_To_Check
698 (Process_Project_Tree_Phase_1): Ditto
699
700 2011-10-13 Arnaud Charlet <charlet@adacore.com>
701
702 * gcc-interface/Makefile.in: Fix typo.
703
704 2011-10-13 Ed Schonberg <schonberg@adacore.com>
705
706 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
707 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
708 Use sloc of defining identifier of farmal type declaration,
709 as sloc of generated internal entity, to prevent misplaced
710 references in ali.
711
712 2011-10-13 Ed Schonberg <schonberg@adacore.com>
713
714 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
715 is fully defined before checking that it is a numeric type.
716
717 2011-10-13 Ed Schonberg <schonberg@adacore.com>
718
719 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
720 association for component X has a box, then X is covered in the
721 aggregate even if there is not default value for X in the type
722 declaration, and X has to be default-initialized.
723
724 2011-10-13 Ed Schonberg <schonberg@adacore.com>
725
726 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
727 'Value): Mark literals as referenced only if reference is in
728 current source unit.
729
730 2011-10-13 Matthew Heaney <heaney@adacore.com>
731
732 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
733
734 2011-10-13 Olivier Hainque <hainque@adacore.com>
735
736 * sigtramp.h: New file. Prototype and spec of the signal
737 trampoline to be called by an established handler to provide
738 dwarf call frame info before the real signal processing code.
739 * sigtramp-ppcvxw.c: New file. Implementation of the signal
740 trampoline for ppc-vxworks.
741 * init.c (vxworks section): Use it for ppc.
742
743 2011-10-13 Thomas Quinot <quinot@adacore.com>
744
745 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
746 (Check_Future_Identifier): New subprogram,
747 factors duplicated code from Par.Ch2.P_Identifier and
748 Par.Ch3.P_Defining_Identifier.
749
750 2011-10-13 Thomas Quinot <quinot@adacore.com>
751
752 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
753 if we fail to initialize CV attributes or CV.
754
755 2011-10-13 Thomas Quinot <quinot@adacore.com>
756
757 * s-tasren.adb (Timed_Selective_Wait, case
758 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
759 we know abortion is already deferred.
760
761 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
762
763 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
764 (Build_Master_Renaming (function)): Removed.
765 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
766 (Expand_Full_Type_Declaration): Alphabetize
767 variables. Reformatting of code and comments. Rewrite the
768 section on processing of anonymous access-to-task types in
769 record components.
770 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
771 (Build_Master_Renaming): Moved to exp_ch9.
772 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
773 (Build_Master_Entity): Add formal parameter
774 Use_Current. Reformatting of code and comments.
775 (Build_Master_Renaming): Moved from exp_ch3.
776 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
777 exp_ch3. Update comment on usage.
778 (Build_Master_Entity):
779 Add formal parameter Use_Current. Update comment on usage.
780 (Build_Master_Renaming): Moved from exp_ch3.
781 * sem_ch3.adb (Access_Definition): Remove redundant code to
782 create a _master and a renaming.
783
784 2011-10-13 Ed Schonberg <schonberg@adacore.com>
785
786 * lib-xref.adb: Do no emit reference to overridden operation,
787 if it is internally generated.
788
789 2011-10-13 Vincent Celier <celier@adacore.com>
790
791 * bindgen.adb: Remove any processing related to g-trasym
792 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
793 * mlib-prj.adb: Remove any processing related to g-trasym.
794
795 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
796
797 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
798 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
799 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
800 (ADA_FLAGS_TO_PASS): Likewise.
801 (COMMON_FLAGS_TO_PASS): New.
802 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
803 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
804 (gnatlib): Use COMMON_FLAGS_TO_PASS.
805 (ada.install-common): Likewise.
806 (install-gnatlib): Likewise.
807 (install-gnatlib-obj): Likewise.
808 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
809 (gnat-cross): Delete.
810 (gnatboot): Likewise.
811 (gnatboot2): Likewise.
812 (gnatboot3): Likewise.
813 (gnatstage1): Likewise.
814 (gnatstage2): Likewise.
815 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
816 (MOST_ADAFLAGS): Likewise.
817 (LOOSE_CFLAGS): Likewise.
818 (gnat-cross): Likewise.
819 (GNATLIBFLAGS): Add -W -Wall.
820 (GNATLIBCFLAGS_FOR_C): Likewise.
821 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
822 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
823
824 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
825
826 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
827 (push_range_check_info): Likewise.
828 (gnat_to_gnu) <N_Code_Statement>: Likewise.
829 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
830 (gnat_invariant_expr): Likewise.
831 * gcc-interface/utils.c (compute_related_constant): Likewise.
832 (max_size): Fix handling of SAVE_EXPR.
833 (remove_conversions): Fix formatting.
834
835 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
836
837 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
838 (DECL_INDUCTION_VAR): New macro.
839 (SET_DECL_INDUCTION_VAR): Likewise.
840 * gcc-interface/gigi.h (convert_to_index_type): Declare.
841 (gnat_invariant_expr): Likewise.
842 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
843 parameter, set DECL_LOOP_PARM_P on it.
844 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
845 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
846 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
847 (struct range_check_info_d): New type.
848 (struct loop_info_d): Likewise.
849 (gnu_loop_stack): New stack.
850 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
851 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
852 is set, do not test DECL_RENAMED_OBJECT.
853 (push_range_check_info): New function.
854 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
855 the label. Reference the label and the iteration variable from it.
856 Build the special induction variable in the unsigned version of the
857 size type, if it is larger than the base type. And attach it to the
858 iteration variable if the latter isn't by-ref. In the iteration scheme
859 case, initialize the invariant conditions in front of the loop if
860 deemed profitable. Use gnu_loop_stack.
861 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
862 <N_Raise_Constraint_Error>: Always process the reason. In the range
863 check and related cases, and if loop unswitching is enabled, compute
864 invariant conditions and push this information onto the stack.
865 Do not translate again the condition if it has been already translated.
866 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
867 DECL_LOOP_PARM_P isn't set.
868 (convert_to_index_type): New function.
869 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
870 to convert the index from the base index type to sizetype.
871 (gnat_invariant_expr): New function.
872
873 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
874
875 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
876 two parallel arrays to hold standard builtin declarations, and
877 replace it with a function based interface that can support
878 creating builtins on the fly in the future.
879 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
880 (gnat_to_gnu): Ditto.
881
882 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
883
884 PR lto/50492
885 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
886 * gcc-interface/utils.c (global_context): New variable.
887 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
888 that are either public external or at top level. Use "No" macro.
889 (end_subprog_body): Call decl_function_context.
890 (rest_of_subprog_body_compilation): Likewise.
891
892 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
893
894 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
895 (rest_of_subprog_body_compilation): Likewise.
896 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
897 test for useless conversions by means of gnat_useless_type_conversion.
898 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
899 (language_function): Add named_ret_val and other_ret_val.
900 (f_named_ret_val): New macro.
901 (f_other_ret_val): Likewise.
902 (gigi): Call rest_of_subprog_body_compilation.
903 (struct nrv_data): New structure.
904 (is_nrv_p): New predicate.
905 (prune_nrv_r): New helper function.
906 (prune_nrv_in_block): New function.
907 (finalize_nrv_r): New helper function.
908 (finalize_nrv): New function.
909 (return_value_ok_for_nrv_p): New predicate.
910 (build_return_expr): If optimization is enabled, record candidates for
911 the Named Return Value optimization.
912 (build_function_stub): Call rest_of_subprog_body_compilation.
913 (Subprogram_Body_to_gnu): If optimization is enabled and there are
914 candidates, finalize the Named Return Value optimization.
915 Call rest_of_subprog_body_compilation.
916 (call_to_gnu): At the end, if a return value is needed, simplify the
917 result before wrapping it up in a COMPOUND_EXPR.
918 * gcc-interface/utils.c (end_subprog_body): Split into...
919 (rest_of_subprog_body_compilation): ...this. New function.
920 (gnat_useless_type_conversion): Likewise.
921
922 2011-10-06 Thomas Quinot <quinot@adacore.com>
923
924 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
925 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
926 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
927 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
928 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
929 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
930 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
931 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
932
933 2011-10-06 Ed Schonberg <schonberg@adacore.com>
934
935 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
936 references.
937
938 2011-10-06 Matthew Heaney <heaney@adacore.com>
939
940 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
941 (Dequeue_Only_High_Priority): Protected procedure now implemented.
942
943 2011-10-06 Vincent Celier <celier@adacore.com>
944
945 * g-trasym.adb: Replace old implementation with the default
946 implementation that returns list of addresses as "0x...".
947 * g-trasym.ads: Update the list of platforms with the full
948 capability. Indicate that there is a default implementation
949 for other platforms.
950 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
951 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
952 is now a default implementation for all platforms without the full
953 capability.
954
955 2011-10-06 Robert Dewar <dewar@adacore.com>
956
957 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
958 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
959 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
960 reorganization (use conditional expressions).
961
962 2011-10-06 Robert Dewar <dewar@adacore.com>
963
964 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
965 floating divide by zero.
966
967 2011-10-06 Ed Schonberg <schonberg@adacore.com>
968
969 * sem_ch6.adb: Limited interfaces that are not immutably limited
970 are OK in return statements.
971
972 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
973
974 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
975 change to powerpc section.
976
977 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
978
979 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
980 across the port.
981
982 2011-09-27 Ed Schonberg <schonberg@adacore.com>
983
984 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
985 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
986 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
987 indefinite sets.
988 * a-coorma.ads: Minor reformmating.
989 * einfo.ads: Improve the comment describing the
990 Directly_Designated_Type function.
991 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
992 ordered maps.
993 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
994 dependencies.
995
996 2011-09-27 Robert Dewar <dewar@adacore.com>
997
998 * a-comutr.ads: Minor reformatting.
999
1000 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1001
1002 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1003 iterators to multiway trees.
1004
1005 2011-09-27 Yannick Moy <moy@adacore.com>
1006
1007 * debug.adb (d.D): New option for strict Alfa mode.
1008 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1009 permissions as strictly as possible.
1010 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1011 Alfa mode, now, interpret ranges of base types like GNAT does; in
1012 strict mode, simply change the range of the implicit base Itype.
1013 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1014
1015 2011-09-27 Robert Dewar <dewar@adacore.com>
1016
1017 * exp_ch9.adb: Minor comment fixes.
1018
1019 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1020
1021 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1022 trees.
1023
1024 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1025
1026 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1027 instead of Directly_Designated_Type in the indirect array case.
1028
1029 2011-09-27 Robert Dewar <dewar@adacore.com>
1030
1031 * exp_util.adb, exp_aggr.adb: Minor reformatting.
1032
1033 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1034
1035 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1036 on subtype declarations.
1037 * exp_aggr.adb: Minor comment update.
1038
1039 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1040
1041 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1042 test in the N_Explicit_Dereference case. Fold double logical
1043 negation in the special loop case and conditionalize it on
1044 Variable_Ref being true.
1045
1046 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1047
1048 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1049 single protected object and the selector is a discriminant or an
1050 entry family, this is a non-overloaded candidate interpretation,
1051 and possible primitive operations of the type must not be
1052 examined.
1053
1054 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1055
1056 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1057
1058 2011-09-27 Pascal Obry <obry@adacore.com>
1059
1060 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1061 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1062 Add dummy definitions for pthread_rwlock_t
1063 and pthread_rwlockattr_t on all POSIX platforms.
1064 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1065 reference.
1066 (Finalize_Lock): Likewise.
1067 (Write_Lock): Likewise.
1068 (Unlock): Likewise.
1069
1070 2011-09-27 Tristan Gingold <gingold@adacore.com>
1071
1072 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1073 windows 64.
1074
1075 2011-09-27 Pascal Obry <obry@adacore.com>
1076
1077 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1078 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1079 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1080 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1081 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1082 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1083 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1084 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1085 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1086 s-taprop-posix.adb: Revert previous changes.
1087 (Lock): Now a record containing the two possible lock
1088 (mutex and read/write) defined in OS_Interface.
1089 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1090 'R' locking policy.
1091 (Initialize_Protection): Likewise.
1092 (Lock): Likewise.
1093 (Lock_Read_Only): Likewise.
1094 (Unlock): Likewise.
1095
1096 2011-09-27 Pascal Obry <obry@adacore.com>
1097
1098 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1099 OS_Interface.pthread_rwlock_t.
1100
1101 2011-09-27 Robert Dewar <dewar@adacore.com>
1102
1103 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1104 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1105 sem_ch5.adb, sem_util.adb: Minor reformatting.
1106
1107 2011-09-27 Pascal Obry <obry@adacore.com>
1108
1109 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1110 (Finalize_Lock)[RW_Lock]: Likewise.
1111 (Write_Lock)[RW_Lock]: Likewise.
1112 (Unlock)[RW_Lock]: Likewise.
1113 (Read_Lock): Define L as RW_Lock (instead of Lock).
1114 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1115 routine for r/w lock.
1116 (Finalize_Lock)[RW_Lock]: Likewise.
1117 (Write_Lock)[RW_Lock]: Likewise.
1118 (Unlock)[RW_Lock]: Likewise.
1119 (Read_Lock): Define L as RW_Lock (instead of Lock).
1120
1121 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1122 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1123 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1124 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1125 routine for standard lock.
1126 (Finalize_Lock)[RW_Lock]: Likewise.
1127 (Write_Lock)[RW_Lock]: Likewise.
1128 (Unlock)[RW_Lock]: Likewise.
1129 (Read_Lock): Define L as RW_Lock (instead of Lock).
1130 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1131 in the record definition.
1132 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1133 lock for 'R' locking policy.
1134 (Initialize_Protection): Likewise.
1135 (Lock): Likewise.
1136 (Lock_Read_Only): Likewise.
1137 (Unlock): Likewise.
1138 * s-taspri-posix.ads (RW_Lock): New type defined as
1139 OS_Interface.pthread_rwlock_t.
1140
1141 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1142 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1143 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1144 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1145
1146 2011-09-27 Pascal Obry <obry@adacore.com>
1147
1148 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1149
1150 2011-09-27 Pascal Obry <obry@adacore.com>
1151
1152 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1153 s-osinte-hpux.ads, s-osinte-irix.ads,
1154 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1155 pthread_mutex_t.
1156 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1157 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1158 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1159 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1160 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1161 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1162
1163 2011-09-27 Pascal Obry <obry@adacore.com>
1164
1165 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1166 (RE_Id): Add RE_Lock_Read_Only.
1167 (RE_Unit_Table): Likewise.
1168 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1169 to lift restriction on first character. Handle now the
1170 Name_Concurrent_Readers_Locking where policy character is set to
1171 'R'.
1172 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1173 constant.
1174 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1175 read only lock for function in protected object.
1176 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1177 this routine is now used.
1178
1179 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1180
1181 * s-atocou-x86.adb (Decrement): Use %;.
1182 (Increment): Likewise.
1183
1184 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1185
1186 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1187 dereference of the pointer to the storage area. Remove useless type
1188 conversions and factor out common code.
1189
1190 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1191
1192 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1193 variable and use it throughout.
1194 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1195 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1196 first step. Also convert to the unpadded type as a last step.
1197
1198 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1199
1200 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1201 DECL_CHAIN in comment.
1202 * gcc-interface/trans.c (gigi): Likewise.
1203 (Attribute_to_gnu): Likewise.
1204 (build_function_stub): Likewise.
1205 (gnat_to_gnu): Likewise.
1206 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1207 (convert_vms_descriptor64): Likewise.
1208 (convert_vms_descriptor32): Likewise.
1209
1210 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1211
1212 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1213 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1214 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1215 the type of the record is TYPE_READONLY.
1216
1217 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1218 Robert Dewar <dewar@adacore.com>
1219
1220 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1221 OUT formal parameter which is of an null-exclusion access subtype.
1222
1223 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1224
1225 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1226 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1227 (gnat_to_gnu_param): Likewise.
1228 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1229 maybe_unconstrained_array instead of doing the work manually.
1230 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1231 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1232 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1233 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1234 (gnat_stabilize_reference): Likewise.
1235
1236 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1237
1238 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1239 (SET_TYPE_NULL_BOUNDS): Likewise.
1240 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1241 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1242 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1243 pointer types.
1244 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1245 check that the initializer is a valid constant expression for use in
1246 initializing a static variable. Add missing guard.
1247 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1248 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1249 pointer for the bounds.
1250 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1251 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1252
1253 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1254
1255 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1256 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1257 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1258 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1259 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1260 to the indirect case.
1261 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1262 the TREE_THIS_NOTRAP flag.
1263
1264 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1265
1266 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1267 iteration scheme, always generate the do-while form if optimization
1268 is enabled. Use more straightforward test at the end.
1269
1270 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1271
1272 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1273 XNEW instead of xmalloc. Do not build useless pointer type.
1274 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1275 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1276 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1277
1278 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1279
1280 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1281 the alignment if this doesn't prevent BLKmode access to the object.
1282
1283 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1284
1285 * gcc-interface/Makefile.in (darwin): Do not issue the
1286 '-flat_namespace' linker flag during Ada build.
1287 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1288 default shared library options.
1289
1290 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1291
1292 * gcc-interface/decl.c (annotate_value): Look up expression for
1293 insertion in the cache at the end.
1294
1295 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1296
1297 * gcc-interface/Make-lang.in: Update dependencies.
1298
1299 2011-09-19 Steve Baird <baird@adacore.com>
1300
1301 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1302 configuration pragma names so that Is_Configuration_Pragma_Name
1303 will return True for Name_Annotate. Make corresponding change in
1304 Pragma_Id enumeration type. This is needed to allow an Annotate
1305 pragma to occur in a configuration pragma file (typically,
1306 a gnat.adc file).
1307 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1308 * gnat_rm.texi: Note that pragma Annotate may be used as a
1309 configuration pragma.
1310
1311 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1312
1313 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1314 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1315
1316 2011-09-19 Yannick Moy <moy@adacore.com>
1317
1318 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1319 for expansion of set membership.
1320 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1321 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1322 visible for use in Alfa expansion.
1323 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1324 variable in Alfa mode.
1325
1326 2011-09-19 Thomas Quinot <quinot@adacore.com>
1327
1328 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1329
1330 2011-09-19 Thomas Quinot <quinot@adacore.com>
1331
1332 * exp_ch9.adb: Minor reformatting.
1333
1334 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1335
1336 * freeze.adb (Build_Renamed_Body): Generic subprograms
1337 instantiations cannot be poperly inlined by the compiler, do
1338 not set the Body_To_Inline attribute in such cases.
1339 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1340 inlining-related flags from the generic subprogram declaration.
1341
1342 2011-09-19 Thomas Quinot <quinot@adacore.com>
1343
1344 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1345 (Build_Stub_Type): Remove, instead copy components from
1346 System.Partition_Interface.RACW_Stub_Type.
1347 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1348 (Copy_Component_List): New subprogram.
1349
1350 2011-09-19 Yannick Moy <moy@adacore.com>
1351
1352 * lib-xref.adb (Generate_Reference): Ignore references to
1353 constants in Standard.
1354
1355 2011-09-19 Robert Dewar <dewar@adacore.com>
1356
1357 * err_vars.ads, errout.ads: Minor reformatting.
1358
1359 2011-09-19 Robert Dewar <dewar@adacore.com>
1360
1361 * aspects.ads (Impl_Defined_Aspects): New array
1362 * lib-writ.adb (No_Dependences): New name for No_Dependence
1363 * restrict.adb (No_Dependences): New name for No_Dependence
1364 (Check_Restriction_No_Specification_Of_Aspect): New
1365 procedure.
1366 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1367 (Restricted_Profile_Result): New variable
1368 (No_Specification_Of_Aspects): New variable
1369 (No_Specification_Of_Aspect_Warning): New variable
1370 * restrict.ads (No_Dependences): New name for No_Dependence
1371 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1372 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1373 * s-rident.ads: Add restriction
1374 No_Implementation_Aspect_Specifications, this is also added to
1375 the No_Implementation_Extensions profile.
1376 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1377 No_Implementation_Defined_Aspects
1378 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1379 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1380 No_Implementation_Aspects
1381 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1382 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1383
1384 2011-09-19 Yannick Moy <moy@adacore.com>
1385
1386 * lib-xref.adb (Generate_Reference): Take into account multiple
1387 renamings for Alfa refs.
1388
1389 2011-09-19 Thomas Quinot <quinot@adacore.com>
1390
1391 * g-socthi-mingw.adb: Minor reformatting.
1392
1393 2011-09-19 Yannick Moy <moy@adacore.com>
1394
1395 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1396 expansion to False in mode Alfa
1397
1398 2011-09-19 Pascal Obry <obry@adacore.com>
1399
1400 * mingw32.h: Remove obsolete code needed for old versions
1401 of MingW.
1402
1403 2011-09-19 Robert Dewar <dewar@adacore.com>
1404
1405 * errout.ads: Minor reformatting.
1406
1407 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1408
1409 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1410 function is transformed into a declaration and a body, insert
1411 body at the end of the declarative part, to prevent premature
1412 freeze actions, and preserve original specification in the
1413 subprogram declaration.
1414
1415 2011-09-19 Vincent Celier <celier@adacore.com>
1416
1417 * projects.texi: Minor editing.
1418
1419 2011-09-19 Robert Dewar <dewar@adacore.com>
1420
1421 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1422 exp_aggr.adb: Minor reformatting.
1423
1424 2011-09-19 Yannick Moy <moy@adacore.com>
1425
1426 * lib-xref.adb (Generate_Reference): Change entity referenced
1427 to underlying object if any, or else reference to the HEAP.
1428
1429 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1430
1431 * gcc-interface/Make-lang.in: Update dependencies.
1432
1433 2011-09-15 Robert Dewar <dewar@adacore.com>
1434
1435 * tree_io.ads: Minor reformatting.
1436 * a-intnam.ads: Fix bad header.
1437
1438 2011-09-15 Thomas Quinot <quinot@adacore.com>
1439
1440 * a-exexpr-gcc.adb: Minor reformatting.
1441
1442 2011-09-15 Yannick Moy <moy@adacore.com>
1443
1444 * sem_ch6.adb: Propagate information that an expression function comes
1445 from source (otherwise references to this entity are not stored).
1446
1447 2011-09-15 Robert Dewar <dewar@adacore.com>
1448
1449 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1450 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1451 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1452
1453 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1454
1455 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1456 if the expression function is not a completion, create a
1457 new specification for the generated declaration, and keep the
1458 original specification in the generated body. Shorter code also
1459 ensures that proper warnings are generated for unused formals
1460 in all cases.
1461
1462 2011-09-15 Sergey Rybin <rybin@adacore.com>
1463
1464 * tree_io.ads: Update ASIS_Version_Number because of the changes
1465 in the tree structures for expression functions.
1466
1467 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1468
1469 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1470 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1471 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1472 (CLOCK_REALTIME): Fix wrong value on some OSes.
1473 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1474
1475 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1476
1477 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1478 to unconstrained array case, deal with each branch of a COND_EXPR.
1479 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1480 a COND_EXPR in the initializer, if present.
1481
1482 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1483
1484 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1485 of an addressable type.
1486 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1487 Deal with those cases for which creating a temporary is mandatory.
1488
1489 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1490
1491 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1492 this is a real formal parameter before testing whether it is by ref.
1493
1494 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1495
1496 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1497 (build_call_1_expr): Likewise.
1498 (build_call_2_expr): Likewise.
1499 (build_call_n_expr): New prototype.
1500 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1501 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1502 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1503 (Exception_Handler_to_gnu_zcx): Likewise.
1504 (gnat_to_gnu): Likewise.
1505 (build_binary_op_trapv): Likewise.
1506 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1507 (build_call_1_expr): Likewise.
1508 (build_call_2_expr): Likewise.
1509 (build_call_n_expr): New function.
1510 (build_call_raise): Use build_call_n_expr.
1511 (build_call_raise_range): Likewise.
1512 (build_call_raise_column): Likewise.
1513 (build_call_alloc_dealloc_proc): Likewise.
1514 (maybe_wrap_malloc): Likewise.
1515 (maybe_wrap_free): Likewise.
1516
1517 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1518
1519 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1520 MODIFY_EXPR.
1521 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1522 the result type is null if ENABLE_CHECKING. Set operation_type at the
1523 end unconditionally if not set in the previous cases.
1524 Use build2 and void_type_node for MODIFY_EXPR.
1525 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1526
1527 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1528
1529 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1530 precision when converting to or from an integral type whose precision
1531 is not equal to its size.
1532
1533 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1534
1535 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1536
1537 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1538
1539 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1540 implementation.
1541 * system-darwin-ppc64.ads: New file.
1542
1543 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1544
1545 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1546 reference to "-lm".
1547
1548 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1549
1550 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1551 size switches to the link phase for shared libs.
1552
1553 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1554
1555 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1556 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1557
1558 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1559
1560 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1561 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1562 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1563 New targets.
1564 (TOOLS_FLAGS_TO_PASS): New.
1565 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1566
1567 2011-09-06 Robert Dewar <dewar@adacore.com>
1568
1569 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1570 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1571
1572 2011-09-06 Robert Dewar <dewar@adacore.com>
1573
1574 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1575 * s-rident.ads: New restriction No_Implementation_Units
1576 (this restriction is also part of the profile
1577 No_Implementation_Extensions)
1578 * sem_ch10.adb (Analyze_With_Clause): Add check for
1579 No_Implementation_Units restriction.
1580
1581 2011-09-06 Jerome Guitton <guitton@adacore.com>
1582
1583 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1584 on vThreads.
1585
1586 2011-09-06 Thomas Quinot <quinot@adacore.com>
1587
1588 * s-solita.adb: Minor reformatting.
1589
1590 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1591
1592 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1593 is a rewriting of an expression function does not freeze previous
1594 entities.
1595
1596 2011-09-06 Robert Dewar <dewar@adacore.com>
1597
1598 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1599
1600 2011-09-06 Tristan Gingold <gingold@adacore.com>
1601
1602 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1603 powerpc-wrs-vxworksae.
1604
1605 2011-09-06 Thomas Quinot <quinot@adacore.com>
1606
1607 * s-os_lib.ads (Spawn): Minor documentation clarification,
1608 Success is True for a zero exit status.
1609
1610 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1611
1612 * sem_ch5.adb: Add message for common iterator error.
1613
1614 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1615
1616 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1617 selected component discriminated by a current instance, replace
1618 the constraint with a reference to the target object, regardless
1619 of whether the context is an init_proc.
1620
1621 2011-09-06 Robert Dewar <dewar@adacore.com>
1622
1623 * exp_attr.adb: Descriptor_Size is never static.
1624
1625 2011-09-06 Robert Dewar <dewar@adacore.com>
1626
1627 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1628
1629 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1630
1631 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1632 non-static.
1633
1634 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1635
1636 * sem_res.adb (Resolve): An expression that is the body of an
1637 expression function does not freeze.
1638
1639 2011-09-06 Matthew Heaney <heaney@adacore.com>
1640
1641 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1642 a-cuprqu.adb: Changed copyright notice to indicate current
1643 year only.
1644
1645 2011-09-06 Vincent Celier <celier@adacore.com>
1646
1647 * prj.adb: Minor spelling error fix in comment
1648 * sem_res.adb: Minor reformatting
1649
1650 2011-09-06 Pascal Obry <obry@adacore.com>
1651
1652 * sysdep.c (winflush_nt): Removed as not needed anymore.
1653 (winflush_95): Likewise.
1654 (winflush_init): Likewise.
1655 (winflush_function): Likewise.
1656 (getc_immediate_common): Remove call to winflush_function.
1657
1658 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1659
1660 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1661 processing for Descriptor_Size.
1662 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1663 to account for its broader usage.
1664 * sem_attr.adb (Analyze_Attribute): Change the error detection
1665 circuitry for Descriptor_Size as the attribute is now applicable
1666 to all types.
1667
1668 2011-09-06 Robert Dewar <dewar@adacore.com>
1669
1670 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1671
1672 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1673
1674 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1675 in a parameter association must not set the Referenced flag on
1676 the formal.
1677 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1678
1679 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1680
1681 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1682
1683 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1684
1685 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1686 gnatlink-re): Speed up by using -j0.
1687
1688 2011-09-06 Yannick Moy <moy@adacore.com>
1689
1690 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1691 Set_Corresponding_Aspect when creating pragma from aspect.
1692 (Add_Predicates): Use new field Corresponding_Aspect.
1693 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1694 name when present, for the purpose of issuing error messages;
1695 remove local procedure Error_Pragma_Arg_Alternate_Name.
1696 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1697 N_Pragma node.
1698 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1699 N_Pragma node.
1700
1701 2011-09-06 Robert Dewar <dewar@adacore.com>
1702
1703 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1704
1705 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1706
1707 * exp_ch6.adb (Build_Heap_Allocator): Add new
1708 local variable Desig_Typ. Code and comment reformatting. Add
1709 machinery to ensure that the allocation uses a fat pointer when
1710 the type of the return object is a constrained array and the
1711 function return type is an unconstrained array.
1712
1713 2011-09-06 Vincent Celier <celier@adacore.com>
1714
1715 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1716 parameters in subprograms.
1717
1718 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1719
1720 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1721
1722 2011-09-06 Thomas Quinot <quinot@adacore.com>
1723
1724 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1725 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1726 subprogram.
1727 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1728 is null, destroy task specific data, to make API consistent with
1729 other platforms, and thus compatible with the shared version
1730 of s-tpoaal.adb.
1731 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1732 Document the above assumption.
1733
1734 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1735
1736 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1737 variable for type of return value when return type is
1738 unconstrained and context is an assignment.
1739
1740 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1741
1742 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1743 class-wide operation if expansion is not enabled.
1744
1745 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1746
1747 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1748 type prefix.
1749
1750 2011-09-06 Yannick Moy <moy@adacore.com>
1751
1752 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1753 Aspect_Invariant): Do not issue error at this point on illegal
1754 pragma placement, as this is checked later on when analyzing
1755 the corresponding pragma.
1756 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1757 similar to Error_Pragma_Arg, except the source name of the
1758 aspect/pragma to use in warnings may be equal to parameter
1759 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1760 message to distinguish source name of pragma/aspect, and whether
1761 the illegality resides in the type being public, or being private
1762 without a public declaration
1763
1764 2011-09-06 Thomas Quinot <quinot@adacore.com>
1765
1766 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1767 size check (fd_set is implemented differently on that platform).
1768
1769 2011-09-06 Thomas Quinot <quinot@adacore.com>
1770
1771 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1772 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1773 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1774 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1775 (ATCB_Allocation): New subpackage of
1776 System.Tasking.Primitive_Operations, shared across all targets
1777 with full tasking runtime.
1778 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1779 s-taprop bodies).
1780 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1781 taking care of establishing a local temporary ATCB if the one
1782 being deallocated is Self, to avoid a reference to the freed
1783 ATCB in Abort_Undefer.
1784
1785 2011-09-06 Thomas Quinot <quinot@adacore.com>
1786
1787 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1788 terminated, mark it for deallocation upon termination.
1789 (Terminate_Task): Call Free_Task again if the task is marked
1790 for automatic deallocation upon termination.
1791
1792 2011-09-06 Robert Dewar <dewar@adacore.com>
1793
1794 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1795 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1796 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1797 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1798 a-intnam-solaris.ads, a-intnam-tru64.ads,
1799 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1800 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1801 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1802 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1803 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1804 Add new profile No_Implementation_Extensions
1805 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1806 profile No_Implementation_Extensions
1807 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1808 Check violation of restriction No_Implementation_Identifiers
1809 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1810 Add entry for Name_No_Implementation_Extensions
1811
1812 2011-09-06 Robert Dewar <dewar@adacore.com>
1813
1814 * impunit.ads: Minor reformatting.
1815
1816 2011-09-06 Robert Dewar <dewar@adacore.com>
1817
1818 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1819
1820 2011-09-06 Pascal Obry <obry@adacore.com>
1821
1822 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1823 types.
1824
1825 2011-09-06 Robert Dewar <dewar@adacore.com>
1826
1827 * g-socket.adb: Minor reformatting
1828
1829 2011-09-06 Javier Miranda <miranda@adacore.com>
1830
1831 * ali.adb (Scan_ALI): Add missing support to load references of
1832 entities imported from other languages.
1833 * ali.ads (Xref_Record): Adding new fields to store the language and
1834 name of an imported entity.
1835 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1836 in comment.
1837
1838 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1839
1840 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1841 is allowed on a full type declaration if it is the completion of
1842 a private declarations.
1843 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1844 aspect is allowed on a full type declaration in the private part
1845 of a package.
1846
1847 2011-09-06 Robert Dewar <dewar@adacore.com>
1848
1849 * sem_ch8.ads: Minor reformatting
1850
1851 2011-09-06 Thomas Quinot <quinot@adacore.com>
1852
1853 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1854 Guard against socket values that are not in [0;FD_SETSIZE[
1855
1856 2011-09-06 Robert Dewar <dewar@adacore.com>
1857
1858 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1859 reformatting.
1860
1861 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1862
1863 * s-linux-alpha.ads: Minor reformatting
1864 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1865 Use sizeof instead of corresponding C defines in s-oscons template.
1866
1867 2011-09-06 Vadim Godunko <godunko@adacore.com>
1868
1869 * a-convec.ads, a-iteint.ads: Minor reformatting.
1870
1871 2011-09-06 Vincent Celier <celier@adacore.com>
1872
1873 * projects.texi: Add menus and @node lines.
1874
1875 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1876
1877 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1878 where the return type is an unconstrained array and the context
1879 is an assignment. Optimize the case when the target of the
1880 assignment is a selected component.
1881
1882 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1883
1884 * s-solita.adb: Update comments.
1885
1886 2011-09-06 Pascal Obry <obry@adacore.com>
1887
1888 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1889 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1890 * s-oscons-tmplt.c: Add support for generating pthread related
1891 types size on GNU/Linux as done for Darwin.
1892 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1893
1894 2011-09-06 Robert Dewar <dewar@adacore.com>
1895
1896 * exp_ch6.adb: Fix minor typo.
1897
1898 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1899
1900 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1901 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1902 (Double_Size_Of): Alphabetized. Update the comment on usage.
1903 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1904 (Nearest_Multiple_Rounded_Up): New routine.
1905 (Size_Of): Update comment on usage. The generated expression now
1906 accounts for alignment gaps by rounding the size of the type to the
1907 nearest multiple rounded up of the type's alignment.
1908
1909 2011-09-06 Robert Dewar <dewar@adacore.com>
1910
1911 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1912
1913 2011-09-06 Steve Baird <baird@adacore.com>
1914
1915 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1916 derived subprograms in checking for presence of an
1917 Extra_Accessibility_Of_Result formal parameter.
1918 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1919 checking for presence of an Extra_Accessibility_Of_Result formal
1920 parameter.
1921 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1922 case where the Parameter_Associatiations attribute is already set,
1923 but set to an empty list.
1924 (Needs_Result_Accessibility_Level):
1925 Unconditionally return False. This is a temporary
1926 change, disabling the Extra_Accessibility_Of_Result
1927 mechanism.
1928 (Expand_Simple_Function_Return): Check for
1929 Extra_Accessibility_Of_Result parameter's presence instead of
1930 testing Ada_Version when generating a runtime accessibility
1931 check which makes use of the parameter.
1932
1933 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1934
1935 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1936 expression in a given case alternative must be attached to the
1937 statement list of the ccrresponding case statement alternative
1938 They cannot be propagated ahead of the case statement, because
1939 the validity of the expression that generated the action may
1940 hold only for that alternative.
1941
1942 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1943
1944 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1945 (Alignment_Of): Remove the code for strict alignment targets.
1946 (Double_Alignment_Of): Removed.
1947 (Double_Size_Of): New routine.
1948 (Make_Finalize_Address_Stmts): Change the
1949 calculation of the dope's size. Update relevant comments.
1950 (Size_Of): New routine.
1951
1952 2011-09-06 Steve Baird <baird@adacore.com>
1953
1954 * einfo.ads (Extra_Accessibility): Update associated comment to use
1955 the term "present" correctly ("present" just means that it is not
1956 an error to query the value of the attribute - it does not imply
1957 that the value must be non-null).
1958 (Extra_Constrained): Ditto.
1959 (Is_Visible_Formal): Ditto.
1960 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1961 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1962 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1963 * exp_ch6.adb (Expand_Call): The callee may require an
1964 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1965 < Ada_2012. This can occur if the callee is exported from a Gnat
1966 runtimes unit. Also improve a comment.
1967
1968 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1969
1970 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1971 (Alignment_Of): Rename formal parameter Some_Typ
1972 to Typ, update related comment. Use the allocator alignment on
1973 strict alignment targets such as SPARC.
1974 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1975 related comment.
1976
1977 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1978
1979 * sem_ch9.adb (Check_Interfaces): Test
1980 Is_Limited_Type rather than Is_Limited_Record when checking that
1981 the partial view of a synchronized full view must be limited.
1982
1983 2011-09-06 Emmanuel Briot <briot@adacore.com>
1984
1985 * g-comlin.adb (Free): Fix memory leak.
1986
1987 2011-09-06 Robert Dewar <dewar@adacore.com>
1988
1989 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1990
1991 2011-09-06 Steve Baird <baird@adacore.com>
1992
1993 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1994 (Ada2012) cases described in AI05-0234 where the accessibility
1995 level of a function result is "determined by the point of
1996 call", an implicit parameter representing that accessibility
1997 level is passed in. Extra_Accessibilty_Of_Result yields this
1998 additional formal parameter. Extra_Accessibility_Of_Result
1999 is analogous to the existing Extra_Accessibility
2000 function used in the implementation of access parameters.
2001 (Set_Extra_Accessibility_Of_Result): New procedure; sets
2002 Extra_Accessibility_Of_Result attribute.
2003 * einfo.adb (Extra_Accessibility_Of_Result): New function.
2004 (Set_Extra_Accessibility_Of_Result): New procedure.
2005 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2006 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2007 an accessibility level literal to Natural; introduce a nested
2008 function, Make_Level_Literal, to do this.
2009 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2010 determines whether a given function (or access-to-function
2011 type) needs to have an implicitly-declared accessibility-level
2012 parameter added to its profile.
2013 (Add_Extra_Actual_To_Call): Export an existing procedure which was
2014 previously declared in the body of Exp_Ch6.
2015 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2016 it to exp_ch6.ads.
2017 (Has_Unconstrained_Access_Discriminants): New Function; a
2018 predicate on subtype entities which returns True if the given
2019 subtype is unconstrained and has one or more access discriminants.
2020 (Expand_Call): When expanding a call to a function which takes an
2021 Extra_Accessibility_Of_Result parameter, pass in the appropriate
2022 actual parameter value. In the case of a function call which is
2023 used to initialize an allocator, this may not be possible because
2024 the Etype of the allocator may not have been set yet. In this
2025 case, we defer passing in the parameter and handle it later in
2026 Expand_Allocator_Expression.
2027 (Expand_Simple_Function_Return): When returning from a function which
2028 returns an unconstrained subtype having at least one access
2029 discriminant, generate the accessibility check needed to ensure that
2030 the function result will not outlive any objects designated by its
2031 discriminants.
2032 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2033 description.
2034 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2035 is used to initialize an allocator, we may need to pass in "the
2036 accessibility level determined by the point of call" (AI05-0234)
2037 to the function. Expand_Call, where such actual parameters are
2038 usually generated, is too early in this case because the Etype of
2039 the allocator (which is used in determining the level to be passed
2040 in) may not have been set yet when Expand_Call executes. Instead,
2041 we generate code to pass in the appropriate actual parameter
2042 in Expand_Allocator_Expression.
2043 * sem_ch6.adb (Create_Extra_Formals): Create
2044 the new Extra_Accessibility_Of_Result formal if
2045 Needs_Result_Accessibility_Level returns True. This includes the
2046 introduction of a nested procedure, Check_Against_Result_Level.
2047
2048 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2049
2050 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2051 declaration.
2052
2053 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2054
2055 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2056 for the synchronization. Move the test for null from
2057 s-stposu.Allocate_Any_Controlled to this routine since the check
2058 needs to be protected too.
2059 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2060 synchronization code.
2061 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2062 explaining the context in which this routine is used.
2063 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2064 to s-finmas.Set_Finalize_Address.
2065
2066 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2067
2068 * einfo.ads: Document that itypes have no parent field.
2069
2070 2011-09-05 Robert Dewar <dewar@adacore.com>
2071
2072 * rtsfind.adb (Check_CRT): Check for overloaded entity
2073 * rtsfind.ads: Document that entities to be found by rtsfind
2074 cannot be overloaded
2075 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2076 (Lock_Entries_With_Status): New name for Lock_Entries with two
2077 arguments (changed to meet rtsfind no overloading rule).
2078
2079 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2080
2081 * s-finmas.adb (Set_Finalize_Address (Address,
2082 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2083 (Set_Finalize_Address (in out Finalization_Master,
2084 Finalize_Address_Ptr): Add synchronization code.
2085 * s-finmas.ads (Set_Finalize_Address (Address,
2086 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2087 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2088 Set_Finalize_Address for the heterogeneous case.
2089
2090 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2091
2092 * sem_ch3.adb: Undo previous change, not suitable after all.
2093
2094 2011-09-05 Robert Dewar <dewar@adacore.com>
2095
2096 * einfo.ads: Minor comment clarification.
2097
2098 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2099
2100 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2101 no longer needs to search through the entities of the return
2102 statement scope to find the _chain.
2103 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2104 (Analyze_Block_Statement): Add local variable
2105 Is_BIP_Return_Statement. Add machinery to install all entities
2106 produced by the expansion of the return object declaration.
2107 (Install_Return_Entities): New routine.
2108 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2109
2110 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2111
2112 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2113 of subunit is incomplete.
2114 (Analyze_Proper_Body): If parent spec is not available, do not
2115 attempt analysis.
2116
2117 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2118
2119 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2120 interface type conversions, that are expanded into dereferences.
2121
2122 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2123
2124 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2125 Examine the parameter and return profile of a subprogram and swap
2126 any incomplete types coming from a limited context with their
2127 corresponding non-limited views.
2128 (Exchange_Limited_Views): New routine.
2129
2130 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2131
2132 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2133 of internal entity to the subtype declaration, so that when
2134 entities are subsequently exchanged in a package body, the tree
2135 remains properly formatted for ASIS.
2136
2137 2011-09-05 Johannes Kanig <kanig@adacore.com>
2138
2139 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2140 message.
2141 (Display_Help): display the user given help message, if available.
2142
2143 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2144
2145 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2146 is legal if the original node is an identifier that is a
2147 parameterless function call.
2148
2149 2011-09-05 Pascal Obry <obry@adacore.com>
2150
2151 * prj-nmsc.adb: Minor reformatting.
2152 Add support for standalone aggregate library.
2153 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2154 * projects.texi: Fix documentation for aggregate library projects.
2155
2156 2011-09-05 Robert Dewar <dewar@adacore.com>
2157
2158 * sem_ch6.adb: Minor reformatting.
2159
2160 2011-09-05 Matthew Gingell <gingell@adacore.com>
2161
2162 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2163 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2164 the bottom of the stack is not overwritten.
2165
2166 2011-09-05 Thomas Quinot <quinot@adacore.com>
2167
2168 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2169
2170 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2171
2172 * sem_ch3.adb (Access_Definition): If an access type declaration
2173 appears in a child unit, the scope of whatever anonymous type
2174 may be generated is the child unit itself.
2175
2176 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2177
2178 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2179 Comes_From_Source on rewritten body.
2180 (Analyze_Subprogram_Body_Helper): Check that the original node for
2181 the body comes from source, when determining whether expansion
2182 of a protected operation is needed.
2183
2184 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2185
2186 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2187 a selected component and the right-hand side is a self-referential
2188 access, the proper prefix of the rewritten attribute is a copy
2189 of the left-hand side, not of its prefix.
2190
2191 2011-09-05 Robert Dewar <dewar@adacore.com>
2192
2193 * sem_ch5.adb: Minor reformatting.
2194 * sem_ch3.adb: Minor code clean up.
2195
2196 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2197
2198 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2199 restriction No_Dynamic_Attachment is in effect or not should
2200 not influence the default priority associated to a protected
2201 object. With this change, when the restriction is in effect (as
2202 is the case for the Ravenscar profile) the default priority of
2203 a protected object with an interrupt handler is in the range of
2204 interrupt priorities (Default_Interrupt_Priority) as required
2205 by D.3(10).
2206
2207 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2208
2209 * a-iteint.ads: Fix header.
2210
2211 2011-09-05 Vincent Celier <celier@adacore.com>
2212
2213 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2214 with a directory separator to avoid output such as:
2215 "/path/to/objauto.cgpr" has been deleted.
2216
2217 2011-09-05 Robert Dewar <dewar@adacore.com>
2218
2219 * sem_ch3.adb: Minor reformatting.
2220
2221 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2222
2223 * sem_ch5.adb: Better error message.
2224
2225 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2226
2227 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2228 (Expand_Array_Aggregate): Detect a special case of an aggregate
2229 which contains tasks in the context of an unexpanded return
2230 statement of a build-in-place function.
2231 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2232 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2233 which contains tasks and expand it now that the original simple
2234 return statement has been rewritten.
2235 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2236 reformatting. Do not create a chain for an extended return
2237 statement if one is already available.
2238 (Has_Activation_Chain): New routine.
2239
2240 2011-09-05 Marc Sango <sango@adacore.com>
2241
2242 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2243 the wrong test and add the correct test to detect the violation
2244 of illegal use of unconstrained string type in SPARK mode.
2245
2246 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2247
2248 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2249 message on an iterator over an array.
2250
2251 2011-09-05 Robert Dewar <dewar@adacore.com>
2252
2253 * lib-xref-alfa.adb: Minor reformatting.
2254
2255 2011-09-05 Robert Dewar <dewar@adacore.com>
2256
2257 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2258 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2259
2260 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2261
2262 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2263
2264 2011-09-05 Johannes Kanig <kanig@adacore.com>
2265
2266 * lib-xref-alfa.adb: Update comments.
2267
2268 2011-09-05 Thomas Quinot <quinot@adacore.com>
2269
2270 * sem_res.adb: Minor reformatting
2271
2272 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2273
2274 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2275 present, create them now. Needed in case the return type was
2276 a limited view in the function declaration.
2277 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2278 tasks, build the activation chain for it. Pass a reference to
2279 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2280 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2281 with build_in_place calls.
2282 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2283 incomplete, inatialize its Corresponding_Record_Type component.
2284 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2285 of limited views.
2286
2287 2011-09-05 Johannes Kanig <kanig@adacore.com>
2288
2289 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2290 information.
2291
2292 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2293
2294 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2295 appears within a package specification and the token after "IS"
2296 is not a parenthesis, assume that this is an unparenthesized
2297 expression function, even if the token appears in a line by
2298 itself.
2299 * par.adb: Clarify use of Labl field of scope stack in error
2300 recovery.
2301
2302 2011-09-05 Bob Duff <duff@adacore.com>
2303
2304 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2305 conversions instead of normal type conversions in all cases where a
2306 type conversion would be illegal. In particular, use unchecked
2307 conversions when the operand types are private.
2308
2309 2011-09-05 Johannes Kanig <kanig@adacore.com>
2310
2311 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2312 objects of task type or protected type.
2313
2314 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2315
2316 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2317 function comes from source, indicate that so does its rewriting,
2318 so it is compatible with any subsequent expansion of the
2319 subprogram body (e.g. when it is a protected operation).
2320 * sem_ch4.adb: minor reformatting
2321
2322 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2323
2324 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2325 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2326 may lead to wrong ancestor package in the case of instantiated subunit
2327 bodies. If a subunit is instantiated, follow the chain of instantiations
2328 rather than the stub structure.
2329
2330 2011-09-02 Robert Dewar <dewar@adacore.com>
2331
2332 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2333 * gcc-interface/Make-lang.in: Update dependencies.
2334
2335 2011-09-02 Marc Sango <sango@adacore.com>
2336
2337 * sem_ch3.adb (Analyze_Object_Declaration): Change
2338 comment and add additional check to differentiate constant of
2339 type string from others unconstrained type.
2340
2341 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2342
2343 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2344 present in incomplete type declarations to refine the error
2345 message the full declaration is in the same unit.
2346 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2347 an incomplete type, set the Premature_Use for additional message.
2348 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2349 and Premature_Use is set, place additional information at the
2350 point of premature use.
2351
2352 2011-09-02 Bob Duff <duff@adacore.com>
2353
2354 * sem_ch6.adb: (Check_Post_State): Suppress warning
2355 "postcondition refers only to pre-state" when the expression has not
2356 yet been analyzed, because it causes false alarms. This can happen when
2357 the postcondition contains a quantified expression, because those are
2358 analyzed later. This is a temporary/partial fix.
2359 (Process_Post_Conditions): Minor: change wording of warning.
2360
2361 2011-09-02 Marc Sango <sango@adacore.com>
2362
2363 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2364 illegal use of unconstrained string type in SPARK mode.
2365 * sem_res.adb (Analyze_Operator_Symbol): Set the
2366 right place where the string operand of concatenation should be
2367 violate in SPARK mode.
2368
2369 2011-09-02 Robert Dewar <dewar@adacore.com>
2370
2371 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2372 exp_ch3.adb: Minor reformatting.
2373
2374 2011-09-02 Vincent Celier <celier@adacore.com>
2375
2376 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2377 as the compiler driver so Is_Compilable returns True for sources.
2378 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2379 for the body.
2380
2381 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2382
2383 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2384 condition, a reference to a controlling formal must be interpreted
2385 as having the class-wide type (or an access to such) so that the
2386 inherited condition can be properly applied to any overriding
2387 operation (see ARM12 6.6.1 (7)).
2388
2389 2011-09-02 Tristan Gingold <gingold@adacore.com>
2390
2391 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2392 for LIB$GETSYI.
2393
2394 2011-09-02 Javier Miranda <miranda@adacore.com>
2395
2396 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2397 initializing expression of a class-wide interface object declaration
2398 if its type is limited.
2399
2400 2011-09-02 Johannes Kanig <kanig@adacore.com>
2401
2402 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2403 literals, take into account the type name; the type is *not*
2404 the scope for an enumeration literal.
2405
2406 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2407
2408 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2409 to reject an overriding indicator on a user-defined Adjust
2410 subprogram for a limited controlled type.
2411
2412 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2413
2414 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2415 for an actual that is a function call returning an unconstrained
2416 limited controlled type.
2417
2418 2011-09-02 Tristan Gingold <gingold@adacore.com>
2419
2420 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2421
2422 2011-09-02 Johannes Kanig <kanig@adacore.com>
2423
2424 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2425 from "HEAP" to __HEAP Change comment that refers to that variable
2426 * put_alfa.adb: Change comment that refers to that variable
2427
2428 2011-09-02 Robert Dewar <dewar@adacore.com>
2429
2430 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2431
2432 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2433
2434 * exp_util.adb (Extract_Renamed_Object): Renamed to
2435 Find_Renamed_Object. This routine has been reimplemented and now uses
2436 tree traversal to locate a renamed object.
2437 (Is_Aliased): Replace call to Extract_Renamed_Object with
2438 Find_Renamed_Object.
2439
2440 2011-09-02 Tristan Gingold <gingold@adacore.com>
2441
2442 * init.c: (__gnat_is_vms_v7): New function.
2443
2444 2011-09-02 Olivier Hainque <hainque@adacore.com>
2445
2446 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2447 that have a misaligned backchain, necessarily bogus.
2448
2449 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2450
2451 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2452 TSS routine Finalize_Address when compiling in Alfa mode.
2453 (Expand_Freeze_Record_Type): Do not create TSS routine
2454 Finalize_Address when compiling in Alfa mode.
2455 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2456 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2457 not built.
2458 (Expand_N_Allocator): Do not produce a call to
2459 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2460 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2461 produce a call to primitive Set_Finalize_Address in Alfa mode because
2462 Finalize_Address is not built.
2463 * exp_ch7.adb (Build_Finalization_Master): Do not create
2464 finalization masters in Afa mode since they are not needed.
2465 (Build_Finalizer): Do not create scope and library-level
2466 finalizers in Alfa mode since they are not needed.
2467 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2468 "new" and "free" when applied to controlled objects in Alfa mode since
2469 this is not needed.
2470
2471 2011-09-02 Vincent Celier <celier@adacore.com>
2472
2473 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2474 only library names with the syntax of Ada identifiers, to avoid errors
2475 when compiling the binder generated files.
2476 * projects.texi: Document restriction on SAL library names
2477
2478 2011-09-02 Thomas Quinot <quinot@adacore.com>
2479
2480 * a-chtgbo.adb: Minor comment fix.
2481
2482 2011-09-02 Robert Dewar <dewar@adacore.com>
2483
2484 * lib-xref.adb: Minor reformatting
2485
2486 2011-09-02 Vincent Celier <celier@adacore.com>
2487
2488 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2489 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2490 --version and --help in usage.
2491 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2492
2493 2011-09-02 Bob Duff <duff@adacore.com>
2494
2495 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2496 compilers don't understand it.
2497
2498 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2499
2500 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2501 underlying subtype rather than its base type on the call to
2502 Build_Record_Or_Elementary_Input_Function, so that any
2503 constraints on a discriminated subtype will be available for
2504 doing the check required by AI05-0192.
2505 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2506 If the prefix subtype of the 'Input attribute is a constrained
2507 discriminated subtype, then check each constrained discriminant value
2508 against the corresponding value read from the stream.
2509
2510 2011-09-02 Yannick Moy <moy@adacore.com>
2511
2512 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2513 warnings on suspicious contracts, and enable them with -gnatwa.
2514
2515 2011-09-02 Robert Dewar <dewar@adacore.com>
2516
2517 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2518 reformatting.
2519
2520 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2521
2522 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2523 which ensure that restriction No_Dynamic_Attachment has not been
2524 violated.
2525 (Make_Initialize_Protection): Protected types with attach or
2526 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2527 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2528 which ensures that restriction No_Dynamic_Attachment has not been
2529 violated.
2530 * sem_attr.adb: (Eval_Attribute): Transform
2531 VAX_Float_Type'First and 'Last into references to
2532 the temporaries which store the corresponding bounds. The
2533 transformation is needed since the back end cannot evaluate
2534 'First and 'Last on VAX.
2535 (Is_VAX_Float): New routine.
2536
2537 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2538
2539 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2540 generic unit is not intrinsic and has an explicit convention,
2541 the instance inherits it.
2542
2543 2011-09-02 Robert Dewar <dewar@adacore.com>
2544
2545 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2546 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2547
2548 2011-09-02 Thomas Quinot <quinot@adacore.com>
2549
2550 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2551 Guard against a prefix that is an N_Has_Entity but has no
2552 associated entity.
2553
2554 2011-09-02 Yannick Moy <moy@adacore.com>
2555
2556 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2557 references.
2558
2559 2011-09-02 Yannick Moy <moy@adacore.com>
2560
2561 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2562 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2563 contracts.
2564 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2565 procedure looking for suspicious postconditions.
2566 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2567 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2568 options -gnatw.t and -gnatw.T.
2569
2570 2011-09-02 Pascal Obry <obry@adacore.com>
2571
2572 * prj.adb: Minor code refactoring. Move check for null project in
2573 Project_Changed.
2574 * projects.texi: Fix minor typos.
2575
2576 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2577
2578 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2579 of iteration is an expression, its value must be captured in a
2580 renaming declaration, so that modification of the elements is
2581 propagated to the original container.
2582
2583 2011-09-02 Pascal Obry <obry@adacore.com>
2584
2585 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2586 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2587 prj-tree.adb: Minor reformatting and style fixes.
2588
2589 2011-09-02 Robert Dewar <dewar@adacore.com>
2590
2591 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2592 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2593 No_Implicit_Aliasing
2594 (Analyze_Attribute, case Address): ditto
2595 (Analyze_Attribute, case Unrestricted_Access): ditto
2596 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2597 No_Implicit_Aliasing restriction.
2598 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2599
2600 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2601
2602 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2603 is an unchecked conversion, apply test to its expression.
2604
2605 2011-09-02 Javier Miranda <miranda@adacore.com>
2606
2607 * sem_ch3.adb (Check_Abstract_Overriding): When
2608 traversing the chain of aliased subprograms avoid reporting a
2609 redundant error on the current entity.
2610
2611 2011-09-02 Sergey Rybin <rybin@adacore.com>
2612
2613 * gnat_ugn.texi: Minor clean up.
2614
2615 2011-09-02 Bob Duff <duff@adacore.com>
2616
2617 * s-htable.adb (Set_If_Not_Present): Use renaming
2618 instead of ":=", because the type Key is limited in the generic (even
2619 if not in the instances).
2620
2621 2011-09-02 Robert Dewar <dewar@adacore.com>
2622
2623 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2624 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2625 reformatting.
2626
2627 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2628
2629 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2630 inherited component with the enclosing derived type. Code reformatting.
2631
2632 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2633
2634 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2635 return done when overflow checks are enabled, since comparisons against
2636 Lor and Hir should not be done when OK1 is False.
2637
2638 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2639
2640 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2641 Add new formal Master_Exp. When present, add that expression to the
2642 call as an extra actual.
2643 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2644 Fmaster_Actual and in the case of a BIP call initializing a return
2645 object of an enclosing BIP function set it to a
2646 new reference to the implicit finalization master
2647 formal of the enclosing function. Fmaster_Actual is
2648 then passed to the new formal Master_Exp on the call to
2649 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2650 initializations of Enclosing_Func to its declaration.
2651
2652 2011-09-02 Thomas Quinot <quinot@adacore.com>
2653
2654 * csets.ads: Minor reformatting
2655
2656 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2657
2658 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2659 the full view of a private type coming from an instantiation.
2660 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2661 loop to iterate over the declarations rather than use the
2662 First_Entity / Next_Entity scheme.
2663
2664 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2665
2666 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2667 X'range (N) into X'First (N) .. X'Last (N), do not share the
2668 dimension indicator N, if present. Even though it is a static
2669 constant, its source location may be modified when printing
2670 expanded code under -gnatDL, and node sharing will lead to chaos
2671 in Sprint on large files, by generating a sloc value that does
2672 not correspond to any source file.
2673
2674 2011-09-02 Bob Duff <duff@adacore.com>
2675
2676 * einfo.adb: (Has_Xref_Entry): Do not call
2677 Implementation_Base_Type. Lib.Xref has been
2678 rewritten to avoid the need for it, and it was costly.
2679 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2680 functions in support of efficient xref.
2681 * lib-xref-alfa.adb: Misc changes related to Key component of
2682 type Xref_Entry.
2683 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2684 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2685 no longer does. This is the one place where it is needed.
2686
2687 2011-09-02 Johannes Kanig <kanig@adacore.com>
2688
2689 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2690 similar interface as the other Getopt function.
2691
2692 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2693
2694 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2695 a call to Set_Finalize_Address if there is no allocator available.
2696 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2697 a case of allocator expansion where the allocator is not expanded but
2698 needs a custom allocate routine. Code reformatting.
2699 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2700 Ren_Obj. Code reformatting.
2701 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2702 through the use of 'reference.
2703 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2704 as part of build-in-place expansion. They are intentionally marked as
2705 coming from source, but their parents are not.
2706
2707 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2708
2709 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2710 is the generated subprogram declaration for a child unit body
2711 that acts as spec, use the original body in the with_clause,
2712 to prevent binding errors.
2713
2714 2011-09-02 Vincent Celier <celier@adacore.com>
2715
2716 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2717 qualifier /MULTI_UNIT_INDEX=
2718
2719 2011-09-02 Johannes Kanig <kanig@adacore.com>
2720
2721 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2722 instead of calling the callback function
2723
2724 2011-09-02 Robert Dewar <dewar@adacore.com>
2725
2726 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2727 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2728
2729 2011-09-02 Vincent Celier <celier@adacore.com>
2730
2731 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2732 explicitly declared in an extending project, do not warn if a source
2733 for an inherited naming exception is not found.
2734
2735 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2736
2737 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2738 expansion is inactive.
2739
2740 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2741
2742 * sem_util.adb (Note_Possible_Modification): If the entity
2743 being modified is the renaming generated for an Ada2012 iterator
2744 element, the enclosing container or array is modified as well.
2745
2746 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2747
2748 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2749 Initialize): Define and initialize the
2750 mutex attributes and condition variable attributes locally.
2751
2752 2011-09-02 Vincent Celier <celier@adacore.com>
2753
2754 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2755 exception replaced in an extending project.
2756 (Check_Object): No error when the other source is locally removed.
2757
2758 2011-09-02 Yannick Moy <moy@adacore.com>
2759
2760 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2761 unresolved calls.
2762
2763 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2764
2765 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2766 run-time files.
2767 * gcc-interface/Make-lang.in: Update dependencies.
2768
2769 2011-09-01 Robert Dewar <dewar@adacore.com>
2770
2771 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2772
2773 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2774
2775 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2776 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2777 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2778 specific for systems where their glibc version does not define the
2779 routines to handle dynamically allocated CPU sets.
2780
2781 2011-09-01 Vincent Celier <celier@adacore.com>
2782
2783 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2784 prj-env.adb: Implement inheritance of naming exceptions in extending
2785 projects.
2786
2787 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2788
2789 * gnatls.adb: Display simple message instead of content of
2790 gnatlic.adl.
2791
2792 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2793
2794 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2795 access discriminant and anonymous access component scopes.
2796 (Inherit_Component): Reuse the itype of an access discriminant
2797 or anonymous access component by copying it in order to set the proper
2798 scope. This is done only when the parent and the derived type
2799 are in different scopes.
2800 (Set_Anonymous_Etype): New routine.
2801
2802 2011-09-01 Robert Dewar <dewar@adacore.com>
2803
2804 * a-convec.adb: Minor reformatting throughout.
2805
2806 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2807
2808 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2809 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2810 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2811 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2812 CPU_SET_S respectively because we are now using dynamically allocated
2813 CPU sets which are more portable across different glibc versions.
2814 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2815 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2816 masks dynamically according to the number of processors in the target
2817 platform.
2818 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2819 respectively, so we need to pass the size of the masks as
2820 parameters.
2821 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2822 created cpu_set_t masks
2823 with the number of processors available in the target platform,
2824 instead of static bit arrays. It enhances portability because
2825 it uses the information from the target platform.
2826 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2827 are using a restricted run-time library, use the flag
2828 Configurable_Run_Time_Mode instead of Restricted_Profile.
2829
2830 2011-09-01 Vincent Celier <celier@adacore.com>
2831
2832 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2833 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2834
2835 2011-09-01 Nicolas Roche <roche@adacore.com>
2836
2837 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2838 on VxWorks in kernel mode.
2839
2840 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2841
2842 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2843 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2844 directly the bit array.
2845 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2846 the linux macros with the same name.
2847 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2848 wrappers around the CPU_ZERO and CPU_SET linux macros.
2849
2850 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2851
2852 * exp_ch7.adb (Find_Insertion_List): Removed.
2853 (Process_Transient_Objects): Insert the declarations of the hook
2854 access type and the hook object before the associated transient object.
2855
2856 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2857
2858 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2859 package System.Aux_Dec when using restricted run-time libraries which
2860 do not have this package.
2861
2862 2011-09-01 Tristan Gingold <gingold@adacore.com>
2863
2864 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2865
2866 2011-09-01 Bob Duff <duff@adacore.com>
2867
2868 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2869 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2870
2871 2011-09-01 Thomas Quinot <quinot@adacore.com>
2872
2873 * exp_ch5.adb: Minor reformatting
2874 * gnat_ugn.texi: Fix minor typos.
2875 * gcc-interface/Make-lang.in: Update dependencies.
2876
2877 2011-09-01 Robert Dewar <dewar@adacore.com>
2878
2879 * inline.adb, sem_aggr.adb: Minor reformatting.
2880
2881 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2882
2883 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2884
2885 2011-09-01 Robert Dewar <dewar@adacore.com>
2886
2887 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2888
2889 2011-09-01 Bob Duff <duff@adacore.com>
2890
2891 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2892 body" the same as "in inlined body", because visibility shouldn't
2893 apply there.
2894
2895 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2896
2897 * inline.adb (Add_Inlined_Body): Refine previous change.
2898
2899 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2900
2901 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2902 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2903 Test for case where call
2904 initializes an object of a return statement before testing for
2905 a constrained call, to ensure that all such cases get handled
2906 by simply passing on the caller's parameters. Also, in that
2907 case call Needs_BIP_Alloc_Form to determine whether to pass on
2908 the BIP_Alloc_Form parameter of the enclosing function rather
2909 than testing Is_Constrained. Add similar tests for the return
2910 of a BIP call to later processing to ensure consistent handling.
2911 (Needs_BIP_Alloc_Form): New utility function.
2912 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2913 a BIP_Alloc_Form formal with call to new utility function
2914 Needs_BIP_Alloc_Form.
2915
2916 2011-09-01 Pascal Obry <obry@adacore.com>
2917
2918 * prj-part.adb: Minor reformatting.
2919
2920 2011-09-01 Vincent Celier <celier@adacore.com>
2921
2922 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2923 half character in the unit name.
2924
2925 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2926
2927 * exp_ch4.adb: Minor code and comment reformatting.
2928
2929 2011-09-01 Thomas Quinot <quinot@adacore.com>
2930
2931 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2932 for Is_Limited_Type and Is_Tagged_Type in condition checking
2933 for by-reference type.
2934 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2935 subprograms may have a completion because of a previous
2936 Inline_Always clause, but the enclosing package must be marked
2937 inlined for the subprogram body to become visible to the backend.
2938
2939 2011-09-01 Thomas Quinot <quinot@adacore.com>
2940
2941 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2942
2943 2011-09-01 Pascal Obry <obry@adacore.com>
2944
2945 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2946
2947 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2948
2949 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2950 the formals of a subprogram stub that acts as a spec.
2951
2952 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2953
2954 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2955 type, declare a renaming for it, not an object declaration.
2956
2957 2011-09-01 Yannick Moy <moy@adacore.com>
2958
2959 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2960 Ignore_Errors to ignore failures to read ALI files when True.
2961
2962 2011-09-01 Javier Miranda <miranda@adacore.com>
2963
2964 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2965 constructor calls associated with non-tagged record types.
2966
2967 2011-09-01 Robert Dewar <dewar@adacore.com>
2968
2969 * g-socthi-vms.adb: Minor reformatting.
2970
2971 2011-09-01 Nicolas Roche <roche@adacore.com>
2972
2973 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2974 in order to avoid impact of imcompatible changes.
2975 * cstreams.c: Likewise
2976 * cio.c: Likewise
2977 * aux-io.c: Likewise
2978
2979 2011-09-01 Yannick Moy <moy@adacore.com>
2980
2981 * lib-writ.adb (Write_With_Lines): Always output complete information
2982 on "with" line in Alfa mode, as this is required by formal verification
2983 back-end.
2984
2985 2011-09-01 Tristan Gingold <gingold@adacore.com>
2986
2987 * g-socthi-vms.adb: Add comments.
2988
2989 2011-09-01 Pascal Obry <obry@adacore.com>
2990
2991 * prj.ads: Minor reformatting.
2992
2993 2011-09-01 Vincent Celier <celier@adacore.com>
2994
2995 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2996 exceptions in the config pragmas file.
2997
2998 2011-09-01 Tristan Gingold <gingold@adacore.com>
2999
3000 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3001
3002 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3003
3004 * exp_ch7.adb (Find_Insertion_List): New routine.
3005 (Process_Transient_Objects): Add code to handle the abnormal
3006 finalization of a controlled transient associated with a subprogram
3007 call. Since transients are cleaned up right after the associated
3008 context, an exception raised during a subprogram call may bypass the
3009 finalization code.
3010
3011 2011-09-01 Robert Dewar <dewar@adacore.com>
3012
3013 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3014 aliased.
3015
3016 2011-09-01 Robert Dewar <dewar@adacore.com>
3017
3018 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3019
3020 2011-09-01 Robert Dewar <dewar@adacore.com>
3021
3022 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3023
3024 2011-09-01 Thomas Quinot <quinot@adacore.com>
3025
3026 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3027 GNATRTL_NONTASKING_OBJS.
3028
3029 2011-09-01 Robert Dewar <dewar@adacore.com>
3030
3031 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3032 possibility of this flag being set for formals in Ada 2012 mode.
3033 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3034 2012.
3035 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3036 mode.
3037 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3038 Ada 2012.
3039 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3040 Ada 2012.
3041
3042 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3043
3044 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3045 insertion node in a tree of nested Expression_With_Actions nodes.
3046 (Process_Transient_Object): In the case where a complex if statement
3047 has been converted into nested Expression_With_Actions nodes, the
3048 "hook" object and the associated access type must be inserted before
3049 the top most Expression_With_Actions.
3050
3051 2011-09-01 Robert Dewar <dewar@adacore.com>
3052
3053 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3054 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3055
3056 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3057
3058 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3059
3060 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3061
3062 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3063 aspect.
3064 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3065 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3066 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3067 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3068 Dispatching_Domains_Frozen): Move this local data to package
3069 System.Tasking because with the CPU aspect we need to have access
3070 to this data when creating the task in System.Tasking.Stages.Create_Task
3071 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3072 Move these variables from the body of
3073 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3074 we need to have access to this data when creating the task in
3075 System.Tasking.Stages.Create_Task.
3076 * s-taskin.adb (Initialize): Signal the allocation of the environment
3077 task to a CPU, if any, so that we know whether the CPU can be
3078 transferred to a different dispatching domain.
3079 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3080 is being allocated belongs to the dispatching domain where the task
3081 lives. Signal the allocation of the task to a CPU, if any, so that we
3082 know whether the CPU can be transferred to a different dispatching
3083 domain.
3084
3085 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3086
3087 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3088 attributes Same_Storage and Overlaps_Storage.
3089
3090 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3091
3092 * exp_strm.adb: Remove with and use clause for Opt.
3093 (Build_Array_Input_Function): Remove the version-dependent generation
3094 of the return statement. The Ada 2005 tree is now the default.
3095
3096 2011-09-01 Yannick Moy <moy@adacore.com>
3097
3098 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3099 it is never empty when compiling in Alfa mode.
3100
3101 2011-09-01 Robert Dewar <dewar@adacore.com>
3102
3103 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3104 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3105 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3106 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3107
3108 2011-09-01 Matthew Heaney <heaney@adacore.com>
3109
3110 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3111 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3112 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3113 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3114 unbounded queue container.
3115 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3116 bounded queue container.
3117 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3118 unbounded priority queue container.
3119 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3120 bounded priority queue container.
3121
3122 2011-08-31 Pascal Obry <obry@adacore.com>
3123
3124 * a-direct.adb: Do not try to create an UNC path on Windows.
3125 (Create_Path): Skip leading computer name in UNC path if any.
3126
3127 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3128
3129 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3130 version-dependent generation of the return statement. The Ada 2005 tree
3131 is now the default.
3132
3133 2011-08-31 Thomas Quinot <quinot@adacore.com>
3134
3135 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3136 types Stream_Element_Offset and Storage_Offset have a different native
3137 type depending on whether the platform is 32 or 64 bits. When
3138 exchanging them, always convert to 64 bits.
3139
3140 2011-08-31 Yannick Moy <moy@adacore.com>
3141
3142 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3143 --force-alfa to gnat2why.
3144
3145 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3146
3147 * sem_ch12.adb (Save_References): If the node has aspects, save
3148 references within the corresponding expressions in a separate step,
3149 because the aspects are not directly in the tree for the declaration
3150 to which they belong.
3151
3152 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3153
3154 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3155 in CodePeer mode, since representation clauses are partially ignored.
3156 * gcc-interface/Make-lang.in: Update dependencies.
3157
3158 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3159
3160 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3161 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3162 to any dispatching domain.
3163
3164 2011-08-31 Thomas Quinot <quinot@adacore.com>
3165
3166 * exp_ch4.adb: Minor reformatting.
3167
3168 2011-08-31 Bob Duff <duff@adacore.com>
3169
3170 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3171 on nodes for which it is not defined.
3172 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3173 parent type.
3174
3175 2011-08-31 Bob Duff <duff@adacore.com>
3176
3177 * sem_ch3.adb (Process_Full_View): Disable legality check if
3178 In_Instance, to avoid spurious errors.
3179 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3180 if In_Instance, to avoid spurious errors.
3181
3182 2011-08-31 Pascal Obry <obry@adacore.com>
3183
3184 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3185 directory speparators.
3186 (Compose): Use Dir_Seps to handle both forms.
3187 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3188 changes.
3189 (Extension): Use Dir_Seps to handle both forms.
3190
3191 2011-08-31 Pascal Obry <obry@adacore.com>
3192
3193 * prj-conf.adb: Minor reformatting.
3194
3195 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3196
3197 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3198 dispatching domain aspect.
3199 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3200 aspect.
3201 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3202 Dispatching_Domain aspect in a similar way as we do for the Priority
3203 aspect.
3204 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3205 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3206 is present.
3207 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3208 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3209 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3210 Dispatching_Domain and add it to the task definition.
3211 (Sig_Flags): Add Pragma_Dispatching_Domain.
3212 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3213 support to find the types Dispatching_Domain and
3214 Dispatching_Domain_Access.
3215 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3216 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3217 query the availability of a pragma Dispatching_Domain.
3218 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3219 the expander to pass the Dispatching_Domain when creating a task.
3220 (Name_Dispatching_Domain): Add this new name for a pragma.
3221 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3222 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3223 task has been allocated at creation time.
3224 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3225 Ravenscar is always null.
3226 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3227 the task has been allocated at creation time.
3228 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3229 a specific dispatching domain.
3230 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3231 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3232 and CPU are specified for the task, and the CPU value is not contained
3233 within the range of processors for the domain.
3234
3235 2011-08-31 Vincent Celier <celier@adacore.com>
3236
3237 * make.adb (Original_Gcc) : New constant String_Access.
3238 (Gnatmake): For VM targets, do not use VM version of the compiler if
3239 --GCC= has been specified.
3240
3241 2011-08-31 Thomas Quinot <quinot@adacore.com>
3242
3243 * sem_ch5.adb: Minor reformatting.
3244
3245 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3246
3247 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3248 not reanalyze it.
3249
3250 2011-08-31 Bob Duff <duff@adacore.com>
3251
3252 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3253 the access type is private; we don't care about privacy in expansion.
3254
3255 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3256
3257 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3258 subcomponents tnat may be limited, because they originate in view
3259 conflicts. If the original aggregate is legal and the actuals are
3260 legal, the aggregate itself is legal.
3261
3262 2011-08-31 Matthew Heaney <heaney@adacore.com>
3263
3264 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3265 status.
3266
3267 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3268
3269 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3270 errors in B tests.
3271
3272 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3273
3274 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3275 Interrupt_Priority aspects, force the analysis of the aspect expression
3276 (when building the equivalent pragma). Otherwise, its analysis is done
3277 too late, after the task or protected object has been created.
3278 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3279 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3280 to the object declaration because they are needed in the type
3281 declaration.
3282
3283 2011-08-31 Robert Dewar <dewar@adacore.com>
3284
3285 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3286 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3287 reformatting.
3288
3289 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3290
3291 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3292 if the corresponding type is malformed due to restriction violations.
3293
3294 2011-08-31 Robert Dewar <dewar@adacore.com>
3295
3296 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3297
3298 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3299
3300 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3301 would cause the generation of Set_Finalize_Address if the target is a
3302 VM and the designated type is not derived from [Limited_]Controlled.
3303
3304 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3305
3306 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3307 subprogram.
3308 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3309 case of a compilation error.
3310
3311 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3312
3313 * init.c (__gnat_error_handler): Standardize the stack overflow or
3314 erroneous memory access message.
3315 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3316 or erroneous memory access message.
3317
3318 2011-08-31 Robert Dewar <dewar@adacore.com>
3319
3320 * sem_ch4.adb: Minor reformatting.
3321 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3322
3323 2011-08-31 Thomas Quinot <quinot@adacore.com>
3324
3325 * scos.ads: Minor documentation clarification.
3326 * put_scos.adb: Do not generate SCO unit header line for a unit that
3327 has no SCO lines.
3328
3329 2011-08-31 Robert Dewar <dewar@adacore.com>
3330
3331 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3332
3333 2011-08-31 Tristan Gingold <gingold@adacore.com>
3334
3335 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3336 hold variables between these following subprograms.
3337 (Build_Exception_Handler, Build_Object_Declarations,
3338 Build_Raise_Statement): Use the above type as parameter.
3339 Make the above adjustments.
3340 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3341
3342 2011-08-31 Pascal Obry <obry@adacore.com>
3343
3344 * projects.texi: Minor reformatting.
3345
3346 2011-08-31 Tristan Gingold <gingold@adacore.com>
3347
3348 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3349 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3350
3351 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3352
3353 * exp_ch5.adb: Minor code cleanup.
3354 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3355 prevent cascaded errors.
3356 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3357 variable of an iterator specification in current scope.
3358 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3359 postconditions on the stack, as they contain no return statements.
3360
3361 2011-08-31 Yannick Moy <moy@adacore.com>
3362
3363 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3364 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3365 call Qualify_Entity_Names.
3366 (Expand_Alfa): call Qualify_Entity_Names in more cases
3367 * lib-xref-alfa.adb: Take into account system package.
3368 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3369 CodePeer mode in which we are interested in finding bugs even if
3370 compiler cannot compile source.
3371 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3372 deferred constant.
3373
3374 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3375
3376 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3377 denoted by the subtype mark to ensure getting the concurrent type in
3378 the case where the subtype mark denotes a private subtype of a
3379 concurrent type (needed when using -gnatc).
3380 (Process_Subtype): For the processing specific to type kinds, case on
3381 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3382 subtype denotes a private subtype whose base type is nonprivate (needed
3383 for subtypes of private fulfilled by task types when compiling with
3384 -gnatc).
3385
3386 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3387
3388 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3389 late primitives that override interface operations when the full
3390 expander is not active, to avoid blowups in Register_Primitive when
3391 types don't have associated secondary dispatch tables.
3392
3393 2011-08-31 Yannick Moy <moy@adacore.com>
3394
3395 * alfa_test.adb: Code clean up.
3396
3397 2011-08-31 Marc Sango <sango@adacore.com>
3398
3399 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3400 by Comes_From_Source (Original_Node (N)) in order to treat also the
3401 nodes which have been rewritten.
3402 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3403 explicit dereference and slice violation in spark mode on the nodes
3404 coming only from the source code.
3405
3406 2011-08-31 Robert Dewar <dewar@adacore.com>
3407
3408 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3409 lib-xref-alfa.adb: Minor reformatting.
3410
3411 2011-08-31 Matthew Heaney <heaney@adacore.com>
3412
3413 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3414
3415 2011-08-31 Javier Miranda <miranda@adacore.com>
3416
3417 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3418 only for class-wide subprograms conflicting with entities of concurrent
3419 tagged types.
3420
3421 2011-08-31 Matthew Heaney <heaney@adacore.com>
3422
3423 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3424 node to null value.
3425
3426 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3427
3428 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3429 general description of the routine.
3430
3431 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3432
3433 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3434 doubly-linked lists.
3435
3436 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3437
3438 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3439 check is needed for a left-hand side that is a dereference, and the
3440 base type is private without discriminants (whereas the full type does
3441 have discriminants), an extra retrieval of the underlying type may be
3442 needed in the case where the subtype is a record subtype whose base
3443 type is private. Update comments.
3444
3445 2011-08-31 Javier Miranda <miranda@adacore.com>
3446
3447 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3448 found check if there is a class-wide subprogram covering the primitive.
3449
3450 2011-08-31 Yannick Moy <moy@adacore.com>
3451
3452 * sem_res.adb: Further cases where full expansion test is needed,
3453 rather than expansion test.
3454
3455 2011-08-31 Pascal Obry <obry@adacore.com>
3456
3457 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3458
3459 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3460
3461 * exp_ch5.adb: Handle iterators over derived container types.
3462
3463 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3464
3465 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3466 (Has_Anonymous_Master): New routine.
3467 (Set_Has_Anonymous_Master): New routine.
3468 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3469 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3470 (Current_Anonymous_Master): New routine.
3471 (Current_Unit_First_Declaration): Removed.
3472 (Current_Unit_Scope): Removed.
3473 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3474 their objects on a per-unit heterogeneous finalization master.
3475
3476 2011-08-31 Matthew Heaney <heaney@adacore.com>
3477
3478 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3479 array.
3480
3481 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3482
3483 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3484 when not needed.
3485
3486 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3487
3488 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3489 where the actual is an unexpanded call to 'Input.
3490
3491 2011-08-31 Yannick Moy <moy@adacore.com>
3492
3493 * sem_ch4.adb: Code clean up.
3494
3495 2011-08-31 Yannick Moy <moy@adacore.com>
3496
3497 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3498
3499 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3500
3501 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3502 and TSS primitive Finalize_Address if finalization is suppressed.
3503 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3504 primitive Finalize_Address if finalization is suppressed.
3505
3506 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3507
3508 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3509 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3510 sure that the underlying task has already been created before trying
3511 to change its affinity.
3512 (Set_CPU): Use the term processor instead of CPU, as we do in
3513 Assign_Task.
3514
3515 2011-08-31 Vincent Celier <celier@adacore.com>
3516
3517 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3518 * prj-nmsc.adb (Process_Compiler): Process attribute
3519 Source_File_Switches.
3520 * prj.ads (Language_Config): New name list component
3521 Name_Source_File_Switches.
3522 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3523
3524 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3525
3526 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3527 discriminated component of an actual, expand at once to prevent
3528 ouf-of-order references with generated subtypes.
3529
3530 2011-08-31 Yannick Moy <moy@adacore.com>
3531
3532 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3533 reference to operator in Alfa xrefs.
3534
3535 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3536
3537 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3538 where the parent instance was frozen before the current instance due to
3539 the presence of a source body. Update calls to Insert_After_Last_Decl.
3540 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3541 Update the comment which illustrates the purpose of the routine.
3542 Package instances are now frozen by source bodies which appear after
3543 the instance. This ensures that entities coming from within the
3544 instance are available for use in the said bodies.
3545 (Install_Body): Add code to handle the case where the parent instance
3546 was frozen before the current instance due to the presence of a source
3547 body. Update calls to Insert_After_Last_Decl.
3548
3549 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3550
3551 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3552 access types.
3553 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3554
3555 2011-08-31 Yannick Moy <moy@adacore.com>
3556
3557 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3558 full-expander test.
3559 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3560 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3561 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3562 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3563 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3564 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3565 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3566 ALFA in Alfa (we dropped acronym).
3567 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3568 operations in a case where it returned previously No_Elist.
3569
3570 2011-08-31 Robert Dewar <dewar@adacore.com>
3571
3572 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3573 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3574 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3575 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3576 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3577 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3578 reformatting.
3579
3580 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3581
3582 * sem_ch12 (Check_Private_View): Revert previous change.
3583 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3584 conversion is in a generic instance.
3585
3586 2011-08-31 Matthew Heaney <heaney@adacore.com>
3587
3588 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3589 * a-chtgbo.adb (Free): Allow 0 as index value.
3590
3591 2011-08-31 Matthew Heaney <heaney@adacore.com>
3592
3593 * a-cborma.adb (Insert): Add comment to explain why no element
3594 assignment.
3595
3596 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3597
3598 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3599 spec discriminant is already a concurrent type, in which case just use
3600 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3601
3602 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3603
3604 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3605 system-linux-mips.ads, system-linux-mipsel.ads,
3606 system-linux-mips64el.ads, system-linux-ppc64.ads,
3607 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3608
3609 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3610
3611 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3612 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3613 (build_unary_op): Likewise.
3614
3615 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3616
3617 * raise-gcc.c: Do not include coretypes.h and tm.h.
3618 (setup_to_install): Remove test for compiler macro.
3619 * targext.c: Document use for the library.
3620 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3621
3622 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3623
3624 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3625 the expression to the nominal type if the latter is a record type with
3626 a variant part and the type of the former is a record type without one.
3627
3628 2011-08-30 Yannick Moy <moy@adacore.com>
3629
3630 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3631 expansion in Alfa mode.
3632 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3633 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3634 Alfa mode.
3635 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3636 * sem_res.adb: Ditto.
3637 * gcc-interface/Make-lang.in: Update dependencies.
3638
3639 2011-08-30 Thomas Quinot <quinot@adacore.com>
3640
3641 * g-socket.ads: Minor documentation adjustment.
3642
3643 2011-08-30 Robert Dewar <dewar@adacore.com>
3644
3645 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3646
3647 2011-08-30 Yannick Moy <moy@adacore.com>
3648
3649 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3650 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3651 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3652 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3653 Revert change which introduced files for "light"
3654 expansion, to be replaced by a single file for Alfa expansion.
3655
3656 2011-08-30 Robert Dewar <dewar@adacore.com>
3657
3658 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3659 Minor code reorg/reformatting.
3660
3661 2011-08-30 Yannick Moy <moy@adacore.com>
3662
3663 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3664 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3665 used for testing full expansion, that is active expansion not in the
3666 reduced mode for Alfa
3667 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3668 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3669 of the verbose (Expander_Active and not ALFA_Mode)
3670
3671 2011-08-30 Tristan Gingold <gingold@adacore.com>
3672
3673 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3674 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3675 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3676 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3677
3678 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3679
3680 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3681 access conversions to check that the conversion is a rewritten node,
3682 rather than just having Comes_From_Source set to False, which wasn't
3683 sufficient.
3684
3685 2011-08-30 Robert Dewar <dewar@adacore.com>
3686
3687 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3688 g-socket.ads: Minor reformatting.
3689
3690 2011-08-30 Thomas Quinot <quinot@adacore.com>
3691
3692 * sem_util.adb: Minor reformatting.
3693
3694 2011-08-30 Tristan Gingold <gingold@adacore.com>
3695
3696 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3697 to be compliant with the ABI.
3698
3699 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3700
3701 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3702 of a designated type when the related access type is an actual in an
3703 instance. This ensures that the full view of designated type is
3704 available when inside the body of the instance.
3705
3706 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3707
3708 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3709 in a position to be modified, a slice is treated like an indexed
3710 component.
3711
3712 2011-08-30 Thomas Quinot <quinot@adacore.com>
3713
3714 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3715 field tv_sec in struct timeval.
3716
3717 2011-08-30 Yannick Moy <moy@adacore.com>
3718
3719 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3720 blocks of code doing full expansion, previously only guarded by
3721 Expander_Active, by anding the test that ALFA_Mode is not set
3722
3723 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3724
3725 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3726 add the function to the list of private dependents, for subsequent
3727 legality check on Taft amendment types.
3728 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3729 Private_Dependents, as for other incomplete types.
3730 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3731 Taft-amendment type is used as the return type of a function.
3732
3733 2011-08-30 Javier Miranda <miranda@adacore.com>
3734
3735 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3736 which emits an error by a call to a new routine which report the error.
3737 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3738 entity does not cover an existing interface.
3739 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3740 code.
3741 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3742 protected procedures or entries whose mode is not conformant.
3743 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3744 an error by a call to a new routine which report the error.
3745
3746 2011-08-30 Robert Dewar <dewar@adacore.com>
3747
3748 * gnat_rm.texi: Minor change.
3749 * exp_attr_light.adb: Minor reformatting.
3750
3751 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3752
3753 * sem_ch3.adb: Patch inheritance of aspects in
3754 Complete_Private_Subtype, to avoid infinite loop.
3755
3756 2011-08-30 Javier Miranda <miranda@adacore.com>
3757
3758 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3759 been reported and a subprogram covering an interface primitive is not
3760 found then skip generating the internal entity. Done to avoid crashing
3761 the frontend.
3762 (Check_Abstract_Overriding): Change text of error of wrong formal of
3763 protected subprogram or entry. Done for consistency to emit exactly the
3764 same error reported by Check_Synchronized_Overriding. In addition, the
3765 error is restricted to protected types (bug found working on AI05-0090)
3766
3767 2011-08-30 Yannick Moy <moy@adacore.com>
3768
3769 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3770 expansion in Alfa mode.
3771 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3772 * exp_light.adb, exp_light.ads: New package defining light expansion.
3773 * expander.adb (Expand): Call light expansion in Alfa mode
3774 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3775 constructs.
3776 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3777 constructs.
3778 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3779 * gnat1drv.adb (Adjust_Global_Switches): Comment
3780
3781 2011-08-30 Yannick Moy <moy@adacore.com>
3782
3783 * lib-xref-alfa.adb: Minor refactoring.
3784
3785 2011-08-30 Yannick Moy <moy@adacore.com>
3786
3787 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3788 mode.
3789 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3790 expansion in Alfa mode.
3791 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3792 mode.
3793
3794 2011-08-30 Robert Dewar <dewar@adacore.com>
3795
3796 * debug_a.adb: Update comment.
3797
3798 2011-08-30 Robert Dewar <dewar@adacore.com>
3799
3800 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3801 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3802 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3803 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3804
3805 2011-08-30 Robert Dewar <dewar@adacore.com>
3806
3807 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3808 volatile.
3809
3810 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3811
3812 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3813 Build_Finalization_Master by supplying an insertion node and enclosing
3814 scope. In its old version, the call did not generate a finalization
3815 master.
3816 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3817 recognize anonymous access-to-controlled components. Rewrite the
3818 machinery which creates finalization masters to service anonymous
3819 access-to-controlled components of a record type. In its current state,
3820 only one heterogeneous master is necessary to handle multiple anonymous
3821 components.
3822 (Freeze_Type): Comment reformatting.
3823 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3824 RE_Unit_Table.
3825 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3826 associates TSS primitive Finalize_Address with either the master itself
3827 or with the internal hash table depending on the mode of operation of
3828 the master.
3829
3830 2011-08-30 Javier Miranda <miranda@adacore.com>
3831
3832 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3833 interface type then do not generate code to compare this component.
3834 Required since they have no components and their equality operator is
3835 abstract.
3836
3837 2011-08-30 Steve Baird <baird@adacore.com>
3838
3839 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3840 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3841 returns the (static) accessibility level of the object. Otherwise, the
3842 same as Type_Access_Level.
3843 (Dynamic_Accessibility_Level): New function; given an expression which
3844 could occur as the rhs of an assignment to a saooaaat (i.e., an
3845 expression of an access-to-object type), return the new value for the
3846 saooaaat's associated Extra_Accessibility object.
3847 (Effective_Extra_Accessibility): New function; same as
3848 Einfo.Extra_Accessibility except that object renames are looked through.
3849 * sem_util.adb
3850 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3851 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3852 description.
3853 (Effective_Extra_Accessibility): New function; see sem_util.ads
3854 description.
3855 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3856 (Extra_Accessibility): Update comments.
3857 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3858 except RM_Size field (which is only for types) is unaffected.
3859 * einfo.adb
3860 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3861 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3862 formals.
3863 (Init_Size): Add assertion that we are not trashing the
3864 Extra_Accessibility attribute of an object.
3865 (Init_Size_Align): Add assertion that we are not trashing the
3866 Extra_Accessibility attribute of an object.
3867 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3868 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3869 differently for the type of a (non-library-level) saooaaat depending
3870 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3871 is queried in this set of changes - everything else (in particular,
3872 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3873 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3874 The special treatment of library-level saooaaats is an optimization,
3875 not required for correctnesss. This is based on the observation that the
3876 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3877 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3878 * exp_ch3.adb
3879 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3880 false for the type of a saooaaat, declare and initialize its
3881 accessibility level object and set the Extra_Accessibility attribute
3882 of the saooaaat to refer to this object.
3883 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3884 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3885 calls to Effective_Extra_Accessibility in order to support
3886 renames of saooaaats.
3887 (Expand_N_Type_Conversion): Add new local function,
3888 Has_Extra_Accessibility, and call it when determining whether an
3889 accessibility check is needed.
3890 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3891 evaluate to True (without raising an exception).
3892 * exp_ch5.adb
3893 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3894 saooaaat, update its associated Extra_Accessibility object (if
3895 it has one). This includes an accessibility check.
3896 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3897 a saooaaat, update its Extra_Accessibility object too (if it
3898 has one).
3899 (Expand_Call): Replace a couple of calls to Type_Access_Level
3900 with calls to Dynamic_Access_Level to handle cases where
3901 passing a literal (any literal) is incorrect.
3902 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3903 checks associated with "Saooaat := Some_Object'Access;"; this must
3904 be rejected if Some_Object is declared in a more nested scope
3905 than Saooaat.
3906 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3907 assignment to a saooaaat even if Is_Local_Anonymous_Access
3908 returns False for its type (indicating a 2012-style saooaaat).
3909 * sem_ch8.adb
3910 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3911 (which is only appropriate for objects, not types) with a call
3912 of Init_Object_Size_Align in order to avoid trashing the
3913 Extra_Accessibility attribute of a rename (the two attributes
3914 share storage).
3915 * sem_res.adb
3916 (Valid_Conversion) Replace six calls to Type_Access_Level with
3917 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3918 Ada2012 non-library-level saooaaat, the former returns library level
3919 while the latter returns the (static) accessibility level of the
3920 saooaaat. A type conversion to the anonymous type of a saooaaat
3921 can only occur as part of an assignment to the saooaaat, so we
3922 know that such a conversion must be in a lhs context, so Deepest
3923 yields the result that we need. If such a conversion could occur,
3924 say, as the operand of an equality operator, then this might not
3925 be right. Also add a test so that static accessibilty checks are
3926 performed for converting to a saooaaat's type even if
3927 Is_Local_Anonymous_Access yields False for the type.
3928
3929 2011-08-30 Javier Miranda <miranda@adacore.com>
3930
3931 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3932 controls generation of a warning associated with late declaration of
3933 dispatching functions. Required to avoid generating spurious
3934 warnings.
3935
3936 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3937
3938 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3939 return object has an anonymous access type and the function's type is
3940 a named access type.
3941 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3942 conversions on implicit conversions, since such conversions can occur
3943 for anonymous access cases due to expansion. Issue error for attempt
3944 to rename an anonymous expression as an object of a named access type.
3945 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3946 to indicate whether this function should report errors on invalid
3947 conversions.
3948 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3949 the expression is of an anonymous access type and the expected type is
3950 a named general access type, rewrite the expression as a type
3951 conversion, unless this is an expression of a membership test.
3952 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3953 calling of Error_Msg_N on new formal Report_Errs.
3954 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3955 calling of Error_Msg_NE on new formal Report_Errs.
3956 (Valid_Conversion): Move declaration of this function to the package
3957 spec, to allow calls from membership test processing. For Ada 2012,
3958 enforce legality restrictions on implicit conversions of anonymous
3959 access values to general access types, disallowing such conversions in
3960 cases where the expression has a dynamic accessibility level (access
3961 parameters, stand-alone anonymous access objects, or a component of a
3962 dereference of one of the first two cases).
3963 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3964 in the context of a named general access expected type.
3965 * exp_ch4.adb Add with and use of Exp_Ch2.
3966 (Expand_N_In): Add processing for membership tests applied to
3967 expressions of an anonymous access type. First, Valid_Conversion is
3968 called to check whether the test is statically False, and then the
3969 conversion is expanded to test that the expression's accessibility
3970 level is no deeper than that of the tested type. In the case of
3971 anonymous access-to-tagged types, a tagged membership test is applied
3972 as well.
3973 (Tagged_Membership): Extend to handle access type cases, applying the
3974 test to the designated types.
3975 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3976 accessibility level, and the actual is a 'Access applied to a current
3977 instance, pass the accessibility level of the type of the current
3978 instance rather than applying Object_Access_Level to the prefix. Add a
3979 ??? comment, since this level isn't quite right either (will eventually
3980 need to pass an implicit level parameter to init procs).
3981
3982 2011-08-30 Bob Duff <duff@adacore.com>
3983
3984 * s-taskin.ads: Minor comment fix.
3985
3986 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3987
3988 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3989 component and the selector is a dispatching operation, check if it is
3990 a prefixed call before rewriting as a parameterless function call.
3991
3992 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3993
3994 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3995 tsystem.h into $(RTSDIR) instead of rts.
3996
3997 2011-08-29 Robert Dewar <dewar@adacore.com>
3998
3999 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4000 reformatting.
4001 * gcc-interface/Make-lang.in: Update dependencies.
4002
4003 2011-08-29 Yannick Moy <moy@adacore.com>
4004
4005 * alfa.ads (Name_Of_Heap_Variable): New constant name.
4006 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4007 table to hold dereferences.
4008 (Add_ALFA_Xrefs): Take into account dereferences as special
4009 reads/writes to the variable "HEAP".
4010 (Enclosing_Subprogram_Or_Package): Move subprogram here.
4011 (Generate_Dereference): New procedure to store a read/write dereferencew
4012 in the table Drefs.
4013 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4014 the special "HEAP" var.
4015 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4016 in ALFA mode.
4017 * sem_util.adb (Note_Possible_Modification): Store write dereference
4018 in ALFA mode.
4019
4020 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4021
4022 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4023 ensures that the level of the subpool access type is not deeper than
4024 that of the pool object.
4025 * sem_util.adb (Object_Access_Level): Expand to handle defining
4026 identifiers.
4027 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4028 subpool handle name of a rewritten allocator.
4029
4030 2011-08-29 Robert Dewar <dewar@adacore.com>
4031
4032 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4033
4034 2011-08-29 Thomas Quinot <quinot@adacore.com>
4035
4036 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4037 values, we generate multiple triples of parameters in the TypeCode.
4038 Bump Choice_Index for each such triple so that a subsequent default
4039 choice is associated with the correct index in the typecode.
4040
4041 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4042
4043 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4044 container.
4045 (First, Last): Handle properly an iterator over a null container.
4046
4047 2011-08-29 Bob Duff <duff@adacore.com>
4048
4049 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4050 processing if we run across a node with no Scope. This can happen if
4051 we're with-ing an library-level instance, and that instance got errors
4052 that caused "instantiation abandoned".
4053 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4054 an exception instead of using Assert, so it won't go into an infinite
4055 loop, even when assertions are turned off.
4056
4057 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4058
4059 * a-coorse.adb: Proper handling of empty ordered sets.
4060
4061 2011-08-29 Johannes Kanig <kanig@adacore.com>
4062
4063 * debug.adb: Add comments.
4064
4065 2011-08-29 Thomas Quinot <quinot@adacore.com>
4066
4067 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4068 reformatting.
4069
4070 2011-08-29 Yannick Moy <moy@adacore.com>
4071
4072 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4073 declaration for Itypes in Alfa mode.
4074
4075 2011-08-29 Robert Dewar <dewar@adacore.com>
4076
4077 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4078 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4079 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4080 reformatting.
4081
4082 2011-08-29 Tristan Gingold <gingold@adacore.com>
4083
4084 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4085 package spec.
4086 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4087 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4088 while raising PE.
4089
4090 2011-08-29 Robert Dewar <dewar@adacore.com>
4091
4092 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4093
4094 2011-08-29 Javier Miranda <miranda@adacore.com>
4095
4096 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4097 renamings of formal subprograms when the actual for a formal type is
4098 class-wide.
4099
4100 2011-08-29 Matthew Heaney <heaney@adacore.com>
4101
4102 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4103 to Target.
4104
4105 2011-08-29 Matthew Heaney <heaney@adacore.com>
4106
4107 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4108 components of record type.
4109 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4110 to Target.
4111
4112 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4113
4114 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4115 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4116 container packages.
4117
4118 2011-08-29 Robert Dewar <dewar@adacore.com>
4119
4120 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4121 reformatting.
4122
4123 2011-08-29 Matthew Heaney <heaney@adacore.com>
4124
4125 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4126 components of record type.
4127
4128 2011-08-29 Bob Duff <duff@adacore.com>
4129
4130 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4131 by the termination handler.
4132
4133 2011-08-29 Yannick Moy <moy@adacore.com>
4134
4135 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4136 created in Alfa mode, instead of inserting artificial declarations of
4137 non-Itypes in the tree.
4138 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4139 know if an Itype has a corresponding declaration, as defined in
4140 itypes.ads.
4141
4142 2011-08-29 Yannick Moy <moy@adacore.com>
4143
4144 * gnat1drv.adb: Minor rewrite.
4145
4146 2011-08-29 Bob Duff <duff@adacore.com>
4147
4148 * s-tasuti.adb (Make_Passive): Work around race condition in
4149 Make_Independent, which can cause Wait_Count to be zero. So instead of
4150 asserting that Wait_Count > 0, and then decrementing it, decrement it
4151 only if Wait_Count > 0.
4152 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4153 should be nonnegative, so declare them Natural instead of Integer.
4154
4155 2011-08-29 Robert Dewar <dewar@adacore.com>
4156
4157 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4158 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4159 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4160 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4161 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4162
4163 2011-08-29 Tristan Gingold <gingold@adacore.com>
4164
4165 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4166
4167 2011-08-29 Vadim Godunko <godunko@adacore.com>
4168
4169 * s-parint.ads: Minor comment clarification.
4170
4171 2011-08-29 Vincent Celier <celier@adacore.com>
4172
4173 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4174 may be used as identifiers.
4175
4176 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4177
4178 * a-coinho.ads: Minor reformating.
4179
4180 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4181
4182 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4183 container of a derived type.
4184
4185 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4186
4187 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4188 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4189
4190 2011-08-29 Pascal Obry <obry@adacore.com>
4191
4192 * exp_disp.adb: Minor comment fix.
4193 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4194 to avoid warnings when compiling with -Wall.
4195 (Make_Disp_Conditional_Select_Body): Likewise.
4196 (Make_Disp_Timed_Select_Body): Likewise.
4197
4198 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4199
4200 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4201 an entity name, generate reference for it.
4202
4203 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4204
4205 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4206 iterator form.
4207 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4208 the class-wide type.
4209 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4210
4211 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4212
4213 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4214 subtype for an object whose type is an unconstrained union.
4215
4216 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4217
4218 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4219 is allowed in a component definition, by AI95-406.
4220
4221 2011-08-29 Matthew Heaney <heaney@adacore.com>
4222
4223 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4224
4225 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4226
4227 * a-except-2005.adb: Alphabetize all routines.
4228 (Triggered_By_Abort): New routine.
4229 * a-except-2005.ads (Triggered_By_Abort): New routine.
4230 * a-except.adb Alphabetize all routines.
4231 (Triggered_By_Abort): New routine.
4232 * a-except.ads (Triggered_By_Abort): New routine.
4233 * exp_ch7.adb: Update all comments involving the detection of aborts in
4234 finalization code.
4235 (Build_Object_Declarations): Do not generate code to detect the
4236 presence of an abort at the start of finalization code, use a runtime
4237 routine istead.
4238 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4239 RE_Unit_Table.
4240 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4241 allocate a task on a subpool.
4242 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4243 The flag disables all actions related to the maintenance of
4244 Finalize_Address_Table when subpools are not in use.
4245 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4246 use.
4247 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4248 performs costly task locking when subpools are not in use.
4249
4250 2011-08-29 Yannick Moy <moy@adacore.com>
4251
4252 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4253 types and dispatching calls in Alfa mode.
4254 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4255 correspondance between body and spec scopes, to reuse utility functions
4256 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4257 by testing the presence of the library unit for the body
4258 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4259 mode the expansion of accept statements is skipped
4260 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4261 the unique entity corresponding to the one returned by
4262 Unique_Defining_Entity applied to the enclosing declaration of the
4263 argument.
4264
4265 2011-08-29 Bob Duff <duff@adacore.com>
4266
4267 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4268 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4269 an alias for pn. ppp is an alias for pt.
4270
4271 2011-08-29 Javier Miranda <miranda@adacore.com>
4272
4273 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4274 aggregate to take a consistent decision on the need to convert into
4275 assignments aggregates that initialize constant objects.
4276
4277 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4278
4279 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4280 Build_Allocate_Deallocate_Proc in order to handle allocation of
4281 non-controlled objects on subpools.
4282 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4283 to be end-user visible.
4284 * s-finmas.adb: Add with and use clause for System.HTable.
4285 Add an instantiation of Simple_HTable which provides a mapping between
4286 the address of a controlled object and the corresponding
4287 Finalize_Address used to clean up the object. The table is used when a
4288 master is operating in heterogeneous mode.
4289 (Attach): Explain why the input node is not verified on being already
4290 attached.
4291 (Delete_Finalize_Address): New routine.
4292 (Detach): Add pragma Assert which ensures that a node is already
4293 attached.
4294 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4295 since nodes are no longer removed on traversal. Explain why node
4296 detachment is undesirable in this case.
4297 (Get_Finalize_Address): New routine.
4298 (Hash): New routine.
4299 (Is_Empty_List): Removed.
4300 (pm): Renamed to Print_Master. Add output for discriminant
4301 Is_Homogeneous.
4302 Comment reformatting.
4303 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4304 * s-finmas.ads: Various comments additions / improvements.
4305 Type Finalization_Master has a discriminant which determines the mode of
4306 operation.
4307 (Delete_Finalize_Address): New routine.
4308 (Get_Finalize_Address): New routine.
4309 (pm): Renamed to Print_Master.
4310 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4311 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4312 use clause for System.IO.
4313 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4314 Finalize_Address depending on the mode of allocation and the mode of
4315 the master.
4316 (Deallocate_Any_Controlled): Remove the relation pair object -
4317 Finalize_Address regardless of the master mode. Add comment explaining
4318 the reason.
4319 (Detach): Ensure that fields Prev and Next are null after detachment.
4320 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4321 scheme to check whether the list of subpools is empty. There is no
4322 longer need to store the next subpool or advance the current pointer.
4323 (Is_Empty_List): New routine.
4324 (Print_Pool): New routine.
4325 (Print_Subpool): New routine.
4326 * s-stposu.ads: Various comments additions / improvements.
4327 Field Master of type Root_Subpool is now a heterogeneous collection.
4328 (Print_Pool): New routine.
4329 (Print_Subpool): New routine.
4330
4331 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4332
4333 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4334 forms, using aspects of container types.
4335 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4336 Has_Implicit_Dereference flags, that may be set on the partial view.
4337 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4338 container type with an indexing aspect.
4339 (Analyze_Quantified_Expression): Analyze construct with expansion
4340 disabled, because it will be rewritten as a loop during expansion.
4341 (Try_Container_Indexing): The prefix itself may be a container type
4342 with an indexing aspect, as with a vector of vectors.
4343 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4344 the original doamin of iteration, for name capture.
4345 (Analyze_Iterator_Specification): If the domain is an expression that
4346 needs finalization, create a separate declaration for it.
4347 For an iterator with "of" retrieve default iterator info from aspect of
4348 container type. For "in" iterator, retrieve type of Iterate function.
4349 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4350 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4351 analysis, to prevent spurious errors about late attributes.
4352 * sprint.adb: Handle quantified expression with either loop or iterator
4353 specification.
4354 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4355 iterator.
4356
4357 2011-08-29 Vincent Celier <celier@adacore.com>
4358
4359 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4360 Binder or Linker of the main project file.
4361
4362 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4363
4364 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4365 unit.
4366
4367 2011-08-29 Yannick Moy <moy@adacore.com>
4368
4369 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4370
4371 2011-08-29 Yannick Moy <moy@adacore.com>
4372
4373 * exp_ch11.adb: Minor expansion of comment.
4374
4375 2011-08-29 Yannick Moy <moy@adacore.com>
4376
4377 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4378
4379 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4380
4381 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4382 interpretation, set the type before resolving the operands, because
4383 legality checks on an exponention operand need to know the type of the
4384 context.
4385
4386 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4387
4388 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4389 cleanups on a master if the instance is within a generic unit.
4390 Complement to the corresponding fix to inline.adb for K520-030.
4391
4392 2011-08-29 Tristan Gingold <gingold@adacore.com>
4393
4394 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4395 occurrence.
4396 * exp_intr.adb: Minor comment fix.
4397
4398 2011-08-29 Bob Duff <duff@adacore.com>
4399
4400 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4401 Delay_Required was used as an uninitialized variable.
4402
4403 2011-08-29 Robert Dewar <dewar@adacore.com>
4404
4405 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4406 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4407 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4408
4409 2011-08-29 Thomas Quinot <quinot@adacore.com>
4410
4411 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4412 Remove unused variables.
4413
4414 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4415
4416 * sem_res.adb: Remove Build_Explicit_Dereference.
4417 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4418 from sem_res.adb, used in analysis of additional constructs.
4419 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4420 expansion of iterators.
4421 (Is_Object_Reference): Recognize variables rewritten as explicit
4422 dereferences in Ada2012.
4423 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4424 Reversible_Iterator names, for expansion of Ada2012 iterators.
4425 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4426 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4427 linked list container.
4428 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4429 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4430
4431 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4432
4433 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4434 containers.
4435
4436 2011-08-29 Vincent Celier <celier@adacore.com>
4437
4438 * make.adb (Gnatmake): Get the maximum number of simultaneous
4439 compilation processes after the Builder switches has been scanned, as
4440 there may include -jnn.
4441
4442 2011-08-29 Matthew Heaney <heaney@adacore.com>
4443
4444 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4445
4446 2011-08-29 Tristan Gingold <gingold@adacore.com>
4447
4448 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4449 GNAT_DRIVER_COMMAND_LINE to 255.
4450
4451 2011-08-29 Pascal Obry <obry@adacore.com>
4452
4453 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4454 reformatting and style fix (class attribute casing).
4455
4456 2011-08-29 Yannick Moy <moy@adacore.com>
4457
4458 * exp_ch11.adb: Yet another case where expansion should be common
4459 between CodePeer and Alfa.
4460
4461 2011-08-29 Yannick Moy <moy@adacore.com>
4462
4463 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4464
4465 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4466
4467 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4468 incomplete type and its completion match.
4469
4470 2011-08-29 Yannick Moy <moy@adacore.com>
4471
4472 * exp_ch13.adb: Adjust previous change.
4473
4474 2011-08-29 Robert Dewar <dewar@adacore.com>
4475
4476 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4477 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4478 Minor reformatting.
4479
4480 2011-08-29 Emmanuel Briot <briot@adacore.com>
4481
4482 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4483 initialize aggregated projects.
4484
4485 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4486
4487 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4488 depth of candidates to resolve a potentially spurious ambiguity between
4489 two visible subprograms.
4490
4491 2011-08-29 Yannick Moy <moy@adacore.com>
4492
4493 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4494 Requires/Ensures.
4495 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4496 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4497 Requires/Ensures.
4498
4499 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4500
4501 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4502 Add comment.
4503
4504 2011-08-29 Thomas Quinot <quinot@adacore.com>
4505
4506 * sem_res.adb: Minor reformatting.
4507
4508 2011-08-29 Johannes Kanig <kanig@adacore.com>
4509
4510 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4511 mode.
4512 * gnat1drv.adb (Adjust_Global_Switches): Set
4513 Use_Expressions_With_Actions to False in ALFA mode.
4514 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4515 ALFA mode.
4516
4517 2011-08-29 Yannick Moy <moy@adacore.com>
4518
4519 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4520 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4521 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4522 tagged types and dispatching calls in Alfa mode.
4523
4524 2011-08-29 Javier Miranda <miranda@adacore.com>
4525
4526 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4527 we do not report an error on an Empty node.
4528
4529 2011-08-29 Geert Bosch <bosch@adacore.com>
4530
4531 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4532 a-nlrear.o and a-nurear.o.
4533
4534 2011-08-29 Robert Dewar <dewar@adacore.com>
4535
4536 * freeze.adb: Minor code reorganization.
4537 Minor reformatting.
4538 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4539 sem_ch6.adb: Minor reformatting
4540
4541 2011-08-29 Tristan Gingold <gingold@adacore.com>
4542
4543 * s-except.ads, s-except.adb: Provide dummy body.
4544
4545 2011-08-29 Yannick Moy <moy@adacore.com>
4546
4547 * sem_warn.adb (Within_Postcondition): Take into account the case of
4548 an Ensures component in a Test_Case.
4549
4550 2011-08-29 Tristan Gingold <gingold@adacore.com>
4551
4552 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4553 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4554 System_Exceptions_Debug
4555 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4556 * a-except.adb: With and use System.Exceptions_Debug instead of
4557 System.Exceptions.
4558 * a-except-2005.adb: Likewise.
4559 * s-assert.adb: Likewise.
4560 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4561 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4562 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4563 s-excdeb. Update dependencies.
4564 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4565 as these no longer need external libraries.
4566
4567 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4568
4569 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4570 exponentiation operator on universal values in a context that requires
4571 a fixed-point type.
4572
4573 2011-08-29 Tristan Gingold <gingold@adacore.com>
4574
4575 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4576 before calling notify_handled_exception.
4577 * a-exextr.adb: Fix comment.
4578
4579 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4580
4581 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4582 Finalize_Address of the access type's finalization master.
4583 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4584 access type's finalization master. Add a guard to prevent
4585 Associated_Storage_Pool from being set on .NET/JVM.
4586 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4587 attribute Finalize_Address of the access type's finalization master.
4588 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4589 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4590 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4591 RE_Unit_Table.
4592 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4593 use clause for System.IO
4594 (Detach): Relax the assertion, to be reinstated later.
4595 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4596 Relax the assertion on Finalize_Address, to be reinstated later.
4597 (Is_Empty_List): New routine.
4598 (pm): New debug routine.
4599 (Set_Finalize_Address): New routine.
4600 * s-finmas.ads (pm): New debug routine.
4601 (Set_Finalize_Address): New routine.
4602 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4603
4604 2011-08-29 Tristan Gingold <gingold@adacore.com>
4605
4606 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4607 Remove convention C.
4608
4609 2011-08-29 Tristan Gingold <gingold@adacore.com>
4610
4611 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4612 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4613 (Finalize_TCB): Remove its finalization.
4614 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4615 * s-soflin.adb (NT_Exc_Stack): Remove
4616 (Get_Exc_Stack_Addr_NT): Likewise.
4617 (Get_Exc_Stack_Addr_Soft): Likewise.
4618 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4619 (Get_Exc_Stack_Addr): Likewise.
4620 (Get_Exc_Stack_Addr_Soft): Likewise
4621 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4622 (Exc_Stack_Ptr_T): Likewise.
4623 (Private_Data): Remove Exc_Stack_Ptr component.
4624
4625 2011-08-29 Tristan Gingold <gingold@adacore.com>
4626
4627 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4628
4629 2011-08-29 Tristan Gingold <gingold@adacore.com>
4630
4631 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4632
4633 2011-08-29 Geert Bosch <bosch@adacore.com>
4634
4635 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4636 L2_Norm, Swap_Column): New generic subprograms
4637 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4638 L2_Norm, Swap_Column): Implement new subprograms in order to
4639 eliminate dependency on BLAS and LAPACK libraries in
4640 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4641 version. Forward_Eliminate/Back_Substitute can be used to put a
4642 matrix in row echelon or reduced row echelon form using partial
4643 pivoting.
4644 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4645 Swap_Column): Instantiate from System.Generic_Array_Operations.
4646 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4647 (Sqrt): Local function for simple computation of square root without
4648 adding dependencies on Generic_Elementary_Functions.
4649 (Swap): New subprogram to exchange floating point numbers.
4650 (Inverse): Reimplement using Jordan-Gauss elimination.
4651 (Jacobi): New procedure implementing Jacobi's method for computation
4652 of eigensystems, based on Rutishauser's implementation.
4653 (L2_Norm): Implement directly using the inner product.
4654 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4655 decreasing eigenvalue as required by the Ada RM.
4656 (Swap_Column): New helper procedure for Sort_Eigensystem.
4657 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4658 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4659 Sort_Eigensystems.
4660
4661 2011-08-29 Thomas Quinot <quinot@adacore.com>
4662
4663 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4664 statements line.
4665
4666 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4667
4668 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4669 than the current node.
4670 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4671 Finalization_Master. The list headers have two fields instead of three.
4672 This should fix alignment issue but subpool allocations are now
4673 unusable. Alphabetize subprograms.
4674 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4675 the size of the header when converting the beginning of the object to
4676 a FM_Node. Set the master's Finalize_Address attribute if not already
4677 set.
4678 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4679 header when converting the beginning of the object to a FM_Node.
4680
4681 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4682
4683 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4684 reraise when compiling for CodePeer.
4685
4686 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4687
4688 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4689 now needed by a-convec.adb. Fix warning.
4690
4691 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4692
4693 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4694 processing of TSS routine Finalize_Address when compiling in
4695 CodePeer_Mode.
4696
4697 2011-08-29 Thomas Quinot <quinot@adacore.com>
4698
4699 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4700 sem_warn.adb: Minor reformatting.
4701
4702 2011-08-29 Emmanuel Briot <briot@adacore.com>
4703
4704 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4705 languages from aggregated projects.
4706
4707 2011-08-29 Yannick Moy <moy@adacore.com>
4708
4709 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4710 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4711 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4712 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4713 for stubs are traversed too when parameter is set
4714 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4715 (Traverse_Declarations_Or_Statements): Do the special traversing for
4716 stubs when required.
4717 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4718 return subprogram or package body from stub.
4719 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4720 stubs without prior subprogram decl.
4721
4722 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4723
4724 * gnat_ugn.texi: Fix typo.
4725
4726 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4727
4728 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4729 which accounts for size vs alignment issues and calculates the size of
4730 the list header.
4731 (Deallocate_Any_Controlled): Ditto.
4732 (Nearest_Multiple_Rounded_Up): New routine.
4733
4734 2011-08-29 Tristan Gingold <gingold@adacore.com>
4735
4736 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4737 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4738 (Set_Exception_Msg): Ditto.
4739 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4740 Private_Data.
4741 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4742 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4743 (Raise_With_Msg): Remove Cleanup_Flag.
4744 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4745 Clean_Flag and Private_Data components.
4746
4747 2011-08-29 Yannick Moy <moy@adacore.com>
4748
4749 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4750 in CodePeer mode.
4751 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4752 of an explicitly declared type, so that the base types of the original
4753 type and this generated type are the same, and a "type" (not a subtype
4754 like previously).
4755 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4756 small" in Alfa mode, like in CodePeer mode.
4757 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4758 clauses in Alfa mode.
4759
4760 2011-08-29 Javier Miranda <miranda@adacore.com>
4761
4762 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4763 function to the package spec.
4764 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4765 internally generated bodies of null procedures locate the internally
4766 generated spec enforcing mode conformance.
4767 (Is_Interface_Conformant): Ensure that the controlling formal of the
4768 primitives match.
4769
4770 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4771
4772 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4773 reject the pragma if it appears to apply to a formal subprogram.
4774
4775 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4776
4777 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4778 inner expression, to prevent double evaluation.
4779
4780 2011-08-29 Tristan Gingold <gingold@adacore.com>
4781
4782 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4783 they were unused.
4784 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4785 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4786 (Raise_Current_Excep): Adjust call.
4787 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4788
4789 2011-08-29 Thomas Quinot <quinot@adacore.com>
4790
4791 * exp_disp.adb: Minor reformatting.
4792
4793 2011-08-29 Tristan Gingold <gingold@adacore.com>
4794
4795 * a-exexpr.adb (Setup_Exception): Removed.
4796 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4797 * a-except.adb (Exception_Propagation): Removed.
4798 * a-except-2005.adb (Setup_Exception): Removed.
4799 (Reraise): Remove call to Setup_Exception.
4800 (Reraise_Occurrence): Ditto.
4801 (Reraise_Occurrence_Always): Ditto.
4802 (Reraise_Occurrence_No_Defer): Ditto.
4803 (Transfer_Occurrence): Ditto.
4804 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4805 (Set_Exception_Msg): Ditto.
4806
4807 2011-08-29 Robert Dewar <dewar@adacore.com>
4808
4809 * a-convec.adb, exp_disp.adb: Minor reformatting.
4810
4811 2011-08-29 Tristan Gingold <gingold@adacore.com>
4812
4813 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4814
4815 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4816
4817 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4818 Exception_Handlers to No_List instead of Empty_List in the case where
4819 there are no handlers.
4820
4821 2011-08-29 Tristan Gingold <gingold@adacore.com>
4822
4823 * gcc-interface/gigi.h (enum standard_datatypes): Add
4824 ADT_reraise_zcx_decl
4825 (reraise_zcx_decl): New macro.
4826 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4827 (gigi): Set reraise_zcx_decl.
4828 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4829 (gnat_to_gnu): Handle N_Raise_Statement.
4830
4831 2011-08-29 Robert Dewar <dewar@adacore.com>
4832
4833 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4834 a-undesu.adb: Minor reformatting.
4835
4836 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4837
4838 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4839 table, accept an unfrozen untagged component if it is an actual for a
4840 formal incomplete type.
4841 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4842 provide new iterator forms over vectors.
4843 Introduce type Iterator in package body to implement operations of
4844 Reversible_Iterator interface.
4845 * a-iteint.ads: Make package pure so it is usable with new container
4846 packages, that are categorized Remote_Types.
4847
4848 2011-08-29 Robert Dewar <dewar@adacore.com>
4849
4850 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4851
4852 2011-08-29 Bob Duff <duff@adacore.com>
4853
4854 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4855 of <>, because this is the routine that checks for dimensionality
4856 errors (for example, for a two-dimensional array, (others => <>) should
4857 be (others => (others => <>)).
4858
4859 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4860
4861 * impunit.adb: Add new run-time units.
4862 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4863 s-stposu.ads, s-stposu.adb: Code clean up.
4864 Handle protected class-wide or task class-wide types
4865 Handle C/C++/CIL/Java types.
4866 * s-spsufi.adb, s-spsufi.ads: New files.
4867
4868 2011-08-29 Yannick Moy <moy@adacore.com>
4869
4870 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4871 library-level subprogram.
4872 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4873 placement.
4874 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4875 component.
4876 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4877 component.
4878 * gnat_rm.texi: Update doc for Test_Case pragma.
4879
4880 2011-08-29 Tristan Gingold <gingold@adacore.com>
4881
4882 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4883 convention C.
4884 (GCC_Exception_Access): New type.
4885 (Unwind_DeleteException): New imported procedure
4886 (Foreign_Exception): Import it.
4887 (GNAT_GCC_Exception): Simply have the occurrence inside.
4888 (To_GCC_Exception): New function.
4889 (To_GNAT_GCC_Exception): New function.
4890 (GNAT_GCC_Exception_Cleanup): New procedure..
4891 (Propagate_GCC_Exception): New procedure.
4892 (Reraise_GCC_Exception): New procedure.
4893 (Setup_Current_Excep): New procedure.
4894 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4895 (Unwind_RaiseException): Ditto.
4896 (Unwind_ForcedUnwind): Ditto.
4897 (Remove): Removed.
4898 (Begin_Handler): Change type of parameter.
4899 (End_Handler): Ditto. Now delete the exception if still present.
4900 (Setup_Key): Removed.
4901 (Is_Setup_And_Not_Propagated): Removed.
4902 (Set_Setup_And_Not_Propagated): Ditto.
4903 (Clear_Setup_And_Not_Propagated): Ditto.
4904 (Save_Occurrence_And_Private): Ditto.
4905 (EID_For): Add 'not null' constraint on parameter.
4906 (Setup_Exception): Does nothing.
4907 (Propagate_Exception): Simplified.
4908 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4909 re-raise is not expanded anymore.
4910 * s-except.ads (Foreign_Exception): New exception - placeholder for
4911 non Ada exceptions.
4912 * raise-gcc.c (__gnat_setup_current_excep): Declare
4913 (CXX_EXCEPTION_CLASS): Define (not yet used)
4914 (GNAT_EXCEPTION_CLASS): Define.
4915 (is_handled_by): Handle foreign exceptions.
4916 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4917
4918 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4919
4920 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4921
4922 2011-08-29 Thomas Quinot <quinot@adacore.com>
4923
4924 * a-synbar-posix.adb: Minor reformatting.
4925
4926 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4927
4928 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4929 a-exetim-default.ads (Interrupt_Clocks_Supported,
4930 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4931 definitions to be compliant with AI-0171. The target systems do not
4932 support separate account for the execution time of interrupt handlers.
4933
4934 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4935
4936 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4937 in the barrier to put first the easiest to evaluate (and the one which
4938 will be True more often). More efficient.
4939
4940 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4941
4942 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4943
4944 2011-08-29 Bob Duff <duff@adacore.com>
4945
4946 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4947 attributes that are now aspects, as specified by AI05-0229-1.
4948 * sem_ch13.adb (Analyze_Aspect_Specifications,
4949 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4950 pragmas or attribute references, as appropriate.
4951
4952 2011-08-29 Robert Dewar <dewar@adacore.com>
4953
4954 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4955 a-synbar-posix.ads: Minor reformatting.
4956
4957 2011-08-29 Yannick Moy <moy@adacore.com>
4958
4959 * snames.ads-tmpl: Add name Force.
4960
4961 2011-08-29 Pascal Obry <obry@adacore.com>
4962
4963 * prj-nmsc.adb: Minor reformatting.
4964
4965 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4966
4967 * a-exetim.ads (Interrupt_Clocks_Supported,
4968 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4969 definitions to be compliant with AI-0171.
4970
4971 2011-08-29 Robert Dewar <dewar@adacore.com>
4972
4973 * a-ngelfu.adb: Add comments.
4974
4975 2011-08-29 Geert Bosch <bosch@adacore.com>
4976
4977 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4978 the closest machine number to Pi / 2.0.
4979
4980 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4981
4982 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4983 package Ada.Synchronous_Barriers.
4984 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4985 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4986 default implementation using protected objects and another one
4987 a-synbar-posix using POSIX barriers as the underlying support.
4988 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4989 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4990 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4991 Clean up dependencies.
4992 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4993
4994 2011-08-29 Robert Dewar <dewar@adacore.com>
4995
4996 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4997 exp_dist.adb: Minor code reorganization.
4998 Minor reformatting.
4999
5000 2011-08-29 Thomas Quinot <quinot@adacore.com>
5001
5002 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5003 primitive operation must support external streaming if it is not a
5004 controlling access result.
5005
5006 2011-08-29 Thomas Quinot <quinot@adacore.com>
5007
5008 * sinfo.ads, sem_ch7.adb: Minor reformatting.
5009
5010 2011-08-29 Bob Duff <duff@adacore.com>
5011
5012 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5013 restriction on allocators, as required by AI05-0013-1.
5014 * restrict.ads: Minor comment fix.
5015
5016 2011-08-29 Tristan Gingold <gingold@adacore.com>
5017
5018 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5019 (To_Jmpbuf_Address): Ditto
5020 (builtin_longjmp): Ditto
5021
5022 2011-08-29 Thomas Quinot <quinot@adacore.com>
5023
5024 * sem_res.adb: Minor reformatting.
5025
5026 2011-08-29 Vincent Celier <celier@adacore.com>
5027
5028 * make.adb (Gnatmake): Move special processing for VM targets after the
5029 call to Get_Target_Parameters.
5030
5031 2011-08-29 Thomas Quinot <quinot@adacore.com>
5032
5033 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5034
5035 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5036
5037 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5038 where an anonymous access discriminant of a limited designated type
5039 appears in a non-immutably limited discriminated type and issue an
5040 error message. Add local variable Desig_T and replace all occurrences
5041 of Designated_Type.
5042
5043 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5044
5045 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5046 implementation is compliant to RM D.15(15/2) after the modification
5047 imposed by AI05-0094-1 (binding interpretation).
5048
5049 2011-08-29 Robert Dewar <dewar@adacore.com>
5050
5051 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5052 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5053
5054 2011-08-29 Thomas Quinot <quinot@adacore.com>
5055
5056 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5057 the scope name, do not report a missing label as a style violation (it
5058 will be diagnosed as an illegality).
5059 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5060 variant records: Get_Enum_Lit_From_Pos already returns a usage
5061 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5062 on Expr in Integer_Literal case so that it can be used by
5063 Build_To_Any_Call.
5064
5065 2011-08-29 Tristan Gingold <gingold@adacore.com>
5066
5067 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5068 Adjust comment.
5069 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5070 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5071 exception handler.
5072 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5073 Build_Abort_Block_Handler to build the exception handler. Do not
5074 undefer aborts for the Abort_Signal exception handler if back-end
5075 exception mechanism.
5076 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5077 back_end exceptions for all others and abort_signal.
5078 * s-except.ads (ZCX_By_Default): New constant.
5079 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5080 (Raise_Exception_Always): Ditto.
5081 (Raise_From_Signal_Handler): Ditto.
5082 (Raise_With_Location_And_Msg): Ditto.
5083 (Raise_With_Msg): Ditto.
5084 (Reraise): Ditto.
5085 (Reraise_Occurence): Ditto.
5086 (Reraise_Occurrence_Always): Ditto.
5087 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5088 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5089
5090 2011-08-29 Thomas Quinot <quinot@adacore.com>
5091
5092 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5093
5094 2011-08-29 Robert Dewar <dewar@adacore.com>
5095
5096 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5097 Minor code reorganization.
5098
5099 2011-08-29 Bob Duff <duff@adacore.com>
5100
5101 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5102 2012, not just Ada 2005.
5103
5104 2011-08-29 Vincent Celier <celier@adacore.com>
5105
5106 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5107 with a project file or with gprbuid, if -gnatep= is specified, the
5108 builder may need to be invoked with -x.
5109
5110 2011-08-29 Tristan Gingold <gingold@adacore.com>
5111
5112 * a-exexpr-gcc.adb: Minor comment fix.
5113
5114 2011-08-29 Robert Dewar <dewar@adacore.com>
5115
5116 * sem_ch8.adb: Minor reformatting.
5117
5118 2011-08-29 Bob Duff <duff@adacore.com>
5119
5120 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5121 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5122 treating "some" as unreserved in earlier Ada versions. This is now
5123 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5124 rather than Name_Some, since Tok_Some is now recognized as reserved.
5125 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5126 reserved word.
5127 * scans.ads: Minor comment fixes.
5128 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5129 for other language versions.
5130 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5131 treating "some" as unreserved in earlier Ada versions. This is now
5132 handled in Snames.Is_Keyword_Name.
5133 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5134 Ada 2012.
5135 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5136 unreserved in earlier Ada versions. This is now handled in
5137 Snames.Is_Keyword_Name.
5138 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5139 words as for other language versions.
5140 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5141 Ada 2012, not just Ada 2005.
5142
5143 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5144
5145 * sem_ch13.adb: Additional semantic checks for aspects involved in
5146 iterators.
5147
5148 2011-08-29 Matthew Heaney <heaney@adacore.com>
5149
5150 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5151 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5152 Container parameter.
5153 (Ancestor_Find): ditto.
5154
5155 2011-08-29 Thomas Quinot <quinot@adacore.com>
5156
5157 * par-endh.adb: Minor reformatting.
5158
5159 2011-08-29 Tristan Gingold <gingold@adacore.com>
5160
5161 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5162 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5163 (Adjust_N_CLeanups_For): Remove.
5164 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5165 stack is reached.
5166 (Propgate_Exception): Adjust.
5167 * raise-gcc.c: Add a few static/const.
5168 (Adjust_N_Cleanups_For): Remove declaration.
5169 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5170
5171 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5172
5173 * sem_ch8.adb: Use type of function return when rewriting as object
5174 declaration.
5175
5176 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5177
5178 * sem_type.adb: Minor reformatting.
5179
5180 2011-08-29 Robert Dewar <dewar@adacore.com>
5181
5182 * makeutl.adb: Minor reformatting.
5183
5184 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5185
5186 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5187 function call of a limited type, the expansion of the renaming is
5188 complicated by the presence of various temporaries and subtypes that
5189 capture constraints of the renamed object.
5190 Rewrite node as an object declaration, whose expansion is simpler.
5191 Given that the object is limited there is no copy involved and no
5192 performance hit.
5193
5194 2011-08-29 Robert Dewar <dewar@adacore.com>
5195
5196 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5197 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5198
5199 2011-08-29 Tristan Gingold <gingold@adacore.com>
5200
5201 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5202 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5203 system-linux-hppa.ads, system-linux-s390.ads,
5204 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5205 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5206 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5207 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5208 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5209 system-solaris-sparc.ads, system-lynxos-x86.ads,
5210 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5211 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5212 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5213 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5214 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5215 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5216 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5217 * opt.ads: Adjust comment.
5218 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5219 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5220 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5221
5222 2011-08-29 Emmanuel Briot <briot@adacore.com>
5223
5224 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5225 file name is specified on the gnatmake or gprbuild command line, and
5226 before we search for that file in the project.
5227
5228 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5229
5230 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5231 used to determine whether a possible interpretation for an overloadable
5232 entity is declared within the current instantiation and should be
5233 included in the candidate set.
5234
5235 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5236
5237 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5238
5239 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5240
5241 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5242 access subtype is access_to_subprogram, when applying checks for
5243 RM 3.10.2 (27).
5244
5245 2011-08-29 Matthew Heaney <heaney@adacore.com>
5246
5247 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5248 for sibling when common parent.
5249
5250 2011-08-29 Thomas Quinot <quinot@adacore.com>
5251
5252 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5253 "pragma_".
5254
5255 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5256
5257 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5258 for the return type when in ASIS mode.
5259
5260 2011-08-29 Vincent Celier <celier@adacore.com>
5261
5262 * make.adb (Gnatmake): Get the default search dirs, then the target
5263 parameters after getting the Builder switches, as the Builder switches
5264 may include --RTS= and that could change the default search dirs.
5265
5266 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5267
5268 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5269 Make_Final_Call. Move the processing for class-wide types before the
5270 processing for derivations from [Limited_]Controlled.
5271 (Make_Final_Call): Move the processing for class-wide types before the
5272 processing for derivations from [Limited_]Controlled.
5273 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5274 Add code to account for alignments larger than the list header. Add a
5275 comment illustrating the structure of the allocated object + padding +
5276 header.
5277 (Deallocate_Any_Controlled): Add code to account for alignments larger
5278 than the list header.
5279
5280 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5281
5282 * sinfo.ads, sinfo.adb: New node kind
5283 N_Formal_Incomplete_Type_Definition, related flags.
5284 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5285 Parse formal incomplete types.
5286 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5287 sem_ch12.
5288 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5289 Formal incomplete types do not need completion.
5290 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5291 Validate_Incomplete_Type_Instance): New procedures to handle formal
5292 incomplete types.
5293 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5294 that corresponds to a formal incomplete type.
5295 * sprint.adb: Handle formal incomplete type declarations.
5296 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5297 an insertion point.
5298
5299 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5300
5301 * a-fihema.ads, a-fihema.adb: Unit removed.
5302 * a-undesu.ads, a-undesu.adb: New unit implementing
5303 Ada.Unchecked_Deallocate_Subpool.
5304 * einfo.adb: Remove Associated_Collection from the node usage.
5305 Add Finalization_Master to the node usage.
5306 (Associated_Collection): Removed.
5307 (Finalization_Master): New routine.
5308 (Set_Associated_Collection): Removed.
5309 (Set_Finalization_Master): New routine.
5310 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5311 Finalization_Master to the output.
5312 * einfo.ads: Remove attribute Associated_Collection and its uses in
5313 entities.
5314 Add new attribute Finalization_Master along with its uses in entitites.
5315 (Associated_Collection): Removed along with its pragma import.
5316 (Finalization_Master): New routine along with a pragma import.
5317 (Set_Associated_Collection): Removed along with its pragma import.
5318 (Set_Finalization_Master): New routine along with a pragma import.
5319 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5320 Build_Finalization_Collection with Build_Finalization_Master.
5321 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5322 before the bodies of the predefined routines. Add comment explaining
5323 this. Replace call to Build_Finalization_Collection with
5324 Build_Finalization_Master.
5325 (Freeze_Type): Replace call to Build_Finalization_Collection with
5326 Build_Finalization_Master.
5327 (Make_Finalize_Address_Body): Comment reformatting.
5328 (Make_Predefined_Primitive_Specs): Code reformatting.
5329 (Stream_Operation_OK): Update comment mentioning finalization
5330 collections. Replace RE_Finalization_Collection with
5331 RE_Finalization_Master.
5332 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5333 Associated_Collection with Finalization_Master. Replace call to
5334 Build_Finalization_Collection with Build_Finalization_Master.
5335 (Expand_Allocator_Expression): Replace call to Associated_Collection
5336 with Finalization_Master. Replace call to Set_Associated_Collection with
5337 Set_Finalization_Master. Remove the generation of
5338 Set_Finalize_Address_Ptr.
5339 (Expand_N_Allocator): Replace call to Associated_Collection with
5340 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5341 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5342 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5343 comment on usage. Replace call to Needs_BIP_Collection with
5344 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5345 BIP_Finalization_Master. Update all comments which mention finalization
5346 collections. Replace Associated_Collection with
5347 Finalization_Master. Replace Build_Finalization_Collection with
5348 Build_Finalization_Master.
5349 (BIP_Formal_Suffix): Update BIP_Collection's case.
5350 (Build_Heap_Allocator): Update the related comment. Rename local
5351 variable Collect to Fin_Mas_Id and update its occurrences. Update
5352 comments which mention finalization collections. Replace
5353 Set_Associated_Collection with Set_Finalization_Master.
5354 (Expand_Call): Update the code which detects a special piece of library
5355 code for .NET/JVM.
5356 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5357 Add_Collection_Actual_To_Build_In_Place_Call with
5358 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5359 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5360 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5361 Add_Collection_Actual_To_Build_In_Place_Call with
5362 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5363 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5364 Add_Collection_Actual_To_Build_In_Place_Call with
5365 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5366 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5367 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5368 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5369 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5370 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5371 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5372 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5373 Replace the call to Associated_Collection with Finalization_Master.
5374 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5375 Update the way finalization master names are generated. Update the
5376 retrieval of the correct access type which will carry the pool and
5377 master attributes.
5378 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5379 (Make_Finalize_Address_Body): Abstract types do not need
5380 Finalize_Address. Code reformatting.
5381 (Make_Finalize_Address_Stmts): Update comment on usage.
5382 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5383 (Process_Declarations): Update comments.
5384 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5385 Build_Finalization_Master. Update associated comment.
5386 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5387 * exp_ch13.adb: Update comments which mention finalization collections.
5388 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5389 with Finalization_Master.
5390 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5391 create calls to routines Allocate_Any_Controlled and
5392 Deallocate_Any_Controlled.
5393 (Find_Finalize_Address): New routine.
5394 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5395 comparison.
5396 (Requires_Cleanup_Actions): Update the comment on freeze node
5397 inspection.
5398 * exp_util.ads: Remove comment on generated code for
5399 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5400 is better to simply look in the body.
5401 * freeze.adb (Freeze_All): Update the comment of finalization
5402 collections. Replace the call to Associated_Collection with
5403 Finalization_Master. Replace the call to Build_Finalization_Collection
5404 with Build_Finalization_Master.
5405 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5406 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5407 a-fihema.
5408 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5409 Ada.Finalization. Add processing for children of System.Storage_Pools.
5410 * rtsfind.ads: Remove the naming of second level children of
5411 Ada.Finalization.
5412 Remove Ada_Finalization_Heap_Management from the list of units.
5413 Remove subtype Ada_Finalization_Child.
5414 Remove the following subprogram entities:
5415
5416 RE_Allocate
5417 RE_Deallocate
5418 RE_Finalization_Collection
5419 RE_Finalization_Collection_Ptr
5420 RE_Set_Finalize_Address_Ptr
5421
5422 Add the naming of second level children of System.Storage_Pools.
5423 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5424 the list of units.
5425 Add subtype System_Storage_Pools_Child.
5426 Add the following subprogram entities to System.Finalization_Masters:
5427
5428 RE_Finalization_Master
5429 RE_Finalization_Master_Ptr
5430
5431 Add the following subprogram entities to System.Storage_Pools.Subpools:
5432
5433 RE_Allocate_Any_Controlled
5434 RE_Deallocate_Any_Controlled
5435 RE_Root_Storage_Pool_With_Subpools
5436 RE_Root_Subpool
5437 RE_Subpool_Handle
5438
5439 Move the following subprogram entities from
5440 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5441
5442 RE_Add_Offset_To_Address
5443 RE_Attach
5444 RE_Base_Pool
5445 RE_Detach
5446
5447 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5448 Set_Associated_Collection with Set_Finalization_Master.
5449 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5450 BIP_Finalization_Master is created.
5451 * s-finmas.adb: New unit System.Finalization_Masters.
5452 * s-finmas.ads: New unit System.Finalization_Masters.
5453 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5454 * s-stposu.ads, s-stposu.adb: New unit implementing
5455 System.Storage_Pools.Subpools.
5456
5457 2011-08-29 Bob Duff <duff@adacore.com>
5458
5459 * tbuild.adb: Add assertion.
5460
5461 2011-08-29 Thomas Quinot <quinot@adacore.com>
5462
5463 * s-pooglo.adb: Minor reformatting.
5464
5465 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5466
5467 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5468 an indexed component of a packed array whose element type is a record
5469 with a representation clause different from that of the right-hand
5470 side, generate a temporary to minimuze the number of bit-field
5471 operations generated.
5472
5473 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5474
5475 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5476 declarations, and thus are likely insertion points for actions.
5477
5478 2011-08-29 Bob Duff <duff@adacore.com>
5479
5480 * einfo.ads: Minor comment fix.
5481
5482 2011-08-29 Robert Dewar <dewar@adacore.com>
5483
5484 * frontend.adb, gnat1drv.adb: Minor reformatting.
5485
5486 2011-08-29 Tristan Gingold <gingold@adacore.com>
5487
5488 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5489 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5490 space in front of the header.
5491
5492 2011-08-29 Johannes Kanig <kanig@adacore.com>
5493
5494 * frontend.adb (Frontend): Exit after creating Standard package when
5495 -gnatd.H is present.
5496 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5497 present.
5498
5499 2011-08-29 Robert Dewar <dewar@adacore.com>
5500
5501 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5502 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5503 snames.ads-tmpl: Minor reformatting.
5504
5505 2011-08-29 Philippe Gil <gil@adacore.com>
5506
5507 * prj.adb (Reset_Units_In_Table): New procedure.
5508 Reset units to avoid access to freed memory.
5509
5510 2011-08-29 Thomas Quinot <quinot@adacore.com>
5511
5512 * get_scos.adb: When reading a P statement SCO without a pragma name
5513 (from an older ALI file), ensure that the Pragma_Name component is set
5514 to Unknown_Pragma (not left uninitialized).
5515
5516 2011-08-29 Vincent Celier <celier@adacore.com>
5517
5518 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5519 modified to compute correctly the object path of a SAL project that is
5520 extending another library project.
5521 (Write_Path_File): New procedure.
5522 * makeutl.ads (Directories): New table moved from Buildgpr
5523 (Get_Directories): New procedure moved from Buildgpr
5524 (Write_Path_File): New procedure
5525 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5526 paths before binding SALs, instead of Set_Ada_Paths.
5527 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5528 Prj.
5529 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5530 (Current_Source_Path_File_Of): New function
5531 (Set_Current_Object_Path_File_Of): New procedure
5532 (Current_Source_Object_File_Of): New function
5533 (Set_Current_Object_Path_File_Of): New procedure
5534 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5535 (Current_Source_Path_File_Of): New function
5536 (Set_Current_Object_Path_File_Of): New procedure
5537 (Current_Source_Object_File_Of): New function
5538 (Set_Current_Object_Path_File_Of): New procedure
5539
5540 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5541
5542 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5543 packed entity, use a bit-field assignment only if there is no change of
5544 representation.
5545
5546 2011-08-29 Thomas Quinot <quinot@adacore.com>
5547
5548 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5549 Is_RTU instead of using Chars comparisons.
5550
5551 2011-08-29 Thomas Quinot <quinot@adacore.com>
5552
5553 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5554 temporary object if the actual is constrained, and the discriminants
5555 read from the stream don't match.
5556
5557 2011-08-29 Tristan Gingold <gingold@adacore.com>
5558
5559 * sem_attr.adb, exp_attr.adb: Add handling of
5560 Attribute_System_Allocator_Alignment
5561 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5562 Attribute_System_Allocator_Alignment.
5563 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5564 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5565 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5566 get_target_system_allocator_alignment.
5567
5568 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5569
5570 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5571 dependencies.
5572
5573 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5574
5575 * exp_ch3.adb (In_Runtime): Fix typo.
5576
5577 2011-08-29 Bob Duff <duff@adacore.com>
5578
5579 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5580
5581 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5582
5583 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5584 and a separate tag assignment is generated, ensure that the tag
5585 assignment is analyzed.
5586
5587 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5588
5589 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5590 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5591 of statement lists that may contain local declarations.
5592 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5593 duplicate the triggering statements needed for the expansion of this
5594 construct, when the trigger is a dispatching call to a synchronized
5595 primitive.
5596
5597 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5598
5599 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5600 * bindgen.adb: Add comments.
5601 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5602 in CodePeer mode.
5603
5604 2011-08-29 Robert Dewar <dewar@adacore.com>
5605
5606 * exp_attr.adb: Minor reformatting.
5607 Minor code reorganization and commenting.
5608 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5609 reformatting.
5610
5611 2011-08-29 Thomas Quinot <quinot@adacore.com>
5612
5613 * get_scos.adb: Ignore chaining indicators not currently supported
5614 by Ada.
5615
5616 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5617
5618 * system.ads: Minor editing.
5619
5620 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5621
5622 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5623 CodePeer mode.
5624 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5625 Attribute_Elab_Subp_Body.
5626 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5627 * sem_util.adb: Update comments.
5628
5629 2011-08-29 Thomas Quinot <quinot@adacore.com>
5630
5631 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5632 pragma name for each SCO statement corresponding to a pragma.
5633
5634 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5635
5636 * opt.ads: Minor editing.
5637
5638 2011-08-29 Yannick Moy <moy@adacore.com>
5639
5640 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5641 that only made sense for CodePeer mode.
5642
5643 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5644
5645 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5646 which is no longer used.
5647 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5648 handling of the 64-bit division check.
5649 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5650 division available.
5651 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5652 longer used.
5653
5654 2011-08-29 Thomas Quinot <quinot@adacore.com>
5655
5656 * get_scos.adb: Minor reformatting.
5657
5658 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5659
5660 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5661 statement list is wrapped in a block, the block is explicitly analyzed
5662 in order to properly redecorate the entities and create a servicing
5663 finalizer.
5664
5665 2011-08-29 Tristan Gingold <gingold@adacore.com>
5666
5667 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5668 (Set_Zero_Cost_Handling): Remove.
5669
5670 2011-08-29 Thomas Quinot <quinot@adacore.com>
5671
5672 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5673
5674 2011-08-29 Geert Bosch <bosch@adacore.com>
5675
5676 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5677 instruction, as the latter may produce -0.0, which is not a valid VAX
5678 F float number.
5679 (Neg_G): Likewise for VAX F float.
5680
5681 2011-08-29 Robert Dewar <dewar@adacore.com>
5682
5683 * exp_util.adb: Minor reformatting.
5684
5685 2011-08-29 Yannick Moy <moy@adacore.com>
5686
5687 * sem_ch3.adb: Minor comment update.
5688
5689 2011-08-29 Thomas Quinot <quinot@adacore.com>
5690
5691 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5692 the operand type.
5693
5694 2011-08-29 Thomas Quinot <quinot@adacore.com>
5695
5696 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5697 current statement sequence on a generic instantiation or a subprogram
5698 declaration.
5699
5700 2011-08-29 Robert Dewar <dewar@adacore.com>
5701
5702 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5703 Minor reformatting.
5704
5705 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5706
5707 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5708 Correct the check which involves the freeze node of a controlled or
5709 access-to-controlled type.
5710
5711 2011-08-29 Geert Bosch <bosch@adacore.com>
5712
5713 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5714 statements.
5715 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5716 Asm statements.
5717
5718 2011-08-29 Yannick Moy <moy@adacore.com>
5719
5720 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5721 for every index type and component type that is not a subtype_mark.
5722 (Process_Subtype): Set Etype of subtype.
5723
5724 2011-08-29 Robert Dewar <dewar@adacore.com>
5725
5726 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5727 reorganization. Minor reformatting.
5728
5729 2011-08-29 Steve Baird <baird@adacore.com>
5730
5731 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5732 for CodePeer and ALFA modes.
5733
5734 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5735
5736 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5737 that comes from an enclosing scope if it is not the renaming of an
5738 actual, to handle properly a spurious ambiguity in an instance.
5739
5740 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5741
5742 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5743 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5744 use it instead of the Esize of the first parameter.
5745 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5746 above change.
5747 <Size>: Likewise. Call it for composite types on the RM size.
5748
5749 2011-08-29 Yannick Moy <moy@adacore.com>
5750
5751 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5752 * sem_util.adb (Unique_Name): Correct behaviour for names of
5753 compilation units.
5754
5755 2011-08-29 Yannick Moy <moy@adacore.com>
5756
5757 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5758 verification mode, analyze pragma expression for correctness, for
5759 pre/post on library-level subprogram, as it is not expanded later.
5760
5761 2011-08-29 Yannick Moy <moy@adacore.com>
5762
5763 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5764 in formal verification.
5765
5766 2011-08-29 Thomas Quinot <quinot@adacore.com>
5767
5768 * sem_util.adb: Minor reformatting.
5769 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5770 there's no pragma.
5771 * par_sco.ads, par_sco.adb: Update comments.
5772
5773 2011-08-29 Yannick Moy <moy@adacore.com>
5774
5775 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5776 associated getter/setter.
5777 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5778
5779 2011-08-29 Vincent Celier <celier@adacore.com>
5780
5781 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5782 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5783 with declarations for Language_Kind and Dependency_Kind for Ada.
5784 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5785 (Process_Compiler): Take into account the new attributes Dependency_Kind
5786 and Language_Kind.
5787 (Check_Configuration): Check if language kind is unit based, not if the
5788 language name is Ada.
5789 (Process_Exceptions_Unit_Based): Ditto
5790 (Add_Language): Remove default additions of language and dependency kind
5791 * prj.ads: Minor comment change
5792 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5793
5794 2011-08-29 Johannes Kanig <kanig@adacore.com>
5795
5796 * debug.adb: Update comments.
5797
5798 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5799
5800 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5801 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5802 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5803 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5804 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5805
5806 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5807
5808 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5809 (GNATLIBCFLAGS_FOR_C): Replace
5810 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5811 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5812 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5813 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5814
5815 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5816
5817 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5818
5819 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5820
5821 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5822
5823 2011-08-05 Nicolas Roche <roche@adacore.com>
5824
5825 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5826 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5827 canadian cross.
5828 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5829
5830 2011-08-05 Matthew Heaney <heaney@adacore.com>
5831
5832 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5833 subprogram bodies declared out-of-order.
5834
5835 2011-08-05 Yannick Moy <moy@adacore.com>
5836
5837 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5838 entities directly in package Standard, otherwise skip the standard
5839 prefix.
5840
5841 2011-08-05 Robert Dewar <dewar@adacore.com>
5842
5843 * a-cbmutr.adb: Minor reformatting
5844 (Allocate_Node): refactor node allocation algorithm
5845
5846 2011-08-05 Robert Dewar <dewar@adacore.com>
5847
5848 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5849 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5850 mode.
5851 (Analyze_Pragma, case Check_Policy): Ditto.
5852 * sem_prag.ads (Check_Disabled): New function
5853 * snames.ads-tmpl: Add Name_Disable.
5854
5855 2011-08-05 Robert Dewar <dewar@adacore.com>
5856
5857 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5858 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5859
5860 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5861
5862 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5863 that appears in a generic formal part and applies to a formal
5864 subprogram.
5865
5866 2011-08-05 Robert Dewar <dewar@adacore.com>
5867
5868 * a-cbmutr.ads: Minor reformatting.
5869
5870 2011-08-05 Matthew Heaney <heaney@adacore.com>
5871
5872 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5873 to check count, check sign of value instead.
5874 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5875 (Copy_Subtree): allocate copy of source element
5876 (Equal_Subtree): compare elements, not access objects
5877
5878 2011-08-05 Vincent Celier <celier@adacore.com>
5879
5880 * gnat_ugn.texi: Fix VMS alternative.
5881
5882 2011-08-05 Thomas Quinot <quinot@adacore.com>
5883
5884 * sem_ch11.adb: Add comment.
5885
5886 2011-08-05 Robert Dewar <dewar@adacore.com>
5887
5888 * exp_util.adb: Minor comment fix.
5889
5890 2011-08-05 Robert Dewar <dewar@adacore.com>
5891
5892 * scng.adb (Error_Unterminated_String): Improve flag position when
5893 comma present.
5894
5895 2011-08-05 Matthew Heaney <heaney@adacore.com>
5896
5897 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5898 tree containers).
5899 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5900 multiway tree containers.
5901
5902 2011-08-05 Robert Dewar <dewar@adacore.com>
5903
5904 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5905 * stylesw.adb: Implement -gnatyC to control comment spacing
5906 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5907 -gnatyc/C).
5908 * usage.adb: Add line for -gnatyC.
5909
5910 2011-08-05 Robert Dewar <dewar@adacore.com>
5911
5912 * gnat_ugn.texi: Document -gnatyC.
5913 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5914 synonym for COMMENTS2).
5915
5916 2011-08-05 Robert Dewar <dewar@adacore.com>
5917
5918 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5919 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5920 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5921 a-comutr.ads, lib-xref.adb: Minor reformatting.
5922
5923 2011-08-05 Robert Dewar <dewar@adacore.com>
5924
5925 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5926 warning if there is an exception handler present.
5927
5928 2011-08-05 Pascal Obry <obry@adacore.com>
5929
5930 * a-iteint.ads: Fix copyright year.
5931
5932 2011-08-05 Thomas Quinot <quinot@adacore.com>
5933
5934 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5935 statement SCO for a USE clause or a representation clause.
5936
5937 2011-08-05 Yannick Moy <moy@adacore.com>
5938
5939 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5940 between body and spec for stub.
5941 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5942 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5943 pragma precondition or postcondition, for which the enclosing
5944 subprogram or package in the AST is not the desired one, return empty.
5945
5946 2011-08-05 Thomas Quinot <quinot@adacore.com>
5947
5948 * g-expect.adb: Minor reformatting.
5949
5950 2011-08-05 Bob Duff <duff@adacore.com>
5951
5952 * a-fihema.adb: Comment out OS_Lib.
5953
5954 2011-08-05 Matthew Heaney <heaney@adacore.com>
5955
5956 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5957 (unbounded multiway tree containers) and a-iteint.ads.
5958 * a-comutr.ads, a-comutr.adb:
5959 This is the new Ada 2012 unit for unbounded multiway tree containers
5960 * a-cimutr.ads, a-cimutr.adb
5961 This is the new Ada 2012 unit for indefinite multiway tree containers
5962 * a-iteint.ads: New file.
5963
5964 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5965
5966 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5967
5968 2011-08-05 Bob Duff <duff@adacore.com>
5969
5970 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5971 subpools.
5972 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5973
5974 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5975
5976 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5977 general indexing aspects of Ada2012. Called when analyzing indexed
5978 components when other interpretations fail.
5979 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5980 in an expression context where overloading is meaningful. This excludes
5981 the occurrence in an aspect specification (efficiency only).
5982 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5983 related to iterators can be set by an attribute specification, but
5984 cannot be queried.
5985 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5986 Constant_Indexing and Variable_Indexing.
5987 (Check_Indexing_Functions): New procedure to perform legality checks.
5988 Additional semantic checks at end of declarations.
5989
5990 2011-08-05 Sergey Rybin <rybin@adacore.com>
5991
5992 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5993 order of calling Tree_Write/Tree_Read routines made for aspects.
5994
5995 2011-08-05 Bob Duff <duff@adacore.com>
5996
5997 * a-fihema.adb (Finalize): Fix race condition.
5998
5999 2011-08-05 Yannick Moy <moy@adacore.com>
6000
6001 * sem_ch12.adb (Analyze_Package_Instantiation,
6002 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6003 mode.
6004
6005 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6006
6007 * sem_type.adb (Specific_Type): in an instance, the type-specific
6008 operand of an equality check that involves null may have a private
6009 type. Use full view to determine legality of construct.
6010
6011 2011-08-05 Vincent Celier <celier@adacore.com>
6012
6013 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6014 delete or close the file when the call to gnatmake was successful.
6015
6016 2011-08-05 Yannick Moy <moy@adacore.com>
6017
6018 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6019 Global_Discard_Names.
6020
6021 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6022
6023 * sinfo.ads: comments on use of entity field for aspect specifications.
6024
6025 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6026
6027 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6028 node is not itself an entity but a selected component, it is a
6029 rewritten parameterless call to an en enclosing synchronized operation,
6030 and this expansion will be performed again in the instance, so there is
6031 no global information to preserve.
6032
6033 2011-08-05 Javier Miranda <miranda@adacore.com>
6034
6035 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6036 for renamings of predefined primitives.
6037 (In_Predef_Prims_DT): New subprogram.
6038
6039 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6040
6041 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6042 possible interpretation of name is a reference type, add an
6043 interpretation that is the designated type of the reference
6044 discriminant of that type.
6045 * sem_res.adb (resolve): If the interpretation imposed by context is an
6046 implicit dereference, rewrite the node as the deference of the
6047 reference discriminant.
6048 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6049 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6050 parent type or base type.
6051 * sem_ch4.adb (Process_Indexed_Component,
6052 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6053 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6054 Check for implicit dereference.
6055 (List_Operand_Interps): Indicate when an implicit dereference is
6056 ambiguous.
6057 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6058
6059 2011-08-05 Thomas Quinot <quinot@adacore.com>
6060
6061 * scos.ads: Update documentation of SCO table. Pragma statements can now
6062 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6063 * par_sco.ads, par_sco.adb: Implement the above change.
6064 (Process_Decisions_Defer): Generate a P decision for the first parameter
6065 of a dyadic pragma Debug.
6066 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6067 necessary.
6068 * put_scos.adb: Code simplification based on above change.
6069
6070 2011-08-05 Robert Dewar <dewar@adacore.com>
6071
6072 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6073 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6074 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6075 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6076
6077 2011-08-05 Bob Duff <duff@adacore.com>
6078
6079 * a-stunau.ads, g-spipat.adb: Update comments.
6080
6081 2011-08-05 Bob Duff <duff@adacore.com>
6082
6083 * a-fihema.ads: Minor comment fix.
6084 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6085 correct.
6086 (Attach, Detach): Remove some unnecessary code.
6087 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6088
6089 2011-08-05 Bob Duff <duff@adacore.com>
6090
6091 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6092 allocation for Objects component. This simplifies the code somewhat. It
6093 is also a little more efficient in the not-so-unusual case where there
6094 are no controlled objects allocated.
6095 Make Finalization_Started flag atomic.
6096 (Finalize): Avoid unnecessary detachment of items from the list.
6097 (pcol): Minor cleanup.
6098
6099 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6100
6101 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6102 package whose name is the same as that of the generic unit, or its
6103 ultimate prefix.
6104
6105 2011-08-05 Bob Duff <duff@adacore.com>
6106
6107 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6108 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6109 Minor comment fixes.
6110
6111 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6112
6113 * make.adb (Linking_Phase): No longer need to set source search path
6114 before calling gnatlink in CodePeer mode.
6115 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6116 gcc in CodePeer mode, since the binder generated file no longer has a
6117 'with Main'.
6118 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6119 * switch-c.adb: Update comment.
6120
6121 2011-08-05 Thomas Quinot <quinot@adacore.com>
6122
6123 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6124
6125 2011-08-05 Nicolas Roche <roche@adacore.com>
6126
6127 * gnat_ugn.texi: Fix minor syntax error issue.
6128
6129 2011-08-05 Vincent Celier <celier@adacore.com>
6130
6131 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6132 delete or close the file when the call to gnatmake returns a non
6133 successful return code.
6134
6135 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6136
6137 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6138 check, indicate that the copy of the original node does not come from
6139 source, to prevent an infinite recursion of the expansion.
6140
6141 2011-08-05 Johannes Kanig <kanig@adacore.com>
6142
6143 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6144 VC generation for subprogram bodies.
6145
6146 2011-08-05 Yannick Moy <moy@adacore.com>
6147
6148 * einfo.ads: Typo.
6149 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6150 the base type with the smallest allowed base type.
6151
6152 2011-08-05 Sergey Rybin <rybin@adacore.com>
6153
6154 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6155 aspects.
6156
6157 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6158
6159 * sem_ch12.ads: minor comment updates.
6160
6161 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6162
6163 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6164 instantiation and a formal package the compiler generates a package
6165 renaming declaration so that the generic name within the declaration
6166 is interpreted as a renaming of the instance. At the end of a formal
6167 package declaration, this renaming must become invisible.
6168
6169 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6170
6171 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6172 comparison and rely on concrete entities instead.
6173
6174 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6175
6176 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6177 and discriminants, to indicate that the type has an access discriminant
6178 that supports implicit dereference.
6179 * snames.ads-tmpl: Add names of aspects and attributes related to
6180 Ada2012 iterators: constant_indexing, default_iterator,
6181 iterator_element, implicit_dereference, variable_indexing.
6182 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6183 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6184 iterator-related aspects.
6185 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6186
6187 2011-08-05 Sergey Rybin <rybin@adacore.com>
6188
6189 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6190 metrics in gnatmetric to cover new kinds of coupling mentrics.
6191
6192 2011-08-05 Steve Baird <baird@adacore.com>
6193
6194 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6195 of calling the user-defined main subprogram.
6196 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6197 is set) Call_Main_Subprogram ahead of, as opposed to
6198 inside of, Main.
6199 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6200 generation of a "with" of the user-defined main subprogram.
6201 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6202 (which is now called from Gen_Main instead).
6203
6204 2011-08-05 Emmanuel Briot <briot@adacore.com>
6205
6206 * projects.texi: Added reference to the Makefile package.
6207
6208 2011-08-05 Thomas Quinot <quinot@adacore.com>
6209
6210 * exp_ch7.adb: Minor comment rewording.
6211
6212 2011-08-05 Ed Falis <falis@adacore.com>
6213
6214 * env.c: Fix comment.
6215
6216 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6217
6218 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6219 character comparison and rely on concrete entities instead.
6220
6221 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6222
6223 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6224 suggested by AI95-0068.
6225
6226 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6227
6228 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6229 the two potential initialization calls. This accounts for any
6230 access-before-elaboration checks which may precede the initialization
6231 calls.
6232 (Next_Suitable_Statement): New routine. Returns the next real statement
6233 after the input node while skipping generated checks.
6234 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6235 with comment on usage.
6236 Do not generate Elaborate_All when the trigger is a finalization call
6237 coming from a type init proc.
6238 (Check_Elab_Call): Propagate the initialization procedure context to
6239 subsequent calls to Check_A_Call.
6240 (Check_Internal_Call_Continue): Propagate the initialization procedure
6241 context to subsequent calls to Check_Elab_Call.
6242 (Is_Finalization_Procedure): New routine. Returns True if the input
6243 entity denotes a [Deep_]Finalize routine.
6244 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6245 along with comment on usage.
6246
6247 2011-08-05 Vadim Godunko <godunko@adacore.com>
6248
6249 * s-atocou.ads: Add list of supported platforms.
6250
6251 2011-08-05 Yannick Moy <moy@adacore.com>
6252
6253 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6254
6255 * opt.ads (Disable_ALI_File): new Boolean flag
6256 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6257
6258 2011-08-05 Ed Falis <falis@adacore.com>
6259
6260 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6261 environ is properly defined.
6262
6263 2011-08-05 Vincent Celier <celier@adacore.com>
6264
6265 * make.adb (Compilation_Phase): Exit immediately when all objects have
6266 been found up to date, to avoid multiple exit messages.
6267 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6268 same project for languages with no compiler.
6269 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6270 -eI.
6271 2011-08-05 Robert Dewar <dewar@adacore.com>
6272
6273 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6274 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6275 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6276 s-atocou-builtin.adb: Minor reformatting.
6277
6278 2011-08-05 Yannick Moy <moy@adacore.com>
6279
6280 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6281 if the node to wrap is a pragma check, this node and enclosed
6282 expression are not expanded, so do not apply any transformations here.
6283 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6284 introducing transient scopes.
6285
6286 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6287
6288 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6289 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6290 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6291 routine is available, so we use the default implementation of these
6292 functions.
6293 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6294 support for copying attributes on VxWorks 6.
6295
6296 2011-08-05 Yannick Moy <moy@adacore.com>
6297
6298 * debug.adb: Remove use of -gnatd.D.
6299 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6300 * opt.ads: Simplify variables for ALFA mode, to keep one only
6301 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6302 to ALFA mode.
6303
6304 2011-08-05 Vincent Celier <celier@adacore.com>
6305
6306 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6307 Builder'Default_Switches.
6308
6309 2011-08-05 Vincent Celier <celier@adacore.com>
6310
6311 * makeusg.adb: Add lines for --create-map-file switches.
6312
6313 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6314
6315 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6316 profile is incomplete and the full view is available, replace it with
6317 the full view.
6318 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6319 incomplete, freezing the subprogram is delayed until the full view is
6320 frozen.
6321 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6322 fixed-point multiplication operator and the predefined operator is
6323 resolved in favor of the user-defined one.
6324
6325 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6326
6327 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6328 CONST_CAST.
6329
6330 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6331
6332 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6333 whether a type lacks user-defined Read or Write operations, or has a
6334 component that lacks them.
6335 * sem_attr.adb (Check_Stream_Attribute): if restriction
6336 No_Default_Stream_Attributes is active, verify that all subcomponent
6337 types of the target have user-defined stream operations, and report
6338 error otherwise.
6339 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6340 * exp_strm.adb: Build_Elementary_Input_Call,
6341 Build_Elementary_Write_Call): remove checks for restriction
6342 No_Default_Stream_Attributes, now checked in semantics.
6343
6344 2011-08-04 Vincent Celier <celier@adacore.com>
6345
6346 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6347 switches on the command line, look for all valid --RTS switches in the
6348 Builder switches and for each language use the first runtime name found
6349 to invoke gprconfig.
6350 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6351 command line and there is no auto-configuration.
6352 (Runtime_Name_Set_For): New function.
6353
6354 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6355
6356 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6357 elaborate initialization expression for variable Abort when processing
6358 a package body or a declaration.
6359 (Create_Finalizer): Propagate the package context when creating the
6360 exception-related variables.
6361 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6362 For_Package along with usage comment.
6363
6364 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6365
6366 * gcc-interface/Makefile.in: Clean up targets.
6367 Enable new package for atomic counters and copy-on-write implementation
6368 of unbounded strings on x86 platforms.
6369 * gcc-interface/Make-lang.in: Update dependencies.
6370
6371 2011-08-04 Robert Dewar <dewar@adacore.com>
6372
6373 * exp_ch7.adb: Minor reformatting.
6374
6375 2011-08-04 Robert Dewar <dewar@adacore.com>
6376
6377 * exp_strm.adb: Minor reformatting.
6378
6379 2011-08-04 Vadim Godunko <godunko@adacore.com>
6380
6381 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6382 operations are not supported.
6383 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6384 * s-atocou-x86.adb: New file.
6385 * Makefile.rtl: Add s-atocou.o file
6386
6387 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6388
6389 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6390 (Compilation_Phase): ... here.
6391 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6392
6393 2011-08-04 Thomas Quinot <quinot@adacore.com>
6394
6395 * Make-generated.in: Fix minor typo in comment.
6396
6397 2011-08-04 Thomas Quinot <quinot@adacore.com>
6398
6399 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6400 the project path.
6401
6402 2011-08-04 Robert Dewar <dewar@adacore.com>
6403
6404 * a-coinho.adb: Minor reformatting.
6405
6406 2011-08-04 Robert Dewar <dewar@adacore.com>
6407
6408 * a-coinho.ads: Minor reformatting.
6409
6410 2011-08-04 Vadim Godunko <godunko@adacore.com>
6411
6412 * s-atocou.ads, s-atocou.adb: New files.
6413 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6414 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6415 direct use of GCC's atomic builtins and replace them by use of new
6416 atomic counter package.
6417
6418 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6419
6420 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6421
6422 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6423
6424 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6425 with a call to Get_External_Tag.
6426 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6427 subprogram usage. Remove the guard against package declarations and
6428 bodies since Build_Cleanup_Statements is no longer invoked in that
6429 context.
6430 (Build_Components): Initialize Tagged_Type_Stmts when the context
6431 contains at least one library-level tagged type.
6432 (Build_Finalizer): New local variables Has_Tagged_Types and
6433 Tagged_Type_Stmts along with associated comments on usage. Update the
6434 logic to include tagged type processing.
6435 (Create_Finalizer): Insert all library-level tagged type unregistration
6436 code before the jump block circuitry.
6437 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6438 (Expand_N_Package_Declaration): Remove the call to
6439 Build_Cleanup_Statements.
6440 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6441 unregister the external tag of a tagged type.
6442 (Processing_Actions): Reimplemented to handle tagged types.
6443 (Process_Declarations): Detect the declaration of a library-level
6444 tagged type and carry out the appropriate actions.
6445 (Unregister_Tagged_Types): Removed. The machinery has been directly
6446 merged with Build_Finalizer.
6447
6448 2011-08-04 Robert Dewar <dewar@adacore.com>
6449
6450 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6451 gnatls.adb, exp_ch3.adb: Minor reformatting.
6452
6453 2011-08-04 Marc Sango <sango@adacore.com>
6454
6455 * sem_attr.adb (Analyze_Attribute): Replace the message
6456 "invisible attribute of}" of the spark restriction violation in
6457 attribute reference by the simple message "invisible attribute of type".
6458 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6459 two insertion characters: '&' and '}'.
6460
6461 2011-08-04 Vadim Godunko <godunko@adacore.com>
6462
6463 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6464 * a-coinho.ads, a-coinho.adb: New file.
6465 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6466
6467 2011-08-04 Nicolas Roche <roche@adacore.com>
6468
6469 * alfa_test.adb: Not all ali files are containing alfa information even
6470 if compiled with -gnatd.F. So suppress warning about missing ALFA
6471 information.
6472
6473 2011-08-04 Yannick Moy <moy@adacore.com>
6474
6475 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6476 scope.
6477 * put_alfa.adb: Check that scope name is not empty.
6478
6479 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6480
6481 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6482 Needs_Elementary_Stream_Operation, to determine whether user-defined
6483 Read and Write attributes are available for the elementary components
6484 of the given type. If only the predefined attributes are available,
6485 then when restriction No_Default_Stream_Attributes is active the
6486 predefined stream attributes for the composite type cannot be created.
6487
6488 2011-08-04 Robert Dewar <dewar@adacore.com>
6489
6490 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6491 Put routines in alpha order
6492
6493 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6494
6495 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6496 * gcc-interface/Make-lang.in: Update dependencies.
6497
6498 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6499
6500 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6501 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6502 gnat1why).
6503
6504 2011-08-04 Robert Dewar <dewar@adacore.com>
6505
6506 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6507 lib-xref-alfa.adb: Minor reformatting.
6508
6509 2011-08-04 Marc Sango <sango@adacore.com>
6510
6511 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6512 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6513 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6514 mode.
6515
6516 2011-08-04 Tristan Gingold <gingold@adacore.com>
6517
6518 * bindgen.adb (Gen_Adainit_C): Remove.
6519 (Gen_Adafinal_C): Ditto.
6520 (Gen_Elab_Externals_C): Ditto.
6521 (Gen_Elab_Calls_C): Ditto.
6522 (Gen_Elab_Order_C): Ditto.
6523 (Gen_Elab_Defs_C): Ditto.
6524 (Gen_Finalize_Library_C): Ditto.
6525 (Gen_Finalize_Library_Defs_C): Ditto.
6526 (Gen_Main_C): Ditto.
6527 (Gen_Output_File_C): Ditto.
6528 (Gen_Restrictions_C): Ditto.
6529 (Gen_Versions_C): Ditto.
6530 (Write_Info_Ada_C): Ditto.
6531 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6532 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6533 Always call Gen_Output_File_Ada.
6534 * gnatlink.adb (Begin_Info): Now a constant.
6535 (End_Info): Ditto.
6536 (Ada_Bind_File): Remove
6537 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6538 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6539 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6540 * opt.ads (Ada_Bind_File): Remove.
6541
6542 2011-08-04 Thomas Quinot <quinot@adacore.com>
6543
6544 * projects.texi: Document target-specific directory in default project
6545 path for gnatmake.
6546
6547 2011-08-04 Thomas Quinot <quinot@adacore.com>
6548
6549 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6550 path in all cases .
6551
6552 2011-08-04 Yannick Moy <moy@adacore.com>
6553
6554 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6555 opt.ads, lib-xref.ads: Code clean up.
6556
6557 2011-08-04 Yannick Moy <moy@adacore.com>
6558
6559 * gnat_rm.texi: Update description of Test_Case
6560 * gnat_ugn.texi: Typo.
6561
6562 2011-08-04 Ed Falis <falis@adacore.com>
6563
6564 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6565
6566 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6567
6568 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6569 it is of type Root_Controlled. This action eliminates fields Prev and
6570 Next from type equality.
6571
6572 2011-08-04 Yannick Moy <moy@adacore.com>
6573
6574 * lib-xref-alfa.adb: Correct typo.
6575
6576 2011-08-04 Matthew Heaney <heaney@adacore.com>
6577
6578 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6579 component.
6580
6581 2011-08-04 Yannick Moy <moy@adacore.com>
6582
6583 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6584 (Analyze_Pragma): allow static string expression for name of Test_Case,
6585 instead of simply string literals.
6586 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6587 expressions.
6588
6589 2011-08-04 Vincent Celier <celier@adacore.com>
6590
6591 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6592 case suffixes to find truncated main sources.
6593
6594 2011-08-04 Tristan Gingold <gingold@adacore.com>
6595
6596 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6597 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6598 (Compute_Current_Task): Ditto.
6599
6600 2011-08-04 Tristan Gingold <gingold@adacore.com>
6601
6602 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6603
6604 2011-08-04 Yannick Moy <moy@adacore.com>
6605
6606 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6607 library-level constant.
6608 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6609 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6610 used as selector of parameter association, in ALFA mode.
6611
6612 2011-08-04 Robert Dewar <dewar@adacore.com>
6613
6614 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6615 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6616 reformatting.
6617
6618 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6619
6620 * make.adb (Linking_Phase): Set source search path before calling
6621 gnatlink in CodePeer mode.
6622
6623 2011-08-04 Javier Miranda <miranda@adacore.com>
6624
6625 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6626 Remove code which takes care of building TSDs.
6627 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6628 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6629 the accessibility check in VM targets.
6630 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6631 (Building_Static_DT): Now returns false for VM targets.
6632 (Build_VM_TSDs): Removed.
6633 (Expand_Interface_Conversion): Generate missing runtime check for
6634 conversions to interface types whose target type is unknown at compile
6635 time.
6636 (Make_VM_TSD): Add missing code to disable the generation of calls to
6637 Check_TSD if the tagged type is not defined at library level, or not
6638 has a representation clause specifying its external tag, or -gnatdQ is
6639 active.
6640 * exp_disp.ads (Build_VM_TSDs): Removed.
6641 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6642 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6643 register primitives in the dispatch tables in VM targets.
6644 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6645 initialization of class-wide interface objects in VM targets.
6646 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6647 of Make_DT).
6648
6649 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6650
6651 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6652 when dotnet-ld cannot be found.
6653
6654 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6655
6656 * bindgen.adb: Simplify significantly generation of binder body file in
6657 CodePeer mode.
6658 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6659 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6660 not expanded).
6661
6662 2011-08-04 Yannick Moy <moy@adacore.com>
6663
6664 * sem_prag.adb, sem.ads: Code cleanup.
6665
6666 2011-08-04 Tristan Gingold <gingold@adacore.com>
6667
6668 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6669 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6670 results if possible.
6671 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6672 * gnat_ugn.texi: Update dynamic stack usage section.
6673
6674 2011-08-04 Steve Baird <baird@adacore.com>
6675
6676 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6677 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6678 contains only a call to the user-defined main subprogram.
6679 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6680 call the "wrapper" subprogram instead of directly
6681 calling the user-defined main subprogram.
6682
6683 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6684
6685 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6686 alternatives of a case statement for controlled objects. Rename local
6687 variable A to Dead_Alt.
6688 (Expand_N_If_Statement): Check the then and else statements of an if
6689 statement for controlled objects. Check the then statements of all
6690 elsif parts of an if statement for controlled objects.
6691 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6692 objects.
6693 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6694 detects a loop associated with the expansion of an array object.
6695 Augment the processing of the loop statements to account for a possible
6696 wrap done by Process_Statements_For_Controlled_Objects.
6697 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6698 statements and abortable part of an asynchronous select for controlled
6699 objects.
6700 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6701 conditional entry call for controlled objects.
6702 (Expand_N_Selective_Accept): Check the alternatives of a selective
6703 accept for controlled objects.
6704 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6705 alternatives of a timed entry call for controlled objects.
6706 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6707 exception handler for controlled objects.
6708 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6709 Add formal parameter Nested_Constructs along with its associated
6710 comment.
6711 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6712 Requires_Cleanup_Actions.
6713 (Process_Statements_For_Controlled_Objects): New routine.
6714 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6715 routine. Inspect a node which contains a non-handled sequence of
6716 statements for controlled objects. If such an object is found, the
6717 statements are wrapped in a block.
6718
6719 2011-08-04 Bob Duff <duff@adacore.com>
6720
6721 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6722 need to compare with Class_Wide_Type (T2), in order to get at the
6723 original class-wide type node.
6724 * sem_type.ads (Covers): Improve the comment.
6725 * einfo.ads (Class_Wide_Type): Improve the comment.
6726 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6727 the type of the Deref.
6728
6729 2011-08-04 Yannick Moy <moy@adacore.com>
6730
6731 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6732 separate declarations.
6733 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6734 check identifier of pragma argument.
6735 (Chain_TC): check that no other test case associated to the same entity
6736 share the same name.
6737 (Check_Test_Case): disallow test case inside subprogram body
6738 (Analyze_Pragma): correct call to check identifier and not argument
6739 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6740 function gets name from test case pragma.
6741
6742 2011-08-04 Yannick Moy <moy@adacore.com>
6743
6744 * gnat_rm.texi: Document new pragma and aspect.
6745 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6746 (No_Duplicates_Allowed): new constant array defining whether duplicates
6747 aspects of each kind can appear on the same declaration.
6748 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6749 field, which points to a node holding the previous Spec_PPC_List.
6750 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6751 through the indirection with Contract.
6752 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6753 * par-prag.adb (Prag): do nothing on Test_Case pragma
6754 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6755 be called directly.
6756 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6757 component Ensures of Test_Case.
6758 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6759 (Analyze_Generic_Subprogram_Declaration,
6760 Analyze_Subprogram_Instantiation,
6761 Analyze_Abstract_Subprogram_Declaration,
6762 Analyze_Subprogram_Body_Helper,
6763 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6764 insert contract in subprogram node at point of definition
6765 * sem_ch13.adb
6766 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6767 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6768 corresponding pragma
6769 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6770 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6771 similar to the analysis of pre/post
6772 (Derive_Subprogram): insert contract in subprogram node at point of
6773 derivation.
6774 * sem_prag.adb, sem_prag.ads
6775 (Check_Arg_Is_String_Literal, Check_Identifier):
6776 new checking procedures to be called in treatment of pragmas
6777 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6778 pragma is well-formed. This does not check currently that 'Result is
6779 used only in the Ensures component of a Test_Case.
6780 (Analyze_Pragma): add case for Test_Case
6781 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6782 components of a Test_Case.
6783 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6784 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6785 pragma, treated as spec expressions.
6786 (Sig_Flags): add value -1 for Test_Case.
6787 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6788 Get_Requires_From_Test_Case_Pragma): getters for both expression
6789 components of a Test_Case.
6790 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6791 indirection between an entry or [generic] subprogram entity and its
6792 pre/post + test-cases.
6793 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6794 get/set for fields of an N_Contract node.
6795 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6796 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6797 names and pragma for Test_Case.
6798 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6799
6800 2011-08-04 Vincent Celier <celier@adacore.com>
6801
6802 * gnat_ugn.texi: Improve documentation of gnatmake switch
6803 --source-info-file=.
6804
6805 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6806
6807 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6808 type). Initialize Atyp to the appropriate type which is later checked
6809 for completion. Rewrite the assertion associated with private type
6810 completion.
6811
6812 2011-08-04 Ed Falis <falis@adacore.com>
6813
6814 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6815 initialize the number of CPUs.
6816
6817 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6818
6819 * sem_type.adb (Disambiguate): New subsidiary routine
6820 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6821 equality on an anonymous access type whose designated type is private
6822 does not lead to an ambiguity with the universal access equality
6823 operator in the body or child units of the defining package. The same
6824 is true for a multiplication operator on a private type completed with
6825 a fixed-point-type.
6826
6827 2011-08-04 Javier Miranda <miranda@adacore.com>
6828
6829 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6830 (Normalize_Scalars_Config): Removed.
6831 * opt.adb
6832 (Register_Opt_Config_Switches): Remove registering config values of
6833 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6834 (Restore_Opt_Config_Switches): Remove code which restores the values of
6835 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6836 Init_Or_Norm_Scalars.
6837 (Save_Opt_Config_Switches): Remove code which saves values of
6838 Init_Or_Norm_Scalars and Normalize_Scalars.
6839 (Set_Opt_Config_Switches): Remove code which restores config values of
6840 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6841 Init_Or_Norm_Scalars.
6842
6843 2011-08-04 Yannick Moy <moy@adacore.com>
6844
6845 * frontend.adb (Frontend): remove previous patch to avoid full
6846 qualification in ALFA mode.
6847 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6848 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6849 unique name for an entity, which could be used to identify the entity
6850 across compilation units.
6851
6852 2011-08-04 Thomas Quinot <quinot@adacore.com>
6853
6854 * prj-env.adb
6855 (Initialize_Default_Project_Path): Add target specific directory
6856 ($prefix/$target/lib/gnat) in front of project path in all cases
6857 (making gnatmake's behaviour consistent with gprbuild).
6858 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6859 Pass target name from Sdefault to project subsystem.
6860 * gnatls.adb: Show new target specific default project directory.
6861
6862 2011-08-04 Johannes Kanig <kanig@adacore.com>
6863
6864 * cstand.adb: Add Information to Identifier in Standard
6865 (Identifer_For): Set Entity to the corresponding entity
6866
6867 2011-08-04 Sergey Rybin <rybin@adacore.com>
6868
6869 * gnat_ugn.texi: Update doc on gnatcheck.
6870
6871 2011-08-04 Yannick Moy <moy@adacore.com>
6872
6873 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6874 xrefs in a scope.
6875
6876 2011-08-04 Yannick Moy <moy@adacore.com>
6877
6878 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6879 performing expansion.
6880 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6881 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6882 it is not called in ALFA mode.
6883
6884 2011-08-04 Emmanuel Briot <briot@adacore.com>
6885
6886 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6887 after all, so removed.
6888
6889 2011-08-04 Sergey Rybin <rybin@adacore.com>
6890
6891 * vms_data.ads: Add missing VMS qualifiers.
6892
6893 2011-08-04 Emmanuel Briot <briot@adacore.com>
6894
6895 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6896 the list of files on the command line after processing it through
6897 Complete_Mains.
6898
6899 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6900
6901 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6902 processing for .NET/JVM. These targets can now benefit from
6903 Raise_From_Controlled_Operation and they share the same processing with
6904 standard targets.
6905 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6906 These targets need transient scopes in order to properly finalize short
6907 lived controlled objects.
6908 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6909 NET/JVM. These targets can now benefit from
6910 Raise_From_Controlled_Operation and they share the same processing with
6911 standard targets.
6912
6913 2011-08-04 Geert Bosch <bosch@adacore.com>
6914
6915 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6916
6917 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6918
6919 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6920 Expand_Record_Aggregate, to determine whether aggregate must be
6921 expanded into assignments. This is the case if the ancestor part is
6922 private, regarless of the setting of the flag Has_Private_Ancestor.
6923
6924 2011-08-04 Ed Falis <falis@adacore.com>
6925
6926 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6927
6928 2011-08-04 Bob Duff <duff@adacore.com>
6929
6930 * sinfo.ads: Fix comment.
6931
6932 2011-08-04 Steve Baird <baird@adacore.com>
6933
6934 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6935 choose a package name in much the same way as is
6936 done for JGNAT when VM_Target /= No_VM, except that
6937 a slightly more distinctive prefix string is used.
6938
6939 2011-08-04 Emmanuel Briot <briot@adacore.com>
6940
6941 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6942 gnatmake command line.
6943 This behavior was never documented (and was supported only because of
6944 an early bug in the code). This case might lead to ambiguous cases
6945 (between unit names and truncated base names without suffixes).
6946
6947 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6948
6949 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6950 Remove the external tag of a tagged type from the internal hash table.
6951 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6952 expanded usage of the routine. Strenghten the check for Is_Master. Add
6953 processing for tagged types.
6954 (Build_Finalizer): Create all the necessary lists used in finalizer
6955 creation when the processed context is a package that may contain
6956 tagged types.
6957 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6958 Requires_Cleanup_Actions.
6959 (Expand_N_Package_Body): Package bodies may need clean up code
6960 depending on whether they contain tagged types.
6961 (Expand_N_Package_Declaration): Package declarations may need clean up
6962 code depending on whether they contain tagged types.
6963 (Unregister_Tagged_Types): New routine. Search through a list of
6964 declarations or statements, looking for non-abstract Ada tagged types.
6965 For each such type, generate code to unregister the external tag.
6966 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6967 Requires_Cleanup_Actions.
6968 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6969 through a list of declarations or statements looking for non-abstract
6970 Ada tagged types or controlled objects.
6971 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6972 Requires_Cleanup_Actions.
6973 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6974 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6975 RE_Unit_Table.
6976
6977 2011-08-04 Vincent Celier <celier@adacore.com>
6978
6979 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6980 has Ada sources, not project Project, because if the root project
6981 Project has no sources of its own, all projects will be deemed without
6982 sources.
6983
6984 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6985
6986 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6987 of the No_Param_Proc acc-to-subp type used for initialization of
6988 __gnat_finalize_library_objects so that it's declared at library level
6989 rather than nested inside of the adainit routine.
6990
6991 2011-08-04 Javier Miranda <miranda@adacore.com>
6992
6993 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6994 if the tagged type has a representation clause which specifies its
6995 external tag.
6996
6997 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6998
6999 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7000 Remove previous procedure with that name.
7001 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7002 when appropriate.
7003 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7004 subtype mark, the ancestor cannot have unknown discriminants.
7005 (Resolve_Record_Aggregate): if the type has invisible components
7006 because of a private ancestor, the aggregate is illegal.
7007
7008 2011-08-04 Vincent Celier <celier@adacore.com>
7009
7010 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7011 account switches -gnat2005, -gnat12 and -gnat2012.
7012
7013 2011-08-04 Bob Duff <duff@adacore.com>
7014
7015 * s-tasdeb.ads: Minor comment fix.
7016
7017 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7018
7019 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7020 CodePeer mode.
7021 * switch.ads, switch.adb (Is_Language_Switch): New function.
7022
7023 2011-08-04 Vincent Celier <celier@adacore.com>
7024
7025 * switch-c.adb: Minor comment addition.
7026
7027 2011-08-04 Vincent Celier <celier@adacore.com>
7028
7029 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7030 ending with '=' is followed by a space (missing file name).
7031
7032 2011-08-04 Pascal Obry <obry@adacore.com>
7033
7034 * g-regist.ads: Fix size of HKEY on x86_64-windows.
7035
7036 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7037
7038 * sem_ch12.adb (Analyze_Associations): New routine
7039 Check_Overloaded_Formal_Subprogram to reject a formal package when
7040 there is a named association or a box initialisation for an overloaded
7041 formal subprogram of the corresponding generic.
7042
7043 2011-08-04 Yannick Moy <moy@adacore.com>
7044
7045 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7046 * get_alfa.adb, put_alfa.adb: Read and write new component of
7047 cross-reference.
7048 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7049
7050 2011-08-04 Pascal Obry <obry@adacore.com>
7051
7052 * urealp.adb: Minor reformatting.
7053
7054 2011-08-04 Tristan Gingold <gingold@adacore.com>
7055
7056 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7057 Handle the case when Cleanup_Protected_Object returns Empty.
7058
7059 2011-08-04 Yannick Moy <moy@adacore.com>
7060
7061 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7062
7063 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7064
7065 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7066 call, ignore functions.
7067
7068 2011-08-04 Geert Bosch <bosch@adacore.com>
7069
7070 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7071 point.
7072
7073 2011-08-04 Emmanuel Briot <briot@adacore.com>
7074
7075 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7076 as an index for Builder'Switches. This conforms to the documentation.
7077 * make.adb (Insert_Project_Sources): avoid duplicate code
7078
7079 2011-08-04 Emmanuel Briot <briot@adacore.com>
7080
7081 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7082 name on the command line (for instance "../dummy"), never assume it can
7083 be a unit name.
7084
7085 2011-08-04 Tristan Gingold <gingold@adacore.com>
7086
7087 * bindgen.adb: Remove code the reference or create the
7088 Break_Start/__gnat_break_start procedure.
7089 * s-stalib.adb (Break_Start): Removed.
7090
7091 2011-08-04 Emmanuel Briot <briot@adacore.com>
7092
7093 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7094 shared with gprbuild.
7095
7096 2011-08-04 Yannick Moy <moy@adacore.com>
7097
7098 * par-ch4.adb (P_Primary): preferentially issue an error message about
7099 a missing parenthesis arount a conditional or case expression in Ada
7100 2012 mode, if we detect that the alignment is not correct for a
7101 statement.
7102
7103 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7104
7105 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7106 tag-to-class-wide conversion as needing finalization actions.
7107 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7108 a tag-to-class-wide conversion as needing finalization actions.
7109 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7110 conversion does not need finalization actions.
7111 (Is_Tag_To_CW_Conversion): New routine.
7112 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7113 whether an object is the result of a tag-to-class-wide conversion.
7114
7115 2011-08-04 Yannick Moy <moy@adacore.com>
7116
7117 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7118 the left-hand-side and right-hand-side of a conjunct are inserted when
7119 translating a pre- or postcondition
7120 * sem_ch6.adb: Correct typo in comment
7121
7122 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7123
7124 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7125 Unchecked_Conversion and Unchecked_Deallocation.
7126
7127 2011-08-04 Thomas Quinot <quinot@adacore.com>
7128
7129 * make.adb: Minor reformatting.
7130
7131 2011-08-04 Emmanuel Briot <briot@adacore.com>
7132
7133 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7134 sources in the project and its imported projects, but not in the whole
7135 tree.
7136
7137 2011-08-04 Emmanuel Briot <briot@adacore.com>
7138
7139 * make.adb: Remove debug trace.
7140
7141 2011-08-04 Vincent Celier <celier@adacore.com>
7142
7143 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7144 path in canonical form, to be able to compare path names on platforms
7145 such as Windows or Darwin.
7146
7147 2011-08-04 Thomas Quinot <quinot@adacore.com>
7148
7149 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7150 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7151 * scos.ads: Update documentation accordingly.
7152 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7153 pragmas.
7154
7155 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7156
7157 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7158 attribute only if prefix type is scalar.
7159
7160 2011-08-04 Emmanuel Briot <briot@adacore.com>
7161
7162 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7163 in gnatmake for specifying mains on the command line that do not belong
7164 to the main project. These mains must currently all belong to the same
7165 project, though.
7166 (Ultimate_Extension_Of): removed, since duplicated
7167 Ultimate_Extending_Project.
7168
7169 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7170
7171 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7172 instead.
7173 (CodePeer_Mode_String): New.
7174 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7175 CodePeer mode.
7176 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7177 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7178 mode, since no useful elaboration subprogram is needed by CodePeer.
7179 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7180 In this mode, compile binder file with -gnatC and do stop after this
7181 step.
7182
7183 2011-08-04 Vincent Celier <celier@adacore.com>
7184
7185 * exp_ch7.adb: Minor comment fix.
7186
7187 2011-08-04 Robert Dewar <dewar@adacore.com>
7188
7189 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7190 exp_ch4.adb, makeutl.adb: Minor reformatting.
7191
7192 2011-08-04 Emmanuel Briot <briot@adacore.com>
7193
7194 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7195 Create several new subprograms to move code out of Make. This makes the
7196 code more readable, removes code duplication, and is a preparation work
7197 for adding support for aggregate projects.
7198
7199 2011-08-04 Tristan Gingold <gingold@adacore.com>
7200
7201 * s-po32gl.ads, s-po32gl.adb: New files.
7202 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7203 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7204 (Build_Finalization_Collection): Use it.
7205 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7206 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7207 literals.
7208 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7209 * gcc-interface/Make-lang.in: Update dependencies.
7210
7211 2011-08-04 Emmanuel Briot <briot@adacore.com>
7212
7213 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7214 the command line.
7215
7216 2011-08-04 Emmanuel Briot <briot@adacore.com>
7217
7218 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7219 command line is not a file name, also check whether it could be a unit
7220 name.
7221
7222 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7223
7224 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7225 the header of the finalization routine.
7226 If the unit has no finalizer but is a body whose spec has one, then
7227 generate the decrement of the elaboration entity only.
7228 If the unit has a finalizer and is a spec, then do not generate the
7229 decrement of the elaboration entity.
7230 (Gen_Finalize_Library_C): Likewise.
7231
7232 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7233
7234 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7235 (Bounds_Size_Expression): Removed.
7236 (Double_Alignment_Of): New subsidiary routine.
7237 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7238 for a hole in the dope vector of unconstrained arrays due to different
7239 index and element alignments.
7240
7241 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7242
7243 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7244 raise program_error because body has not been seen yet.
7245
7246 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7247
7248 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7249 an unresolved name.
7250
7251 2011-08-04 Vincent Celier <celier@adacore.com>
7252
7253 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7254
7255 2011-08-04 Yannick Moy <moy@adacore.com>
7256
7257 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7258 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7259
7260 2011-08-04 Thomas Quinot <quinot@adacore.com>
7261
7262 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7263 instantiation in RCI.
7264
7265 2011-08-04 Emmanuel Briot <briot@adacore.com>
7266
7267 * make.adb: Share more code with gprbuild
7268
7269 2011-08-04 Emmanuel Briot <briot@adacore.com>
7270
7271 * projects.texi: Added documentation for the IDE'Gnat project file
7272 attribute.
7273
7274 2011-08-04 Nicolas Roche <roche@adacore.com>
7275
7276 * gnat_rm.texi: Minor editing.
7277
7278 2011-08-04 Javier Miranda <miranda@adacore.com>
7279
7280 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7281 and the library case for VM targets.
7282 (Gen_Adainit_Ada): Likewise.
7283
7284 2011-08-04 Robert Dewar <dewar@adacore.com>
7285
7286 * g-altive.ads: Minor comment updates.
7287 * prj-nmsc.adb: Minor reformatting.
7288
7289 2011-08-04 Javier Miranda <miranda@adacore.com>
7290
7291 * opt.ads
7292 (Normalize_Scalars_Config): Value of the configuration switch set by
7293 pragma Normalize_Scalars when it appears in the gnat.adc file.
7294 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7295 to save and restore settings of this pragma.
7296 * opt.adb
7297 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7298 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7299
7300 2011-08-04 Vincent Celier <celier@adacore.com>
7301
7302 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7303
7304 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7305
7306 * makeutl.adb: Minor reformatting.
7307
7308 2011-08-04 Olivier Hainque <hainque@adacore.com>
7309
7310 * g-altive.ads: Update comments to reflect that only the soft
7311 binding is available today.
7312
7313 2011-08-04 Robert Dewar <dewar@adacore.com>
7314
7315 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7316 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7317 * gcc-interface/Make-lang.in: Update dependencies.
7318
7319 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7320
7321 * prj-env.adb: Remove local debug traces.
7322
7323 2011-08-04 Yannick Moy <moy@adacore.com>
7324
7325 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7326 was used instead of Hi_OK, which could cause a read of an uninitialized
7327 value later on. Detected while working on the new warning.
7328 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7329 to local variable.
7330 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7331 in more cases, in order to detect more unreferenced values.
7332 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7333 object for expression, if any.
7334
7335 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7336
7337 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7338 the operand types instead of the Esize.
7339
7340 2011-08-04 Steve Baird <baird@adacore.com>
7341
7342 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7343 enable CodePeer_Mode.
7344 * bindusg.adb (Display): Add help message describing -P binder switch.
7345 * gnat_ugn.texi: Document -P binder switch.
7346 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7347 user-defined main program directly.
7348 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7349 user-defined main program in the context clause of the package body.
7350
7351 2011-08-04 Yannick Moy <moy@adacore.com>
7352
7353 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7354 duplicate of Defining_Entity
7355 (Get_Unique_Entity_For_Decl): rename function into
7356 Unique_Defining_Entity
7357 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7358 (Formal_Proof_On): remove synthesized flag
7359 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7360 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7361 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7362 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7363 Annotate (Formal_Proof)
7364
7365 2011-08-04 Emmanuel Briot <briot@adacore.com>
7366
7367 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7368 source files with non-standard naming schemes, in imported projects
7369
7370 2011-08-04 Emmanuel Briot <briot@adacore.com>
7371
7372 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7373 specified on the gprbuild command line, we need to compile all units
7374 within that file, not just the first one we find
7375 Fix error message for mains that are not found.
7376
7377 2011-08-04 Thomas Quinot <quinot@adacore.com>
7378
7379 * sem_ch6.adb: Update comment.
7380 * sem_ch12.adb: Minor reformatting.
7381
7382 2011-08-04 Bob Duff <duff@adacore.com>
7383
7384 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7385 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7386 race condition whose symptom is to fail to lock Parent. That, in turn,
7387 causes Parent.Awake_Count to be accessed without locking Parent, which
7388 causes another race condition whose symptom is that Parent.Awake_Count
7389 can be off by 1 (either too high or too low). The solution is to lock
7390 Parent unconditionally, and then lock Acceptor, before reading
7391 Acceptor.Terminate_Alternative.
7392
7393 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7394
7395 * debug.adb: Update comment.
7396
7397 2011-08-04 Robert Dewar <dewar@adacore.com>
7398
7399 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7400 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7401 exp_ch6.adb: Minor reformatting.
7402
7403 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7404
7405 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7406 checks for -gnateE.
7407
7408 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7409
7410 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7411
7412 2011-08-04 Thomas Quinot <quinot@adacore.com>
7413
7414 * sinfo.ads: Minor reformatting.
7415
7416 2011-08-04 Emmanuel Briot <briot@adacore.com>
7417
7418 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7419 even if there is no location.
7420
7421 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7422
7423 * sem_res.adb, sem_ch4.adb: move check for restriction
7424 No_Task_Hierarchy to resolve_allocator.
7425
7426 2011-08-04 Thomas Quinot <quinot@adacore.com>
7427
7428 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7429 This flag of N_Pragma nodes is not used, remove it as well as all of
7430 the associated circuitry.
7431
7432 2011-08-04 Javier Miranda <miranda@adacore.com>
7433
7434 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7435 runtime check on duplicated externa tags
7436 * debug.adb Document switch -gnatdQ.
7437
7438 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7439
7440 * a-fihema.ads: Minor typo fix.
7441
7442 2011-08-04 Yannick Moy <moy@adacore.com>
7443
7444 * sem_ch10.adb: Minor comment update.
7445
7446 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7447
7448 * einfo.adb: Update the node field usage to reflect the renaming of
7449 Return_Flag to Return_ Flag_Or_Transient_Decl.
7450 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7451 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7452 (Write_Field15_Name): Change Return_Flag to
7453 Return_Flag_Or_Transient_Decl.
7454 * einfo.ads: Rename node field Return_Flag to
7455 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7456 occurrences in entities.
7457 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7458 associated Inline pragma.
7459 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7460 associated Inline pragma.
7461 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7462 routine.
7463 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7464 Return_Flag and Set_Return_Flag.
7465 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7466 objects generated for controlled transients declared inside an
7467 Exception_With_Actions. Update the calls to Return_Flag.
7468 (Process_Object_Declaration): Add code to add a null guard for hook
7469 objects generated for controlled transients declared inside an
7470 Exception_With_Actions. Update related comment.
7471 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7472 objects generated for controlled transients declared inside an
7473 Exception_With_Actions. Update the calls to Return_Flag.
7474 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7475
7476 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7477
7478 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7479 positional aggregate.
7480
7481 2011-08-04 Vincent Celier <celier@adacore.com>
7482
7483 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7484 SLOC only for pragmas.
7485
7486 2011-08-04 Emmanuel Briot <briot@adacore.com>
7487
7488 * projects.texi: Minor typo fix.
7489
7490 2011-08-04 Emmanuel Briot <briot@adacore.com>
7491
7492 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7493 on case-sensitive file systems.
7494
7495 2011-08-04 Thomas Quinot <quinot@adacore.com>
7496
7497 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7498 nested in a disabled pragma.
7499 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7500 enclosing pragma, if any, for X decisions.
7501
7502 2011-08-04 Thomas Quinot <quinot@adacore.com>
7503
7504 * sem_prag.adb: Minor reformatting.
7505
7506 2011-08-04 Vincent Celier <celier@adacore.com>
7507
7508 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7509 allowed in no run time mode.
7510
7511 2011-08-04 Vincent Celier <celier@adacore.com>
7512
7513 * make.adb (Check): When -gnatc is used, check for the source file
7514 inside the ALI file with a canonical case file name.
7515
7516 2011-08-04 Emmanuel Briot <briot@adacore.com>
7517
7518 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7519 overriding the separator.
7520
7521 2011-08-04 Robert Dewar <dewar@adacore.com>
7522
7523 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7524 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7525
7526 2011-08-04 Robert Dewar <dewar@adacore.com>
7527
7528 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7529
7530 2011-08-04 Yannick Moy <moy@adacore.com>
7531
7532 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7533 'Result only appears in postcondition of function.
7534
7535 2011-08-04 Thomas Quinot <quinot@adacore.com>
7536
7537 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7538 external tag, include the value of the external tag in the exception
7539 message.
7540
7541 2011-08-04 Yannick Moy <moy@adacore.com>
7542
7543 * sem_attr.adb (Result): modify error message for misplaced 'Result
7544
7545 2011-08-04 Sergey Rybin <rybin@adacore.com>
7546
7547 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7548 clear that the second argument must be an identifier.
7549
7550 2011-08-04 Thomas Quinot <quinot@adacore.com>
7551
7552 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7553 -fpreserve-control-flow, insert an IF statement on the barrier
7554 condition to ensure that a conditional branch instruction is generated.
7555
7556 2011-08-04 Emmanuel Briot <briot@adacore.com>
7557
7558 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7559 (Processing_Flags.Ignore_Missing_With): new flag.
7560
7561 2011-08-04 Emmanuel Briot <briot@adacore.com>
7562
7563 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7564 Source_List_File on case-insensitive systems where the file is actually
7565 on a case-sensitive file system (NFS,...).
7566
7567 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7568
7569 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7570 function return contains a controlled [extension] aggregate and the
7571 return statement is not part of a handled sequence of statements, wrap
7572 the return in a block. This ensures that all controlled temporaries
7573 generated during aggregate resolution will be picked up by the
7574 finalization machinery.
7575
7576 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7577
7578 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7579 components, freeze type before resolution, to ensure that default
7580 initializations are present for all components.
7581 * sem_res.adb (Resolve_Actuals): the designated object of an
7582 accces-to-constant type is a legal actual in a call to an
7583 initialization procedure.
7584
7585 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7586
7587 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7588 N_Unchecked_Type_Conversion to the possible containers of a renamed
7589 transient variable.
7590
7591 2011-08-04 Yannick Moy <moy@adacore.com>
7592
7593 * par-ch13.adb (Aspect_Specifications_Present): recognize
7594 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7595 is issued in Strict mode.
7596 * par.adb: Fix typos in comments.
7597
7598 2011-08-04 Yannick Moy <moy@adacore.com>
7599
7600 * sem_attr.adb (Result): modify error message to take into account Post
7601 aspect when compiling Ada 2012 (or newer) code.
7602
7603 2011-08-04 Nicolas Roche <roche@adacore.com>
7604
7605 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7606 remove need for GCC exceptions.
7607
7608 2011-08-04 Vincent Celier <celier@adacore.com>
7609
7610 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7611 project, not the source file name.
7612 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7613 excluded, continue looking. This excluded source will only be returned
7614 if there is no other source with the same base name that is not locally
7615 removed.
7616
7617 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7618
7619 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7620 private and one of the operands is a real literal, use a qualified
7621 expression rather than a conversion which is not meaningful to the
7622 back-end.
7623
7624 2011-08-04 Yannick Moy <moy@adacore.com>
7625
7626 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7627 corresponding aspect X'Class are allowed, proceed with analysis of the
7628 aspect instead of skipping it.
7629
7630 2011-08-04 Tristan Gingold <gingold@adacore.com>
7631
7632 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7633 This will allow to have an Ada implementation for the subprogram.
7634
7635 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7636
7637 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7638 completion and aspects are present, apply them to the entity for the
7639 type which is currently the partial view, but which is the one that
7640 will be frozen.
7641 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7642 applies to a partial view, indicate that the full view has predicates
7643 and delayed aspects.
7644 (Replace_Type_Reference): Handle properly predicates that apply to the
7645 full view of a private completion.
7646
7647 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7648
7649 * layout.adb (Layout_Type): For composite types, do not set Esize.
7650 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7651 set Esize.
7652 (Size_Known): Look at the RM size of components instead of the Esize.
7653 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7654 issue warning and activate Implicit_Packing.
7655 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7656 if the Esize is not known.
7657 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7658 for elementary types only.
7659 (Analyze_Record_Representation_Clause): Look at the RM size instead
7660 of the Esize to issue errors.
7661 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7662 is not known.
7663 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7664 obsolete block.
7665 Look at the RM size instead of the Esize for types if the latter is
7666 not known.
7667 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7668
7669 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7670
7671 * sem_type.adb: proper handling of equality not involving anonymous
7672 access types.
7673
7674 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7675
7676 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7677 Vis_Decls. When creating a library-level finalizer for a package spec,
7678 both the declaration and body of the finalizer are inserted either in
7679 the visible or private declarations of the package spec.
7680
7681 2011-08-04 Javier Miranda <miranda@adacore.com>
7682
7683 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7684 use of the full-view of a type when invoking Is_Ancestor.
7685 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7686 the full-view of private parents is requested, then use also the
7687 full-view of the parent of the first derivation.
7688
7689 2011-08-04 Tristan Gingold <gingold@adacore.com>
7690
7691 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7692 instead of the locally imported procedure.
7693 * s-taprop-mingw.adb (Enter_Task): Ditto.
7694 * s-valrea.adb (Scan_Real): Ditto.
7695 * s-imgrea.adb (Set_Image_Real): Ditto.
7696 * s-flocon.ads: Make the package pure.
7697
7698 2011-08-04 Thomas Quinot <quinot@adacore.com>
7699
7700 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7701 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7702 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7703 New subprogram, moved here from...
7704 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7705 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7706 rewriting of the last argument into a procedure call statement here...
7707 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7708 instead.
7709
7710 2011-08-04 Thomas Quinot <quinot@adacore.com>
7711
7712 * par_sco.adb: Minor reformatting.
7713
7714 2011-08-04 Robert Dewar <dewar@adacore.com>
7715
7716 * erroutc.adb: Minor reformatting.
7717
7718 2011-08-04 Thomas Quinot <quinot@adacore.com>
7719
7720 * par_sco.adb: Comment update.
7721
7722 2011-08-04 Tristan Gingold <gingold@adacore.com>
7723
7724 * s-flocon.ads: New file.
7725 * g-flocon.ads: Now a renaming of s-flocon.
7726 * Makefile.rtl: Add s-flocon.o
7727
7728 2011-08-04 Javier Miranda <miranda@adacore.com>
7729
7730 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7731 constrained, do not attempt to build a subtype of it.
7732
7733 2011-08-04 Yannick Moy <moy@adacore.com>
7734
7735 * errout.ads Change comments: remove 'R'M as an example where quotes
7736 are needed; add ALFA as another case where quotes are not needed
7737 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7738 case where quotes are not needed.
7739 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7740 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7741 Remove all occurrences of 'A'L'F'A
7742
7743 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7744
7745 * sem_ch13.adb: check legality of invariant pragma.
7746
7747 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7748
7749 * bindgen.adb: Add comments.
7750
7751 2011-08-04 Yannick Moy <moy@adacore.com>
7752
7753 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7754 synthesized flag.
7755 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7756 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7757
7758 2011-08-04 Robert Dewar <dewar@adacore.com>
7759
7760 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7761 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7762 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7763
7764 2011-08-04 Thomas Quinot <quinot@adacore.com>
7765
7766 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7767
7768 2011-08-04 Thomas Quinot <quinot@adacore.com>
7769
7770 PR ada/47880
7771 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7772 allocated object.
7773
7774 2011-08-04 Robert Dewar <dewar@adacore.com>
7775
7776 * einfo.ads, exp_ch4.adb: Minor reformatting.
7777
7778 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7779
7780 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7781
7782 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7783
7784 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7785 type in all cases to compute list of primitive operations, because full
7786 view may be an itype that is not attached to the list of declarations.
7787
7788 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7789
7790 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7791 library has already been finalized.
7792 (Gen_Adafinal_C): Likewise.
7793 (Gen_Adainit_Ada): Generate an early return if the library has
7794 already been elaborated.
7795 (Gen_Adainit_C): Likewise.
7796 (Gen_Output_File_Ada): Generate an elaboration flag.
7797 (Gen_Output_File_C): Likewise.
7798
7799 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7800
7801 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7802 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7803 built in the first place.
7804 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7805 for CodePeer because Finalize_Address was not built to begin with.
7806 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7807
7808 2011-08-04 Pascal Obry <obry@adacore.com>
7809
7810 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7811 filenames, this ensures unicity of filenames across processes.
7812
7813 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7814
7815 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7816 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7817 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7818 Add False as the actual to From_Abort in the generated call to
7819 Raise_From_Controlled_Operation.
7820
7821 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7822
7823 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7824 so that the ali file name can be retrieved from outside of this package.
7825 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7826 doing nothing in the general case, but used to update the object file
7827 timestamp if directly generated by the backend.
7828 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7829 to a later time than the ali file one.
7830
7831 2011-08-04 Yannick Moy <moy@adacore.com>
7832
7833 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7834 entities whose body contains an Annotate pragma which forces formal
7835 proof on this body.
7836 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7837 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7838 Mark_Non_ALFA_Subprogram to pass in a message and node.
7839 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7840 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7841 surrounding subprogram.
7842 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7843 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7844 as not in ALFA is annotated with Formal_Proof being On, then an error
7845 is issued based on the additional parameters for message and node.
7846 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7847 * gcc-interface/Make-lang.in: Update dependencies.
7848
7849 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7850
7851 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7852 Finalize_Address when CodePeer is enabled.
7853
7854 2011-08-04 Pascal Obry <obry@adacore.com>
7855
7856 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7857 the latter returns a pointer to a static buffer which is deallocated
7858 at the end of the routine.
7859
7860 2011-08-04 Yannick Moy <moy@adacore.com>
7861
7862 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7863 after index creation; mark unconstrained base array type generated as
7864 being in/not in ALFA as well
7865 (Make_Index): mark subtype created as in/not in ALFA
7866 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7867 over a loop as in/not in ALFA, depending on its type and form of loop
7868 iteration.
7869
7870 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7871
7872 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7873 directly to False on .NET and JVM.
7874
7875 2011-08-04 Yannick Moy <moy@adacore.com>
7876
7877 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7878 constraint that subtype must come from source code to be in ALFA, so
7879 that anonymous subtypes can be in ALFA too.
7880
7881 2011-08-04 Yannick Moy <moy@adacore.com>
7882
7883 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7884 reference for ALFA mode.
7885 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7886 procedure public so as to use it from formal verification back-end.
7887
7888 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7889
7890 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7891 invalid checks of the Parameter, making Remove_Switch not working
7892 correctly.
7893
7894 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7895
7896 * targparm.ads: Update header: no run-time exception is needed on this
7897 file.
7898
7899 2011-08-04 Vincent Celier <celier@adacore.com>
7900
7901 * a-fihema.adb: Use System.IO instead of GNAT.IO
7902
7903 2011-08-04 Thomas Quinot <quinot@adacore.com>
7904
7905 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7906 are forbidden in Compiler_Unit mode.
7907
7908 2011-08-04 Robert Dewar <dewar@adacore.com>
7909
7910 * sem_util.adb: Minor reformatting.
7911
7912 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7913
7914 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7915 library-level finalizers.
7916 (Gen_Finalize_Library_C): Update the import string for library-level
7917 finalizers.
7918 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7919 library-level finalizer.
7920 * exp_ch7.adb: Remove with and use clauses for Stringt.
7921 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7922 Spec_Decl. Add local variable Body_Id. The names of library-level
7923 finalizers are now manually fully qualified and are no longer external.
7924 A single name is now capable of servicing .NET, JVM and non-VM targets.
7925 Pragma Export is no longer required to provide visibility for the name.
7926 (Create_Finalizer_String): Removed.
7927 (New_Finalizer_Name): New routine which mimics New_..._Name.
7928
7929 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7930
7931 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7932 elaboration counter to Standard_Short_Integer.
7933 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7934 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7935 (Gen_Elab_Externals_C): Likewise.
7936
7937 2011-08-04 Ed Falis <falis@adacore.com>
7938
7939 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7940 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7941 system-vxworks-mips.ads, system-vxworks-x86.ads
7942 (Always_Compatible_Rep): set to False for all VxWorks targets.
7943
7944 2011-08-04 Robert Dewar <dewar@adacore.com>
7945
7946 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7947 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7948 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7949 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7950 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7951 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7952 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7953 Minor reformatting and code reorganization.
7954
7955 2011-08-04 Emmanuel Briot <briot@adacore.com>
7956
7957 * projects.texi: Added doc for aggregate projects.
7958
7959 2011-08-04 Emmanuel Briot <briot@adacore.com>
7960
7961 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7962 Add support for overriding the Project_Path in aggregate projects.
7963
7964 2011-08-04 Robert Dewar <dewar@adacore.com>
7965
7966 * a-cofove.ads: Minor reformatting.
7967
7968 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7969
7970 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7971 on the generated code.
7972 (Build_Finalize_Statements): Update the comment on the generated code.
7973 (Build_Initialize_Statements): Update the comment on the generated code.
7974 (Build_Object_Declarations): Add local variable Result. The object
7975 declarations are now built in sequence.
7976 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7977 RE_Unit_Table.
7978
7979 2011-08-04 Robert Dewar <dewar@adacore.com>
7980
7981 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7982
7983 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7984
7985 * einfo.ads (Elaboration_Entity): Document new definition and use.
7986 (Elaboration_Entity_Required): Adjust to above change.
7987 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7988 * exp_ch12.adb: And with and use for Snames.
7989 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7990 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7991 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7992 <Check_Unit_Name>: Deal with N_Expanded_Name.
7993 <Attribute_Elaborated>: Extend to all unit names.
7994 * sem_elab.adb: And with and use for Uintp.
7995 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7996 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7997 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7998 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7999 from Gen_Adainit_Ada.
8000 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8001 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
8002 case, do not call System.Standard_Library.Adafinal; instead call
8003 finalize_library if needed.
8004 (Gen_Adafinal_C): Likewise.
8005 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8006 non-main program case.
8007 (Gen_Adainit_C): Generate a couple of external declarations here.
8008 In the main program case, set SSL.Finalize_Library_Objects.
8009 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8010 (Gen_Elab_Calls_C): Likewise.
8011 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
8012 (Gen_Finalize_Library_C): Likewise. Generate a full function.
8013 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8014 objects here.
8015 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8016 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
8017 Gen_Adafinal_Ada.
8018 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8019 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
8020 of external declarations. Call Gen_Finalize_Library_C.
8021
8022 2011-08-04 Emmanuel Briot <briot@adacore.com>
8023
8024 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8025 Compute_Compilation_Phases): new subprogram.
8026 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8027 The number of mains as well as the various compilation phases that
8028 need to be run are now project tree specific, since various
8029 aggregated trees might have different requirements. In particular,
8030 they do not all require bind or link phases.
8031
8032 2011-08-04 Emmanuel Briot <briot@adacore.com>
8033
8034 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8035 (Project_Tree_Appdata): New type.
8036 It is now possible to associate application-specific data to a project
8037 tree. In particular, this is used in the gprbuild builder to avoid a
8038 number of global tables and htables, especially now that there can be
8039 several project trees loaded at once because of aggregate projects.
8040 (Debug_Name): new procedure.
8041 * projects.texi: Clarify syntax of "**" for Source_Dirs
8042
8043 2011-08-03 Emmanuel Briot <briot@adacore.com>
8044
8045 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8046 the "roots" for a main.
8047 (Fill_From_Project): add support for aggregate projects. Main units
8048 in aggregated projects are now automatically added in the list of
8049 files to build (although this fails later on in gprbuild, because
8050 these files are not using the root proejct tree, so this needs
8051 further cleanup)
8052 * gcc-interface/Make-lang.in: Update dependencies.
8053
8054 2011-08-03 Yannick Moy <moy@adacore.com>
8055
8056 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8057 conditional expression in ALFA.
8058 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8059 expressions as not in ALFA.
8060
8061 2011-08-03 Robert Dewar <dewar@adacore.com>
8062
8063 * a-cofove.adb: Minor reformatting.
8064
8065 2011-08-03 Emmanuel Briot <briot@adacore.com>
8066
8067 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8068 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8069 gprbuild sources.
8070 These packages are more logically placed in the Queue package, since
8071 they manipulate the queue. It is also likely that they can be adapted
8072 for gnatmake, thus sharing more code.
8073 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8074 that we could move the above.
8075
8076 2011-08-03 Emmanuel Briot <briot@adacore.com>
8077
8078 * errutil.adb (Finalize): clean up the list of error messages on exit.
8079 Calling this subprogram multiple times will no longer show duplicate
8080 error messages on stderr.
8081
8082 2011-08-03 Emmanuel Briot <briot@adacore.com>
8083
8084 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8085 Getopt_Switches when we have already define a command line
8086 configuration.
8087
8088 2011-08-03 Yannick Moy <moy@adacore.com>
8089
8090 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8091 in ALFA. Instead, they are considered as assertions to prove.
8092 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8093 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8094 if they have no ELSE part, or if they occur in pre- and postconditions,
8095 where the Condition cannot have side-effects in ALFA
8096 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8097 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8098 Instead, include type conversion between scalar types in ALFA.
8099 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8100 if-and-only-if its type is in ALFA.
8101
8102 2011-08-03 Thomas Quinot <quinot@adacore.com>
8103
8104 * scos.adb, get_scos.adb, put_scos.adb
8105 New code letter for decisions: G (entry guard)
8106 * par_sco.adb
8107 (Traverse_Subprogram_Body): Rename to...
8108 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8109 (Traverse_Protected_Body): New subprogram
8110 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8111 protected bodies and entry bodies.
8112
8113 2011-08-03 Yannick Moy <moy@adacore.com>
8114
8115 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8116 entities with get/set subprograms, which is set on procedure entities
8117 generated by the compiler for a postcondition.
8118 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8119 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8120 entity for a declaration
8121 (Get_Unique_Entity_For_Decl): new function returning an entity which
8122 represents a declaration, so that matching spec and body have the same
8123 entity.
8124
8125 2011-08-03 Robert Dewar <dewar@adacore.com>
8126
8127 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8128 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8129
8130 2011-08-03 Yannick Moy <moy@adacore.com>
8131
8132 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8133 library-level because retriction No_Implicit_Dynamic_Code in the
8134 front-end prevents its definition as a local subprogram
8135 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8136 for reuse in other contexts
8137 (Traverse_Declarations_Or_Statements,
8138 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8139 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8140 procedures take a callback parameter to be called on all declarations
8141 * lib-xref.ads
8142 (Traverse_All_Compilation_Units): new generic function to traverse a
8143 compilation unit and call a callback parameter on all declarations
8144
8145 2011-08-03 Javier Miranda <miranda@adacore.com>
8146
8147 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8148 in Java since they are always enclosed in a namespace that
8149 differentiates them, and overloaded entities are supported by the VM.
8150
8151 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8152
8153 * checks.adb (Determine_Range): If a computed bound of an operation is
8154 outside the range of the base type of the expression, and overflow
8155 checks are enabled, the result is unknown and cannot be used for any
8156 subsequent constant folding.
8157 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8158 unknown, so is the result of the comparison.
8159
8160 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8161
8162 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8163 From_Abort. When finalization was triggered by an abort, propagate
8164 Standard'Abort_Signal rather than Program_Error.
8165 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8166 From_Abort.
8167 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8168 From_Abort. When finalization was triggered by an abort, propagate
8169 Standard'Abort_Signal rather than Program_Error.
8170 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8171 From_Abort.
8172 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8173 Abort_Id. Update the calls to Build_Object_Declarations and
8174 Build_Raise_Statement to include Abort_Id.
8175 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8176 calls to Build_Object_Declarations and Build_Raise_Statement to include
8177 Abort_Id.
8178 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8179 calls to Build_Object_Declarations and Build_Raise_Statement to include
8180 Abort_Id.
8181 (Build_Components): Create an entity for Abort_Id when exceptions are
8182 allowed on the target.
8183 (Build_Finalizer): New local variable Abort_Id.
8184 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8185 calls to Build_Object_Declarations and Build_Raise_Statement to include
8186 Abort_Id.
8187 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8188 declaration of flag Abort_Id to preserve the original abort status
8189 before finalization code is executed.
8190 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8191 runtime routine Raise_From_Controlled_Operation.
8192 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8193 Abort_Id. Update the call to Build_Object_Declarations to include
8194 Abort_Id. Update the layout of the finalizer body.
8195 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8196 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8197 clunky code to create all flags and objects related to
8198 exception propagation and replace it with a call to
8199 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8200 include Abort_Id.
8201 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8202 Add new formal Abort_Id and associated comment on its use.
8203 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8204 on its use.
8205 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8206 Remove the clunky code to create all flags and objects related to
8207 exception propagation and replace it with a call to
8208 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8209
8210 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8211
8212 * s-tassta.adb: Fix minor typos.
8213
8214 2011-08-03 Robert Dewar <dewar@adacore.com>
8215
8216 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8217 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8218
8219 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8220
8221 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8222 to packages. This ensures that the finalizer body will not end up
8223 inside the freeze node.
8224 (Process_Declarations): Add code to detect whether a freeze node has a
8225 nested finalization collection.
8226
8227 2011-08-03 Pascal Obry <obry@adacore.com>
8228
8229 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8230 (Current_Session): Return a not null access to Session_Type.
8231 (Default_Session): Likewise.
8232
8233 2011-08-03 Robert Dewar <dewar@adacore.com>
8234
8235 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8236 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8237
8238 2011-08-03 Pascal Obry <obry@adacore.com>
8239
8240 * g-awk.ads: Minor comment fix.
8241
8242 2011-08-03 Sergey Rybin <rybin@adacore.com>
8243
8244 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8245 the tree structure related to discriminant constraints.
8246 Original_Discriminant cannot be used any more for computing the
8247 defining name for the reference to a discriminant.
8248
8249 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8250
8251 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8252 function is not visibly tagged, this is not a dispatching call and
8253 therfore is not Tag_Indeterminate, even if the function is marked as
8254 dispatching on result.
8255
8256 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8257
8258 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8259 (Expand_N_Free_Statement): Add a guard to protect against run-times
8260 which do not support controlled types.
8261 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8262 against run-times which do not support controlled types.
8263 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8264 against run-times which do not support controlled types.
8265 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8266 against run-times which do not support controlled types.
8267 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8268 protect against run-times which do not support controlled types.
8269
8270 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8271
8272 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8273 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8274
8275 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8276
8277 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8278 modified in the source, to prevent spurious warnings when compiling
8279 with -gnatg.
8280
8281 2011-08-03 Thomas Quinot <quinot@adacore.com>
8282
8283 * a-except-2005.adb: Minor reformatting.
8284
8285 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8286
8287 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8288 is a renaming declaration in the private part of a package, do not emit
8289 a warning that the with_clause could be moved because the renaming may
8290 be used in the body or in a child unit.
8291
8292 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8293
8294 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8295 Propagate the Comes_From_Source attribute from the original return
8296 object to the renaming.
8297
8298 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8299
8300 * exp_ch7.adb (Build_Raise_Statement): Do not call
8301 Raise_From_Controlled_Operation when this routine is not present in
8302 the run-time library.
8303 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8304 libraries (Ravenscar), tasks are non-terminating, and protected objects
8305 and tasks can only appear at library level, so we do not want
8306 finalization of protected objects nor tasks.
8307 * exp_intr.adb: Minor clarification in comment.
8308 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8309 Gen_Output_File_C): Remove references to finalization of library-level
8310 objects when using restricted run-time libraries.
8311
8312 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8313
8314 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8315 Original_Discriminant only if the parent type is a generic formal.
8316
8317 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8318
8319 * exp_ch13.adb: Add with and use clause for Targparm;
8320 (Expand_N_Free_Statement): Prevent the generation of a custom
8321 Deallocate on .NET/JVM targets since this requires pools and address
8322 arithmetic.
8323 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8324 .NET/JVM targets, attach the newly allocated object to the access
8325 type's finalization collection. Do not generate a call to
8326 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8327 exist in the runtime.
8328 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8329 create a custom Allocate for object that do not require initialization.
8330 Attach a newly allocated object to the access type's finalization
8331 collection on .NET/JVM.
8332 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8333 assignment of controlled types on .NET/JVM. The two hidden pointers
8334 Prev and Next and stored and later restored after the assignment takes
8335 place.
8336 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8337 kludge for .NET/JVM to recognize a particular piece of code coming from
8338 Heap_Management and change the call to Finalize into Deep_Finalize.
8339 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8340 finalization collections on .NET/JVM only for types derived from
8341 Controlled. Separate the association of storage pools with a collection
8342 and only allow it on non-.NET/JVM targets.
8343 (Make_Attach_Call): New routine.
8344 (Make_Detach_Call): New routine.
8345 (Process_Object_Declarations): Suppress the generation of
8346 build-in-place return object clean up code on .NET/JVM since it uses
8347 pools.
8348 * exp_ch7.ads (Make_Attach_Call): New routine.
8349 (Make_Detach_Call): New routine.
8350 * exp_intr.adb Add with and use clause for Targparm.
8351 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8352 on .NET/JVM targets.
8353 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8354 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8355 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8356 names used in finalization.
8357
8358 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8359
8360 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8361 (Attach, Detach): Lock the current task when chaining an object onto a
8362 collection.
8363
8364 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8365
8366 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8367 Rewritten to create the message strings when the exception is not
8368 raised by an abort during finalization.
8369 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8370 Raise_From_Controlled_Operation and update its associated comment.
8371 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8372 Ada.Finalization.Heap_Management provides key functionality
8373 associated with controlled objects on the heap, their creation,
8374 finalization and reclamation. Type Finalization_Collection is
8375 effectively a wrapper which sits ontop of a storage pool and performs
8376 all necessary bookkeeping for all the objects it contains. Each
8377 access-to-controlled or access-to-class-wide type receives a collection
8378 as part of its expansion. The compiler generates buffer code and
8379 invokes Allocate / Deallocate to create and destroy allocated
8380 controlled objects.
8381 * a-finali.adb ("="): Removed.
8382 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8383 fields Prev and Next.
8384 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8385 A library unit with at least one controlled object on the library level
8386 has a special finalizer which is invoked by the binder. To signal this,
8387 ali files carry field PF.
8388 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8389 associated comment on field usage.
8390 * a-tags.adb (Get_RC_Offset): Removed.
8391 (Needs_Finalization): New routine.
8392 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8393 Dispatch tables now carry field Needs_Finalization which provides
8394 runtime indication whether a type is controlled or has controlled
8395 components or both. Remove field RC_Offset.
8396 (Get_RC_Offset): Removed along with its associated pragma Export.
8397 Since tagged types with controlled components no longer carry hidden
8398 field _controller, the special mechanism to retrieve its location is no
8399 longer needed.
8400 (Needs_Finalization): New routine.
8401 * atree.ads, atree.adb (Elist24): New routine.
8402 (Set_Elist24): New routine.
8403 * atree.h: Add a define clause for Elist24.
8404 * bindgen.adb New library-level variable Lib_Final_Built.
8405 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8406 presence of a VM target, the routine generates calls to the proper
8407 library finalization routine.
8408 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8409 targets. Set the correct library finalization routine depending on
8410 whether the library has controlled objects or this is a VM compilation.
8411 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8412 to library-level finalizers of compiled units in reverse order of
8413 elaboration. It also produces exception management code and reraises a
8414 potential exception after all units have been finalized.
8415 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8416 library-level finalizers of compiled units in reverse order of
8417 elaboration.
8418 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8419 definitions of all library-level finalizers available to the compilation
8420 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8421 dependent code.
8422 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8423 System.Standard_Library.Adafinal directly. If the library needs
8424 finalization actions, create the sequence of finalization calls.
8425 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8426 Generate a with clause for System.Soft_Links when compiling for a VM.
8427 Remove the code which imports System.Standard_Library.Adafinal as
8428 Do_Finalize. Generate the library finalization routine.
8429 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8430 If the library needs finalization actions, create all the definitions
8431 of library- level finalizers.
8432 (Has_Finalizer): New routine. Determines whether at least one compiled
8433 unit has a library-level finalizer.
8434 Add type Qualification_Mode.
8435 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8436 * einfo.adb: New usage of field 15 as Return_Flag.
8437 Remove Finalization_Chain_Entity from the usages of field 19.
8438 Remove Associated_Final_Chain from the usages of field 23.
8439 New usage of field 23 as Associated_Collection.
8440 New usage of field 24 as Finalizer.
8441 New usage of flag 252 as Is_Processed_Transient.
8442 (Associated_Final_Chain): Removed.
8443 (Associated_Collection): New routine.
8444 (Finalization_Chain_Entity): Removed.
8445 (Finalizer): New routine.
8446 (Is_Finalizer): New routine.
8447 (Is_Processed_Transient): New routine.
8448 (Return_Flag): New routine.
8449 (Set_Associated_Final_Chain): Removed.
8450 (Set_Associated_Collection): New routine.
8451 (Set_Finalization_Chain_Entity): Removed.
8452 (Set_Finalizer): New routine.
8453 (Set_Is_Processed_Transient): New routine.
8454 (Set_Return_Flag): New routine.
8455 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8456 displayed flags.
8457 (Write_Field8_Name): Alphabetize the output.
8458 (Write_Field11_Name): Alphabetize the output.
8459 (Write_Field12_Name): Alphabetize the output.
8460 (Write_Field13_Name): Alphabetize the output.
8461 (Write_Field14_Name): Alphabetize the output.
8462 (Write_Field15_Name): Alphabetize the output.
8463 (Write_Field16_Name): Alphabetize the output.
8464 (Write_Field17_Name): Alphabetize the output.
8465 (Write_Field18_Name): Alphabetize the output.
8466 (Write_Field19_Name): Alphabetize the output. Remove the output of
8467 Finalization_Chain_Entity.
8468 (Write_Field20_Name): Alphabetize the output.
8469 (Write_Field21_Name): Alphabetize the output.
8470 (Write_Field22_Name): Alphabetize the output.
8471 (Write_Field23_Name): Alphabetize the output. Remove the output of
8472 Associated_Final_Chain. Add output for Associated_Collection.
8473 (Write_Field24_Name): Alphabetize the output.
8474 (Write_Field25_Name): Add output for Finalizer.
8475 (Write_Field26_Name): Alphabetize the output.
8476 (Write_Field27_Name): Alphabetize the output.
8477 (Write_Field28_Name): Alphabetize the output.
8478 * einfo.ads: Add new field description for Associated_Collection and
8479 its uses in nodes.
8480 Remove Associated_Final_Chain and its uses in nodes.
8481 Remove Finalization_Chain_Entity and its uses in nodes.
8482 Add new field description for Finalizer and its uses in nodes.
8483 Add new synthesized attribute Is_Finalizer.
8484 Add new flag description for Is_Processed_Transient and its uses in
8485 nodes.
8486 Add new field description for Return_Flag and its uses in nodes.
8487 (Associated_Final_Chain): Removed along with its pragma Inline.
8488 (Associated_Collection): New routine and pragma Inline.
8489 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8490 (Finalizer): New routine and pragma Inline.
8491 (Is_Finalizer): New routine and pragma Inline.
8492 (Is_Processed_Transient): New routine and pragma Inline.
8493 (Return_Flag): New routine and pragma Inline.
8494 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8495 (Set_Associated_Collection): New routine and pragma Inline.
8496 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8497 (Set_Finalizer): New routine and pragma Inline.
8498 (Set_Is_Processed_Transient): New routine and pragma Inline.
8499 (Set_Return_Flag): New routine and pragma Inline.
8500 * exp_aggr.adb: Alphabetize subprograms.
8501 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8502 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8503 associated comments. Remove local variables External_Final_List and
8504 Attach.
8505 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8506 Ancestor. Remove the retrieval of finalization lists. Update the call to
8507 Make_Adjust_Call.
8508 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8509 lists. Update the call to Late_Expansion.
8510 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8511 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8512 (Gen_Assign): Remove the retrieval of the finalization list used to
8513 build the assignment. Update the calls to Make_Init_Call and
8514 Make_Adjust_Call.
8515 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8516 Remove the mechanism to determine attachment levels and finalization
8517 list retrieval. Remove the processing for coextensions.
8518 (Init_Controller): Removed. Controllers no longer exist.
8519 (Late_Expansion): Remove formals Flist and Obj along with their
8520 associated comments. Update the calls to Build_Record_Aggr_Code and
8521 Build_Array_Aggr_Code.
8522 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8523 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8524 appear in entry bodies, protected subprograms and task bodies.
8525 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8526 * exp_ch3.adb (Add_Final_Chain): Removed.
8527 (Build_Array_Init_Proc): Alphabetize local variables.
8528 (Build_Assignment): Alphabetize local variables. Update the call to
8529 Maked_Adjust_Call.
8530 (Build_Class_Wide_Master): Rename local variables to better reflect
8531 their role.
8532 (Build_Discriminant_Assignments): Code reformatting.
8533 (Build_Init_Call_Thru): Code reformatting.
8534 (Build_Init_Procedure): Code reformatting. Generate a special version
8535 of Deep_Finalize which is capable of finalizing all initialized
8536 components and ignore the rest.
8537 (Build_Init_Statements): Rename local variables to better reflect their
8538 role.
8539 Reimplement the mechanism to include the creation and update of an index
8540 variable called a "counter". It is used as a bookmark for tracing
8541 initialized and non-initialized components.
8542 (Build_Initialization_Call): Remove local variable Controller_Typ.
8543 Alphabetize all local variables. Remove the initialization of the
8544 record controller and update the call to Make_Init_Call.
8545 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8546 New local variable Counter.
8547 (Constrain_Array): Alphabetize.
8548 (Expand_Freeze_Array_Type): Create a collection instead of a
8549 finalization list.
8550 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8551 Finalize_Address which is used in conjunction with allocated controlled
8552 objects.
8553 (Expand_N_Object_Declaration): Remove the creation of a finalization
8554 list for anonymous access types. Update the calls to Make_Init_Call and
8555 Make_Adjust_Call.
8556 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8557 retrieval of finalization lists. Remove the expansion of the record
8558 controller. Create TSS primitive Finalize_Address used in conjunction
8559 with controlled objects on the heap. Create finalization collections
8560 for access-to-controlled record components.
8561 (Expand_Record_Controller): Removed.
8562 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8563 class-wide types now requires additional processing. Create
8564 finalization collections for access-to-controlled types.
8565 (Increment_Counter): New routine.
8566 (Make_Counter): New routine.
8567 (Make_Eq_If): Remove the mention of Name_uController.
8568 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8569 types coming from System.Finalization_Root.
8570 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8571 (Predefined_Primitive_Bodies): There is no longer need to skip types
8572 coming from System.Finalization_Root.
8573 (Stream_Operation_OK): Do not generate stream routines for
8574 type Ada.Finalization.Heap_Management.Finalization_Collection.
8575 * exp_ch3.ads: Alphabetize subprograms.
8576 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8577 Add with and use clause for Lib.
8578 (Complete_Coextension_Finalization): Removed.
8579 (Complete_Controlled_Allocation): New routine. Create a finalization
8580 collection for anonymous access-to-controlled types. Create a custom
8581 Allocate which interfaces with the back end and the machinery in
8582 Heap_Management.
8583 (Expand_Allocator_Expression): Add necessary calls to
8584 Complete_Controlled_Allocation. Remove the retrieval of finalization
8585 lists. Update the calls to Make_Adjust_Call. Generate a call to
8586 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8587 the associated collection.
8588 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8589 Code clean up. Remove the retrieval of finalization lists and
8590 attachment levels.
8591 Update the call to Make_Init_Call. Generate a call to
8592 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8593 the associated collection.
8594 (Get_Allocator_Final_List): Removed. Finalization lists are not
8595 available.
8596 (Suitable_Element): Remove the mention of Name_uController.
8597 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8598 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8599 the left hand side, carry out the assignment and adjust the left hand
8600 side.
8601 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8602 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8603 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8604 BIP_Collection and BIPcollection.
8605 (Build_Heap_Allocator): New routine used to allocate the return object
8606 of a build-in-place function onto a collection.
8607 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8608 (Expand_Call): Do not replace direct calls to Deep routines with their
8609 aliases.
8610 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8611 and update their occurrences. Add a special return flag to monitor the
8612 [ab]normal execution of the function. The flag is set right before the
8613 return statement.
8614 Rewrite the mechanism used to allocate a build-in-place return object
8615 on the heap or on a storage pool.
8616 (Is_Direct_Deep_Call): New routine.
8617 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8618 build-in-place function call instead of a final list. Build a call to
8619 Set_Finalize_Address_Ptr to decorate the associated collection.
8620 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8621 order to name the build-in-place function call's result for later
8622 finalization. Add a collection to a build-in-place function call
8623 instead of a final list.
8624 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8625 build-in-place function call instead of a final list. Remove the code
8626 which moves one final list and transforms it into the actual in a
8627 nested build-in-place call.
8628 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8629 build-in-place function call instead of a final list.
8630 (Move_Final_List): Removed.
8631 (Needs_BIP_Collection): New routine.
8632 (Needs_BIP_Final_List): Removed.
8633 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8634 enumeration type BIP_Formal_Kind.
8635 Update the related comment.
8636 (Needs_BIP_Collection): New routine.
8637 (Needs_BIP_Final_List): Removed.
8638 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8639 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8640 majority of subprograms in this unit. Add Name_Finalize_Address to
8641 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8642 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8643 statements for an array type.
8644 (Build_Adjust_Statements): Create the adjust statements for a record
8645 type.
8646 (Build_Cleanup_Statements): New routine. A procedure which given any
8647 construct containing asynchronous calls, references to _master, or is a
8648 task body, a task allocation or a protected body produces the necessary
8649 runtime calls to clean up these constructs.
8650 (Build_Exception_Handler): New routine.
8651 (Build_Final_List): Removed.
8652 (Build_Finalization_Collection): New routine. A core procedure which
8653 creates a collection to service heap allocated controlled objects
8654 associated with an access-to-controlled type.
8655 (Build_Finalize_Statements): Create the finalization statements for a
8656 record types.
8657 (Build_Finalizer): New routine. A core procedure which given any
8658 construct with declarations and/or statements detects all objects which
8659 need any type of clean up (controlled objects, protected objects) and
8660 generates all necessary code to clean up the said objects in the proper
8661 order.
8662 (Build_Finalizer_Call): New routine.
8663 (Build_Initialize_Statements): Create the initialization statements for
8664 an array type. The generated routine contains code to finalize partially
8665 initialized arrays.
8666 (Build_Object_Declarations): New routine.
8667 (Build_Raise_Statement): New routine.
8668 (Clean_Simple_Protected_Objects): Removed.
8669 (Controller_Component): Removed.
8670 (Enclosing_Function): New routine.
8671 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8672 either declarations or statements or both.
8673 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8674 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8675 package.
8676 (Find_Final_List): Removed.
8677 (Global_Flist_Ref): Removed.
8678 (In_Finalization_Root): Removed.
8679 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8680 scope in terms of tree nodes. Process all transient variables within
8681 that range.
8682 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8683 generated after the adjust.
8684 (Make_Attach_Call): Removed.
8685 (Make_Call): New routine.
8686 (Make_Clean): Removed.
8687 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8688 build routines.
8689 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8690 in Deep routines.
8691 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8692 build routines.
8693 (Make_Final_Call): Modified to simply create a call to either
8694 Deep_Finalize or Finalize.
8695 (Make_Finalize_Address_Body): New routine.
8696 (Make_Finalize_Address_Stmts): New routine. A function which produces
8697 TSS primitive Finalize_Address used in conjunction with heap allocated
8698 controlled objects.
8699 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8700 (Make_Init_Call): Rewritten. There is no longer an attach call
8701 generated after initialization.
8702 (Make_Local_Deep_Finalize): New routine.
8703 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8704 (Make_Transient_Block): Remove the finalization list retrieval and
8705 manipulation.
8706 (Needs_Finalization): Moved to Exp_Util.
8707 (Parent_Field_Type): New routine.
8708 (Preprocess_Components): New routine.
8709 (Process_Transient_Objects): New routine.
8710 (Wrap_HSS_In_Block): New routine.
8711 (Wrap_Transient_Declaration): Remove finalization list management and
8712 controller insertion.
8713 (Wrap_Transient_Expression): Code reformatting.
8714 (Wrap_Transient_Statement): Code reformatting.
8715 * exp_ch7.ads (Build_Final_List): Removed.
8716 (Build_Finalization_Collection): New routine.
8717 (Build_Raise_Statement): New routine.
8718 (Controller_Component): Removed.
8719 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8720 (Find_Final_List): Removed.
8721 (In_Finalization_Root): Removed.
8722 (Is_Simple_Protected_Type): Update related comment.
8723 (Make_Adjust_Call): New parameter profile and associated comments.
8724 (Make_Attach_Call): Removed.
8725 (Make_Final_Call): New parameter profile and associated comments.
8726 (Make_Finalize_Address_Body): New routine.
8727 (Make_Init_Call): New parameter profile and associated comments.
8728 (Make_Local_Deep_Finalize): New routine.
8729 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8730 (Needs_Finalization): Moved to Exp_Util.
8731 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8732 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8733 (Find_Protection_Type): Moved to Exp_Util.
8734 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8735 (Make_DT): Update sequence of dispatch table initialization. Remove the
8736 initialization of field RC_Offset. Add initialization of field Needs_
8737 Finalization.
8738 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8739 Reimplement how an object is first finalized, then deallocated.
8740 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8741 Code reformatting.
8742 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8743 Register TSS_Finalize_Address with type TSS_Names.
8744 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8745 procedure provides the interface between an allocation / deallocation
8746 and the support machinery in Ada.Finalization.Heap_Management.
8747 (Find_Init_Call): Code reformatting.
8748 (Find_Init_Call_In_List): Code reformatting.
8749 (Find_Protection_Type): Moved from Exp_Ch9.
8750 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8751 (Has_Controlled_Coextensions): Removed.
8752 (Has_Controlled_Objects): New routine.
8753 (In_Library_Level_Package_Body): New routine.
8754 (Insert_Action_After): New routine.
8755 (Is_Finalizable_Transient): New routine. This predicate determines
8756 whether an object declaration is one of the many variants of controlled
8757 transients.
8758 (Is_Null_Access_BIP_Func_Call): New routine.
8759 (Is_Non_BIP_Func_Call): New routine.
8760 (Is_Related_To_Func_Return): New routine.
8761 (Needs_Finalization): Moved from Exp_Ch7.
8762 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8763 (Find_Protection_Type): Moved from Exp_Ch9.
8764 (Has_Controlled_Coextensions): Removed.
8765 (Has_Controlled_Objects): New routine.
8766 (In_Library_Level_Package_Body): New routine.
8767 (Insert_Action_After): New routine.
8768 (Is_Finalizable_Transient): New routine.
8769 (Is_Null_Access_BIP_Func_Call): New routine.
8770 (Is_Non_BIP_Func_Call): New routine.
8771 (Is_Related_To_Func_Return): New routine.
8772 (Needs_Finalization): Moved from Exp_ch7.
8773 * expander.adb (Expand): Add a case for N_Free_Statement.
8774 * freeze.adb (Freeze_All): Replace the generation of a finalization
8775 list with a collection for access-to-controlled types.
8776 (Freeze_Entity): Code reformatting.
8777 (Freeze_Record_Type): Remove the freezing of a record controller
8778 component.
8779 (Freeze_Subprogram): Code reformatting.
8780 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8781 finalization list.
8782 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8783 has a library-level finalizer.
8784 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8785 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8786 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8787 files. Add a-fihema to the list of object files.
8788 * par-ch4.adb:
8789 Alphabetize the associations in type Is_Parameterless_Attribute.
8790 * rtsfind.ads: Ada.Finalization_List.Controller and
8791 System.Finalization_Implementation are no longer a GNAT unit.
8792 Update the range of type Ada_Finalization_Child. Remove the following
8793 recoverable entities:
8794
8795 RE_Attach_To_Final_List
8796 RE_Deep_Tag_Attach
8797 RE_Finalize_List
8798 RE_Finalize_One
8799 RE_Finalizable_Ptr_Ptr
8800 RE_Global_Final_List
8801 RE_Limited_Record_Controller
8802 RE_List_Controller
8803 RE_Move_Final_List
8804 RE_Record_Controller
8805 RE_Simple_List_Controller
8806
8807 Add the following recoverable entities:
8808
8809 RE_Add_Offset_To_Address
8810 RE_Allocate
8811 RE_Base_Pool
8812 RE_Deallocate
8813 RE_Exception_Identity
8814 RE_Finalization_Collection
8815 RE_Finalization_Collection_Ptr
8816 RE_Needs_Finalization
8817 RE_Save_Library_Occurrence
8818 RE_Set_Finalize_Address_Ptr
8819 RE_Set_Storage_Pool_Ptr
8820 RE_Storage_Count
8821 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8822 Name_uController.
8823 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8824 (First_Stored_Discriminant): Remove the mention of Name_uController.
8825 * sem_aux.ads: Comment reformatting.
8826 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8827 to redecorate an already existing class-wide type.
8828 (Decorate_Tagged_Type): New parameter profile and associated comment.
8829 Create a "shadow class-wide type" for a shadow entity.
8830 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8831 of the final chain along with the associated comment.
8832 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8833 Full_Desig and set it to the full view of the designated type.
8834 Initialize the finalization collection to empty.
8835 (Build_Derived_Record_Type): Alphabetize local variables. Code
8836 reformatting.
8837 (Collect_Fixed_Components): Remove the mention of Name_uController.
8838 (Create_Constrained_Components): Remove the mention of Name_uController.
8839 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8840 class-wide type of a shadow entity.
8841 (Process_Full_View): Update the machinery which marks type
8842 Limited_Controlled's entity as limited.
8843 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8844 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8845 list, instead make a collection build-in-place formal.
8846 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8847 a designated type in order to establish a match between the renaming
8848 and the renamed entity.
8849 (Find_Selected_Component): Add guard to prevent spurious exceptions
8850 from being raised on .NET/JVM.
8851 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8852 to the list of primitive that need special processing. Update arrays
8853 C_Names and D_Names.
8854 (Replace_Types): Handle class-wide types.
8855 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8856 different parameter profile, look at the first formal.
8857 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8858 use clauses for Exp_Util.
8859 * sem_res.adb: Remove with and use clauses for Elists.
8860 (Propagate_Coextensions): Removed.
8861 (Resolve_Allocator): Do not propagate the list of coextensions from one
8862 allocator to another.
8863 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8864 Deaccessed_T to Desig_Typ.
8865 (Enter_Name): Remove the mention of Name_uController.
8866 (Gather_Components): Remove the mention of Name_uController.
8867 (Incomplete_Or_Private_View): New routine.
8868 (Is_Coextension_Root): Removed.
8869 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8870 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8871 (Is_Coextension_Root): Removed.
8872 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8873 Controlled types are now derived from a null tagged record. Remove
8874 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8875 * sinfo.adb (Coextensions): Removed.
8876 (Set_Coextensions): Removed.
8877 * sinfo.ads: Remove Coextensions from the explanation of node fields
8878 and its uses in nodes.
8879 Update the field usage of N_Allocator.
8880 (Coextensions): Removed along with its pragma Inline.
8881 (Set_Coextensions): Removed along with its pragma Inline.
8882 * snames.ads-tmpl: Remove names
8883
8884 Name_uClean
8885 Name_uController
8886 Name_uFinal_List
8887 Name_uLocal_Final_List
8888 Name_Finalization_Root
8889 Name_Next
8890 Name_Prev
8891
8892 Add names
8893
8894 Name_uFinalizer
8895 Name_Finalize_Address
8896 * s-pooglo.adb (Allocate): Add overriding indicator.
8897 (Deallocate): Add overriding indicator.
8898 (Storage_Size): Add overriding indicator.
8899 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8900 than Finalize_Global_List.
8901 (Null_Finalize_Global_List): Removed.
8902 (Save_Library_Occurrence): New routine.
8903 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8904 initialization. Add variable Finalize_Library_Objects along with its
8905 pragma Export. Add variables Library_Exception and
8906 Library_Exception_Set along with their pragma Export.
8907 (Null_Finalize_Global_List): Removed.
8908 (Save_Library_Occurrence): New routine.
8909 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8910 rather than Finalize_Global_List.
8911 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8912 of the constructed node.
8913
8914 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8915
8916 * link.c: Include "auto-host.h" before system headers.
8917
8918 2011-08-03 Vincent Celier <celier@adacore.com>
8919
8920 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8921 that are not extended. Do not check if a library project that is
8922 extended should be regenerated. Do not add to table Library_Paths the
8923 libraries that are in extended projects. Link only with libraries that
8924 are in libray projects that are not extended.
8925 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8926 for a library project that is extended.
8927
8928 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8929
8930 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8931 conforming subprogram renamings that appear to be completions if they
8932 are not fully conformant.
8933 Such renamings are homographs but not completions.
8934 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8935 names in a subprogram renaming that appears in an instance.
8936
8937 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8938
8939 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8940 not immutably limited, build actual subtype from expression to provide
8941 proper bounds to caller.
8942
8943 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8944
8945 * sem_ch8.adb: Minor comment correction.
8946
8947 2011-08-03 Thomas Quinot <quinot@adacore.com>
8948
8949 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8950 returning a limited array, use an extended return statement.
8951
8952 2011-08-03 Vincent Celier <celier@adacore.com>
8953
8954 * make.adb (Initialize): If --subdirs= is used, but no project file is
8955 specified, attempt to create the specify subdir if it does not already
8956 exist and use it as the object directory as if -D had been specified.
8957
8958 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8959
8960 * s-tpopsp-vms.adb: New file.
8961 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8962 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8963
8964 2011-08-03 Emmanuel Briot <briot@adacore.com>
8965
8966 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8967 package.
8968
8969 2011-08-03 Yannick Moy <moy@adacore.com>
8970
8971 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8972 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8973 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8974 detect that an array has static bounds.
8975
8976 2011-08-03 Thomas Quinot <quinot@adacore.com>
8977
8978 * exp_dist.adb: Minor reformatting.
8979
8980 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8981
8982 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8983 (ATCB_Key): Removed, not always used.
8984
8985 2011-08-03 Emmanuel Briot <briot@adacore.com>
8986
8987 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8988 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8989 most remaining global variables.
8990
8991 2011-08-03 Robert Dewar <dewar@adacore.com>
8992
8993 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8994 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8995 reformatting.
8996
8997 2011-08-03 Javier Miranda <miranda@adacore.com>
8998
8999 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9000 that must be passed by copy in VM targets.
9001
9002 2011-08-03 Emmanuel Briot <briot@adacore.com>
9003
9004 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9005 duplicates a similar htable now in the project tree.
9006
9007 2011-08-03 Claire Dross <dross@adacore.com>
9008
9009 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9010 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9011 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9012 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9013 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9014 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9015 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9016 update.
9017
9018 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9019
9020 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9021 (ATCB_Key): Removed, not always used.
9022 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9023 s-taprop-posix.adb.
9024 * s-tpopsp-tls.adb: New file.
9025 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9026 x86/x64/ia64/powerpc/sparc Linux.
9027
9028 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9029
9030 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9031 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9032
9033 2011-08-03 Thomas Quinot <quinot@adacore.com>
9034
9035 * rtsfind.ads, exp_dist.adb, exp_dist.ads
9036 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9037 Fix type selection for mapping integer types to PolyORB types.
9038
9039 2011-08-03 Bob Duff <duff@adacore.com>
9040
9041 * sem_ch7.adb: Minor comment clarification.
9042
9043 2011-08-03 Bob Duff <duff@adacore.com>
9044
9045 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9046 an error analyzing a choice, skip further processing. Further
9047 processing could cause a crash or cascade errors.
9048
9049 2011-08-03 Emmanuel Briot <briot@adacore.com>
9050
9051 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9052 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9053 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9054 prj-env.ads (Shared_Project_Tree_Data): new type
9055 An aggregate project and its aggregated trees need to share the common
9056 data structures used for lists of strings, packages,... This makes the
9057 code simpler since otherwise we have to pass the root tree (also used
9058 for the configuration file data) in addition to the current project
9059 tree. This also avoids ambiguities as to which tree should be used.
9060 And finally this saves a bit of memory.
9061 (For_Every_Project_Imported): new parameter Tree.
9062 Since aggregated projects are using a different tree, we need to let
9063 the caller know which tree to use to manipulate the returned project.
9064
9065 2011-08-03 Robert Dewar <dewar@adacore.com>
9066
9067 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9068 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9069 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9070 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9071
9072 2011-08-03 Javier Miranda <miranda@adacore.com>
9073
9074 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9075 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9076
9077 2011-08-03 Bob Duff <duff@adacore.com>
9078
9079 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9080 the Base_Type.
9081
9082 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9083
9084 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9085 g-sehash.ads: Fix typo. Update header.
9086
9087 2011-08-03 Thomas Quinot <quinot@adacore.com>
9088
9089 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9090 expansion.
9091
9092 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9093
9094 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9095 prefixes of private types along with records, since the selector may be
9096 a discriminant.
9097 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9098 private types along with records, since the selector may be a
9099 discriminant.
9100
9101 2011-08-03 Emmanuel Briot <briot@adacore.com>
9102
9103 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9104
9105 2011-08-03 Javier Miranda <miranda@adacore.com>
9106
9107 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9108 Tagged_Type_Expansion.
9109
9110 2011-08-03 Yannick Moy <moy@adacore.com>
9111
9112 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9113 violation when the argument of concatenation is the name of a
9114 constant.
9115
9116 2011-08-03 Emmanuel Briot <briot@adacore.com>
9117
9118 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9119 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9120 (Process_Declarative_Items): new parameter Child_Env.
9121
9122 2011-08-03 Yannick Moy <moy@adacore.com>
9123
9124 * alfa.ads: Update format of ALFA section in ALI file in order to
9125 add a mapping from bodies to specs when both are present.
9126 (ALFA_Scope_Record): Add components for spec file/scope.
9127 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9128 present.
9129 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9130 collected, fill in the spec information when relevant.
9131 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9132 present.
9133
9134 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9135
9136 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9137 code unit to decide whether to add internally generated subprograms.
9138
9139 2011-08-03 Javier Miranda <miranda@adacore.com>
9140
9141 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9142 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9143 be handled by copy in VM targets.
9144
9145 2011-08-03 Emmanuel Briot <briot@adacore.com>
9146
9147 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9148 code with Makeutl.Get_Switches.
9149 * prj-tree.adb: Update comment.
9150
9151 2011-08-03 Thomas Quinot <quinot@adacore.com>
9152
9153 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9154 subprogram with a limited formal that does not support external
9155 streaming.
9156
9157 2011-08-03 Yannick Moy <moy@adacore.com>
9158
9159 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9160 continuation line
9161 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9162 not from current unit in two phases, because it is not possible to
9163 change the table while iterating over its content.
9164 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9165
9166 2011-08-03 Sergey Rybin <rybin@adacore.com>
9167
9168 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9169 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9170
9171 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9172
9173 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9174 and the component type is composite, this is ambiguous for predefined
9175 concatenation, but if the node is not overloaded and the entity is a use
9176 -defined function its profile can be used to resolve that aggregate.
9177
9178 2011-08-03 Robert Dewar <dewar@adacore.com>
9179
9180 * exp_ch4.adb: Minor code cleanup.
9181
9182 2011-08-03 Thomas Quinot <quinot@adacore.com>
9183
9184 * exp_dist.adb: Do not generate distribution stubs if serious errors
9185 have been diagnosed.
9186
9187 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9188
9189 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9190 the first formal of a primitive operation, go to the base type to
9191 handle properly an access to a derived type with constrained
9192 discriminants.
9193 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9194 user-defined function that is only use-visible.
9195
9196 2011-08-03 Robert Dewar <dewar@adacore.com>
9197
9198 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9199 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9200 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9201 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9202 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9203 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9204 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9205 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9206
9207 2011-08-03 Robert Dewar <dewar@adacore.com>
9208
9209 * repinfo.adb (List_Mechanism): Add handling of
9210 Convention_Ada_Pass_By_XXX.
9211 * sem_mech.adb (Set_Mechanism): Ditto.
9212 * sem_prag.adb (Process_Convention): Add entries for
9213 Convention_Ada_Pass_By_XXX.
9214 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9215
9216 2011-08-03 Pascal Obry <obry@adacore.com>
9217
9218 * makeutl.adb: Minor reformatting.
9219
9220 2011-08-03 Vincent Celier <celier@adacore.com>
9221
9222 * fname-uf.adb
9223 (Get_File_Name) If the file cannot be found when there are no config
9224 pragmas file and May_Fail is True, return No_File instead of the file
9225 name, to be consistent.
9226
9227 2011-08-03 Pascal Obry <obry@adacore.com>
9228
9229 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9230 to null pointer.
9231
9232 2011-08-03 Javier Miranda <miranda@adacore.com>
9233
9234 * sem_ch13.adb
9235 (Same_Representation): In VM targets the representation of arrays with
9236 aliased components differs from arrays with non-aliased components.
9237
9238 2011-08-03 Emmanuel Briot <briot@adacore.com>
9239
9240 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9241 not systematically lower case attribute indexes that contain no "."
9242 Fix definition of several Naming attributes, which take
9243 a unit name as index and therefore should be case insensitive.
9244 Minor refactoring (reduce length of variable names).
9245
9246 2011-08-03 Emmanuel Briot <briot@adacore.com>
9247
9248 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9249
9250 2011-08-03 Emmanuel Briot <briot@adacore.com>
9251
9252 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9253 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9254 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9255 prj-tree.ads (Prj.Tree.Environment): new type.
9256
9257 2011-08-03 Emmanuel Briot <briot@adacore.com>
9258
9259 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9260 prj-tree.adb, prj-tree.ads (Environment): new type.
9261
9262 2011-08-03 Emmanuel Briot <briot@adacore.com>
9263
9264 * prj-tree.ads: Remove unused variable.
9265
9266 2011-08-03 Yannick Moy <moy@adacore.com>
9267
9268 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9269 issuing messages related to SPARK restriction violation.
9270
9271 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9272
9273 * sem_ch6.adb: guard against error nodes in return statements.
9274
9275 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9276
9277 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9278 a warning can only appear on a configuration file, so emit warning
9279 without further checks.
9280
9281 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9282
9283 * s-interr.ads: add overriding keyword.
9284
9285 2011-08-03 Geert Bosch <bosch@adacore.com>
9286
9287 * exp_attr.adb: Fix minor typo.
9288
9289 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9290
9291 * par-ch4.adb: improve error recovery.
9292
9293 2011-08-03 Emmanuel Briot <briot@adacore.com>
9294
9295 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9296 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9297 to Errout_Handling.
9298
9299 2011-08-03 Emmanuel Briot <briot@adacore.com>
9300
9301 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9302 "external" as an attribute name in aggregate projects.
9303
9304 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9305
9306 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9307 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9308 from 0, so we need to adjust.
9309
9310 2011-08-03 Emmanuel Briot <briot@adacore.com>
9311
9312 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9313 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9314
9315 2011-08-03 Yannick Moy <moy@adacore.com>
9316
9317 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9318 restriction on overloaded entity if the entity is not an operator.
9319
9320 2011-08-03 Yannick Moy <moy@adacore.com>
9321
9322 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9323 restrict.ads: Rename remaining Check_Formal_Restriction* into
9324 Check_SPARK_Restriction*.
9325
9326 2011-08-03 Emmanuel Briot <briot@adacore.com>
9327
9328 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9329 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9330 qualifier.
9331 (Project_Empty): removed
9332 (Empty_Project): new parameter Qualifier
9333 This is used to have fields specific to aggregate projects, cleaner
9334 New field to store the list of aggregated projects.
9335 (Check_Aggregate_Project): removed
9336 (Process_Aggregated_Projects, Free): new subprograms.
9337
9338 2011-08-03 Olivier Hainque <hainque@adacore.com>
9339
9340 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9341
9342 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9343
9344 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9345 explicit dereference of an unconstrained type, create a constrained
9346 subtype for it, as is done for function calls that return an
9347 unconstrained type.
9348
9349 2011-08-03 Thomas Quinot <quinot@adacore.com>
9350
9351 * g-pehage.adb (Finalize): Avoid possible double-free.
9352
9353 2011-08-03 Steve Baird <baird@adacore.com>
9354
9355 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9356 Elab_Spec/Body attrs in CodePeer_Mode.
9357
9358 2011-08-03 Javier Miranda <miranda@adacore.com>
9359
9360 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9361 low bound is not known at compile time but they have no others choice.
9362 Done because in this case the bounds can be obtained directly from the
9363 aggregate.
9364
9365 2011-08-03 Ed Falis <falis@adacore.com>
9366
9367 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9368 on VxWorks SMP. Remove unusable constant ANY_CPU.
9369
9370 2011-08-03 Emmanuel Briot <briot@adacore.com>
9371
9372 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9373 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9374 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9375 Prj.Env.Initialize_Empty): new subprograms
9376 (Get_Env, Find_Project): remove parameter Target_Name.
9377
9378 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9379
9380 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9381 as a condition for the delayed call to Derived_Subprograms done for the
9382 case of the rewriting of a derived type that constrains the
9383 discriminants of its parent type.
9384 Avoids redundant subprogram derivations for private subtype derivations.
9385
9386 2011-08-03 Javier Miranda <miranda@adacore.com>
9387
9388 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9389 Build_Record_Aggr_Code.
9390 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9391 discriminants in extension aggregates.
9392
9393 2011-08-03 Emmanuel Briot <briot@adacore.com>
9394
9395 * prj-pp.adb (Print): also output project qualifiers, since in
9396 particular "aggregate" is mandatory in an aggregate project.
9397
9398 2011-08-03 Emmanuel Briot <briot@adacore.com>
9399
9400 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9401 (Debug_Output): new function.
9402
9403 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9404
9405 * gnat_ugn.texi: Document -Wstack-usage.
9406 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9407
9408 2011-08-03 Thomas Quinot <quinot@adacore.com>
9409
9410 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9411 have keyword LIMITED.
9412
9413 2011-08-03 Yannick Moy <moy@adacore.com>
9414
9415 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9416 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9417 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9418 section (does not happen in compiler, only if code directly calls
9419 Scan_ALI).
9420 * get_alfa.adb, get_alfa.ads: New files.
9421 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9422 needed.
9423 * lib-xref-alfa.adb: New file.
9424 * lib-xref.adb, lib-xref.ads
9425 (Xref_Entry): redefine information needed in cross-references for ALFA.
9426 Push ALFA treatments in separated local package.
9427 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9428 identifiers. Return entity of package body instead of spec. Return
9429 Empty for a scope with no location.
9430 (Generate_Reference): adapt to new components for ALFA information.
9431 Remove the need for D references on definitions.
9432 (Is_Local_Reference): moved to ALFA local package
9433 (Output_References): extract subfunction as Extract_Source_Name
9434 (Output_Local_References): remove procedure, replaced by filtering of
9435 cross-references in package ALFA and printing in Put_ALFA.
9436 (Write_Entity_Name): remove procedure
9437 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9438 print exact name of entity as it appears in source file
9439 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9440 * put_alfa.adb, put_alfa.ads: New files.
9441 * xref_lib.adb (Search_Xref): protect read of cross-references against
9442 reading other sections of the ALI file, in gnatxref
9443 (Search): protect read of cross-references against reading other
9444 sections of the ALI file, in gnatfind.
9445 * gcc-interface/Make-lang.in: Update dependencies.
9446
9447 2011-08-03 Thomas Quinot <quinot@adacore.com>
9448
9449 * sem_ch3.adb: Minor reformatting.
9450
9451 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9452
9453 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9454 raising an exception.
9455
9456 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9457
9458 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9459 type, always use 1 as the lower bound or string, even if lower bound of
9460 context is not static, to handle properly null strings in a non-static
9461 context.
9462
9463 2011-08-03 Bob Duff <duff@adacore.com>
9464
9465 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9466 always legal on the right-hand side of an assignment statement; there
9467 is always an applicable index constraint in this case. Therefore, the
9468 check for Pkind = N_Assignment_Statement is now unconditional -- it
9469 doesn't depend on whether Is_Constrained (Typ).
9470
9471 2011-08-03 Robert Dewar <dewar@adacore.com>
9472
9473 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9474
9475 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9476
9477 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9478 for an itype created within a generic unit.
9479
9480 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9481
9482 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9483 suppresses all inlining.
9484
9485 2011-08-03 Robert Dewar <dewar@adacore.com>
9486
9487 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9488 exp_aggr.adb: Minor reformatting.
9489
9490 2011-08-03 Thomas Quinot <quinot@adacore.com>
9491
9492 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9493 tagged assignment when discriminant checks are suppressed. This is
9494 useless and extremely costly in terms of static stack usage.
9495
9496 2011-08-03 Bob Duff <duff@adacore.com>
9497
9498 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9499 of generics, because this leads to the wrong entity in the wrong scope,
9500 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9501 an instance.
9502 (Process_Interface_Name): Follow Alias for instances of generics, to
9503 correct for the above change.
9504
9505 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9506
9507 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9508 is an integer literal it is always safe to replace the reference. In
9509 addition, if the reference appears in the generated code for an object
9510 declaration it is necessary to copy because otherwise the reference
9511 might be to the uninitilized value of the discriminant of the object
9512 itself.
9513
9514 2011-08-03 Pascal Obry <obry@adacore.com>
9515
9516 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9517 ACL used, in this case we want to check for ending .exe, not .exe
9518 anywhere in the path.
9519
9520 2011-08-03 Sergey Rybin <rybin@adacore.com>
9521
9522 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9523 the tree structure (semantic decoration of references to record
9524 discriminants).
9525
9526 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9527
9528 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9529 choices of a named array aggregate, bail out when any choices are
9530 marked as Errors_Posted.
9531
9532 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9533
9534 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9535 in which entity is frozen, to handle properly loop variables in
9536 iterators.
9537
9538 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9539
9540 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9541 subtype is not static, compute the upper bound using attributes, to
9542 handle properly index types that are not integer types.
9543
9544 2011-08-03 Bob Duff <duff@adacore.com>
9545
9546 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9547 Update copyright notice.
9548
9549 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9550
9551 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9552 Original_Discriminant if within an instance.
9553 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9554
9555 2011-08-03 Thomas Quinot <quinot@adacore.com>
9556
9557 * einfo.ads: Minor reformatting.
9558
9559 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9560
9561 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9562 composite type with an unfrozen subcomponent, in the profile of a
9563 primitive operation.
9564
9565 2011-08-03 Robert Dewar <dewar@adacore.com>
9566
9567 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9568
9569 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9570
9571 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9572 unconstrained type with discriminants is initialized with an aggregate,
9573 use the constrained subtype of the aggregate as the type of the object,
9574 because it is immutable, and this allows the back-end to generate no
9575 code for the object declaration.
9576
9577 2011-08-03 Robert Dewar <dewar@adacore.com>
9578
9579 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9580 comparison operand is variable, and turns out to be zero or negative.
9581
9582 2011-08-03 Javier Miranda <miranda@adacore.com>
9583
9584 * exp_intr.adb
9585 (Expand_Dispatching_Constructor_Call): Disable expansion of
9586 code required for native targets. Done to avoid generating
9587 references to unavailable runtime entities in VM targets.
9588 * exp_ch3.adb
9589 (Expand_N_Object_Declaration): Add missing support to handle
9590 the explicit initialization of class-wide interface objects.
9591 Fix documentation.
9592
9593 2011-08-03 Matthew Heaney <heaney@adacore.com>
9594
9595 * a-cobove.adb (Merge): Move source onto target, instead of using
9596 Assign.
9597
9598 2011-08-03 Matthew Heaney <heaney@adacore.com>
9599
9600 * a-cbdlli.adb (Splice): Move source items from first to last.
9601
9602 2011-08-03 Yannick Moy <moy@adacore.com>
9603
9604 * sem_util.ads: Add comment.
9605
9606 2011-08-03 Javier Miranda <miranda@adacore.com>
9607
9608 * exp_aggr.adb
9609 (Expand_Record_Aggregate): In VM targets disable the expansion into
9610 assignments of aggregates whose type is not known at compile time.
9611
9612 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9613
9614 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9615 protected entries and task entries, to build the proper renaming
9616 declaration for entry formals, used in debugging.
9617 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9618 parameters in the same way.
9619
9620 2011-08-02 Robert Dewar <dewar@adacore.com>
9621
9622 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9623 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9624 code reorganization.
9625
9626 2011-08-02 Robert Dewar <dewar@adacore.com>
9627
9628 * debug.adb: Debug flag d.P to suppress length comparison optimization
9629 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9630 comparison of Length by comparing First/Last instead.
9631
9632 2011-08-02 Matthew Heaney <heaney@adacore.com>
9633
9634 * a-cobove.ads: Code clean up.
9635
9636 2011-08-02 Vincent Celier <celier@adacore.com>
9637
9638 * adaint.c (file_names_case_sensitive_cache): New static int.
9639 (__gnat_get_file_names_case_sensitive): Cache the return value in
9640 file_names_case_sensitive_cache at the first invocation, to avoid
9641 multiple calls to getenv.
9642
9643 2011-08-02 Bob Duff <duff@adacore.com>
9644
9645 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9646
9647 2011-08-02 Yannick Moy <moy@adacore.com>
9648
9649 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9650 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9651 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9652 indicate that we are in a precondition or postcondition. This is used in
9653 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9654 decide whether to flag the spec or body of the current subprogram as
9655 not in ALFA.
9656
9657 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9658
9659 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9660 list.
9661 * a-extiin.ads: New file.
9662
9663 2011-08-02 Bob Duff <duff@adacore.com>
9664
9665 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9666 now raises Name_Error instead of Use_Error in certain cases. The other
9667 parts of this AI were already implemented properly.
9668
9669 2011-08-02 Vincent Celier <celier@adacore.com>
9670
9671 * link.c: Only import "auto-host.h" when building the gnattools.
9672
9673 2011-08-02 Yannick Moy <moy@adacore.com>
9674
9675 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9676 which calls a local subprogram, so extract subprogram
9677 from Mark_Non_ALFA_Subprogram_Body.
9678
9679 2011-08-02 Javier Miranda <miranda@adacore.com>
9680
9681 * exp_ch9.adb
9682 (Extract_Dispatching_Call): If the type of the dispatching object is an
9683 access type then return an explicit dereference in the Object out-mode
9684 parameter.
9685
9686 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9687
9688 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9689 compatibility checks for all indexes of an array subtype, not just the
9690 first. Reset Has_Dynamic_Range_Check on the subtype before each
9691 potential check to ensure that Insert_Range_Checks will not elide any
9692 of the dynamic checks.
9693
9694 2011-08-02 Yannick Moy <moy@adacore.com>
9695
9696 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9697 SPARK restriction at parsing time.
9698 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9699 directive only if the SPARK restriction is set for this unit.
9700
9701 2011-08-02 Yannick Moy <moy@adacore.com>
9702
9703 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9704 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9705 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9706 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9707 Mark_Non_ALFA_Subprogram_Body.
9708 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9709 inlined.
9710
9711 2011-08-02 Yannick Moy <moy@adacore.com>
9712
9713 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9714 might be costly.
9715
9716 2011-08-02 Robert Dewar <dewar@adacore.com>
9717
9718 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9719 exp_ch3.adb: Minor reformatting.
9720
9721 2011-08-02 Emmanuel Briot <briot@adacore.com>
9722
9723 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9724 files, not any regular file.
9725 (__gnat_locate_file_with_predicate): new subprogram.
9726
9727 2011-08-02 Yannick Moy <moy@adacore.com>
9728
9729 * sinfo.adb, sinfo.ads: Restrict the use of flags
9730 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9731 nodes, plus N_Subtype_Declaration for the 2nd one.
9732
9733 2011-08-02 Sergey Rybin <rybin@adacore.com>
9734
9735 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9736 - fix bugs in the description of Source_Trace;
9737 - get rid of UNIT_NAME;
9738
9739 2011-08-02 Javier Miranda <miranda@adacore.com>
9740
9741 * exp_ch9.adb
9742 (Build_Dispatching_Requeue): Adding support for VM targets
9743 since we cannot directly reference the Tag entity.
9744 * exp_sel.adb (Build_K): Adding support for VM targets.
9745 (Build_S_Assignment): Adding support for VM targets.
9746 * exp_disp.adb
9747 (Default_Prim_Op_Position): In VM targets do not restrict availability
9748 of predefined interface primitives to compiling in Ada 2005 mode.
9749 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9750 restricted to compiling in Ada 2005 mode.
9751 (Make_VM_TSD): Generate code that declares and initializes the OSD
9752 record. Needed to support dispatching calls through synchronized
9753 interfaces.
9754 * exp_ch3.adb
9755 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9756 primitives associated with synchronized interfaces.
9757 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9758 primitives associated with synchronized interfaces.
9759
9760 2011-08-02 Yannick Moy <moy@adacore.com>
9761
9762 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9763 statements hidden in SPARK if preceded by the HIDE directive
9764 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9765 exception handlers as hidden in SPARK if preceded by the HIDE directive
9766 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9767 if starting with the HIDE directive
9768 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9769 starting with the HIDE directive; mark the declarations in a private
9770 part as hidden in SPARK if the private part starts with the HIDE
9771 directive
9772 * restrict.adb, restrict.ads
9773 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9774 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9775 argument node belongs to a part which is hidden in SPARK
9776 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9777 parts in SPARK; protect the possibly costly call to
9778 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9779 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9780 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9781 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9782 Tok_SPARK_Hide.
9783 (Scan): recognize special comment starting with '#' and followed by
9784 SPARK keyword "hide" as a HIDE directive.
9785
9786 2011-08-02 Yannick Moy <moy@adacore.com>
9787
9788 * types.ads, erroutc.ads: Minor reformatting.
9789
9790 2011-08-02 Vincent Celier <celier@adacore.com>
9791
9792 * link.c: Add response file support for cross platforms.
9793
9794 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9795
9796 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9797 in an association, set parent field of copy before partial analysis.
9798 * sem_res.adb (Resolve_Slice): create reference to itype only when
9799 expansion is enabled.
9800
9801 2011-08-02 Yannick Moy <moy@adacore.com>
9802
9803 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9804 for new flag denoting which subprogram bodies are in ALFA
9805 * restrict.adb, sem_ch7.adb: Update comment
9806 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9807 sem_ch9.adb, sem_res.adb: Add calls to
9808 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9809 * sem_ch6.adb (Analyze_Function_Return): add calls to
9810 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9811 middle of the body, and extended return.
9812 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9813 False when missing return.
9814 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9815 to True for subprograms whose spec is in ALFA. Remove later on the flag
9816 on the entity used for a subprogram body when there exists a separate
9817 declaration.
9818 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9819 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9820 False, otherwise do nothing.
9821
9822 2011-08-02 Robert Dewar <dewar@adacore.com>
9823
9824 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9825
9826 2011-08-02 Yannick Moy <moy@adacore.com>
9827
9828 * sem_ch4.ads: minor formatting.
9829
9830 2011-08-02 Yannick Moy <moy@adacore.com>
9831
9832 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9833 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9834 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9835 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9836 opt.ads: cleanup of SPARK mode
9837
9838 2011-08-02 Yannick Moy <moy@adacore.com>
9839
9840 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9841 types.
9842 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9843 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9844 * sem_ch3.adb
9845 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9846 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9847 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9848 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9849 types.
9850 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9851 non-static range.
9852 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9853 functions whose return type is not in ALFA.
9854 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9855 specifications.
9856 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9857 parameter's type is not in ALFA.
9858 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9859 types are in ALFA.
9860
9861 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9862
9863 * sem_ch6 (Analyze_Expression_Function): treat the function as
9864 Inline_Always, and introduce a subprogram declaration for it when it is
9865 not a completion.
9866 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9867 expression functions, so that the back-end can determine whether they
9868 can in fact be inlined.
9869 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9870 a function body comes from an expression function.
9871
9872 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9873
9874 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9875 null exclusions to test Can_Never_Be_Null on the anonymous access types
9876 of the formals rather than testing the formals themselves. Exclude this
9877 check in cases where the Old_Formal is marked as a controlling formal,
9878 to avoid issuing spurious errors for bodies completing dispatching
9879 operations (due to the flag not getting set on controlling access
9880 formals in body specs).
9881 (Find_Corresponding_Spec): When checking full and subtype conformance of
9882 subprogram bodies in instances, pass Designated and E in that order, for
9883 consistency with the expected order of the formals (New_Id followed by
9884 Old_Id).
9885
9886 2011-08-02 Robert Dewar <dewar@adacore.com>
9887
9888 * sem_ch8.adb: Minor reformatting.
9889
9890 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9891
9892 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9893 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9894 primitive operations of class-wide actuals.
9895
9896 2011-08-02 Javier Miranda <miranda@adacore.com>
9897
9898 * exp_atag.ads, exp_atag.adb
9899 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9900 since its value is implicitly passed in argument Typ.
9901 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9902 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9903 Build_Common_Dispatching_Select_Statements.
9904
9905 2011-08-02 Robert Dewar <dewar@adacore.com>
9906
9907 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9908 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9909 Minor reformatting.
9910
9911 2011-08-02 Robert Dewar <dewar@adacore.com>
9912
9913 * sem_res.adb: Minor reformatting.
9914 * sem_prag.adb: Minor reformatting.
9915
9916 2011-08-02 Javier Miranda <miranda@adacore.com>
9917
9918 * exp_atag.adb, exp_atags.ads
9919 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9920 by the tagged type Entity. Required to use this routine in the VM
9921 targets since we do not have available the Tag entity in the VM
9922 platforms.
9923 * exp_ch6.adb
9924 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9925 Ada.Tags has not been previously loaded.
9926 * exp_ch7.adb
9927 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9928 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9929 * sem_aux.adb
9930 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9931 view of enclosing scopes. Required to handle enclosing scopes that
9932 are synchronized types whose full view is a task type.
9933 * exp_disp.adb
9934 (Build_VM_TSDs): Minor code improvement to avoid generating and
9935 analyzing lists with empty nodes.
9936 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9937 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9938 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9939 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9940 (Make_Select_Specific_Data_Table): Add support for VM targets.
9941 (Make_VM_TSD): Generate code to initialize the SSD structure of
9942 the TSD.
9943
9944 2011-08-02 Yannick Moy <moy@adacore.com>
9945
9946 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9947 cross-references section in ALI.
9948 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9949 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9950 Sub).
9951 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9952 subprogram or package entity of a node
9953 (Is_Local_Reference_Type): new function returns True for references
9954 selected in local cross-references.
9955 (Lt): function extracted from Lt in Output_References
9956 (Write_Entity_Name): function extracted from Output_References
9957 (Generate_Definition): generate reference with type 'D' for definition
9958 of objects (object declaration and parameter specification), with
9959 appropriate locations and units, for use in local cross-references.
9960 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9961 references of type 'I' for initialization in object definition.
9962 (Output_References): move part of function Lt and procedure
9963 Write_Entity_Name outside of the body. Ignore references of types 'D'
9964 and 'I' introduced for local cross-references.
9965 (Output_Local_References): new procedure to output the local
9966 cross-references sections.
9967 (Lref_Entity_Status): new array defining whether an entity is a local
9968 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9969 with 'I' type when initialization expression is present.
9970 * get_scos.adb, get_scos.ads: Correct comments and typos
9971
9972 2011-08-02 Javier Miranda <miranda@adacore.com>
9973
9974 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9975 the JVM target.
9976 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9977 the JVM target.
9978 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9979 TSD support.
9980
9981 2011-08-02 Vincent Celier <celier@adacore.com>
9982
9983 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9984 (No_Space_Img): New function
9985 (Find_Excluded_Sources): When reading from a file, record the file name
9986 and the line number for each excluded source.
9987 (Mark_Excluded_Sources): When reporting an error, if the excluded
9988 sources were read from a file, include file name and line number in
9989 the error message.
9990
9991 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9992
9993 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9994
9995 2011-08-02 Robert Dewar <dewar@adacore.com>
9996
9997 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9998
9999 2011-08-02 Javier Miranda <miranda@adacore.com>
10000
10001 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10002 generation of TSDs to the DOTNET compiler.
10003 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10004 generation of TSDs to the DOTNET compiler.
10005
10006 2011-08-02 Javier Miranda <miranda@adacore.com>
10007
10008 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10009 record of all the tagged types declared inside library level package
10010 declarations, library level package bodies or library level subprograms.
10011 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10012 associated with a given tagged type.
10013 (Build_VM_TSDs): New subprogram.
10014 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10015 compilation units that are subprograms.
10016 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10017 compilation units that are package bodies.
10018 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10019 units that are a package declaration or a package instantiation.
10020 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10021 reorganization to improve the error generated by the frontend when the
10022 function Ada.Tags.Secondary_Tag is not available.
10023 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10024 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10025
10026 2011-08-02 Javier Miranda <miranda@adacore.com>
10027
10028 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10029
10030 2011-08-02 Robert Dewar <dewar@adacore.com>
10031
10032 * s-imenne.ads: Minor reformatting.
10033
10034 2011-08-02 Robert Dewar <dewar@adacore.com>
10035
10036 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10037 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10038 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10039
10040 2011-08-02 Robert Dewar <dewar@adacore.com>
10041
10042 * einfo.ads (Materialize_Entity): Document this is only for renamings
10043 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10044 required debug information in the case where we transform the object
10045 declaration into a renaming declaration.
10046 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10047 object
10048 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10049 Materialize_Entity.
10050
10051 2011-08-02 Robert Dewar <dewar@adacore.com>
10052
10053 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10054 Suppress_Init_Procs.
10055 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10056 Suppress_Initialization/Initialization_Suppressed.
10057 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10058 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10059 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10060 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10061
10062 2011-08-02 Robert Dewar <dewar@adacore.com>
10063
10064 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10065 Minor reformatting.
10066
10067 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10068
10069 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10070 only have inheritable classwide pre/postconditions.
10071
10072 2011-08-02 Javier Miranda <miranda@adacore.com>
10073
10074 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10075 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10076 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10077 checks if the external tag of a type is the same as the external tag
10078 of some other declaration.
10079
10080 2011-08-02 Thomas Quinot <quinot@adacore.com>
10081
10082 * s-taskin.ads: Minor reformatting.
10083
10084 2011-08-02 Emmanuel Briot <briot@adacore.com>
10085
10086 * g-comlin.adb (Display_Help): swap the order in which it prints the
10087 short help and the general usage.
10088
10089 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10090
10091 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10092 the aspect declarations and attach them to the generic copy for
10093 subsequent analysis.
10094 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10095 declarations of the generic tree to the new subprogram declarations.
10096 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10097 conditions that apply to a subprogram instance.
10098
10099 2011-08-02 Robert Dewar <dewar@adacore.com>
10100
10101 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10102
10103 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10104
10105 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10106 private type with a tagged full view is not derived in the immediate
10107 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10108
10109 2011-08-02 Robert Dewar <dewar@adacore.com>
10110
10111 * exp_ch4.adb: Minor reformatting.
10112
10113 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10114
10115 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10116 Ada2012 iterator, the loop will be rewritten during expansion into a
10117 while loop with a cursor and an element declaration. Do not analyze the
10118 body in this case, because if the container is for indefinite types the
10119 actual subtype of the elements will only be determined when the cursor
10120 declaration is analyzed.
10121
10122 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10123
10124 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10125 size/alignment related attributes in CodePeer_Mode.
10126
10127 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10128
10129 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10130 Prepend_Element, since this can result in the operation getting the
10131 wrong slot in the full type's dispatch table if the full type has
10132 inherited operations. The incomplete type's operation will get added
10133 to the proper position in the full type's primitives
10134 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10135 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10136 dispatching operations, since there are cases where nonprimitive
10137 subprograms can get added to the list of incomplete dependents (such
10138 as subprograms in nested packages).
10139 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10140 private part when determining whether to add a primitive with a
10141 parameter of a tagged incomplete type to the Private_Dependents list.
10142 Such primitives can also occur in the visible part, and should not have
10143 been excluded from being private dependents.
10144 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10145 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10146 list of a Taft-amendment incomplete type is a primitive before issuing
10147 an error that the full type must appear in the same unit. There are
10148 cases where nonprimitives can be in the list (such as subprograms in
10149 nested packages).
10150 * sem_disp.adb (Derives_From): Use correct condition for checking that
10151 a formal's type is derived from the type of the corresponding formal in
10152 the parent subprogram (the condition was completely wrong). Add
10153 checking that was missing for controlling result types being derived
10154 from the result type of the parent operation.
10155
10156 2011-08-02 Yannick Moy <moy@adacore.com>
10157
10158 * errout.adb (First_Node): minor renaming
10159 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10160 first node.
10161
10162 2011-08-02 Yannick Moy <moy@adacore.com>
10163
10164 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10165 before accessing operands.
10166 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10167 decide whether an initialization expression respects SPARK rules, as
10168 the plain node is the expanded one. This allows for more valid warnings
10169 to be issued.
10170 * gnat_rm.texi: Minor update.
10171
10172 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10173
10174 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10175 previous change.
10176
10177 2011-08-02 Robert Dewar <dewar@adacore.com>
10178
10179 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10180
10181 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10182
10183 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10184 loop statements and the element renaming declaration with a block when
10185 the element type is controlled.
10186
10187 2011-08-02 Yannick Moy <moy@adacore.com>
10188
10189 * sinfo.ads: Minor formatting.
10190
10191 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10192
10193 * sem_aggr.adb (Add_Association): if the association has a box and no
10194 expression, use the Sloc of the aggregate itself for the new
10195 association.
10196 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10197 the Original_Node.
10198
10199 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10200
10201 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10202 When a container is provided via a function call, generate a renaming
10203 of the function result. This avoids the creation of a transient scope
10204 and the premature finalization of the container.
10205 * exp_ch7.adb (Is_Container_Cursor): Removed.
10206 (Wrap_Transient_Declaration): Remove the supression of the finalization
10207 of the list controller when the declaration denotes a container cursor,
10208 it is not needed.
10209
10210 2011-08-02 Yannick Moy <moy@adacore.com>
10211
10212 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10213 node is from source, instead of the original node being from source.
10214 * sem_aggr.adb
10215 (Resolve_Array_Aggregate): refine the check for a static expression, to
10216 recognize also static ranges
10217 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10218 Array_Type_Declaration): postpone the test for the type being a subtype
10219 mark after the type has been resolved, so that component-selection and
10220 expanded-name are discriminated.
10221 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10222 to distinguish the case of an iteration scheme, so that an error is
10223 issed on a non-static range in SPARK except in an iteration scheme.
10224 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10225 In_Iter_Schm = True.
10226 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10227 user-defined operators so that they are allowed in renaming
10228 * sem_ch8.adb
10229 (Find_Selected_Component): refine the check for prefixing of operators
10230 so that they are allowed in renaming. Move the checks for restrictions
10231 on selector name after analysis discriminated between
10232 component-selection and expanded-name.
10233 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10234 concatenation argument of string type if it is static.
10235 * sem_util.adb, sem_util.ads
10236 (Check_Later_Vs_Basic_Declarations): add a new function
10237 Is_Later_Declarative_Item to decice which declarations are allowed as
10238 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10239 mode, add that renamings are considered as later items.
10240 (Enclosing_Package): new function to return the enclosing package
10241 (Enter_Name): correct the rule for homonyms in SPARK
10242 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10243 from source (result of expansion) to avoid issuing wrong warnings.
10244
10245 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10246
10247 * errout.adb: On anything but an expression First_Node returns its
10248 argument.
10249
10250 2011-08-02 Pascal Obry <obry@adacore.com>
10251
10252 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10253
10254 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10255
10256 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10257 Set the associated loop as the related expression of internally
10258 generated cursors.
10259 * exp_ch7.adb (Is_Container_Cursor): New routine.
10260 (Wrap_Transient_Declaration): Supress the finalization of the list
10261 controller when the declaration denotes a container cursor.
10262
10263 2011-08-02 Yannick Moy <moy@adacore.com>
10264
10265 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10266 command line now.
10267 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10268 expression is a simple expression. This check cannot be performed in
10269 the semantics, so just drop it.
10270 (P_Index_Or_Discriminant_Constraint): move check that the index or
10271 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10272 semantics. Other cases were previously checked in the semantics.
10273 * par-ch4.adb (P_Name): move checks that a selector name is not
10274 character literal or an operator symbol to Find_Selected_Component in
10275 the semantics
10276 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10277 declarations are not placed after later declarations in a separate
10278 procedure in Sem_Util (possibly not the best choice?), to be used both
10279 during parsing, for Ada 83 mode, and during semantic analysis, for
10280 SPARK mode.
10281 * par-endh.adb (Check_End): move check that end label is not missing
10282 to Process_End_Label in the semantics
10283 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10284 the special case for SPARK restriction
10285 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10286 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10287 parameter Force to issue the error message even on internal node (used
10288 for generated end label). Call Check_Restriction to check when an error
10289 must be issued. In SPARK mode, issue an error message even if the
10290 restriction is not set.
10291 (Check_Restriction): new procedure with an additional out parameter to
10292 inform the caller that a message has been issued
10293 * sem_aggr.adb: Minor modification of message
10294 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10295 instead of issuing an error message directly
10296 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10297 declarations are not placed after later declarations, by calling
10298 Check_Later_Vs_Basic_Declarations
10299 (Analyze_Subtype_Declaration): move here the check that an index or
10300 discriminant constraint must be a subtype mark. Change the check that
10301 a subtype of String must start at one so that it works on subtype marks.
10302 * sem_ch4.adb (Analyze_Call): move here the check that a named
10303 association cannot follow a positional one in a call
10304 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10305 instead of issuing an error message directly
10306 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10307 selector name is not a character literal or an operator symbol. Move
10308 here the check that the prefix of an expanded name cannot be a
10309 subprogram or a loop statement.
10310 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10311 procedure called from parsing and semantics to check that basic
10312 declarations are not placed after later declarations
10313 (Process_End_Label): move here the check that end label is not missing
10314
10315 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10316
10317 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10318 representation clause in codepeer mode, since it confuses CodePeer and
10319 does not bring useful info.
10320
10321 2011-08-02 Ed Falis <falis@adacore.com>
10322
10323 * init.c: initialize fp hw on MILS.
10324
10325 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10326
10327 * errout.adb (First_Node): for bodies, return the node itself (small
10328 optimization). For other nodes, do not check source_unit if the node
10329 comes from Standard.
10330
10331 2011-08-02 Robert Dewar <dewar@adacore.com>
10332
10333 * exp_ch3.adb: Minor comment additions.
10334 * sem_ch13.adb: Minor reformatting.
10335
10336 2011-08-02 Pascal Obry <obry@adacore.com>
10337
10338 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10339
10340 2011-08-02 Robert Dewar <dewar@adacore.com>
10341
10342 * sem_attr.adb: Minor reformatting.
10343
10344 2011-08-02 Robert Dewar <dewar@adacore.com>
10345
10346 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10347 (Has_Default_Component_Value): Removed
10348 * einfo.ads Comment updates
10349 (Has_Default_Aspect): Replaces Has_Default_Value
10350 (Has_Default_Component_Value): Removed
10351 * exp_ch13.adb
10352 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10353 * exp_ch3.adb
10354 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10355 (Get_Simple_Init_Val): Handle Default_Value aspect
10356 (Needs_Simple_Initialization): Handle Default_Value aspect
10357 * exp_ch3.ads: Needs_Simple_Initialization
10358 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10359 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10360 * sem_ch13.adb
10361 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10362 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10363 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10364
10365 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10366
10367 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10368 package containing iteration primitives.
10369 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10370
10371 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10372
10373 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10374 "of", pre-analyze expression in case it is a function call with
10375 finalization actions that must be placed ahead of the loop.
10376 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10377 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10378
10379 2011-08-02 Geert Bosch <bosch@adacore.com>
10380
10381 * cstand.adb (Create_Float_Types): Only consider C's long double for
10382 Long_Long_Float, in addition to double.
10383
10384 2011-08-02 Robert Dewar <dewar@adacore.com>
10385
10386 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10387 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10388 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10389 Minor reformatting.
10390
10391 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10392
10393 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10394 indexed component.
10395
10396 2011-08-02 Javier Miranda <miranda@adacore.com>
10397
10398 * einfo.ads, einfo.adb
10399 (Original_Access_Type): Move this attribute to Node26 since there was
10400 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10401 which causes conflicts and breaks the generation of the .NET compiler.
10402 (Interface_Name): Add missing documentation on JGNAT only uses of
10403 this attribute.
10404
10405 2011-08-02 Geert Bosch <bosch@adacore.com>
10406
10407 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10408 (Find_Back_End_Float_Type): Likewise
10409 (Create_Back_End_Float_Types): Likewise
10410 (Create_Float_Types): Likewise
10411 (Register_Float_Type): Likewise
10412 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10413 Nlist and split out type selection in new local Find_Base_Type function.
10414 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10415 Nlist
10416 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10417
10418 2011-08-02 Robert Dewar <dewar@adacore.com>
10419
10420 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10421 alpha order).
10422 * opt.ads: Minor comment change.
10423 * sem_ch12.adb: Minor code reorganization.
10424
10425 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10426
10427 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10428 subtype's list of rep items to the list on the full subtype in the case
10429 where the lists are the same.
10430
10431 2011-08-02 Geert Bosch <bosch@adacore.com>
10432
10433 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10434 using the one from System.Strings, which also deallocates all strings.
10435
10436 2011-08-02 Geert Bosch <bosch@adacore.com>
10437
10438 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10439 function.
10440 * gcc-interface/Make-lang.in: Update dependencies.
10441
10442 2011-08-02 Olivier Hainque <hainque@adacore.com>
10443
10444 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10445 end_locus.
10446
10447 2011-08-02 Javier Miranda <miranda@adacore.com>
10448
10449 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10450 associated with anonymous access to subprograms.
10451
10452 2011-08-02 Geert Bosch <bosch@adacore.com>
10453
10454 * opt.ads
10455 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10456 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10457 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10458 (Add_Symbol_Definition): Move to switch-c.adb
10459 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10460 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10461 (Add_Symbol_Definition): Move to switch-c.adb.
10462 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10463 * sem_warn.adb
10464 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10465 Move to warnsw.adb.
10466 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10467 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10468 Move to warnsw.adb.
10469 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10470 (Add_Symbol_Definition): Moved from Prepcomp.
10471 * switch-c.ads: Update copyright notice. Use String_List instead of
10472 Argument_List, removing dependency on System.OS_Lib.
10473
10474 2011-08-02 Yannick Moy <moy@adacore.com>
10475
10476 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10477 mode on initialization expression which does not respect SPARK
10478 restrictions.
10479 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10480 if the tree referenced by its argument represents an initialization
10481 expression in SPARK, suitable for initializing an object in an object
10482 declaration.
10483
10484 2011-08-02 Javier Miranda <miranda@adacore.com>
10485
10486 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10487 internally generated access to subprogram with its associated protected
10488 subprogram type.
10489 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10490
10491 2011-08-02 Geert Bosch <bosch@adacore.com>
10492
10493 * cstand.adb (Register_Float_Type): Print information about type to
10494 register, if the Debug_Flag_Dot_B is set.
10495 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10496 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10497 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10498 with a requested precision of more than Max_Digits digits and no more
10499 than Max_Base_Digits digits, if a range specification is present and the
10500 Predefined_Float_Types list has a suitable type to derive from.
10501 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10502 case of type completion with pragma Import
10503 * sem_prag.adb
10504 (Process_Import_Predefined_Type): Processing to complete a type
10505 with pragma Import. Currently supports floating point types only.
10506 (Set_Convention_From_Pragma): Do nothing without underlying type.
10507 (Process_Convention): Guard against absence of underlying type,
10508 which may happen when importing incomplete types.
10509 (Process_Import_Or_Interface): Handle case of importing predefined
10510 types. Tweak error message.
10511
10512 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10513
10514 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10515 functions to previous change. Reorganize code slightly.
10516
10517 2011-08-02 Geert Bosch <bosch@adacore.com>
10518
10519 * back_end.ads (Register_Type_Proc): New call back procedure type for
10520 allowing the back end to provide information about available types.
10521 (Register_Back_End_Types): New procedure to register back end types.
10522 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10523 available types.
10524 * cstand.adb (Back_End_Float_Types): New list for floating point types
10525 supported by the back end.
10526 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10527 (Copy_Float_Type): New procedure to make new copies of predefined types.
10528 (Register_Float_Type): New call back procedure to populate the BEFT list
10529 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10530 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10531 (Create_Float_Types): New procedure to create entities for floating
10532 point types predefined in Standard, and put these and any remaining
10533 BEFTs on the Predefined_Float_Types list.
10534 * stand.ads (Predefined_Float_Types): New list for predefined floating
10535 point types that do not have declarations in package Standard.
10536
10537 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10538
10539 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10540 entity node for the unit containing the parameter.
10541 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10542 (Add_Inlined_Subprogram): Likewise.
10543 * gcc-interface/Make-lang.in: Update dependencies.
10544
10545 2011-08-02 Thomas Quinot <quinot@adacore.com>
10546
10547 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10548 suitable value.
10549
10550 2011-08-02 Geert Bosch <bosch@adacore.com>
10551
10552 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10553
10554 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10555
10556 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10557 computed value of Base_Type.
10558
10559 2011-08-02 Yannick Moy <moy@adacore.com>
10560
10561 * restrict.adb (Check_Restriction): issue an error for any use of
10562 class-wide, even if the No_Dispatch restriction is not set.
10563 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10564 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10565 when completing a private extension, the type named in the private part
10566 is not the same as that named in the visible part.
10567 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10568 of an inherited primitive operations of a tagged type or type extension
10569 that returns the tagged type.
10570 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10571 function which returns True for an implicit operation inherited by the
10572 derived type declaration for the argument type.
10573 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10574 order.
10575
10576 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10577
10578 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10579 Process_Bounds, to perform analysis with expansion of a range or an
10580 expression that is the iteration scheme for a loop.
10581 (Analyze_Iterator_Specification): If domain of iteration is given by a
10582 function call with a controlled result, as is the case if call returns
10583 a predefined container, ensure that finalization actions are properly
10584 generated.
10585 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10586
10587 2011-08-02 Javier Miranda <miranda@adacore.com>
10588
10589 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10590 * gcc-interface/Make-lang.in: Update dependencies.
10591
10592 2011-08-02 Javier Miranda <miranda@adacore.com>
10593
10594 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10595 determine if the analysis is performed using N or Original_Node (N).
10596 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10597 functionality of routine Is_Variable avoids code duplication.
10598 * checks.adb (Determine_Range): Handle temporaries generated by
10599 Remove_Side_Effects.
10600
10601 2011-08-02 Javier Miranda <miranda@adacore.com>
10602
10603 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10604 expansion of the condition. Required since the previous analysis was
10605 done with expansion disabled (see Resolve_Quantified_Expression) and
10606 hence checks were not inserted and record comparisons have not been
10607 expanded.
10608
10609 2011-08-02 Ed Falis <falis@adacore.com>
10610
10611 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10612 Update header.
10613
10614 2011-08-02 Bob Duff <duff@adacore.com>
10615
10616 * opt.ads: Minor comment fix.
10617
10618 2011-08-02 Bob Duff <duff@adacore.com>
10619
10620 * sem_ch12.adb (Analyze_Package_Instantiation,
10621 Analyze_Subprogram_Instantiation): Turn off style checking while
10622 analyzing an instance. Whatever style checks that apply to the generic
10623 unit should apply, so it makes no sense to apply them in an instance.
10624 This was causing trouble when compiling an instance of a runtime
10625 unit that violates the -gnatyO switch.
10626 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10627 one of the two case statements, causing spurious errors.
10628
10629 2011-08-02 Robert Dewar <dewar@adacore.com>
10630
10631 * uname.adb: Minor reformatting.
10632 * gnatcmd.adb: Minor reformatting.
10633 * exp_attr.adb: Minor reformatting.
10634
10635 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10636
10637 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10638 No_Dispatching_Calls, do not look for the Assign primitive, because
10639 predefined primitives are not created in this case.
10640
10641 2011-08-02 Bob Duff <duff@adacore.com>
10642
10643 * stylesw.ads: Minor comment fixes.
10644
10645 2011-08-02 Robert Dewar <dewar@adacore.com>
10646
10647 * freeze.adb (Add_To_Result): New procedure.
10648
10649 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10650
10651 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10652 time, if the specific run-time routines for handling streams of strings
10653 are not available, use the default mechanism.
10654
10655 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10656
10657 * s-regpat.ads: Fix typo.
10658
10659 2011-08-02 Vincent Celier <celier@adacore.com>
10660
10661 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10662 not null, call it to create the in memory config project file without
10663 parsing an existing default config project file.
10664
10665 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10666
10667 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10668
10669 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10670
10671 * sem_elim.adb: an abstract subprogram does not need an eliminate
10672 pragma for its descendant to be eliminable.
10673
10674 2011-08-02 Ed Falis <falis@adacore.com>
10675
10676 * init.c: revert to handling before previous checkin for VxWorks
10677 * s-intman-vxworks.adb: delete unnecessary declarations related to
10678 using Ada interrupt facilities for handling signals.
10679 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10680 * s-intman-vxworks.ads: Import __gnat_install_handler as
10681 Initialize_Interrupts.
10682 * s-taprop-vxworks.adb: Delete Signal_Mask.
10683 (Abort_Handler): change construction of mask to unblock exception
10684 signals.
10685
10686 2011-08-02 Jerome Guitton <guitton@adacore.com>
10687
10688 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10689 Debug_Raise_Exception before propagation starts.
10690
10691 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10692
10693 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10694 to Restriction_Check_Required.
10695 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10696 * sem_res.adb (Resolve_Call): Likewise.
10697 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10698
10699 2011-08-02 Bob Duff <duff@adacore.com>
10700
10701 * stylesw.ads: Update comment.
10702 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10703 * errout.ads: Remove obsolete comment.
10704
10705 2011-08-02 Javier Miranda <miranda@adacore.com>
10706
10707 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10708 (Set_Is_Safe_To_Reevaluate): new procedure.
10709 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10710 assignment is allowed on safe-to-reevaluate variables.
10711 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10712 temporary created to remove side effects in expressions that use
10713 the secondary stack as safe-to-reevaluate.
10714 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10715 variables that are not true constants.
10716
10717 2011-08-02 Robert Dewar <dewar@adacore.com>
10718
10719 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10720 sem_res.adb, sem_ch6.adb: Minor reformatting.
10721
10722 2011-08-02 Jerome Guitton <guitton@adacore.com>
10723
10724 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10725
10726 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10727
10728 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10729 not set Overridden_Operation if subprogram is an initialization
10730 procedure.
10731
10732 2011-08-02 Yannick Moy <moy@adacore.com>
10733
10734 * par-ch6.adb: Correct obsolete name in comments
10735 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10736 which takes two message arguments (existing function takes one), with
10737 second message used for continuation.
10738 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10739 block statements that originate from a source block statement, not
10740 generated block statements
10741 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10742 symmetry with procedure case
10743 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10744 function to issue an error in formal mode if a package specification
10745 contains more than one tagged type or type extension.
10746 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10747 parameters matching formals of tagged types are objects (or ancestor
10748 type conversions of objects), not general expressions. Issue an error
10749 on view conversions that are not involving ancestor conversion of an
10750 extended type.
10751 (Resolve_Type_Conversion): in formal mode, issue an error on the
10752 operand of an ancestor type conversion which is not an object
10753 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10754 procedure so that it works also for actuals of function calls
10755 (Is_Actual_Tagged_Parameter): new function which determines if its
10756 argument is an actual parameter of a formal of tagged type in a
10757 subprogram call
10758 (Is_SPARK_Object_Reference): new function which determines if the tree
10759 referenced by its argument represents an object in SPARK
10760
10761 2011-08-02 Robert Dewar <dewar@adacore.com>
10762
10763 * sem_ch3.adb: Minor reformatting
10764 Minor comment addition
10765 Minor error msg text change
10766
10767 2011-08-02 Javier Miranda <miranda@adacore.com>
10768
10769 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10770 function. Used to be more precise when we generate a variable plus one
10771 assignment to remove side effects in the evaluation of the Bound
10772 expressions.
10773 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10774 of the bound expression to force its re-analysis and thus expand the
10775 associated transient scope (if required). Code cleanup replacing the
10776 previous code that declared the constant entity by an invocation to
10777 routine Force_Evaluation which centralizes this work in the frontend.
10778
10779 2011-08-02 Robert Dewar <dewar@adacore.com>
10780
10781 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10782 (Base_Type): Now uses improved Is_Base_Type function
10783 * einfo.ads (Base_Type): Inline this function
10784
10785 2011-08-02 Robert Dewar <dewar@adacore.com>
10786
10787 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10788 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10789
10790 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10791
10792 * gcc-interface/Make-lang.in: Update dependencies.
10793 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10794 targets.
10795
10796 2011-08-02 Yannick Moy <moy@adacore.com>
10797
10798 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10799 non-simple expression used in delta constraint
10800 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10801 index constraint which is not a subtype mark
10802 * par.adb: With and use Restrict
10803 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10804 mode on component type which is not a subtype mark and default
10805 expression on component
10806 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10807 of string which does not have a lower index bound equal to 1
10808 (Array_Type_Declaration): issue an error in formal mode on index or
10809 component type which is not a subtype mark, and on aliased keyword on
10810 component
10811 (Derived_Type_Declaration): issue an error in formal mode on interface,
10812 limited or abstract type
10813 (Record_Type_Declaration): issue an error in formal mode on interface
10814 (Record_Type_Definition): issue an error in formal mode on tagged types
10815 and type extensions not declared in the specification of a library unit
10816 package; on null non-tagged record; on variant part
10817
10818 2011-08-02 Vincent Celier <celier@adacore.com>
10819
10820 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10821 not declared for qualified library project when Library_Name is not
10822 declared, but Library_Dir is.
10823
10824 2011-08-02 Robert Dewar <dewar@adacore.com>
10825
10826 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10827 pragmas (affects aspects [Component_]Default_Value
10828 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10829 component type for the resolution
10830
10831 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10832
10833 * einfo.adb (Base_Type): Tune implementation for speed.
10834
10835 2011-08-02 Robert Dewar <dewar@adacore.com>
10836
10837 * freeze.adb: Minor reformatting.
10838
10839 2011-08-02 Thomas Quinot <quinot@adacore.com>
10840
10841 * scos.ads: Update comments.
10842
10843 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10844
10845 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10846 base type, because the parent may be a subtype of a private type whose
10847 convention is established in a private part.
10848
10849 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10850
10851 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10852 statement in a block when the expansion of the return expression has
10853 created a finalization chain.
10854 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10855 with the parent node.
10856 Add N_Extended_Return_Statement to handle the case where a transient
10857 object declaration appears in the Return_Object_Declarations list of
10858 an extended return statement.
10859
10860 2011-08-02 Matthew Gingell <gingell@adacore.com>
10861
10862 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10863 unused parameter 'name'.
10864
10865 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10866
10867 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10868 inherited operation, check whether its alias, which is the source
10869 operastion that it renames, has been marked eliminated.
10870
10871 2011-08-02 Javier Miranda <miranda@adacore.com>
10872
10873 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10874 in-mode parameter whose type is an access type since it can be used to
10875 modify its designated object. Enforce code that handles as safe an
10876 access type that is not access-to-constant but it is the result of a
10877 previous removal of side-effects.
10878 (Remove_Side_Effects): Minor code reorganization of cases which require
10879 no action. Done to incorporate documentation on new cases uncovered
10880 working in this ticket: no action needed if this routine was invoked
10881 too early and the nodes are not yet decorated.
10882 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10883 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10884 were issued with actuals that are implicitly provided by
10885 Force_Evaluation.
10886
10887 2011-08-02 Robert Dewar <dewar@adacore.com>
10888
10889 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10890
10891 2011-08-02 Yannick Moy <moy@adacore.com>
10892
10893 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10894 to issue an error in formal mode on attribute not supported in this mode
10895 (Analyze_Attribute): issue errors on standard attributes not supported
10896 in formal mode.
10897 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10898 comment, and issue error in formal mode on modulus which is not a power
10899 of 2.
10900 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10901 range.
10902 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10903 subtype mark.
10904 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10905 operator on modular type (except 'not').
10906
10907 2011-08-02 Robert Dewar <dewar@adacore.com>
10908
10909 * gnat_rm.texi: Minor reformatting.
10910
10911 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10912
10913 * s-osinte-linux.ads: Minor comment update and reformatting.
10914 * i-cexten.ads: Make this unit pure, as for its parent.
10915 Will allow its usage in more contexts if needed.
10916
10917 2011-08-02 Robert Dewar <dewar@adacore.com>
10918
10919 * s-utf_32.ads: Minor comment fix.
10920
10921 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10922
10923 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10924 operation of a tagged synchronized type, handle the case where the
10925 controlling argument is overloaded.
10926
10927 2011-08-02 Yannick Moy <moy@adacore.com>
10928
10929 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10930 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10931 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10932 SPARK mode and formal verification mode on processing SPARK restriction
10933 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10934 requiring consistency checking.
10935
10936 2011-08-02 Robert Dewar <dewar@adacore.com>
10937
10938 * sem_res.adb: Minor reformatting.
10939
10940 2011-08-02 Robert Dewar <dewar@adacore.com>
10941
10942 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10943 a-cforse.ads: Remove unneeded with of Ada.Containers
10944 Remove commented out pragma Inline's
10945 Move specifications of new subprograms to the actual specs
10946
10947 2011-08-02 Yannick Moy <moy@adacore.com>
10948
10949 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10950 a-cforse.ads: Update comments.
10951
10952 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10953
10954 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10955
10956 2011-08-02 Robert Dewar <dewar@adacore.com>
10957
10958 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10959 a-cforse.ads, a-cofove.ads: Minor reformatting.
10960
10961 2011-08-02 Claire Dross <dross@adacore.com>
10962
10963 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10964 a-cofove.ads: Add comments.
10965
10966 2011-08-02 Yannick Moy <moy@adacore.com>
10967
10968 * gnat_rm.texi: Document formal containers.
10969
10970 2011-08-02 Emmanuel Briot <briot@adacore.com>
10971
10972 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10973 are empty sections.
10974
10975 2011-08-02 Robert Dewar <dewar@adacore.com>
10976
10977 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10978 reformatting.
10979
10980 2011-08-02 Robert Dewar <dewar@adacore.com>
10981
10982 * aspects.adb: New aspects Default_Value and Default_Component_Value
10983 New format of Aspect_Names table checks for omitted entries
10984 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10985 handling of boolean aspects for derived types.
10986 New aspects Default_Value and Default_Component_Value
10987 New format of Aspect_Names table checks for omitted entries
10988 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10989 (Has_Default_Value): New flag
10990 (Has_Default_Component_Value): New flag
10991 (Has_Default_Value): New flag
10992 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10993 table.
10994 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10995 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10996 Default_Value and Default_Component_Value
10997 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10998 New aspects Default_Value and Default_Component_Value
10999 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11000 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11001
11002 2011-08-02 Vincent Celier <celier@adacore.com>
11003
11004 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11005 inherit library kind.
11006
11007 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11008
11009 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11010 Minor reformatting.
11011
11012 2011-08-02 Robert Dewar <dewar@adacore.com>
11013
11014 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11015
11016 2011-08-02 Yannick Moy <moy@adacore.com>
11017
11018 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11019
11020 2011-08-02 Robert Dewar <dewar@adacore.com>
11021
11022 * impunit.adb: Add comment.
11023
11024 2011-08-02 Yannick Moy <moy@adacore.com>
11025
11026 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11027 qualification of aggregates in formal mode
11028 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11029 another aggregate
11030 (Resolve_Aggregate): complete the test that an aggregate is adequately
11031 qualified in formal mode
11032
11033 2011-08-02 Pascal Obry <obry@adacore.com>
11034
11035 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11036 * mlib-prj.adb: Supress warning when compiling binder generated file.
11037 (Build_Library): Supress all warnings when compiling the binder
11038 generated file.
11039
11040 2011-08-02 Yannick Moy <moy@adacore.com>
11041
11042 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11043 from here...
11044 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11045 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11046 Add with/use clauses to make Check_Formal_Restriction visible
11047
11048 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11049
11050 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11051 in-parameters when type of the generic formal is private in the generic
11052 spec and non-private in the body.
11053
11054 2011-08-02 Claire Dross <dross@adacore.com>
11055
11056 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11057 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11058 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11059 * impunit.adb, Makefile.rtl: Take new files into account.
11060
11061 2011-08-02 Robert Dewar <dewar@adacore.com>
11062
11063 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11064 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11065
11066 2011-08-02 Yannick Moy <moy@adacore.com>
11067
11068 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11069 formal mode
11070 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11071 matching static array bounds, taking into account the special case of
11072 string literals
11073 * sem_ch3.adb: Typo in comment.
11074
11075 2011-08-02 Yannick Moy <moy@adacore.com>
11076
11077 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11078 which issues an error in formal mode if its argument node is originally
11079 from source
11080 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11081 has a discriminant specification so that it does not include the case
11082 of derived types
11083 (Derived_Type_Declaration): move here the test that a derived type has a
11084 discriminant specification
11085 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11086 first element of a component association before accessing its choices
11087 (presence of component association is not enough)
11088 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11089 declaration is a library item before accessing the next element in a
11090 list, as library items are not member of lists
11091 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11092 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11093 Check_Formal_Restriction whenever possible.
11094
11095 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11096
11097 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11098 reference when needed.
11099
11100 2011-08-02 Bob Duff <duff@adacore.com>
11101
11102 * gnat_ugn.texi: Fix typo.
11103
11104 2011-08-02 Vincent Celier <celier@adacore.com>
11105
11106 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11107 archive file name. Do not use the full path name of archives for Open
11108 VMS.
11109
11110 2011-08-02 Robert Dewar <dewar@adacore.com>
11111
11112 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11113 Analyze_Aspect_Specifications
11114 * sem_ch13.adb
11115 (Analyze_Aspect_Specifications): New handling for boolean aspects
11116 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11117 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11118 sequence for Analyze_Aspect_Specifications
11119 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11120 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11121
11122 2011-08-02 Robert Dewar <dewar@adacore.com>
11123
11124 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11125 aspects, since these no longer exist.
11126
11127 2011-08-02 Robert Dewar <dewar@adacore.com>
11128
11129 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11130 semicolon, do not try to see if there are aspects following it.
11131 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11132 aspect spec.
11133
11134 2011-08-02 Robert Dewar <dewar@adacore.com>
11135
11136 * sem_ch8.adb, aspects.ads: Minor reformatting.
11137
11138 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11139
11140 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11141 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11142 extracted from...
11143 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11144
11145 2011-08-02 Yannick Moy <moy@adacore.com>
11146
11147 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11148 mode on subprogram declaration outside of package specification, unless
11149 it is followed by a pragma Import
11150 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11151 Access_Type_Declaration): issue error in formal mode on access type
11152 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11153 incomplete type
11154 (Analyze_Object_Declaration): issue error in formal mode on object
11155 declaration which does not respect SPARK restrictions
11156 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11157 declaration which does not respect SPARK restrictions
11158 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11159 error in formal mode on digits or delta constraint
11160 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11161 decimal fixed point type
11162 (Derived_Type_Declaration): issue error in formal mode on derived type
11163 other than type extensions of tagged record types
11164 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11165 with check on access definition
11166 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11167 mode on protected definition.
11168 (Analyze_Task_Definition): issue error in formal mode on task definition
11169
11170 2011-08-02 Robert Dewar <dewar@adacore.com>
11171
11172 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11173
11174 2011-08-02 Javier Miranda <miranda@adacore.com>
11175
11176 * sem_ch6.adb (Can_Override_Operator): New function.
11177 (Verify_Overriding_Indicator): Add missing code to check overriding
11178 indicator in operators. Fixes regression.
11179 (Check_Overriding_Indicator): Minor reformating after replacing the
11180 code that evaluates if the subprogram can override an operator by
11181 invocations to the above new function.
11182 * einfo.adb
11183 (Write_Field26_Name): Add missing code to ensure that, following
11184 the documentation in einfo.ads, this field is not shown as attribute
11185 "Static_Initialization" on non-dispatching functions.
11186
11187 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11188
11189 * sem_res.adb (Resolve_Call): A call to
11190 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11191 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11192 i.e., when the second parameter is of type Time_Span.
11193
11194 2011-08-02 Vincent Celier <celier@adacore.com>
11195
11196 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11197 with an archive instead of -L<library dir> -l<library name>.
11198
11199 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11200
11201 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11202 mark the base types In_Use in addition to making the operations
11203 use_visible.
11204
11205 2011-08-02 Ed Falis <falis@adacore.com>
11206
11207 * init.c: add and setup __gnat_signal_mask for the exception signals
11208 * s-inmaop-vxworks.adb: new file.
11209 * s-intman-vxworks.adb: remove unnecessary initializations and
11210 simplify remaining
11211 * s-intman-vxworks.ads: remove unnecessary variable
11212 * s-taprop-vxworks.adb: simplify signal initialization
11213
11214 2011-08-02 Robert Dewar <dewar@adacore.com>
11215
11216 * sem_ch8.adb: Minor code reorganization, comment updates.
11217
11218 2011-08-02 Robert Dewar <dewar@adacore.com>
11219
11220 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11221 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11222 here from Sem_Res.
11223 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11224 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11225
11226 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11227
11228 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11229 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11230 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11231 use_type_clauses, to handle more efficiently use_type and use_all_type
11232 constructs.
11233 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11234 Ada2012 Use_All_Type clause.
11235 (Use_Class_Wide_Operations): new procedure.
11236
11237 2011-08-02 Robert Dewar <dewar@adacore.com>
11238
11239 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11240 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11241 expression to expression function.
11242
11243 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11244
11245 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11246 if types are compatible.
11247
11248 2011-08-02 Yannick Moy <moy@adacore.com>
11249
11250 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11251 returns True if its argument array types have same dimension and same
11252 static bounds at each index.
11253 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11254 OUT or IN OUT paramaters which are not view conversions in SPARK.
11255 (Resolve_Arithmetic_Op): issue an error in formal mode on
11256 multiplication or division with operands of fixed point types which are
11257 not qualified or explicitly converted.
11258 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11259 Boolean or array type (except String) operands.
11260 (Resolve_Equality_Op): issue an error in formal mode on equality
11261 operators for array types other than String with non-matching static
11262 bounds.
11263 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11264 for array types with non-matching static bounds. Factorize the code in
11265 Matching_Static_Array_Bounds.
11266 (Resolve_Qualified_Expression): issue an error in formal mode on
11267 qualified expressions for array types with non-matching static bounds.
11268 (Resolve_Type_Conversion): issue an error in formal mode on type
11269 conversion for array types with non-matching static bounds
11270
11271 2011-08-02 Robert Dewar <dewar@adacore.com>
11272
11273 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11274
11275 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11276
11277 * par-ch9.adb: save location of entry for proper error message.
11278
11279 2011-08-02 Javier Miranda <miranda@adacore.com>
11280
11281 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11282 (Use_Full_View) which permits this routine to climb through the
11283 ancestors using the full-view of private parents.
11284 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11285 Use_Full_View to true in calls to Is_Ancestor.
11286 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11287 true in call to Is_Ancestor.
11288 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11289 Use_Full_View to true in call to Is_Ancestor.
11290 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11291 call to Is_Ancestor.
11292 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11293 Use_Full_View to true in calls to Is_Ancestor.
11294 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11295 Make_Select_Specific_Data_Table, Register_Primitive,
11296 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11297 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11298 to true in call to Is_Ancestor.
11299 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11300 Use_Full_View to true in calls to Is_Ancestor.
11301 * exp_cg.adb
11302 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11303 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11304
11305 2011-08-02 Robert Dewar <dewar@adacore.com>
11306
11307 * gnat_rm.texi: Minor reformatting.
11308 * sem_prag.adb: Minor reformatting.
11309
11310 2011-08-02 Tristan Gingold <gingold@adacore.com>
11311
11312 * vms_data.ads: Add VMS qualifier for -gnateP.
11313
11314 2011-08-02 Robert Dewar <dewar@adacore.com>
11315
11316 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11317 * par-ch7.adb (P_Package): Proper placement of aspects for package
11318 decl/instantiation.
11319 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11320 (End_Statements): Add Is_Sloc parameterr
11321 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11322 (Check_End): Ad Is_Sloc parameter
11323 (End_Statements): Add Is_Sloc parameterr
11324
11325 2011-08-02 Vincent Celier <celier@adacore.com>
11326
11327 * ug_words: Add VMS qualifier equivalent to -gnateP:
11328 /SYMBOL_PREPROCESSING.
11329
11330 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11331
11332 * gnat-style.texi: For hexadecimal numeric literals the typical
11333 grouping of digits is 4 to represent 2 bytes.
11334 A procedure spec which is split into several lines is indented two
11335 characters.
11336
11337 2011-08-02 Yannick Moy <moy@adacore.com>
11338
11339 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11340 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11341 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11342 properly qualified
11343 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11344 choice in array aggregate
11345 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11346 mark as ancestor
11347 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11348 positional and named aggregate for record, or others in record
11349 aggregate, or multiple choice in record aggregate
11350 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11351 array operands to logical operations AND, OR and XOR do not have the
11352 same static lower and higher bounds
11353 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11354
11355 2011-08-01 Robert Dewar <dewar@adacore.com>
11356
11357 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11358 Replaces Last_Source_Node_In_Sequence.
11359 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11360 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11361 parens and blank in string (this was inconsistently implemented).
11362 * errout.ads
11363 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11364 blank in string (this was inconsistently implemented).
11365 * gnat1drv.adb
11366 (Set_Global_Switches): Set formal mode switches appropriately
11367 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11368 * par-prag.adb
11369 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11370 call Set_Error_Msg_Lang to set "spark" as language name.
11371 * par.adb: Remove unnecessary call to set formal language for errout
11372 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11373 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11374 name.
11375 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11376 calls to it, moved after resolution so that types are known
11377 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11378 result of concatenation is not of type String
11379 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11380 concatenation is not properly restricted
11381 * gnat_rm.texi: Add doc on pragma Spark_95.
11382 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11383 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11384 * gcc-interface/Make-lang.in: Update dependencies.
11385
11386 2011-08-01 Javier Miranda <miranda@adacore.com>
11387
11388 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11389 condition that detects if the overridden operation must replace an
11390 existing entity.
11391
11392 2011-08-01 Javier Miranda <miranda@adacore.com>
11393
11394 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11395 code declarations inserted by Insert_Actions in each alternative of the
11396 N_Case_Expression node.
11397
11398 2011-08-01 Robert Dewar <dewar@adacore.com>
11399
11400 * sem_ch6.adb: Minor code reorganization.
11401 * sem_util.adb: Minor reformatting.
11402
11403 2011-08-01 Pascal Obry <obry@adacore.com>
11404
11405 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11406 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11407
11408 2011-08-01 Yannick Moy <moy@adacore.com>
11409
11410 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11411 literal or operator symbol which is prefixed
11412 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11413 mode on access attributes.
11414 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11415 that concatenation operands are properly restricted in formal mode
11416 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11417 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11418 result of the concatenation has a type different from String.
11419 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11420 Analyze_Quantified_Expression, Analyze_Slice,
11421 Analyze_Null): issue an error in formal mode on unsupported constructs
11422 * sem_ch5.adb
11423 (Analyze_Block_Statement): only issue error on source block statement
11424 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11425 function which returns the last node in a list of nodes for which
11426 Comes_From_Source returns True, if any
11427 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11428 Last_Source_Node_In_Sequence
11429 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11430 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11431 mode on unsupported constructs
11432 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11433 rest of the actions may be needed later on since the error is marked as
11434 not serious.
11435 * sinfo.ads: Typos in comments.
11436
11437 2011-08-01 Pascal Obry <obry@adacore.com>
11438
11439 * projects.texi: Minor editing.
11440
11441 2011-08-01 Yannick Moy <moy@adacore.com>
11442
11443 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11444 insertion character ~~
11445 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11446 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11447 with insertion character ~~
11448 (Set_Msg_Text): treat insertion character ~~
11449 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11450 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11451 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11452 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11453 errors related to the formal language restriction not serious
11454 (insertion character |).
11455 * par.adb (Par): set formal language for error messages if needed
11456 * sem_ch6.adb (Check_Missing_Return): take into account possible
11457 generated statements at the end of the function
11458 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11459 enumeration value to define a new pragma SPARK_95
11460 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11461 SPARK_Version): new type and variables to store the SPARK version
11462 (none by default).
11463 (SPARK_Mode): return True when SPARK_Version is set
11464 * par-prag.adb: Correct indentation
11465 (Prag): take Pragma_SPARK_95 into account
11466 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11467 into account.
11468
11469 2011-08-01 Robert Dewar <dewar@adacore.com>
11470
11471 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11472 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11473 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11474
11475 2011-08-01 Pascal Obry <obry@adacore.com>
11476
11477 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11478 Target_Name to Get_Path call.
11479 (Parse_Single_Project): Likewise.
11480 (Post_Parse_Context_Clause): Likewise.
11481 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11482 Call Initialise_Project_Path with the proper Target_Name.
11483 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11484 search path.
11485 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11486 with the proper Target_Name.
11487 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11488 Part.Parse routine.
11489 (Parse_Project_And_Apply_Config): Likewise.
11490 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11491 This is fine as this part of the code is supporting only native
11492 compilation.
11493 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11494 is fine as this part of the code is supporting only native compilation.
11495
11496 2011-08-01 Yannick Moy <moy@adacore.com>
11497
11498 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11499 of homonym, unless the homonym is one of the cases allowed in SPARK
11500 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11501 package declaration occurring after a body.
11502
11503 2011-08-01 Robert Dewar <dewar@adacore.com>
11504
11505 * checks.adb, exp_ch4.adb: Minor reformatting.
11506
11507 2011-08-01 Javier Miranda <miranda@adacore.com>
11508
11509 * einfo.ads (Access_Disp_Table): Fix documentation.
11510 (Dispatch_Table_Wrappers): Fix documentation.
11511
11512 2011-08-01 Pascal Obry <obry@adacore.com>
11513
11514 * prj-env.adb, prj-env.ads: Minor reformatting.
11515
11516 2011-08-01 Yannick Moy <moy@adacore.com>
11517
11518 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11519 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11520 procedures out of these packages.
11521 * errout.ads, errout.adb
11522 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11523 procedures in of this package
11524 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11525 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11526 on misplaced later vs initial declarations, like in Ada 83
11527 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11528 formal mode on attribute of private type whose full type declaration
11529 is not visible
11530 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11531 package declaration inside a package specification
11532 (Analyze_Full_Type_Declaration): issue error in formal mode on
11533 controlled type or discriminant type
11534 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11535 user-defined operator means that it should come from the source
11536 (New_Overloaded_Entity): issue error in formal mode on overloaded
11537 entity.
11538 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11539
11540 2011-08-01 Thomas Quinot <quinot@adacore.com>
11541
11542 * atree.adb: Minor reformatting.
11543 * checks.adb: Minor reformatting.
11544
11545 2011-08-01 Vincent Celier <celier@adacore.com>
11546
11547 * s-parame-vms-ia64.ads: Fix typo in comment
11548 Minor reformatting
11549 * s-parame-vms-restrict.ads: Removed, unused.
11550
11551 2011-08-01 Javier Miranda <miranda@adacore.com>
11552
11553 * exp_ch3.adb
11554 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11555 * sem_ch3.adb
11556 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11557 * sem_ch3.ads, sem_ch3.adb
11558 (Is_Constant_Bound): New extended version of the subprogram that was
11559 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11560 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11561 * sem_aux.ads (Constant_Value): Fix typo in comment.
11562 * checks.adb (Generate_Index_Checks): New implementation which, for
11563 array objects with constant bounds, generates the runtime check
11564 referencing the bounds of the array type. For other cases this routine
11565 provides its previous behavior obtaining such values from the array
11566 object.
11567 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11568 parent type.
11569 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11570 we cannot have semantic interpretations of the new node.
11571
11572 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11573
11574 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11575 expressions.
11576
11577 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11578
11579 * sem_ch8.adb: Minor code editing.
11580 * s-vxwext.adb: Remove trailing space.
11581 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11582 consistency with other files.
11583
11584 2011-08-01 Thomas Quinot <quinot@adacore.com>
11585
11586 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11587
11588 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11589
11590 * par-ch10.adb: reject parameterized expressions as compilation unit.
11591 * sem_ch4.adb: handle properly conditional expression with overloaded
11592 then_clause and no else_clause.
11593
11594 2011-08-01 Tristan Gingold <gingold@adacore.com>
11595
11596 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11597 like done by System.Aux_DEC.
11598 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11599
11600 2011-08-01 Yannick Moy <moy@adacore.com>
11601
11602 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11603 missing label at end of declaration (subprogram or package)
11604 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11605 of positional and named parameter association
11606 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11607 Error_Msg_SP which adds a prefix to the error message giving the name
11608 of the formal language analyzed
11609 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11610 access result type in subprogram, unconstrained array as result type,.
11611 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11612 procedure
11613 * sem_ch8.adb: Code clean up.
11614
11615 2011-08-01 Javier Miranda <miranda@adacore.com>
11616
11617 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11618 * einfo.ads (Access_Disp_Table): Fix documentation.
11619 (Dispatch_Table_Wrappers): Fix documentation.
11620 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11621 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11622 to enforce the documentation of this attribute.
11623 (Set_Is_Interface): Cleanup the assertion.
11624 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11625 the Underlying_Type entity before reading attribute Access_Disp_Table.
11626 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11627 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11628 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11629 the Underlying_Type entity before reading attribute Access_Disp_Table.
11630 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11631 Locate the Underlying_Type entity before reading attribute
11632 Access_Disp_Table.
11633
11634 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11635
11636 * s-poosiz.ads: Additional overriding indicators.
11637
11638 2011-08-01 Yannick Moy <moy@adacore.com>
11639
11640 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11641 formal mode.
11642 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11643 parameter specification does not include a subtype mark.
11644 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11645 formal mode on abstract subprogram.
11646 (Analyze_Subprogram_Specification): issue error in formal mode on
11647 user-defined operator.
11648 (Process_Formals): issue error in formal mode on access parameter and
11649 default expression.
11650 * sem_ch9.adb (Analyze_Abort_Statement,
11651 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11652 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11653 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11654 Analyze_Requeue, Analyze_Selective_Accept,
11655 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11656 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11657 issue error in formal mode on user-defined raise statement.
11658
11659 2011-08-01 Thomas Quinot <quinot@adacore.com>
11660
11661 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11662 declaration being hidden when overriding an implicit inherited
11663 subprogram.
11664 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11665 (-gnats), do not complain about a source file that contains only a
11666 pragma No_Body.
11667
11668 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11669
11670 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11671 variable if already set.
11672
11673 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11674
11675 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11676 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11677 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11678 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11679 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11680 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11681 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11682 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11683 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11684 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11685 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11686 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11687 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11688 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11689 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11690 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11691 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11692 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11693 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11694 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11695 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11696 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11697 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11698 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11699 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11700 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11701 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11702 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11703 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11704 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11705 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11706 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11707 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11708 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11709 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11710 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11711 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11712 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11713 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11714 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11715 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11716 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11717 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11718 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11719 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11720 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11721 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11722 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11723 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11724 Use GNAT instead of GNARL.
11725
11726 2011-08-01 Bob Duff <duff@adacore.com>
11727
11728 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11729 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11730 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11731 reformatting.
11732
11733 2011-08-01 Yannick Moy <moy@adacore.com>
11734
11735 * debug.adb (d.D) reverve flag for the SPARK mode
11736 (d.E) reverve flag for SPARK generation mode
11737 (d.F) reverve flag for Why generation mode
11738 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11739 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11740 functions which return True when the corresponding modes are set
11741 (Formal_Language): return "spark" or "alfa" when in formal verification
11742 mode.
11743 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11744 Error_Msg to prefix the error message with a tag giving the formal
11745 language
11746 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11747 message with a tag giving the formal language
11748 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11749 block statement
11750 (Analyze_Case_Statement): issue error in formal mode on case statement
11751 with a single "others" case alternative
11752 (Analyze_Exit_Statement): issue errors in formal mode on exit
11753 statements which do not respect SPARK restrictions
11754 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11755 (Check_Unreachable_Code): always issue an error (not a warning) in
11756 formal mode on unreachable code (concerns both code after an infinite
11757 loop and after an unconditional jump, both not allowed in SPARK)
11758 * sem_ch6.adb (Analyze_Return_Statement): add call to
11759 Set_Return_Present for a procedure containing a return statement
11760 (already done for functions in Analyze_Function_Return)
11761 (Analyze_Function_Return): issue error in formal mode on extended
11762 return or if return is not last statement in function
11763 (Check_Missing_Return): issue error in formal mode if function does
11764 not end with return or if procedure contains a return
11765 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11766 function to detect if there is an inner scope of its parameter S which
11767 is a loop.
11768
11769 2011-08-01 Thomas Quinot <quinot@adacore.com>
11770
11771 * sem_ch6.ads: Minor reformatting.
11772
11773 2011-08-01 Javier Miranda <miranda@adacore.com>
11774
11775 * sem_util.adb (Abstract_Interface_List): Complete condition when
11776 processing private type declarations to avoid reading unavailable
11777 attribute.
11778 (Is_Synchronized_Tagged_Type): Complete condition when processing
11779 private extension declaration nodes to avoid reading unavailable
11780 attribute.
11781
11782 2011-08-01 Thomas Quinot <quinot@adacore.com>
11783
11784 * sem_ch3.adb: Minor reformatting.
11785
11786 2011-08-01 Thomas Quinot <quinot@adacore.com>
11787
11788 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11789 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11790 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11791 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11792 for VMS, instead parametrize the common implementation with
11793 System.Parameters declarations.
11794
11795 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11796
11797 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11798
11799 2011-08-01 Tristan Gingold <gingold@adacore.com>
11800
11801 * seh_init.c: Fix SEH handler installation on win64.
11802
11803 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11804
11805 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11806 double analysis of an anonymous access to subprogram, because it can
11807 lead to improper sharing of profiles and a back-end crash.
11808
11809 2011-08-01 Robert Dewar <dewar@adacore.com>
11810
11811 * make.adb, sem_ch4.adb: Minor reformatting.
11812 * gcc-interface/Make-lang.in: Update dependencies.
11813 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11814
11815 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11816
11817 * gnat_rm.texi: Fix definition of Long_Integer.
11818
11819 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11820
11821 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11822 to prevent storage exhaustion.
11823 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11824 finalized is a function body, insert the cleanup code before the final
11825 return statement, to prevent spurious warnings.
11826 * s-pooglo.ads: add overriding indicator.
11827
11828 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11829
11830 * sem_ch4.adb (Operator_Check): improve error message when both a
11831 with_clause and a use_clause are needed to make operator usage legal.
11832 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11833 determine whether a compilation unit is visible within an other,
11834 either through a with_clause in the current unit, or a with_clause in
11835 its library unit or one one of its parents.
11836
11837 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11838
11839 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11840 over an arbitrary expression of an array or container type.
11841 * lib-xref.adb: clarify comment.
11842
11843 2011-08-01 Bob Duff <duff@adacore.com>
11844
11845 * einfo.ads: Minor reformatting.
11846 * debug.adb: Minor comment improvement.
11847
11848 2011-08-01 Javier Miranda <miranda@adacore.com>
11849
11850 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11851 consider hidden subprograms as valid candidates.
11852
11853 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11854
11855 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11856
11857 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11858
11859 * gnat_ugn.texi: Fix typo.
11860
11861 2011-08-01 Robert Dewar <dewar@adacore.com>
11862
11863 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11864 lib-xref.adb: Minor reformatting
11865
11866 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11867
11868 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11869 when to generate a call to Move_Final_List.
11870 (Has_Controlled_Parts): Remove this function.
11871
11872 2011-08-01 Geert Bosch <bosch@adacore.com>
11873
11874 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11875 "," in choice list.
11876
11877 2011-08-01 Thomas Quinot <quinot@adacore.com>
11878
11879 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11880 explicit raise of a predefined exception as Comes_From_Source if the
11881 original N_Raise_Statement comes from source.
11882
11883 2011-08-01 Robert Dewar <dewar@adacore.com>
11884
11885 * sinfo.ads: Add comment.
11886 * sem_ch6.adb: Minor reformatting.
11887
11888 2011-08-01 Robert Dewar <dewar@adacore.com>
11889
11890 * freeze.adb (Freeze_Entity): Refine check for bad component size
11891 clause to avoid rejecting confirming clause when atomic/aliased present.
11892
11893 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11894
11895 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11896 better determine whether an entity reference is a write.
11897 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11898 subcomponent.
11899 * lib-xref.adb (Output_References): Do no suppress a read reference at
11900 the same location as an immediately preceeding modify-reference, to
11901 handle properly in-out actuals.
11902
11903 2011-08-01 Tristan Gingold <gingold@adacore.com>
11904
11905 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11906
11907 2011-08-01 Quentin Ochem <ochem@adacore.com>
11908
11909 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11910 heap to compute the result.
11911
11912 2011-08-01 Robert Dewar <dewar@adacore.com>
11913
11914 * atree.ads: Minor reformatting.
11915
11916 2011-08-01 Emmanuel Briot <briot@adacore.com>
11917
11918 * g-expect.adb (Get_Command_Output): Fix memory leak.
11919
11920 2011-08-01 Geert Bosch <bosch@adacore.com>
11921
11922 * cstand.adb (P_Float_Type): New procedure to print the definition of
11923 predefined fpt types.
11924 (P_Mixed_Name): New procedure to print a name using mixed case
11925 (Print_Standard): Use P_Float_Type for printing floating point types
11926 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11927 precision IEEE float.
11928
11929 2011-08-01 Thomas Quinot <quinot@adacore.com>
11930
11931 * sem_ch3.adb: Minor reformatting.
11932
11933 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11934
11935 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11936 the completion of a generic function, insert the new body rather than
11937 rewriting the original.
11938
11939 2011-08-01 Yannick Moy <moy@adacore.com>
11940
11941 * sinfo.ads, errout.ads: Typos in comments.
11942
11943 2011-08-01 Robert Dewar <dewar@adacore.com>
11944
11945 * par-endh.adb: Minor reformatting.
11946
11947 2011-08-01 Robert Dewar <dewar@adacore.com>
11948
11949 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11950 (Pre_Post_Aspects): New subtype.
11951 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11952 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11953 * par-ch7.adb (P_Package): Remove Decl parameter
11954 (P_Package): Handle new syntax for aspects (before IS)
11955 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11956 new aspect syntax
11957 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11958 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11959 (P_Package): Remove Decl parameter
11960 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11961 aspects
11962 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11963 specs
11964 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11965 * sinfo.ads: Document new syntax for aspects in packages etc.
11966 * sprint.adb: Handle new syntax of aspects before IS in package
11967
11968 2011-08-01 Thomas Quinot <quinot@adacore.com>
11969
11970 * atree.ads: Minor reformatting.
11971 * sem_prag.adb: Minor reformatting.
11972
11973 2011-08-01 Robert Dewar <dewar@adacore.com>
11974
11975 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11976 case expr alternative.
11977
11978 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11979
11980 * sem_ch12.adb: Fix typo.
11981
11982 2011-08-01 Geert Bosch <bosch@adacore.com>
11983
11984 * sem_prag.adb (Check_No_Link_Name): New procedure.
11985 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11986 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11987 instead of Standard_Long_Long_Float_Size global. Preparation for
11988 eventual removal of per type constants.
11989 * exp_util.ads (Get_Stream_Size): New function returning the stream
11990 size value of subtype E.
11991 * exp_util.adb (Get_Stream_Size): Implement new function.
11992 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11993 function.
11994 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11995 * einfo.adb:
11996 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11997
11998 2011-08-01 Geert Bosch <bosch@adacore.com>
11999
12000 * cstand.adb: Fix comments.
12001 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12002 count of arguments.
12003
12004 2011-08-01 Robert Dewar <dewar@adacore.com>
12005
12006 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12007
12008 2011-08-01 Geert Bosch <bosch@adacore.com>
12009
12010 * atree.ads: Fix comment.
12011
12012 2011-08-01 Robert Dewar <dewar@adacore.com>
12013
12014 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12015 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12016 * par.adb: Add with for Namet.Sp.
12017 * par-tchk.adb: Minor reformatting.
12018
12019 2011-08-01 Vincent Celier <celier@adacore.com>
12020
12021 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12022 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12023 of the init procedure of a SAL.
12024 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12025 New procedure.
12026
12027 2011-08-01 Thomas Quinot <quinot@adacore.com>
12028
12029 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12030 reformatting.
12031
12032 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12033
12034 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12035
12036 2011-08-01 Thomas Quinot <quinot@adacore.com>
12037
12038 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12039 conformant with its spec (return True only for types that have
12040 an overriding Initialize primitive operation that prevents them from
12041 having preelaborable initialization).
12042 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12043 initialization for controlled types in Ada 2005 or later mode.
12044
12045 2011-08-01 Robert Dewar <dewar@adacore.com>
12046
12047 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12048 Postcondition.
12049 (Same_Aspect): New function.
12050 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12051 Type_Invariant, Precondition, Postcondition.
12052 * snames.ads-tmpl: Add Name_Type_Invariant.
12053
12054 2011-08-01 Robert Dewar <dewar@adacore.com>
12055
12056 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12057 here.
12058 (Freeze_All_Ent): Fix error in handling inherited aspects.
12059 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12060 already analyzed, but don't skip entire processing of a declaration,
12061 that's wrong in some cases of declarations being rewritten.
12062 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12063 Don't delay for integer, string literals
12064 Treat predicates in usual manner for delay, remove special case code,
12065 not needed.
12066 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12067 (Build_Predicate_Function): Update saved expression in aspect
12068 (Build_Invariant_Procedure): Update saved expression in aspect
12069 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12070 of replacement of discriminant references if the reference is simple.
12071
12072 2011-08-01 Robert Dewar <dewar@adacore.com>
12073
12074 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12075 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12076 Static_Predicate and Dynamic_Predicate.
12077 (Build_Predicate_Function): Add processing for Static_Predicate
12078 and Dynamic_Predicate.
12079 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12080 (From_Static_Predicate): New flag
12081 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12082
12083 2011-08-01 Robert Dewar <dewar@adacore.com>
12084
12085 * usage.adb: Documentation cleanup for Ada version modes in usage.
12086 * expander.adb: Minor reformatting.
12087
12088 2011-08-01 Robert Dewar <dewar@adacore.com>
12089
12090 * atree.ads: Minor comment fix.
12091 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12092 a-witeio.ads, sem_prag.adb: Minor reformatting.
12093
12094 2011-08-01 Doug Rupp <rupp@adacore.com>
12095
12096 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12097 pointers. Use descrip.h header file for convenience. Add some
12098 comments.
12099
12100 2011-08-01 Robert Dewar <dewar@adacore.com>
12101
12102 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12103 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12104 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12105 New procedure.
12106 (Check_Aspect_At_End_Of_Declarations): New procedure
12107 (Analye_Aspect_Specification): Minor changes for above procedures
12108 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12109 specification node as well.
12110
12111 2011-08-01 Pascal Obry <obry@adacore.com>
12112
12113 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12114 Windows files. Use GetFilesAttributes() in this case to check for file
12115 existence instead of returning with an error code.
12116
12117 2011-08-01 Vincent Celier <celier@adacore.com>
12118
12119 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12120 High is above Source length.
12121
12122 2011-08-01 Robert Dewar <dewar@adacore.com>
12123
12124 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12125
12126 2011-08-01 Robert Dewar <dewar@adacore.com>
12127
12128 * aspects.ads (Boolean_Aspects): New subtype.
12129 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12130 for derived types in cases where the parent type and derived type have
12131 aspects.
12132 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12133 with aspects when parent type also has aspects.
12134 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12135 boolean expression at this point).
12136 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12137 accordance with final decision on the Ada 2012 feature.
12138 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12139
12140 2011-08-01 Matthew Heaney <heaney@adacore.com>
12141
12142 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12143
12144 2011-08-01 Pascal Obry <obry@adacore.com>
12145
12146 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12147 Fix Replace_Slice when High is above current string size.
12148 (Replace_Slice): Fix DL computation when High is above current
12149 string length.
12150
12151 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12152
12153 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12154
12155 2011-08-01 Matthew Heaney <heaney@adacore.com>
12156
12157 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12158 of node.
12159
12160 2011-08-01 Pascal Obry <obry@adacore.com>
12161
12162 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12163 reformatting.
12164
12165 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12166
12167 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12168 access to protected subprograms in generic bodies.
12169 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12170 protected type, indicate that the convention of the subprogram is
12171 Convention_Protected, because it may be used in subsequent declarations
12172 within the protected declaration.
12173
12174 2011-08-01 Vincent Celier <celier@adacore.com>
12175
12176 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12177 and "final" procedures when the name of the library is "ada", to avoid
12178 duplicate symbols "adainit" and "adafinal" in executables.
12179
12180 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12181
12182 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12183 quantified expression that appears within a postcondition and uses the
12184 Ada2012 'Result attribute.
12185
12186 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12187
12188 * init.c (__gnat_error_handler): Cast reason to int.
12189 (__gnat_install_handler): Explain sa_sigaction use.
12190
12191 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12192
12193 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12194 subprogram has copy-in copy-out parameters, try to promote the mode of
12195 the return type if it is passed in registers.
12196
12197 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12198
12199 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12200 left operand as addressable.
12201
12202 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12203
12204 * gcc-interface/gigi.h (build_function_stub): Remove.
12205 (build_return_expr): Likewise.
12206 (convert_vms_descriptor): Declare.
12207 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12208 (build_function_stub): Move to...
12209 * gcc-interface/utils2.c (build_return_expr): Move to...
12210 * gcc-interface/trans.c (build_function_stub): ...here.
12211 (build_return_expr): ...here.
12212 (Subprogram_Body_to_gnu): Add local variable for language_function.
12213 Disconnect the parameter attributes cache, if any, once done with it.
12214 Call end_subprog_body only after setting the end_locus.
12215 Build the stub associated with the function, if any, at the very end.
12216 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12217 variables and streamline control flow.
12218
12219 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12220
12221 PR ada/49819
12222 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12223 g-trasym-dwarf.adb.
12224
12225 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12226
12227 PR bootstrap/49794
12228 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12229 Assign to act.sa_sigaction.
12230 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12231 current->return_address to char * before arithmetic.
12232
12233 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12234
12235 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12236 Correct argument types.
12237 Extract code from reason.
12238 (__gnat_install_handler): Assign to act.sa_sigaction.
12239
12240 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12241
12242 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12243 (GNAT1_OBJS): ...here.
12244
12245 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12246
12247 PR ada/48711
12248 * g-socthi-mingw.adb (Fill): Fix formatting.
12249
12250 * gcc-interface/gigi.h: Move around comment.
12251
12252 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12253
12254 PR ada/46350
12255 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12256
12257 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12258
12259 PR ada/48711
12260 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12261
12262 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12263
12264 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12265 range comparison if Pmode is SImode.
12266
12267 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12268 Eric Botcazou <ebotcazou@adacore.com>
12269
12270 * adadecode.c: Wrap up in extern "C" block.
12271 * adadecode.h: Likewise.
12272 * adaint.c: Likewise. Remove 'const' keyword.
12273 * adaint.h: Likewise.
12274 * argv.c: Likewise.
12275 * atree.h: Likewise.
12276 * cio.c: Likewise.
12277 * cstreams.c: Likewise.
12278 * env.c: Likewise.
12279 * exit.c: Likewise.
12280 * fe.h: Likewise.
12281 * final.c: Likewise.
12282 * init.c: Likewise.
12283 * initialize.c: Likewise.
12284 * link.c: Likewise.
12285 * namet.h: Likewise.
12286 * nlists.h: Likewise.
12287 * raise.c: Likewise.
12288 * raise.h: Likewise.
12289 * repinfo.h: Likewise.
12290 * seh_init.c: Likewise.
12291 * targext.c: Likewise.
12292 * tracebak.c: Likewise.
12293 * uintp.h: Likewise.
12294 * urealp.h: Likewise.
12295 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12296 * xsinfo.adb: Likewise.
12297 * xsnamest.adb: Likewise.
12298 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12299 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12300 * gcc-interface/misc.c: Likewise.
12301 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12302 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12303 ada/targext.o here...
12304 (GNAT_ADA_OBJS): ...and not here.
12305 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12306 (GNATBIND_OBJS): Reorder.
12307
12308 2011-07-07 Richard Henderson <rth@redhat.com>
12309
12310 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12311 dwarf2out_frame_init.
12312
12313 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12314
12315 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12316
12317 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12318
12319 PR target/39150
12320 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12321
12322 2011-07-06 Richard Guenther <rguenther@suse.de>
12323
12324 * gcc-interface/misc.c (gnat_init): Merge calls to
12325 build_common_tree_nodes and build_common_tree_nodes_2.
12326 Re-initialize boolean_false_node.
12327
12328 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12329 Olivier Hainque <hainque@adacore.com>
12330 Nicolas Setton <setton@adacore.com>
12331
12332 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12333 the type according to the ARTIFICIAL_P parameter.
12334 (create_type_decl): Likewise.
12335 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12336
12337 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12338
12339 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12340 (gnatbind): Likewise.
12341
12342 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12343
12344 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12345
12346 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12347
12348 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12349 local variable throughout. Remove useless call to Base_Type.
12350 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12351 Take it also into account for the volatileness of the field. Set the
12352 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12353
12354 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12355
12356 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12357 on a dereference built for a by-ref object if it has an address clause.
12358
12359 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12360
12361 * einfo.ads (Address_Taken): Document use for the second argument of
12362 Asm_Input and Asm_Output attributes.
12363 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12364 argument is an entity name, then set Address_Taken on it.
12365 <Attribute_Asm_Output>: Likewise.
12366 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12367 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12368 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12369 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12370
12371 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12372
12373 PR middle-end/46500
12374 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12375
12376 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12377
12378 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12379 (ada/utils.o): Update dependencies.
12380 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12381 ../../../libcpp/libcpp.a.
12382 * gcc-interface/utils.c: Include common/common-target.h.
12383 (process_attributes): Use targetm_common.have_named_sections.
12384
12385 2011-06-07 Richard Guenther <rguenther@suse.de>
12386
12387 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12388 set_sizetype.
12389
12390 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12391
12392 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12393 TREE_THIS_NOTRAP flag.
12394
12395 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12396
12397 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12398 Fix thinko.
12399
12400 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12401
12402 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12403 constants whose full view has discriminants specially.
12404
12405 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12406
12407 * gcc-interface/utils.c: Include diagnostic.h.
12408 (gnat_write_global_declarations): Output debug information for all
12409 global type declarations before finalizing the compilation unit.
12410 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12411
12412 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12413
12414 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12415
12416 2011-05-25 Kai Tietz <ktietz@redhat.com>
12417
12418 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12419 initialization instead of const/none-const pointer assignment.
12420
12421 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12422
12423 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12424 $(EXTRA_GNAT1_OBJS).
12425 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12426 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12427 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12428 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12429 libcommon-target.a instead of prefix.o.
12430
12431 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12432
12433 PR ada/49097
12434 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12435
12436 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12437
12438 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12439 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12440 instead of version.o.
12441
12442 2011-05-18 Kai Tietz <ktietz@redhat.com>
12443
12444 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12445 boolean_false_node instead of integer_zero_node.
12446 (convert_with_check): Likewise.
12447 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12448
12449 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12450
12451 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12452 type of the parameter is an unconstrained array, convert the actual to
12453 the type of the formal in the In Out and Out cases as well.
12454
12455 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12456
12457 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12458 call build_function_type_array or build_varargs_function_type_array
12459 instead.
12460 (create_subprog_type): Don't call build_function_type; call
12461 build_function_type_vec instead.
12462
12463 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12464
12465 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12466 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12467 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12468
12469 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12470
12471 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12472
12473 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12474 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12475
12476 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12477
12478 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12479
12480 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12481
12482 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12483 instead of accessing TYPE_ARG_TYPES directly.
12484 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12485
12486 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12487
12488 PR ada/48844
12489 * gcc-interface/gigi.h (get_variant_part): Declare.
12490 * gcc-interface/decl.c (get_variant_part): Make global.
12491 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12492 types have the same constant size, are record types and T1 has a
12493 variant part while T2 doesn't.
12494
12495 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12496
12497 * gcc-interface/utils.c (begin_subprog_body): Do not call
12498 get_pending_sizes.
12499 (end_subprog_body): Likewise.
12500
12501 2011-05-04 Richard Guenther <rguenther@suse.de>
12502
12503 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12504 int_const_binop.
12505 (pos_to_constructor): Likewise.
12506
12507 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12508 Eric Botcazou <ebotcazou@adacore.com>
12509
12510 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12511 of build_function_type. Adjust calls to...
12512 (build_raise_check): ...this. Do not take a void_tree parameter.
12513 Call build_function_type_list instead of build_function_type.
12514 Fix head comment and swap couple of conditional blocks.
12515
12516 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12517
12518 * gnatvsn.ads (Library_Version): Bump to 4.7.
12519 (Current_Year): Bump to 2011.
12520
12521 2011-04-29 Michael Matz <matz@suse.de>
12522
12523 * gcc-interface/misc.c (gnat_handle_option): Set
12524 warn_maybe_uninitialized.
12525
12526 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12527
12528 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12529 the Watson/McCabe paper.
12530
12531 2011-04-23 Jim Meyering <meyering@redhat.com>
12532
12533 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12534
12535 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12536
12537 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12538 onto the new type.
12539
12540 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12541
12542 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12543 parameter.
12544 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12545 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12546 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12547 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12548 <all>: Do not set flags on the reused DECL node coming from an alias.
12549 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12550 don't need debug info here...
12551 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12552 (gigi): Adjust calls to create_subprog_decl.
12553 (build_raise_check): Likewise.
12554 (establish_gnat_vms_condition_handler): Likewise.
12555 (Compilation_Unit_to_gnu): Likewise.
12556 (gnat_to_gnu): Likewise.
12557
12558 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12559
12560 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12561 (NO_REORDER_ADAFLAGS): New variable.
12562 (EXTRA_GNATTOOLS): Always define.
12563 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12564 Clean up and adjust list of files compiled with special options.
12565 * gcc-interface/Make-lang.in: Likewise.
12566 (ada/decl.o): Cosmetical change.
12567 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12568
12569 2011-04-20 Jim Meyering <meyering@redhat.com>
12570
12571 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12572
12573 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12574
12575 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12576 $(CFLAGS) on the link line.
12577
12578 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12579
12580 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12581 padded type built for the return type if it is unconstrained.
12582
12583 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12584
12585 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12586
12587 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12588
12589 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12590 before calling TREE_CHAIN.
12591 * gcc-interface/misc.c (gnat_init_ts): New function.
12592 (LANG_HOOKS_INIT_TS): Define.
12593
12594 2011-04-12 Martin Jambor <mjambor@suse.cz>
12595
12596 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12597 instead of cgraph_node.
12598
12599 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12600
12601 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12602 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12603 mechanism.
12604
12605 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12606
12607 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12608 of aggregate types that contain a placeholder.
12609
12610 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12611
12612 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12613 TYPE_ARG_TYPES.
12614 (handle_type_generic_attribute): Likewise.
12615
12616 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12617
12618 PR ada/47163
12619 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12620
12621 2011-04-04 Kai Tietz <ktietz@redhat.com>
12622
12623 PR ada/47163
12624 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12625 to flag value.
12626
12627 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12628
12629 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12630 type case, do not strip a padding type around the array type.
12631
12632 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12633
12634 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12635 types.
12636
12637 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12638
12639 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12640 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12641 code for -feliminate-unused-debug-types.
12642 (gnat_post_options): Likewise.
12643
12644 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12645
12646 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12647 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12648 distinct copy.
12649
12650 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12651
12652 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12653 DECL_ARTIFICIAL flag on enumeration types.
12654
12655 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12656
12657 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12658 fat pointer types artificial unconditionally.
12659 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12660 isn't artificial.
12661
12662 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12663
12664 * gcc-interface/gigi.h (get_dummy_type): Declare.
12665 (build_dummy_unc_pointer_types): Likewise.
12666 (finish_fat_pointer_type): Likewise.
12667 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12668 fat pointer type has been built, complete it in place.
12669 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12670 and thin pointers. Remove useless variable.
12671 (finish_fat_pointer_type): Make global and move to...
12672 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12673 (get_dummy_type): New function.
12674 (build_dummy_unc_pointer_types): Likewise.
12675 (gnat_pushdecl): Propage the name to the anonymous variants only.
12676 (update_pointer_to): Only adjust the pointer types in the unconstrained
12677 array case.
12678
12679 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12680
12681 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12682 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12683 if this is a Taft amendment type and the full declaration is available.
12684 * gcc-interface/trans.c (process_type): Likewise.
12685 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12686 (process_freeze_entity): Likewise.
12687 * gcc-interface/utils.c (dummy_global): New static variable.
12688 (gnat_write_global_declarations): If there are types declared as used
12689 at the global level, insert them in the global hash table.
12690
12691 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12692
12693 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12694 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12695 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12696 copy.
12697 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12698 flag of the type accordingly.
12699 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12700
12701 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12702
12703 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12704 finalizing types when updating the pointers to the designated type.
12705 <all>: Finalize the deferred types even if we didn't defer processing
12706 of incomplete types in this invocation.
12707
12708 2011-04-01 Olivier Hainque <hainque@adacore.com>
12709 Nicolas Setton <setton@adacore.com>
12710 Eric Botcazou <ebotcazou@adacore.com>
12711
12712 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12713 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12714
12715 2011-03-28 Kai Tietz <ktietz@redhat.com>
12716
12717 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12718 Windows targets.
12719 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12720 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12721
12722 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12723
12724 2011-03-28 Tristan Gingold <gingold@adacore.com>
12725
12726 PR ada/44431
12727 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12728 Use ada output of gnatbind.
12729 (ada/b_gnatb.adb): Ditto.
12730 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12731 (ada.mostlyclean, ada.stage1)
12732 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12733 (ada.stagefeedback): Adjust.
12734 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12735 Use ada output of gnatbind.
12736 (b_gnatm.adb): Ditto.
12737 (b_gnatl.o, b_gnatm.o): New rules.
12738
12739 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12740
12741 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12742 for the padded type built to support a specified size or alignment.
12743
12744 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12745
12746 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12747 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12748 unconditionally to the end of the unit when the designated type is
12749 limited_with'ed.
12750 <all>: Rename local variable. Attempt to un-defer types only and do it
12751 for limited_with'ed types as well.
12752 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12753 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12754 consistently and remove redundant call to finalize_from_with_types.
12755
12756 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12757
12758 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12759 subprograms without a previous spec declared in the same unit.
12760 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12761 subprograms at the end of the unit instead of at the beginning.
12762 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12763 isn't public for the special handling of non-inline functions nested
12764 inside inline external functions.
12765
12766 2011-03-25 Jeff Law <law@redhat.com>
12767
12768 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12769
12770 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12771
12772 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12773 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12774 to compute Set_Size_Depends_On_Discriminant.
12775 (Layout_Type): Call it on array types in back-end layout mode.
12776 * sem_util.adb (Requires_Transient_Scope): Return true for array
12777 types only if the size depends on the value of discriminants.
12778 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12779 type if the RHS is a call to a function that returns an unconstrained
12780 type with default discriminant.
12781
12782 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12783
12784 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12785 non-conversion to the nominal result type at the end.
12786
12787 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12788
12789 * gcc-interface/trans.c (create_temporary): New function taken from...
12790 (create_init_temporary): ...here. Call it.
12791 (call_to_gnu): Create the temporary for the return value early, if any.
12792 Create it for a function with copy-in/copy-out parameters if there is
12793 no target; in other cases of copy-in/copy-out, use another temporary.
12794 Push the new binding level lazily. Add and rename local variables.
12795
12796 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12797
12798 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12799 error message.
12800 (set_rm_size): Likewise.
12801
12802 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12803
12804 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12805 for the padded type built in order to support a specified alignment.
12806 Fix incorrect formatting.
12807
12808 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12809
12810 PR bootstrap/48216
12811 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12812
12813 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12814
12815 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12816 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12817 to the end of the list. Adjust recursive call. Rename local variable.
12818 If REORDER is true, reorder components of the record type.
12819 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12820 components_to_record and adjust the parameter list.
12821
12822 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12823
12824 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12825 disabled, use the variable for bounds of loop iteration scheme.
12826
12827 2011-03-21 Kai Tietz <ktietz@redhat.com>
12828
12829 PR target/12171
12830 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12831
12832 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12833
12834 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12835 out whether the expression is read-only. Short-circuit placeholder
12836 case and rename a couple of local variables.
12837
12838 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12839
12840 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12841 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12842 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12843 (convert): Deal with conversions from a smaller form type specially.
12844
12845 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12846
12847 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12848 its argument, except for the special -I- switch.
12849
12850 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12851
12852 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12853 "Ada Issues".
12854
12855 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12856
12857 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12858
12859 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12860
12861 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12862 GNAT_FORMAL.
12863 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12864 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12865 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12866 Do not generate the check directly, instead instantiate the template
12867 check present in the descriptor.
12868 (make_descriptor_field): Move around.
12869 (build_vms_descriptor32): Build a template check in the POINTER field.
12870 (build_vms_descriptor): Remove useless suffixes.
12871 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12872
12873 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12874
12875 PR bootstrap/47467
12876 * targext.c: Include target files if IN_RTS is defined.
12877
12878 2011-01-26 Richard Guenther <rguenther@suse.de>
12879
12880 PR bootstrap/47467
12881 * targext.c: Include config.h.
12882 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12883 dependency.
12884
12885 2011-01-04 Pascal Obry <obry@adacore.com>
12886 Eric Botcazou <ebotcazou@adacore.com>
12887
12888 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12889
12890 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12891
12892 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12893 end-of-case on the end label and its associated gotos, if any.
12894
12895 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12896
12897 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12898 expressions of the parameter cache within the statement group of
12899 the CICO mechanism.
12900
12901 2011-01-04 Olivier Hainque <hainque@adacore.com>
12902 Eric Botcazou <ebotcazou@adacore.com>
12903
12904 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12905 (set_end_locus_from_node): New function.
12906 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12907 make and the function end_locus.
12908 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12909 for the elaboration subprogram.
12910 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12911 set the end_locus of the expression as well.
12912
12913 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12914
12915 PR ada/47131
12916 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12917 variables that are referenced in exception handlers volatile.
12918
12919
12920 \f
12921 Copyright (C) 2011 Free Software Foundation, Inc.
12922
12923 Copying and distribution of this file, with or without modification,
12924 are permitted in any medium without royalty provided the copyright
12925 notice and this notice are preserved.
12926
12927 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12928 - fix bugs in the description of Source_Trace;
12929 - get rid of UNIT_NAME;
12930
12931 2011-08-02 Javier Miranda <miranda@adacore.com>
12932
12933 * exp_ch9.adb
12934 (Build_Dispatching_Requeue): Adding support for VM targets
12935 since we cannot directly reference the Tag entity.
12936 * exp_sel.adb (Build_K): Adding support for VM targets.
12937 (Build_S_Assignment): Adding support for VM targets.
12938 * exp_disp.adb
12939 (Default_Prim_Op_Position): In VM targets do not restrict availability
12940 of predefined interface primitives to compiling in Ada 2005 mode.
12941 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12942 restricted to compiling in Ada 2005 mode.
12943 (Make_VM_TSD): Generate code that declares and initializes the OSD
12944 record. Needed to support dispatching calls through synchronized
12945 interfaces.
12946 * exp_ch3.adb
12947 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12948 primitives associated with synchronized interfaces.
12949 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12950 primitives associated with synchronized interfaces.
12951
12952 2011-08-02 Yannick Moy <moy@adacore.com>
12953
12954 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12955 statements hidden in SPARK if preceded by the HIDE directive
12956 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12957 exception handlers as hidden in SPARK if preceded by the HIDE directive
12958 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12959 if starting with the HIDE directive
12960 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12961 starting with the HIDE directive; mark the declarations in a private
12962 part as hidden in SPARK if the private part starts with the HIDE
12963 directive
12964 * restrict.adb, restrict.ads
12965 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12966 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12967 argument node belongs to a part which is hidden in SPARK
12968 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12969 parts in SPARK; protect the possibly costly call to
12970 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12971 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12972 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12973 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12974 Tok_SPARK_Hide.
12975 (Scan): recognize special comment starting with '#' and followed by
12976 SPARK keyword "hide" as a HIDE directive.
12977
12978 2011-08-02 Yannick Moy <moy@adacore.com>
12979
12980 * types.ads, erroutc.ads: Minor reformatting.
12981
12982 2011-08-02 Vincent Celier <celier@adacore.com>
12983
12984 * link.c: Add response file support for cross platforms.
12985
12986 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12987
12988 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12989 in an association, set parent field of copy before partial analysis.
12990 * sem_res.adb (Resolve_Slice): create reference to itype only when
12991 expansion is enabled.
12992
12993 2011-08-02 Yannick Moy <moy@adacore.com>
12994
12995 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12996 for new flag denoting which subprogram bodies are in ALFA
12997 * restrict.adb, sem_ch7.adb: Update comment
12998 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12999 sem_ch9.adb, sem_res.adb: Add calls to
13000 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13001 * sem_ch6.adb (Analyze_Function_Return): add calls to
13002 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13003 middle of the body, and extended return.
13004 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13005 False when missing return.
13006 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13007 to True for subprograms whose spec is in ALFA. Remove later on the flag
13008 on the entity used for a subprogram body when there exists a separate
13009 declaration.
13010 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13011 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13012 False, otherwise do nothing.
13013
13014 2011-08-02 Robert Dewar <dewar@adacore.com>
13015
13016 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13017
13018 2011-08-02 Yannick Moy <moy@adacore.com>
13019
13020 * sem_ch4.ads: minor formatting.
13021
13022 2011-08-02 Yannick Moy <moy@adacore.com>
13023
13024 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13025 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13026 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13027 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13028 opt.ads: cleanup of SPARK mode
13029
13030 2011-08-02 Yannick Moy <moy@adacore.com>
13031
13032 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13033 types.
13034 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13035 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13036 * sem_ch3.adb
13037 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13038 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13039 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13040 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13041 types.
13042 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13043 non-static range.
13044 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13045 functions whose return type is not in ALFA.
13046 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13047 specifications.
13048 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13049 parameter's type is not in ALFA.
13050 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13051 types are in ALFA.
13052
13053 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13054
13055 * sem_ch6 (Analyze_Expression_Function): treat the function as
13056 Inline_Always, and introduce a subprogram declaration for it when it is
13057 not a completion.
13058 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13059 expression functions, so that the back-end can determine whether they
13060 can in fact be inlined.
13061 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13062 a function body comes from an expression function.
13063
13064 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13065
13066 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13067 null exclusions to test Can_Never_Be_Null on the anonymous access types
13068 of the formals rather than testing the formals themselves. Exclude this
13069 check in cases where the Old_Formal is marked as a controlling formal,
13070 to avoid issuing spurious errors for bodies completing dispatching
13071 operations (due to the flag not getting set on controlling access
13072 formals in body specs).
13073 (Find_Corresponding_Spec): When checking full and subtype conformance of
13074 subprogram bodies in instances, pass Designated and E in that order, for
13075 consistency with the expected order of the formals (New_Id followed by
13076 Old_Id).
13077
13078 2011-08-02 Robert Dewar <dewar@adacore.com>
13079
13080 * sem_ch8.adb: Minor reformatting.
13081
13082 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13083
13084 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13085 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13086 primitive operations of class-wide actuals.
13087
13088 2011-08-02 Javier Miranda <miranda@adacore.com>
13089
13090 * exp_atag.ads, exp_atag.adb
13091 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13092 since its value is implicitly passed in argument Typ.
13093 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13094 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13095 Build_Common_Dispatching_Select_Statements.
13096
13097 2011-08-02 Robert Dewar <dewar@adacore.com>
13098
13099 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13100 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13101 Minor reformatting.
13102
13103 2011-08-02 Robert Dewar <dewar@adacore.com>
13104
13105 * sem_res.adb: Minor reformatting.
13106 * sem_prag.adb: Minor reformatting.
13107
13108 2011-08-02 Javier Miranda <miranda@adacore.com>
13109
13110 * exp_atag.adb, exp_atags.ads
13111 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13112 by the tagged type Entity. Required to use this routine in the VM
13113 targets since we do not have available the Tag entity in the VM
13114 platforms.
13115 * exp_ch6.adb
13116 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13117 Ada.Tags has not been previously loaded.
13118 * exp_ch7.adb
13119 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13120 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13121 * sem_aux.adb
13122 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13123 view of enclosing scopes. Required to handle enclosing scopes that
13124 are synchronized types whose full view is a task type.
13125 * exp_disp.adb
13126 (Build_VM_TSDs): Minor code improvement to avoid generating and
13127 analyzing lists with empty nodes.
13128 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13129 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13130 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13131 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13132 (Make_Select_Specific_Data_Table): Add support for VM targets.
13133 (Make_VM_TSD): Generate code to initialize the SSD structure of
13134 the TSD.
13135
13136 2011-08-02 Yannick Moy <moy@adacore.com>
13137
13138 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13139 cross-references section in ALI.
13140 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13141 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13142 Sub).
13143 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13144 subprogram or package entity of a node
13145 (Is_Local_Reference_Type): new function returns True for references
13146 selected in local cross-references.
13147 (Lt): function extracted from Lt in Output_References
13148 (Write_Entity_Name): function extracted from Output_References
13149 (Generate_Definition): generate reference with type 'D' for definition
13150 of objects (object declaration and parameter specification), with
13151 appropriate locations and units, for use in local cross-references.
13152 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13153 references of type 'I' for initialization in object definition.
13154 (Output_References): move part of function Lt and procedure
13155 Write_Entity_Name outside of the body. Ignore references of types 'D'
13156 and 'I' introduced for local cross-references.
13157 (Output_Local_References): new procedure to output the local
13158 cross-references sections.
13159 (Lref_Entity_Status): new array defining whether an entity is a local
13160 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13161 with 'I' type when initialization expression is present.
13162 * get_scos.adb, get_scos.ads: Correct comments and typos
13163
13164 2011-08-02 Javier Miranda <miranda@adacore.com>
13165
13166 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13167 the JVM target.
13168 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13169 the JVM target.
13170 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13171 TSD support.
13172
13173 2011-08-02 Vincent Celier <celier@adacore.com>
13174
13175 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13176 (No_Space_Img): New function
13177 (Find_Excluded_Sources): When reading from a file, record the file name
13178 and the line number for each excluded source.
13179 (Mark_Excluded_Sources): When reporting an error, if the excluded
13180 sources were read from a file, include file name and line number in
13181 the error message.
13182
13183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13184
13185 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13186
13187 2011-08-02 Robert Dewar <dewar@adacore.com>
13188
13189 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13190
13191 2011-08-02 Javier Miranda <miranda@adacore.com>
13192
13193 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13194 generation of TSDs to the DOTNET compiler.
13195 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13196 generation of TSDs to the DOTNET compiler.
13197
13198 2011-08-02 Javier Miranda <miranda@adacore.com>
13199
13200 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13201 record of all the tagged types declared inside library level package
13202 declarations, library level package bodies or library level subprograms.
13203 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13204 associated with a given tagged type.
13205 (Build_VM_TSDs): New subprogram.
13206 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13207 compilation units that are subprograms.
13208 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13209 compilation units that are package bodies.
13210 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13211 units that are a package declaration or a package instantiation.
13212 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13213 reorganization to improve the error generated by the frontend when the
13214 function Ada.Tags.Secondary_Tag is not available.
13215 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13216 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13217
13218 2011-08-02 Javier Miranda <miranda@adacore.com>
13219
13220 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13221
13222 2011-08-02 Robert Dewar <dewar@adacore.com>
13223
13224 * s-imenne.ads: Minor reformatting.
13225
13226 2011-08-02 Robert Dewar <dewar@adacore.com>
13227
13228 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13229 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13230 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13231
13232 2011-08-02 Robert Dewar <dewar@adacore.com>
13233
13234 * einfo.ads (Materialize_Entity): Document this is only for renamings
13235 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13236 required debug information in the case where we transform the object
13237 declaration into a renaming declaration.
13238 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13239 object
13240 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13241 Materialize_Entity.
13242
13243 2011-08-02 Robert Dewar <dewar@adacore.com>
13244
13245 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13246 Suppress_Init_Procs.
13247 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13248 Suppress_Initialization/Initialization_Suppressed.
13249 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13250 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13251 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13252 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13253
13254 2011-08-02 Robert Dewar <dewar@adacore.com>
13255
13256 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13257 Minor reformatting.
13258
13259 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13260
13261 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13262 only have inheritable classwide pre/postconditions.
13263
13264 2011-08-02 Javier Miranda <miranda@adacore.com>
13265
13266 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13267 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13268 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13269 checks if the external tag of a type is the same as the external tag
13270 of some other declaration.
13271
13272 2011-08-02 Thomas Quinot <quinot@adacore.com>
13273
13274 * s-taskin.ads: Minor reformatting.
13275
13276 2011-08-02 Emmanuel Briot <briot@adacore.com>
13277
13278 * g-comlin.adb (Display_Help): swap the order in which it prints the
13279 short help and the general usage.
13280
13281 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13282
13283 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13284 the aspect declarations and attach them to the generic copy for
13285 subsequent analysis.
13286 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13287 declarations of the generic tree to the new subprogram declarations.
13288 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13289 conditions that apply to a subprogram instance.
13290
13291 2011-08-02 Robert Dewar <dewar@adacore.com>
13292
13293 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13294
13295 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13296
13297 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13298 private type with a tagged full view is not derived in the immediate
13299 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13300
13301 2011-08-02 Robert Dewar <dewar@adacore.com>
13302
13303 * exp_ch4.adb: Minor reformatting.
13304
13305 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13306
13307 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13308 Ada2012 iterator, the loop will be rewritten during expansion into a
13309 while loop with a cursor and an element declaration. Do not analyze the
13310 body in this case, because if the container is for indefinite types the
13311 actual subtype of the elements will only be determined when the cursor
13312 declaration is analyzed.
13313
13314 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13315
13316 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13317 size/alignment related attributes in CodePeer_Mode.
13318
13319 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13320
13321 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13322 Prepend_Element, since this can result in the operation getting the
13323 wrong slot in the full type's dispatch table if the full type has
13324 inherited operations. The incomplete type's operation will get added
13325 to the proper position in the full type's primitives
13326 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13327 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13328 dispatching operations, since there are cases where nonprimitive
13329 subprograms can get added to the list of incomplete dependents (such
13330 as subprograms in nested packages).
13331 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13332 private part when determining whether to add a primitive with a
13333 parameter of a tagged incomplete type to the Private_Dependents list.
13334 Such primitives can also occur in the visible part, and should not have
13335 been excluded from being private dependents.
13336 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13337 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13338 list of a Taft-amendment incomplete type is a primitive before issuing
13339 an error that the full type must appear in the same unit. There are
13340 cases where nonprimitives can be in the list (such as subprograms in
13341 nested packages).
13342 * sem_disp.adb (Derives_From): Use correct condition for checking that
13343 a formal's type is derived from the type of the corresponding formal in
13344 the parent subprogram (the condition was completely wrong). Add
13345 checking that was missing for controlling result types being derived
13346 from the result type of the parent operation.
13347
13348 2011-08-02 Yannick Moy <moy@adacore.com>
13349
13350 * errout.adb (First_Node): minor renaming
13351 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13352 first node.
13353
13354 2011-08-02 Yannick Moy <moy@adacore.com>
13355
13356 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13357 before accessing operands.
13358 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13359 decide whether an initialization expression respects SPARK rules, as
13360 the plain node is the expanded one. This allows for more valid warnings
13361 to be issued.
13362 * gnat_rm.texi: Minor update.
13363
13364 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13365
13366 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13367 previous change.
13368
13369 2011-08-02 Robert Dewar <dewar@adacore.com>
13370
13371 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13372
13373 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13374
13375 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13376 loop statements and the element renaming declaration with a block when
13377 the element type is controlled.
13378
13379 2011-08-02 Yannick Moy <moy@adacore.com>
13380
13381 * sinfo.ads: Minor formatting.
13382
13383 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13384
13385 * sem_aggr.adb (Add_Association): if the association has a box and no
13386 expression, use the Sloc of the aggregate itself for the new
13387 association.
13388 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13389 the Original_Node.
13390
13391 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13392
13393 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13394 When a container is provided via a function call, generate a renaming
13395 of the function result. This avoids the creation of a transient scope
13396 and the premature finalization of the container.
13397 * exp_ch7.adb (Is_Container_Cursor): Removed.
13398 (Wrap_Transient_Declaration): Remove the supression of the finalization
13399 of the list controller when the declaration denotes a container cursor,
13400 it is not needed.
13401
13402 2011-08-02 Yannick Moy <moy@adacore.com>
13403
13404 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13405 node is from source, instead of the original node being from source.
13406 * sem_aggr.adb
13407 (Resolve_Array_Aggregate): refine the check for a static expression, to
13408 recognize also static ranges
13409 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13410 Array_Type_Declaration): postpone the test for the type being a subtype
13411 mark after the type has been resolved, so that component-selection and
13412 expanded-name are discriminated.
13413 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13414 to distinguish the case of an iteration scheme, so that an error is
13415 issed on a non-static range in SPARK except in an iteration scheme.
13416 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13417 In_Iter_Schm = True.
13418 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13419 user-defined operators so that they are allowed in renaming
13420 * sem_ch8.adb
13421 (Find_Selected_Component): refine the check for prefixing of operators
13422 so that they are allowed in renaming. Move the checks for restrictions
13423 on selector name after analysis discriminated between
13424 component-selection and expanded-name.
13425 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13426 concatenation argument of string type if it is static.
13427 * sem_util.adb, sem_util.ads
13428 (Check_Later_Vs_Basic_Declarations): add a new function
13429 Is_Later_Declarative_Item to decice which declarations are allowed as
13430 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13431 mode, add that renamings are considered as later items.
13432 (Enclosing_Package): new function to return the enclosing package
13433 (Enter_Name): correct the rule for homonyms in SPARK
13434 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13435 from source (result of expansion) to avoid issuing wrong warnings.
13436
13437 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13438
13439 * errout.adb: On anything but an expression First_Node returns its
13440 argument.
13441
13442 2011-08-02 Pascal Obry <obry@adacore.com>
13443
13444 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13445
13446 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13447
13448 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13449 Set the associated loop as the related expression of internally
13450 generated cursors.
13451 * exp_ch7.adb (Is_Container_Cursor): New routine.
13452 (Wrap_Transient_Declaration): Supress the finalization of the list
13453 controller when the declaration denotes a container cursor.
13454
13455 2011-08-02 Yannick Moy <moy@adacore.com>
13456
13457 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13458 command line now.
13459 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13460 expression is a simple expression. This check cannot be performed in
13461 the semantics, so just drop it.
13462 (P_Index_Or_Discriminant_Constraint): move check that the index or
13463 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13464 semantics. Other cases were previously checked in the semantics.
13465 * par-ch4.adb (P_Name): move checks that a selector name is not
13466 character literal or an operator symbol to Find_Selected_Component in
13467 the semantics
13468 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13469 declarations are not placed after later declarations in a separate
13470 procedure in Sem_Util (possibly not the best choice?), to be used both
13471 during parsing, for Ada 83 mode, and during semantic analysis, for
13472 SPARK mode.
13473 * par-endh.adb (Check_End): move check that end label is not missing
13474 to Process_End_Label in the semantics
13475 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13476 the special case for SPARK restriction
13477 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13478 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13479 parameter Force to issue the error message even on internal node (used
13480 for generated end label). Call Check_Restriction to check when an error
13481 must be issued. In SPARK mode, issue an error message even if the
13482 restriction is not set.
13483 (Check_Restriction): new procedure with an additional out parameter to
13484 inform the caller that a message has been issued
13485 * sem_aggr.adb: Minor modification of message
13486 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13487 instead of issuing an error message directly
13488 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13489 declarations are not placed after later declarations, by calling
13490 Check_Later_Vs_Basic_Declarations
13491 (Analyze_Subtype_Declaration): move here the check that an index or
13492 discriminant constraint must be a subtype mark. Change the check that
13493 a subtype of String must start at one so that it works on subtype marks.
13494 * sem_ch4.adb (Analyze_Call): move here the check that a named
13495 association cannot follow a positional one in a call
13496 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13497 instead of issuing an error message directly
13498 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13499 selector name is not a character literal or an operator symbol. Move
13500 here the check that the prefix of an expanded name cannot be a
13501 subprogram or a loop statement.
13502 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13503 procedure called from parsing and semantics to check that basic
13504 declarations are not placed after later declarations
13505 (Process_End_Label): move here the check that end label is not missing
13506
13507 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13508
13509 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13510 representation clause in codepeer mode, since it confuses CodePeer and
13511 does not bring useful info.
13512
13513 2011-08-02 Ed Falis <falis@adacore.com>
13514
13515 * init.c: initialize fp hw on MILS.
13516
13517 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13518
13519 * errout.adb (First_Node): for bodies, return the node itself (small
13520 optimization). For other nodes, do not check source_unit if the node
13521 comes from Standard.
13522
13523 2011-08-02 Robert Dewar <dewar@adacore.com>
13524
13525 * exp_ch3.adb: Minor comment additions.
13526 * sem_ch13.adb: Minor reformatting.
13527
13528 2011-08-02 Pascal Obry <obry@adacore.com>
13529
13530 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13531
13532 2011-08-02 Robert Dewar <dewar@adacore.com>
13533
13534 * sem_attr.adb: Minor reformatting.
13535
13536 2011-08-02 Robert Dewar <dewar@adacore.com>
13537
13538 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13539 (Has_Default_Component_Value): Removed
13540 * einfo.ads Comment updates
13541 (Has_Default_Aspect): Replaces Has_Default_Value
13542 (Has_Default_Component_Value): Removed
13543 * exp_ch13.adb
13544 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13545 * exp_ch3.adb
13546 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13547 (Get_Simple_Init_Val): Handle Default_Value aspect
13548 (Needs_Simple_Initialization): Handle Default_Value aspect
13549 * exp_ch3.ads: Needs_Simple_Initialization
13550 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13551 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13552 * sem_ch13.adb
13553 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13554 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13555 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13556
13557 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13558
13559 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13560 package containing iteration primitives.
13561 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13562
13563 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13564
13565 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13566 "of", pre-analyze expression in case it is a function call with
13567 finalization actions that must be placed ahead of the loop.
13568 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13569 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13570
13571 2011-08-02 Geert Bosch <bosch@adacore.com>
13572
13573 * cstand.adb (Create_Float_Types): Only consider C's long double for
13574 Long_Long_Float, in addition to double.
13575
13576 2011-08-02 Robert Dewar <dewar@adacore.com>
13577
13578 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13579 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13580 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13581 Minor reformatting.
13582
13583 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13584
13585 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13586 indexed component.
13587
13588 2011-08-02 Javier Miranda <miranda@adacore.com>
13589
13590 * einfo.ads, einfo.adb
13591 (Original_Access_Type): Move this attribute to Node26 since there was
13592 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13593 which causes conflicts and breaks the generation of the .NET compiler.
13594 (Interface_Name): Add missing documentation on JGNAT only uses of
13595 this attribute.
13596
13597 2011-08-02 Geert Bosch <bosch@adacore.com>
13598
13599 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13600 (Find_Back_End_Float_Type): Likewise
13601 (Create_Back_End_Float_Types): Likewise
13602 (Create_Float_Types): Likewise
13603 (Register_Float_Type): Likewise
13604 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13605 Nlist and split out type selection in new local Find_Base_Type function.
13606 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13607 Nlist
13608 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13609
13610 2011-08-02 Robert Dewar <dewar@adacore.com>
13611
13612 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13613 alpha order).
13614 * opt.ads: Minor comment change.
13615 * sem_ch12.adb: Minor code reorganization.
13616
13617 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13618
13619 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13620 subtype's list of rep items to the list on the full subtype in the case
13621 where the lists are the same.
13622
13623 2011-08-02 Geert Bosch <bosch@adacore.com>
13624
13625 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13626 using the one from System.Strings, which also deallocates all strings.
13627
13628 2011-08-02 Geert Bosch <bosch@adacore.com>
13629
13630 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13631 function.
13632 * gcc-interface/Make-lang.in: Update dependencies.
13633
13634 2011-08-02 Olivier Hainque <hainque@adacore.com>
13635
13636 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13637 end_locus.
13638
13639 2011-08-02 Javier Miranda <miranda@adacore.com>
13640
13641 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13642 associated with anonymous access to subprograms.
13643
13644 2011-08-02 Geert Bosch <bosch@adacore.com>
13645
13646 * opt.ads
13647 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13648 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13649 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13650 (Add_Symbol_Definition): Move to switch-c.adb
13651 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13652 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13653 (Add_Symbol_Definition): Move to switch-c.adb.
13654 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13655 * sem_warn.adb
13656 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13657 Move to warnsw.adb.
13658 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13659 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13660 Move to warnsw.adb.
13661 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13662 (Add_Symbol_Definition): Moved from Prepcomp.
13663 * switch-c.ads: Update copyright notice. Use String_List instead of
13664 Argument_List, removing dependency on System.OS_Lib.
13665
13666 2011-08-02 Yannick Moy <moy@adacore.com>
13667
13668 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13669 mode on initialization expression which does not respect SPARK
13670 restrictions.
13671 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13672 if the tree referenced by its argument represents an initialization
13673 expression in SPARK, suitable for initializing an object in an object
13674 declaration.
13675
13676 2011-08-02 Javier Miranda <miranda@adacore.com>
13677
13678 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13679 internally generated access to subprogram with its associated protected
13680 subprogram type.
13681 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13682
13683 2011-08-02 Geert Bosch <bosch@adacore.com>
13684
13685 * cstand.adb (Register_Float_Type): Print information about type to
13686 register, if the Debug_Flag_Dot_B is set.
13687 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13688 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13689 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13690 with a requested precision of more than Max_Digits digits and no more
13691 than Max_Base_Digits digits, if a range specification is present and the
13692 Predefined_Float_Types list has a suitable type to derive from.
13693 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13694 case of type completion with pragma Import
13695 * sem_prag.adb
13696 (Process_Import_Predefined_Type): Processing to complete a type
13697 with pragma Import. Currently supports floating point types only.
13698 (Set_Convention_From_Pragma): Do nothing without underlying type.
13699 (Process_Convention): Guard against absence of underlying type,
13700 which may happen when importing incomplete types.
13701 (Process_Import_Or_Interface): Handle case of importing predefined
13702 types. Tweak error message.
13703
13704 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13705
13706 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13707 functions to previous change. Reorganize code slightly.
13708
13709 2011-08-02 Geert Bosch <bosch@adacore.com>
13710
13711 * back_end.ads (Register_Type_Proc): New call back procedure type for
13712 allowing the back end to provide information about available types.
13713 (Register_Back_End_Types): New procedure to register back end types.
13714 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13715 available types.
13716 * cstand.adb (Back_End_Float_Types): New list for floating point types
13717 supported by the back end.
13718 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13719 (Copy_Float_Type): New procedure to make new copies of predefined types.
13720 (Register_Float_Type): New call back procedure to populate the BEFT list
13721 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13722 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13723 (Create_Float_Types): New procedure to create entities for floating
13724 point types predefined in Standard, and put these and any remaining
13725 BEFTs on the Predefined_Float_Types list.
13726 * stand.ads (Predefined_Float_Types): New list for predefined floating
13727 point types that do not have declarations in package Standard.
13728
13729 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13730
13731 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13732 entity node for the unit containing the parameter.
13733 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13734 (Add_Inlined_Subprogram): Likewise.
13735 * gcc-interface/Make-lang.in: Update dependencies.
13736
13737 2011-08-02 Thomas Quinot <quinot@adacore.com>
13738
13739 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13740 suitable value.
13741
13742 2011-08-02 Geert Bosch <bosch@adacore.com>
13743
13744 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13745
13746 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13747
13748 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13749 computed value of Base_Type.
13750
13751 2011-08-02 Yannick Moy <moy@adacore.com>
13752
13753 * restrict.adb (Check_Restriction): issue an error for any use of
13754 class-wide, even if the No_Dispatch restriction is not set.
13755 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13756 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13757 when completing a private extension, the type named in the private part
13758 is not the same as that named in the visible part.
13759 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13760 of an inherited primitive operations of a tagged type or type extension
13761 that returns the tagged type.
13762 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13763 function which returns True for an implicit operation inherited by the
13764 derived type declaration for the argument type.
13765 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13766 order.
13767
13768 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13769
13770 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13771 Process_Bounds, to perform analysis with expansion of a range or an
13772 expression that is the iteration scheme for a loop.
13773 (Analyze_Iterator_Specification): If domain of iteration is given by a
13774 function call with a controlled result, as is the case if call returns
13775 a predefined container, ensure that finalization actions are properly
13776 generated.
13777 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13778
13779 2011-08-02 Javier Miranda <miranda@adacore.com>
13780
13781 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13782 * gcc-interface/Make-lang.in: Update dependencies.
13783
13784 2011-08-02 Javier Miranda <miranda@adacore.com>
13785
13786 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13787 determine if the analysis is performed using N or Original_Node (N).
13788 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13789 functionality of routine Is_Variable avoids code duplication.
13790 * checks.adb (Determine_Range): Handle temporaries generated by
13791 Remove_Side_Effects.
13792
13793 2011-08-02 Javier Miranda <miranda@adacore.com>
13794
13795 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13796 expansion of the condition. Required since the previous analysis was
13797 done with expansion disabled (see Resolve_Quantified_Expression) and
13798 hence checks were not inserted and record comparisons have not been
13799 expanded.
13800
13801 2011-08-02 Ed Falis <falis@adacore.com>
13802
13803 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13804 Update header.
13805
13806 2011-08-02 Bob Duff <duff@adacore.com>
13807
13808 * opt.ads: Minor comment fix.
13809
13810 2011-08-02 Bob Duff <duff@adacore.com>
13811
13812 * sem_ch12.adb (Analyze_Package_Instantiation,
13813 Analyze_Subprogram_Instantiation): Turn off style checking while
13814 analyzing an instance. Whatever style checks that apply to the generic
13815 unit should apply, so it makes no sense to apply them in an instance.
13816 This was causing trouble when compiling an instance of a runtime
13817 unit that violates the -gnatyO switch.
13818 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13819 one of the two case statements, causing spurious errors.
13820
13821 2011-08-02 Robert Dewar <dewar@adacore.com>
13822
13823 * uname.adb: Minor reformatting.
13824 * gnatcmd.adb: Minor reformatting.
13825 * exp_attr.adb: Minor reformatting.
13826
13827 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13828
13829 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13830 No_Dispatching_Calls, do not look for the Assign primitive, because
13831 predefined primitives are not created in this case.
13832
13833 2011-08-02 Bob Duff <duff@adacore.com>
13834
13835 * stylesw.ads: Minor comment fixes.
13836
13837 2011-08-02 Robert Dewar <dewar@adacore.com>
13838
13839 * freeze.adb (Add_To_Result): New procedure.
13840
13841 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13842
13843 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13844 time, if the specific run-time routines for handling streams of strings
13845 are not available, use the default mechanism.
13846
13847 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13848
13849 * s-regpat.ads: Fix typo.
13850
13851 2011-08-02 Vincent Celier <celier@adacore.com>
13852
13853 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13854 not null, call it to create the in memory config project file without
13855 parsing an existing default config project file.
13856
13857 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13858
13859 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13860
13861 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13862
13863 * sem_elim.adb: an abstract subprogram does not need an eliminate
13864 pragma for its descendant to be eliminable.
13865
13866 2011-08-02 Ed Falis <falis@adacore.com>
13867
13868 * init.c: revert to handling before previous checkin for VxWorks
13869 * s-intman-vxworks.adb: delete unnecessary declarations related to
13870 using Ada interrupt facilities for handling signals.
13871 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13872 * s-intman-vxworks.ads: Import __gnat_install_handler as
13873 Initialize_Interrupts.
13874 * s-taprop-vxworks.adb: Delete Signal_Mask.
13875 (Abort_Handler): change construction of mask to unblock exception
13876 signals.
13877
13878 2011-08-02 Jerome Guitton <guitton@adacore.com>
13879
13880 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13881 Debug_Raise_Exception before propagation starts.
13882
13883 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13884
13885 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13886 to Restriction_Check_Required.
13887 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13888 * sem_res.adb (Resolve_Call): Likewise.
13889 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13890
13891 2011-08-02 Bob Duff <duff@adacore.com>
13892
13893 * stylesw.ads: Update comment.
13894 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13895 * errout.ads: Remove obsolete comment.
13896
13897 2011-08-02 Javier Miranda <miranda@adacore.com>
13898
13899 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13900 (Set_Is_Safe_To_Reevaluate): new procedure.
13901 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13902 assignment is allowed on safe-to-reevaluate variables.
13903 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13904 temporary created to remove side effects in expressions that use
13905 the secondary stack as safe-to-reevaluate.
13906 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13907 variables that are not true constants.
13908
13909 2011-08-02 Robert Dewar <dewar@adacore.com>
13910
13911 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13912 sem_res.adb, sem_ch6.adb: Minor reformatting.
13913
13914 2011-08-02 Jerome Guitton <guitton@adacore.com>
13915
13916 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13917
13918 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13919
13920 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13921 not set Overridden_Operation if subprogram is an initialization
13922 procedure.
13923
13924 2011-08-02 Yannick Moy <moy@adacore.com>
13925
13926 * par-ch6.adb: Correct obsolete name in comments
13927 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13928 which takes two message arguments (existing function takes one), with
13929 second message used for continuation.
13930 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13931 block statements that originate from a source block statement, not
13932 generated block statements
13933 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13934 symmetry with procedure case
13935 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13936 function to issue an error in formal mode if a package specification
13937 contains more than one tagged type or type extension.
13938 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13939 parameters matching formals of tagged types are objects (or ancestor
13940 type conversions of objects), not general expressions. Issue an error
13941 on view conversions that are not involving ancestor conversion of an
13942 extended type.
13943 (Resolve_Type_Conversion): in formal mode, issue an error on the
13944 operand of an ancestor type conversion which is not an object
13945 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13946 procedure so that it works also for actuals of function calls
13947 (Is_Actual_Tagged_Parameter): new function which determines if its
13948 argument is an actual parameter of a formal of tagged type in a
13949 subprogram call
13950 (Is_SPARK_Object_Reference): new function which determines if the tree
13951 referenced by its argument represents an object in SPARK
13952
13953 2011-08-02 Robert Dewar <dewar@adacore.com>
13954
13955 * sem_ch3.adb: Minor reformatting
13956 Minor comment addition
13957 Minor error msg text change
13958
13959 2011-08-02 Javier Miranda <miranda@adacore.com>
13960
13961 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13962 function. Used to be more precise when we generate a variable plus one
13963 assignment to remove side effects in the evaluation of the Bound
13964 expressions.
13965 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13966 of the bound expression to force its re-analysis and thus expand the
13967 associated transient scope (if required). Code cleanup replacing the
13968 previous code that declared the constant entity by an invocation to
13969 routine Force_Evaluation which centralizes this work in the frontend.
13970
13971 2011-08-02 Robert Dewar <dewar@adacore.com>
13972
13973 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13974 (Base_Type): Now uses improved Is_Base_Type function
13975 * einfo.ads (Base_Type): Inline this function
13976
13977 2011-08-02 Robert Dewar <dewar@adacore.com>
13978
13979 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13980 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13981
13982 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13983
13984 * gcc-interface/Make-lang.in: Update dependencies.
13985 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13986 targets.
13987
13988 2011-08-02 Yannick Moy <moy@adacore.com>
13989
13990 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13991 non-simple expression used in delta constraint
13992 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13993 index constraint which is not a subtype mark
13994 * par.adb: With and use Restrict
13995 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13996 mode on component type which is not a subtype mark and default
13997 expression on component
13998 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13999 of string which does not have a lower index bound equal to 1
14000 (Array_Type_Declaration): issue an error in formal mode on index or
14001 component type which is not a subtype mark, and on aliased keyword on
14002 component
14003 (Derived_Type_Declaration): issue an error in formal mode on interface,
14004 limited or abstract type
14005 (Record_Type_Declaration): issue an error in formal mode on interface
14006 (Record_Type_Definition): issue an error in formal mode on tagged types
14007 and type extensions not declared in the specification of a library unit
14008 package; on null non-tagged record; on variant part
14009
14010 2011-08-02 Vincent Celier <celier@adacore.com>
14011
14012 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14013 not declared for qualified library project when Library_Name is not
14014 declared, but Library_Dir is.
14015
14016 2011-08-02 Robert Dewar <dewar@adacore.com>
14017
14018 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14019 pragmas (affects aspects [Component_]Default_Value
14020 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14021 component type for the resolution
14022
14023 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14024
14025 * einfo.adb (Base_Type): Tune implementation for speed.
14026
14027 2011-08-02 Robert Dewar <dewar@adacore.com>
14028
14029 * freeze.adb: Minor reformatting.
14030
14031 2011-08-02 Thomas Quinot <quinot@adacore.com>
14032
14033 * scos.ads: Update comments.
14034
14035 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14036
14037 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14038 base type, because the parent may be a subtype of a private type whose
14039 convention is established in a private part.
14040
14041 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14042
14043 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14044 statement in a block when the expansion of the return expression has
14045 created a finalization chain.
14046 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14047 with the parent node.
14048 Add N_Extended_Return_Statement to handle the case where a transient
14049 object declaration appears in the Return_Object_Declarations list of
14050 an extended return statement.
14051
14052 2011-08-02 Matthew Gingell <gingell@adacore.com>
14053
14054 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14055 unused parameter 'name'.
14056
14057 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14058
14059 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14060 inherited operation, check whether its alias, which is the source
14061 operastion that it renames, has been marked eliminated.
14062
14063 2011-08-02 Javier Miranda <miranda@adacore.com>
14064
14065 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14066 in-mode parameter whose type is an access type since it can be used to
14067 modify its designated object. Enforce code that handles as safe an
14068 access type that is not access-to-constant but it is the result of a
14069 previous removal of side-effects.
14070 (Remove_Side_Effects): Minor code reorganization of cases which require
14071 no action. Done to incorporate documentation on new cases uncovered
14072 working in this ticket: no action needed if this routine was invoked
14073 too early and the nodes are not yet decorated.
14074 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14075 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14076 were issued with actuals that are implicitly provided by
14077 Force_Evaluation.
14078
14079 2011-08-02 Robert Dewar <dewar@adacore.com>
14080
14081 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14082
14083 2011-08-02 Yannick Moy <moy@adacore.com>
14084
14085 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14086 to issue an error in formal mode on attribute not supported in this mode
14087 (Analyze_Attribute): issue errors on standard attributes not supported
14088 in formal mode.
14089 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14090 comment, and issue error in formal mode on modulus which is not a power
14091 of 2.
14092 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14093 range.
14094 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14095 subtype mark.
14096 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14097 operator on modular type (except 'not').
14098
14099 2011-08-02 Robert Dewar <dewar@adacore.com>
14100
14101 * gnat_rm.texi: Minor reformatting.
14102
14103 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14104
14105 * s-osinte-linux.ads: Minor comment update and reformatting.
14106 * i-cexten.ads: Make this unit pure, as for its parent.
14107 Will allow its usage in more contexts if needed.
14108
14109 2011-08-02 Robert Dewar <dewar@adacore.com>
14110
14111 * s-utf_32.ads: Minor comment fix.
14112
14113 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14114
14115 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14116 operation of a tagged synchronized type, handle the case where the
14117 controlling argument is overloaded.
14118
14119 2011-08-02 Yannick Moy <moy@adacore.com>
14120
14121 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14122 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14123 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14124 SPARK mode and formal verification mode on processing SPARK restriction
14125 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14126 requiring consistency checking.
14127
14128 2011-08-02 Robert Dewar <dewar@adacore.com>
14129
14130 * sem_res.adb: Minor reformatting.
14131
14132 2011-08-02 Robert Dewar <dewar@adacore.com>
14133
14134 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14135 a-cforse.ads: Remove unneeded with of Ada.Containers
14136 Remove commented out pragma Inline's
14137 Move specifications of new subprograms to the actual specs
14138
14139 2011-08-02 Yannick Moy <moy@adacore.com>
14140
14141 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14142 a-cforse.ads: Update comments.
14143
14144 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14145
14146 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14147
14148 2011-08-02 Robert Dewar <dewar@adacore.com>
14149
14150 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14151 a-cforse.ads, a-cofove.ads: Minor reformatting.
14152
14153 2011-08-02 Claire Dross <dross@adacore.com>
14154
14155 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14156 a-cofove.ads: Add comments.
14157
14158 2011-08-02 Yannick Moy <moy@adacore.com>
14159
14160 * gnat_rm.texi: Document formal containers.
14161
14162 2011-08-02 Emmanuel Briot <briot@adacore.com>
14163
14164 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14165 are empty sections.
14166
14167 2011-08-02 Robert Dewar <dewar@adacore.com>
14168
14169 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14170 reformatting.
14171
14172 2011-08-02 Robert Dewar <dewar@adacore.com>
14173
14174 * aspects.adb: New aspects Default_Value and Default_Component_Value
14175 New format of Aspect_Names table checks for omitted entries
14176 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14177 handling of boolean aspects for derived types.
14178 New aspects Default_Value and Default_Component_Value
14179 New format of Aspect_Names table checks for omitted entries
14180 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14181 (Has_Default_Value): New flag
14182 (Has_Default_Component_Value): New flag
14183 (Has_Default_Value): New flag
14184 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14185 table.
14186 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14187 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14188 Default_Value and Default_Component_Value
14189 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14190 New aspects Default_Value and Default_Component_Value
14191 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14192 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14193
14194 2011-08-02 Vincent Celier <celier@adacore.com>
14195
14196 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14197 inherit library kind.
14198
14199 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14200
14201 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14202 Minor reformatting.
14203
14204 2011-08-02 Robert Dewar <dewar@adacore.com>
14205
14206 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14207
14208 2011-08-02 Yannick Moy <moy@adacore.com>
14209
14210 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14211
14212 2011-08-02 Robert Dewar <dewar@adacore.com>
14213
14214 * impunit.adb: Add comment.
14215
14216 2011-08-02 Yannick Moy <moy@adacore.com>
14217
14218 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14219 qualification of aggregates in formal mode
14220 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14221 another aggregate
14222 (Resolve_Aggregate): complete the test that an aggregate is adequately
14223 qualified in formal mode
14224
14225 2011-08-02 Pascal Obry <obry@adacore.com>
14226
14227 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14228 * mlib-prj.adb: Supress warning when compiling binder generated file.
14229 (Build_Library): Supress all warnings when compiling the binder
14230 generated file.
14231
14232 2011-08-02 Yannick Moy <moy@adacore.com>
14233
14234 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14235 from here...
14236 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14237 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14238 Add with/use clauses to make Check_Formal_Restriction visible
14239
14240 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14241
14242 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14243 in-parameters when type of the generic formal is private in the generic
14244 spec and non-private in the body.
14245
14246 2011-08-02 Claire Dross <dross@adacore.com>
14247
14248 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14249 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14250 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14251 * impunit.adb, Makefile.rtl: Take new files into account.
14252
14253 2011-08-02 Robert Dewar <dewar@adacore.com>
14254
14255 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14256 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14257
14258 2011-08-02 Yannick Moy <moy@adacore.com>
14259
14260 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14261 formal mode
14262 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14263 matching static array bounds, taking into account the special case of
14264 string literals
14265 * sem_ch3.adb: Typo in comment.
14266
14267 2011-08-02 Yannick Moy <moy@adacore.com>
14268
14269 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14270 which issues an error in formal mode if its argument node is originally
14271 from source
14272 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14273 has a discriminant specification so that it does not include the case
14274 of derived types
14275 (Derived_Type_Declaration): move here the test that a derived type has a
14276 discriminant specification
14277 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14278 first element of a component association before accessing its choices
14279 (presence of component association is not enough)
14280 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14281 declaration is a library item before accessing the next element in a
14282 list, as library items are not member of lists
14283 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14284 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14285 Check_Formal_Restriction whenever possible.
14286
14287 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14288
14289 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14290 reference when needed.
14291
14292 2011-08-02 Bob Duff <duff@adacore.com>
14293
14294 * gnat_ugn.texi: Fix typo.
14295
14296 2011-08-02 Vincent Celier <celier@adacore.com>
14297
14298 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14299 archive file name. Do not use the full path name of archives for Open
14300 VMS.
14301
14302 2011-08-02 Robert Dewar <dewar@adacore.com>
14303
14304 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14305 Analyze_Aspect_Specifications
14306 * sem_ch13.adb
14307 (Analyze_Aspect_Specifications): New handling for boolean aspects
14308 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14309 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14310 sequence for Analyze_Aspect_Specifications
14311 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14312 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14313
14314 2011-08-02 Robert Dewar <dewar@adacore.com>
14315
14316 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14317 aspects, since these no longer exist.
14318
14319 2011-08-02 Robert Dewar <dewar@adacore.com>
14320
14321 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14322 semicolon, do not try to see if there are aspects following it.
14323 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14324 aspect spec.
14325
14326 2011-08-02 Robert Dewar <dewar@adacore.com>
14327
14328 * sem_ch8.adb, aspects.ads: Minor reformatting.
14329
14330 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14331
14332 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14333 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14334 extracted from...
14335 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14336
14337 2011-08-02 Yannick Moy <moy@adacore.com>
14338
14339 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14340 mode on subprogram declaration outside of package specification, unless
14341 it is followed by a pragma Import
14342 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14343 Access_Type_Declaration): issue error in formal mode on access type
14344 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14345 incomplete type
14346 (Analyze_Object_Declaration): issue error in formal mode on object
14347 declaration which does not respect SPARK restrictions
14348 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14349 declaration which does not respect SPARK restrictions
14350 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14351 error in formal mode on digits or delta constraint
14352 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14353 decimal fixed point type
14354 (Derived_Type_Declaration): issue error in formal mode on derived type
14355 other than type extensions of tagged record types
14356 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14357 with check on access definition
14358 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14359 mode on protected definition.
14360 (Analyze_Task_Definition): issue error in formal mode on task definition
14361
14362 2011-08-02 Robert Dewar <dewar@adacore.com>
14363
14364 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14365
14366 2011-08-02 Javier Miranda <miranda@adacore.com>
14367
14368 * sem_ch6.adb (Can_Override_Operator): New function.
14369 (Verify_Overriding_Indicator): Add missing code to check overriding
14370 indicator in operators. Fixes regression.
14371 (Check_Overriding_Indicator): Minor reformating after replacing the
14372 code that evaluates if the subprogram can override an operator by
14373 invocations to the above new function.
14374 * einfo.adb
14375 (Write_Field26_Name): Add missing code to ensure that, following
14376 the documentation in einfo.ads, this field is not shown as attribute
14377 "Static_Initialization" on non-dispatching functions.
14378
14379 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14380
14381 * sem_res.adb (Resolve_Call): A call to
14382 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14383 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14384 i.e., when the second parameter is of type Time_Span.
14385
14386 2011-08-02 Vincent Celier <celier@adacore.com>
14387
14388 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14389 with an archive instead of -L<library dir> -l<library name>.
14390
14391 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14392
14393 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14394 mark the base types In_Use in addition to making the operations
14395 use_visible.
14396
14397 2011-08-02 Ed Falis <falis@adacore.com>
14398
14399 * init.c: add and setup __gnat_signal_mask for the exception signals
14400 * s-inmaop-vxworks.adb: new file.
14401 * s-intman-vxworks.adb: remove unnecessary initializations and
14402 simplify remaining
14403 * s-intman-vxworks.ads: remove unnecessary variable
14404 * s-taprop-vxworks.adb: simplify signal initialization
14405
14406 2011-08-02 Robert Dewar <dewar@adacore.com>
14407
14408 * sem_ch8.adb: Minor code reorganization, comment updates.
14409
14410 2011-08-02 Robert Dewar <dewar@adacore.com>
14411
14412 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14413 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14414 here from Sem_Res.
14415 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14416 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14417
14418 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14419
14420 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14421 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14422 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14423 use_type_clauses, to handle more efficiently use_type and use_all_type
14424 constructs.
14425 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14426 Ada2012 Use_All_Type clause.
14427 (Use_Class_Wide_Operations): new procedure.
14428
14429 2011-08-02 Robert Dewar <dewar@adacore.com>
14430
14431 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14432 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14433 expression to expression function.
14434
14435 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14436
14437 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14438 if types are compatible.
14439
14440 2011-08-02 Yannick Moy <moy@adacore.com>
14441
14442 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14443 returns True if its argument array types have same dimension and same
14444 static bounds at each index.
14445 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14446 OUT or IN OUT paramaters which are not view conversions in SPARK.
14447 (Resolve_Arithmetic_Op): issue an error in formal mode on
14448 multiplication or division with operands of fixed point types which are
14449 not qualified or explicitly converted.
14450 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14451 Boolean or array type (except String) operands.
14452 (Resolve_Equality_Op): issue an error in formal mode on equality
14453 operators for array types other than String with non-matching static
14454 bounds.
14455 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14456 for array types with non-matching static bounds. Factorize the code in
14457 Matching_Static_Array_Bounds.
14458 (Resolve_Qualified_Expression): issue an error in formal mode on
14459 qualified expressions for array types with non-matching static bounds.
14460 (Resolve_Type_Conversion): issue an error in formal mode on type
14461 conversion for array types with non-matching static bounds
14462
14463 2011-08-02 Robert Dewar <dewar@adacore.com>
14464
14465 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14466
14467 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14468
14469 * par-ch9.adb: save location of entry for proper error message.
14470
14471 2011-08-02 Javier Miranda <miranda@adacore.com>
14472
14473 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14474 (Use_Full_View) which permits this routine to climb through the
14475 ancestors using the full-view of private parents.
14476 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14477 Use_Full_View to true in calls to Is_Ancestor.
14478 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14479 true in call to Is_Ancestor.
14480 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14481 Use_Full_View to true in call to Is_Ancestor.
14482 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14483 call to Is_Ancestor.
14484 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14485 Use_Full_View to true in calls to Is_Ancestor.
14486 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14487 Make_Select_Specific_Data_Table, Register_Primitive,
14488 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14489 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14490 to true in call to Is_Ancestor.
14491 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14492 Use_Full_View to true in calls to Is_Ancestor.
14493 * exp_cg.adb
14494 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14495 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14496
14497 2011-08-02 Robert Dewar <dewar@adacore.com>
14498
14499 * gnat_rm.texi: Minor reformatting.
14500 * sem_prag.adb: Minor reformatting.
14501
14502 2011-08-02 Tristan Gingold <gingold@adacore.com>
14503
14504 * vms_data.ads: Add VMS qualifier for -gnateP.
14505
14506 2011-08-02 Robert Dewar <dewar@adacore.com>
14507
14508 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14509 * par-ch7.adb (P_Package): Proper placement of aspects for package
14510 decl/instantiation.
14511 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14512 (End_Statements): Add Is_Sloc parameterr
14513 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14514 (Check_End): Ad Is_Sloc parameter
14515 (End_Statements): Add Is_Sloc parameterr
14516
14517 2011-08-02 Vincent Celier <celier@adacore.com>
14518
14519 * ug_words: Add VMS qualifier equivalent to -gnateP:
14520 /SYMBOL_PREPROCESSING.
14521
14522 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14523
14524 * gnat-style.texi: For hexadecimal numeric literals the typical
14525 grouping of digits is 4 to represent 2 bytes.
14526 A procedure spec which is split into several lines is indented two
14527 characters.
14528
14529 2011-08-02 Yannick Moy <moy@adacore.com>
14530
14531 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14532 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14533 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14534 properly qualified
14535 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14536 choice in array aggregate
14537 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14538 mark as ancestor
14539 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14540 positional and named aggregate for record, or others in record
14541 aggregate, or multiple choice in record aggregate
14542 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14543 array operands to logical operations AND, OR and XOR do not have the
14544 same static lower and higher bounds
14545 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14546
14547 2011-08-01 Robert Dewar <dewar@adacore.com>
14548
14549 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14550 Replaces Last_Source_Node_In_Sequence.
14551 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14552 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14553 parens and blank in string (this was inconsistently implemented).
14554 * errout.ads
14555 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14556 blank in string (this was inconsistently implemented).
14557 * gnat1drv.adb
14558 (Set_Global_Switches): Set formal mode switches appropriately
14559 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14560 * par-prag.adb
14561 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14562 call Set_Error_Msg_Lang to set "spark" as language name.
14563 * par.adb: Remove unnecessary call to set formal language for errout
14564 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14565 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14566 name.
14567 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14568 calls to it, moved after resolution so that types are known
14569 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14570 result of concatenation is not of type String
14571 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14572 concatenation is not properly restricted
14573 * gnat_rm.texi: Add doc on pragma Spark_95.
14574 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14575 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14576 * gcc-interface/Make-lang.in: Update dependencies.
14577
14578 2011-08-01 Javier Miranda <miranda@adacore.com>
14579
14580 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14581 condition that detects if the overridden operation must replace an
14582 existing entity.
14583
14584 2011-08-01 Javier Miranda <miranda@adacore.com>
14585
14586 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14587 code declarations inserted by Insert_Actions in each alternative of the
14588 N_Case_Expression node.
14589
14590 2011-08-01 Robert Dewar <dewar@adacore.com>
14591
14592 * sem_ch6.adb: Minor code reorganization.
14593 * sem_util.adb: Minor reformatting.
14594
14595 2011-08-01 Pascal Obry <obry@adacore.com>
14596
14597 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14598 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14599
14600 2011-08-01 Yannick Moy <moy@adacore.com>
14601
14602 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14603 literal or operator symbol which is prefixed
14604 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14605 mode on access attributes.
14606 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14607 that concatenation operands are properly restricted in formal mode
14608 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14609 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14610 result of the concatenation has a type different from String.
14611 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14612 Analyze_Quantified_Expression, Analyze_Slice,
14613 Analyze_Null): issue an error in formal mode on unsupported constructs
14614 * sem_ch5.adb
14615 (Analyze_Block_Statement): only issue error on source block statement
14616 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14617 function which returns the last node in a list of nodes for which
14618 Comes_From_Source returns True, if any
14619 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14620 Last_Source_Node_In_Sequence
14621 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14622 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14623 mode on unsupported constructs
14624 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14625 rest of the actions may be needed later on since the error is marked as
14626 not serious.
14627 * sinfo.ads: Typos in comments.
14628
14629 2011-08-01 Pascal Obry <obry@adacore.com>
14630
14631 * projects.texi: Minor editing.
14632
14633 2011-08-01 Yannick Moy <moy@adacore.com>
14634
14635 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14636 insertion character ~~
14637 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14638 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14639 with insertion character ~~
14640 (Set_Msg_Text): treat insertion character ~~
14641 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14642 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14643 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14644 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14645 errors related to the formal language restriction not serious
14646 (insertion character |).
14647 * par.adb (Par): set formal language for error messages if needed
14648 * sem_ch6.adb (Check_Missing_Return): take into account possible
14649 generated statements at the end of the function
14650 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14651 enumeration value to define a new pragma SPARK_95
14652 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14653 SPARK_Version): new type and variables to store the SPARK version
14654 (none by default).
14655 (SPARK_Mode): return True when SPARK_Version is set
14656 * par-prag.adb: Correct indentation
14657 (Prag): take Pragma_SPARK_95 into account
14658 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14659 into account.
14660
14661 2011-08-01 Robert Dewar <dewar@adacore.com>
14662
14663 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14664 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14665 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14666
14667 2011-08-01 Pascal Obry <obry@adacore.com>
14668
14669 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14670 Target_Name to Get_Path call.
14671 (Parse_Single_Project): Likewise.
14672 (Post_Parse_Context_Clause): Likewise.
14673 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14674 Call Initialise_Project_Path with the proper Target_Name.
14675 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14676 search path.
14677 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14678 with the proper Target_Name.
14679 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14680 Part.Parse routine.
14681 (Parse_Project_And_Apply_Config): Likewise.
14682 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14683 This is fine as this part of the code is supporting only native
14684 compilation.
14685 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14686 is fine as this part of the code is supporting only native compilation.
14687
14688 2011-08-01 Yannick Moy <moy@adacore.com>
14689
14690 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14691 of homonym, unless the homonym is one of the cases allowed in SPARK
14692 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14693 package declaration occurring after a body.
14694
14695 2011-08-01 Robert Dewar <dewar@adacore.com>
14696
14697 * checks.adb, exp_ch4.adb: Minor reformatting.
14698
14699 2011-08-01 Javier Miranda <miranda@adacore.com>
14700
14701 * einfo.ads (Access_Disp_Table): Fix documentation.
14702 (Dispatch_Table_Wrappers): Fix documentation.
14703
14704 2011-08-01 Pascal Obry <obry@adacore.com>
14705
14706 * prj-env.adb, prj-env.ads: Minor reformatting.
14707
14708 2011-08-01 Yannick Moy <moy@adacore.com>
14709
14710 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14711 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14712 procedures out of these packages.
14713 * errout.ads, errout.adb
14714 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14715 procedures in of this package
14716 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14717 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14718 on misplaced later vs initial declarations, like in Ada 83
14719 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14720 formal mode on attribute of private type whose full type declaration
14721 is not visible
14722 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14723 package declaration inside a package specification
14724 (Analyze_Full_Type_Declaration): issue error in formal mode on
14725 controlled type or discriminant type
14726 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14727 user-defined operator means that it should come from the source
14728 (New_Overloaded_Entity): issue error in formal mode on overloaded
14729 entity.
14730 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14731
14732 2011-08-01 Thomas Quinot <quinot@adacore.com>
14733
14734 * atree.adb: Minor reformatting.
14735 * checks.adb: Minor reformatting.
14736
14737 2011-08-01 Vincent Celier <celier@adacore.com>
14738
14739 * s-parame-vms-ia64.ads: Fix typo in comment
14740 Minor reformatting
14741 * s-parame-vms-restrict.ads: Removed, unused.
14742
14743 2011-08-01 Javier Miranda <miranda@adacore.com>
14744
14745 * exp_ch3.adb
14746 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14747 * sem_ch3.adb
14748 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14749 * sem_ch3.ads, sem_ch3.adb
14750 (Is_Constant_Bound): New extended version of the subprogram that was
14751 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14752 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14753 * sem_aux.ads (Constant_Value): Fix typo in comment.
14754 * checks.adb (Generate_Index_Checks): New implementation which, for
14755 array objects with constant bounds, generates the runtime check
14756 referencing the bounds of the array type. For other cases this routine
14757 provides its previous behavior obtaining such values from the array
14758 object.
14759 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14760 parent type.
14761 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14762 we cannot have semantic interpretations of the new node.
14763
14764 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14765
14766 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14767 expressions.
14768
14769 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14770
14771 * sem_ch8.adb: Minor code editing.
14772 * s-vxwext.adb: Remove trailing space.
14773 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14774 consistency with other files.
14775
14776 2011-08-01 Thomas Quinot <quinot@adacore.com>
14777
14778 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14779
14780 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14781
14782 * par-ch10.adb: reject parameterized expressions as compilation unit.
14783 * sem_ch4.adb: handle properly conditional expression with overloaded
14784 then_clause and no else_clause.
14785
14786 2011-08-01 Tristan Gingold <gingold@adacore.com>
14787
14788 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14789 like done by System.Aux_DEC.
14790 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14791
14792 2011-08-01 Yannick Moy <moy@adacore.com>
14793
14794 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14795 missing label at end of declaration (subprogram or package)
14796 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14797 of positional and named parameter association
14798 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14799 Error_Msg_SP which adds a prefix to the error message giving the name
14800 of the formal language analyzed
14801 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14802 access result type in subprogram, unconstrained array as result type,.
14803 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14804 procedure
14805 * sem_ch8.adb: Code clean up.
14806
14807 2011-08-01 Javier Miranda <miranda@adacore.com>
14808
14809 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14810 * einfo.ads (Access_Disp_Table): Fix documentation.
14811 (Dispatch_Table_Wrappers): Fix documentation.
14812 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14813 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14814 to enforce the documentation of this attribute.
14815 (Set_Is_Interface): Cleanup the assertion.
14816 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14817 the Underlying_Type entity before reading attribute Access_Disp_Table.
14818 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14819 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14820 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14821 the Underlying_Type entity before reading attribute Access_Disp_Table.
14822 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14823 Locate the Underlying_Type entity before reading attribute
14824 Access_Disp_Table.
14825
14826 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14827
14828 * s-poosiz.ads: Additional overriding indicators.
14829
14830 2011-08-01 Yannick Moy <moy@adacore.com>
14831
14832 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14833 formal mode.
14834 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14835 parameter specification does not include a subtype mark.
14836 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14837 formal mode on abstract subprogram.
14838 (Analyze_Subprogram_Specification): issue error in formal mode on
14839 user-defined operator.
14840 (Process_Formals): issue error in formal mode on access parameter and
14841 default expression.
14842 * sem_ch9.adb (Analyze_Abort_Statement,
14843 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14844 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14845 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14846 Analyze_Requeue, Analyze_Selective_Accept,
14847 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14848 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14849 issue error in formal mode on user-defined raise statement.
14850
14851 2011-08-01 Thomas Quinot <quinot@adacore.com>
14852
14853 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14854 declaration being hidden when overriding an implicit inherited
14855 subprogram.
14856 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14857 (-gnats), do not complain about a source file that contains only a
14858 pragma No_Body.
14859
14860 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14861
14862 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14863 variable if already set.
14864
14865 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14866
14867 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14868 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14869 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14870 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14871 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14872 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14873 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14874 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14875 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14876 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14877 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14878 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14879 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14880 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14881 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14882 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14883 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14884 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14885 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14886 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14887 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14888 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14889 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14890 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14891 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14892 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14893 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14894 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14895 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14896 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14897 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14898 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14899 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14900 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14901 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14902 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14903 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14904 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14905 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14906 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14907 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14908 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14909 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14910 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14911 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14912 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14913 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14914 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14915 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14916 Use GNAT instead of GNARL.
14917
14918 2011-08-01 Bob Duff <duff@adacore.com>
14919
14920 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14921 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14922 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14923 reformatting.
14924
14925 2011-08-01 Yannick Moy <moy@adacore.com>
14926
14927 * debug.adb (d.D) reverve flag for the SPARK mode
14928 (d.E) reverve flag for SPARK generation mode
14929 (d.F) reverve flag for Why generation mode
14930 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14931 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14932 functions which return True when the corresponding modes are set
14933 (Formal_Language): return "spark" or "alfa" when in formal verification
14934 mode.
14935 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14936 Error_Msg to prefix the error message with a tag giving the formal
14937 language
14938 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14939 message with a tag giving the formal language
14940 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14941 block statement
14942 (Analyze_Case_Statement): issue error in formal mode on case statement
14943 with a single "others" case alternative
14944 (Analyze_Exit_Statement): issue errors in formal mode on exit
14945 statements which do not respect SPARK restrictions
14946 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14947 (Check_Unreachable_Code): always issue an error (not a warning) in
14948 formal mode on unreachable code (concerns both code after an infinite
14949 loop and after an unconditional jump, both not allowed in SPARK)
14950 * sem_ch6.adb (Analyze_Return_Statement): add call to
14951 Set_Return_Present for a procedure containing a return statement
14952 (already done for functions in Analyze_Function_Return)
14953 (Analyze_Function_Return): issue error in formal mode on extended
14954 return or if return is not last statement in function
14955 (Check_Missing_Return): issue error in formal mode if function does
14956 not end with return or if procedure contains a return
14957 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14958 function to detect if there is an inner scope of its parameter S which
14959 is a loop.
14960
14961 2011-08-01 Thomas Quinot <quinot@adacore.com>
14962
14963 * sem_ch6.ads: Minor reformatting.
14964
14965 2011-08-01 Javier Miranda <miranda@adacore.com>
14966
14967 * sem_util.adb (Abstract_Interface_List): Complete condition when
14968 processing private type declarations to avoid reading unavailable
14969 attribute.
14970 (Is_Synchronized_Tagged_Type): Complete condition when processing
14971 private extension declaration nodes to avoid reading unavailable
14972 attribute.
14973
14974 2011-08-01 Thomas Quinot <quinot@adacore.com>
14975
14976 * sem_ch3.adb: Minor reformatting.
14977
14978 2011-08-01 Thomas Quinot <quinot@adacore.com>
14979
14980 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14981 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14982 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14983 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14984 for VMS, instead parametrize the common implementation with
14985 System.Parameters declarations.
14986
14987 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14988
14989 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14990
14991 2011-08-01 Tristan Gingold <gingold@adacore.com>
14992
14993 * seh_init.c: Fix SEH handler installation on win64.
14994
14995 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14996
14997 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14998 double analysis of an anonymous access to subprogram, because it can
14999 lead to improper sharing of profiles and a back-end crash.
15000
15001 2011-08-01 Robert Dewar <dewar@adacore.com>
15002
15003 * make.adb, sem_ch4.adb: Minor reformatting.
15004 * gcc-interface/Make-lang.in: Update dependencies.
15005 * sem_util.adb, exp_ch5.adb: Minor reformatting.
15006
15007 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15008
15009 * gnat_rm.texi: Fix definition of Long_Integer.
15010
15011 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15012
15013 * exp_aggr.adb: check limit size of static aggregate unconditionally,
15014 to prevent storage exhaustion.
15015 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15016 finalized is a function body, insert the cleanup code before the final
15017 return statement, to prevent spurious warnings.
15018 * s-pooglo.ads: add overriding indicator.
15019
15020 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15021
15022 * sem_ch4.adb (Operator_Check): improve error message when both a
15023 with_clause and a use_clause are needed to make operator usage legal.
15024 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15025 determine whether a compilation unit is visible within an other,
15026 either through a with_clause in the current unit, or a with_clause in
15027 its library unit or one one of its parents.
15028
15029 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15030
15031 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15032 over an arbitrary expression of an array or container type.
15033 * lib-xref.adb: clarify comment.
15034
15035 2011-08-01 Bob Duff <duff@adacore.com>
15036
15037 * einfo.ads: Minor reformatting.
15038 * debug.adb: Minor comment improvement.
15039
15040 2011-08-01 Javier Miranda <miranda@adacore.com>
15041
15042 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15043 consider hidden subprograms as valid candidates.
15044
15045 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15046
15047 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15048
15049 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15050
15051 * gnat_ugn.texi: Fix typo.
15052
15053 2011-08-01 Robert Dewar <dewar@adacore.com>
15054
15055 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15056 lib-xref.adb: Minor reformatting
15057
15058 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15059
15060 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15061 when to generate a call to Move_Final_List.
15062 (Has_Controlled_Parts): Remove this function.
15063
15064 2011-08-01 Geert Bosch <bosch@adacore.com>
15065
15066 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15067 "," in choice list.
15068
15069 2011-08-01 Thomas Quinot <quinot@adacore.com>
15070
15071 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15072 explicit raise of a predefined exception as Comes_From_Source if the
15073 original N_Raise_Statement comes from source.
15074
15075 2011-08-01 Robert Dewar <dewar@adacore.com>
15076
15077 * sinfo.ads: Add comment.
15078 * sem_ch6.adb: Minor reformatting.
15079
15080 2011-08-01 Robert Dewar <dewar@adacore.com>
15081
15082 * freeze.adb (Freeze_Entity): Refine check for bad component size
15083 clause to avoid rejecting confirming clause when atomic/aliased present.
15084
15085 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15086
15087 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15088 better determine whether an entity reference is a write.
15089 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15090 subcomponent.
15091 * lib-xref.adb (Output_References): Do no suppress a read reference at
15092 the same location as an immediately preceeding modify-reference, to
15093 handle properly in-out actuals.
15094
15095 2011-08-01 Tristan Gingold <gingold@adacore.com>
15096
15097 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15098
15099 2011-08-01 Quentin Ochem <ochem@adacore.com>
15100
15101 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15102 heap to compute the result.
15103
15104 2011-08-01 Robert Dewar <dewar@adacore.com>
15105
15106 * atree.ads: Minor reformatting.
15107
15108 2011-08-01 Emmanuel Briot <briot@adacore.com>
15109
15110 * g-expect.adb (Get_Command_Output): Fix memory leak.
15111
15112 2011-08-01 Geert Bosch <bosch@adacore.com>
15113
15114 * cstand.adb (P_Float_Type): New procedure to print the definition of
15115 predefined fpt types.
15116 (P_Mixed_Name): New procedure to print a name using mixed case
15117 (Print_Standard): Use P_Float_Type for printing floating point types
15118 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15119 precision IEEE float.
15120
15121 2011-08-01 Thomas Quinot <quinot@adacore.com>
15122
15123 * sem_ch3.adb: Minor reformatting.
15124
15125 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15126
15127 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15128 the completion of a generic function, insert the new body rather than
15129 rewriting the original.
15130
15131 2011-08-01 Yannick Moy <moy@adacore.com>
15132
15133 * sinfo.ads, errout.ads: Typos in comments.
15134
15135 2011-08-01 Robert Dewar <dewar@adacore.com>
15136
15137 * par-endh.adb: Minor reformatting.
15138
15139 2011-08-01 Robert Dewar <dewar@adacore.com>
15140
15141 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15142 (Pre_Post_Aspects): New subtype.
15143 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15144 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15145 * par-ch7.adb (P_Package): Remove Decl parameter
15146 (P_Package): Handle new syntax for aspects (before IS)
15147 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15148 new aspect syntax
15149 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15150 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15151 (P_Package): Remove Decl parameter
15152 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15153 aspects
15154 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15155 specs
15156 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15157 * sinfo.ads: Document new syntax for aspects in packages etc.
15158 * sprint.adb: Handle new syntax of aspects before IS in package
15159
15160 2011-08-01 Thomas Quinot <quinot@adacore.com>
15161
15162 * atree.ads: Minor reformatting.
15163 * sem_prag.adb: Minor reformatting.
15164
15165 2011-08-01 Robert Dewar <dewar@adacore.com>
15166
15167 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15168 case expr alternative.
15169
15170 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15171
15172 * sem_ch12.adb: Fix typo.
15173
15174 2011-08-01 Geert Bosch <bosch@adacore.com>
15175
15176 * sem_prag.adb (Check_No_Link_Name): New procedure.
15177 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15178 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15179 instead of Standard_Long_Long_Float_Size global. Preparation for
15180 eventual removal of per type constants.
15181 * exp_util.ads (Get_Stream_Size): New function returning the stream
15182 size value of subtype E.
15183 * exp_util.adb (Get_Stream_Size): Implement new function.
15184 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15185 function.
15186 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15187 * einfo.adb:
15188 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15189
15190 2011-08-01 Geert Bosch <bosch@adacore.com>
15191
15192 * cstand.adb: Fix comments.
15193 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15194 count of arguments.
15195
15196 2011-08-01 Robert Dewar <dewar@adacore.com>
15197
15198 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15199
15200 2011-08-01 Geert Bosch <bosch@adacore.com>
15201
15202 * atree.ads: Fix comment.
15203
15204 2011-08-01 Robert Dewar <dewar@adacore.com>
15205
15206 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15207 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15208 * par.adb: Add with for Namet.Sp.
15209 * par-tchk.adb: Minor reformatting.
15210
15211 2011-08-01 Vincent Celier <celier@adacore.com>
15212
15213 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15214 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15215 of the init procedure of a SAL.
15216 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15217 New procedure.
15218
15219 2011-08-01 Thomas Quinot <quinot@adacore.com>
15220
15221 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15222 reformatting.
15223
15224 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15225
15226 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15227
15228 2011-08-01 Thomas Quinot <quinot@adacore.com>
15229
15230 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15231 conformant with its spec (return True only for types that have
15232 an overriding Initialize primitive operation that prevents them from
15233 having preelaborable initialization).
15234 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15235 initialization for controlled types in Ada 2005 or later mode.
15236
15237 2011-08-01 Robert Dewar <dewar@adacore.com>
15238
15239 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15240 Postcondition.
15241 (Same_Aspect): New function.
15242 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15243 Type_Invariant, Precondition, Postcondition.
15244 * snames.ads-tmpl: Add Name_Type_Invariant.
15245
15246 2011-08-01 Robert Dewar <dewar@adacore.com>
15247
15248 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15249 here.
15250 (Freeze_All_Ent): Fix error in handling inherited aspects.
15251 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15252 already analyzed, but don't skip entire processing of a declaration,
15253 that's wrong in some cases of declarations being rewritten.
15254 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15255 Don't delay for integer, string literals
15256 Treat predicates in usual manner for delay, remove special case code,
15257 not needed.
15258 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15259 (Build_Predicate_Function): Update saved expression in aspect
15260 (Build_Invariant_Procedure): Update saved expression in aspect
15261 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15262 of replacement of discriminant references if the reference is simple.
15263
15264 2011-08-01 Robert Dewar <dewar@adacore.com>
15265
15266 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15267 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15268 Static_Predicate and Dynamic_Predicate.
15269 (Build_Predicate_Function): Add processing for Static_Predicate
15270 and Dynamic_Predicate.
15271 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15272 (From_Static_Predicate): New flag
15273 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15274
15275 2011-08-01 Robert Dewar <dewar@adacore.com>
15276
15277 * usage.adb: Documentation cleanup for Ada version modes in usage.
15278 * expander.adb: Minor reformatting.
15279
15280 2011-08-01 Robert Dewar <dewar@adacore.com>
15281
15282 * atree.ads: Minor comment fix.
15283 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15284 a-witeio.ads, sem_prag.adb: Minor reformatting.
15285
15286 2011-08-01 Doug Rupp <rupp@adacore.com>
15287
15288 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15289 pointers. Use descrip.h header file for convenience. Add some
15290 comments.
15291
15292 2011-08-01 Robert Dewar <dewar@adacore.com>
15293
15294 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15295 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15296 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15297 New procedure.
15298 (Check_Aspect_At_End_Of_Declarations): New procedure
15299 (Analye_Aspect_Specification): Minor changes for above procedures
15300 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15301 specification node as well.
15302
15303 2011-08-01 Pascal Obry <obry@adacore.com>
15304
15305 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15306 Windows files. Use GetFilesAttributes() in this case to check for file
15307 existence instead of returning with an error code.
15308
15309 2011-08-01 Vincent Celier <celier@adacore.com>
15310
15311 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15312 High is above Source length.
15313
15314 2011-08-01 Robert Dewar <dewar@adacore.com>
15315
15316 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15317
15318 2011-08-01 Robert Dewar <dewar@adacore.com>
15319
15320 * aspects.ads (Boolean_Aspects): New subtype.
15321 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15322 for derived types in cases where the parent type and derived type have
15323 aspects.
15324 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15325 with aspects when parent type also has aspects.
15326 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15327 boolean expression at this point).
15328 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15329 accordance with final decision on the Ada 2012 feature.
15330 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15331
15332 2011-08-01 Matthew Heaney <heaney@adacore.com>
15333
15334 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15335
15336 2011-08-01 Pascal Obry <obry@adacore.com>
15337
15338 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15339 Fix Replace_Slice when High is above current string size.
15340 (Replace_Slice): Fix DL computation when High is above current
15341 string length.
15342
15343 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15344
15345 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15346
15347 2011-08-01 Matthew Heaney <heaney@adacore.com>
15348
15349 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15350 of node.
15351
15352 2011-08-01 Pascal Obry <obry@adacore.com>
15353
15354 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15355 reformatting.
15356
15357 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15358
15359 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15360 access to protected subprograms in generic bodies.
15361 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15362 protected type, indicate that the convention of the subprogram is
15363 Convention_Protected, because it may be used in subsequent declarations
15364 within the protected declaration.
15365
15366 2011-08-01 Vincent Celier <celier@adacore.com>
15367
15368 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15369 and "final" procedures when the name of the library is "ada", to avoid
15370 duplicate symbols "adainit" and "adafinal" in executables.
15371
15372 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15373
15374 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15375 quantified expression that appears within a postcondition and uses the
15376 Ada2012 'Result attribute.
15377
15378 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15379
15380 * init.c (__gnat_error_handler): Cast reason to int.
15381 (__gnat_install_handler): Explain sa_sigaction use.
15382
15383 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15384
15385 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15386 subprogram has copy-in copy-out parameters, try to promote the mode of
15387 the return type if it is passed in registers.
15388
15389 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15390
15391 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15392 left operand as addressable.
15393
15394 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15395
15396 * gcc-interface/gigi.h (build_function_stub): Remove.
15397 (build_return_expr): Likewise.
15398 (convert_vms_descriptor): Declare.
15399 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15400 (build_function_stub): Move to...
15401 * gcc-interface/utils2.c (build_return_expr): Move to...
15402 * gcc-interface/trans.c (build_function_stub): ...here.
15403 (build_return_expr): ...here.
15404 (Subprogram_Body_to_gnu): Add local variable for language_function.
15405 Disconnect the parameter attributes cache, if any, once done with it.
15406 Call end_subprog_body only after setting the end_locus.
15407 Build the stub associated with the function, if any, at the very end.
15408 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15409 variables and streamline control flow.
15410
15411 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15412
15413 PR ada/49819
15414 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15415 g-trasym-dwarf.adb.
15416
15417 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15418
15419 PR bootstrap/49794
15420 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15421 Assign to act.sa_sigaction.
15422 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15423 current->return_address to char * before arithmetic.
15424
15425 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15426
15427 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15428 Correct argument types.
15429 Extract code from reason.
15430 (__gnat_install_handler): Assign to act.sa_sigaction.
15431
15432 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15433
15434 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15435 (GNAT1_OBJS): ...here.
15436
15437 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15438
15439 PR ada/48711
15440 * g-socthi-mingw.adb (Fill): Fix formatting.
15441
15442 * gcc-interface/gigi.h: Move around comment.
15443
15444 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15445
15446 PR ada/46350
15447 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15448
15449 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15450
15451 PR ada/48711
15452 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15453
15454 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15455
15456 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15457 range comparison if Pmode is SImode.
15458
15459 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15460 Eric Botcazou <ebotcazou@adacore.com>
15461
15462 * adadecode.c: Wrap up in extern "C" block.
15463 * adadecode.h: Likewise.
15464 * adaint.c: Likewise. Remove 'const' keyword.
15465 * adaint.h: Likewise.
15466 * argv.c: Likewise.
15467 * atree.h: Likewise.
15468 * cio.c: Likewise.
15469 * cstreams.c: Likewise.
15470 * env.c: Likewise.
15471 * exit.c: Likewise.
15472 * fe.h: Likewise.
15473 * final.c: Likewise.
15474 * init.c: Likewise.
15475 * initialize.c: Likewise.
15476 * link.c: Likewise.
15477 * namet.h: Likewise.
15478 * nlists.h: Likewise.
15479 * raise.c: Likewise.
15480 * raise.h: Likewise.
15481 * repinfo.h: Likewise.
15482 * seh_init.c: Likewise.
15483 * targext.c: Likewise.
15484 * tracebak.c: Likewise.
15485 * uintp.h: Likewise.
15486 * urealp.h: Likewise.
15487 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15488 * xsinfo.adb: Likewise.
15489 * xsnamest.adb: Likewise.
15490 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15491 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15492 * gcc-interface/misc.c: Likewise.
15493 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15494 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15495 ada/targext.o here...
15496 (GNAT_ADA_OBJS): ...and not here.
15497 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15498 (GNATBIND_OBJS): Reorder.
15499
15500 2011-07-07 Richard Henderson <rth@redhat.com>
15501
15502 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15503 dwarf2out_frame_init.
15504
15505 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15506
15507 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15508
15509 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15510
15511 PR target/39150
15512 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15513
15514 2011-07-06 Richard Guenther <rguenther@suse.de>
15515
15516 * gcc-interface/misc.c (gnat_init): Merge calls to
15517 build_common_tree_nodes and build_common_tree_nodes_2.
15518 Re-initialize boolean_false_node.
15519
15520 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15521 Olivier Hainque <hainque@adacore.com>
15522 Nicolas Setton <setton@adacore.com>
15523
15524 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15525 the type according to the ARTIFICIAL_P parameter.
15526 (create_type_decl): Likewise.
15527 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15528
15529 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15530
15531 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15532 (gnatbind): Likewise.
15533
15534 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15535
15536 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15537
15538 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15539
15540 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15541 local variable throughout. Remove useless call to Base_Type.
15542 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15543 Take it also into account for the volatileness of the field. Set the
15544 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15545
15546 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15547
15548 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15549 on a dereference built for a by-ref object if it has an address clause.
15550
15551 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15552
15553 * einfo.ads (Address_Taken): Document use for the second argument of
15554 Asm_Input and Asm_Output attributes.
15555 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15556 argument is an entity name, then set Address_Taken on it.
15557 <Attribute_Asm_Output>: Likewise.
15558 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15559 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15560 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15561 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15562
15563 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15564
15565 PR middle-end/46500
15566 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15567
15568 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15569
15570 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15571 (ada/utils.o): Update dependencies.
15572 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15573 ../../../libcpp/libcpp.a.
15574 * gcc-interface/utils.c: Include common/common-target.h.
15575 (process_attributes): Use targetm_common.have_named_sections.
15576
15577 2011-06-07 Richard Guenther <rguenther@suse.de>
15578
15579 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15580 set_sizetype.
15581
15582 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15583
15584 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15585 TREE_THIS_NOTRAP flag.
15586
15587 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15588
15589 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15590 Fix thinko.
15591
15592 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15593
15594 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15595 constants whose full view has discriminants specially.
15596
15597 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15598
15599 * gcc-interface/utils.c: Include diagnostic.h.
15600 (gnat_write_global_declarations): Output debug information for all
15601 global type declarations before finalizing the compilation unit.
15602 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15603
15604 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15605
15606 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15607
15608 2011-05-25 Kai Tietz <ktietz@redhat.com>
15609
15610 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15611 initialization instead of const/none-const pointer assignment.
15612
15613 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15614
15615 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15616 $(EXTRA_GNAT1_OBJS).
15617 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15618 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15619 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15620 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15621 libcommon-target.a instead of prefix.o.
15622
15623 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15624
15625 PR ada/49097
15626 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15627
15628 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15629
15630 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15631 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15632 instead of version.o.
15633
15634 2011-05-18 Kai Tietz <ktietz@redhat.com>
15635
15636 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15637 boolean_false_node instead of integer_zero_node.
15638 (convert_with_check): Likewise.
15639 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15640
15641 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15642
15643 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15644 type of the parameter is an unconstrained array, convert the actual to
15645 the type of the formal in the In Out and Out cases as well.
15646
15647 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15648
15649 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15650 call build_function_type_array or build_varargs_function_type_array
15651 instead.
15652 (create_subprog_type): Don't call build_function_type; call
15653 build_function_type_vec instead.
15654
15655 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15656
15657 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15658 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15659 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15660
15661 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15662
15663 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15664
15665 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15666 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15667
15668 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15669
15670 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15671
15672 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15673
15674 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15675 instead of accessing TYPE_ARG_TYPES directly.
15676 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15677
15678 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15679
15680 PR ada/48844
15681 * gcc-interface/gigi.h (get_variant_part): Declare.
15682 * gcc-interface/decl.c (get_variant_part): Make global.
15683 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15684 types have the same constant size, are record types and T1 has a
15685 variant part while T2 doesn't.
15686
15687 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15688
15689 * gcc-interface/utils.c (begin_subprog_body): Do not call
15690 get_pending_sizes.
15691 (end_subprog_body): Likewise.
15692
15693 2011-05-04 Richard Guenther <rguenther@suse.de>
15694
15695 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15696 int_const_binop.
15697 (pos_to_constructor): Likewise.
15698
15699 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15700 Eric Botcazou <ebotcazou@adacore.com>
15701
15702 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15703 of build_function_type. Adjust calls to...
15704 (build_raise_check): ...this. Do not take a void_tree parameter.
15705 Call build_function_type_list instead of build_function_type.
15706 Fix head comment and swap couple of conditional blocks.
15707
15708 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15709
15710 * gnatvsn.ads (Library_Version): Bump to 4.7.
15711 (Current_Year): Bump to 2011.
15712
15713 2011-04-29 Michael Matz <matz@suse.de>
15714
15715 * gcc-interface/misc.c (gnat_handle_option): Set
15716 warn_maybe_uninitialized.
15717
15718 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15719
15720 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15721 the Watson/McCabe paper.
15722
15723 2011-04-23 Jim Meyering <meyering@redhat.com>
15724
15725 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15726
15727 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15728
15729 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15730 onto the new type.
15731
15732 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15733
15734 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15735 parameter.
15736 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15737 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15738 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15739 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15740 <all>: Do not set flags on the reused DECL node coming from an alias.
15741 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15742 don't need debug info here...
15743 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15744 (gigi): Adjust calls to create_subprog_decl.
15745 (build_raise_check): Likewise.
15746 (establish_gnat_vms_condition_handler): Likewise.
15747 (Compilation_Unit_to_gnu): Likewise.
15748 (gnat_to_gnu): Likewise.
15749
15750 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15751
15752 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15753 (NO_REORDER_ADAFLAGS): New variable.
15754 (EXTRA_GNATTOOLS): Always define.
15755 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15756 Clean up and adjust list of files compiled with special options.
15757 * gcc-interface/Make-lang.in: Likewise.
15758 (ada/decl.o): Cosmetical change.
15759 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15760
15761 2011-04-20 Jim Meyering <meyering@redhat.com>
15762
15763 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15764
15765 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15766
15767 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15768 $(CFLAGS) on the link line.
15769
15770 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15771
15772 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15773 padded type built for the return type if it is unconstrained.
15774
15775 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15776
15777 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15778
15779 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15780
15781 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15782 before calling TREE_CHAIN.
15783 * gcc-interface/misc.c (gnat_init_ts): New function.
15784 (LANG_HOOKS_INIT_TS): Define.
15785
15786 2011-04-12 Martin Jambor <mjambor@suse.cz>
15787
15788 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15789 instead of cgraph_node.
15790
15791 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15792
15793 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15794 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15795 mechanism.
15796
15797 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15798
15799 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15800 of aggregate types that contain a placeholder.
15801
15802 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15803
15804 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15805 TYPE_ARG_TYPES.
15806 (handle_type_generic_attribute): Likewise.
15807
15808 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15809
15810 PR ada/47163
15811 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15812
15813 2011-04-04 Kai Tietz <ktietz@redhat.com>
15814
15815 PR ada/47163
15816 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15817 to flag value.
15818
15819 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15820
15821 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15822 type case, do not strip a padding type around the array type.
15823
15824 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15825
15826 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15827 types.
15828
15829 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15830
15831 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15832 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15833 code for -feliminate-unused-debug-types.
15834 (gnat_post_options): Likewise.
15835
15836 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15837
15838 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15839 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15840 distinct copy.
15841
15842 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15843
15844 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15845 DECL_ARTIFICIAL flag on enumeration types.
15846
15847 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15848
15849 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15850 fat pointer types artificial unconditionally.
15851 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15852 isn't artificial.
15853
15854 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15855
15856 * gcc-interface/gigi.h (get_dummy_type): Declare.
15857 (build_dummy_unc_pointer_types): Likewise.
15858 (finish_fat_pointer_type): Likewise.
15859 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15860 fat pointer type has been built, complete it in place.
15861 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15862 and thin pointers. Remove useless variable.
15863 (finish_fat_pointer_type): Make global and move to...
15864 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15865 (get_dummy_type): New function.
15866 (build_dummy_unc_pointer_types): Likewise.
15867 (gnat_pushdecl): Propage the name to the anonymous variants only.
15868 (update_pointer_to): Only adjust the pointer types in the unconstrained
15869 array case.
15870
15871 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15872
15873 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15874 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15875 if this is a Taft amendment type and the full declaration is available.
15876 * gcc-interface/trans.c (process_type): Likewise.
15877 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15878 (process_freeze_entity): Likewise.
15879 * gcc-interface/utils.c (dummy_global): New static variable.
15880 (gnat_write_global_declarations): If there are types declared as used
15881 at the global level, insert them in the global hash table.
15882
15883 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15884
15885 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15886 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15887 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15888 copy.
15889 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15890 flag of the type accordingly.
15891 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15892
15893 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15894
15895 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15896 finalizing types when updating the pointers to the designated type.
15897 <all>: Finalize the deferred types even if we didn't defer processing
15898 of incomplete types in this invocation.
15899
15900 2011-04-01 Olivier Hainque <hainque@adacore.com>
15901 Nicolas Setton <setton@adacore.com>
15902 Eric Botcazou <ebotcazou@adacore.com>
15903
15904 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15905 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15906
15907 2011-03-28 Kai Tietz <ktietz@redhat.com>
15908
15909 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15910 Windows targets.
15911 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15912 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15913
15914 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15915
15916 2011-03-28 Tristan Gingold <gingold@adacore.com>
15917
15918 PR ada/44431
15919 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15920 Use ada output of gnatbind.
15921 (ada/b_gnatb.adb): Ditto.
15922 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15923 (ada.mostlyclean, ada.stage1)
15924 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15925 (ada.stagefeedback): Adjust.
15926 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15927 Use ada output of gnatbind.
15928 (b_gnatm.adb): Ditto.
15929 (b_gnatl.o, b_gnatm.o): New rules.
15930
15931 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15932
15933 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15934 for the padded type built to support a specified size or alignment.
15935
15936 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15937
15938 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15939 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15940 unconditionally to the end of the unit when the designated type is
15941 limited_with'ed.
15942 <all>: Rename local variable. Attempt to un-defer types only and do it
15943 for limited_with'ed types as well.
15944 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15945 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15946 consistently and remove redundant call to finalize_from_with_types.
15947
15948 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15949
15950 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15951 subprograms without a previous spec declared in the same unit.
15952 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15953 subprograms at the end of the unit instead of at the beginning.
15954 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15955 isn't public for the special handling of non-inline functions nested
15956 inside inline external functions.
15957
15958 2011-03-25 Jeff Law <law@redhat.com>
15959
15960 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15961
15962 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15963
15964 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15965 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15966 to compute Set_Size_Depends_On_Discriminant.
15967 (Layout_Type): Call it on array types in back-end layout mode.
15968 * sem_util.adb (Requires_Transient_Scope): Return true for array
15969 types only if the size depends on the value of discriminants.
15970 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15971 type if the RHS is a call to a function that returns an unconstrained
15972 type with default discriminant.
15973
15974 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15975
15976 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15977 non-conversion to the nominal result type at the end.
15978
15979 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15980
15981 * gcc-interface/trans.c (create_temporary): New function taken from...
15982 (create_init_temporary): ...here. Call it.
15983 (call_to_gnu): Create the temporary for the return value early, if any.
15984 Create it for a function with copy-in/copy-out parameters if there is
15985 no target; in other cases of copy-in/copy-out, use another temporary.
15986 Push the new binding level lazily. Add and rename local variables.
15987
15988 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15989
15990 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15991 error message.
15992 (set_rm_size): Likewise.
15993
15994 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15995
15996 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15997 for the padded type built in order to support a specified alignment.
15998 Fix incorrect formatting.
15999
16000 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16001
16002 PR bootstrap/48216
16003 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16004
16005 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16006
16007 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16008 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16009 to the end of the list. Adjust recursive call. Rename local variable.
16010 If REORDER is true, reorder components of the record type.
16011 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16012 components_to_record and adjust the parameter list.
16013
16014 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16015
16016 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16017 disabled, use the variable for bounds of loop iteration scheme.
16018
16019 2011-03-21 Kai Tietz <ktietz@redhat.com>
16020
16021 PR target/12171
16022 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16023
16024 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16025
16026 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16027 out whether the expression is read-only. Short-circuit placeholder
16028 case and rename a couple of local variables.
16029
16030 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16031
16032 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16033 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16034 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16035 (convert): Deal with conversions from a smaller form type specially.
16036
16037 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
16038
16039 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16040 its argument, except for the special -I- switch.
16041
16042 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16043
16044 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16045 "Ada Issues".
16046
16047 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16048
16049 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16050
16051 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16052
16053 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16054 GNAT_FORMAL.
16055 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16056 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16057 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16058 Do not generate the check directly, instead instantiate the template
16059 check present in the descriptor.
16060 (make_descriptor_field): Move around.
16061 (build_vms_descriptor32): Build a template check in the POINTER field.
16062 (build_vms_descriptor): Remove useless suffixes.
16063 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16064
16065 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16066
16067 PR bootstrap/47467
16068 * targext.c: Include target files if IN_RTS is defined.
16069
16070 2011-01-26 Richard Guenther <rguenther@suse.de>
16071
16072 PR bootstrap/47467
16073 * targext.c: Include config.h.
16074 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16075 dependency.
16076
16077 2011-01-04 Pascal Obry <obry@adacore.com>
16078 Eric Botcazou <ebotcazou@adacore.com>
16079
16080 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16081
16082 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16083
16084 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16085 end-of-case on the end label and its associated gotos, if any.
16086
16087 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16088
16089 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16090 expressions of the parameter cache within the statement group of
16091 the CICO mechanism.
16092
16093 2011-01-04 Olivier Hainque <hainque@adacore.com>
16094 Eric Botcazou <ebotcazou@adacore.com>
16095
16096 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16097 (set_end_locus_from_node): New function.
16098 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16099 make and the function end_locus.
16100 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16101 for the elaboration subprogram.
16102 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16103 set the end_locus of the expression as well.
16104
16105 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16106
16107 PR ada/47131
16108 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16109 variables that are referenced in exception handlers volatile.
16110
16111
16112 \f
16113 Copyright (C) 2011 Free Software Foundation, Inc.
16114
16115 Copying and distribution of this file, with or without modification,
16116 are permitted in any medium without royalty provided the copyright
16117 notice and this notice are preserved.