ae711f09834cc520808995b71e27ab59bce1d3bf
[gcc.git] / gcc / ada / ChangeLog
1 2011-09-01 Robert Dewar <dewar@adacore.com>
2
3 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4
5 2011-09-01 Jose Ruiz <ruiz@adacore.com>
6
7 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
8 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
9 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
10 specific for systems where their glibc version does not define the
11 routines to handle dynamically allocated CPU sets.
12
13 2011-09-01 Vincent Celier <celier@adacore.com>
14
15 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
16 prj-env.adb: Implement inheritance of naming exceptions in extending
17 projects.
18
19 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
20
21 * gnatls.adb: Display simple message instead of content of
22 gnatlic.adl.
23
24 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
25
26 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
27 access discriminant and anonymous access component scopes.
28 (Inherit_Component): Reuse the itype of an access discriminant
29 or anonymous access component by copying it in order to set the proper
30 scope. This is done only when the parent and the derived type
31 are in different scopes.
32 (Set_Anonymous_Etype): New routine.
33
34 2011-09-01 Robert Dewar <dewar@adacore.com>
35
36 * a-convec.adb: Minor reformatting throughout.
37
38 2011-09-01 Jose Ruiz <ruiz@adacore.com>
39
40 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
41 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
42 CPU_ALLOC_SIZE and CPU_FREE linux macros.
43 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
44 CPU_SET_S respectively because we are now using dynamically allocated
45 CPU sets which are more portable across different glibc versions.
46 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
47 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
48 masks dynamically according to the number of processors in the target
49 platform.
50 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
51 respectively, so we need to pass the size of the masks as
52 parameters.
53 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
54 created cpu_set_t masks
55 with the number of processors available in the target platform,
56 instead of static bit arrays. It enhances portability because
57 it uses the information from the target platform.
58 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
59 are using a restricted run-time library, use the flag
60 Configurable_Run_Time_Mode instead of Restricted_Profile.
61
62 2011-09-01 Vincent Celier <celier@adacore.com>
63
64 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
65 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
66
67 2011-09-01 Nicolas Roche <roche@adacore.com>
68
69 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
70 on VxWorks in kernel mode.
71
72 2011-09-01 Jose Ruiz <ruiz@adacore.com>
73
74 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
75 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
76 directly the bit array.
77 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
78 the linux macros with the same name.
79 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
80 wrappers around the CPU_ZERO and CPU_SET linux macros.
81
82 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
83
84 * exp_ch7.adb (Find_Insertion_List): Removed.
85 (Process_Transient_Objects): Insert the declarations of the hook
86 access type and the hook object before the associated transient object.
87
88 2011-09-01 Jose Ruiz <ruiz@adacore.com>
89
90 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
91 package System.Aux_Dec when using restricted run-time libraries which
92 do not have this package.
93
94 2011-09-01 Tristan Gingold <gingold@adacore.com>
95
96 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
97
98 2011-09-01 Bob Duff <duff@adacore.com>
99
100 * sem_attr.adb (Analyze_Access_Attribute): Do not call
101 Kill_Current_Values for P'Unrestricted_Access, where P is library level
102
103 2011-09-01 Thomas Quinot <quinot@adacore.com>
104
105 * exp_ch5.adb: Minor reformatting
106 * gnat_ugn.texi: Fix minor typos.
107 * gcc-interface/Make-lang.in: Update dependencies.
108
109 2011-09-01 Robert Dewar <dewar@adacore.com>
110
111 * inline.adb, sem_aggr.adb: Minor reformatting.
112
113 2011-09-01 Ed Schonberg <schonberg@adacore.com>
114
115 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
116
117 2011-09-01 Robert Dewar <dewar@adacore.com>
118
119 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
120
121 2011-09-01 Bob Duff <duff@adacore.com>
122
123 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
124 body" the same as "in inlined body", because visibility shouldn't
125 apply there.
126
127 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
128
129 * inline.adb (Add_Inlined_Body): Refine previous change.
130
131 2011-09-01 Gary Dismukes <dismukes@adacore.com>
132
133 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
134 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
135 Test for case where call
136 initializes an object of a return statement before testing for
137 a constrained call, to ensure that all such cases get handled
138 by simply passing on the caller's parameters. Also, in that
139 case call Needs_BIP_Alloc_Form to determine whether to pass on
140 the BIP_Alloc_Form parameter of the enclosing function rather
141 than testing Is_Constrained. Add similar tests for the return
142 of a BIP call to later processing to ensure consistent handling.
143 (Needs_BIP_Alloc_Form): New utility function.
144 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
145 a BIP_Alloc_Form formal with call to new utility function
146 Needs_BIP_Alloc_Form.
147
148 2011-09-01 Pascal Obry <obry@adacore.com>
149
150 * prj-part.adb: Minor reformatting.
151
152 2011-09-01 Vincent Celier <celier@adacore.com>
153
154 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
155 half character in the unit name.
156
157 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
158
159 * exp_ch4.adb: Minor code and comment reformatting.
160
161 2011-09-01 Thomas Quinot <quinot@adacore.com>
162
163 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
164 for Is_Limited_Type and Is_Tagged_Type in condition checking
165 for by-reference type.
166 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
167 subprograms may have a completion because of a previous
168 Inline_Always clause, but the enclosing package must be marked
169 inlined for the subprogram body to become visible to the backend.
170
171 2011-09-01 Thomas Quinot <quinot@adacore.com>
172
173 * sem_aux.adb, exp_ch4.adb: Minor reformatting
174
175 2011-09-01 Pascal Obry <obry@adacore.com>
176
177 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
178
179 2011-09-01 Ed Schonberg <schonberg@adacore.com>
180
181 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
182 the formals of a subprogram stub that acts as a spec.
183
184 2011-09-01 Ed Schonberg <schonberg@adacore.com>
185
186 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
187 type, declare a renaming for it, not an object declaration.
188
189 2011-09-01 Yannick Moy <moy@adacore.com>
190
191 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
192 Ignore_Errors to ignore failures to read ALI files when True.
193
194 2011-09-01 Javier Miranda <miranda@adacore.com>
195
196 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
197 constructor calls associated with non-tagged record types.
198
199 2011-09-01 Robert Dewar <dewar@adacore.com>
200
201 * g-socthi-vms.adb: Minor reformatting.
202
203 2011-09-01 Nicolas Roche <roche@adacore.com>
204
205 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
206 in order to avoid impact of imcompatible changes.
207 * cstreams.c: Likewise
208 * cio.c: Likewise
209 * aux-io.c: Likewise
210
211 2011-09-01 Yannick Moy <moy@adacore.com>
212
213 * lib-writ.adb (Write_With_Lines): Always output complete information
214 on "with" line in Alfa mode, as this is required by formal verification
215 back-end.
216
217 2011-09-01 Tristan Gingold <gingold@adacore.com>
218
219 * g-socthi-vms.adb: Add comments.
220
221 2011-09-01 Pascal Obry <obry@adacore.com>
222
223 * prj.ads: Minor reformatting.
224
225 2011-09-01 Vincent Celier <celier@adacore.com>
226
227 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
228 exceptions in the config pragmas file.
229
230 2011-09-01 Tristan Gingold <gingold@adacore.com>
231
232 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
233
234 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
235
236 * exp_ch7.adb (Find_Insertion_List): New routine.
237 (Process_Transient_Objects): Add code to handle the abnormal
238 finalization of a controlled transient associated with a subprogram
239 call. Since transients are cleaned up right after the associated
240 context, an exception raised during a subprogram call may bypass the
241 finalization code.
242
243 2011-09-01 Robert Dewar <dewar@adacore.com>
244
245 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
246 aliased.
247
248 2011-09-01 Robert Dewar <dewar@adacore.com>
249
250 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
251
252 2011-09-01 Robert Dewar <dewar@adacore.com>
253
254 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
255
256 2011-09-01 Thomas Quinot <quinot@adacore.com>
257
258 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
259 GNATRTL_NONTASKING_OBJS.
260
261 2011-09-01 Robert Dewar <dewar@adacore.com>
262
263 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
264 possibility of this flag being set for formals in Ada 2012 mode.
265 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
266 2012.
267 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
268 mode.
269 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
270 Ada 2012.
271 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
272 Ada 2012.
273
274 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
275
276 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
277 insertion node in a tree of nested Expression_With_Actions nodes.
278 (Process_Transient_Object): In the case where a complex if statement
279 has been converted into nested Expression_With_Actions nodes, the
280 "hook" object and the associated access type must be inserted before
281 the top most Expression_With_Actions.
282
283 2011-09-01 Robert Dewar <dewar@adacore.com>
284
285 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
286 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
287
288 2011-09-01 Ed Schonberg <schonberg@adacore.com>
289
290 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
291
292 2011-09-01 Jose Ruiz <ruiz@adacore.com>
293
294 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
295 aspect.
296 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
297 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
298 in a similar way as we do for the Priority or Dispatching_Domain aspect.
299 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
300 Dispatching_Domains_Frozen): Move this local data to package
301 System.Tasking because with the CPU aspect we need to have access
302 to this data when creating the task in System.Tasking.Stages.Create_Task
303 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
304 Move these variables from the body of
305 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
306 we need to have access to this data when creating the task in
307 System.Tasking.Stages.Create_Task.
308 * s-taskin.adb (Initialize): Signal the allocation of the environment
309 task to a CPU, if any, so that we know whether the CPU can be
310 transferred to a different dispatching domain.
311 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
312 is being allocated belongs to the dispatching domain where the task
313 lives. Signal the allocation of the task to a CPU, if any, so that we
314 know whether the CPU can be transferred to a different dispatching
315 domain.
316
317 2011-09-01 Ed Schonberg <schonberg@adacore.com>
318
319 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
320 attributes Same_Storage and Overlaps_Storage.
321
322 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
323
324 * exp_strm.adb: Remove with and use clause for Opt.
325 (Build_Array_Input_Function): Remove the version-dependent generation
326 of the return statement. The Ada 2005 tree is now the default.
327
328 2011-09-01 Yannick Moy <moy@adacore.com>
329
330 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
331 it is never empty when compiling in Alfa mode.
332
333 2011-09-01 Robert Dewar <dewar@adacore.com>
334
335 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
336 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
337 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
338 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
339
340 2011-09-01 Matthew Heaney <heaney@adacore.com>
341
342 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
343 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
344 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
345 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
346 unbounded queue container.
347 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
348 bounded queue container.
349 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
350 unbounded priority queue container.
351 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
352 bounded priority queue container.
353
354 2011-08-31 Pascal Obry <obry@adacore.com>
355
356 * a-direct.adb: Do not try to create an UNC path on Windows.
357 (Create_Path): Skip leading computer name in UNC path if any.
358
359 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
360
361 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
362 version-dependent generation of the return statement. The Ada 2005 tree
363 is now the default.
364
365 2011-08-31 Thomas Quinot <quinot@adacore.com>
366
367 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
368 types Stream_Element_Offset and Storage_Offset have a different native
369 type depending on whether the platform is 32 or 64 bits. When
370 exchanging them, always convert to 64 bits.
371
372 2011-08-31 Yannick Moy <moy@adacore.com>
373
374 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
375 --force-alfa to gnat2why.
376
377 2011-08-31 Ed Schonberg <schonberg@adacore.com>
378
379 * sem_ch12.adb (Save_References): If the node has aspects, save
380 references within the corresponding expressions in a separate step,
381 because the aspects are not directly in the tree for the declaration
382 to which they belong.
383
384 2011-08-31 Arnaud Charlet <charlet@adacore.com>
385
386 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
387 in CodePeer mode, since representation clauses are partially ignored.
388 * gcc-interface/Make-lang.in: Update dependencies.
389
390 2011-08-31 Jose Ruiz <ruiz@adacore.com>
391
392 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
393 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
394 to any dispatching domain.
395
396 2011-08-31 Thomas Quinot <quinot@adacore.com>
397
398 * exp_ch4.adb: Minor reformatting.
399
400 2011-08-31 Bob Duff <duff@adacore.com>
401
402 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
403 on nodes for which it is not defined.
404 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
405 parent type.
406
407 2011-08-31 Bob Duff <duff@adacore.com>
408
409 * sem_ch3.adb (Process_Full_View): Disable legality check if
410 In_Instance, to avoid spurious errors.
411 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
412 if In_Instance, to avoid spurious errors.
413
414 2011-08-31 Pascal Obry <obry@adacore.com>
415
416 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
417 directory speparators.
418 (Compose): Use Dir_Seps to handle both forms.
419 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
420 changes.
421 (Extension): Use Dir_Seps to handle both forms.
422
423 2011-08-31 Pascal Obry <obry@adacore.com>
424
425 * prj-conf.adb: Minor reformatting.
426
427 2011-08-31 Jose Ruiz <ruiz@adacore.com>
428
429 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
430 dispatching domain aspect.
431 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
432 aspect.
433 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
434 Dispatching_Domain aspect in a similar way as we do for the Priority
435 aspect.
436 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
437 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
438 is present.
439 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
440 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
441 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
442 Dispatching_Domain and add it to the task definition.
443 (Sig_Flags): Add Pragma_Dispatching_Domain.
444 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
445 support to find the types Dispatching_Domain and
446 Dispatching_Domain_Access.
447 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
448 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
449 query the availability of a pragma Dispatching_Domain.
450 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
451 the expander to pass the Dispatching_Domain when creating a task.
452 (Name_Dispatching_Domain): Add this new name for a pragma.
453 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
454 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
455 task has been allocated at creation time.
456 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
457 Ravenscar is always null.
458 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
459 the task has been allocated at creation time.
460 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
461 a specific dispatching domain.
462 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
463 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
464 and CPU are specified for the task, and the CPU value is not contained
465 within the range of processors for the domain.
466
467 2011-08-31 Vincent Celier <celier@adacore.com>
468
469 * make.adb (Original_Gcc) : New constant String_Access.
470 (Gnatmake): For VM targets, do not use VM version of the compiler if
471 --GCC= has been specified.
472
473 2011-08-31 Thomas Quinot <quinot@adacore.com>
474
475 * sem_ch5.adb: Minor reformatting.
476
477 2011-08-31 Ed Schonberg <schonberg@adacore.com>
478
479 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
480 not reanalyze it.
481
482 2011-08-31 Bob Duff <duff@adacore.com>
483
484 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
485 the access type is private; we don't care about privacy in expansion.
486
487 2011-08-31 Ed Schonberg <schonberg@adacore.com>
488
489 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
490 subcomponents tnat may be limited, because they originate in view
491 conflicts. If the original aggregate is legal and the actuals are
492 legal, the aggregate itself is legal.
493
494 2011-08-31 Matthew Heaney <heaney@adacore.com>
495
496 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
497 status.
498
499 2011-08-31 Ed Schonberg <schonberg@adacore.com>
500
501 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
502 errors in B tests.
503
504 2011-08-31 Jose Ruiz <ruiz@adacore.com>
505
506 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
507 Interrupt_Priority aspects, force the analysis of the aspect expression
508 (when building the equivalent pragma). Otherwise, its analysis is done
509 too late, after the task or protected object has been created.
510 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
511 Analyze_Single_Task_Declaration): Remove the code to move the aspects
512 to the object declaration because they are needed in the type
513 declaration.
514
515 2011-08-31 Robert Dewar <dewar@adacore.com>
516
517 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
518 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
519 reformatting.
520
521 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
522
523 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
524 if the corresponding type is malformed due to restriction violations.
525
526 2011-08-31 Robert Dewar <dewar@adacore.com>
527
528 * s-ransee.ads, s-ransee.adb: Minor reformatting.
529
530 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
531
532 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
533 would cause the generation of Set_Finalize_Address if the target is a
534 VM and the designated type is not derived from [Limited_]Controlled.
535
536 2011-08-31 Arnaud Charlet <charlet@adacore.com>
537
538 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
539 subprogram.
540 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
541 case of a compilation error.
542
543 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
544
545 * init.c (__gnat_error_handler): Standardize the stack overflow or
546 erroneous memory access message.
547 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
548 or erroneous memory access message.
549
550 2011-08-31 Robert Dewar <dewar@adacore.com>
551
552 * sem_ch4.adb: Minor reformatting.
553 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
554
555 2011-08-31 Thomas Quinot <quinot@adacore.com>
556
557 * scos.ads: Minor documentation clarification.
558 * put_scos.adb: Do not generate SCO unit header line for a unit that
559 has no SCO lines.
560
561 2011-08-31 Robert Dewar <dewar@adacore.com>
562
563 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
564
565 2011-08-31 Tristan Gingold <gingold@adacore.com>
566
567 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
568 hold variables between these following subprograms.
569 (Build_Exception_Handler, Build_Object_Declarations,
570 Build_Raise_Statement): Use the above type as parameter.
571 Make the above adjustments.
572 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
573
574 2011-08-31 Pascal Obry <obry@adacore.com>
575
576 * projects.texi: Minor reformatting.
577
578 2011-08-31 Tristan Gingold <gingold@adacore.com>
579
580 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
581 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
582
583 2011-08-31 Ed Schonberg <schonberg@adacore.com>
584
585 * exp_ch5.adb: Minor code cleanup.
586 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
587 prevent cascaded errors.
588 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
589 variable of an iterator specification in current scope.
590 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
591 postconditions on the stack, as they contain no return statements.
592
593 2011-08-31 Yannick Moy <moy@adacore.com>
594
595 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
596 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
597 call Qualify_Entity_Names.
598 (Expand_Alfa): call Qualify_Entity_Names in more cases
599 * lib-xref-alfa.adb: Take into account system package.
600 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
601 CodePeer mode in which we are interested in finding bugs even if
602 compiler cannot compile source.
603 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
604 deferred constant.
605
606 2011-08-31 Gary Dismukes <dismukes@adacore.com>
607
608 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
609 denoted by the subtype mark to ensure getting the concurrent type in
610 the case where the subtype mark denotes a private subtype of a
611 concurrent type (needed when using -gnatc).
612 (Process_Subtype): For the processing specific to type kinds, case on
613 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
614 subtype denotes a private subtype whose base type is nonprivate (needed
615 for subtypes of private fulfilled by task types when compiling with
616 -gnatc).
617
618 2011-08-31 Gary Dismukes <dismukes@adacore.com>
619
620 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
621 late primitives that override interface operations when the full
622 expander is not active, to avoid blowups in Register_Primitive when
623 types don't have associated secondary dispatch tables.
624
625 2011-08-31 Yannick Moy <moy@adacore.com>
626
627 * alfa_test.adb: Code clean up.
628
629 2011-08-31 Marc Sango <sango@adacore.com>
630
631 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
632 by Comes_From_Source (Original_Node (N)) in order to treat also the
633 nodes which have been rewritten.
634 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
635 explicit dereference and slice violation in spark mode on the nodes
636 coming only from the source code.
637
638 2011-08-31 Robert Dewar <dewar@adacore.com>
639
640 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
641 lib-xref-alfa.adb: Minor reformatting.
642
643 2011-08-31 Matthew Heaney <heaney@adacore.com>
644
645 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
646
647 2011-08-31 Javier Miranda <miranda@adacore.com>
648
649 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
650 only for class-wide subprograms conflicting with entities of concurrent
651 tagged types.
652
653 2011-08-31 Matthew Heaney <heaney@adacore.com>
654
655 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
656 node to null value.
657
658 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
659
660 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
661 general description of the routine.
662
663 2011-08-31 Ed Schonberg <schonberg@adacore.com>
664
665 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
666 doubly-linked lists.
667
668 2011-08-31 Gary Dismukes <dismukes@adacore.com>
669
670 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
671 check is needed for a left-hand side that is a dereference, and the
672 base type is private without discriminants (whereas the full type does
673 have discriminants), an extra retrieval of the underlying type may be
674 needed in the case where the subtype is a record subtype whose base
675 type is private. Update comments.
676
677 2011-08-31 Javier Miranda <miranda@adacore.com>
678
679 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
680 found check if there is a class-wide subprogram covering the primitive.
681
682 2011-08-31 Yannick Moy <moy@adacore.com>
683
684 * sem_res.adb: Further cases where full expansion test is needed,
685 rather than expansion test.
686
687 2011-08-31 Pascal Obry <obry@adacore.com>
688
689 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
690
691 2011-08-31 Ed Schonberg <schonberg@adacore.com>
692
693 * exp_ch5.adb: Handle iterators over derived container types.
694
695 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
696
697 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
698 (Has_Anonymous_Master): New routine.
699 (Set_Has_Anonymous_Master): New routine.
700 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
701 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
702 (Current_Anonymous_Master): New routine.
703 (Current_Unit_First_Declaration): Removed.
704 (Current_Unit_Scope): Removed.
705 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
706 their objects on a per-unit heterogeneous finalization master.
707
708 2011-08-31 Matthew Heaney <heaney@adacore.com>
709
710 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
711 array.
712
713 2011-08-31 Jose Ruiz <ruiz@adacore.com>
714
715 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
716 when not needed.
717
718 2011-08-31 Gary Dismukes <dismukes@adacore.com>
719
720 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
721 where the actual is an unexpanded call to 'Input.
722
723 2011-08-31 Yannick Moy <moy@adacore.com>
724
725 * sem_ch4.adb: Code clean up.
726
727 2011-08-31 Yannick Moy <moy@adacore.com>
728
729 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
730
731 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
732
733 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
734 and TSS primitive Finalize_Address if finalization is suppressed.
735 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
736 primitive Finalize_Address if finalization is suppressed.
737
738 2011-08-31 Jose Ruiz <ruiz@adacore.com>
739
740 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
741 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
742 sure that the underlying task has already been created before trying
743 to change its affinity.
744 (Set_CPU): Use the term processor instead of CPU, as we do in
745 Assign_Task.
746
747 2011-08-31 Vincent Celier <celier@adacore.com>
748
749 * prj-attr.adb: New Compiler attribute Source_File_Switches.
750 * prj-nmsc.adb (Process_Compiler): Process attribute
751 Source_File_Switches.
752 * prj.ads (Language_Config): New name list component
753 Name_Source_File_Switches.
754 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
755
756 2011-08-31 Ed Schonberg <schonberg@adacore.com>
757
758 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
759 discriminated component of an actual, expand at once to prevent
760 ouf-of-order references with generated subtypes.
761
762 2011-08-31 Yannick Moy <moy@adacore.com>
763
764 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
765 reference to operator in Alfa xrefs.
766
767 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
768
769 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
770 where the parent instance was frozen before the current instance due to
771 the presence of a source body. Update calls to Insert_After_Last_Decl.
772 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
773 Update the comment which illustrates the purpose of the routine.
774 Package instances are now frozen by source bodies which appear after
775 the instance. This ensures that entities coming from within the
776 instance are available for use in the said bodies.
777 (Install_Body): Add code to handle the case where the parent instance
778 was frozen before the current instance due to the presence of a source
779 body. Update calls to Insert_After_Last_Decl.
780
781 2011-08-31 Jose Ruiz <ruiz@adacore.com>
782
783 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
784 access types.
785 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
786
787 2011-08-31 Yannick Moy <moy@adacore.com>
788
789 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
790 full-expander test.
791 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
792 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
793 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
794 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
795 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
796 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
797 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
798 ALFA in Alfa (we dropped acronym).
799 * einfo.adb (Primitive_Operations): Correctly return list of primitive
800 operations in a case where it returned previously No_Elist.
801
802 2011-08-31 Robert Dewar <dewar@adacore.com>
803
804 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
805 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
806 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
807 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
808 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
809 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
810 reformatting.
811
812 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
813
814 * sem_ch12 (Check_Private_View): Revert previous change.
815 * sem_res.adb (Conversion_Check): Do not emit the error message if the
816 conversion is in a generic instance.
817
818 2011-08-31 Matthew Heaney <heaney@adacore.com>
819
820 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
821 * a-chtgbo.adb (Free): Allow 0 as index value.
822
823 2011-08-31 Matthew Heaney <heaney@adacore.com>
824
825 * a-cborma.adb (Insert): Add comment to explain why no element
826 assignment.
827
828 2011-08-31 Gary Dismukes <dismukes@adacore.com>
829
830 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
831 spec discriminant is already a concurrent type, in which case just use
832 it, otherwise fetch the Corresponding_Concurrent_Type as before.
833
834 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
835
836 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
837 system-linux-mips.ads, system-linux-mipsel.ads,
838 system-linux-mips64el.ads, system-linux-ppc64.ads,
839 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
840
841 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
842
843 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
844 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
845 (build_unary_op): Likewise.
846
847 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
848
849 * raise-gcc.c: Do not include coretypes.h and tm.h.
850 (setup_to_install): Remove test for compiler macro.
851 * targext.c: Document use for the library.
852 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
853
854 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
855
856 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
857 the expression to the nominal type if the latter is a record type with
858 a variant part and the type of the former is a record type without one.
859
860 2011-08-30 Yannick Moy <moy@adacore.com>
861
862 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
863 expansion in Alfa mode.
864 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
865 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
866 Alfa mode.
867 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
868 * sem_res.adb: Ditto.
869 * gcc-interface/Make-lang.in: Update dependencies.
870
871 2011-08-30 Thomas Quinot <quinot@adacore.com>
872
873 * g-socket.ads: Minor documentation adjustment.
874
875 2011-08-30 Robert Dewar <dewar@adacore.com>
876
877 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
878
879 2011-08-30 Yannick Moy <moy@adacore.com>
880
881 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
882 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
883 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
884 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
885 Revert change which introduced files for "light"
886 expansion, to be replaced by a single file for Alfa expansion.
887
888 2011-08-30 Robert Dewar <dewar@adacore.com>
889
890 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
891 Minor code reorg/reformatting.
892
893 2011-08-30 Yannick Moy <moy@adacore.com>
894
895 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
896 common shorthand for (Expander_Active and not ALFA_Mode) that can be
897 used for testing full expansion, that is active expansion not in the
898 reduced mode for Alfa
899 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
900 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
901 of the verbose (Expander_Active and not ALFA_Mode)
902
903 2011-08-30 Tristan Gingold <gingold@adacore.com>
904
905 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
906 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
907 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
908 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
909
910 2011-08-30 Gary Dismukes <dismukes@adacore.com>
911
912 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
913 access conversions to check that the conversion is a rewritten node,
914 rather than just having Comes_From_Source set to False, which wasn't
915 sufficient.
916
917 2011-08-30 Robert Dewar <dewar@adacore.com>
918
919 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
920 g-socket.ads: Minor reformatting.
921
922 2011-08-30 Thomas Quinot <quinot@adacore.com>
923
924 * sem_util.adb: Minor reformatting.
925
926 2011-08-30 Tristan Gingold <gingold@adacore.com>
927
928 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
929 to be compliant with the ABI.
930
931 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
932
933 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
934 of a designated type when the related access type is an actual in an
935 instance. This ensures that the full view of designated type is
936 available when inside the body of the instance.
937
938 2011-08-30 Ed Schonberg <schonberg@adacore.com>
939
940 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
941 in a position to be modified, a slice is treated like an indexed
942 component.
943
944 2011-08-30 Thomas Quinot <quinot@adacore.com>
945
946 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
947 field tv_sec in struct timeval.
948
949 2011-08-30 Yannick Moy <moy@adacore.com>
950
951 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
952 blocks of code doing full expansion, previously only guarded by
953 Expander_Active, by anding the test that ALFA_Mode is not set
954
955 2011-08-30 Ed Schonberg <schonberg@adacore.com>
956
957 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
958 add the function to the list of private dependents, for subsequent
959 legality check on Taft amendment types.
960 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
961 Private_Dependents, as for other incomplete types.
962 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
963 Taft-amendment type is used as the return type of a function.
964
965 2011-08-30 Javier Miranda <miranda@adacore.com>
966
967 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
968 which emits an error by a call to a new routine which report the error.
969 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
970 entity does not cover an existing interface.
971 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
972 code.
973 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
974 protected procedures or entries whose mode is not conformant.
975 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
976 an error by a call to a new routine which report the error.
977
978 2011-08-30 Robert Dewar <dewar@adacore.com>
979
980 * gnat_rm.texi: Minor change.
981 * exp_attr_light.adb: Minor reformatting.
982
983 2011-08-30 Ed Schonberg <schonberg@adacore.com>
984
985 * sem_ch3.adb: Patch inheritance of aspects in
986 Complete_Private_Subtype, to avoid infinite loop.
987
988 2011-08-30 Javier Miranda <miranda@adacore.com>
989
990 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
991 been reported and a subprogram covering an interface primitive is not
992 found then skip generating the internal entity. Done to avoid crashing
993 the frontend.
994 (Check_Abstract_Overriding): Change text of error of wrong formal of
995 protected subprogram or entry. Done for consistency to emit exactly the
996 same error reported by Check_Synchronized_Overriding. In addition, the
997 error is restricted to protected types (bug found working on AI05-0090)
998
999 2011-08-30 Yannick Moy <moy@adacore.com>
1000
1001 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1002 expansion in Alfa mode.
1003 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
1004 * exp_light.adb, exp_light.ads: New package defining light expansion.
1005 * expander.adb (Expand): Call light expansion in Alfa mode
1006 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
1007 constructs.
1008 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
1009 constructs.
1010 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
1011 * gnat1drv.adb (Adjust_Global_Switches): Comment
1012
1013 2011-08-30 Yannick Moy <moy@adacore.com>
1014
1015 * lib-xref-alfa.adb: Minor refactoring.
1016
1017 2011-08-30 Yannick Moy <moy@adacore.com>
1018
1019 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
1020 mode.
1021 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
1022 expansion in Alfa mode.
1023 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
1024 mode.
1025
1026 2011-08-30 Robert Dewar <dewar@adacore.com>
1027
1028 * debug_a.adb: Update comment.
1029
1030 2011-08-30 Robert Dewar <dewar@adacore.com>
1031
1032 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
1033 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
1034 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
1035 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
1036
1037 2011-08-30 Robert Dewar <dewar@adacore.com>
1038
1039 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
1040 volatile.
1041
1042 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1043
1044 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
1045 Build_Finalization_Master by supplying an insertion node and enclosing
1046 scope. In its old version, the call did not generate a finalization
1047 master.
1048 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
1049 recognize anonymous access-to-controlled components. Rewrite the
1050 machinery which creates finalization masters to service anonymous
1051 access-to-controlled components of a record type. In its current state,
1052 only one heterogeneous master is necessary to handle multiple anonymous
1053 components.
1054 (Freeze_Type): Comment reformatting.
1055 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
1056 RE_Unit_Table.
1057 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
1058 associates TSS primitive Finalize_Address with either the master itself
1059 or with the internal hash table depending on the mode of operation of
1060 the master.
1061
1062 2011-08-30 Javier Miranda <miranda@adacore.com>
1063
1064 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
1065 interface type then do not generate code to compare this component.
1066 Required since they have no components and their equality operator is
1067 abstract.
1068
1069 2011-08-30 Steve Baird <baird@adacore.com>
1070
1071 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1072 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1073 returns the (static) accessibility level of the object. Otherwise, the
1074 same as Type_Access_Level.
1075 (Dynamic_Accessibility_Level): New function; given an expression which
1076 could occur as the rhs of an assignment to a saooaaat (i.e., an
1077 expression of an access-to-object type), return the new value for the
1078 saooaaat's associated Extra_Accessibility object.
1079 (Effective_Extra_Accessibility): New function; same as
1080 Einfo.Extra_Accessibility except that object renames are looked through.
1081 * sem_util.adb
1082 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1083 (Dynamic_Accessibility_Level): New function; see sem_util.ads
1084 description.
1085 (Effective_Extra_Accessibility): New function; see sem_util.ads
1086 description.
1087 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1088 (Extra_Accessibility): Update comments.
1089 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1090 except RM_Size field (which is only for types) is unaffected.
1091 * einfo.adb
1092 (Extra_Accessibility): Expand domain to allow objects, not just formals.
1093 (Set_Extra_Accessibility): Expand domain to allow objects, not just
1094 formals.
1095 (Init_Size): Add assertion that we are not trashing the
1096 Extra_Accessibility attribute of an object.
1097 (Init_Size_Align): Add assertion that we are not trashing the
1098 Extra_Accessibility attribute of an object.
1099 (Init_Object_Size_Align): New procedure; see einfo.ads description.
1100 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1101 differently for the type of a (non-library-level) saooaaat depending
1102 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1103 is queried in this set of changes - everything else (in particular,
1104 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1105 driven off of the setting of the Is_Local_Anonymous_Access attribute.
1106 The special treatment of library-level saooaaats is an optimization,
1107 not required for correctnesss. This is based on the observation that the
1108 Ada2012 rules (static and dynamic) for saooaaats turn out to be
1109 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1110 * exp_ch3.adb
1111 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1112 false for the type of a saooaaat, declare and initialize its
1113 accessibility level object and set the Extra_Accessibility attribute
1114 of the saooaaat to refer to this object.
1115 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1116 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1117 calls to Effective_Extra_Accessibility in order to support
1118 renames of saooaaats.
1119 (Expand_N_Type_Conversion): Add new local function,
1120 Has_Extra_Accessibility, and call it when determining whether an
1121 accessibility check is needed.
1122 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1123 evaluate to True (without raising an exception).
1124 * exp_ch5.adb
1125 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1126 saooaaat, update its associated Extra_Accessibility object (if
1127 it has one). This includes an accessibility check.
1128 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1129 a saooaaat, update its Extra_Accessibility object too (if it
1130 has one).
1131 (Expand_Call): Replace a couple of calls to Type_Access_Level
1132 with calls to Dynamic_Access_Level to handle cases where
1133 passing a literal (any literal) is incorrect.
1134 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1135 checks associated with "Saooaat := Some_Object'Access;"; this must
1136 be rejected if Some_Object is declared in a more nested scope
1137 than Saooaat.
1138 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1139 assignment to a saooaaat even if Is_Local_Anonymous_Access
1140 returns False for its type (indicating a 2012-style saooaaat).
1141 * sem_ch8.adb
1142 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1143 (which is only appropriate for objects, not types) with a call
1144 of Init_Object_Size_Align in order to avoid trashing the
1145 Extra_Accessibility attribute of a rename (the two attributes
1146 share storage).
1147 * sem_res.adb
1148 (Valid_Conversion) Replace six calls to Type_Access_Level with
1149 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1150 Ada2012 non-library-level saooaaat, the former returns library level
1151 while the latter returns the (static) accessibility level of the
1152 saooaaat. A type conversion to the anonymous type of a saooaaat
1153 can only occur as part of an assignment to the saooaaat, so we
1154 know that such a conversion must be in a lhs context, so Deepest
1155 yields the result that we need. If such a conversion could occur,
1156 say, as the operand of an equality operator, then this might not
1157 be right. Also add a test so that static accessibilty checks are
1158 performed for converting to a saooaaat's type even if
1159 Is_Local_Anonymous_Access yields False for the type.
1160
1161 2011-08-30 Javier Miranda <miranda@adacore.com>
1162
1163 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1164 controls generation of a warning associated with late declaration of
1165 dispatching functions. Required to avoid generating spurious
1166 warnings.
1167
1168 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1169
1170 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1171 return object has an anonymous access type and the function's type is
1172 a named access type.
1173 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1174 conversions on implicit conversions, since such conversions can occur
1175 for anonymous access cases due to expansion. Issue error for attempt
1176 to rename an anonymous expression as an object of a named access type.
1177 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1178 to indicate whether this function should report errors on invalid
1179 conversions.
1180 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1181 the expression is of an anonymous access type and the expected type is
1182 a named general access type, rewrite the expression as a type
1183 conversion, unless this is an expression of a membership test.
1184 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1185 calling of Error_Msg_N on new formal Report_Errs.
1186 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1187 calling of Error_Msg_NE on new formal Report_Errs.
1188 (Valid_Conversion): Move declaration of this function to the package
1189 spec, to allow calls from membership test processing. For Ada 2012,
1190 enforce legality restrictions on implicit conversions of anonymous
1191 access values to general access types, disallowing such conversions in
1192 cases where the expression has a dynamic accessibility level (access
1193 parameters, stand-alone anonymous access objects, or a component of a
1194 dereference of one of the first two cases).
1195 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1196 in the context of a named general access expected type.
1197 * exp_ch4.adb Add with and use of Exp_Ch2.
1198 (Expand_N_In): Add processing for membership tests applied to
1199 expressions of an anonymous access type. First, Valid_Conversion is
1200 called to check whether the test is statically False, and then the
1201 conversion is expanded to test that the expression's accessibility
1202 level is no deeper than that of the tested type. In the case of
1203 anonymous access-to-tagged types, a tagged membership test is applied
1204 as well.
1205 (Tagged_Membership): Extend to handle access type cases, applying the
1206 test to the designated types.
1207 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1208 accessibility level, and the actual is a 'Access applied to a current
1209 instance, pass the accessibility level of the type of the current
1210 instance rather than applying Object_Access_Level to the prefix. Add a
1211 ??? comment, since this level isn't quite right either (will eventually
1212 need to pass an implicit level parameter to init procs).
1213
1214 2011-08-30 Bob Duff <duff@adacore.com>
1215
1216 * s-taskin.ads: Minor comment fix.
1217
1218 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1219
1220 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1221 component and the selector is a dispatching operation, check if it is
1222 a prefixed call before rewriting as a parameterless function call.
1223
1224 2011-08-29 Jakub Jelinek <jakub@redhat.com>
1225
1226 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1227 tsystem.h into $(RTSDIR) instead of rts.
1228
1229 2011-08-29 Robert Dewar <dewar@adacore.com>
1230
1231 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1232 reformatting.
1233 * gcc-interface/Make-lang.in: Update dependencies.
1234
1235 2011-08-29 Yannick Moy <moy@adacore.com>
1236
1237 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1238 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1239 table to hold dereferences.
1240 (Add_ALFA_Xrefs): Take into account dereferences as special
1241 reads/writes to the variable "HEAP".
1242 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1243 (Generate_Dereference): New procedure to store a read/write dereferencew
1244 in the table Drefs.
1245 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1246 the special "HEAP" var.
1247 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1248 in ALFA mode.
1249 * sem_util.adb (Note_Possible_Modification): Store write dereference
1250 in ALFA mode.
1251
1252 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1253
1254 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1255 ensures that the level of the subpool access type is not deeper than
1256 that of the pool object.
1257 * sem_util.adb (Object_Access_Level): Expand to handle defining
1258 identifiers.
1259 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1260 subpool handle name of a rewritten allocator.
1261
1262 2011-08-29 Robert Dewar <dewar@adacore.com>
1263
1264 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1265
1266 2011-08-29 Thomas Quinot <quinot@adacore.com>
1267
1268 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1269 values, we generate multiple triples of parameters in the TypeCode.
1270 Bump Choice_Index for each such triple so that a subsequent default
1271 choice is associated with the correct index in the typecode.
1272
1273 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1274
1275 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1276 container.
1277 (First, Last): Handle properly an iterator over a null container.
1278
1279 2011-08-29 Bob Duff <duff@adacore.com>
1280
1281 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
1282 processing if we run across a node with no Scope. This can happen if
1283 we're with-ing an library-level instance, and that instance got errors
1284 that caused "instantiation abandoned".
1285 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
1286 an exception instead of using Assert, so it won't go into an infinite
1287 loop, even when assertions are turned off.
1288
1289 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1290
1291 * a-coorse.adb: Proper handling of empty ordered sets.
1292
1293 2011-08-29 Johannes Kanig <kanig@adacore.com>
1294
1295 * debug.adb: Add comments.
1296
1297 2011-08-29 Thomas Quinot <quinot@adacore.com>
1298
1299 * a-except.adb, a-except-2005.adb: Minor comment rewording and
1300 reformatting.
1301
1302 2011-08-29 Yannick Moy <moy@adacore.com>
1303
1304 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
1305 declaration for Itypes in Alfa mode.
1306
1307 2011-08-29 Robert Dewar <dewar@adacore.com>
1308
1309 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
1310 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1311 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
1312 reformatting.
1313
1314 2011-08-29 Tristan Gingold <gingold@adacore.com>
1315
1316 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
1317 package spec.
1318 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
1319 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
1320 while raising PE.
1321
1322 2011-08-29 Robert Dewar <dewar@adacore.com>
1323
1324 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1325
1326 2011-08-29 Javier Miranda <miranda@adacore.com>
1327
1328 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1329 renamings of formal subprograms when the actual for a formal type is
1330 class-wide.
1331
1332 2011-08-29 Matthew Heaney <heaney@adacore.com>
1333
1334 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1335 to Target.
1336
1337 2011-08-29 Matthew Heaney <heaney@adacore.com>
1338
1339 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1340 components of record type.
1341 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1342 to Target.
1343
1344 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1345
1346 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1347 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1348 container packages.
1349
1350 2011-08-29 Robert Dewar <dewar@adacore.com>
1351
1352 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1353 reformatting.
1354
1355 2011-08-29 Matthew Heaney <heaney@adacore.com>
1356
1357 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1358 components of record type.
1359
1360 2011-08-29 Bob Duff <duff@adacore.com>
1361
1362 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1363 by the termination handler.
1364
1365 2011-08-29 Yannick Moy <moy@adacore.com>
1366
1367 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1368 created in Alfa mode, instead of inserting artificial declarations of
1369 non-Itypes in the tree.
1370 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1371 know if an Itype has a corresponding declaration, as defined in
1372 itypes.ads.
1373
1374 2011-08-29 Yannick Moy <moy@adacore.com>
1375
1376 * gnat1drv.adb: Minor rewrite.
1377
1378 2011-08-29 Bob Duff <duff@adacore.com>
1379
1380 * s-tasuti.adb (Make_Passive): Work around race condition in
1381 Make_Independent, which can cause Wait_Count to be zero. So instead of
1382 asserting that Wait_Count > 0, and then decrementing it, decrement it
1383 only if Wait_Count > 0.
1384 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1385 should be nonnegative, so declare them Natural instead of Integer.
1386
1387 2011-08-29 Robert Dewar <dewar@adacore.com>
1388
1389 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1390 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1391 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1392 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1393 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1394
1395 2011-08-29 Tristan Gingold <gingold@adacore.com>
1396
1397 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1398
1399 2011-08-29 Vadim Godunko <godunko@adacore.com>
1400
1401 * s-parint.ads: Minor comment clarification.
1402
1403 2011-08-29 Vincent Celier <celier@adacore.com>
1404
1405 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1406 may be used as identifiers.
1407
1408 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1409
1410 * a-coinho.ads: Minor reformating.
1411
1412 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1413
1414 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1415 container of a derived type.
1416
1417 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1418
1419 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1420 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1421
1422 2011-08-29 Pascal Obry <obry@adacore.com>
1423
1424 * exp_disp.adb: Minor comment fix.
1425 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1426 to avoid warnings when compiling with -Wall.
1427 (Make_Disp_Conditional_Select_Body): Likewise.
1428 (Make_Disp_Timed_Select_Body): Likewise.
1429
1430 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1431
1432 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1433 an entity name, generate reference for it.
1434
1435 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1436
1437 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1438 iterator form.
1439 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1440 the class-wide type.
1441 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1442
1443 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1444
1445 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1446 subtype for an object whose type is an unconstrained union.
1447
1448 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1449
1450 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1451 is allowed in a component definition, by AI95-406.
1452
1453 2011-08-29 Matthew Heaney <heaney@adacore.com>
1454
1455 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1456
1457 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1458
1459 * a-except-2005.adb: Alphabetize all routines.
1460 (Triggered_By_Abort): New routine.
1461 * a-except-2005.ads (Triggered_By_Abort): New routine.
1462 * a-except.adb Alphabetize all routines.
1463 (Triggered_By_Abort): New routine.
1464 * a-except.ads (Triggered_By_Abort): New routine.
1465 * exp_ch7.adb: Update all comments involving the detection of aborts in
1466 finalization code.
1467 (Build_Object_Declarations): Do not generate code to detect the
1468 presence of an abort at the start of finalization code, use a runtime
1469 routine istead.
1470 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1471 RE_Unit_Table.
1472 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1473 allocate a task on a subpool.
1474 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1475 The flag disables all actions related to the maintenance of
1476 Finalize_Address_Table when subpools are not in use.
1477 (Allocate_Any_Controlled): Signal the machinery that subpools are in
1478 use.
1479 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1480 performs costly task locking when subpools are not in use.
1481
1482 2011-08-29 Yannick Moy <moy@adacore.com>
1483
1484 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1485 types and dispatching calls in Alfa mode.
1486 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1487 correspondance between body and spec scopes, to reuse utility functions
1488 (Traverse_Declarations_Or_Statements): Protect access to body for stub
1489 by testing the presence of the library unit for the body
1490 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1491 mode the expansion of accept statements is skipped
1492 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1493 the unique entity corresponding to the one returned by
1494 Unique_Defining_Entity applied to the enclosing declaration of the
1495 argument.
1496
1497 2011-08-29 Bob Duff <duff@adacore.com>
1498
1499 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1500 gdb when x is not a node (it can be a node list, name_id, etc). pp is
1501 an alias for pn. ppp is an alias for pt.
1502
1503 2011-08-29 Javier Miranda <miranda@adacore.com>
1504
1505 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1506 aggregate to take a consistent decision on the need to convert into
1507 assignments aggregates that initialize constant objects.
1508
1509 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1510
1511 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1512 Build_Allocate_Deallocate_Proc in order to handle allocation of
1513 non-controlled objects on subpools.
1514 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1515 to be end-user visible.
1516 * s-finmas.adb: Add with and use clause for System.HTable.
1517 Add an instantiation of Simple_HTable which provides a mapping between
1518 the address of a controlled object and the corresponding
1519 Finalize_Address used to clean up the object. The table is used when a
1520 master is operating in heterogeneous mode.
1521 (Attach): Explain why the input node is not verified on being already
1522 attached.
1523 (Delete_Finalize_Address): New routine.
1524 (Detach): Add pragma Assert which ensures that a node is already
1525 attached.
1526 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1527 since nodes are no longer removed on traversal. Explain why node
1528 detachment is undesirable in this case.
1529 (Get_Finalize_Address): New routine.
1530 (Hash): New routine.
1531 (Is_Empty_List): Removed.
1532 (pm): Renamed to Print_Master. Add output for discriminant
1533 Is_Homogeneous.
1534 Comment reformatting.
1535 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1536 * s-finmas.ads: Various comments additions / improvements.
1537 Type Finalization_Master has a discriminant which determines the mode of
1538 operation.
1539 (Delete_Finalize_Address): New routine.
1540 (Get_Finalize_Address): New routine.
1541 (pm): Renamed to Print_Master.
1542 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1543 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1544 use clause for System.IO.
1545 (Allocate_Any_Controlled): Add machinery to set TSS primitive
1546 Finalize_Address depending on the mode of allocation and the mode of
1547 the master.
1548 (Deallocate_Any_Controlled): Remove the relation pair object -
1549 Finalize_Address regardless of the master mode. Add comment explaining
1550 the reason.
1551 (Detach): Ensure that fields Prev and Next are null after detachment.
1552 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1553 scheme to check whether the list of subpools is empty. There is no
1554 longer need to store the next subpool or advance the current pointer.
1555 (Is_Empty_List): New routine.
1556 (Print_Pool): New routine.
1557 (Print_Subpool): New routine.
1558 * s-stposu.ads: Various comments additions / improvements.
1559 Field Master of type Root_Subpool is now a heterogeneous collection.
1560 (Print_Pool): New routine.
1561 (Print_Subpool): New routine.
1562
1563 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1564
1565 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1566 forms, using aspects of container types.
1567 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1568 Has_Implicit_Dereference flags, that may be set on the partial view.
1569 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1570 container type with an indexing aspect.
1571 (Analyze_Quantified_Expression): Analyze construct with expansion
1572 disabled, because it will be rewritten as a loop during expansion.
1573 (Try_Container_Indexing): The prefix itself may be a container type
1574 with an indexing aspect, as with a vector of vectors.
1575 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1576 the original doamin of iteration, for name capture.
1577 (Analyze_Iterator_Specification): If the domain is an expression that
1578 needs finalization, create a separate declaration for it.
1579 For an iterator with "of" retrieve default iterator info from aspect of
1580 container type. For "in" iterator, retrieve type of Iterate function.
1581 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1582 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1583 analysis, to prevent spurious errors about late attributes.
1584 * sprint.adb: Handle quantified expression with either loop or iterator
1585 specification.
1586 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1587 iterator.
1588
1589 2011-08-29 Vincent Celier <celier@adacore.com>
1590
1591 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1592 Binder or Linker of the main project file.
1593
1594 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1595
1596 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1597 unit.
1598
1599 2011-08-29 Yannick Moy <moy@adacore.com>
1600
1601 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1602
1603 2011-08-29 Yannick Moy <moy@adacore.com>
1604
1605 * exp_ch11.adb: Minor expansion of comment.
1606
1607 2011-08-29 Yannick Moy <moy@adacore.com>
1608
1609 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1610
1611 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1612
1613 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1614 interpretation, set the type before resolving the operands, because
1615 legality checks on an exponention operand need to know the type of the
1616 context.
1617
1618 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1619
1620 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1621 cleanups on a master if the instance is within a generic unit.
1622 Complement to the corresponding fix to inline.adb for K520-030.
1623
1624 2011-08-29 Tristan Gingold <gingold@adacore.com>
1625
1626 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1627 occurrence.
1628 * exp_intr.adb: Minor comment fix.
1629
1630 2011-08-29 Bob Duff <duff@adacore.com>
1631
1632 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1633 Delay_Required was used as an uninitialized variable.
1634
1635 2011-08-29 Robert Dewar <dewar@adacore.com>
1636
1637 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1638 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1639 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1640
1641 2011-08-29 Thomas Quinot <quinot@adacore.com>
1642
1643 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1644 Remove unused variables.
1645
1646 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1647
1648 * sem_res.adb: Remove Build_Explicit_Dereference.
1649 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1650 from sem_res.adb, used in analysis of additional constructs.
1651 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1652 expansion of iterators.
1653 (Is_Object_Reference): Recognize variables rewritten as explicit
1654 dereferences in Ada2012.
1655 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1656 Reversible_Iterator names, for expansion of Ada2012 iterators.
1657 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1658 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1659 linked list container.
1660 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1661 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1662
1663 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1664
1665 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1666 containers.
1667
1668 2011-08-29 Vincent Celier <celier@adacore.com>
1669
1670 * make.adb (Gnatmake): Get the maximum number of simultaneous
1671 compilation processes after the Builder switches has been scanned, as
1672 there may include -jnn.
1673
1674 2011-08-29 Matthew Heaney <heaney@adacore.com>
1675
1676 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1677
1678 2011-08-29 Tristan Gingold <gingold@adacore.com>
1679
1680 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1681 GNAT_DRIVER_COMMAND_LINE to 255.
1682
1683 2011-08-29 Pascal Obry <obry@adacore.com>
1684
1685 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1686 reformatting and style fix (class attribute casing).
1687
1688 2011-08-29 Yannick Moy <moy@adacore.com>
1689
1690 * exp_ch11.adb: Yet another case where expansion should be common
1691 between CodePeer and Alfa.
1692
1693 2011-08-29 Yannick Moy <moy@adacore.com>
1694
1695 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1696
1697 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1698
1699 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1700 incomplete type and its completion match.
1701
1702 2011-08-29 Yannick Moy <moy@adacore.com>
1703
1704 * exp_ch13.adb: Adjust previous change.
1705
1706 2011-08-29 Robert Dewar <dewar@adacore.com>
1707
1708 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1709 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1710 Minor reformatting.
1711
1712 2011-08-29 Emmanuel Briot <briot@adacore.com>
1713
1714 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1715 initialize aggregated projects.
1716
1717 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1718
1719 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1720 depth of candidates to resolve a potentially spurious ambiguity between
1721 two visible subprograms.
1722
1723 2011-08-29 Yannick Moy <moy@adacore.com>
1724
1725 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1726 Requires/Ensures.
1727 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1728 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1729 Requires/Ensures.
1730
1731 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1732
1733 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1734 Add comment.
1735
1736 2011-08-29 Thomas Quinot <quinot@adacore.com>
1737
1738 * sem_res.adb: Minor reformatting.
1739
1740 2011-08-29 Johannes Kanig <kanig@adacore.com>
1741
1742 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1743 mode.
1744 * gnat1drv.adb (Adjust_Global_Switches): Set
1745 Use_Expressions_With_Actions to False in ALFA mode.
1746 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1747 ALFA mode.
1748
1749 2011-08-29 Yannick Moy <moy@adacore.com>
1750
1751 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1752 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1753 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1754 tagged types and dispatching calls in Alfa mode.
1755
1756 2011-08-29 Javier Miranda <miranda@adacore.com>
1757
1758 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1759 we do not report an error on an Empty node.
1760
1761 2011-08-29 Geert Bosch <bosch@adacore.com>
1762
1763 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1764 a-nlrear.o and a-nurear.o.
1765
1766 2011-08-29 Robert Dewar <dewar@adacore.com>
1767
1768 * freeze.adb: Minor code reorganization.
1769 Minor reformatting.
1770 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1771 sem_ch6.adb: Minor reformatting
1772
1773 2011-08-29 Tristan Gingold <gingold@adacore.com>
1774
1775 * s-except.ads, s-except.adb: Provide dummy body.
1776
1777 2011-08-29 Yannick Moy <moy@adacore.com>
1778
1779 * sem_warn.adb (Within_Postcondition): Take into account the case of
1780 an Ensures component in a Test_Case.
1781
1782 2011-08-29 Tristan Gingold <gingold@adacore.com>
1783
1784 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1785 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1786 System_Exceptions_Debug
1787 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1788 * a-except.adb: With and use System.Exceptions_Debug instead of
1789 System.Exceptions.
1790 * a-except-2005.adb: Likewise.
1791 * s-assert.adb: Likewise.
1792 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1793 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1794 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1795 s-excdeb. Update dependencies.
1796 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1797 as these no longer need external libraries.
1798
1799 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1800
1801 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1802 exponentiation operator on universal values in a context that requires
1803 a fixed-point type.
1804
1805 2011-08-29 Tristan Gingold <gingold@adacore.com>
1806
1807 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
1808 before calling notify_handled_exception.
1809 * a-exextr.adb: Fix comment.
1810
1811 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1812
1813 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1814 Finalize_Address of the access type's finalization master.
1815 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1816 access type's finalization master. Add a guard to prevent
1817 Associated_Storage_Pool from being set on .NET/JVM.
1818 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1819 attribute Finalize_Address of the access type's finalization master.
1820 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
1821 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
1822 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
1823 RE_Unit_Table.
1824 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
1825 use clause for System.IO
1826 (Detach): Relax the assertion, to be reinstated later.
1827 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
1828 Relax the assertion on Finalize_Address, to be reinstated later.
1829 (Is_Empty_List): New routine.
1830 (pm): New debug routine.
1831 (Set_Finalize_Address): New routine.
1832 * s-finmas.ads (pm): New debug routine.
1833 (Set_Finalize_Address): New routine.
1834 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
1835
1836 2011-08-29 Tristan Gingold <gingold@adacore.com>
1837
1838 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
1839 Remove convention C.
1840
1841 2011-08-29 Tristan Gingold <gingold@adacore.com>
1842
1843 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
1844 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
1845 (Finalize_TCB): Remove its finalization.
1846 (Initialize): Remove assignment of GET_Exc_Stack_Addr
1847 * s-soflin.adb (NT_Exc_Stack): Remove
1848 (Get_Exc_Stack_Addr_NT): Likewise.
1849 (Get_Exc_Stack_Addr_Soft): Likewise.
1850 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
1851 (Get_Exc_Stack_Addr): Likewise.
1852 (Get_Exc_Stack_Addr_Soft): Likewise
1853 * s-taspri-vms.ads (Exc_Stack_T): Remove.
1854 (Exc_Stack_Ptr_T): Likewise.
1855 (Private_Data): Remove Exc_Stack_Ptr component.
1856
1857 2011-08-29 Tristan Gingold <gingold@adacore.com>
1858
1859 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1860
1861 2011-08-29 Tristan Gingold <gingold@adacore.com>
1862
1863 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1864
1865 2011-08-29 Geert Bosch <bosch@adacore.com>
1866
1867 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1868 L2_Norm, Swap_Column): New generic subprograms
1869 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1870 L2_Norm, Swap_Column): Implement new subprograms in order to
1871 eliminate dependency on BLAS and LAPACK libraries in
1872 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1873 version. Forward_Eliminate/Back_Substitute can be used to put a
1874 matrix in row echelon or reduced row echelon form using partial
1875 pivoting.
1876 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1877 Swap_Column): Instantiate from System.Generic_Array_Operations.
1878 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1879 (Sqrt): Local function for simple computation of square root without
1880 adding dependencies on Generic_Elementary_Functions.
1881 (Swap): New subprogram to exchange floating point numbers.
1882 (Inverse): Reimplement using Jordan-Gauss elimination.
1883 (Jacobi): New procedure implementing Jacobi's method for computation
1884 of eigensystems, based on Rutishauser's implementation.
1885 (L2_Norm): Implement directly using the inner product.
1886 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1887 decreasing eigenvalue as required by the Ada RM.
1888 (Swap_Column): New helper procedure for Sort_Eigensystem.
1889 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1890 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1891 Sort_Eigensystems.
1892
1893 2011-08-29 Thomas Quinot <quinot@adacore.com>
1894
1895 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1896 statements line.
1897
1898 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1899
1900 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1901 than the current node.
1902 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1903 Finalization_Master. The list headers have two fields instead of three.
1904 This should fix alignment issue but subpool allocations are now
1905 unusable. Alphabetize subprograms.
1906 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1907 the size of the header when converting the beginning of the object to
1908 a FM_Node. Set the master's Finalize_Address attribute if not already
1909 set.
1910 (Deallocate_Any_Controlled): Use the offset rather than the size of the
1911 header when converting the beginning of the object to a FM_Node.
1912
1913 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1914
1915 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1916 reraise when compiling for CodePeer.
1917
1918 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1919
1920 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1921 now needed by a-convec.adb. Fix warning.
1922
1923 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1924
1925 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1926 processing of TSS routine Finalize_Address when compiling in
1927 CodePeer_Mode.
1928
1929 2011-08-29 Thomas Quinot <quinot@adacore.com>
1930
1931 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1932 sem_warn.adb: Minor reformatting.
1933
1934 2011-08-29 Emmanuel Briot <briot@adacore.com>
1935
1936 * prj-conf.adb (Get_Config_Switches): Also collect the list of
1937 languages from aggregated projects.
1938
1939 2011-08-29 Yannick Moy <moy@adacore.com>
1940
1941 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1942 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1943 Traverse_Package_Declaration, Traverse_Subprogram_Body,
1944 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1945 for stubs are traversed too when parameter is set
1946 (Traverse_All_Compilation_Units): Traverse without going inside stubs
1947 (Traverse_Declarations_Or_Statements): Do the special traversing for
1948 stubs when required.
1949 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1950 return subprogram or package body from stub.
1951 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1952 stubs without prior subprogram decl.
1953
1954 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1955
1956 * gnat_ugn.texi: Fix typo.
1957
1958 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1959
1960 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1961 which accounts for size vs alignment issues and calculates the size of
1962 the list header.
1963 (Deallocate_Any_Controlled): Ditto.
1964 (Nearest_Multiple_Rounded_Up): New routine.
1965
1966 2011-08-29 Tristan Gingold <gingold@adacore.com>
1967
1968 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1969 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1970 (Set_Exception_Msg): Ditto.
1971 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
1972 Private_Data.
1973 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1974 Use Save_Occurrence instead of Save_Occurrence_No_Private.
1975 (Raise_With_Msg): Remove Cleanup_Flag.
1976 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1977 Clean_Flag and Private_Data components.
1978
1979 2011-08-29 Yannick Moy <moy@adacore.com>
1980
1981 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1982 in CodePeer mode.
1983 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1984 of an explicitly declared type, so that the base types of the original
1985 type and this generated type are the same, and a "type" (not a subtype
1986 like previously).
1987 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1988 small" in Alfa mode, like in CodePeer mode.
1989 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1990 clauses in Alfa mode.
1991
1992 2011-08-29 Javier Miranda <miranda@adacore.com>
1993
1994 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1995 function to the package spec.
1996 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1997 internally generated bodies of null procedures locate the internally
1998 generated spec enforcing mode conformance.
1999 (Is_Interface_Conformant): Ensure that the controlling formal of the
2000 primitives match.
2001
2002 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2003
2004 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
2005 reject the pragma if it appears to apply to a formal subprogram.
2006
2007 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2008
2009 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
2010 inner expression, to prevent double evaluation.
2011
2012 2011-08-29 Tristan Gingold <gingold@adacore.com>
2013
2014 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
2015 they were unused.
2016 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
2017 * a-except-2005.adb (Propagate_Exception): Adjust spec.
2018 (Raise_Current_Excep): Adjust call.
2019 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
2020
2021 2011-08-29 Thomas Quinot <quinot@adacore.com>
2022
2023 * exp_disp.adb: Minor reformatting.
2024
2025 2011-08-29 Tristan Gingold <gingold@adacore.com>
2026
2027 * a-exexpr.adb (Setup_Exception): Removed.
2028 * a-exexpr-gcc.adb (Setup_Exception): Removed.
2029 * a-except.adb (Exception_Propagation): Removed.
2030 * a-except-2005.adb (Setup_Exception): Removed.
2031 (Reraise): Remove call to Setup_Exception.
2032 (Reraise_Occurrence): Ditto.
2033 (Reraise_Occurrence_Always): Ditto.
2034 (Reraise_Occurrence_No_Defer): Ditto.
2035 (Transfer_Occurrence): Ditto.
2036 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
2037 (Set_Exception_Msg): Ditto.
2038
2039 2011-08-29 Robert Dewar <dewar@adacore.com>
2040
2041 * a-convec.adb, exp_disp.adb: Minor reformatting.
2042
2043 2011-08-29 Tristan Gingold <gingold@adacore.com>
2044
2045 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
2046
2047 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2048
2049 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
2050 Exception_Handlers to No_List instead of Empty_List in the case where
2051 there are no handlers.
2052
2053 2011-08-29 Tristan Gingold <gingold@adacore.com>
2054
2055 * gcc-interface/gigi.h (enum standard_datatypes): Add
2056 ADT_reraise_zcx_decl
2057 (reraise_zcx_decl): New macro.
2058 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
2059 (gigi): Set reraise_zcx_decl.
2060 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
2061 (gnat_to_gnu): Handle N_Raise_Statement.
2062
2063 2011-08-29 Robert Dewar <dewar@adacore.com>
2064
2065 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
2066 a-undesu.adb: Minor reformatting.
2067
2068 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2069
2070 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2071 table, accept an unfrozen untagged component if it is an actual for a
2072 formal incomplete type.
2073 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2074 provide new iterator forms over vectors.
2075 Introduce type Iterator in package body to implement operations of
2076 Reversible_Iterator interface.
2077 * a-iteint.ads: Make package pure so it is usable with new container
2078 packages, that are categorized Remote_Types.
2079
2080 2011-08-29 Robert Dewar <dewar@adacore.com>
2081
2082 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2083
2084 2011-08-29 Bob Duff <duff@adacore.com>
2085
2086 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2087 of <>, because this is the routine that checks for dimensionality
2088 errors (for example, for a two-dimensional array, (others => <>) should
2089 be (others => (others => <>)).
2090
2091 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2092
2093 * impunit.adb: Add new run-time units.
2094 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2095 s-stposu.ads, s-stposu.adb: Code clean up.
2096 Handle protected class-wide or task class-wide types
2097 Handle C/C++/CIL/Java types.
2098 * s-spsufi.adb, s-spsufi.ads: New files.
2099
2100 2011-08-29 Yannick Moy <moy@adacore.com>
2101
2102 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2103 library-level subprogram.
2104 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2105 placement.
2106 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2107 component.
2108 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2109 component.
2110 * gnat_rm.texi: Update doc for Test_Case pragma.
2111
2112 2011-08-29 Tristan Gingold <gingold@adacore.com>
2113
2114 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2115 convention C.
2116 (GCC_Exception_Access): New type.
2117 (Unwind_DeleteException): New imported procedure
2118 (Foreign_Exception): Import it.
2119 (GNAT_GCC_Exception): Simply have the occurrence inside.
2120 (To_GCC_Exception): New function.
2121 (To_GNAT_GCC_Exception): New function.
2122 (GNAT_GCC_Exception_Cleanup): New procedure..
2123 (Propagate_GCC_Exception): New procedure.
2124 (Reraise_GCC_Exception): New procedure.
2125 (Setup_Current_Excep): New procedure.
2126 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2127 (Unwind_RaiseException): Ditto.
2128 (Unwind_ForcedUnwind): Ditto.
2129 (Remove): Removed.
2130 (Begin_Handler): Change type of parameter.
2131 (End_Handler): Ditto. Now delete the exception if still present.
2132 (Setup_Key): Removed.
2133 (Is_Setup_And_Not_Propagated): Removed.
2134 (Set_Setup_And_Not_Propagated): Ditto.
2135 (Clear_Setup_And_Not_Propagated): Ditto.
2136 (Save_Occurrence_And_Private): Ditto.
2137 (EID_For): Add 'not null' constraint on parameter.
2138 (Setup_Exception): Does nothing.
2139 (Propagate_Exception): Simplified.
2140 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2141 re-raise is not expanded anymore.
2142 * s-except.ads (Foreign_Exception): New exception - placeholder for
2143 non Ada exceptions.
2144 * raise-gcc.c (__gnat_setup_current_excep): Declare
2145 (CXX_EXCEPTION_CLASS): Define (not yet used)
2146 (GNAT_EXCEPTION_CLASS): Define.
2147 (is_handled_by): Handle foreign exceptions.
2148 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2149
2150 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2151
2152 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2153
2154 2011-08-29 Thomas Quinot <quinot@adacore.com>
2155
2156 * a-synbar-posix.adb: Minor reformatting.
2157
2158 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2159
2160 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2161 a-exetim-default.ads (Interrupt_Clocks_Supported,
2162 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2163 definitions to be compliant with AI-0171. The target systems do not
2164 support separate account for the execution time of interrupt handlers.
2165
2166 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2167
2168 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2169 in the barrier to put first the easiest to evaluate (and the one which
2170 will be True more often). More efficient.
2171
2172 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2173
2174 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2175
2176 2011-08-29 Bob Duff <duff@adacore.com>
2177
2178 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2179 attributes that are now aspects, as specified by AI05-0229-1.
2180 * sem_ch13.adb (Analyze_Aspect_Specifications,
2181 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2182 pragmas or attribute references, as appropriate.
2183
2184 2011-08-29 Robert Dewar <dewar@adacore.com>
2185
2186 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2187 a-synbar-posix.ads: Minor reformatting.
2188
2189 2011-08-29 Yannick Moy <moy@adacore.com>
2190
2191 * snames.ads-tmpl: Add name Force.
2192
2193 2011-08-29 Pascal Obry <obry@adacore.com>
2194
2195 * prj-nmsc.adb: Minor reformatting.
2196
2197 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2198
2199 * a-exetim.ads (Interrupt_Clocks_Supported,
2200 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2201 definitions to be compliant with AI-0171.
2202
2203 2011-08-29 Robert Dewar <dewar@adacore.com>
2204
2205 * a-ngelfu.adb: Add comments.
2206
2207 2011-08-29 Geert Bosch <bosch@adacore.com>
2208
2209 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2210 the closest machine number to Pi / 2.0.
2211
2212 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2213
2214 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2215 package Ada.Synchronous_Barriers.
2216 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2217 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2218 default implementation using protected objects and another one
2219 a-synbar-posix using POSIX barriers as the underlying support.
2220 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2221 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2222 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2223 Clean up dependencies.
2224 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2225
2226 2011-08-29 Robert Dewar <dewar@adacore.com>
2227
2228 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2229 exp_dist.adb: Minor code reorganization.
2230 Minor reformatting.
2231
2232 2011-08-29 Thomas Quinot <quinot@adacore.com>
2233
2234 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2235 primitive operation must support external streaming if it is not a
2236 controlling access result.
2237
2238 2011-08-29 Thomas Quinot <quinot@adacore.com>
2239
2240 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2241
2242 2011-08-29 Bob Duff <duff@adacore.com>
2243
2244 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2245 restriction on allocators, as required by AI05-0013-1.
2246 * restrict.ads: Minor comment fix.
2247
2248 2011-08-29 Tristan Gingold <gingold@adacore.com>
2249
2250 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2251 (To_Jmpbuf_Address): Ditto
2252 (builtin_longjmp): Ditto
2253
2254 2011-08-29 Thomas Quinot <quinot@adacore.com>
2255
2256 * sem_res.adb: Minor reformatting.
2257
2258 2011-08-29 Vincent Celier <celier@adacore.com>
2259
2260 * make.adb (Gnatmake): Move special processing for VM targets after the
2261 call to Get_Target_Parameters.
2262
2263 2011-08-29 Thomas Quinot <quinot@adacore.com>
2264
2265 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2266
2267 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2268
2269 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2270 where an anonymous access discriminant of a limited designated type
2271 appears in a non-immutably limited discriminated type and issue an
2272 error message. Add local variable Desig_T and replace all occurrences
2273 of Designated_Type.
2274
2275 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2276
2277 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2278 implementation is compliant to RM D.15(15/2) after the modification
2279 imposed by AI05-0094-1 (binding interpretation).
2280
2281 2011-08-29 Robert Dewar <dewar@adacore.com>
2282
2283 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
2284 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
2285
2286 2011-08-29 Thomas Quinot <quinot@adacore.com>
2287
2288 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
2289 the scope name, do not report a missing label as a style violation (it
2290 will be diagnosed as an illegality).
2291 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
2292 variant records: Get_Enum_Lit_From_Pos already returns a usage
2293 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
2294 on Expr in Integer_Literal case so that it can be used by
2295 Build_To_Any_Call.
2296
2297 2011-08-29 Tristan Gingold <gingold@adacore.com>
2298
2299 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
2300 Adjust comment.
2301 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
2302 (Build_Abort_Block_Handler): New function to build an Abort_Signal
2303 exception handler.
2304 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
2305 Build_Abort_Block_Handler to build the exception handler. Do not
2306 undefer aborts for the Abort_Signal exception handler if back-end
2307 exception mechanism.
2308 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
2309 back_end exceptions for all others and abort_signal.
2310 * s-except.ads (ZCX_By_Default): New constant.
2311 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
2312 (Raise_Exception_Always): Ditto.
2313 (Raise_From_Signal_Handler): Ditto.
2314 (Raise_With_Location_And_Msg): Ditto.
2315 (Raise_With_Msg): Ditto.
2316 (Reraise): Ditto.
2317 (Reraise_Occurence): Ditto.
2318 (Reraise_Occurrence_Always): Ditto.
2319 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
2320 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
2321
2322 2011-08-29 Thomas Quinot <quinot@adacore.com>
2323
2324 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2325
2326 2011-08-29 Robert Dewar <dewar@adacore.com>
2327
2328 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2329 Minor code reorganization.
2330
2331 2011-08-29 Bob Duff <duff@adacore.com>
2332
2333 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2334 2012, not just Ada 2005.
2335
2336 2011-08-29 Vincent Celier <celier@adacore.com>
2337
2338 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2339 with a project file or with gprbuid, if -gnatep= is specified, the
2340 builder may need to be invoked with -x.
2341
2342 2011-08-29 Tristan Gingold <gingold@adacore.com>
2343
2344 * a-exexpr-gcc.adb: Minor comment fix.
2345
2346 2011-08-29 Robert Dewar <dewar@adacore.com>
2347
2348 * sem_ch8.adb: Minor reformatting.
2349
2350 2011-08-29 Bob Duff <duff@adacore.com>
2351
2352 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2353 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2354 treating "some" as unreserved in earlier Ada versions. This is now
2355 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2356 rather than Name_Some, since Tok_Some is now recognized as reserved.
2357 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2358 reserved word.
2359 * scans.ads: Minor comment fixes.
2360 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2361 for other language versions.
2362 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2363 treating "some" as unreserved in earlier Ada versions. This is now
2364 handled in Snames.Is_Keyword_Name.
2365 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2366 Ada 2012.
2367 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2368 unreserved in earlier Ada versions. This is now handled in
2369 Snames.Is_Keyword_Name.
2370 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2371 words as for other language versions.
2372 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2373 Ada 2012, not just Ada 2005.
2374
2375 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2376
2377 * sem_ch13.adb: Additional semantic checks for aspects involved in
2378 iterators.
2379
2380 2011-08-29 Matthew Heaney <heaney@adacore.com>
2381
2382 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2383 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2384 Container parameter.
2385 (Ancestor_Find): ditto.
2386
2387 2011-08-29 Thomas Quinot <quinot@adacore.com>
2388
2389 * par-endh.adb: Minor reformatting.
2390
2391 2011-08-29 Tristan Gingold <gingold@adacore.com>
2392
2393 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2394 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2395 (Adjust_N_CLeanups_For): Remove.
2396 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2397 stack is reached.
2398 (Propgate_Exception): Adjust.
2399 * raise-gcc.c: Add a few static/const.
2400 (Adjust_N_Cleanups_For): Remove declaration.
2401 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2402
2403 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2404
2405 * sem_ch8.adb: Use type of function return when rewriting as object
2406 declaration.
2407
2408 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2409
2410 * sem_type.adb: Minor reformatting.
2411
2412 2011-08-29 Robert Dewar <dewar@adacore.com>
2413
2414 * makeutl.adb: Minor reformatting.
2415
2416 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2417
2418 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2419 function call of a limited type, the expansion of the renaming is
2420 complicated by the presence of various temporaries and subtypes that
2421 capture constraints of the renamed object.
2422 Rewrite node as an object declaration, whose expansion is simpler.
2423 Given that the object is limited there is no copy involved and no
2424 performance hit.
2425
2426 2011-08-29 Robert Dewar <dewar@adacore.com>
2427
2428 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2429 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2430
2431 2011-08-29 Tristan Gingold <gingold@adacore.com>
2432
2433 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2434 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2435 system-linux-hppa.ads, system-linux-s390.ads,
2436 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2437 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2438 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2439 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2440 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2441 system-solaris-sparc.ads, system-lynxos-x86.ads,
2442 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2443 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2444 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2445 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
2446 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
2447 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2448 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2449 * opt.ads: Adjust comment.
2450 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2451 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2452 * system.ads: Move GCC_ZCX_Support to obsolete entries.
2453
2454 2011-08-29 Emmanuel Briot <briot@adacore.com>
2455
2456 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2457 file name is specified on the gnatmake or gprbuild command line, and
2458 before we search for that file in the project.
2459
2460 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2461
2462 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2463 used to determine whether a possible interpretation for an overloadable
2464 entity is declared within the current instantiation and should be
2465 included in the candidate set.
2466
2467 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2468
2469 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2470
2471 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2472
2473 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2474 access subtype is access_to_subprogram, when applying checks for
2475 RM 3.10.2 (27).
2476
2477 2011-08-29 Matthew Heaney <heaney@adacore.com>
2478
2479 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2480 for sibling when common parent.
2481
2482 2011-08-29 Thomas Quinot <quinot@adacore.com>
2483
2484 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2485 "pragma_".
2486
2487 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2488
2489 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2490 for the return type when in ASIS mode.
2491
2492 2011-08-29 Vincent Celier <celier@adacore.com>
2493
2494 * make.adb (Gnatmake): Get the default search dirs, then the target
2495 parameters after getting the Builder switches, as the Builder switches
2496 may include --RTS= and that could change the default search dirs.
2497
2498 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2499
2500 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2501 Make_Final_Call. Move the processing for class-wide types before the
2502 processing for derivations from [Limited_]Controlled.
2503 (Make_Final_Call): Move the processing for class-wide types before the
2504 processing for derivations from [Limited_]Controlled.
2505 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2506 Add code to account for alignments larger than the list header. Add a
2507 comment illustrating the structure of the allocated object + padding +
2508 header.
2509 (Deallocate_Any_Controlled): Add code to account for alignments larger
2510 than the list header.
2511
2512 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2513
2514 * sinfo.ads, sinfo.adb: New node kind
2515 N_Formal_Incomplete_Type_Definition, related flags.
2516 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2517 Parse formal incomplete types.
2518 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2519 sem_ch12.
2520 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2521 Formal incomplete types do not need completion.
2522 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2523 Validate_Incomplete_Type_Instance): New procedures to handle formal
2524 incomplete types.
2525 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2526 that corresponds to a formal incomplete type.
2527 * sprint.adb: Handle formal incomplete type declarations.
2528 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2529 an insertion point.
2530
2531 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2532
2533 * a-fihema.ads, a-fihema.adb: Unit removed.
2534 * a-undesu.ads, a-undesu.adb: New unit implementing
2535 Ada.Unchecked_Deallocate_Subpool.
2536 * einfo.adb: Remove Associated_Collection from the node usage.
2537 Add Finalization_Master to the node usage.
2538 (Associated_Collection): Removed.
2539 (Finalization_Master): New routine.
2540 (Set_Associated_Collection): Removed.
2541 (Set_Finalization_Master): New routine.
2542 (Write_Field23_Name): Remove Associated_Collection from the output. Add
2543 Finalization_Master to the output.
2544 * einfo.ads: Remove attribute Associated_Collection and its uses in
2545 entities.
2546 Add new attribute Finalization_Master along with its uses in entitites.
2547 (Associated_Collection): Removed along with its pragma import.
2548 (Finalization_Master): New routine along with a pragma import.
2549 (Set_Associated_Collection): Removed along with its pragma import.
2550 (Set_Finalization_Master): New routine along with a pragma import.
2551 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2552 Build_Finalization_Collection with Build_Finalization_Master.
2553 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2554 before the bodies of the predefined routines. Add comment explaining
2555 this. Replace call to Build_Finalization_Collection with
2556 Build_Finalization_Master.
2557 (Freeze_Type): Replace call to Build_Finalization_Collection with
2558 Build_Finalization_Master.
2559 (Make_Finalize_Address_Body): Comment reformatting.
2560 (Make_Predefined_Primitive_Specs): Code reformatting.
2561 (Stream_Operation_OK): Update comment mentioning finalization
2562 collections. Replace RE_Finalization_Collection with
2563 RE_Finalization_Master.
2564 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2565 Associated_Collection with Finalization_Master. Replace call to
2566 Build_Finalization_Collection with Build_Finalization_Master.
2567 (Expand_Allocator_Expression): Replace call to Associated_Collection
2568 with Finalization_Master. Replace call to Set_Associated_Collection with
2569 Set_Finalization_Master. Remove the generation of
2570 Set_Finalize_Address_Ptr.
2571 (Expand_N_Allocator): Replace call to Associated_Collection with
2572 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2573 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2574 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2575 comment on usage. Replace call to Needs_BIP_Collection with
2576 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2577 BIP_Finalization_Master. Update all comments which mention finalization
2578 collections. Replace Associated_Collection with
2579 Finalization_Master. Replace Build_Finalization_Collection with
2580 Build_Finalization_Master.
2581 (BIP_Formal_Suffix): Update BIP_Collection's case.
2582 (Build_Heap_Allocator): Update the related comment. Rename local
2583 variable Collect to Fin_Mas_Id and update its occurrences. Update
2584 comments which mention finalization collections. Replace
2585 Set_Associated_Collection with Set_Finalization_Master.
2586 (Expand_Call): Update the code which detects a special piece of library
2587 code for .NET/JVM.
2588 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2589 Add_Collection_Actual_To_Build_In_Place_Call with
2590 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2591 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2592 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2593 Add_Collection_Actual_To_Build_In_Place_Call with
2594 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2595 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2596 Add_Collection_Actual_To_Build_In_Place_Call with
2597 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2598 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2599 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2600 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2601 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2602 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2603 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2604 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2605 Replace the call to Associated_Collection with Finalization_Master.
2606 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2607 Update the way finalization master names are generated. Update the
2608 retrieval of the correct access type which will carry the pool and
2609 master attributes.
2610 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2611 (Make_Finalize_Address_Body): Abstract types do not need
2612 Finalize_Address. Code reformatting.
2613 (Make_Finalize_Address_Stmts): Update comment on usage.
2614 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2615 (Process_Declarations): Update comments.
2616 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2617 Build_Finalization_Master. Update associated comment.
2618 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2619 * exp_ch13.adb: Update comments which mention finalization collections.
2620 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2621 with Finalization_Master.
2622 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2623 create calls to routines Allocate_Any_Controlled and
2624 Deallocate_Any_Controlled.
2625 (Find_Finalize_Address): New routine.
2626 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2627 comparison.
2628 (Requires_Cleanup_Actions): Update the comment on freeze node
2629 inspection.
2630 * exp_util.ads: Remove comment on generated code for
2631 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2632 is better to simply look in the body.
2633 * freeze.adb (Freeze_All): Update the comment of finalization
2634 collections. Replace the call to Associated_Collection with
2635 Finalization_Master. Replace the call to Build_Finalization_Collection
2636 with Build_Finalization_Master.
2637 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2638 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2639 a-fihema.
2640 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2641 Ada.Finalization. Add processing for children of System.Storage_Pools.
2642 * rtsfind.ads: Remove the naming of second level children of
2643 Ada.Finalization.
2644 Remove Ada_Finalization_Heap_Management from the list of units.
2645 Remove subtype Ada_Finalization_Child.
2646 Remove the following subprogram entities:
2647
2648 RE_Allocate
2649 RE_Deallocate
2650 RE_Finalization_Collection
2651 RE_Finalization_Collection_Ptr
2652 RE_Set_Finalize_Address_Ptr
2653
2654 Add the naming of second level children of System.Storage_Pools.
2655 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2656 the list of units.
2657 Add subtype System_Storage_Pools_Child.
2658 Add the following subprogram entities to System.Finalization_Masters:
2659
2660 RE_Finalization_Master
2661 RE_Finalization_Master_Ptr
2662
2663 Add the following subprogram entities to System.Storage_Pools.Subpools:
2664
2665 RE_Allocate_Any_Controlled
2666 RE_Deallocate_Any_Controlled
2667 RE_Root_Storage_Pool_With_Subpools
2668 RE_Root_Subpool
2669 RE_Subpool_Handle
2670
2671 Move the following subprogram entities from
2672 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2673
2674 RE_Add_Offset_To_Address
2675 RE_Attach
2676 RE_Base_Pool
2677 RE_Detach
2678
2679 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2680 Set_Associated_Collection with Set_Finalization_Master.
2681 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2682 BIP_Finalization_Master is created.
2683 * s-finmas.adb: New unit System.Finalization_Masters.
2684 * s-finmas.ads: New unit System.Finalization_Masters.
2685 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2686 * s-stposu.ads, s-stposu.adb: New unit implementing
2687 System.Storage_Pools.Subpools.
2688
2689 2011-08-29 Bob Duff <duff@adacore.com>
2690
2691 * tbuild.adb: Add assertion.
2692
2693 2011-08-29 Thomas Quinot <quinot@adacore.com>
2694
2695 * s-pooglo.adb: Minor reformatting.
2696
2697 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2698
2699 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2700 an indexed component of a packed array whose element type is a record
2701 with a representation clause different from that of the right-hand
2702 side, generate a temporary to minimuze the number of bit-field
2703 operations generated.
2704
2705 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2706
2707 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2708 declarations, and thus are likely insertion points for actions.
2709
2710 2011-08-29 Bob Duff <duff@adacore.com>
2711
2712 * einfo.ads: Minor comment fix.
2713
2714 2011-08-29 Robert Dewar <dewar@adacore.com>
2715
2716 * frontend.adb, gnat1drv.adb: Minor reformatting.
2717
2718 2011-08-29 Tristan Gingold <gingold@adacore.com>
2719
2720 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2721 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2722 space in front of the header.
2723
2724 2011-08-29 Johannes Kanig <kanig@adacore.com>
2725
2726 * frontend.adb (Frontend): Exit after creating Standard package when
2727 -gnatd.H is present.
2728 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2729 present.
2730
2731 2011-08-29 Robert Dewar <dewar@adacore.com>
2732
2733 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2734 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2735 snames.ads-tmpl: Minor reformatting.
2736
2737 2011-08-29 Philippe Gil <gil@adacore.com>
2738
2739 * prj.adb (Reset_Units_In_Table): New procedure.
2740 Reset units to avoid access to freed memory.
2741
2742 2011-08-29 Thomas Quinot <quinot@adacore.com>
2743
2744 * get_scos.adb: When reading a P statement SCO without a pragma name
2745 (from an older ALI file), ensure that the Pragma_Name component is set
2746 to Unknown_Pragma (not left uninitialized).
2747
2748 2011-08-29 Vincent Celier <celier@adacore.com>
2749
2750 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2751 modified to compute correctly the object path of a SAL project that is
2752 extending another library project.
2753 (Write_Path_File): New procedure.
2754 * makeutl.ads (Directories): New table moved from Buildgpr
2755 (Get_Directories): New procedure moved from Buildgpr
2756 (Write_Path_File): New procedure
2757 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2758 paths before binding SALs, instead of Set_Ada_Paths.
2759 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2760 Prj.
2761 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2762 (Current_Source_Path_File_Of): New function
2763 (Set_Current_Object_Path_File_Of): New procedure
2764 (Current_Source_Object_File_Of): New function
2765 (Set_Current_Object_Path_File_Of): New procedure
2766 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2767 (Current_Source_Path_File_Of): New function
2768 (Set_Current_Object_Path_File_Of): New procedure
2769 (Current_Source_Object_File_Of): New function
2770 (Set_Current_Object_Path_File_Of): New procedure
2771
2772 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2773
2774 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2775 packed entity, use a bit-field assignment only if there is no change of
2776 representation.
2777
2778 2011-08-29 Thomas Quinot <quinot@adacore.com>
2779
2780 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2781 Is_RTU instead of using Chars comparisons.
2782
2783 2011-08-29 Thomas Quinot <quinot@adacore.com>
2784
2785 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2786 temporary object if the actual is constrained, and the discriminants
2787 read from the stream don't match.
2788
2789 2011-08-29 Tristan Gingold <gingold@adacore.com>
2790
2791 * sem_attr.adb, exp_attr.adb: Add handling of
2792 Attribute_System_Allocator_Alignment
2793 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2794 Attribute_System_Allocator_Alignment.
2795 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2796 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2797 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2798 get_target_system_allocator_alignment.
2799
2800 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2801
2802 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2803 dependencies.
2804
2805 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2806
2807 * exp_ch3.adb (In_Runtime): Fix typo.
2808
2809 2011-08-29 Bob Duff <duff@adacore.com>
2810
2811 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2812
2813 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2814
2815 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2816 and a separate tag assignment is generated, ensure that the tag
2817 assignment is analyzed.
2818
2819 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2820
2821 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
2822 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
2823 of statement lists that may contain local declarations.
2824 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
2825 duplicate the triggering statements needed for the expansion of this
2826 construct, when the trigger is a dispatching call to a synchronized
2827 primitive.
2828
2829 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2830
2831 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
2832 * bindgen.adb: Add comments.
2833 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
2834 in CodePeer mode.
2835
2836 2011-08-29 Robert Dewar <dewar@adacore.com>
2837
2838 * exp_attr.adb: Minor reformatting.
2839 Minor code reorganization and commenting.
2840 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
2841 reformatting.
2842
2843 2011-08-29 Thomas Quinot <quinot@adacore.com>
2844
2845 * get_scos.adb: Ignore chaining indicators not currently supported
2846 by Ada.
2847
2848 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2849
2850 * system.ads: Minor editing.
2851
2852 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2853
2854 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2855 CodePeer mode.
2856 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2857 Attribute_Elab_Subp_Body.
2858 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2859 * sem_util.adb: Update comments.
2860
2861 2011-08-29 Thomas Quinot <quinot@adacore.com>
2862
2863 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2864 pragma name for each SCO statement corresponding to a pragma.
2865
2866 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2867
2868 * opt.ads: Minor editing.
2869
2870 2011-08-29 Yannick Moy <moy@adacore.com>
2871
2872 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2873 that only made sense for CodePeer mode.
2874
2875 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2876
2877 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2878 which is no longer used.
2879 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2880 handling of the 64-bit division check.
2881 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2882 division available.
2883 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2884 longer used.
2885
2886 2011-08-29 Thomas Quinot <quinot@adacore.com>
2887
2888 * get_scos.adb: Minor reformatting.
2889
2890 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2891
2892 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2893 statement list is wrapped in a block, the block is explicitly analyzed
2894 in order to properly redecorate the entities and create a servicing
2895 finalizer.
2896
2897 2011-08-29 Tristan Gingold <gingold@adacore.com>
2898
2899 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2900 (Set_Zero_Cost_Handling): Remove.
2901
2902 2011-08-29 Thomas Quinot <quinot@adacore.com>
2903
2904 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2905
2906 2011-08-29 Geert Bosch <bosch@adacore.com>
2907
2908 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2909 instruction, as the latter may produce -0.0, which is not a valid VAX
2910 F float number.
2911 (Neg_G): Likewise for VAX F float.
2912
2913 2011-08-29 Robert Dewar <dewar@adacore.com>
2914
2915 * exp_util.adb: Minor reformatting.
2916
2917 2011-08-29 Yannick Moy <moy@adacore.com>
2918
2919 * sem_ch3.adb: Minor comment update.
2920
2921 2011-08-29 Thomas Quinot <quinot@adacore.com>
2922
2923 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2924 the operand type.
2925
2926 2011-08-29 Thomas Quinot <quinot@adacore.com>
2927
2928 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2929 current statement sequence on a generic instantiation or a subprogram
2930 declaration.
2931
2932 2011-08-29 Robert Dewar <dewar@adacore.com>
2933
2934 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2935 Minor reformatting.
2936
2937 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2938
2939 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2940 Correct the check which involves the freeze node of a controlled or
2941 access-to-controlled type.
2942
2943 2011-08-29 Geert Bosch <bosch@adacore.com>
2944
2945 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2946 statements.
2947 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2948 Asm statements.
2949
2950 2011-08-29 Yannick Moy <moy@adacore.com>
2951
2952 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2953 for every index type and component type that is not a subtype_mark.
2954 (Process_Subtype): Set Etype of subtype.
2955
2956 2011-08-29 Robert Dewar <dewar@adacore.com>
2957
2958 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2959 reorganization. Minor reformatting.
2960
2961 2011-08-29 Steve Baird <baird@adacore.com>
2962
2963 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2964 for CodePeer and ALFA modes.
2965
2966 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2967
2968 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2969 that comes from an enclosing scope if it is not the renaming of an
2970 actual, to handle properly a spurious ambiguity in an instance.
2971
2972 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2973
2974 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2975 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
2976 use it instead of the Esize of the first parameter.
2977 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2978 above change.
2979 <Size>: Likewise. Call it for composite types on the RM size.
2980
2981 2011-08-29 Yannick Moy <moy@adacore.com>
2982
2983 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2984 * sem_util.adb (Unique_Name): Correct behaviour for names of
2985 compilation units.
2986
2987 2011-08-29 Yannick Moy <moy@adacore.com>
2988
2989 * sem_prag.adb (Check_Precondition_Postcondition): In formal
2990 verification mode, analyze pragma expression for correctness, for
2991 pre/post on library-level subprogram, as it is not expanded later.
2992
2993 2011-08-29 Yannick Moy <moy@adacore.com>
2994
2995 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2996 in formal verification.
2997
2998 2011-08-29 Thomas Quinot <quinot@adacore.com>
2999
3000 * sem_util.adb: Minor reformatting.
3001 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
3002 there's no pragma.
3003 * par_sco.ads, par_sco.adb: Update comments.
3004
3005 2011-08-29 Yannick Moy <moy@adacore.com>
3006
3007 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
3008 associated getter/setter.
3009 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
3010
3011 2011-08-29 Vincent Celier <celier@adacore.com>
3012
3013 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
3014 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
3015 with declarations for Language_Kind and Dependency_Kind for Ada.
3016 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
3017 (Process_Compiler): Take into account the new attributes Dependency_Kind
3018 and Language_Kind.
3019 (Check_Configuration): Check if language kind is unit based, not if the
3020 language name is Ada.
3021 (Process_Exceptions_Unit_Based): Ditto
3022 (Add_Language): Remove default additions of language and dependency kind
3023 * prj.ads: Minor comment change
3024 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
3025
3026 2011-08-29 Johannes Kanig <kanig@adacore.com>
3027
3028 * debug.adb: Update comments.
3029
3030 2011-08-24 Joseph Myers <joseph@codesourcery.com>
3031
3032 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
3033 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
3034 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
3035 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
3036 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
3037
3038 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3039
3040 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
3041 (GNATLIBCFLAGS_FOR_C): Replace
3042 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
3043 (gnatlib-shared-default, gnatlib-shared-dual-win32)
3044 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
3045 (gnatlib-sjlj, gnatlib-zcx): Likewise.
3046
3047 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
3048
3049 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
3050
3051 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
3052
3053 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
3054
3055 2011-08-05 Nicolas Roche <roche@adacore.com>
3056
3057 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
3058 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
3059 canadian cross.
3060 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
3061
3062 2011-08-05 Matthew Heaney <heaney@adacore.com>
3063
3064 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
3065 subprogram bodies declared out-of-order.
3066
3067 2011-08-05 Yannick Moy <moy@adacore.com>
3068
3069 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
3070 entities directly in package Standard, otherwise skip the standard
3071 prefix.
3072
3073 2011-08-05 Robert Dewar <dewar@adacore.com>
3074
3075 * a-cbmutr.adb: Minor reformatting
3076 (Allocate_Node): refactor node allocation algorithm
3077
3078 2011-08-05 Robert Dewar <dewar@adacore.com>
3079
3080 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3081 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3082 mode.
3083 (Analyze_Pragma, case Check_Policy): Ditto.
3084 * sem_prag.ads (Check_Disabled): New function
3085 * snames.ads-tmpl: Add Name_Disable.
3086
3087 2011-08-05 Robert Dewar <dewar@adacore.com>
3088
3089 * gnat_rm.texi: Document implementation-defined policy DISABLE for
3090 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3091
3092 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3093
3094 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3095 that appears in a generic formal part and applies to a formal
3096 subprogram.
3097
3098 2011-08-05 Robert Dewar <dewar@adacore.com>
3099
3100 * a-cbmutr.ads: Minor reformatting.
3101
3102 2011-08-05 Matthew Heaney <heaney@adacore.com>
3103
3104 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3105 to check count, check sign of value instead.
3106 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3107 (Copy_Subtree): allocate copy of source element
3108 (Equal_Subtree): compare elements, not access objects
3109
3110 2011-08-05 Vincent Celier <celier@adacore.com>
3111
3112 * gnat_ugn.texi: Fix VMS alternative.
3113
3114 2011-08-05 Thomas Quinot <quinot@adacore.com>
3115
3116 * sem_ch11.adb: Add comment.
3117
3118 2011-08-05 Robert Dewar <dewar@adacore.com>
3119
3120 * exp_util.adb: Minor comment fix.
3121
3122 2011-08-05 Robert Dewar <dewar@adacore.com>
3123
3124 * scng.adb (Error_Unterminated_String): Improve flag position when
3125 comma present.
3126
3127 2011-08-05 Matthew Heaney <heaney@adacore.com>
3128
3129 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3130 tree containers).
3131 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3132 multiway tree containers.
3133
3134 2011-08-05 Robert Dewar <dewar@adacore.com>
3135
3136 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3137 * stylesw.adb: Implement -gnatyC to control comment spacing
3138 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3139 -gnatyc/C).
3140 * usage.adb: Add line for -gnatyC.
3141
3142 2011-08-05 Robert Dewar <dewar@adacore.com>
3143
3144 * gnat_ugn.texi: Document -gnatyC.
3145 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3146 synonym for COMMENTS2).
3147
3148 2011-08-05 Robert Dewar <dewar@adacore.com>
3149
3150 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3151 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3152 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3153 a-comutr.ads, lib-xref.adb: Minor reformatting.
3154
3155 2011-08-05 Robert Dewar <dewar@adacore.com>
3156
3157 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3158 warning if there is an exception handler present.
3159
3160 2011-08-05 Pascal Obry <obry@adacore.com>
3161
3162 * a-iteint.ads: Fix copyright year.
3163
3164 2011-08-05 Thomas Quinot <quinot@adacore.com>
3165
3166 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3167 statement SCO for a USE clause or a representation clause.
3168
3169 2011-08-05 Yannick Moy <moy@adacore.com>
3170
3171 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3172 between body and spec for stub.
3173 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3174 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3175 pragma precondition or postcondition, for which the enclosing
3176 subprogram or package in the AST is not the desired one, return empty.
3177
3178 2011-08-05 Thomas Quinot <quinot@adacore.com>
3179
3180 * g-expect.adb: Minor reformatting.
3181
3182 2011-08-05 Bob Duff <duff@adacore.com>
3183
3184 * a-fihema.adb: Comment out OS_Lib.
3185
3186 2011-08-05 Matthew Heaney <heaney@adacore.com>
3187
3188 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3189 (unbounded multiway tree containers) and a-iteint.ads.
3190 * a-comutr.ads, a-comutr.adb:
3191 This is the new Ada 2012 unit for unbounded multiway tree containers
3192 * a-cimutr.ads, a-cimutr.adb
3193 This is the new Ada 2012 unit for indefinite multiway tree containers
3194 * a-iteint.ads: New file.
3195
3196 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3197
3198 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3199
3200 2011-08-05 Bob Duff <duff@adacore.com>
3201
3202 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3203 subpools.
3204 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3205
3206 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3207
3208 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3209 general indexing aspects of Ada2012. Called when analyzing indexed
3210 components when other interpretations fail.
3211 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3212 in an expression context where overloading is meaningful. This excludes
3213 the occurrence in an aspect specification (efficiency only).
3214 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3215 related to iterators can be set by an attribute specification, but
3216 cannot be queried.
3217 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3218 Constant_Indexing and Variable_Indexing.
3219 (Check_Indexing_Functions): New procedure to perform legality checks.
3220 Additional semantic checks at end of declarations.
3221
3222 2011-08-05 Sergey Rybin <rybin@adacore.com>
3223
3224 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3225 order of calling Tree_Write/Tree_Read routines made for aspects.
3226
3227 2011-08-05 Bob Duff <duff@adacore.com>
3228
3229 * a-fihema.adb (Finalize): Fix race condition.
3230
3231 2011-08-05 Yannick Moy <moy@adacore.com>
3232
3233 * sem_ch12.adb (Analyze_Package_Instantiation,
3234 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3235 mode.
3236
3237 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3238
3239 * sem_type.adb (Specific_Type): in an instance, the type-specific
3240 operand of an equality check that involves null may have a private
3241 type. Use full view to determine legality of construct.
3242
3243 2011-08-05 Vincent Celier <celier@adacore.com>
3244
3245 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3246 delete or close the file when the call to gnatmake was successful.
3247
3248 2011-08-05 Yannick Moy <moy@adacore.com>
3249
3250 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3251 Global_Discard_Names.
3252
3253 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3254
3255 * sinfo.ads: comments on use of entity field for aspect specifications.
3256
3257 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3258
3259 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3260 node is not itself an entity but a selected component, it is a
3261 rewritten parameterless call to an en enclosing synchronized operation,
3262 and this expansion will be performed again in the instance, so there is
3263 no global information to preserve.
3264
3265 2011-08-05 Javier Miranda <miranda@adacore.com>
3266
3267 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3268 for renamings of predefined primitives.
3269 (In_Predef_Prims_DT): New subprogram.
3270
3271 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3272
3273 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3274 possible interpretation of name is a reference type, add an
3275 interpretation that is the designated type of the reference
3276 discriminant of that type.
3277 * sem_res.adb (resolve): If the interpretation imposed by context is an
3278 implicit dereference, rewrite the node as the deference of the
3279 reference discriminant.
3280 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
3281 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
3282 parent type or base type.
3283 * sem_ch4.adb (Process_Indexed_Component,
3284 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
3285 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
3286 Check for implicit dereference.
3287 (List_Operand_Interps): Indicate when an implicit dereference is
3288 ambiguous.
3289 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
3290
3291 2011-08-05 Thomas Quinot <quinot@adacore.com>
3292
3293 * scos.ads: Update documentation of SCO table. Pragma statements can now
3294 be marked as disabled (using 'p' instead of 'P' as the statement kind).
3295 * par_sco.ads, par_sco.adb: Implement the above change.
3296 (Process_Decisions_Defer): Generate a P decision for the first parameter
3297 of a dyadic pragma Debug.
3298 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
3299 necessary.
3300 * put_scos.adb: Code simplification based on above change.
3301
3302 2011-08-05 Robert Dewar <dewar@adacore.com>
3303
3304 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
3305 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
3306 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
3307 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
3308
3309 2011-08-05 Bob Duff <duff@adacore.com>
3310
3311 * a-stunau.ads, g-spipat.adb: Update comments.
3312
3313 2011-08-05 Bob Duff <duff@adacore.com>
3314
3315 * a-fihema.ads: Minor comment fix.
3316 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
3317 correct.
3318 (Attach, Detach): Remove some unnecessary code.
3319 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
3320
3321 2011-08-05 Bob Duff <duff@adacore.com>
3322
3323 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3324 allocation for Objects component. This simplifies the code somewhat. It
3325 is also a little more efficient in the not-so-unusual case where there
3326 are no controlled objects allocated.
3327 Make Finalization_Started flag atomic.
3328 (Finalize): Avoid unnecessary detachment of items from the list.
3329 (pcol): Minor cleanup.
3330
3331 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3332
3333 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3334 package whose name is the same as that of the generic unit, or its
3335 ultimate prefix.
3336
3337 2011-08-05 Bob Duff <duff@adacore.com>
3338
3339 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3340 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3341 Minor comment fixes.
3342
3343 2011-08-05 Arnaud Charlet <charlet@adacore.com>
3344
3345 * make.adb (Linking_Phase): No longer need to set source search path
3346 before calling gnatlink in CodePeer mode.
3347 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3348 gcc in CodePeer mode, since the binder generated file no longer has a
3349 'with Main'.
3350 * switch.ads, switch.adb (Is_Language_Switch): Removed.
3351 * switch-c.adb: Update comment.
3352
3353 2011-08-05 Thomas Quinot <quinot@adacore.com>
3354
3355 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3356
3357 2011-08-05 Nicolas Roche <roche@adacore.com>
3358
3359 * gnat_ugn.texi: Fix minor syntax error issue.
3360
3361 2011-08-05 Vincent Celier <celier@adacore.com>
3362
3363 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3364 delete or close the file when the call to gnatmake returns a non
3365 successful return code.
3366
3367 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3368
3369 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3370 check, indicate that the copy of the original node does not come from
3371 source, to prevent an infinite recursion of the expansion.
3372
3373 2011-08-05 Johannes Kanig <kanig@adacore.com>
3374
3375 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3376 VC generation for subprogram bodies.
3377
3378 2011-08-05 Yannick Moy <moy@adacore.com>
3379
3380 * einfo.ads: Typo.
3381 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3382 the base type with the smallest allowed base type.
3383
3384 2011-08-05 Sergey Rybin <rybin@adacore.com>
3385
3386 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3387 aspects.
3388
3389 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3390
3391 * sem_ch12.ads: minor comment updates.
3392
3393 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3394
3395 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3396 instantiation and a formal package the compiler generates a package
3397 renaming declaration so that the generic name within the declaration
3398 is interpreted as a renaming of the instance. At the end of a formal
3399 package declaration, this renaming must become invisible.
3400
3401 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3402
3403 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3404 comparison and rely on concrete entities instead.
3405
3406 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3407
3408 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3409 and discriminants, to indicate that the type has an access discriminant
3410 that supports implicit dereference.
3411 * snames.ads-tmpl: Add names of aspects and attributes related to
3412 Ada2012 iterators: constant_indexing, default_iterator,
3413 iterator_element, implicit_dereference, variable_indexing.
3414 * aspects.ads, aspects.adb: entries for iterator-related aspects.
3415 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3416 iterator-related aspects.
3417 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3418
3419 2011-08-05 Sergey Rybin <rybin@adacore.com>
3420
3421 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3422 metrics in gnatmetric to cover new kinds of coupling mentrics.
3423
3424 2011-08-05 Steve Baird <baird@adacore.com>
3425
3426 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
3427 of calling the user-defined main subprogram.
3428 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
3429 is set) Call_Main_Subprogram ahead of, as opposed to
3430 inside of, Main.
3431 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3432 generation of a "with" of the user-defined main subprogram.
3433 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3434 (which is now called from Gen_Main instead).
3435
3436 2011-08-05 Emmanuel Briot <briot@adacore.com>
3437
3438 * projects.texi: Added reference to the Makefile package.
3439
3440 2011-08-05 Thomas Quinot <quinot@adacore.com>
3441
3442 * exp_ch7.adb: Minor comment rewording.
3443
3444 2011-08-05 Ed Falis <falis@adacore.com>
3445
3446 * env.c: Fix comment.
3447
3448 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3449
3450 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3451 character comparison and rely on concrete entities instead.
3452
3453 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3454
3455 * sem_ch3.adb: (Check_Private_Overriding): better error message,
3456 suggested by AI95-0068.
3457
3458 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3459
3460 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3461 the two potential initialization calls. This accounts for any
3462 access-before-elaboration checks which may precede the initialization
3463 calls.
3464 (Next_Suitable_Statement): New routine. Returns the next real statement
3465 after the input node while skipping generated checks.
3466 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3467 with comment on usage.
3468 Do not generate Elaborate_All when the trigger is a finalization call
3469 coming from a type init proc.
3470 (Check_Elab_Call): Propagate the initialization procedure context to
3471 subsequent calls to Check_A_Call.
3472 (Check_Internal_Call_Continue): Propagate the initialization procedure
3473 context to subsequent calls to Check_Elab_Call.
3474 (Is_Finalization_Procedure): New routine. Returns True if the input
3475 entity denotes a [Deep_]Finalize routine.
3476 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3477 along with comment on usage.
3478
3479 2011-08-05 Vadim Godunko <godunko@adacore.com>
3480
3481 * s-atocou.ads: Add list of supported platforms.
3482
3483 2011-08-05 Yannick Moy <moy@adacore.com>
3484
3485 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3486
3487 * opt.ads (Disable_ALI_File): new Boolean flag
3488 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3489
3490 2011-08-05 Ed Falis <falis@adacore.com>
3491
3492 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3493 environ is properly defined.
3494
3495 2011-08-05 Vincent Celier <celier@adacore.com>
3496
3497 * make.adb (Compilation_Phase): Exit immediately when all objects have
3498 been found up to date, to avoid multiple exit messages.
3499 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3500 same project for languages with no compiler.
3501 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3502 -eI.
3503 2011-08-05 Robert Dewar <dewar@adacore.com>
3504
3505 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3506 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3507 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3508 s-atocou-builtin.adb: Minor reformatting.
3509
3510 2011-08-05 Yannick Moy <moy@adacore.com>
3511
3512 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3513 if the node to wrap is a pragma check, this node and enclosed
3514 expression are not expanded, so do not apply any transformations here.
3515 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3516 introducing transient scopes.
3517
3518 2011-08-05 Jose Ruiz <ruiz@adacore.com>
3519
3520 * adaint.c (__gnat_set_writable, __gnat_set_readable,
3521 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3522 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3523 routine is available, so we use the default implementation of these
3524 functions.
3525 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3526 support for copying attributes on VxWorks 6.
3527
3528 2011-08-05 Yannick Moy <moy@adacore.com>
3529
3530 * debug.adb: Remove use of -gnatd.D.
3531 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3532 * opt.ads: Simplify variables for ALFA mode, to keep one only
3533 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3534 to ALFA mode.
3535
3536 2011-08-05 Vincent Celier <celier@adacore.com>
3537
3538 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3539 Builder'Default_Switches.
3540
3541 2011-08-05 Vincent Celier <celier@adacore.com>
3542
3543 * makeusg.adb: Add lines for --create-map-file switches.
3544
3545 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3546
3547 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3548 profile is incomplete and the full view is available, replace it with
3549 the full view.
3550 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3551 incomplete, freezing the subprogram is delayed until the full view is
3552 frozen.
3553 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3554 fixed-point multiplication operator and the predefined operator is
3555 resolved in favor of the user-defined one.
3556
3557 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3558
3559 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3560 CONST_CAST.
3561
3562 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3563
3564 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3565 whether a type lacks user-defined Read or Write operations, or has a
3566 component that lacks them.
3567 * sem_attr.adb (Check_Stream_Attribute): if restriction
3568 No_Default_Stream_Attributes is active, verify that all subcomponent
3569 types of the target have user-defined stream operations, and report
3570 error otherwise.
3571 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3572 * exp_strm.adb: Build_Elementary_Input_Call,
3573 Build_Elementary_Write_Call): remove checks for restriction
3574 No_Default_Stream_Attributes, now checked in semantics.
3575
3576 2011-08-04 Vincent Celier <celier@adacore.com>
3577
3578 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3579 switches on the command line, look for all valid --RTS switches in the
3580 Builder switches and for each language use the first runtime name found
3581 to invoke gprconfig.
3582 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3583 command line and there is no auto-configuration.
3584 (Runtime_Name_Set_For): New function.
3585
3586 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3587
3588 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3589 elaborate initialization expression for variable Abort when processing
3590 a package body or a declaration.
3591 (Create_Finalizer): Propagate the package context when creating the
3592 exception-related variables.
3593 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3594 For_Package along with usage comment.
3595
3596 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3597
3598 * gcc-interface/Makefile.in: Clean up targets.
3599 Enable new package for atomic counters and copy-on-write implementation
3600 of unbounded strings on x86 platforms.
3601 * gcc-interface/Make-lang.in: Update dependencies.
3602
3603 2011-08-04 Robert Dewar <dewar@adacore.com>
3604
3605 * exp_ch7.adb: Minor reformatting.
3606
3607 2011-08-04 Robert Dewar <dewar@adacore.com>
3608
3609 * exp_strm.adb: Minor reformatting.
3610
3611 2011-08-04 Vadim Godunko <godunko@adacore.com>
3612
3613 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3614 operations are not supported.
3615 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3616 * s-atocou-x86.adb: New file.
3617 * Makefile.rtl: Add s-atocou.o file
3618
3619 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3620
3621 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3622 (Compilation_Phase): ... here.
3623 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3624
3625 2011-08-04 Thomas Quinot <quinot@adacore.com>
3626
3627 * Make-generated.in: Fix minor typo in comment.
3628
3629 2011-08-04 Thomas Quinot <quinot@adacore.com>
3630
3631 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3632 the project path.
3633
3634 2011-08-04 Robert Dewar <dewar@adacore.com>
3635
3636 * a-coinho.adb: Minor reformatting.
3637
3638 2011-08-04 Robert Dewar <dewar@adacore.com>
3639
3640 * a-coinho.ads: Minor reformatting.
3641
3642 2011-08-04 Vadim Godunko <godunko@adacore.com>
3643
3644 * s-atocou.ads, s-atocou.adb: New files.
3645 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3646 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3647 direct use of GCC's atomic builtins and replace them by use of new
3648 atomic counter package.
3649
3650 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3651
3652 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3653
3654 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3655
3656 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3657 with a call to Get_External_Tag.
3658 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3659 subprogram usage. Remove the guard against package declarations and
3660 bodies since Build_Cleanup_Statements is no longer invoked in that
3661 context.
3662 (Build_Components): Initialize Tagged_Type_Stmts when the context
3663 contains at least one library-level tagged type.
3664 (Build_Finalizer): New local variables Has_Tagged_Types and
3665 Tagged_Type_Stmts along with associated comments on usage. Update the
3666 logic to include tagged type processing.
3667 (Create_Finalizer): Insert all library-level tagged type unregistration
3668 code before the jump block circuitry.
3669 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3670 (Expand_N_Package_Declaration): Remove the call to
3671 Build_Cleanup_Statements.
3672 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3673 unregister the external tag of a tagged type.
3674 (Processing_Actions): Reimplemented to handle tagged types.
3675 (Process_Declarations): Detect the declaration of a library-level
3676 tagged type and carry out the appropriate actions.
3677 (Unregister_Tagged_Types): Removed. The machinery has been directly
3678 merged with Build_Finalizer.
3679
3680 2011-08-04 Robert Dewar <dewar@adacore.com>
3681
3682 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3683 gnatls.adb, exp_ch3.adb: Minor reformatting.
3684
3685 2011-08-04 Marc Sango <sango@adacore.com>
3686
3687 * sem_attr.adb (Analyze_Attribute): Replace the message
3688 "invisible attribute of}" of the spark restriction violation in
3689 attribute reference by the simple message "invisible attribute of type".
3690 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3691 two insertion characters: '&' and '}'.
3692
3693 2011-08-04 Vadim Godunko <godunko@adacore.com>
3694
3695 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3696 * a-coinho.ads, a-coinho.adb: New file.
3697 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3698
3699 2011-08-04 Nicolas Roche <roche@adacore.com>
3700
3701 * alfa_test.adb: Not all ali files are containing alfa information even
3702 if compiled with -gnatd.F. So suppress warning about missing ALFA
3703 information.
3704
3705 2011-08-04 Yannick Moy <moy@adacore.com>
3706
3707 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3708 scope.
3709 * put_alfa.adb: Check that scope name is not empty.
3710
3711 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3712
3713 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3714 Needs_Elementary_Stream_Operation, to determine whether user-defined
3715 Read and Write attributes are available for the elementary components
3716 of the given type. If only the predefined attributes are available,
3717 then when restriction No_Default_Stream_Attributes is active the
3718 predefined stream attributes for the composite type cannot be created.
3719
3720 2011-08-04 Robert Dewar <dewar@adacore.com>
3721
3722 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3723 Put routines in alpha order
3724
3725 2011-08-04 Jose Ruiz <ruiz@adacore.com>
3726
3727 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3728 * gcc-interface/Make-lang.in: Update dependencies.
3729
3730 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3731
3732 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3733 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3734 gnat1why).
3735
3736 2011-08-04 Robert Dewar <dewar@adacore.com>
3737
3738 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3739 lib-xref-alfa.adb: Minor reformatting.
3740
3741 2011-08-04 Marc Sango <sango@adacore.com>
3742
3743 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3744 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3745 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3746 mode.
3747
3748 2011-08-04 Tristan Gingold <gingold@adacore.com>
3749
3750 * bindgen.adb (Gen_Adainit_C): Remove.
3751 (Gen_Adafinal_C): Ditto.
3752 (Gen_Elab_Externals_C): Ditto.
3753 (Gen_Elab_Calls_C): Ditto.
3754 (Gen_Elab_Order_C): Ditto.
3755 (Gen_Elab_Defs_C): Ditto.
3756 (Gen_Finalize_Library_C): Ditto.
3757 (Gen_Finalize_Library_Defs_C): Ditto.
3758 (Gen_Main_C): Ditto.
3759 (Gen_Output_File_C): Ditto.
3760 (Gen_Restrictions_C): Ditto.
3761 (Gen_Versions_C): Ditto.
3762 (Write_Info_Ada_C): Ditto.
3763 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3764 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3765 Always call Gen_Output_File_Ada.
3766 * gnatlink.adb (Begin_Info): Now a constant.
3767 (End_Info): Ditto.
3768 (Ada_Bind_File): Remove
3769 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3770 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3771 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3772 * opt.ads (Ada_Bind_File): Remove.
3773
3774 2011-08-04 Thomas Quinot <quinot@adacore.com>
3775
3776 * projects.texi: Document target-specific directory in default project
3777 path for gnatmake.
3778
3779 2011-08-04 Thomas Quinot <quinot@adacore.com>
3780
3781 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3782 path in all cases .
3783
3784 2011-08-04 Yannick Moy <moy@adacore.com>
3785
3786 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3787 opt.ads, lib-xref.ads: Code clean up.
3788
3789 2011-08-04 Yannick Moy <moy@adacore.com>
3790
3791 * gnat_rm.texi: Update description of Test_Case
3792 * gnat_ugn.texi: Typo.
3793
3794 2011-08-04 Ed Falis <falis@adacore.com>
3795
3796 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3797
3798 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3799
3800 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3801 it is of type Root_Controlled. This action eliminates fields Prev and
3802 Next from type equality.
3803
3804 2011-08-04 Yannick Moy <moy@adacore.com>
3805
3806 * lib-xref-alfa.adb: Correct typo.
3807
3808 2011-08-04 Matthew Heaney <heaney@adacore.com>
3809
3810 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3811 component.
3812
3813 2011-08-04 Yannick Moy <moy@adacore.com>
3814
3815 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3816 (Analyze_Pragma): allow static string expression for name of Test_Case,
3817 instead of simply string literals.
3818 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3819 expressions.
3820
3821 2011-08-04 Vincent Celier <celier@adacore.com>
3822
3823 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
3824 case suffixes to find truncated main sources.
3825
3826 2011-08-04 Tristan Gingold <gingold@adacore.com>
3827
3828 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
3829 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
3830 (Compute_Current_Task): Ditto.
3831
3832 2011-08-04 Tristan Gingold <gingold@adacore.com>
3833
3834 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
3835
3836 2011-08-04 Yannick Moy <moy@adacore.com>
3837
3838 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
3839 library-level constant.
3840 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
3841 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
3842 used as selector of parameter association, in ALFA mode.
3843
3844 2011-08-04 Robert Dewar <dewar@adacore.com>
3845
3846 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
3847 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
3848 reformatting.
3849
3850 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3851
3852 * make.adb (Linking_Phase): Set source search path before calling
3853 gnatlink in CodePeer mode.
3854
3855 2011-08-04 Javier Miranda <miranda@adacore.com>
3856
3857 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3858 Remove code which takes care of building TSDs.
3859 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3860 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3861 the accessibility check in VM targets.
3862 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3863 (Building_Static_DT): Now returns false for VM targets.
3864 (Build_VM_TSDs): Removed.
3865 (Expand_Interface_Conversion): Generate missing runtime check for
3866 conversions to interface types whose target type is unknown at compile
3867 time.
3868 (Make_VM_TSD): Add missing code to disable the generation of calls to
3869 Check_TSD if the tagged type is not defined at library level, or not
3870 has a representation clause specifying its external tag, or -gnatdQ is
3871 active.
3872 * exp_disp.ads (Build_VM_TSDs): Removed.
3873 (Make_VM_TSDs): Spec relocated from exp_disp.adb
3874 * sem_disp.adb (Check_Dispatching_Operation): No code required to
3875 register primitives in the dispatch tables in VM targets.
3876 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3877 initialization of class-wide interface objects in VM targets.
3878 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3879 of Make_DT).
3880
3881 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3882
3883 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3884 when dotnet-ld cannot be found.
3885
3886 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3887
3888 * bindgen.adb: Simplify significantly generation of binder body file in
3889 CodePeer mode.
3890 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3891 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3892 not expanded).
3893
3894 2011-08-04 Yannick Moy <moy@adacore.com>
3895
3896 * sem_prag.adb, sem.ads: Code cleanup.
3897
3898 2011-08-04 Tristan Gingold <gingold@adacore.com>
3899
3900 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3901 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3902 results if possible.
3903 * s-stusta.adb (Print): Adjust after changes in s-stausa.
3904 * gnat_ugn.texi: Update dynamic stack usage section.
3905
3906 2011-08-04 Steve Baird <baird@adacore.com>
3907
3908 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3909 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3910 contains only a call to the user-defined main subprogram.
3911 (Gen_Main_Ada) - If CodePeer_Mode is set, then
3912 call the "wrapper" subprogram instead of directly
3913 calling the user-defined main subprogram.
3914
3915 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3916
3917 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3918 alternatives of a case statement for controlled objects. Rename local
3919 variable A to Dead_Alt.
3920 (Expand_N_If_Statement): Check the then and else statements of an if
3921 statement for controlled objects. Check the then statements of all
3922 elsif parts of an if statement for controlled objects.
3923 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3924 objects.
3925 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3926 detects a loop associated with the expansion of an array object.
3927 Augment the processing of the loop statements to account for a possible
3928 wrap done by Process_Statements_For_Controlled_Objects.
3929 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3930 statements and abortable part of an asynchronous select for controlled
3931 objects.
3932 (Expand_N_Conditional_Entry_Call): Check the else statements of a
3933 conditional entry call for controlled objects.
3934 (Expand_N_Selective_Accept): Check the alternatives of a selective
3935 accept for controlled objects.
3936 (Expand_N_Timed_Entry_Call): Check the entry call and delay
3937 alternatives of a timed entry call for controlled objects.
3938 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3939 exception handler for controlled objects.
3940 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3941 Add formal parameter Nested_Constructs along with its associated
3942 comment.
3943 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3944 Requires_Cleanup_Actions.
3945 (Process_Statements_For_Controlled_Objects): New routine.
3946 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3947 routine. Inspect a node which contains a non-handled sequence of
3948 statements for controlled objects. If such an object is found, the
3949 statements are wrapped in a block.
3950
3951 2011-08-04 Bob Duff <duff@adacore.com>
3952
3953 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3954 need to compare with Class_Wide_Type (T2), in order to get at the
3955 original class-wide type node.
3956 * sem_type.ads (Covers): Improve the comment.
3957 * einfo.ads (Class_Wide_Type): Improve the comment.
3958 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3959 the type of the Deref.
3960
3961 2011-08-04 Yannick Moy <moy@adacore.com>
3962
3963 * gnat_rm.texi: Document that Test_Case pragma can only appear on
3964 separate declarations.
3965 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3966 check identifier of pragma argument.
3967 (Chain_TC): check that no other test case associated to the same entity
3968 share the same name.
3969 (Check_Test_Case): disallow test case inside subprogram body
3970 (Analyze_Pragma): correct call to check identifier and not argument
3971 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3972 function gets name from test case pragma.
3973
3974 2011-08-04 Yannick Moy <moy@adacore.com>
3975
3976 * gnat_rm.texi: Document new pragma and aspect.
3977 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3978 (No_Duplicates_Allowed): new constant array defining whether duplicates
3979 aspects of each kind can appear on the same declaration.
3980 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3981 field, which points to a node holding the previous Spec_PPC_List.
3982 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3983 through the indirection with Contract.
3984 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3985 * par-prag.adb (Prag): do nothing on Test_Case pragma
3986 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3987 be called directly.
3988 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3989 component Ensures of Test_Case.
3990 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3991 (Analyze_Generic_Subprogram_Declaration,
3992 Analyze_Subprogram_Instantiation,
3993 Analyze_Abstract_Subprogram_Declaration,
3994 Analyze_Subprogram_Body_Helper,
3995 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3996 insert contract in subprogram node at point of definition
3997 * sem_ch13.adb
3998 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3999 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
4000 corresponding pragma
4001 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
4002 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
4003 similar to the analysis of pre/post
4004 (Derive_Subprogram): insert contract in subprogram node at point of
4005 derivation.
4006 * sem_prag.adb, sem_prag.ads
4007 (Check_Arg_Is_String_Literal, Check_Identifier):
4008 new checking procedures to be called in treatment of pragmas
4009 (Check_Test_Case): new procedure to check that a Test_Case aspect or
4010 pragma is well-formed. This does not check currently that 'Result is
4011 used only in the Ensures component of a Test_Case.
4012 (Analyze_Pragma): add case for Test_Case
4013 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
4014 components of a Test_Case.
4015 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
4016 expressions in the 3rd (and 4th if present) arguments of a Test_Case
4017 pragma, treated as spec expressions.
4018 (Sig_Flags): add value -1 for Test_Case.
4019 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
4020 Get_Requires_From_Test_Case_Pragma): getters for both expression
4021 components of a Test_Case.
4022 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
4023 indirection between an entry or [generic] subprogram entity and its
4024 pre/post + test-cases.
4025 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
4026 get/set for fields of an N_Contract node.
4027 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
4028 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
4029 names and pragma for Test_Case.
4030 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
4031
4032 2011-08-04 Vincent Celier <celier@adacore.com>
4033
4034 * gnat_ugn.texi: Improve documentation of gnatmake switch
4035 --source-info-file=.
4036
4037 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4038
4039 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
4040 type). Initialize Atyp to the appropriate type which is later checked
4041 for completion. Rewrite the assertion associated with private type
4042 completion.
4043
4044 2011-08-04 Ed Falis <falis@adacore.com>
4045
4046 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
4047 initialize the number of CPUs.
4048
4049 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4050
4051 * sem_type.adb (Disambiguate): New subsidiary routine
4052 In_Same_Declaration_List, to implement AI05-0020: a user-defined
4053 equality on an anonymous access type whose designated type is private
4054 does not lead to an ambiguity with the universal access equality
4055 operator in the body or child units of the defining package. The same
4056 is true for a multiplication operator on a private type completed with
4057 a fixed-point-type.
4058
4059 2011-08-04 Javier Miranda <miranda@adacore.com>
4060
4061 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
4062 (Normalize_Scalars_Config): Removed.
4063 * opt.adb
4064 (Register_Opt_Config_Switches): Remove registering config values of
4065 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
4066 (Restore_Opt_Config_Switches): Remove code which restores the values of
4067 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4068 Init_Or_Norm_Scalars.
4069 (Save_Opt_Config_Switches): Remove code which saves values of
4070 Init_Or_Norm_Scalars and Normalize_Scalars.
4071 (Set_Opt_Config_Switches): Remove code which restores config values of
4072 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4073 Init_Or_Norm_Scalars.
4074
4075 2011-08-04 Yannick Moy <moy@adacore.com>
4076
4077 * frontend.adb (Frontend): remove previous patch to avoid full
4078 qualification in ALFA mode.
4079 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4080 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4081 unique name for an entity, which could be used to identify the entity
4082 across compilation units.
4083
4084 2011-08-04 Thomas Quinot <quinot@adacore.com>
4085
4086 * prj-env.adb
4087 (Initialize_Default_Project_Path): Add target specific directory
4088 ($prefix/$target/lib/gnat) in front of project path in all cases
4089 (making gnatmake's behaviour consistent with gprbuild).
4090 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4091 Pass target name from Sdefault to project subsystem.
4092 * gnatls.adb: Show new target specific default project directory.
4093
4094 2011-08-04 Johannes Kanig <kanig@adacore.com>
4095
4096 * cstand.adb: Add Information to Identifier in Standard
4097 (Identifer_For): Set Entity to the corresponding entity
4098
4099 2011-08-04 Sergey Rybin <rybin@adacore.com>
4100
4101 * gnat_ugn.texi: Update doc on gnatcheck.
4102
4103 2011-08-04 Yannick Moy <moy@adacore.com>
4104
4105 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4106 xrefs in a scope.
4107
4108 2011-08-04 Yannick Moy <moy@adacore.com>
4109
4110 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4111 performing expansion.
4112 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4113 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4114 it is not called in ALFA mode.
4115
4116 2011-08-04 Emmanuel Briot <briot@adacore.com>
4117
4118 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4119 after all, so removed.
4120
4121 2011-08-04 Sergey Rybin <rybin@adacore.com>
4122
4123 * vms_data.ads: Add missing VMS qualifiers.
4124
4125 2011-08-04 Emmanuel Briot <briot@adacore.com>
4126
4127 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4128 the list of files on the command line after processing it through
4129 Complete_Mains.
4130
4131 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4132
4133 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4134 processing for .NET/JVM. These targets can now benefit from
4135 Raise_From_Controlled_Operation and they share the same processing with
4136 standard targets.
4137 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4138 These targets need transient scopes in order to properly finalize short
4139 lived controlled objects.
4140 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4141 NET/JVM. These targets can now benefit from
4142 Raise_From_Controlled_Operation and they share the same processing with
4143 standard targets.
4144
4145 2011-08-04 Geert Bosch <bosch@adacore.com>
4146
4147 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4148
4149 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4150
4151 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4152 Expand_Record_Aggregate, to determine whether aggregate must be
4153 expanded into assignments. This is the case if the ancestor part is
4154 private, regarless of the setting of the flag Has_Private_Ancestor.
4155
4156 2011-08-04 Ed Falis <falis@adacore.com>
4157
4158 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4159
4160 2011-08-04 Bob Duff <duff@adacore.com>
4161
4162 * sinfo.ads: Fix comment.
4163
4164 2011-08-04 Steve Baird <baird@adacore.com>
4165
4166 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4167 choose a package name in much the same way as is
4168 done for JGNAT when VM_Target /= No_VM, except that
4169 a slightly more distinctive prefix string is used.
4170
4171 2011-08-04 Emmanuel Briot <briot@adacore.com>
4172
4173 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4174 gnatmake command line.
4175 This behavior was never documented (and was supported only because of
4176 an early bug in the code). This case might lead to ambiguous cases
4177 (between unit names and truncated base names without suffixes).
4178
4179 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4180
4181 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4182 Remove the external tag of a tagged type from the internal hash table.
4183 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4184 expanded usage of the routine. Strenghten the check for Is_Master. Add
4185 processing for tagged types.
4186 (Build_Finalizer): Create all the necessary lists used in finalizer
4187 creation when the processed context is a package that may contain
4188 tagged types.
4189 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4190 Requires_Cleanup_Actions.
4191 (Expand_N_Package_Body): Package bodies may need clean up code
4192 depending on whether they contain tagged types.
4193 (Expand_N_Package_Declaration): Package declarations may need clean up
4194 code depending on whether they contain tagged types.
4195 (Unregister_Tagged_Types): New routine. Search through a list of
4196 declarations or statements, looking for non-abstract Ada tagged types.
4197 For each such type, generate code to unregister the external tag.
4198 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4199 Requires_Cleanup_Actions.
4200 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4201 through a list of declarations or statements looking for non-abstract
4202 Ada tagged types or controlled objects.
4203 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4204 Requires_Cleanup_Actions.
4205 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4206 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4207 RE_Unit_Table.
4208
4209 2011-08-04 Vincent Celier <celier@adacore.com>
4210
4211 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4212 has Ada sources, not project Project, because if the root project
4213 Project has no sources of its own, all projects will be deemed without
4214 sources.
4215
4216 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4217
4218 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4219 of the No_Param_Proc acc-to-subp type used for initialization of
4220 __gnat_finalize_library_objects so that it's declared at library level
4221 rather than nested inside of the adainit routine.
4222
4223 2011-08-04 Javier Miranda <miranda@adacore.com>
4224
4225 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4226 if the tagged type has a representation clause which specifies its
4227 external tag.
4228
4229 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4230
4231 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4232 Remove previous procedure with that name.
4233 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4234 when appropriate.
4235 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4236 subtype mark, the ancestor cannot have unknown discriminants.
4237 (Resolve_Record_Aggregate): if the type has invisible components
4238 because of a private ancestor, the aggregate is illegal.
4239
4240 2011-08-04 Vincent Celier <celier@adacore.com>
4241
4242 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4243 account switches -gnat2005, -gnat12 and -gnat2012.
4244
4245 2011-08-04 Bob Duff <duff@adacore.com>
4246
4247 * s-tasdeb.ads: Minor comment fix.
4248
4249 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4250
4251 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4252 CodePeer mode.
4253 * switch.ads, switch.adb (Is_Language_Switch): New function.
4254
4255 2011-08-04 Vincent Celier <celier@adacore.com>
4256
4257 * switch-c.adb: Minor comment addition.
4258
4259 2011-08-04 Vincent Celier <celier@adacore.com>
4260
4261 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4262 ending with '=' is followed by a space (missing file name).
4263
4264 2011-08-04 Pascal Obry <obry@adacore.com>
4265
4266 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4267
4268 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4269
4270 * sem_ch12.adb (Analyze_Associations): New routine
4271 Check_Overloaded_Formal_Subprogram to reject a formal package when
4272 there is a named association or a box initialisation for an overloaded
4273 formal subprogram of the corresponding generic.
4274
4275 2011-08-04 Yannick Moy <moy@adacore.com>
4276
4277 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4278 * get_alfa.adb, put_alfa.adb: Read and write new component of
4279 cross-reference.
4280 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
4281
4282 2011-08-04 Pascal Obry <obry@adacore.com>
4283
4284 * urealp.adb: Minor reformatting.
4285
4286 2011-08-04 Tristan Gingold <gingold@adacore.com>
4287
4288 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
4289 Handle the case when Cleanup_Protected_Object returns Empty.
4290
4291 2011-08-04 Yannick Moy <moy@adacore.com>
4292
4293 * frontend.adb (Frontend): only qualify names in non-ALFA mode
4294
4295 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4296
4297 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
4298 call, ignore functions.
4299
4300 2011-08-04 Geert Bosch <bosch@adacore.com>
4301
4302 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
4303 point.
4304
4305 2011-08-04 Emmanuel Briot <briot@adacore.com>
4306
4307 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
4308 as an index for Builder'Switches. This conforms to the documentation.
4309 * make.adb (Insert_Project_Sources): avoid duplicate code
4310
4311 2011-08-04 Emmanuel Briot <briot@adacore.com>
4312
4313 * makeutl.adb (Complete_Mains): if the user has passed a relative file
4314 name on the command line (for instance "../dummy"), never assume it can
4315 be a unit name.
4316
4317 2011-08-04 Tristan Gingold <gingold@adacore.com>
4318
4319 * bindgen.adb: Remove code the reference or create the
4320 Break_Start/__gnat_break_start procedure.
4321 * s-stalib.adb (Break_Start): Removed.
4322
4323 2011-08-04 Emmanuel Briot <briot@adacore.com>
4324
4325 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4326 shared with gprbuild.
4327
4328 2011-08-04 Yannick Moy <moy@adacore.com>
4329
4330 * par-ch4.adb (P_Primary): preferentially issue an error message about
4331 a missing parenthesis arount a conditional or case expression in Ada
4332 2012 mode, if we detect that the alignment is not correct for a
4333 statement.
4334
4335 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4336
4337 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4338 tag-to-class-wide conversion as needing finalization actions.
4339 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4340 a tag-to-class-wide conversion as needing finalization actions.
4341 (Is_Finalizable_Transient): The result of a tag-to-class-wide
4342 conversion does not need finalization actions.
4343 (Is_Tag_To_CW_Conversion): New routine.
4344 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4345 whether an object is the result of a tag-to-class-wide conversion.
4346
4347 2011-08-04 Yannick Moy <moy@adacore.com>
4348
4349 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4350 the left-hand-side and right-hand-side of a conjunct are inserted when
4351 translating a pre- or postcondition
4352 * sem_ch6.adb: Correct typo in comment
4353
4354 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4355
4356 * gnat_rm.texi: Ravenscar does not prohibit dependence on
4357 Unchecked_Conversion and Unchecked_Deallocation.
4358
4359 2011-08-04 Thomas Quinot <quinot@adacore.com>
4360
4361 * make.adb: Minor reformatting.
4362
4363 2011-08-04 Emmanuel Briot <briot@adacore.com>
4364
4365 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4366 sources in the project and its imported projects, but not in the whole
4367 tree.
4368
4369 2011-08-04 Emmanuel Briot <briot@adacore.com>
4370
4371 * make.adb: Remove debug trace.
4372
4373 2011-08-04 Vincent Celier <celier@adacore.com>
4374
4375 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4376 path in canonical form, to be able to compare path names on platforms
4377 such as Windows or Darwin.
4378
4379 2011-08-04 Thomas Quinot <quinot@adacore.com>
4380
4381 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4382 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4383 * scos.ads: Update documentation accordingly.
4384 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4385 pragmas.
4386
4387 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4388
4389 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4390 attribute only if prefix type is scalar.
4391
4392 2011-08-04 Emmanuel Briot <briot@adacore.com>
4393
4394 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4395 in gnatmake for specifying mains on the command line that do not belong
4396 to the main project. These mains must currently all belong to the same
4397 project, though.
4398 (Ultimate_Extension_Of): removed, since duplicated
4399 Ultimate_Extending_Project.
4400
4401 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4402
4403 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4404 instead.
4405 (CodePeer_Mode_String): New.
4406 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4407 CodePeer mode.
4408 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4409 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4410 mode, since no useful elaboration subprogram is needed by CodePeer.
4411 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4412 In this mode, compile binder file with -gnatC and do stop after this
4413 step.
4414
4415 2011-08-04 Vincent Celier <celier@adacore.com>
4416
4417 * exp_ch7.adb: Minor comment fix.
4418
4419 2011-08-04 Robert Dewar <dewar@adacore.com>
4420
4421 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4422 exp_ch4.adb, makeutl.adb: Minor reformatting.
4423
4424 2011-08-04 Emmanuel Briot <briot@adacore.com>
4425
4426 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4427 Create several new subprograms to move code out of Make. This makes the
4428 code more readable, removes code duplication, and is a preparation work
4429 for adding support for aggregate projects.
4430
4431 2011-08-04 Tristan Gingold <gingold@adacore.com>
4432
4433 * s-po32gl.ads, s-po32gl.adb: New files.
4434 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4435 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4436 (Build_Finalization_Collection): Use it.
4437 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4438 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4439 literals.
4440 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4441 * gcc-interface/Make-lang.in: Update dependencies.
4442
4443 2011-08-04 Emmanuel Briot <briot@adacore.com>
4444
4445 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4446 the command line.
4447
4448 2011-08-04 Emmanuel Briot <briot@adacore.com>
4449
4450 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4451 command line is not a file name, also check whether it could be a unit
4452 name.
4453
4454 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4455
4456 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4457 the header of the finalization routine.
4458 If the unit has no finalizer but is a body whose spec has one, then
4459 generate the decrement of the elaboration entity only.
4460 If the unit has a finalizer and is a spec, then do not generate the
4461 decrement of the elaboration entity.
4462 (Gen_Finalize_Library_C): Likewise.
4463
4464 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4465
4466 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4467 (Bounds_Size_Expression): Removed.
4468 (Double_Alignment_Of): New subsidiary routine.
4469 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4470 for a hole in the dope vector of unconstrained arrays due to different
4471 index and element alignments.
4472
4473 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4474
4475 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4476 raise program_error because body has not been seen yet.
4477
4478 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4479
4480 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4481 an unresolved name.
4482
4483 2011-08-04 Vincent Celier <celier@adacore.com>
4484
4485 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4486
4487 2011-08-04 Yannick Moy <moy@adacore.com>
4488
4489 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4490 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4491
4492 2011-08-04 Thomas Quinot <quinot@adacore.com>
4493
4494 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4495 instantiation in RCI.
4496
4497 2011-08-04 Emmanuel Briot <briot@adacore.com>
4498
4499 * make.adb: Share more code with gprbuild
4500
4501 2011-08-04 Emmanuel Briot <briot@adacore.com>
4502
4503 * projects.texi: Added documentation for the IDE'Gnat project file
4504 attribute.
4505
4506 2011-08-04 Nicolas Roche <roche@adacore.com>
4507
4508 * gnat_rm.texi: Minor editing.
4509
4510 2011-08-04 Javier Miranda <miranda@adacore.com>
4511
4512 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4513 and the library case for VM targets.
4514 (Gen_Adainit_Ada): Likewise.
4515
4516 2011-08-04 Robert Dewar <dewar@adacore.com>
4517
4518 * g-altive.ads: Minor comment updates.
4519 * prj-nmsc.adb: Minor reformatting.
4520
4521 2011-08-04 Javier Miranda <miranda@adacore.com>
4522
4523 * opt.ads
4524 (Normalize_Scalars_Config): Value of the configuration switch set by
4525 pragma Normalize_Scalars when it appears in the gnat.adc file.
4526 (Normalize_Scalars): New field for record Config_Switches_Type. Used
4527 to save and restore settings of this pragma.
4528 * opt.adb
4529 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4530 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4531
4532 2011-08-04 Vincent Celier <celier@adacore.com>
4533
4534 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4535
4536 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4537
4538 * makeutl.adb: Minor reformatting.
4539
4540 2011-08-04 Olivier Hainque <hainque@adacore.com>
4541
4542 * g-altive.ads: Update comments to reflect that only the soft
4543 binding is available today.
4544
4545 2011-08-04 Robert Dewar <dewar@adacore.com>
4546
4547 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4548 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4549 * gcc-interface/Make-lang.in: Update dependencies.
4550
4551 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4552
4553 * prj-env.adb: Remove local debug traces.
4554
4555 2011-08-04 Yannick Moy <moy@adacore.com>
4556
4557 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4558 was used instead of Hi_OK, which could cause a read of an uninitialized
4559 value later on. Detected while working on the new warning.
4560 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4561 to local variable.
4562 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4563 in more cases, in order to detect more unreferenced values.
4564 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4565 object for expression, if any.
4566
4567 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4568
4569 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4570 the operand types instead of the Esize.
4571
4572 2011-08-04 Steve Baird <baird@adacore.com>
4573
4574 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4575 enable CodePeer_Mode.
4576 * bindusg.adb (Display): Add help message describing -P binder switch.
4577 * gnat_ugn.texi: Document -P binder switch.
4578 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4579 user-defined main program directly.
4580 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4581 user-defined main program in the context clause of the package body.
4582
4583 2011-08-04 Yannick Moy <moy@adacore.com>
4584
4585 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4586 duplicate of Defining_Entity
4587 (Get_Unique_Entity_For_Decl): rename function into
4588 Unique_Defining_Entity
4589 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4590 (Formal_Proof_On): remove synthesized flag
4591 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4592 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4593 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4594 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4595 Annotate (Formal_Proof)
4596
4597 2011-08-04 Emmanuel Briot <briot@adacore.com>
4598
4599 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4600 source files with non-standard naming schemes, in imported projects
4601
4602 2011-08-04 Emmanuel Briot <briot@adacore.com>
4603
4604 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4605 specified on the gprbuild command line, we need to compile all units
4606 within that file, not just the first one we find
4607 Fix error message for mains that are not found.
4608
4609 2011-08-04 Thomas Quinot <quinot@adacore.com>
4610
4611 * sem_ch6.adb: Update comment.
4612 * sem_ch12.adb: Minor reformatting.
4613
4614 2011-08-04 Bob Duff <duff@adacore.com>
4615
4616 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4617 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4618 race condition whose symptom is to fail to lock Parent. That, in turn,
4619 causes Parent.Awake_Count to be accessed without locking Parent, which
4620 causes another race condition whose symptom is that Parent.Awake_Count
4621 can be off by 1 (either too high or too low). The solution is to lock
4622 Parent unconditionally, and then lock Acceptor, before reading
4623 Acceptor.Terminate_Alternative.
4624
4625 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4626
4627 * debug.adb: Update comment.
4628
4629 2011-08-04 Robert Dewar <dewar@adacore.com>
4630
4631 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4632 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4633 exp_ch6.adb: Minor reformatting.
4634
4635 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4636
4637 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4638 checks for -gnateE.
4639
4640 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4641
4642 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4643
4644 2011-08-04 Thomas Quinot <quinot@adacore.com>
4645
4646 * sinfo.ads: Minor reformatting.
4647
4648 2011-08-04 Emmanuel Briot <briot@adacore.com>
4649
4650 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4651 even if there is no location.
4652
4653 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4654
4655 * sem_res.adb, sem_ch4.adb: move check for restriction
4656 No_Task_Hierarchy to resolve_allocator.
4657
4658 2011-08-04 Thomas Quinot <quinot@adacore.com>
4659
4660 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4661 This flag of N_Pragma nodes is not used, remove it as well as all of
4662 the associated circuitry.
4663
4664 2011-08-04 Javier Miranda <miranda@adacore.com>
4665
4666 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4667 runtime check on duplicated externa tags
4668 * debug.adb Document switch -gnatdQ.
4669
4670 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4671
4672 * a-fihema.ads: Minor typo fix.
4673
4674 2011-08-04 Yannick Moy <moy@adacore.com>
4675
4676 * sem_ch10.adb: Minor comment update.
4677
4678 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4679
4680 * einfo.adb: Update the node field usage to reflect the renaming of
4681 Return_Flag to Return_ Flag_Or_Transient_Decl.
4682 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4683 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4684 (Write_Field15_Name): Change Return_Flag to
4685 Return_Flag_Or_Transient_Decl.
4686 * einfo.ads: Rename node field Return_Flag to
4687 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4688 occurrences in entities.
4689 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4690 associated Inline pragma.
4691 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4692 associated Inline pragma.
4693 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4694 routine.
4695 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4696 Return_Flag and Set_Return_Flag.
4697 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4698 objects generated for controlled transients declared inside an
4699 Exception_With_Actions. Update the calls to Return_Flag.
4700 (Process_Object_Declaration): Add code to add a null guard for hook
4701 objects generated for controlled transients declared inside an
4702 Exception_With_Actions. Update related comment.
4703 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4704 objects generated for controlled transients declared inside an
4705 Exception_With_Actions. Update the calls to Return_Flag.
4706 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4707
4708 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4709
4710 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4711 positional aggregate.
4712
4713 2011-08-04 Vincent Celier <celier@adacore.com>
4714
4715 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4716 SLOC only for pragmas.
4717
4718 2011-08-04 Emmanuel Briot <briot@adacore.com>
4719
4720 * projects.texi: Minor typo fix.
4721
4722 2011-08-04 Emmanuel Briot <briot@adacore.com>
4723
4724 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4725 on case-sensitive file systems.
4726
4727 2011-08-04 Thomas Quinot <quinot@adacore.com>
4728
4729 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4730 nested in a disabled pragma.
4731 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4732 enclosing pragma, if any, for X decisions.
4733
4734 2011-08-04 Thomas Quinot <quinot@adacore.com>
4735
4736 * sem_prag.adb: Minor reformatting.
4737
4738 2011-08-04 Vincent Celier <celier@adacore.com>
4739
4740 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4741 allowed in no run time mode.
4742
4743 2011-08-04 Vincent Celier <celier@adacore.com>
4744
4745 * make.adb (Check): When -gnatc is used, check for the source file
4746 inside the ALI file with a canonical case file name.
4747
4748 2011-08-04 Emmanuel Briot <briot@adacore.com>
4749
4750 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4751 overriding the separator.
4752
4753 2011-08-04 Robert Dewar <dewar@adacore.com>
4754
4755 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4756 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4757
4758 2011-08-04 Robert Dewar <dewar@adacore.com>
4759
4760 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4761
4762 2011-08-04 Yannick Moy <moy@adacore.com>
4763
4764 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4765 'Result only appears in postcondition of function.
4766
4767 2011-08-04 Thomas Quinot <quinot@adacore.com>
4768
4769 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4770 external tag, include the value of the external tag in the exception
4771 message.
4772
4773 2011-08-04 Yannick Moy <moy@adacore.com>
4774
4775 * sem_attr.adb (Result): modify error message for misplaced 'Result
4776
4777 2011-08-04 Sergey Rybin <rybin@adacore.com>
4778
4779 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4780 clear that the second argument must be an identifier.
4781
4782 2011-08-04 Thomas Quinot <quinot@adacore.com>
4783
4784 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4785 -fpreserve-control-flow, insert an IF statement on the barrier
4786 condition to ensure that a conditional branch instruction is generated.
4787
4788 2011-08-04 Emmanuel Briot <briot@adacore.com>
4789
4790 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4791 (Processing_Flags.Ignore_Missing_With): new flag.
4792
4793 2011-08-04 Emmanuel Briot <briot@adacore.com>
4794
4795 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4796 Source_List_File on case-insensitive systems where the file is actually
4797 on a case-sensitive file system (NFS,...).
4798
4799 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4800
4801 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4802 function return contains a controlled [extension] aggregate and the
4803 return statement is not part of a handled sequence of statements, wrap
4804 the return in a block. This ensures that all controlled temporaries
4805 generated during aggregate resolution will be picked up by the
4806 finalization machinery.
4807
4808 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4809
4810 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4811 components, freeze type before resolution, to ensure that default
4812 initializations are present for all components.
4813 * sem_res.adb (Resolve_Actuals): the designated object of an
4814 accces-to-constant type is a legal actual in a call to an
4815 initialization procedure.
4816
4817 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4818
4819 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
4820 N_Unchecked_Type_Conversion to the possible containers of a renamed
4821 transient variable.
4822
4823 2011-08-04 Yannick Moy <moy@adacore.com>
4824
4825 * par-ch13.adb (Aspect_Specifications_Present): recognize
4826 "with Identifier'Class =>" as an aspect, so that a meaningful warning
4827 is issued in Strict mode.
4828 * par.adb: Fix typos in comments.
4829
4830 2011-08-04 Yannick Moy <moy@adacore.com>
4831
4832 * sem_attr.adb (Result): modify error message to take into account Post
4833 aspect when compiling Ada 2012 (or newer) code.
4834
4835 2011-08-04 Nicolas Roche <roche@adacore.com>
4836
4837 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
4838 remove need for GCC exceptions.
4839
4840 2011-08-04 Vincent Celier <celier@adacore.com>
4841
4842 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
4843 project, not the source file name.
4844 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
4845 excluded, continue looking. This excluded source will only be returned
4846 if there is no other source with the same base name that is not locally
4847 removed.
4848
4849 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4850
4851 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
4852 private and one of the operands is a real literal, use a qualified
4853 expression rather than a conversion which is not meaningful to the
4854 back-end.
4855
4856 2011-08-04 Yannick Moy <moy@adacore.com>
4857
4858 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4859 corresponding aspect X'Class are allowed, proceed with analysis of the
4860 aspect instead of skipping it.
4861
4862 2011-08-04 Tristan Gingold <gingold@adacore.com>
4863
4864 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4865 This will allow to have an Ada implementation for the subprogram.
4866
4867 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4868
4869 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4870 completion and aspects are present, apply them to the entity for the
4871 type which is currently the partial view, but which is the one that
4872 will be frozen.
4873 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4874 applies to a partial view, indicate that the full view has predicates
4875 and delayed aspects.
4876 (Replace_Type_Reference): Handle properly predicates that apply to the
4877 full view of a private completion.
4878
4879 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4880
4881 * layout.adb (Layout_Type): For composite types, do not set Esize.
4882 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4883 set Esize.
4884 (Size_Known): Look at the RM size of components instead of the Esize.
4885 (Freeze_Record_Type): Look at the RM size instead of the Esize to
4886 issue warning and activate Implicit_Packing.
4887 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
4888 if the Esize is not known.
4889 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4890 for elementary types only.
4891 (Analyze_Record_Representation_Clause): Look at the RM size instead
4892 of the Esize to issue errors.
4893 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4894 is not known.
4895 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
4896 obsolete block.
4897 Look at the RM size instead of the Esize for types if the latter is
4898 not known.
4899 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4900
4901 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4902
4903 * sem_type.adb: proper handling of equality not involving anonymous
4904 access types.
4905
4906 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4907
4908 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4909 Vis_Decls. When creating a library-level finalizer for a package spec,
4910 both the declaration and body of the finalizer are inserted either in
4911 the visible or private declarations of the package spec.
4912
4913 2011-08-04 Javier Miranda <miranda@adacore.com>
4914
4915 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4916 use of the full-view of a type when invoking Is_Ancestor.
4917 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4918 the full-view of private parents is requested, then use also the
4919 full-view of the parent of the first derivation.
4920
4921 2011-08-04 Tristan Gingold <gingold@adacore.com>
4922
4923 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4924 instead of the locally imported procedure.
4925 * s-taprop-mingw.adb (Enter_Task): Ditto.
4926 * s-valrea.adb (Scan_Real): Ditto.
4927 * s-imgrea.adb (Set_Image_Real): Ditto.
4928 * s-flocon.ads: Make the package pure.
4929
4930 2011-08-04 Thomas Quinot <quinot@adacore.com>
4931
4932 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4933 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4934 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4935 New subprogram, moved here from...
4936 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4937 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4938 rewriting of the last argument into a procedure call statement here...
4939 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4940 instead.
4941
4942 2011-08-04 Thomas Quinot <quinot@adacore.com>
4943
4944 * par_sco.adb: Minor reformatting.
4945
4946 2011-08-04 Robert Dewar <dewar@adacore.com>
4947
4948 * erroutc.adb: Minor reformatting.
4949
4950 2011-08-04 Thomas Quinot <quinot@adacore.com>
4951
4952 * par_sco.adb: Comment update.
4953
4954 2011-08-04 Tristan Gingold <gingold@adacore.com>
4955
4956 * s-flocon.ads: New file.
4957 * g-flocon.ads: Now a renaming of s-flocon.
4958 * Makefile.rtl: Add s-flocon.o
4959
4960 2011-08-04 Javier Miranda <miranda@adacore.com>
4961
4962 * exp_strm.adb (Build_Array_Input_Function): if the array type is
4963 constrained, do not attempt to build a subtype of it.
4964
4965 2011-08-04 Yannick Moy <moy@adacore.com>
4966
4967 * errout.ads Change comments: remove 'R'M as an example where quotes
4968 are needed; add ALFA as another case where quotes are not needed
4969 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4970 case where quotes are not needed.
4971 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4972 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4973 Remove all occurrences of 'A'L'F'A
4974
4975 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4976
4977 * sem_ch13.adb: check legality of invariant pragma.
4978
4979 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4980
4981 * bindgen.adb: Add comments.
4982
4983 2011-08-04 Yannick Moy <moy@adacore.com>
4984
4985 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4986 synthesized flag.
4987 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4988 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4989
4990 2011-08-04 Robert Dewar <dewar@adacore.com>
4991
4992 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4993 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4994 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4995
4996 2011-08-04 Thomas Quinot <quinot@adacore.com>
4997
4998 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4999
5000 2011-08-04 Thomas Quinot <quinot@adacore.com>
5001
5002 PR ada/47880
5003 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
5004 allocated object.
5005
5006 2011-08-04 Robert Dewar <dewar@adacore.com>
5007
5008 * einfo.ads, exp_ch4.adb: Minor reformatting.
5009
5010 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5011
5012 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
5013
5014 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5015
5016 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
5017 type in all cases to compute list of primitive operations, because full
5018 view may be an itype that is not attached to the list of declarations.
5019
5020 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5021
5022 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
5023 library has already been finalized.
5024 (Gen_Adafinal_C): Likewise.
5025 (Gen_Adainit_Ada): Generate an early return if the library has
5026 already been elaborated.
5027 (Gen_Adainit_C): Likewise.
5028 (Gen_Output_File_Ada): Generate an elaboration flag.
5029 (Gen_Output_File_C): Likewise.
5030
5031 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5032
5033 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
5034 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
5035 built in the first place.
5036 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
5037 for CodePeer because Finalize_Address was not built to begin with.
5038 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
5039
5040 2011-08-04 Pascal Obry <obry@adacore.com>
5041
5042 * adaint.c (__gnat_tmp_name): Use current process id to create temp
5043 filenames, this ensures unicity of filenames across processes.
5044
5045 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5046
5047 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
5048 Raise_Controlled to Raise_From_Controlled_Operation. Update the
5049 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
5050 Add False as the actual to From_Abort in the generated call to
5051 Raise_From_Controlled_Operation.
5052
5053 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5054
5055 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
5056 so that the ali file name can be retrieved from outside of this package.
5057 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
5058 doing nothing in the general case, but used to update the object file
5059 timestamp if directly generated by the backend.
5060 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
5061 to a later time than the ali file one.
5062
5063 2011-08-04 Yannick Moy <moy@adacore.com>
5064
5065 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
5066 entities whose body contains an Annotate pragma which forces formal
5067 proof on this body.
5068 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5069 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
5070 Mark_Non_ALFA_Subprogram to pass in a message and node.
5071 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5072 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5073 surrounding subprogram.
5074 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5075 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5076 as not in ALFA is annotated with Formal_Proof being On, then an error
5077 is issued based on the additional parameters for message and node.
5078 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5079 * gcc-interface/Make-lang.in: Update dependencies.
5080
5081 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5082
5083 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5084 Finalize_Address when CodePeer is enabled.
5085
5086 2011-08-04 Pascal Obry <obry@adacore.com>
5087
5088 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5089 the latter returns a pointer to a static buffer which is deallocated
5090 at the end of the routine.
5091
5092 2011-08-04 Yannick Moy <moy@adacore.com>
5093
5094 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5095 after index creation; mark unconstrained base array type generated as
5096 being in/not in ALFA as well
5097 (Make_Index): mark subtype created as in/not in ALFA
5098 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5099 over a loop as in/not in ALFA, depending on its type and form of loop
5100 iteration.
5101
5102 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5103
5104 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5105 directly to False on .NET and JVM.
5106
5107 2011-08-04 Yannick Moy <moy@adacore.com>
5108
5109 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5110 constraint that subtype must come from source code to be in ALFA, so
5111 that anonymous subtypes can be in ALFA too.
5112
5113 2011-08-04 Yannick Moy <moy@adacore.com>
5114
5115 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5116 reference for ALFA mode.
5117 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5118 procedure public so as to use it from formal verification back-end.
5119
5120 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5121
5122 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5123 invalid checks of the Parameter, making Remove_Switch not working
5124 correctly.
5125
5126 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5127
5128 * targparm.ads: Update header: no run-time exception is needed on this
5129 file.
5130
5131 2011-08-04 Vincent Celier <celier@adacore.com>
5132
5133 * a-fihema.adb: Use System.IO instead of GNAT.IO
5134
5135 2011-08-04 Thomas Quinot <quinot@adacore.com>
5136
5137 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5138 are forbidden in Compiler_Unit mode.
5139
5140 2011-08-04 Robert Dewar <dewar@adacore.com>
5141
5142 * sem_util.adb: Minor reformatting.
5143
5144 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5145
5146 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5147 library-level finalizers.
5148 (Gen_Finalize_Library_C): Update the import string for library-level
5149 finalizers.
5150 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5151 library-level finalizer.
5152 * exp_ch7.adb: Remove with and use clauses for Stringt.
5153 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5154 Spec_Decl. Add local variable Body_Id. The names of library-level
5155 finalizers are now manually fully qualified and are no longer external.
5156 A single name is now capable of servicing .NET, JVM and non-VM targets.
5157 Pragma Export is no longer required to provide visibility for the name.
5158 (Create_Finalizer_String): Removed.
5159 (New_Finalizer_Name): New routine which mimics New_..._Name.
5160
5161 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5162
5163 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5164 elaboration counter to Standard_Short_Integer.
5165 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5166 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5167 (Gen_Elab_Externals_C): Likewise.
5168
5169 2011-08-04 Ed Falis <falis@adacore.com>
5170
5171 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5172 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5173 system-vxworks-mips.ads, system-vxworks-x86.ads
5174 (Always_Compatible_Rep): set to False for all VxWorks targets.
5175
5176 2011-08-04 Robert Dewar <dewar@adacore.com>
5177
5178 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5179 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5180 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5181 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5182 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5183 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5184 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5185 Minor reformatting and code reorganization.
5186
5187 2011-08-04 Emmanuel Briot <briot@adacore.com>
5188
5189 * projects.texi: Added doc for aggregate projects.
5190
5191 2011-08-04 Emmanuel Briot <briot@adacore.com>
5192
5193 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5194 Add support for overriding the Project_Path in aggregate projects.
5195
5196 2011-08-04 Robert Dewar <dewar@adacore.com>
5197
5198 * a-cofove.ads: Minor reformatting.
5199
5200 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5201
5202 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5203 on the generated code.
5204 (Build_Finalize_Statements): Update the comment on the generated code.
5205 (Build_Initialize_Statements): Update the comment on the generated code.
5206 (Build_Object_Declarations): Add local variable Result. The object
5207 declarations are now built in sequence.
5208 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5209 RE_Unit_Table.
5210
5211 2011-08-04 Robert Dewar <dewar@adacore.com>
5212
5213 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5214
5215 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5216
5217 * einfo.ads (Elaboration_Entity): Document new definition and use.
5218 (Elaboration_Entity_Required): Adjust to above change.
5219 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5220 * exp_ch12.adb: And with and use for Snames.
5221 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5222 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5223 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5224 <Check_Unit_Name>: Deal with N_Expanded_Name.
5225 <Attribute_Elaborated>: Extend to all unit names.
5226 * sem_elab.adb: And with and use for Uintp.
5227 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5228 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5229 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5230 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5231 from Gen_Adainit_Ada.
5232 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5233 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5234 case, do not call System.Standard_Library.Adafinal; instead call
5235 finalize_library if needed.
5236 (Gen_Adafinal_C): Likewise.
5237 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5238 non-main program case.
5239 (Gen_Adainit_C): Generate a couple of external declarations here.
5240 In the main program case, set SSL.Finalize_Library_Objects.
5241 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5242 (Gen_Elab_Calls_C): Likewise.
5243 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5244 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5245 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5246 objects here.
5247 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5248 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5249 Gen_Adafinal_Ada.
5250 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5251 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
5252 of external declarations. Call Gen_Finalize_Library_C.
5253
5254 2011-08-04 Emmanuel Briot <briot@adacore.com>
5255
5256 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5257 Compute_Compilation_Phases): new subprogram.
5258 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5259 The number of mains as well as the various compilation phases that
5260 need to be run are now project tree specific, since various
5261 aggregated trees might have different requirements. In particular,
5262 they do not all require bind or link phases.
5263
5264 2011-08-04 Emmanuel Briot <briot@adacore.com>
5265
5266 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5267 (Project_Tree_Appdata): New type.
5268 It is now possible to associate application-specific data to a project
5269 tree. In particular, this is used in the gprbuild builder to avoid a
5270 number of global tables and htables, especially now that there can be
5271 several project trees loaded at once because of aggregate projects.
5272 (Debug_Name): new procedure.
5273 * projects.texi: Clarify syntax of "**" for Source_Dirs
5274
5275 2011-08-03 Emmanuel Briot <briot@adacore.com>
5276
5277 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5278 the "roots" for a main.
5279 (Fill_From_Project): add support for aggregate projects. Main units
5280 in aggregated projects are now automatically added in the list of
5281 files to build (although this fails later on in gprbuild, because
5282 these files are not using the root proejct tree, so this needs
5283 further cleanup)
5284 * gcc-interface/Make-lang.in: Update dependencies.
5285
5286 2011-08-03 Yannick Moy <moy@adacore.com>
5287
5288 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
5289 conditional expression in ALFA.
5290 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
5291 expressions as not in ALFA.
5292
5293 2011-08-03 Robert Dewar <dewar@adacore.com>
5294
5295 * a-cofove.adb: Minor reformatting.
5296
5297 2011-08-03 Emmanuel Briot <briot@adacore.com>
5298
5299 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
5300 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
5301 gprbuild sources.
5302 These packages are more logically placed in the Queue package, since
5303 they manipulate the queue. It is also likely that they can be adapted
5304 for gnatmake, thus sharing more code.
5305 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
5306 that we could move the above.
5307
5308 2011-08-03 Emmanuel Briot <briot@adacore.com>
5309
5310 * errutil.adb (Finalize): clean up the list of error messages on exit.
5311 Calling this subprogram multiple times will no longer show duplicate
5312 error messages on stderr.
5313
5314 2011-08-03 Emmanuel Briot <briot@adacore.com>
5315
5316 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
5317 Getopt_Switches when we have already define a command line
5318 configuration.
5319
5320 2011-08-03 Yannick Moy <moy@adacore.com>
5321
5322 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5323 in ALFA. Instead, they are considered as assertions to prove.
5324 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5325 nodes as not in ALFA. Instead, include conditional expressions in ALFA
5326 if they have no ELSE part, or if they occur in pre- and postconditions,
5327 where the Condition cannot have side-effects in ALFA
5328 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5329 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5330 Instead, include type conversion between scalar types in ALFA.
5331 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5332 if-and-only-if its type is in ALFA.
5333
5334 2011-08-03 Thomas Quinot <quinot@adacore.com>
5335
5336 * scos.adb, get_scos.adb, put_scos.adb
5337 New code letter for decisions: G (entry guard)
5338 * par_sco.adb
5339 (Traverse_Subprogram_Body): Rename to...
5340 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5341 (Traverse_Protected_Body): New subprogram
5342 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5343 protected bodies and entry bodies.
5344
5345 2011-08-03 Yannick Moy <moy@adacore.com>
5346
5347 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5348 entities with get/set subprograms, which is set on procedure entities
5349 generated by the compiler for a postcondition.
5350 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5351 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5352 entity for a declaration
5353 (Get_Unique_Entity_For_Decl): new function returning an entity which
5354 represents a declaration, so that matching spec and body have the same
5355 entity.
5356
5357 2011-08-03 Robert Dewar <dewar@adacore.com>
5358
5359 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5360 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5361
5362 2011-08-03 Yannick Moy <moy@adacore.com>
5363
5364 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5365 library-level because retriction No_Implicit_Dynamic_Code in the
5366 front-end prevents its definition as a local subprogram
5367 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5368 for reuse in other contexts
5369 (Traverse_Declarations_Or_Statements,
5370 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5371 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5372 procedures take a callback parameter to be called on all declarations
5373 * lib-xref.ads
5374 (Traverse_All_Compilation_Units): new generic function to traverse a
5375 compilation unit and call a callback parameter on all declarations
5376
5377 2011-08-03 Javier Miranda <miranda@adacore.com>
5378
5379 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5380 in Java since they are always enclosed in a namespace that
5381 differentiates them, and overloaded entities are supported by the VM.
5382
5383 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5384
5385 * checks.adb (Determine_Range): If a computed bound of an operation is
5386 outside the range of the base type of the expression, and overflow
5387 checks are enabled, the result is unknown and cannot be used for any
5388 subsequent constant folding.
5389 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5390 unknown, so is the result of the comparison.
5391
5392 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5393
5394 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5395 From_Abort. When finalization was triggered by an abort, propagate
5396 Standard'Abort_Signal rather than Program_Error.
5397 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5398 From_Abort.
5399 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5400 From_Abort. When finalization was triggered by an abort, propagate
5401 Standard'Abort_Signal rather than Program_Error.
5402 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5403 From_Abort.
5404 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5405 Abort_Id. Update the calls to Build_Object_Declarations and
5406 Build_Raise_Statement to include Abort_Id.
5407 (Build_Adjust_Statements): New local variable Abort_Id. Update the
5408 calls to Build_Object_Declarations and Build_Raise_Statement to include
5409 Abort_Id.
5410 (Build_Finalize_Statements): New local variable Abort_Id. Update the
5411 calls to Build_Object_Declarations and Build_Raise_Statement to include
5412 Abort_Id.
5413 (Build_Components): Create an entity for Abort_Id when exceptions are
5414 allowed on the target.
5415 (Build_Finalizer): New local variable Abort_Id.
5416 (Build_Initialize_Statements): New local variable Abort_Id. Update the
5417 calls to Build_Object_Declarations and Build_Raise_Statement to include
5418 Abort_Id.
5419 (Build_Object_Declarations): Add new formal Abort_Id. Create the
5420 declaration of flag Abort_Id to preserve the original abort status
5421 before finalization code is executed.
5422 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5423 runtime routine Raise_From_Controlled_Operation.
5424 (Create_Finalizer): Update the call to Build_Raise_Statement to include
5425 Abort_Id. Update the call to Build_Object_Declarations to include
5426 Abort_Id. Update the layout of the finalizer body.
5427 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5428 (Process_Transient_Objects): New local variable Abort_Id. Remove the
5429 clunky code to create all flags and objects related to
5430 exception propagation and replace it with a call to
5431 Build_Object_Declarations. Update the call to Build_Raise_Statement to
5432 include Abort_Id.
5433 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5434 Add new formal Abort_Id and associated comment on its use.
5435 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5436 on its use.
5437 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5438 Remove the clunky code to create all flags and objects related to
5439 exception propagation and replace it with a call to
5440 Build_Object_Declarations. Update the call to Build_Raise_Statement.
5441
5442 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5443
5444 * s-tassta.adb: Fix minor typos.
5445
5446 2011-08-03 Robert Dewar <dewar@adacore.com>
5447
5448 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5449 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5450
5451 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5452
5453 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5454 to packages. This ensures that the finalizer body will not end up
5455 inside the freeze node.
5456 (Process_Declarations): Add code to detect whether a freeze node has a
5457 nested finalization collection.
5458
5459 2011-08-03 Pascal Obry <obry@adacore.com>
5460
5461 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5462 (Current_Session): Return a not null access to Session_Type.
5463 (Default_Session): Likewise.
5464
5465 2011-08-03 Robert Dewar <dewar@adacore.com>
5466
5467 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5468 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5469
5470 2011-08-03 Pascal Obry <obry@adacore.com>
5471
5472 * g-awk.ads: Minor comment fix.
5473
5474 2011-08-03 Sergey Rybin <rybin@adacore.com>
5475
5476 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5477 the tree structure related to discriminant constraints.
5478 Original_Discriminant cannot be used any more for computing the
5479 defining name for the reference to a discriminant.
5480
5481 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5482
5483 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5484 function is not visibly tagged, this is not a dispatching call and
5485 therfore is not Tag_Indeterminate, even if the function is marked as
5486 dispatching on result.
5487
5488 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5489
5490 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5491 (Expand_N_Free_Statement): Add a guard to protect against run-times
5492 which do not support controlled types.
5493 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5494 against run-times which do not support controlled types.
5495 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5496 against run-times which do not support controlled types.
5497 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5498 against run-times which do not support controlled types.
5499 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5500 protect against run-times which do not support controlled types.
5501
5502 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5503
5504 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5505 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5506
5507 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5508
5509 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5510 modified in the source, to prevent spurious warnings when compiling
5511 with -gnatg.
5512
5513 2011-08-03 Thomas Quinot <quinot@adacore.com>
5514
5515 * a-except-2005.adb: Minor reformatting.
5516
5517 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5518
5519 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5520 is a renaming declaration in the private part of a package, do not emit
5521 a warning that the with_clause could be moved because the renaming may
5522 be used in the body or in a child unit.
5523
5524 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5525
5526 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5527 Propagate the Comes_From_Source attribute from the original return
5528 object to the renaming.
5529
5530 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5531
5532 * exp_ch7.adb (Build_Raise_Statement): Do not call
5533 Raise_From_Controlled_Operation when this routine is not present in
5534 the run-time library.
5535 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5536 libraries (Ravenscar), tasks are non-terminating, and protected objects
5537 and tasks can only appear at library level, so we do not want
5538 finalization of protected objects nor tasks.
5539 * exp_intr.adb: Minor clarification in comment.
5540 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5541 Gen_Output_File_C): Remove references to finalization of library-level
5542 objects when using restricted run-time libraries.
5543
5544 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5545
5546 * sem_ch3.adb (Build_Discriminant_Constraints): Set
5547 Original_Discriminant only if the parent type is a generic formal.
5548
5549 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5550
5551 * exp_ch13.adb: Add with and use clause for Targparm;
5552 (Expand_N_Free_Statement): Prevent the generation of a custom
5553 Deallocate on .NET/JVM targets since this requires pools and address
5554 arithmetic.
5555 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5556 .NET/JVM targets, attach the newly allocated object to the access
5557 type's finalization collection. Do not generate a call to
5558 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5559 exist in the runtime.
5560 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5561 create a custom Allocate for object that do not require initialization.
5562 Attach a newly allocated object to the access type's finalization
5563 collection on .NET/JVM.
5564 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5565 assignment of controlled types on .NET/JVM. The two hidden pointers
5566 Prev and Next and stored and later restored after the assignment takes
5567 place.
5568 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5569 kludge for .NET/JVM to recognize a particular piece of code coming from
5570 Heap_Management and change the call to Finalize into Deep_Finalize.
5571 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5572 finalization collections on .NET/JVM only for types derived from
5573 Controlled. Separate the association of storage pools with a collection
5574 and only allow it on non-.NET/JVM targets.
5575 (Make_Attach_Call): New routine.
5576 (Make_Detach_Call): New routine.
5577 (Process_Object_Declarations): Suppress the generation of
5578 build-in-place return object clean up code on .NET/JVM since it uses
5579 pools.
5580 * exp_ch7.ads (Make_Attach_Call): New routine.
5581 (Make_Detach_Call): New routine.
5582 * exp_intr.adb Add with and use clause for Targparm.
5583 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5584 on .NET/JVM targets.
5585 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5586 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5587 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5588 names used in finalization.
5589
5590 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5591
5592 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5593 (Attach, Detach): Lock the current task when chaining an object onto a
5594 collection.
5595
5596 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5597
5598 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5599 Rewritten to create the message strings when the exception is not
5600 raised by an abort during finalization.
5601 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5602 Raise_From_Controlled_Operation and update its associated comment.
5603 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5604 Ada.Finalization.Heap_Management provides key functionality
5605 associated with controlled objects on the heap, their creation,
5606 finalization and reclamation. Type Finalization_Collection is
5607 effectively a wrapper which sits ontop of a storage pool and performs
5608 all necessary bookkeeping for all the objects it contains. Each
5609 access-to-controlled or access-to-class-wide type receives a collection
5610 as part of its expansion. The compiler generates buffer code and
5611 invokes Allocate / Deallocate to create and destroy allocated
5612 controlled objects.
5613 * a-finali.adb ("="): Removed.
5614 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5615 fields Prev and Next.
5616 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5617 A library unit with at least one controlled object on the library level
5618 has a special finalizer which is invoked by the binder. To signal this,
5619 ali files carry field PF.
5620 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5621 associated comment on field usage.
5622 * a-tags.adb (Get_RC_Offset): Removed.
5623 (Needs_Finalization): New routine.
5624 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5625 Dispatch tables now carry field Needs_Finalization which provides
5626 runtime indication whether a type is controlled or has controlled
5627 components or both. Remove field RC_Offset.
5628 (Get_RC_Offset): Removed along with its associated pragma Export.
5629 Since tagged types with controlled components no longer carry hidden
5630 field _controller, the special mechanism to retrieve its location is no
5631 longer needed.
5632 (Needs_Finalization): New routine.
5633 * atree.ads, atree.adb (Elist24): New routine.
5634 (Set_Elist24): New routine.
5635 * atree.h: Add a define clause for Elist24.
5636 * bindgen.adb New library-level variable Lib_Final_Built.
5637 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5638 presence of a VM target, the routine generates calls to the proper
5639 library finalization routine.
5640 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5641 targets. Set the correct library finalization routine depending on
5642 whether the library has controlled objects or this is a VM compilation.
5643 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5644 to library-level finalizers of compiled units in reverse order of
5645 elaboration. It also produces exception management code and reraises a
5646 potential exception after all units have been finalized.
5647 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5648 library-level finalizers of compiled units in reverse order of
5649 elaboration.
5650 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5651 definitions of all library-level finalizers available to the compilation
5652 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5653 dependent code.
5654 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5655 System.Standard_Library.Adafinal directly. If the library needs
5656 finalization actions, create the sequence of finalization calls.
5657 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5658 Generate a with clause for System.Soft_Links when compiling for a VM.
5659 Remove the code which imports System.Standard_Library.Adafinal as
5660 Do_Finalize. Generate the library finalization routine.
5661 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5662 If the library needs finalization actions, create all the definitions
5663 of library- level finalizers.
5664 (Has_Finalizer): New routine. Determines whether at least one compiled
5665 unit has a library-level finalizer.
5666 Add type Qualification_Mode.
5667 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5668 * einfo.adb: New usage of field 15 as Return_Flag.
5669 Remove Finalization_Chain_Entity from the usages of field 19.
5670 Remove Associated_Final_Chain from the usages of field 23.
5671 New usage of field 23 as Associated_Collection.
5672 New usage of field 24 as Finalizer.
5673 New usage of flag 252 as Is_Processed_Transient.
5674 (Associated_Final_Chain): Removed.
5675 (Associated_Collection): New routine.
5676 (Finalization_Chain_Entity): Removed.
5677 (Finalizer): New routine.
5678 (Is_Finalizer): New routine.
5679 (Is_Processed_Transient): New routine.
5680 (Return_Flag): New routine.
5681 (Set_Associated_Final_Chain): Removed.
5682 (Set_Associated_Collection): New routine.
5683 (Set_Finalization_Chain_Entity): Removed.
5684 (Set_Finalizer): New routine.
5685 (Set_Is_Processed_Transient): New routine.
5686 (Set_Return_Flag): New routine.
5687 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5688 displayed flags.
5689 (Write_Field8_Name): Alphabetize the output.
5690 (Write_Field11_Name): Alphabetize the output.
5691 (Write_Field12_Name): Alphabetize the output.
5692 (Write_Field13_Name): Alphabetize the output.
5693 (Write_Field14_Name): Alphabetize the output.
5694 (Write_Field15_Name): Alphabetize the output.
5695 (Write_Field16_Name): Alphabetize the output.
5696 (Write_Field17_Name): Alphabetize the output.
5697 (Write_Field18_Name): Alphabetize the output.
5698 (Write_Field19_Name): Alphabetize the output. Remove the output of
5699 Finalization_Chain_Entity.
5700 (Write_Field20_Name): Alphabetize the output.
5701 (Write_Field21_Name): Alphabetize the output.
5702 (Write_Field22_Name): Alphabetize the output.
5703 (Write_Field23_Name): Alphabetize the output. Remove the output of
5704 Associated_Final_Chain. Add output for Associated_Collection.
5705 (Write_Field24_Name): Alphabetize the output.
5706 (Write_Field25_Name): Add output for Finalizer.
5707 (Write_Field26_Name): Alphabetize the output.
5708 (Write_Field27_Name): Alphabetize the output.
5709 (Write_Field28_Name): Alphabetize the output.
5710 * einfo.ads: Add new field description for Associated_Collection and
5711 its uses in nodes.
5712 Remove Associated_Final_Chain and its uses in nodes.
5713 Remove Finalization_Chain_Entity and its uses in nodes.
5714 Add new field description for Finalizer and its uses in nodes.
5715 Add new synthesized attribute Is_Finalizer.
5716 Add new flag description for Is_Processed_Transient and its uses in
5717 nodes.
5718 Add new field description for Return_Flag and its uses in nodes.
5719 (Associated_Final_Chain): Removed along with its pragma Inline.
5720 (Associated_Collection): New routine and pragma Inline.
5721 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5722 (Finalizer): New routine and pragma Inline.
5723 (Is_Finalizer): New routine and pragma Inline.
5724 (Is_Processed_Transient): New routine and pragma Inline.
5725 (Return_Flag): New routine and pragma Inline.
5726 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5727 (Set_Associated_Collection): New routine and pragma Inline.
5728 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5729 (Set_Finalizer): New routine and pragma Inline.
5730 (Set_Is_Processed_Transient): New routine and pragma Inline.
5731 (Set_Return_Flag): New routine and pragma Inline.
5732 * exp_aggr.adb: Alphabetize subprograms.
5733 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5734 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5735 associated comments. Remove local variables External_Final_List and
5736 Attach.
5737 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5738 Ancestor. Remove the retrieval of finalization lists. Update the call to
5739 Make_Adjust_Call.
5740 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5741 lists. Update the call to Late_Expansion.
5742 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5743 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5744 (Gen_Assign): Remove the retrieval of the finalization list used to
5745 build the assignment. Update the calls to Make_Init_Call and
5746 Make_Adjust_Call.
5747 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5748 Remove the mechanism to determine attachment levels and finalization
5749 list retrieval. Remove the processing for coextensions.
5750 (Init_Controller): Removed. Controllers no longer exist.
5751 (Late_Expansion): Remove formals Flist and Obj along with their
5752 associated comments. Update the calls to Build_Record_Aggr_Code and
5753 Build_Array_Aggr_Code.
5754 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5755 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5756 appear in entry bodies, protected subprograms and task bodies.
5757 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5758 * exp_ch3.adb (Add_Final_Chain): Removed.
5759 (Build_Array_Init_Proc): Alphabetize local variables.
5760 (Build_Assignment): Alphabetize local variables. Update the call to
5761 Maked_Adjust_Call.
5762 (Build_Class_Wide_Master): Rename local variables to better reflect
5763 their role.
5764 (Build_Discriminant_Assignments): Code reformatting.
5765 (Build_Init_Call_Thru): Code reformatting.
5766 (Build_Init_Procedure): Code reformatting. Generate a special version
5767 of Deep_Finalize which is capable of finalizing all initialized
5768 components and ignore the rest.
5769 (Build_Init_Statements): Rename local variables to better reflect their
5770 role.
5771 Reimplement the mechanism to include the creation and update of an index
5772 variable called a "counter". It is used as a bookmark for tracing
5773 initialized and non-initialized components.
5774 (Build_Initialization_Call): Remove local variable Controller_Typ.
5775 Alphabetize all local variables. Remove the initialization of the
5776 record controller and update the call to Make_Init_Call.
5777 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5778 New local variable Counter.
5779 (Constrain_Array): Alphabetize.
5780 (Expand_Freeze_Array_Type): Create a collection instead of a
5781 finalization list.
5782 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5783 Finalize_Address which is used in conjunction with allocated controlled
5784 objects.
5785 (Expand_N_Object_Declaration): Remove the creation of a finalization
5786 list for anonymous access types. Update the calls to Make_Init_Call and
5787 Make_Adjust_Call.
5788 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5789 retrieval of finalization lists. Remove the expansion of the record
5790 controller. Create TSS primitive Finalize_Address used in conjunction
5791 with controlled objects on the heap. Create finalization collections
5792 for access-to-controlled record components.
5793 (Expand_Record_Controller): Removed.
5794 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5795 class-wide types now requires additional processing. Create
5796 finalization collections for access-to-controlled types.
5797 (Increment_Counter): New routine.
5798 (Make_Counter): New routine.
5799 (Make_Eq_If): Remove the mention of Name_uController.
5800 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5801 types coming from System.Finalization_Root.
5802 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5803 (Predefined_Primitive_Bodies): There is no longer need to skip types
5804 coming from System.Finalization_Root.
5805 (Stream_Operation_OK): Do not generate stream routines for
5806 type Ada.Finalization.Heap_Management.Finalization_Collection.
5807 * exp_ch3.ads: Alphabetize subprograms.
5808 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5809 Add with and use clause for Lib.
5810 (Complete_Coextension_Finalization): Removed.
5811 (Complete_Controlled_Allocation): New routine. Create a finalization
5812 collection for anonymous access-to-controlled types. Create a custom
5813 Allocate which interfaces with the back end and the machinery in
5814 Heap_Management.
5815 (Expand_Allocator_Expression): Add necessary calls to
5816 Complete_Controlled_Allocation. Remove the retrieval of finalization
5817 lists. Update the calls to Make_Adjust_Call. Generate a call to
5818 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5819 the associated collection.
5820 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
5821 Code clean up. Remove the retrieval of finalization lists and
5822 attachment levels.
5823 Update the call to Make_Init_Call. Generate a call to
5824 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5825 the associated collection.
5826 (Get_Allocator_Final_List): Removed. Finalization lists are not
5827 available.
5828 (Suitable_Element): Remove the mention of Name_uController.
5829 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
5830 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
5831 the left hand side, carry out the assignment and adjust the left hand
5832 side.
5833 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
5834 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
5835 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
5836 BIP_Collection and BIPcollection.
5837 (Build_Heap_Allocator): New routine used to allocate the return object
5838 of a build-in-place function onto a collection.
5839 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
5840 (Expand_Call): Do not replace direct calls to Deep routines with their
5841 aliases.
5842 (Expand_N_Extended_Return_Statement): Give all variables shorter names
5843 and update their occurrences. Add a special return flag to monitor the
5844 [ab]normal execution of the function. The flag is set right before the
5845 return statement.
5846 Rewrite the mechanism used to allocate a build-in-place return object
5847 on the heap or on a storage pool.
5848 (Is_Direct_Deep_Call): New routine.
5849 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
5850 build-in-place function call instead of a final list. Build a call to
5851 Set_Finalize_Address_Ptr to decorate the associated collection.
5852 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5853 order to name the build-in-place function call's result for later
5854 finalization. Add a collection to a build-in-place function call
5855 instead of a final list.
5856 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5857 build-in-place function call instead of a final list. Remove the code
5858 which moves one final list and transforms it into the actual in a
5859 nested build-in-place call.
5860 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5861 build-in-place function call instead of a final list.
5862 (Move_Final_List): Removed.
5863 (Needs_BIP_Collection): New routine.
5864 (Needs_BIP_Final_List): Removed.
5865 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5866 enumeration type BIP_Formal_Kind.
5867 Update the related comment.
5868 (Needs_BIP_Collection): New routine.
5869 (Needs_BIP_Final_List): Removed.
5870 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5871 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5872 majority of subprograms in this unit. Add Name_Finalize_Address to
5873 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5874 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5875 statements for an array type.
5876 (Build_Adjust_Statements): Create the adjust statements for a record
5877 type.
5878 (Build_Cleanup_Statements): New routine. A procedure which given any
5879 construct containing asynchronous calls, references to _master, or is a
5880 task body, a task allocation or a protected body produces the necessary
5881 runtime calls to clean up these constructs.
5882 (Build_Exception_Handler): New routine.
5883 (Build_Final_List): Removed.
5884 (Build_Finalization_Collection): New routine. A core procedure which
5885 creates a collection to service heap allocated controlled objects
5886 associated with an access-to-controlled type.
5887 (Build_Finalize_Statements): Create the finalization statements for a
5888 record types.
5889 (Build_Finalizer): New routine. A core procedure which given any
5890 construct with declarations and/or statements detects all objects which
5891 need any type of clean up (controlled objects, protected objects) and
5892 generates all necessary code to clean up the said objects in the proper
5893 order.
5894 (Build_Finalizer_Call): New routine.
5895 (Build_Initialize_Statements): Create the initialization statements for
5896 an array type. The generated routine contains code to finalize partially
5897 initialized arrays.
5898 (Build_Object_Declarations): New routine.
5899 (Build_Raise_Statement): New routine.
5900 (Clean_Simple_Protected_Objects): Removed.
5901 (Controller_Component): Removed.
5902 (Enclosing_Function): New routine.
5903 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5904 either declarations or statements or both.
5905 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5906 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5907 package.
5908 (Find_Final_List): Removed.
5909 (Global_Flist_Ref): Removed.
5910 (In_Finalization_Root): Removed.
5911 (Insert_Actions_In_Scope_Around): Determine the range of the transient
5912 scope in terms of tree nodes. Process all transient variables within
5913 that range.
5914 (Make_Adjust_Call): Rewritten. There is no longer an attach call
5915 generated after the adjust.
5916 (Make_Attach_Call): Removed.
5917 (Make_Call): New routine.
5918 (Make_Clean): Removed.
5919 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5920 build routines.
5921 (Make_Deep_Proc): Rewritten to generate the new profile signature used
5922 in Deep routines.
5923 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5924 build routines.
5925 (Make_Final_Call): Modified to simply create a call to either
5926 Deep_Finalize or Finalize.
5927 (Make_Finalize_Address_Body): New routine.
5928 (Make_Finalize_Address_Stmts): New routine. A function which produces
5929 TSS primitive Finalize_Address used in conjunction with heap allocated
5930 controlled objects.
5931 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5932 (Make_Init_Call): Rewritten. There is no longer an attach call
5933 generated after initialization.
5934 (Make_Local_Deep_Finalize): New routine.
5935 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5936 (Make_Transient_Block): Remove the finalization list retrieval and
5937 manipulation.
5938 (Needs_Finalization): Moved to Exp_Util.
5939 (Parent_Field_Type): New routine.
5940 (Preprocess_Components): New routine.
5941 (Process_Transient_Objects): New routine.
5942 (Wrap_HSS_In_Block): New routine.
5943 (Wrap_Transient_Declaration): Remove finalization list management and
5944 controller insertion.
5945 (Wrap_Transient_Expression): Code reformatting.
5946 (Wrap_Transient_Statement): Code reformatting.
5947 * exp_ch7.ads (Build_Final_List): Removed.
5948 (Build_Finalization_Collection): New routine.
5949 (Build_Raise_Statement): New routine.
5950 (Controller_Component): Removed.
5951 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5952 (Find_Final_List): Removed.
5953 (In_Finalization_Root): Removed.
5954 (Is_Simple_Protected_Type): Update related comment.
5955 (Make_Adjust_Call): New parameter profile and associated comments.
5956 (Make_Attach_Call): Removed.
5957 (Make_Final_Call): New parameter profile and associated comments.
5958 (Make_Finalize_Address_Body): New routine.
5959 (Make_Init_Call): New parameter profile and associated comments.
5960 (Make_Local_Deep_Finalize): New routine.
5961 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5962 (Needs_Finalization): Moved to Exp_Util.
5963 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5964 (Expand_N_Protected_Body): Remove the handling of finalization lists.
5965 (Find_Protection_Type): Moved to Exp_Util.
5966 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5967 (Make_DT): Update sequence of dispatch table initialization. Remove the
5968 initialization of field RC_Offset. Add initialization of field Needs_
5969 Finalization.
5970 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5971 Reimplement how an object is first finalized, then deallocated.
5972 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5973 Code reformatting.
5974 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5975 Register TSS_Finalize_Address with type TSS_Names.
5976 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5977 procedure provides the interface between an allocation / deallocation
5978 and the support machinery in Ada.Finalization.Heap_Management.
5979 (Find_Init_Call): Code reformatting.
5980 (Find_Init_Call_In_List): Code reformatting.
5981 (Find_Protection_Type): Moved from Exp_Ch9.
5982 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5983 (Has_Controlled_Coextensions): Removed.
5984 (Has_Controlled_Objects): New routine.
5985 (In_Library_Level_Package_Body): New routine.
5986 (Insert_Action_After): New routine.
5987 (Is_Finalizable_Transient): New routine. This predicate determines
5988 whether an object declaration is one of the many variants of controlled
5989 transients.
5990 (Is_Null_Access_BIP_Func_Call): New routine.
5991 (Is_Non_BIP_Func_Call): New routine.
5992 (Is_Related_To_Func_Return): New routine.
5993 (Needs_Finalization): Moved from Exp_Ch7.
5994 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5995 (Find_Protection_Type): Moved from Exp_Ch9.
5996 (Has_Controlled_Coextensions): Removed.
5997 (Has_Controlled_Objects): New routine.
5998 (In_Library_Level_Package_Body): New routine.
5999 (Insert_Action_After): New routine.
6000 (Is_Finalizable_Transient): New routine.
6001 (Is_Null_Access_BIP_Func_Call): New routine.
6002 (Is_Non_BIP_Func_Call): New routine.
6003 (Is_Related_To_Func_Return): New routine.
6004 (Needs_Finalization): Moved from Exp_ch7.
6005 * expander.adb (Expand): Add a case for N_Free_Statement.
6006 * freeze.adb (Freeze_All): Replace the generation of a finalization
6007 list with a collection for access-to-controlled types.
6008 (Freeze_Entity): Code reformatting.
6009 (Freeze_Record_Type): Remove the freezing of a record controller
6010 component.
6011 (Freeze_Subprogram): Code reformatting.
6012 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
6013 finalization list.
6014 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
6015 has a library-level finalizer.
6016 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
6017 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
6018 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
6019 files. Add a-fihema to the list of object files.
6020 * par-ch4.adb:
6021 Alphabetize the associations in type Is_Parameterless_Attribute.
6022 * rtsfind.ads: Ada.Finalization_List.Controller and
6023 System.Finalization_Implementation are no longer a GNAT unit.
6024 Update the range of type Ada_Finalization_Child. Remove the following
6025 recoverable entities:
6026
6027 RE_Attach_To_Final_List
6028 RE_Deep_Tag_Attach
6029 RE_Finalize_List
6030 RE_Finalize_One
6031 RE_Finalizable_Ptr_Ptr
6032 RE_Global_Final_List
6033 RE_Limited_Record_Controller
6034 RE_List_Controller
6035 RE_Move_Final_List
6036 RE_Record_Controller
6037 RE_Simple_List_Controller
6038
6039 Add the following recoverable entities:
6040
6041 RE_Add_Offset_To_Address
6042 RE_Allocate
6043 RE_Base_Pool
6044 RE_Deallocate
6045 RE_Exception_Identity
6046 RE_Finalization_Collection
6047 RE_Finalization_Collection_Ptr
6048 RE_Needs_Finalization
6049 RE_Save_Library_Occurrence
6050 RE_Set_Finalize_Address_Ptr
6051 RE_Set_Storage_Pool_Ptr
6052 RE_Storage_Count
6053 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
6054 Name_uController.
6055 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
6056 (First_Stored_Discriminant): Remove the mention of Name_uController.
6057 * sem_aux.ads: Comment reformatting.
6058 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
6059 to redecorate an already existing class-wide type.
6060 (Decorate_Tagged_Type): New parameter profile and associated comment.
6061 Create a "shadow class-wide type" for a shadow entity.
6062 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
6063 of the final chain along with the associated comment.
6064 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
6065 Full_Desig and set it to the full view of the designated type.
6066 Initialize the finalization collection to empty.
6067 (Build_Derived_Record_Type): Alphabetize local variables. Code
6068 reformatting.
6069 (Collect_Fixed_Components): Remove the mention of Name_uController.
6070 (Create_Constrained_Components): Remove the mention of Name_uController.
6071 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6072 class-wide type of a shadow entity.
6073 (Process_Full_View): Update the machinery which marks type
6074 Limited_Controlled's entity as limited.
6075 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6076 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6077 list, instead make a collection build-in-place formal.
6078 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6079 a designated type in order to establish a match between the renaming
6080 and the renamed entity.
6081 (Find_Selected_Component): Add guard to prevent spurious exceptions
6082 from being raised on .NET/JVM.
6083 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6084 to the list of primitive that need special processing. Update arrays
6085 C_Names and D_Names.
6086 (Replace_Types): Handle class-wide types.
6087 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6088 different parameter profile, look at the first formal.
6089 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6090 use clauses for Exp_Util.
6091 * sem_res.adb: Remove with and use clauses for Elists.
6092 (Propagate_Coextensions): Removed.
6093 (Resolve_Allocator): Do not propagate the list of coextensions from one
6094 allocator to another.
6095 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6096 Deaccessed_T to Desig_Typ.
6097 (Enter_Name): Remove the mention of Name_uController.
6098 (Gather_Components): Remove the mention of Name_uController.
6099 (Incomplete_Or_Private_View): New routine.
6100 (Is_Coextension_Root): Removed.
6101 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6102 * sem_util.ads (Incomplete_Or_Private_View): New routine.
6103 (Is_Coextension_Root): Removed.
6104 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6105 Controlled types are now derived from a null tagged record. Remove
6106 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6107 * sinfo.adb (Coextensions): Removed.
6108 (Set_Coextensions): Removed.
6109 * sinfo.ads: Remove Coextensions from the explanation of node fields
6110 and its uses in nodes.
6111 Update the field usage of N_Allocator.
6112 (Coextensions): Removed along with its pragma Inline.
6113 (Set_Coextensions): Removed along with its pragma Inline.
6114 * snames.ads-tmpl: Remove names
6115
6116 Name_uClean
6117 Name_uController
6118 Name_uFinal_List
6119 Name_uLocal_Final_List
6120 Name_Finalization_Root
6121 Name_Next
6122 Name_Prev
6123
6124 Add names
6125
6126 Name_uFinalizer
6127 Name_Finalize_Address
6128 * s-pooglo.adb (Allocate): Add overriding indicator.
6129 (Deallocate): Add overriding indicator.
6130 (Storage_Size): Add overriding indicator.
6131 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6132 than Finalize_Global_List.
6133 (Null_Finalize_Global_List): Removed.
6134 (Save_Library_Occurrence): New routine.
6135 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6136 initialization. Add variable Finalize_Library_Objects along with its
6137 pragma Export. Add variables Library_Exception and
6138 Library_Exception_Set along with their pragma Export.
6139 (Null_Finalize_Global_List): Removed.
6140 (Save_Library_Occurrence): New routine.
6141 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6142 rather than Finalize_Global_List.
6143 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6144 of the constructed node.
6145
6146 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6147
6148 * link.c: Include "auto-host.h" before system headers.
6149
6150 2011-08-03 Vincent Celier <celier@adacore.com>
6151
6152 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6153 that are not extended. Do not check if a library project that is
6154 extended should be regenerated. Do not add to table Library_Paths the
6155 libraries that are in extended projects. Link only with libraries that
6156 are in libray projects that are not extended.
6157 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6158 for a library project that is extended.
6159
6160 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6161
6162 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6163 conforming subprogram renamings that appear to be completions if they
6164 are not fully conformant.
6165 Such renamings are homographs but not completions.
6166 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6167 names in a subprogram renaming that appears in an instance.
6168
6169 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6170
6171 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6172 not immutably limited, build actual subtype from expression to provide
6173 proper bounds to caller.
6174
6175 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6176
6177 * sem_ch8.adb: Minor comment correction.
6178
6179 2011-08-03 Thomas Quinot <quinot@adacore.com>
6180
6181 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6182 returning a limited array, use an extended return statement.
6183
6184 2011-08-03 Vincent Celier <celier@adacore.com>
6185
6186 * make.adb (Initialize): If --subdirs= is used, but no project file is
6187 specified, attempt to create the specify subdir if it does not already
6188 exist and use it as the object directory as if -D had been specified.
6189
6190 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6191
6192 * s-tpopsp-vms.adb: New file.
6193 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6194 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6195
6196 2011-08-03 Emmanuel Briot <briot@adacore.com>
6197
6198 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6199 package.
6200
6201 2011-08-03 Yannick Moy <moy@adacore.com>
6202
6203 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6204 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6205 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6206 detect that an array has static bounds.
6207
6208 2011-08-03 Thomas Quinot <quinot@adacore.com>
6209
6210 * exp_dist.adb: Minor reformatting.
6211
6212 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6213
6214 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6215 (ATCB_Key): Removed, not always used.
6216
6217 2011-08-03 Emmanuel Briot <briot@adacore.com>
6218
6219 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6220 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6221 most remaining global variables.
6222
6223 2011-08-03 Robert Dewar <dewar@adacore.com>
6224
6225 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6226 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6227 reformatting.
6228
6229 2011-08-03 Javier Miranda <miranda@adacore.com>
6230
6231 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6232 that must be passed by copy in VM targets.
6233
6234 2011-08-03 Emmanuel Briot <briot@adacore.com>
6235
6236 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6237 duplicates a similar htable now in the project tree.
6238
6239 2011-08-03 Claire Dross <dross@adacore.com>
6240
6241 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6242 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6243 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6244 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6245 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6246 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6247 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6248 update.
6249
6250 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6251
6252 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6253 (ATCB_Key): Removed, not always used.
6254 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6255 s-taprop-posix.adb.
6256 * s-tpopsp-tls.adb: New file.
6257 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6258 x86/x64/ia64/powerpc/sparc Linux.
6259
6260 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6261
6262 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6263 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6264
6265 2011-08-03 Thomas Quinot <quinot@adacore.com>
6266
6267 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6268 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6269 Fix type selection for mapping integer types to PolyORB types.
6270
6271 2011-08-03 Bob Duff <duff@adacore.com>
6272
6273 * sem_ch7.adb: Minor comment clarification.
6274
6275 2011-08-03 Bob Duff <duff@adacore.com>
6276
6277 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6278 an error analyzing a choice, skip further processing. Further
6279 processing could cause a crash or cascade errors.
6280
6281 2011-08-03 Emmanuel Briot <briot@adacore.com>
6282
6283 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
6284 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
6285 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6286 prj-env.ads (Shared_Project_Tree_Data): new type
6287 An aggregate project and its aggregated trees need to share the common
6288 data structures used for lists of strings, packages,... This makes the
6289 code simpler since otherwise we have to pass the root tree (also used
6290 for the configuration file data) in addition to the current project
6291 tree. This also avoids ambiguities as to which tree should be used.
6292 And finally this saves a bit of memory.
6293 (For_Every_Project_Imported): new parameter Tree.
6294 Since aggregated projects are using a different tree, we need to let
6295 the caller know which tree to use to manipulate the returned project.
6296
6297 2011-08-03 Robert Dewar <dewar@adacore.com>
6298
6299 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
6300 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
6301 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
6302 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
6303
6304 2011-08-03 Javier Miranda <miranda@adacore.com>
6305
6306 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
6307 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
6308
6309 2011-08-03 Bob Duff <duff@adacore.com>
6310
6311 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
6312 the Base_Type.
6313
6314 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
6315
6316 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
6317 g-sehash.ads: Fix typo. Update header.
6318
6319 2011-08-03 Thomas Quinot <quinot@adacore.com>
6320
6321 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6322 expansion.
6323
6324 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6325
6326 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6327 prefixes of private types along with records, since the selector may be
6328 a discriminant.
6329 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6330 private types along with records, since the selector may be a
6331 discriminant.
6332
6333 2011-08-03 Emmanuel Briot <briot@adacore.com>
6334
6335 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
6336
6337 2011-08-03 Javier Miranda <miranda@adacore.com>
6338
6339 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6340 Tagged_Type_Expansion.
6341
6342 2011-08-03 Yannick Moy <moy@adacore.com>
6343
6344 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6345 violation when the argument of concatenation is the name of a
6346 constant.
6347
6348 2011-08-03 Emmanuel Briot <briot@adacore.com>
6349
6350 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6351 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6352 (Process_Declarative_Items): new parameter Child_Env.
6353
6354 2011-08-03 Yannick Moy <moy@adacore.com>
6355
6356 * alfa.ads: Update format of ALFA section in ALI file in order to
6357 add a mapping from bodies to specs when both are present.
6358 (ALFA_Scope_Record): Add components for spec file/scope.
6359 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6360 present.
6361 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6362 collected, fill in the spec information when relevant.
6363 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
6364 present.
6365
6366 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6367
6368 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6369 code unit to decide whether to add internally generated subprograms.
6370
6371 2011-08-03 Javier Miranda <miranda@adacore.com>
6372
6373 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
6374 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6375 be handled by copy in VM targets.
6376
6377 2011-08-03 Emmanuel Briot <briot@adacore.com>
6378
6379 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
6380 code with Makeutl.Get_Switches.
6381 * prj-tree.adb: Update comment.
6382
6383 2011-08-03 Thomas Quinot <quinot@adacore.com>
6384
6385 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6386 subprogram with a limited formal that does not support external
6387 streaming.
6388
6389 2011-08-03 Yannick Moy <moy@adacore.com>
6390
6391 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6392 continuation line
6393 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6394 not from current unit in two phases, because it is not possible to
6395 change the table while iterating over its content.
6396 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6397
6398 2011-08-03 Sergey Rybin <rybin@adacore.com>
6399
6400 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6401 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6402
6403 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6404
6405 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6406 and the component type is composite, this is ambiguous for predefined
6407 concatenation, but if the node is not overloaded and the entity is a use
6408 -defined function its profile can be used to resolve that aggregate.
6409
6410 2011-08-03 Robert Dewar <dewar@adacore.com>
6411
6412 * exp_ch4.adb: Minor code cleanup.
6413
6414 2011-08-03 Thomas Quinot <quinot@adacore.com>
6415
6416 * exp_dist.adb: Do not generate distribution stubs if serious errors
6417 have been diagnosed.
6418
6419 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6420
6421 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6422 the first formal of a primitive operation, go to the base type to
6423 handle properly an access to a derived type with constrained
6424 discriminants.
6425 * sem_type.adb (Disambiguate): an immediately visible operator hides a
6426 user-defined function that is only use-visible.
6427
6428 2011-08-03 Robert Dewar <dewar@adacore.com>
6429
6430 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6431 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6432 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6433 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6434 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6435 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6436 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6437 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6438
6439 2011-08-03 Robert Dewar <dewar@adacore.com>
6440
6441 * repinfo.adb (List_Mechanism): Add handling of
6442 Convention_Ada_Pass_By_XXX.
6443 * sem_mech.adb (Set_Mechanism): Ditto.
6444 * sem_prag.adb (Process_Convention): Add entries for
6445 Convention_Ada_Pass_By_XXX.
6446 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6447
6448 2011-08-03 Pascal Obry <obry@adacore.com>
6449
6450 * makeutl.adb: Minor reformatting.
6451
6452 2011-08-03 Vincent Celier <celier@adacore.com>
6453
6454 * fname-uf.adb
6455 (Get_File_Name) If the file cannot be found when there are no config
6456 pragmas file and May_Fail is True, return No_File instead of the file
6457 name, to be consistent.
6458
6459 2011-08-03 Pascal Obry <obry@adacore.com>
6460
6461 * adaint.c (__gnat_is_executable_file_attr): Avoid access
6462 to null pointer.
6463
6464 2011-08-03 Javier Miranda <miranda@adacore.com>
6465
6466 * sem_ch13.adb
6467 (Same_Representation): In VM targets the representation of arrays with
6468 aliased components differs from arrays with non-aliased components.
6469
6470 2011-08-03 Emmanuel Briot <briot@adacore.com>
6471
6472 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6473 not systematically lower case attribute indexes that contain no "."
6474 Fix definition of several Naming attributes, which take
6475 a unit name as index and therefore should be case insensitive.
6476 Minor refactoring (reduce length of variable names).
6477
6478 2011-08-03 Emmanuel Briot <briot@adacore.com>
6479
6480 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6481
6482 2011-08-03 Emmanuel Briot <briot@adacore.com>
6483
6484 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6485 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6486 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6487 prj-tree.ads (Prj.Tree.Environment): new type.
6488
6489 2011-08-03 Emmanuel Briot <briot@adacore.com>
6490
6491 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6492 prj-tree.adb, prj-tree.ads (Environment): new type.
6493
6494 2011-08-03 Emmanuel Briot <briot@adacore.com>
6495
6496 * prj-tree.ads: Remove unused variable.
6497
6498 2011-08-03 Yannick Moy <moy@adacore.com>
6499
6500 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6501 issuing messages related to SPARK restriction violation.
6502
6503 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6504
6505 * sem_ch6.adb: guard against error nodes in return statements.
6506
6507 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6508
6509 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6510 a warning can only appear on a configuration file, so emit warning
6511 without further checks.
6512
6513 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6514
6515 * s-interr.ads: add overriding keyword.
6516
6517 2011-08-03 Geert Bosch <bosch@adacore.com>
6518
6519 * exp_attr.adb: Fix minor typo.
6520
6521 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6522
6523 * par-ch4.adb: improve error recovery.
6524
6525 2011-08-03 Emmanuel Briot <briot@adacore.com>
6526
6527 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6528 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6529 to Errout_Handling.
6530
6531 2011-08-03 Emmanuel Briot <briot@adacore.com>
6532
6533 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6534 "external" as an attribute name in aggregate projects.
6535
6536 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6537
6538 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6539 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6540 from 0, so we need to adjust.
6541
6542 2011-08-03 Emmanuel Briot <briot@adacore.com>
6543
6544 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6545 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6546
6547 2011-08-03 Yannick Moy <moy@adacore.com>
6548
6549 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6550 restriction on overloaded entity if the entity is not an operator.
6551
6552 2011-08-03 Yannick Moy <moy@adacore.com>
6553
6554 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6555 restrict.ads: Rename remaining Check_Formal_Restriction* into
6556 Check_SPARK_Restriction*.
6557
6558 2011-08-03 Emmanuel Briot <briot@adacore.com>
6559
6560 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6561 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6562 qualifier.
6563 (Project_Empty): removed
6564 (Empty_Project): new parameter Qualifier
6565 This is used to have fields specific to aggregate projects, cleaner
6566 New field to store the list of aggregated projects.
6567 (Check_Aggregate_Project): removed
6568 (Process_Aggregated_Projects, Free): new subprograms.
6569
6570 2011-08-03 Olivier Hainque <hainque@adacore.com>
6571
6572 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6573
6574 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6575
6576 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6577 explicit dereference of an unconstrained type, create a constrained
6578 subtype for it, as is done for function calls that return an
6579 unconstrained type.
6580
6581 2011-08-03 Thomas Quinot <quinot@adacore.com>
6582
6583 * g-pehage.adb (Finalize): Avoid possible double-free.
6584
6585 2011-08-03 Steve Baird <baird@adacore.com>
6586
6587 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6588 Elab_Spec/Body attrs in CodePeer_Mode.
6589
6590 2011-08-03 Javier Miranda <miranda@adacore.com>
6591
6592 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6593 low bound is not known at compile time but they have no others choice.
6594 Done because in this case the bounds can be obtained directly from the
6595 aggregate.
6596
6597 2011-08-03 Ed Falis <falis@adacore.com>
6598
6599 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6600 on VxWorks SMP. Remove unusable constant ANY_CPU.
6601
6602 2011-08-03 Emmanuel Briot <briot@adacore.com>
6603
6604 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6605 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6606 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6607 Prj.Env.Initialize_Empty): new subprograms
6608 (Get_Env, Find_Project): remove parameter Target_Name.
6609
6610 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6611
6612 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6613 as a condition for the delayed call to Derived_Subprograms done for the
6614 case of the rewriting of a derived type that constrains the
6615 discriminants of its parent type.
6616 Avoids redundant subprogram derivations for private subtype derivations.
6617
6618 2011-08-03 Javier Miranda <miranda@adacore.com>
6619
6620 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6621 Build_Record_Aggr_Code.
6622 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6623 discriminants in extension aggregates.
6624
6625 2011-08-03 Emmanuel Briot <briot@adacore.com>
6626
6627 * prj-pp.adb (Print): also output project qualifiers, since in
6628 particular "aggregate" is mandatory in an aggregate project.
6629
6630 2011-08-03 Emmanuel Briot <briot@adacore.com>
6631
6632 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6633 (Debug_Output): new function.
6634
6635 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6636
6637 * gnat_ugn.texi: Document -Wstack-usage.
6638 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6639
6640 2011-08-03 Thomas Quinot <quinot@adacore.com>
6641
6642 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6643 have keyword LIMITED.
6644
6645 2011-08-03 Yannick Moy <moy@adacore.com>
6646
6647 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6648 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6649 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6650 section (does not happen in compiler, only if code directly calls
6651 Scan_ALI).
6652 * get_alfa.adb, get_alfa.ads: New files.
6653 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6654 needed.
6655 * lib-xref-alfa.adb: New file.
6656 * lib-xref.adb, lib-xref.ads
6657 (Xref_Entry): redefine information needed in cross-references for ALFA.
6658 Push ALFA treatments in separated local package.
6659 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6660 identifiers. Return entity of package body instead of spec. Return
6661 Empty for a scope with no location.
6662 (Generate_Reference): adapt to new components for ALFA information.
6663 Remove the need for D references on definitions.
6664 (Is_Local_Reference): moved to ALFA local package
6665 (Output_References): extract subfunction as Extract_Source_Name
6666 (Output_Local_References): remove procedure, replaced by filtering of
6667 cross-references in package ALFA and printing in Put_ALFA.
6668 (Write_Entity_Name): remove procedure
6669 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6670 print exact name of entity as it appears in source file
6671 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6672 * put_alfa.adb, put_alfa.ads: New files.
6673 * xref_lib.adb (Search_Xref): protect read of cross-references against
6674 reading other sections of the ALI file, in gnatxref
6675 (Search): protect read of cross-references against reading other
6676 sections of the ALI file, in gnatfind.
6677 * gcc-interface/Make-lang.in: Update dependencies.
6678
6679 2011-08-03 Thomas Quinot <quinot@adacore.com>
6680
6681 * sem_ch3.adb: Minor reformatting.
6682
6683 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6684
6685 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6686 raising an exception.
6687
6688 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6689
6690 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6691 type, always use 1 as the lower bound or string, even if lower bound of
6692 context is not static, to handle properly null strings in a non-static
6693 context.
6694
6695 2011-08-03 Bob Duff <duff@adacore.com>
6696
6697 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6698 always legal on the right-hand side of an assignment statement; there
6699 is always an applicable index constraint in this case. Therefore, the
6700 check for Pkind = N_Assignment_Statement is now unconditional -- it
6701 doesn't depend on whether Is_Constrained (Typ).
6702
6703 2011-08-03 Robert Dewar <dewar@adacore.com>
6704
6705 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6706
6707 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6708
6709 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6710 for an itype created within a generic unit.
6711
6712 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6713
6714 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6715 suppresses all inlining.
6716
6717 2011-08-03 Robert Dewar <dewar@adacore.com>
6718
6719 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6720 exp_aggr.adb: Minor reformatting.
6721
6722 2011-08-03 Thomas Quinot <quinot@adacore.com>
6723
6724 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6725 tagged assignment when discriminant checks are suppressed. This is
6726 useless and extremely costly in terms of static stack usage.
6727
6728 2011-08-03 Bob Duff <duff@adacore.com>
6729
6730 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6731 of generics, because this leads to the wrong entity in the wrong scope,
6732 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6733 an instance.
6734 (Process_Interface_Name): Follow Alias for instances of generics, to
6735 correct for the above change.
6736
6737 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6738
6739 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6740 is an integer literal it is always safe to replace the reference. In
6741 addition, if the reference appears in the generated code for an object
6742 declaration it is necessary to copy because otherwise the reference
6743 might be to the uninitilized value of the discriminant of the object
6744 itself.
6745
6746 2011-08-03 Pascal Obry <obry@adacore.com>
6747
6748 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6749 ACL used, in this case we want to check for ending .exe, not .exe
6750 anywhere in the path.
6751
6752 2011-08-03 Sergey Rybin <rybin@adacore.com>
6753
6754 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6755 the tree structure (semantic decoration of references to record
6756 discriminants).
6757
6758 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6759
6760 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6761 choices of a named array aggregate, bail out when any choices are
6762 marked as Errors_Posted.
6763
6764 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6765
6766 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6767 in which entity is frozen, to handle properly loop variables in
6768 iterators.
6769
6770 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6771
6772 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6773 subtype is not static, compute the upper bound using attributes, to
6774 handle properly index types that are not integer types.
6775
6776 2011-08-03 Bob Duff <duff@adacore.com>
6777
6778 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6779 Update copyright notice.
6780
6781 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6782
6783 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6784 Original_Discriminant if within an instance.
6785 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6786
6787 2011-08-03 Thomas Quinot <quinot@adacore.com>
6788
6789 * einfo.ads: Minor reformatting.
6790
6791 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6792
6793 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6794 composite type with an unfrozen subcomponent, in the profile of a
6795 primitive operation.
6796
6797 2011-08-03 Robert Dewar <dewar@adacore.com>
6798
6799 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6800
6801 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6802
6803 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6804 unconstrained type with discriminants is initialized with an aggregate,
6805 use the constrained subtype of the aggregate as the type of the object,
6806 because it is immutable, and this allows the back-end to generate no
6807 code for the object declaration.
6808
6809 2011-08-03 Robert Dewar <dewar@adacore.com>
6810
6811 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6812 comparison operand is variable, and turns out to be zero or negative.
6813
6814 2011-08-03 Javier Miranda <miranda@adacore.com>
6815
6816 * exp_intr.adb
6817 (Expand_Dispatching_Constructor_Call): Disable expansion of
6818 code required for native targets. Done to avoid generating
6819 references to unavailable runtime entities in VM targets.
6820 * exp_ch3.adb
6821 (Expand_N_Object_Declaration): Add missing support to handle
6822 the explicit initialization of class-wide interface objects.
6823 Fix documentation.
6824
6825 2011-08-03 Matthew Heaney <heaney@adacore.com>
6826
6827 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
6828
6829 2011-08-03 Matthew Heaney <heaney@adacore.com>
6830
6831 * a-cbdlli.adb (Splice): move source items from first to last
6832
6833 2011-08-03 Yannick Moy <moy@adacore.com>
6834
6835 * sem_util.ads: comment added.
6836
6837 2011-08-03 Javier Miranda <miranda@adacore.com>
6838
6839 * exp_aggr.adb
6840 (Expand_Record_Aggregate): In VM targets disable the expansion into
6841 assignments of aggregates whose type is not known at compile time.
6842
6843 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6844
6845 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
6846 protected entries and task entries, to build the proper renaming
6847 declaration for entry formals, used in debugging.
6848 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
6849 parameters in the same way.
6850
6851 2011-08-02 Robert Dewar <dewar@adacore.com>
6852
6853 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6854 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6855 code reorganization.
6856
6857 2011-08-02 Robert Dewar <dewar@adacore.com>
6858
6859 * debug.adb: Debug flag d.P to suppress length comparison optimization
6860 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6861 comparison of Length by comparing First/Last instead.
6862
6863 2011-08-02 Matthew Heaney <heaney@adacore.com>
6864
6865 * a-cobove.ads: Code clean up.
6866
6867 2011-08-02 Vincent Celier <celier@adacore.com>
6868
6869 * adaint.c (file_names_case_sensitive_cache): New static int.
6870 (__gnat_get_file_names_case_sensitive): Cache the return value in
6871 file_names_case_sensitive_cache at the first invocation, to avoid
6872 multiple calls to getenv.
6873
6874 2011-08-02 Bob Duff <duff@adacore.com>
6875
6876 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6877
6878 2011-08-02 Yannick Moy <moy@adacore.com>
6879
6880 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6881 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6882 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6883 indicate that we are in a precondition or postcondition. This is used in
6884 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6885 decide whether to flag the spec or body of the current subprogram as
6886 not in ALFA.
6887
6888 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
6889
6890 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6891 list.
6892 * a-extiin.ads: New file.
6893
6894 2011-08-02 Bob Duff <duff@adacore.com>
6895
6896 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6897 now raises Name_Error instead of Use_Error in certain cases. The other
6898 parts of this AI were already implemented properly.
6899
6900 2011-08-02 Vincent Celier <celier@adacore.com>
6901
6902 * link.c: Only import "auto-host.h" when building the gnattools.
6903
6904 2011-08-02 Yannick Moy <moy@adacore.com>
6905
6906 * sem_util.adb: Inter-unit inlining does not work for a subprogram
6907 which calls a local subprogram, so extract subprogram
6908 from Mark_Non_ALFA_Subprogram_Body.
6909
6910 2011-08-02 Javier Miranda <miranda@adacore.com>
6911
6912 * exp_ch9.adb
6913 (Extract_Dispatching_Call): If the type of the dispatching object is an
6914 access type then return an explicit dereference in the Object out-mode
6915 parameter.
6916
6917 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6918
6919 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6920 compatibility checks for all indexes of an array subtype, not just the
6921 first. Reset Has_Dynamic_Range_Check on the subtype before each
6922 potential check to ensure that Insert_Range_Checks will not elide any
6923 of the dynamic checks.
6924
6925 2011-08-02 Yannick Moy <moy@adacore.com>
6926
6927 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6928 SPARK restriction at parsing time.
6929 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6930 directive only if the SPARK restriction is set for this unit.
6931
6932 2011-08-02 Yannick Moy <moy@adacore.com>
6933
6934 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6935 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6936 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6937 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6938 Mark_Non_ALFA_Subprogram_Body.
6939 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6940 inlined.
6941
6942 2011-08-02 Yannick Moy <moy@adacore.com>
6943
6944 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6945 might be costly.
6946
6947 2011-08-02 Robert Dewar <dewar@adacore.com>
6948
6949 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6950 exp_ch3.adb: Minor reformatting.
6951
6952 2011-08-02 Emmanuel Briot <briot@adacore.com>
6953
6954 * adaint.c (__gnat_locate_exec_on_path): only returns executable
6955 files, not any regular file.
6956 (__gnat_locate_file_with_predicate): new subprogram.
6957
6958 2011-08-02 Yannick Moy <moy@adacore.com>
6959
6960 * sinfo.adb, sinfo.ads: Restrict the use of flags
6961 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6962 nodes, plus N_Subtype_Declaration for the 2nd one.
6963
6964 2011-08-02 Sergey Rybin <rybin@adacore.com>
6965
6966 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6967 - fix bugs in the description of Source_Trace;
6968 - get rid of UNIT_NAME;
6969
6970 2011-08-02 Javier Miranda <miranda@adacore.com>
6971
6972 * exp_ch9.adb
6973 (Build_Dispatching_Requeue): Adding support for VM targets
6974 since we cannot directly reference the Tag entity.
6975 * exp_sel.adb (Build_K): Adding support for VM targets.
6976 (Build_S_Assignment): Adding support for VM targets.
6977 * exp_disp.adb
6978 (Default_Prim_Op_Position): In VM targets do not restrict availability
6979 of predefined interface primitives to compiling in Ada 2005 mode.
6980 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6981 restricted to compiling in Ada 2005 mode.
6982 (Make_VM_TSD): Generate code that declares and initializes the OSD
6983 record. Needed to support dispatching calls through synchronized
6984 interfaces.
6985 * exp_ch3.adb
6986 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6987 primitives associated with synchronized interfaces.
6988 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6989 primitives associated with synchronized interfaces.
6990
6991 2011-08-02 Yannick Moy <moy@adacore.com>
6992
6993 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6994 statements hidden in SPARK if preceded by the HIDE directive
6995 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6996 exception handlers as hidden in SPARK if preceded by the HIDE directive
6997 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6998 if starting with the HIDE directive
6999 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7000 starting with the HIDE directive; mark the declarations in a private
7001 part as hidden in SPARK if the private part starts with the HIDE
7002 directive
7003 * restrict.adb, restrict.ads
7004 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7005 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7006 argument node belongs to a part which is hidden in SPARK
7007 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7008 parts in SPARK; protect the possibly costly call to
7009 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7010 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7011 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7012 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7013 Tok_SPARK_Hide.
7014 (Scan): recognize special comment starting with '#' and followed by
7015 SPARK keyword "hide" as a HIDE directive.
7016
7017 2011-08-02 Yannick Moy <moy@adacore.com>
7018
7019 * types.ads, erroutc.ads: Minor reformatting.
7020
7021 2011-08-02 Vincent Celier <celier@adacore.com>
7022
7023 * link.c: Add response file support for cross platforms.
7024
7025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7026
7027 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7028 in an association, set parent field of copy before partial analysis.
7029 * sem_res.adb (Resolve_Slice): create reference to itype only when
7030 expansion is enabled.
7031
7032 2011-08-02 Yannick Moy <moy@adacore.com>
7033
7034 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7035 for new flag denoting which subprogram bodies are in ALFA
7036 * restrict.adb, sem_ch7.adb: Update comment
7037 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7038 sem_ch9.adb, sem_res.adb: Add calls to
7039 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7040 * sem_ch6.adb (Analyze_Function_Return): add calls to
7041 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7042 middle of the body, and extended return.
7043 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7044 False when missing return.
7045 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7046 to True for subprograms whose spec is in ALFA. Remove later on the flag
7047 on the entity used for a subprogram body when there exists a separate
7048 declaration.
7049 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7050 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7051 False, otherwise do nothing.
7052
7053 2011-08-02 Robert Dewar <dewar@adacore.com>
7054
7055 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7056
7057 2011-08-02 Yannick Moy <moy@adacore.com>
7058
7059 * sem_ch4.ads: minor formatting.
7060
7061 2011-08-02 Yannick Moy <moy@adacore.com>
7062
7063 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7064 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7065 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7066 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7067 opt.ads: cleanup of SPARK mode
7068
7069 2011-08-02 Yannick Moy <moy@adacore.com>
7070
7071 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7072 types.
7073 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7074 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7075 * sem_ch3.adb
7076 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7077 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7078 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7079 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7080 types.
7081 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7082 non-static range.
7083 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7084 functions whose return type is not in ALFA.
7085 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7086 specifications.
7087 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7088 parameter's type is not in ALFA.
7089 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7090 types are in ALFA.
7091
7092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7093
7094 * sem_ch6 (Analyze_Expression_Function): treat the function as
7095 Inline_Always, and introduce a subprogram declaration for it when it is
7096 not a completion.
7097 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7098 expression functions, so that the back-end can determine whether they
7099 can in fact be inlined.
7100 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7101 a function body comes from an expression function.
7102
7103 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7104
7105 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7106 null exclusions to test Can_Never_Be_Null on the anonymous access types
7107 of the formals rather than testing the formals themselves. Exclude this
7108 check in cases where the Old_Formal is marked as a controlling formal,
7109 to avoid issuing spurious errors for bodies completing dispatching
7110 operations (due to the flag not getting set on controlling access
7111 formals in body specs).
7112 (Find_Corresponding_Spec): When checking full and subtype conformance of
7113 subprogram bodies in instances, pass Designated and E in that order, for
7114 consistency with the expected order of the formals (New_Id followed by
7115 Old_Id).
7116
7117 2011-08-02 Robert Dewar <dewar@adacore.com>
7118
7119 * sem_ch8.adb: Minor reformatting.
7120
7121 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7122
7123 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7124 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7125 primitive operations of class-wide actuals.
7126
7127 2011-08-02 Javier Miranda <miranda@adacore.com>
7128
7129 * exp_atag.ads, exp_atag.adb
7130 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7131 since its value is implicitly passed in argument Typ.
7132 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7133 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7134 Build_Common_Dispatching_Select_Statements.
7135
7136 2011-08-02 Robert Dewar <dewar@adacore.com>
7137
7138 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7139 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7140 Minor reformatting.
7141
7142 2011-08-02 Robert Dewar <dewar@adacore.com>
7143
7144 * sem_res.adb: Minor reformatting.
7145 * sem_prag.adb: Minor reformatting.
7146
7147 2011-08-02 Javier Miranda <miranda@adacore.com>
7148
7149 * exp_atag.adb, exp_atags.ads
7150 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7151 by the tagged type Entity. Required to use this routine in the VM
7152 targets since we do not have available the Tag entity in the VM
7153 platforms.
7154 * exp_ch6.adb
7155 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7156 Ada.Tags has not been previously loaded.
7157 * exp_ch7.adb
7158 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7159 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7160 * sem_aux.adb
7161 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7162 view of enclosing scopes. Required to handle enclosing scopes that
7163 are synchronized types whose full view is a task type.
7164 * exp_disp.adb
7165 (Build_VM_TSDs): Minor code improvement to avoid generating and
7166 analyzing lists with empty nodes.
7167 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7168 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7169 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7170 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7171 (Make_Select_Specific_Data_Table): Add support for VM targets.
7172 (Make_VM_TSD): Generate code to initialize the SSD structure of
7173 the TSD.
7174
7175 2011-08-02 Yannick Moy <moy@adacore.com>
7176
7177 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7178 cross-references section in ALI.
7179 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7180 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7181 Sub).
7182 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7183 subprogram or package entity of a node
7184 (Is_Local_Reference_Type): new function returns True for references
7185 selected in local cross-references.
7186 (Lt): function extracted from Lt in Output_References
7187 (Write_Entity_Name): function extracted from Output_References
7188 (Generate_Definition): generate reference with type 'D' for definition
7189 of objects (object declaration and parameter specification), with
7190 appropriate locations and units, for use in local cross-references.
7191 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7192 references of type 'I' for initialization in object definition.
7193 (Output_References): move part of function Lt and procedure
7194 Write_Entity_Name outside of the body. Ignore references of types 'D'
7195 and 'I' introduced for local cross-references.
7196 (Output_Local_References): new procedure to output the local
7197 cross-references sections.
7198 (Lref_Entity_Status): new array defining whether an entity is a local
7199 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7200 with 'I' type when initialization expression is present.
7201 * get_scos.adb, get_scos.ads: Correct comments and typos
7202
7203 2011-08-02 Javier Miranda <miranda@adacore.com>
7204
7205 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7206 the JVM target.
7207 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7208 the JVM target.
7209 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7210 TSD support.
7211
7212 2011-08-02 Vincent Celier <celier@adacore.com>
7213
7214 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7215 (No_Space_Img): New function
7216 (Find_Excluded_Sources): When reading from a file, record the file name
7217 and the line number for each excluded source.
7218 (Mark_Excluded_Sources): When reporting an error, if the excluded
7219 sources were read from a file, include file name and line number in
7220 the error message.
7221
7222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7223
7224 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7225
7226 2011-08-02 Robert Dewar <dewar@adacore.com>
7227
7228 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7229
7230 2011-08-02 Javier Miranda <miranda@adacore.com>
7231
7232 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7233 generation of TSDs to the DOTNET compiler.
7234 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7235 generation of TSDs to the DOTNET compiler.
7236
7237 2011-08-02 Javier Miranda <miranda@adacore.com>
7238
7239 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7240 record of all the tagged types declared inside library level package
7241 declarations, library level package bodies or library level subprograms.
7242 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7243 associated with a given tagged type.
7244 (Build_VM_TSDs): New subprogram.
7245 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7246 compilation units that are subprograms.
7247 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7248 compilation units that are package bodies.
7249 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7250 units that are a package declaration or a package instantiation.
7251 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7252 reorganization to improve the error generated by the frontend when the
7253 function Ada.Tags.Secondary_Tag is not available.
7254 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7255 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7256
7257 2011-08-02 Javier Miranda <miranda@adacore.com>
7258
7259 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7260
7261 2011-08-02 Robert Dewar <dewar@adacore.com>
7262
7263 * s-imenne.ads: Minor reformatting.
7264
7265 2011-08-02 Robert Dewar <dewar@adacore.com>
7266
7267 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7268 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7269 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7270
7271 2011-08-02 Robert Dewar <dewar@adacore.com>
7272
7273 * einfo.ads (Materialize_Entity): Document this is only for renamings
7274 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7275 required debug information in the case where we transform the object
7276 declaration into a renaming declaration.
7277 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7278 object
7279 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7280 Materialize_Entity.
7281
7282 2011-08-02 Robert Dewar <dewar@adacore.com>
7283
7284 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7285 Suppress_Init_Procs.
7286 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7287 Suppress_Initialization/Initialization_Suppressed.
7288 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7289 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7290 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7291 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7292
7293 2011-08-02 Robert Dewar <dewar@adacore.com>
7294
7295 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7296 Minor reformatting.
7297
7298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7299
7300 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7301 only have inheritable classwide pre/postconditions.
7302
7303 2011-08-02 Javier Miranda <miranda@adacore.com>
7304
7305 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7306 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7307 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7308 checks if the external tag of a type is the same as the external tag
7309 of some other declaration.
7310
7311 2011-08-02 Thomas Quinot <quinot@adacore.com>
7312
7313 * s-taskin.ads: Minor reformatting.
7314
7315 2011-08-02 Emmanuel Briot <briot@adacore.com>
7316
7317 * g-comlin.adb (Display_Help): swap the order in which it prints the
7318 short help and the general usage.
7319
7320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7321
7322 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7323 the aspect declarations and attach them to the generic copy for
7324 subsequent analysis.
7325 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7326 declarations of the generic tree to the new subprogram declarations.
7327 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7328 conditions that apply to a subprogram instance.
7329
7330 2011-08-02 Robert Dewar <dewar@adacore.com>
7331
7332 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7333
7334 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7335
7336 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7337 private type with a tagged full view is not derived in the immediate
7338 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7339
7340 2011-08-02 Robert Dewar <dewar@adacore.com>
7341
7342 * exp_ch4.adb: Minor reformatting.
7343
7344 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7345
7346 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7347 Ada2012 iterator, the loop will be rewritten during expansion into a
7348 while loop with a cursor and an element declaration. Do not analyze the
7349 body in this case, because if the container is for indefinite types the
7350 actual subtype of the elements will only be determined when the cursor
7351 declaration is analyzed.
7352
7353 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7354
7355 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7356 size/alignment related attributes in CodePeer_Mode.
7357
7358 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7359
7360 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7361 Prepend_Element, since this can result in the operation getting the
7362 wrong slot in the full type's dispatch table if the full type has
7363 inherited operations. The incomplete type's operation will get added
7364 to the proper position in the full type's primitives
7365 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7366 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7367 dispatching operations, since there are cases where nonprimitive
7368 subprograms can get added to the list of incomplete dependents (such
7369 as subprograms in nested packages).
7370 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7371 private part when determining whether to add a primitive with a
7372 parameter of a tagged incomplete type to the Private_Dependents list.
7373 Such primitives can also occur in the visible part, and should not have
7374 been excluded from being private dependents.
7375 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7376 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7377 list of a Taft-amendment incomplete type is a primitive before issuing
7378 an error that the full type must appear in the same unit. There are
7379 cases where nonprimitives can be in the list (such as subprograms in
7380 nested packages).
7381 * sem_disp.adb (Derives_From): Use correct condition for checking that
7382 a formal's type is derived from the type of the corresponding formal in
7383 the parent subprogram (the condition was completely wrong). Add
7384 checking that was missing for controlling result types being derived
7385 from the result type of the parent operation.
7386
7387 2011-08-02 Yannick Moy <moy@adacore.com>
7388
7389 * errout.adb (First_Node): minor renaming
7390 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7391 first node.
7392
7393 2011-08-02 Yannick Moy <moy@adacore.com>
7394
7395 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7396 before accessing operands.
7397 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7398 decide whether an initialization expression respects SPARK rules, as
7399 the plain node is the expanded one. This allows for more valid warnings
7400 to be issued.
7401 * gnat_rm.texi: Minor update.
7402
7403 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7404
7405 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7406 previous change.
7407
7408 2011-08-02 Robert Dewar <dewar@adacore.com>
7409
7410 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7411
7412 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7413
7414 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7415 loop statements and the element renaming declaration with a block when
7416 the element type is controlled.
7417
7418 2011-08-02 Yannick Moy <moy@adacore.com>
7419
7420 * sinfo.ads: Minor formatting.
7421
7422 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7423
7424 * sem_aggr.adb (Add_Association): if the association has a box and no
7425 expression, use the Sloc of the aggregate itself for the new
7426 association.
7427 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7428 the Original_Node.
7429
7430 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7431
7432 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7433 When a container is provided via a function call, generate a renaming
7434 of the function result. This avoids the creation of a transient scope
7435 and the premature finalization of the container.
7436 * exp_ch7.adb (Is_Container_Cursor): Removed.
7437 (Wrap_Transient_Declaration): Remove the supression of the finalization
7438 of the list controller when the declaration denotes a container cursor,
7439 it is not needed.
7440
7441 2011-08-02 Yannick Moy <moy@adacore.com>
7442
7443 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7444 node is from source, instead of the original node being from source.
7445 * sem_aggr.adb
7446 (Resolve_Array_Aggregate): refine the check for a static expression, to
7447 recognize also static ranges
7448 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7449 Array_Type_Declaration): postpone the test for the type being a subtype
7450 mark after the type has been resolved, so that component-selection and
7451 expanded-name are discriminated.
7452 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7453 to distinguish the case of an iteration scheme, so that an error is
7454 issed on a non-static range in SPARK except in an iteration scheme.
7455 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7456 In_Iter_Schm = True.
7457 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7458 user-defined operators so that they are allowed in renaming
7459 * sem_ch8.adb
7460 (Find_Selected_Component): refine the check for prefixing of operators
7461 so that they are allowed in renaming. Move the checks for restrictions
7462 on selector name after analysis discriminated between
7463 component-selection and expanded-name.
7464 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7465 concatenation argument of string type if it is static.
7466 * sem_util.adb, sem_util.ads
7467 (Check_Later_Vs_Basic_Declarations): add a new function
7468 Is_Later_Declarative_Item to decice which declarations are allowed as
7469 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7470 mode, add that renamings are considered as later items.
7471 (Enclosing_Package): new function to return the enclosing package
7472 (Enter_Name): correct the rule for homonyms in SPARK
7473 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7474 from source (result of expansion) to avoid issuing wrong warnings.
7475
7476 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7477
7478 * errout.adb: On anything but an expression First_Node returns its
7479 argument.
7480
7481 2011-08-02 Pascal Obry <obry@adacore.com>
7482
7483 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7484
7485 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7486
7487 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7488 Set the associated loop as the related expression of internally
7489 generated cursors.
7490 * exp_ch7.adb (Is_Container_Cursor): New routine.
7491 (Wrap_Transient_Declaration): Supress the finalization of the list
7492 controller when the declaration denotes a container cursor.
7493
7494 2011-08-02 Yannick Moy <moy@adacore.com>
7495
7496 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7497 command line now.
7498 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7499 expression is a simple expression. This check cannot be performed in
7500 the semantics, so just drop it.
7501 (P_Index_Or_Discriminant_Constraint): move check that the index or
7502 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7503 semantics. Other cases were previously checked in the semantics.
7504 * par-ch4.adb (P_Name): move checks that a selector name is not
7505 character literal or an operator symbol to Find_Selected_Component in
7506 the semantics
7507 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7508 declarations are not placed after later declarations in a separate
7509 procedure in Sem_Util (possibly not the best choice?), to be used both
7510 during parsing, for Ada 83 mode, and during semantic analysis, for
7511 SPARK mode.
7512 * par-endh.adb (Check_End): move check that end label is not missing
7513 to Process_End_Label in the semantics
7514 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7515 the special case for SPARK restriction
7516 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7517 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7518 parameter Force to issue the error message even on internal node (used
7519 for generated end label). Call Check_Restriction to check when an error
7520 must be issued. In SPARK mode, issue an error message even if the
7521 restriction is not set.
7522 (Check_Restriction): new procedure with an additional out parameter to
7523 inform the caller that a message has been issued
7524 * sem_aggr.adb: Minor modification of message
7525 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7526 instead of issuing an error message directly
7527 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7528 declarations are not placed after later declarations, by calling
7529 Check_Later_Vs_Basic_Declarations
7530 (Analyze_Subtype_Declaration): move here the check that an index or
7531 discriminant constraint must be a subtype mark. Change the check that
7532 a subtype of String must start at one so that it works on subtype marks.
7533 * sem_ch4.adb (Analyze_Call): move here the check that a named
7534 association cannot follow a positional one in a call
7535 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7536 instead of issuing an error message directly
7537 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7538 selector name is not a character literal or an operator symbol. Move
7539 here the check that the prefix of an expanded name cannot be a
7540 subprogram or a loop statement.
7541 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7542 procedure called from parsing and semantics to check that basic
7543 declarations are not placed after later declarations
7544 (Process_End_Label): move here the check that end label is not missing
7545
7546 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7547
7548 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7549 representation clause in codepeer mode, since it confuses CodePeer and
7550 does not bring useful info.
7551
7552 2011-08-02 Ed Falis <falis@adacore.com>
7553
7554 * init.c: initialize fp hw on MILS.
7555
7556 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7557
7558 * errout.adb (First_Node): for bodies, return the node itself (small
7559 optimization). For other nodes, do not check source_unit if the node
7560 comes from Standard.
7561
7562 2011-08-02 Robert Dewar <dewar@adacore.com>
7563
7564 * exp_ch3.adb: Minor comment additions.
7565 * sem_ch13.adb: Minor reformatting.
7566
7567 2011-08-02 Pascal Obry <obry@adacore.com>
7568
7569 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7570
7571 2011-08-02 Robert Dewar <dewar@adacore.com>
7572
7573 * sem_attr.adb: Minor reformatting.
7574
7575 2011-08-02 Robert Dewar <dewar@adacore.com>
7576
7577 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7578 (Has_Default_Component_Value): Removed
7579 * einfo.ads Comment updates
7580 (Has_Default_Aspect): Replaces Has_Default_Value
7581 (Has_Default_Component_Value): Removed
7582 * exp_ch13.adb
7583 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7584 * exp_ch3.adb
7585 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7586 (Get_Simple_Init_Val): Handle Default_Value aspect
7587 (Needs_Simple_Initialization): Handle Default_Value aspect
7588 * exp_ch3.ads: Needs_Simple_Initialization
7589 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7590 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7591 * sem_ch13.adb
7592 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7593 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7594 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7595
7596 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7597
7598 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7599 package containing iteration primitives.
7600 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7601
7602 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7603
7604 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7605 "of", pre-analyze expression in case it is a function call with
7606 finalization actions that must be placed ahead of the loop.
7607 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7608 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7609
7610 2011-08-02 Geert Bosch <bosch@adacore.com>
7611
7612 * cstand.adb (Create_Float_Types): Only consider C's long double for
7613 Long_Long_Float, in addition to double.
7614
7615 2011-08-02 Robert Dewar <dewar@adacore.com>
7616
7617 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7618 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7619 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7620 Minor reformatting.
7621
7622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7623
7624 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7625 indexed component.
7626
7627 2011-08-02 Javier Miranda <miranda@adacore.com>
7628
7629 * einfo.ads, einfo.adb
7630 (Original_Access_Type): Move this attribute to Node26 since there was
7631 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7632 which causes conflicts and breaks the generation of the .NET compiler.
7633 (Interface_Name): Add missing documentation on JGNAT only uses of
7634 this attribute.
7635
7636 2011-08-02 Geert Bosch <bosch@adacore.com>
7637
7638 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7639 (Find_Back_End_Float_Type): Likewise
7640 (Create_Back_End_Float_Types): Likewise
7641 (Create_Float_Types): Likewise
7642 (Register_Float_Type): Likewise
7643 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7644 Nlist and split out type selection in new local Find_Base_Type function.
7645 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7646 Nlist
7647 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7648
7649 2011-08-02 Robert Dewar <dewar@adacore.com>
7650
7651 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7652 alpha order).
7653 * opt.ads: Minor comment change.
7654 * sem_ch12.adb: Minor code reorganization.
7655
7656 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7657
7658 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7659 subtype's list of rep items to the list on the full subtype in the case
7660 where the lists are the same.
7661
7662 2011-08-02 Geert Bosch <bosch@adacore.com>
7663
7664 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7665 using the one from System.Strings, which also deallocates all strings.
7666
7667 2011-08-02 Geert Bosch <bosch@adacore.com>
7668
7669 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7670 function.
7671 * gcc-interface/Make-lang.in: Update dependencies.
7672
7673 2011-08-02 Olivier Hainque <hainque@adacore.com>
7674
7675 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7676 end_locus.
7677
7678 2011-08-02 Javier Miranda <miranda@adacore.com>
7679
7680 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7681 associated with anonymous access to subprograms.
7682
7683 2011-08-02 Geert Bosch <bosch@adacore.com>
7684
7685 * opt.ads
7686 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7687 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7688 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7689 (Add_Symbol_Definition): Move to switch-c.adb
7690 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7691 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7692 (Add_Symbol_Definition): Move to switch-c.adb.
7693 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7694 * sem_warn.adb
7695 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7696 Move to warnsw.adb.
7697 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7698 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7699 Move to warnsw.adb.
7700 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7701 (Add_Symbol_Definition): Moved from Prepcomp.
7702 * switch-c.ads: Update copyright notice. Use String_List instead of
7703 Argument_List, removing dependency on System.OS_Lib.
7704
7705 2011-08-02 Yannick Moy <moy@adacore.com>
7706
7707 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7708 mode on initialization expression which does not respect SPARK
7709 restrictions.
7710 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7711 if the tree referenced by its argument represents an initialization
7712 expression in SPARK, suitable for initializing an object in an object
7713 declaration.
7714
7715 2011-08-02 Javier Miranda <miranda@adacore.com>
7716
7717 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7718 internally generated access to subprogram with its associated protected
7719 subprogram type.
7720 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7721
7722 2011-08-02 Geert Bosch <bosch@adacore.com>
7723
7724 * cstand.adb (Register_Float_Type): Print information about type to
7725 register, if the Debug_Flag_Dot_B is set.
7726 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7727 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7728 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7729 with a requested precision of more than Max_Digits digits and no more
7730 than Max_Base_Digits digits, if a range specification is present and the
7731 Predefined_Float_Types list has a suitable type to derive from.
7732 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7733 case of type completion with pragma Import
7734 * sem_prag.adb
7735 (Process_Import_Predefined_Type): Processing to complete a type
7736 with pragma Import. Currently supports floating point types only.
7737 (Set_Convention_From_Pragma): Do nothing without underlying type.
7738 (Process_Convention): Guard against absence of underlying type,
7739 which may happen when importing incomplete types.
7740 (Process_Import_Or_Interface): Handle case of importing predefined
7741 types. Tweak error message.
7742
7743 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7744
7745 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7746 functions to previous change. Reorganize code slightly.
7747
7748 2011-08-02 Geert Bosch <bosch@adacore.com>
7749
7750 * back_end.ads (Register_Type_Proc): New call back procedure type for
7751 allowing the back end to provide information about available types.
7752 (Register_Back_End_Types): New procedure to register back end types.
7753 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7754 available types.
7755 * cstand.adb (Back_End_Float_Types): New list for floating point types
7756 supported by the back end.
7757 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7758 (Copy_Float_Type): New procedure to make new copies of predefined types.
7759 (Register_Float_Type): New call back procedure to populate the BEFT list
7760 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7761 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7762 (Create_Float_Types): New procedure to create entities for floating
7763 point types predefined in Standard, and put these and any remaining
7764 BEFTs on the Predefined_Float_Types list.
7765 * stand.ads (Predefined_Float_Types): New list for predefined floating
7766 point types that do not have declarations in package Standard.
7767
7768 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7769
7770 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7771 entity node for the unit containing the parameter.
7772 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7773 (Add_Inlined_Subprogram): Likewise.
7774 * gcc-interface/Make-lang.in: Update dependencies.
7775
7776 2011-08-02 Thomas Quinot <quinot@adacore.com>
7777
7778 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7779 suitable value.
7780
7781 2011-08-02 Geert Bosch <bosch@adacore.com>
7782
7783 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7784
7785 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7786
7787 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7788 computed value of Base_Type.
7789
7790 2011-08-02 Yannick Moy <moy@adacore.com>
7791
7792 * restrict.adb (Check_Restriction): issue an error for any use of
7793 class-wide, even if the No_Dispatch restriction is not set.
7794 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7795 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7796 when completing a private extension, the type named in the private part
7797 is not the same as that named in the visible part.
7798 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7799 of an inherited primitive operations of a tagged type or type extension
7800 that returns the tagged type.
7801 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7802 function which returns True for an implicit operation inherited by the
7803 derived type declaration for the argument type.
7804 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7805 order.
7806
7807 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7808
7809 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7810 Process_Bounds, to perform analysis with expansion of a range or an
7811 expression that is the iteration scheme for a loop.
7812 (Analyze_Iterator_Specification): If domain of iteration is given by a
7813 function call with a controlled result, as is the case if call returns
7814 a predefined container, ensure that finalization actions are properly
7815 generated.
7816 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7817
7818 2011-08-02 Javier Miranda <miranda@adacore.com>
7819
7820 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7821 * gcc-interface/Make-lang.in: Update dependencies.
7822
7823 2011-08-02 Javier Miranda <miranda@adacore.com>
7824
7825 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7826 determine if the analysis is performed using N or Original_Node (N).
7827 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7828 functionality of routine Is_Variable avoids code duplication.
7829 * checks.adb (Determine_Range): Handle temporaries generated by
7830 Remove_Side_Effects.
7831
7832 2011-08-02 Javier Miranda <miranda@adacore.com>
7833
7834 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7835 expansion of the condition. Required since the previous analysis was
7836 done with expansion disabled (see Resolve_Quantified_Expression) and
7837 hence checks were not inserted and record comparisons have not been
7838 expanded.
7839
7840 2011-08-02 Ed Falis <falis@adacore.com>
7841
7842 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7843 Update header.
7844
7845 2011-08-02 Bob Duff <duff@adacore.com>
7846
7847 * opt.ads: Minor comment fix.
7848
7849 2011-08-02 Bob Duff <duff@adacore.com>
7850
7851 * sem_ch12.adb (Analyze_Package_Instantiation,
7852 Analyze_Subprogram_Instantiation): Turn off style checking while
7853 analyzing an instance. Whatever style checks that apply to the generic
7854 unit should apply, so it makes no sense to apply them in an instance.
7855 This was causing trouble when compiling an instance of a runtime
7856 unit that violates the -gnatyO switch.
7857 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7858 one of the two case statements, causing spurious errors.
7859
7860 2011-08-02 Robert Dewar <dewar@adacore.com>
7861
7862 * uname.adb: Minor reformatting.
7863 * gnatcmd.adb: Minor reformatting.
7864 * exp_attr.adb: Minor reformatting.
7865
7866 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7867
7868 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7869 No_Dispatching_Calls, do not look for the Assign primitive, because
7870 predefined primitives are not created in this case.
7871
7872 2011-08-02 Bob Duff <duff@adacore.com>
7873
7874 * stylesw.ads: Minor comment fixes.
7875
7876 2011-08-02 Robert Dewar <dewar@adacore.com>
7877
7878 * freeze.adb (Add_To_Result): New procedure.
7879
7880 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7881
7882 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7883 time, if the specific run-time routines for handling streams of strings
7884 are not available, use the default mechanism.
7885
7886 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7887
7888 * s-regpat.ads: Fix typo.
7889
7890 2011-08-02 Vincent Celier <celier@adacore.com>
7891
7892 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7893 not null, call it to create the in memory config project file without
7894 parsing an existing default config project file.
7895
7896 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7897
7898 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7899
7900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7901
7902 * sem_elim.adb: an abstract subprogram does not need an eliminate
7903 pragma for its descendant to be eliminable.
7904
7905 2011-08-02 Ed Falis <falis@adacore.com>
7906
7907 * init.c: revert to handling before previous checkin for VxWorks
7908 * s-intman-vxworks.adb: delete unnecessary declarations related to
7909 using Ada interrupt facilities for handling signals.
7910 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7911 * s-intman-vxworks.ads: Import __gnat_install_handler as
7912 Initialize_Interrupts.
7913 * s-taprop-vxworks.adb: Delete Signal_Mask.
7914 (Abort_Handler): change construction of mask to unblock exception
7915 signals.
7916
7917 2011-08-02 Jerome Guitton <guitton@adacore.com>
7918
7919 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7920 Debug_Raise_Exception before propagation starts.
7921
7922 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7923
7924 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7925 to Restriction_Check_Required.
7926 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7927 * sem_res.adb (Resolve_Call): Likewise.
7928 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7929
7930 2011-08-02 Bob Duff <duff@adacore.com>
7931
7932 * stylesw.ads: Update comment.
7933 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7934 * errout.ads: Remove obsolete comment.
7935
7936 2011-08-02 Javier Miranda <miranda@adacore.com>
7937
7938 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7939 (Set_Is_Safe_To_Reevaluate): new procedure.
7940 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7941 assignment is allowed on safe-to-reevaluate variables.
7942 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7943 temporary created to remove side effects in expressions that use
7944 the secondary stack as safe-to-reevaluate.
7945 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7946 variables that are not true constants.
7947
7948 2011-08-02 Robert Dewar <dewar@adacore.com>
7949
7950 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7951 sem_res.adb, sem_ch6.adb: Minor reformatting.
7952
7953 2011-08-02 Jerome Guitton <guitton@adacore.com>
7954
7955 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7956
7957 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7958
7959 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7960 not set Overridden_Operation if subprogram is an initialization
7961 procedure.
7962
7963 2011-08-02 Yannick Moy <moy@adacore.com>
7964
7965 * par-ch6.adb: Correct obsolete name in comments
7966 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7967 which takes two message arguments (existing function takes one), with
7968 second message used for continuation.
7969 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7970 block statements that originate from a source block statement, not
7971 generated block statements
7972 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7973 symmetry with procedure case
7974 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7975 function to issue an error in formal mode if a package specification
7976 contains more than one tagged type or type extension.
7977 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7978 parameters matching formals of tagged types are objects (or ancestor
7979 type conversions of objects), not general expressions. Issue an error
7980 on view conversions that are not involving ancestor conversion of an
7981 extended type.
7982 (Resolve_Type_Conversion): in formal mode, issue an error on the
7983 operand of an ancestor type conversion which is not an object
7984 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7985 procedure so that it works also for actuals of function calls
7986 (Is_Actual_Tagged_Parameter): new function which determines if its
7987 argument is an actual parameter of a formal of tagged type in a
7988 subprogram call
7989 (Is_SPARK_Object_Reference): new function which determines if the tree
7990 referenced by its argument represents an object in SPARK
7991
7992 2011-08-02 Robert Dewar <dewar@adacore.com>
7993
7994 * sem_ch3.adb: Minor reformatting
7995 Minor comment addition
7996 Minor error msg text change
7997
7998 2011-08-02 Javier Miranda <miranda@adacore.com>
7999
8000 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8001 function. Used to be more precise when we generate a variable plus one
8002 assignment to remove side effects in the evaluation of the Bound
8003 expressions.
8004 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8005 of the bound expression to force its re-analysis and thus expand the
8006 associated transient scope (if required). Code cleanup replacing the
8007 previous code that declared the constant entity by an invocation to
8008 routine Force_Evaluation which centralizes this work in the frontend.
8009
8010 2011-08-02 Robert Dewar <dewar@adacore.com>
8011
8012 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8013 (Base_Type): Now uses improved Is_Base_Type function
8014 * einfo.ads (Base_Type): Inline this function
8015
8016 2011-08-02 Robert Dewar <dewar@adacore.com>
8017
8018 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8019 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8020
8021 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8022
8023 * gcc-interface/Make-lang.in: Update dependencies.
8024 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8025 targets.
8026
8027 2011-08-02 Yannick Moy <moy@adacore.com>
8028
8029 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8030 non-simple expression used in delta constraint
8031 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8032 index constraint which is not a subtype mark
8033 * par.adb: With and use Restrict
8034 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8035 mode on component type which is not a subtype mark and default
8036 expression on component
8037 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8038 of string which does not have a lower index bound equal to 1
8039 (Array_Type_Declaration): issue an error in formal mode on index or
8040 component type which is not a subtype mark, and on aliased keyword on
8041 component
8042 (Derived_Type_Declaration): issue an error in formal mode on interface,
8043 limited or abstract type
8044 (Record_Type_Declaration): issue an error in formal mode on interface
8045 (Record_Type_Definition): issue an error in formal mode on tagged types
8046 and type extensions not declared in the specification of a library unit
8047 package; on null non-tagged record; on variant part
8048
8049 2011-08-02 Vincent Celier <celier@adacore.com>
8050
8051 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8052 not declared for qualified library project when Library_Name is not
8053 declared, but Library_Dir is.
8054
8055 2011-08-02 Robert Dewar <dewar@adacore.com>
8056
8057 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8058 pragmas (affects aspects [Component_]Default_Value
8059 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8060 component type for the resolution
8061
8062 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8063
8064 * einfo.adb (Base_Type): Tune implementation for speed.
8065
8066 2011-08-02 Robert Dewar <dewar@adacore.com>
8067
8068 * freeze.adb: Minor reformatting.
8069
8070 2011-08-02 Thomas Quinot <quinot@adacore.com>
8071
8072 * scos.ads: Update comments.
8073
8074 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8075
8076 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8077 base type, because the parent may be a subtype of a private type whose
8078 convention is established in a private part.
8079
8080 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8081
8082 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8083 statement in a block when the expansion of the return expression has
8084 created a finalization chain.
8085 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8086 with the parent node.
8087 Add N_Extended_Return_Statement to handle the case where a transient
8088 object declaration appears in the Return_Object_Declarations list of
8089 an extended return statement.
8090
8091 2011-08-02 Matthew Gingell <gingell@adacore.com>
8092
8093 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8094 unused parameter 'name'.
8095
8096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8097
8098 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8099 inherited operation, check whether its alias, which is the source
8100 operastion that it renames, has been marked eliminated.
8101
8102 2011-08-02 Javier Miranda <miranda@adacore.com>
8103
8104 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8105 in-mode parameter whose type is an access type since it can be used to
8106 modify its designated object. Enforce code that handles as safe an
8107 access type that is not access-to-constant but it is the result of a
8108 previous removal of side-effects.
8109 (Remove_Side_Effects): Minor code reorganization of cases which require
8110 no action. Done to incorporate documentation on new cases uncovered
8111 working in this ticket: no action needed if this routine was invoked
8112 too early and the nodes are not yet decorated.
8113 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8114 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8115 were issued with actuals that are implicitly provided by
8116 Force_Evaluation.
8117
8118 2011-08-02 Robert Dewar <dewar@adacore.com>
8119
8120 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8121
8122 2011-08-02 Yannick Moy <moy@adacore.com>
8123
8124 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8125 to issue an error in formal mode on attribute not supported in this mode
8126 (Analyze_Attribute): issue errors on standard attributes not supported
8127 in formal mode.
8128 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8129 comment, and issue error in formal mode on modulus which is not a power
8130 of 2.
8131 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8132 range.
8133 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8134 subtype mark.
8135 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8136 operator on modular type (except 'not').
8137
8138 2011-08-02 Robert Dewar <dewar@adacore.com>
8139
8140 * gnat_rm.texi: Minor reformatting.
8141
8142 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8143
8144 * s-osinte-linux.ads: Minor comment update and reformatting.
8145 * i-cexten.ads: Make this unit pure, as for its parent.
8146 Will allow its usage in more contexts if needed.
8147
8148 2011-08-02 Robert Dewar <dewar@adacore.com>
8149
8150 * s-utf_32.ads: Minor comment fix.
8151
8152 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8153
8154 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8155 operation of a tagged synchronized type, handle the case where the
8156 controlling argument is overloaded.
8157
8158 2011-08-02 Yannick Moy <moy@adacore.com>
8159
8160 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8161 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8162 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8163 SPARK mode and formal verification mode on processing SPARK restriction
8164 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8165 requiring consistency checking.
8166
8167 2011-08-02 Robert Dewar <dewar@adacore.com>
8168
8169 * sem_res.adb: Minor reformatting.
8170
8171 2011-08-02 Robert Dewar <dewar@adacore.com>
8172
8173 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8174 a-cforse.ads: Remove unneeded with of Ada.Containers
8175 Remove commented out pragma Inline's
8176 Move specifications of new subprograms to the actual specs
8177
8178 2011-08-02 Yannick Moy <moy@adacore.com>
8179
8180 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8181 a-cforse.ads: Update comments.
8182
8183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8184
8185 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8186
8187 2011-08-02 Robert Dewar <dewar@adacore.com>
8188
8189 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8190 a-cforse.ads, a-cofove.ads: Minor reformatting.
8191
8192 2011-08-02 Claire Dross <dross@adacore.com>
8193
8194 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8195 a-cofove.ads: Add comments.
8196
8197 2011-08-02 Yannick Moy <moy@adacore.com>
8198
8199 * gnat_rm.texi: Document formal containers.
8200
8201 2011-08-02 Emmanuel Briot <briot@adacore.com>
8202
8203 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8204 are empty sections.
8205
8206 2011-08-02 Robert Dewar <dewar@adacore.com>
8207
8208 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8209 reformatting.
8210
8211 2011-08-02 Robert Dewar <dewar@adacore.com>
8212
8213 * aspects.adb: New aspects Default_Value and Default_Component_Value
8214 New format of Aspect_Names table checks for omitted entries
8215 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8216 handling of boolean aspects for derived types.
8217 New aspects Default_Value and Default_Component_Value
8218 New format of Aspect_Names table checks for omitted entries
8219 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8220 (Has_Default_Value): New flag
8221 (Has_Default_Component_Value): New flag
8222 (Has_Default_Value): New flag
8223 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8224 table.
8225 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8226 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8227 Default_Value and Default_Component_Value
8228 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8229 New aspects Default_Value and Default_Component_Value
8230 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8231 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8232
8233 2011-08-02 Vincent Celier <celier@adacore.com>
8234
8235 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8236 inherit library kind.
8237
8238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8239
8240 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8241 Minor reformatting.
8242
8243 2011-08-02 Robert Dewar <dewar@adacore.com>
8244
8245 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8246
8247 2011-08-02 Yannick Moy <moy@adacore.com>
8248
8249 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8250
8251 2011-08-02 Robert Dewar <dewar@adacore.com>
8252
8253 * impunit.adb: Add comment.
8254
8255 2011-08-02 Yannick Moy <moy@adacore.com>
8256
8257 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8258 qualification of aggregates in formal mode
8259 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8260 another aggregate
8261 (Resolve_Aggregate): complete the test that an aggregate is adequately
8262 qualified in formal mode
8263
8264 2011-08-02 Pascal Obry <obry@adacore.com>
8265
8266 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8267 * mlib-prj.adb: Supress warning when compiling binder generated file.
8268 (Build_Library): Supress all warnings when compiling the binder
8269 generated file.
8270
8271 2011-08-02 Yannick Moy <moy@adacore.com>
8272
8273 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8274 from here...
8275 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8276 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8277 Add with/use clauses to make Check_Formal_Restriction visible
8278
8279 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8280
8281 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8282 in-parameters when type of the generic formal is private in the generic
8283 spec and non-private in the body.
8284
8285 2011-08-02 Claire Dross <dross@adacore.com>
8286
8287 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8288 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8289 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8290 * impunit.adb, Makefile.rtl: Take new files into account.
8291
8292 2011-08-02 Robert Dewar <dewar@adacore.com>
8293
8294 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8295 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8296
8297 2011-08-02 Yannick Moy <moy@adacore.com>
8298
8299 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8300 formal mode
8301 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8302 matching static array bounds, taking into account the special case of
8303 string literals
8304 * sem_ch3.adb: Typo in comment.
8305
8306 2011-08-02 Yannick Moy <moy@adacore.com>
8307
8308 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8309 which issues an error in formal mode if its argument node is originally
8310 from source
8311 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8312 has a discriminant specification so that it does not include the case
8313 of derived types
8314 (Derived_Type_Declaration): move here the test that a derived type has a
8315 discriminant specification
8316 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8317 first element of a component association before accessing its choices
8318 (presence of component association is not enough)
8319 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8320 declaration is a library item before accessing the next element in a
8321 list, as library items are not member of lists
8322 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8323 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8324 Check_Formal_Restriction whenever possible.
8325
8326 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8327
8328 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8329 reference when needed.
8330
8331 2011-08-02 Bob Duff <duff@adacore.com>
8332
8333 * gnat_ugn.texi: Fix typo.
8334
8335 2011-08-02 Vincent Celier <celier@adacore.com>
8336
8337 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8338 archive file name. Do not use the full path name of archives for Open
8339 VMS.
8340
8341 2011-08-02 Robert Dewar <dewar@adacore.com>
8342
8343 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8344 Analyze_Aspect_Specifications
8345 * sem_ch13.adb
8346 (Analyze_Aspect_Specifications): New handling for boolean aspects
8347 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8348 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8349 sequence for Analyze_Aspect_Specifications
8350 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8351 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8352
8353 2011-08-02 Robert Dewar <dewar@adacore.com>
8354
8355 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8356 aspects, since these no longer exist.
8357
8358 2011-08-02 Robert Dewar <dewar@adacore.com>
8359
8360 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8361 semicolon, do not try to see if there are aspects following it.
8362 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8363 aspect spec.
8364
8365 2011-08-02 Robert Dewar <dewar@adacore.com>
8366
8367 * sem_ch8.adb, aspects.ads: Minor reformatting.
8368
8369 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8370
8371 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8372 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8373 extracted from...
8374 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8375
8376 2011-08-02 Yannick Moy <moy@adacore.com>
8377
8378 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8379 mode on subprogram declaration outside of package specification, unless
8380 it is followed by a pragma Import
8381 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8382 Access_Type_Declaration): issue error in formal mode on access type
8383 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8384 incomplete type
8385 (Analyze_Object_Declaration): issue error in formal mode on object
8386 declaration which does not respect SPARK restrictions
8387 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8388 declaration which does not respect SPARK restrictions
8389 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8390 error in formal mode on digits or delta constraint
8391 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8392 decimal fixed point type
8393 (Derived_Type_Declaration): issue error in formal mode on derived type
8394 other than type extensions of tagged record types
8395 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8396 with check on access definition
8397 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8398 mode on protected definition.
8399 (Analyze_Task_Definition): issue error in formal mode on task definition
8400
8401 2011-08-02 Robert Dewar <dewar@adacore.com>
8402
8403 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8404
8405 2011-08-02 Javier Miranda <miranda@adacore.com>
8406
8407 * sem_ch6.adb (Can_Override_Operator): New function.
8408 (Verify_Overriding_Indicator): Add missing code to check overriding
8409 indicator in operators. Fixes regression.
8410 (Check_Overriding_Indicator): Minor reformating after replacing the
8411 code that evaluates if the subprogram can override an operator by
8412 invocations to the above new function.
8413 * einfo.adb
8414 (Write_Field26_Name): Add missing code to ensure that, following
8415 the documentation in einfo.ads, this field is not shown as attribute
8416 "Static_Initialization" on non-dispatching functions.
8417
8418 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8419
8420 * sem_res.adb (Resolve_Call): A call to
8421 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8422 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8423 i.e., when the second parameter is of type Time_Span.
8424
8425 2011-08-02 Vincent Celier <celier@adacore.com>
8426
8427 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8428 with an archive instead of -L<library dir> -l<library name>.
8429
8430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8431
8432 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8433 mark the base types In_Use in addition to making the operations
8434 use_visible.
8435
8436 2011-08-02 Ed Falis <falis@adacore.com>
8437
8438 * init.c: add and setup __gnat_signal_mask for the exception signals
8439 * s-inmaop-vxworks.adb: new file.
8440 * s-intman-vxworks.adb: remove unnecessary initializations and
8441 simplify remaining
8442 * s-intman-vxworks.ads: remove unnecessary variable
8443 * s-taprop-vxworks.adb: simplify signal initialization
8444
8445 2011-08-02 Robert Dewar <dewar@adacore.com>
8446
8447 * sem_ch8.adb: Minor code reorganization, comment updates.
8448
8449 2011-08-02 Robert Dewar <dewar@adacore.com>
8450
8451 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8452 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8453 here from Sem_Res.
8454 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8455 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8456
8457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8458
8459 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8460 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8461 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8462 use_type_clauses, to handle more efficiently use_type and use_all_type
8463 constructs.
8464 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8465 Ada2012 Use_All_Type clause.
8466 (Use_Class_Wide_Operations): new procedure.
8467
8468 2011-08-02 Robert Dewar <dewar@adacore.com>
8469
8470 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8471 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8472 expression to expression function.
8473
8474 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8475
8476 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8477 if types are compatible.
8478
8479 2011-08-02 Yannick Moy <moy@adacore.com>
8480
8481 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8482 returns True if its argument array types have same dimension and same
8483 static bounds at each index.
8484 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8485 OUT or IN OUT paramaters which are not view conversions in SPARK.
8486 (Resolve_Arithmetic_Op): issue an error in formal mode on
8487 multiplication or division with operands of fixed point types which are
8488 not qualified or explicitly converted.
8489 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8490 Boolean or array type (except String) operands.
8491 (Resolve_Equality_Op): issue an error in formal mode on equality
8492 operators for array types other than String with non-matching static
8493 bounds.
8494 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8495 for array types with non-matching static bounds. Factorize the code in
8496 Matching_Static_Array_Bounds.
8497 (Resolve_Qualified_Expression): issue an error in formal mode on
8498 qualified expressions for array types with non-matching static bounds.
8499 (Resolve_Type_Conversion): issue an error in formal mode on type
8500 conversion for array types with non-matching static bounds
8501
8502 2011-08-02 Robert Dewar <dewar@adacore.com>
8503
8504 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8505
8506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8507
8508 * par-ch9.adb: save location of entry for proper error message.
8509
8510 2011-08-02 Javier Miranda <miranda@adacore.com>
8511
8512 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8513 (Use_Full_View) which permits this routine to climb through the
8514 ancestors using the full-view of private parents.
8515 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8516 Use_Full_View to true in calls to Is_Ancestor.
8517 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8518 true in call to Is_Ancestor.
8519 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8520 Use_Full_View to true in call to Is_Ancestor.
8521 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8522 call to Is_Ancestor.
8523 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8524 Use_Full_View to true in calls to Is_Ancestor.
8525 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8526 Make_Select_Specific_Data_Table, Register_Primitive,
8527 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8528 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8529 to true in call to Is_Ancestor.
8530 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8531 Use_Full_View to true in calls to Is_Ancestor.
8532 * exp_cg.adb
8533 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8534 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8535
8536 2011-08-02 Robert Dewar <dewar@adacore.com>
8537
8538 * gnat_rm.texi: Minor reformatting.
8539 * sem_prag.adb: Minor reformatting.
8540
8541 2011-08-02 Tristan Gingold <gingold@adacore.com>
8542
8543 * vms_data.ads: Add VMS qualifier for -gnateP.
8544
8545 2011-08-02 Robert Dewar <dewar@adacore.com>
8546
8547 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8548 * par-ch7.adb (P_Package): Proper placement of aspects for package
8549 decl/instantiation.
8550 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8551 (End_Statements): Add Is_Sloc parameterr
8552 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8553 (Check_End): Ad Is_Sloc parameter
8554 (End_Statements): Add Is_Sloc parameterr
8555
8556 2011-08-02 Vincent Celier <celier@adacore.com>
8557
8558 * ug_words: Add VMS qualifier equivalent to -gnateP:
8559 /SYMBOL_PREPROCESSING.
8560
8561 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8562
8563 * gnat-style.texi: For hexadecimal numeric literals the typical
8564 grouping of digits is 4 to represent 2 bytes.
8565 A procedure spec which is split into several lines is indented two
8566 characters.
8567
8568 2011-08-02 Yannick Moy <moy@adacore.com>
8569
8570 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8571 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8572 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8573 properly qualified
8574 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8575 choice in array aggregate
8576 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8577 mark as ancestor
8578 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8579 positional and named aggregate for record, or others in record
8580 aggregate, or multiple choice in record aggregate
8581 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8582 array operands to logical operations AND, OR and XOR do not have the
8583 same static lower and higher bounds
8584 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8585
8586 2011-08-01 Robert Dewar <dewar@adacore.com>
8587
8588 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8589 Replaces Last_Source_Node_In_Sequence.
8590 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8591 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8592 parens and blank in string (this was inconsistently implemented).
8593 * errout.ads
8594 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8595 blank in string (this was inconsistently implemented).
8596 * gnat1drv.adb
8597 (Set_Global_Switches): Set formal mode switches appropriately
8598 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8599 * par-prag.adb
8600 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8601 call Set_Error_Msg_Lang to set "spark" as language name.
8602 * par.adb: Remove unnecessary call to set formal language for errout
8603 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8604 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8605 name.
8606 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8607 calls to it, moved after resolution so that types are known
8608 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8609 result of concatenation is not of type String
8610 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8611 concatenation is not properly restricted
8612 * gnat_rm.texi: Add doc on pragma Spark_95.
8613 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8614 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8615 * gcc-interface/Make-lang.in: Update dependencies.
8616
8617 2011-08-01 Javier Miranda <miranda@adacore.com>
8618
8619 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8620 condition that detects if the overridden operation must replace an
8621 existing entity.
8622
8623 2011-08-01 Javier Miranda <miranda@adacore.com>
8624
8625 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8626 code declarations inserted by Insert_Actions in each alternative of the
8627 N_Case_Expression node.
8628
8629 2011-08-01 Robert Dewar <dewar@adacore.com>
8630
8631 * sem_ch6.adb: Minor code reorganization.
8632 * sem_util.adb: Minor reformatting.
8633
8634 2011-08-01 Pascal Obry <obry@adacore.com>
8635
8636 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8637 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8638
8639 2011-08-01 Yannick Moy <moy@adacore.com>
8640
8641 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8642 literal or operator symbol which is prefixed
8643 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8644 mode on access attributes.
8645 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8646 that concatenation operands are properly restricted in formal mode
8647 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8648 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8649 result of the concatenation has a type different from String.
8650 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8651 Analyze_Quantified_Expression, Analyze_Slice,
8652 Analyze_Null): issue an error in formal mode on unsupported constructs
8653 * sem_ch5.adb
8654 (Analyze_Block_Statement): only issue error on source block statement
8655 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8656 function which returns the last node in a list of nodes for which
8657 Comes_From_Source returns True, if any
8658 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8659 Last_Source_Node_In_Sequence
8660 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8661 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8662 mode on unsupported constructs
8663 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8664 rest of the actions may be needed later on since the error is marked as
8665 not serious.
8666 * sinfo.ads: Typos in comments.
8667
8668 2011-08-01 Pascal Obry <obry@adacore.com>
8669
8670 * projects.texi: Minor editing.
8671
8672 2011-08-01 Yannick Moy <moy@adacore.com>
8673
8674 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8675 insertion character ~~
8676 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8677 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8678 with insertion character ~~
8679 (Set_Msg_Text): treat insertion character ~~
8680 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8681 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8682 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8683 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8684 errors related to the formal language restriction not serious
8685 (insertion character |).
8686 * par.adb (Par): set formal language for error messages if needed
8687 * sem_ch6.adb (Check_Missing_Return): take into account possible
8688 generated statements at the end of the function
8689 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8690 enumeration value to define a new pragma SPARK_95
8691 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8692 SPARK_Version): new type and variables to store the SPARK version
8693 (none by default).
8694 (SPARK_Mode): return True when SPARK_Version is set
8695 * par-prag.adb: Correct indentation
8696 (Prag): take Pragma_SPARK_95 into account
8697 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8698 into account.
8699
8700 2011-08-01 Robert Dewar <dewar@adacore.com>
8701
8702 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8703 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8704 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8705
8706 2011-08-01 Pascal Obry <obry@adacore.com>
8707
8708 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8709 Target_Name to Get_Path call.
8710 (Parse_Single_Project): Likewise.
8711 (Post_Parse_Context_Clause): Likewise.
8712 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8713 Call Initialise_Project_Path with the proper Target_Name.
8714 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8715 search path.
8716 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8717 with the proper Target_Name.
8718 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8719 Part.Parse routine.
8720 (Parse_Project_And_Apply_Config): Likewise.
8721 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8722 This is fine as this part of the code is supporting only native
8723 compilation.
8724 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8725 is fine as this part of the code is supporting only native compilation.
8726
8727 2011-08-01 Yannick Moy <moy@adacore.com>
8728
8729 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8730 of homonym, unless the homonym is one of the cases allowed in SPARK
8731 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8732 package declaration occurring after a body.
8733
8734 2011-08-01 Robert Dewar <dewar@adacore.com>
8735
8736 * checks.adb, exp_ch4.adb: Minor reformatting.
8737
8738 2011-08-01 Javier Miranda <miranda@adacore.com>
8739
8740 * einfo.ads (Access_Disp_Table): Fix documentation.
8741 (Dispatch_Table_Wrappers): Fix documentation.
8742
8743 2011-08-01 Pascal Obry <obry@adacore.com>
8744
8745 * prj-env.adb, prj-env.ads: Minor reformatting.
8746
8747 2011-08-01 Yannick Moy <moy@adacore.com>
8748
8749 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8750 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8751 procedures out of these packages.
8752 * errout.ads, errout.adb
8753 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8754 procedures in of this package
8755 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8756 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8757 on misplaced later vs initial declarations, like in Ada 83
8758 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8759 formal mode on attribute of private type whose full type declaration
8760 is not visible
8761 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8762 package declaration inside a package specification
8763 (Analyze_Full_Type_Declaration): issue error in formal mode on
8764 controlled type or discriminant type
8765 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8766 user-defined operator means that it should come from the source
8767 (New_Overloaded_Entity): issue error in formal mode on overloaded
8768 entity.
8769 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8770
8771 2011-08-01 Thomas Quinot <quinot@adacore.com>
8772
8773 * atree.adb: Minor reformatting.
8774 * checks.adb: Minor reformatting.
8775
8776 2011-08-01 Vincent Celier <celier@adacore.com>
8777
8778 * s-parame-vms-ia64.ads: Fix typo in comment
8779 Minor reformatting
8780 * s-parame-vms-restrict.ads: Removed, unused.
8781
8782 2011-08-01 Javier Miranda <miranda@adacore.com>
8783
8784 * exp_ch3.adb
8785 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8786 * sem_ch3.adb
8787 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8788 * sem_ch3.ads, sem_ch3.adb
8789 (Is_Constant_Bound): New extended version of the subprogram that was
8790 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8791 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8792 * sem_aux.ads (Constant_Value): Fix typo in comment.
8793 * checks.adb (Generate_Index_Checks): New implementation which, for
8794 array objects with constant bounds, generates the runtime check
8795 referencing the bounds of the array type. For other cases this routine
8796 provides its previous behavior obtaining such values from the array
8797 object.
8798 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8799 parent type.
8800 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8801 we cannot have semantic interpretations of the new node.
8802
8803 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8804
8805 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8806 expressions.
8807
8808 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8809
8810 * sem_ch8.adb: Minor code editing.
8811 * s-vxwext.adb: Remove trailing space.
8812 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8813 consistency with other files.
8814
8815 2011-08-01 Thomas Quinot <quinot@adacore.com>
8816
8817 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8818
8819 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8820
8821 * par-ch10.adb: reject parameterized expressions as compilation unit.
8822 * sem_ch4.adb: handle properly conditional expression with overloaded
8823 then_clause and no else_clause.
8824
8825 2011-08-01 Tristan Gingold <gingold@adacore.com>
8826
8827 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8828 like done by System.Aux_DEC.
8829 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8830
8831 2011-08-01 Yannick Moy <moy@adacore.com>
8832
8833 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8834 missing label at end of declaration (subprogram or package)
8835 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8836 of positional and named parameter association
8837 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8838 Error_Msg_SP which adds a prefix to the error message giving the name
8839 of the formal language analyzed
8840 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8841 access result type in subprogram, unconstrained array as result type,.
8842 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8843 procedure
8844 * sem_ch8.adb: Code clean up.
8845
8846 2011-08-01 Javier Miranda <miranda@adacore.com>
8847
8848 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8849 * einfo.ads (Access_Disp_Table): Fix documentation.
8850 (Dispatch_Table_Wrappers): Fix documentation.
8851 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8852 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8853 to enforce the documentation of this attribute.
8854 (Set_Is_Interface): Cleanup the assertion.
8855 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8856 the Underlying_Type entity before reading attribute Access_Disp_Table.
8857 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8858 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8859 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8860 the Underlying_Type entity before reading attribute Access_Disp_Table.
8861 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8862 Locate the Underlying_Type entity before reading attribute
8863 Access_Disp_Table.
8864
8865 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8866
8867 * s-poosiz.ads: Additional overriding indicators.
8868
8869 2011-08-01 Yannick Moy <moy@adacore.com>
8870
8871 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8872 formal mode.
8873 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8874 parameter specification does not include a subtype mark.
8875 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8876 formal mode on abstract subprogram.
8877 (Analyze_Subprogram_Specification): issue error in formal mode on
8878 user-defined operator.
8879 (Process_Formals): issue error in formal mode on access parameter and
8880 default expression.
8881 * sem_ch9.adb (Analyze_Abort_Statement,
8882 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8883 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8884 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8885 Analyze_Requeue, Analyze_Selective_Accept,
8886 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8887 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8888 issue error in formal mode on user-defined raise statement.
8889
8890 2011-08-01 Thomas Quinot <quinot@adacore.com>
8891
8892 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8893 declaration being hidden when overriding an implicit inherited
8894 subprogram.
8895 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8896 (-gnats), do not complain about a source file that contains only a
8897 pragma No_Body.
8898
8899 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8900
8901 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8902 variable if already set.
8903
8904 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8905
8906 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8907 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8908 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8909 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8910 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8911 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8912 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8913 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8914 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8915 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8916 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8917 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8918 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8919 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8920 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8921 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8922 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8923 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8924 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8925 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8926 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8927 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8928 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8929 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8930 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8931 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8932 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8933 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8934 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8935 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8936 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8937 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8938 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8939 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8940 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8941 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8942 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8943 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8944 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8945 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8946 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8947 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8948 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8949 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8950 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8951 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8952 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8953 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8954 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8955 Use GNAT instead of GNARL.
8956
8957 2011-08-01 Bob Duff <duff@adacore.com>
8958
8959 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8960 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8961 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8962 reformatting.
8963
8964 2011-08-01 Yannick Moy <moy@adacore.com>
8965
8966 * debug.adb (d.D) reverve flag for the SPARK mode
8967 (d.E) reverve flag for SPARK generation mode
8968 (d.F) reverve flag for Why generation mode
8969 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8970 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8971 functions which return True when the corresponding modes are set
8972 (Formal_Language): return "spark" or "alfa" when in formal verification
8973 mode.
8974 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8975 Error_Msg to prefix the error message with a tag giving the formal
8976 language
8977 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8978 message with a tag giving the formal language
8979 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8980 block statement
8981 (Analyze_Case_Statement): issue error in formal mode on case statement
8982 with a single "others" case alternative
8983 (Analyze_Exit_Statement): issue errors in formal mode on exit
8984 statements which do not respect SPARK restrictions
8985 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8986 (Check_Unreachable_Code): always issue an error (not a warning) in
8987 formal mode on unreachable code (concerns both code after an infinite
8988 loop and after an unconditional jump, both not allowed in SPARK)
8989 * sem_ch6.adb (Analyze_Return_Statement): add call to
8990 Set_Return_Present for a procedure containing a return statement
8991 (already done for functions in Analyze_Function_Return)
8992 (Analyze_Function_Return): issue error in formal mode on extended
8993 return or if return is not last statement in function
8994 (Check_Missing_Return): issue error in formal mode if function does
8995 not end with return or if procedure contains a return
8996 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8997 function to detect if there is an inner scope of its parameter S which
8998 is a loop.
8999
9000 2011-08-01 Thomas Quinot <quinot@adacore.com>
9001
9002 * sem_ch6.ads: Minor reformatting.
9003
9004 2011-08-01 Javier Miranda <miranda@adacore.com>
9005
9006 * sem_util.adb (Abstract_Interface_List): Complete condition when
9007 processing private type declarations to avoid reading unavailable
9008 attribute.
9009 (Is_Synchronized_Tagged_Type): Complete condition when processing
9010 private extension declaration nodes to avoid reading unavailable
9011 attribute.
9012
9013 2011-08-01 Thomas Quinot <quinot@adacore.com>
9014
9015 * sem_ch3.adb: Minor reformatting.
9016
9017 2011-08-01 Thomas Quinot <quinot@adacore.com>
9018
9019 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9020 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9021 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9022 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9023 for VMS, instead parametrize the common implementation with
9024 System.Parameters declarations.
9025
9026 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9027
9028 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9029
9030 2011-08-01 Tristan Gingold <gingold@adacore.com>
9031
9032 * seh_init.c: Fix SEH handler installation on win64.
9033
9034 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9035
9036 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9037 double analysis of an anonymous access to subprogram, because it can
9038 lead to improper sharing of profiles and a back-end crash.
9039
9040 2011-08-01 Robert Dewar <dewar@adacore.com>
9041
9042 * make.adb, sem_ch4.adb: Minor reformatting.
9043 * gcc-interface/Make-lang.in: Update dependencies.
9044 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9045
9046 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9047
9048 * gnat_rm.texi: Fix definition of Long_Integer.
9049
9050 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9051
9052 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9053 to prevent storage exhaustion.
9054 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9055 finalized is a function body, insert the cleanup code before the final
9056 return statement, to prevent spurious warnings.
9057 * s-pooglo.ads: add overriding indicator.
9058
9059 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9060
9061 * sem_ch4.adb (Operator_Check): improve error message when both a
9062 with_clause and a use_clause are needed to make operator usage legal.
9063 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9064 determine whether a compilation unit is visible within an other,
9065 either through a with_clause in the current unit, or a with_clause in
9066 its library unit or one one of its parents.
9067
9068 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9069
9070 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9071 over an arbitrary expression of an array or container type.
9072 * lib-xref.adb: clarify comment.
9073
9074 2011-08-01 Bob Duff <duff@adacore.com>
9075
9076 * einfo.ads: Minor reformatting.
9077 * debug.adb: Minor comment improvement.
9078
9079 2011-08-01 Javier Miranda <miranda@adacore.com>
9080
9081 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9082 consider hidden subprograms as valid candidates.
9083
9084 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9085
9086 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9087
9088 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9089
9090 * gnat_ugn.texi: Fix typo.
9091
9092 2011-08-01 Robert Dewar <dewar@adacore.com>
9093
9094 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9095 lib-xref.adb: Minor reformatting
9096
9097 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9098
9099 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9100 when to generate a call to Move_Final_List.
9101 (Has_Controlled_Parts): Remove this function.
9102
9103 2011-08-01 Geert Bosch <bosch@adacore.com>
9104
9105 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9106 "," in choice list.
9107
9108 2011-08-01 Thomas Quinot <quinot@adacore.com>
9109
9110 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9111 explicit raise of a predefined exception as Comes_From_Source if the
9112 original N_Raise_Statement comes from source.
9113
9114 2011-08-01 Robert Dewar <dewar@adacore.com>
9115
9116 * sinfo.ads: Add comment.
9117 * sem_ch6.adb: Minor reformatting.
9118
9119 2011-08-01 Robert Dewar <dewar@adacore.com>
9120
9121 * freeze.adb (Freeze_Entity): Refine check for bad component size
9122 clause to avoid rejecting confirming clause when atomic/aliased present.
9123
9124 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9125
9126 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9127 better determine whether an entity reference is a write.
9128 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9129 subcomponent.
9130 * lib-xref.adb (Output_References): Do no suppress a read reference at
9131 the same location as an immediately preceeding modify-reference, to
9132 handle properly in-out actuals.
9133
9134 2011-08-01 Tristan Gingold <gingold@adacore.com>
9135
9136 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9137
9138 2011-08-01 Quentin Ochem <ochem@adacore.com>
9139
9140 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9141 heap to compute the result.
9142
9143 2011-08-01 Robert Dewar <dewar@adacore.com>
9144
9145 * atree.ads: Minor reformatting.
9146
9147 2011-08-01 Emmanuel Briot <briot@adacore.com>
9148
9149 * g-expect.adb (Get_Command_Output): Fix memory leak.
9150
9151 2011-08-01 Geert Bosch <bosch@adacore.com>
9152
9153 * cstand.adb (P_Float_Type): New procedure to print the definition of
9154 predefined fpt types.
9155 (P_Mixed_Name): New procedure to print a name using mixed case
9156 (Print_Standard): Use P_Float_Type for printing floating point types
9157 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9158 precision IEEE float.
9159
9160 2011-08-01 Thomas Quinot <quinot@adacore.com>
9161
9162 * sem_ch3.adb: Minor reformatting.
9163
9164 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9165
9166 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9167 the completion of a generic function, insert the new body rather than
9168 rewriting the original.
9169
9170 2011-08-01 Yannick Moy <moy@adacore.com>
9171
9172 * sinfo.ads, errout.ads: Typos in comments.
9173
9174 2011-08-01 Robert Dewar <dewar@adacore.com>
9175
9176 * par-endh.adb: Minor reformatting.
9177
9178 2011-08-01 Robert Dewar <dewar@adacore.com>
9179
9180 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9181 (Pre_Post_Aspects): New subtype.
9182 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9183 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9184 * par-ch7.adb (P_Package): Remove Decl parameter
9185 (P_Package): Handle new syntax for aspects (before IS)
9186 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9187 new aspect syntax
9188 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9189 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9190 (P_Package): Remove Decl parameter
9191 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9192 aspects
9193 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9194 specs
9195 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9196 * sinfo.ads: Document new syntax for aspects in packages etc.
9197 * sprint.adb: Handle new syntax of aspects before IS in package
9198
9199 2011-08-01 Thomas Quinot <quinot@adacore.com>
9200
9201 * atree.ads: Minor reformatting.
9202 * sem_prag.adb: Minor reformatting.
9203
9204 2011-08-01 Robert Dewar <dewar@adacore.com>
9205
9206 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9207 case expr alternative.
9208
9209 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9210
9211 * sem_ch12.adb: Fix typo.
9212
9213 2011-08-01 Geert Bosch <bosch@adacore.com>
9214
9215 * sem_prag.adb (Check_No_Link_Name): New procedure.
9216 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9217 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9218 instead of Standard_Long_Long_Float_Size global. Preparation for
9219 eventual removal of per type constants.
9220 * exp_util.ads (Get_Stream_Size): New function returning the stream
9221 size value of subtype E.
9222 * exp_util.adb (Get_Stream_Size): Implement new function.
9223 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9224 function.
9225 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9226 * einfo.adb:
9227 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9228
9229 2011-08-01 Geert Bosch <bosch@adacore.com>
9230
9231 * cstand.adb: Fix comments.
9232 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9233 count of arguments.
9234
9235 2011-08-01 Robert Dewar <dewar@adacore.com>
9236
9237 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9238
9239 2011-08-01 Geert Bosch <bosch@adacore.com>
9240
9241 * atree.ads: Fix comment.
9242
9243 2011-08-01 Robert Dewar <dewar@adacore.com>
9244
9245 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9246 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9247 * par.adb: Add with for Namet.Sp.
9248 * par-tchk.adb: Minor reformatting.
9249
9250 2011-08-01 Vincent Celier <celier@adacore.com>
9251
9252 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9253 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9254 of the init procedure of a SAL.
9255 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9256 New procedure.
9257
9258 2011-08-01 Thomas Quinot <quinot@adacore.com>
9259
9260 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9261 reformatting.
9262
9263 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9264
9265 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9266
9267 2011-08-01 Thomas Quinot <quinot@adacore.com>
9268
9269 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9270 conformant with its spec (return True only for types that have
9271 an overriding Initialize primitive operation that prevents them from
9272 having preelaborable initialization).
9273 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9274 initialization for controlled types in Ada 2005 or later mode.
9275
9276 2011-08-01 Robert Dewar <dewar@adacore.com>
9277
9278 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9279 Postcondition.
9280 (Same_Aspect): New function.
9281 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9282 Type_Invariant, Precondition, Postcondition.
9283 * snames.ads-tmpl: Add Name_Type_Invariant.
9284
9285 2011-08-01 Robert Dewar <dewar@adacore.com>
9286
9287 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9288 here.
9289 (Freeze_All_Ent): Fix error in handling inherited aspects.
9290 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9291 already analyzed, but don't skip entire processing of a declaration,
9292 that's wrong in some cases of declarations being rewritten.
9293 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9294 Don't delay for integer, string literals
9295 Treat predicates in usual manner for delay, remove special case code,
9296 not needed.
9297 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9298 (Build_Predicate_Function): Update saved expression in aspect
9299 (Build_Invariant_Procedure): Update saved expression in aspect
9300 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9301 of replacement of discriminant references if the reference is simple.
9302
9303 2011-08-01 Robert Dewar <dewar@adacore.com>
9304
9305 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9306 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9307 Static_Predicate and Dynamic_Predicate.
9308 (Build_Predicate_Function): Add processing for Static_Predicate
9309 and Dynamic_Predicate.
9310 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9311 (From_Static_Predicate): New flag
9312 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9313
9314 2011-08-01 Robert Dewar <dewar@adacore.com>
9315
9316 * usage.adb: Documentation cleanup for Ada version modes in usage.
9317 * expander.adb: Minor reformatting.
9318
9319 2011-08-01 Robert Dewar <dewar@adacore.com>
9320
9321 * atree.ads: Minor comment fix.
9322 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9323 a-witeio.ads, sem_prag.adb: Minor reformatting.
9324
9325 2011-08-01 Doug Rupp <rupp@adacore.com>
9326
9327 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9328 pointers. Use descrip.h header file for convenience. Add some
9329 comments.
9330
9331 2011-08-01 Robert Dewar <dewar@adacore.com>
9332
9333 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9334 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9335 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9336 New procedure.
9337 (Check_Aspect_At_End_Of_Declarations): New procedure
9338 (Analye_Aspect_Specification): Minor changes for above procedures
9339 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9340 specification node as well.
9341
9342 2011-08-01 Pascal Obry <obry@adacore.com>
9343
9344 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9345 Windows files. Use GetFilesAttributes() in this case to check for file
9346 existence instead of returning with an error code.
9347
9348 2011-08-01 Vincent Celier <celier@adacore.com>
9349
9350 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9351 High is above Source length.
9352
9353 2011-08-01 Robert Dewar <dewar@adacore.com>
9354
9355 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9356
9357 2011-08-01 Robert Dewar <dewar@adacore.com>
9358
9359 * aspects.ads (Boolean_Aspects): New subtype.
9360 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9361 for derived types in cases where the parent type and derived type have
9362 aspects.
9363 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9364 with aspects when parent type also has aspects.
9365 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9366 boolean expression at this point).
9367 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9368 accordance with final decision on the Ada 2012 feature.
9369 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9370
9371 2011-08-01 Matthew Heaney <heaney@adacore.com>
9372
9373 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9374
9375 2011-08-01 Pascal Obry <obry@adacore.com>
9376
9377 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9378 Fix Replace_Slice when High is above current string size.
9379 (Replace_Slice): Fix DL computation when High is above current
9380 string length.
9381
9382 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9383
9384 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9385
9386 2011-08-01 Matthew Heaney <heaney@adacore.com>
9387
9388 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9389 of node.
9390
9391 2011-08-01 Pascal Obry <obry@adacore.com>
9392
9393 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9394 reformatting.
9395
9396 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9397
9398 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9399 access to protected subprograms in generic bodies.
9400 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9401 protected type, indicate that the convention of the subprogram is
9402 Convention_Protected, because it may be used in subsequent declarations
9403 within the protected declaration.
9404
9405 2011-08-01 Vincent Celier <celier@adacore.com>
9406
9407 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9408 and "final" procedures when the name of the library is "ada", to avoid
9409 duplicate symbols "adainit" and "adafinal" in executables.
9410
9411 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9412
9413 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9414 quantified expression that appears within a postcondition and uses the
9415 Ada2012 'Result attribute.
9416
9417 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9418
9419 * init.c (__gnat_error_handler): Cast reason to int.
9420 (__gnat_install_handler): Explain sa_sigaction use.
9421
9422 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9423
9424 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9425 subprogram has copy-in copy-out parameters, try to promote the mode of
9426 the return type if it is passed in registers.
9427
9428 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9429
9430 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9431 left operand as addressable.
9432
9433 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9434
9435 * gcc-interface/gigi.h (build_function_stub): Remove.
9436 (build_return_expr): Likewise.
9437 (convert_vms_descriptor): Declare.
9438 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9439 (build_function_stub): Move to...
9440 * gcc-interface/utils2.c (build_return_expr): Move to...
9441 * gcc-interface/trans.c (build_function_stub): ...here.
9442 (build_return_expr): ...here.
9443 (Subprogram_Body_to_gnu): Add local variable for language_function.
9444 Disconnect the parameter attributes cache, if any, once done with it.
9445 Call end_subprog_body only after setting the end_locus.
9446 Build the stub associated with the function, if any, at the very end.
9447 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9448 variables and streamline control flow.
9449
9450 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9451
9452 PR ada/49819
9453 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9454 g-trasym-dwarf.adb.
9455
9456 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9457
9458 PR bootstrap/49794
9459 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9460 Assign to act.sa_sigaction.
9461 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9462 current->return_address to char * before arithmetic.
9463
9464 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9465
9466 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9467 Correct argument types.
9468 Extract code from reason.
9469 (__gnat_install_handler): Assign to act.sa_sigaction.
9470
9471 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9472
9473 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9474 (GNAT1_OBJS): ...here.
9475
9476 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9477
9478 PR ada/48711
9479 * g-socthi-mingw.adb (Fill): Fix formatting.
9480
9481 * gcc-interface/gigi.h: Move around comment.
9482
9483 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9484
9485 PR ada/46350
9486 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9487
9488 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9489
9490 PR ada/48711
9491 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9492
9493 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9494
9495 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9496 range comparison if Pmode is SImode.
9497
9498 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9499 Eric Botcazou <ebotcazou@adacore.com>
9500
9501 * adadecode.c: Wrap up in extern "C" block.
9502 * adadecode.h: Likewise.
9503 * adaint.c: Likewise. Remove 'const' keyword.
9504 * adaint.h: Likewise.
9505 * argv.c: Likewise.
9506 * atree.h: Likewise.
9507 * cio.c: Likewise.
9508 * cstreams.c: Likewise.
9509 * env.c: Likewise.
9510 * exit.c: Likewise.
9511 * fe.h: Likewise.
9512 * final.c: Likewise.
9513 * init.c: Likewise.
9514 * initialize.c: Likewise.
9515 * link.c: Likewise.
9516 * namet.h: Likewise.
9517 * nlists.h: Likewise.
9518 * raise.c: Likewise.
9519 * raise.h: Likewise.
9520 * repinfo.h: Likewise.
9521 * seh_init.c: Likewise.
9522 * targext.c: Likewise.
9523 * tracebak.c: Likewise.
9524 * uintp.h: Likewise.
9525 * urealp.h: Likewise.
9526 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9527 * xsinfo.adb: Likewise.
9528 * xsnamest.adb: Likewise.
9529 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9530 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9531 * gcc-interface/misc.c: Likewise.
9532 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9533 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9534 ada/targext.o here...
9535 (GNAT_ADA_OBJS): ...and not here.
9536 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9537 (GNATBIND_OBJS): Reorder.
9538
9539 2011-07-07 Richard Henderson <rth@redhat.com>
9540
9541 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9542 dwarf2out_frame_init.
9543
9544 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9545
9546 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9547
9548 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9549
9550 PR target/39150
9551 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9552
9553 2011-07-06 Richard Guenther <rguenther@suse.de>
9554
9555 * gcc-interface/misc.c (gnat_init): Merge calls to
9556 build_common_tree_nodes and build_common_tree_nodes_2.
9557 Re-initialize boolean_false_node.
9558
9559 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9560 Olivier Hainque <hainque@adacore.com>
9561 Nicolas Setton <setton@adacore.com>
9562
9563 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9564 the type according to the ARTIFICIAL_P parameter.
9565 (create_type_decl): Likewise.
9566 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9567
9568 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9569
9570 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9571 (gnatbind): Likewise.
9572
9573 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9574
9575 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9576
9577 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9578
9579 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9580 local variable throughout. Remove useless call to Base_Type.
9581 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9582 Take it also into account for the volatileness of the field. Set the
9583 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9584
9585 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9586
9587 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9588 on a dereference built for a by-ref object if it has an address clause.
9589
9590 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9591
9592 * einfo.ads (Address_Taken): Document use for the second argument of
9593 Asm_Input and Asm_Output attributes.
9594 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9595 argument is an entity name, then set Address_Taken on it.
9596 <Attribute_Asm_Output>: Likewise.
9597 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9598 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9599 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9600 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9601
9602 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9603
9604 PR middle-end/46500
9605 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9606
9607 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9608
9609 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9610 (ada/utils.o): Update dependencies.
9611 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9612 ../../../libcpp/libcpp.a.
9613 * gcc-interface/utils.c: Include common/common-target.h.
9614 (process_attributes): Use targetm_common.have_named_sections.
9615
9616 2011-06-07 Richard Guenther <rguenther@suse.de>
9617
9618 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9619 set_sizetype.
9620
9621 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9622
9623 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9624 TREE_THIS_NOTRAP flag.
9625
9626 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9627
9628 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9629 Fix thinko.
9630
9631 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9632
9633 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9634 constants whose full view has discriminants specially.
9635
9636 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9637
9638 * gcc-interface/utils.c: Include diagnostic.h.
9639 (gnat_write_global_declarations): Output debug information for all
9640 global type declarations before finalizing the compilation unit.
9641 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9642
9643 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9644
9645 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9646
9647 2011-05-25 Kai Tietz <ktietz@redhat.com>
9648
9649 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9650 initialization instead of const/none-const pointer assignment.
9651
9652 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9653
9654 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9655 $(EXTRA_GNAT1_OBJS).
9656 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9657 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9658 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9659 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9660 libcommon-target.a instead of prefix.o.
9661
9662 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9663
9664 PR ada/49097
9665 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9666
9667 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9668
9669 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9670 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9671 instead of version.o.
9672
9673 2011-05-18 Kai Tietz <ktietz@redhat.com>
9674
9675 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9676 boolean_false_node instead of integer_zero_node.
9677 (convert_with_check): Likewise.
9678 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9679
9680 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9681
9682 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9683 type of the parameter is an unconstrained array, convert the actual to
9684 the type of the formal in the In Out and Out cases as well.
9685
9686 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9687
9688 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9689 call build_function_type_array or build_varargs_function_type_array
9690 instead.
9691 (create_subprog_type): Don't call build_function_type; call
9692 build_function_type_vec instead.
9693
9694 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9695
9696 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9697 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9698 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9699
9700 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9701
9702 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9703
9704 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9705 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9706
9707 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9708
9709 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9710
9711 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9712
9713 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9714 instead of accessing TYPE_ARG_TYPES directly.
9715 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9716
9717 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9718
9719 PR ada/48844
9720 * gcc-interface/gigi.h (get_variant_part): Declare.
9721 * gcc-interface/decl.c (get_variant_part): Make global.
9722 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9723 types have the same constant size, are record types and T1 has a
9724 variant part while T2 doesn't.
9725
9726 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9727
9728 * gcc-interface/utils.c (begin_subprog_body): Do not call
9729 get_pending_sizes.
9730 (end_subprog_body): Likewise.
9731
9732 2011-05-04 Richard Guenther <rguenther@suse.de>
9733
9734 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9735 int_const_binop.
9736 (pos_to_constructor): Likewise.
9737
9738 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9739 Eric Botcazou <ebotcazou@adacore.com>
9740
9741 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9742 of build_function_type. Adjust calls to...
9743 (build_raise_check): ...this. Do not take a void_tree parameter.
9744 Call build_function_type_list instead of build_function_type.
9745 Fix head comment and swap couple of conditional blocks.
9746
9747 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9748
9749 * gnatvsn.ads (Library_Version): Bump to 4.7.
9750 (Current_Year): Bump to 2011.
9751
9752 2011-04-29 Michael Matz <matz@suse.de>
9753
9754 * gcc-interface/misc.c (gnat_handle_option): Set
9755 warn_maybe_uninitialized.
9756
9757 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9758
9759 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9760 the Watson/McCabe paper.
9761
9762 2011-04-23 Jim Meyering <meyering@redhat.com>
9763
9764 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9765
9766 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9767
9768 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9769 onto the new type.
9770
9771 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9772
9773 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9774 parameter.
9775 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9776 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9777 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9778 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9779 <all>: Do not set flags on the reused DECL node coming from an alias.
9780 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9781 don't need debug info here...
9782 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9783 (gigi): Adjust calls to create_subprog_decl.
9784 (build_raise_check): Likewise.
9785 (establish_gnat_vms_condition_handler): Likewise.
9786 (Compilation_Unit_to_gnu): Likewise.
9787 (gnat_to_gnu): Likewise.
9788
9789 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9790
9791 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9792 (NO_REORDER_ADAFLAGS): New variable.
9793 (EXTRA_GNATTOOLS): Always define.
9794 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9795 Clean up and adjust list of files compiled with special options.
9796 * gcc-interface/Make-lang.in: Likewise.
9797 (ada/decl.o): Cosmetical change.
9798 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9799
9800 2011-04-20 Jim Meyering <meyering@redhat.com>
9801
9802 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9803
9804 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9805
9806 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9807 $(CFLAGS) on the link line.
9808
9809 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9810
9811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9812 padded type built for the return type if it is unconstrained.
9813
9814 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9815
9816 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9817
9818 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9819
9820 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9821 before calling TREE_CHAIN.
9822 * gcc-interface/misc.c (gnat_init_ts): New function.
9823 (LANG_HOOKS_INIT_TS): Define.
9824
9825 2011-04-12 Martin Jambor <mjambor@suse.cz>
9826
9827 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9828 instead of cgraph_node.
9829
9830 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9831
9832 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9833 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9834 mechanism.
9835
9836 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9837
9838 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9839 of aggregate types that contain a placeholder.
9840
9841 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9842
9843 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9844 TYPE_ARG_TYPES.
9845 (handle_type_generic_attribute): Likewise.
9846
9847 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9848
9849 PR ada/47163
9850 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9851
9852 2011-04-04 Kai Tietz <ktietz@redhat.com>
9853
9854 PR ada/47163
9855 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9856 to flag value.
9857
9858 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9859
9860 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9861 type case, do not strip a padding type around the array type.
9862
9863 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9864
9865 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9866 types.
9867
9868 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9869
9870 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9871 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9872 code for -feliminate-unused-debug-types.
9873 (gnat_post_options): Likewise.
9874
9875 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9876
9877 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9878 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9879 distinct copy.
9880
9881 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9882
9883 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9884 DECL_ARTIFICIAL flag on enumeration types.
9885
9886 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9887
9888 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9889 fat pointer types artificial unconditionally.
9890 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9891 isn't artificial.
9892
9893 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9894
9895 * gcc-interface/gigi.h (get_dummy_type): Declare.
9896 (build_dummy_unc_pointer_types): Likewise.
9897 (finish_fat_pointer_type): Likewise.
9898 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9899 fat pointer type has been built, complete it in place.
9900 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9901 and thin pointers. Remove useless variable.
9902 (finish_fat_pointer_type): Make global and move to...
9903 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9904 (get_dummy_type): New function.
9905 (build_dummy_unc_pointer_types): Likewise.
9906 (gnat_pushdecl): Propage the name to the anonymous variants only.
9907 (update_pointer_to): Only adjust the pointer types in the unconstrained
9908 array case.
9909
9910 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9911
9912 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9913 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9914 if this is a Taft amendment type and the full declaration is available.
9915 * gcc-interface/trans.c (process_type): Likewise.
9916 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9917 (process_freeze_entity): Likewise.
9918 * gcc-interface/utils.c (dummy_global): New static variable.
9919 (gnat_write_global_declarations): If there are types declared as used
9920 at the global level, insert them in the global hash table.
9921
9922 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9923
9924 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9925 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9926 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9927 copy.
9928 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9929 flag of the type accordingly.
9930 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9931
9932 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9933
9934 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9935 finalizing types when updating the pointers to the designated type.
9936 <all>: Finalize the deferred types even if we didn't defer processing
9937 of incomplete types in this invocation.
9938
9939 2011-04-01 Olivier Hainque <hainque@adacore.com>
9940 Nicolas Setton <setton@adacore.com>
9941 Eric Botcazou <ebotcazou@adacore.com>
9942
9943 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9944 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9945
9946 2011-03-28 Kai Tietz <ktietz@redhat.com>
9947
9948 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9949 Windows targets.
9950 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9951 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9952
9953 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9954
9955 2011-03-28 Tristan Gingold <gingold@adacore.com>
9956
9957 PR ada/44431
9958 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9959 Use ada output of gnatbind.
9960 (ada/b_gnatb.adb): Ditto.
9961 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9962 (ada.mostlyclean, ada.stage1)
9963 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9964 (ada.stagefeedback): Adjust.
9965 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9966 Use ada output of gnatbind.
9967 (b_gnatm.adb): Ditto.
9968 (b_gnatl.o, b_gnatm.o): New rules.
9969
9970 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9971
9972 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9973 for the padded type built to support a specified size or alignment.
9974
9975 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9976
9977 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9978 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9979 unconditionally to the end of the unit when the designated type is
9980 limited_with'ed.
9981 <all>: Rename local variable. Attempt to un-defer types only and do it
9982 for limited_with'ed types as well.
9983 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9984 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9985 consistently and remove redundant call to finalize_from_with_types.
9986
9987 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9988
9989 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9990 subprograms without a previous spec declared in the same unit.
9991 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9992 subprograms at the end of the unit instead of at the beginning.
9993 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9994 isn't public for the special handling of non-inline functions nested
9995 inside inline external functions.
9996
9997 2011-03-25 Jeff Law <law@redhat.com>
9998
9999 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10000
10001 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10002
10003 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10004 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10005 to compute Set_Size_Depends_On_Discriminant.
10006 (Layout_Type): Call it on array types in back-end layout mode.
10007 * sem_util.adb (Requires_Transient_Scope): Return true for array
10008 types only if the size depends on the value of discriminants.
10009 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10010 type if the RHS is a call to a function that returns an unconstrained
10011 type with default discriminant.
10012
10013 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10014
10015 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10016 non-conversion to the nominal result type at the end.
10017
10018 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10019
10020 * gcc-interface/trans.c (create_temporary): New function taken from...
10021 (create_init_temporary): ...here. Call it.
10022 (call_to_gnu): Create the temporary for the return value early, if any.
10023 Create it for a function with copy-in/copy-out parameters if there is
10024 no target; in other cases of copy-in/copy-out, use another temporary.
10025 Push the new binding level lazily. Add and rename local variables.
10026
10027 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10028
10029 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10030 error message.
10031 (set_rm_size): Likewise.
10032
10033 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10034
10035 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10036 for the padded type built in order to support a specified alignment.
10037 Fix incorrect formatting.
10038
10039 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10040
10041 PR bootstrap/48216
10042 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10043
10044 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10045
10046 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10047 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10048 to the end of the list. Adjust recursive call. Rename local variable.
10049 If REORDER is true, reorder components of the record type.
10050 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10051 components_to_record and adjust the parameter list.
10052
10053 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10054
10055 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10056 disabled, use the variable for bounds of loop iteration scheme.
10057
10058 2011-03-21 Kai Tietz <ktietz@redhat.com>
10059
10060 PR target/12171
10061 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10062
10063 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10064
10065 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10066 out whether the expression is read-only. Short-circuit placeholder
10067 case and rename a couple of local variables.
10068
10069 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10070
10071 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10072 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10073 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10074 (convert): Deal with conversions from a smaller form type specially.
10075
10076 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10077
10078 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10079 its argument, except for the special -I- switch.
10080
10081 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10082
10083 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10084 "Ada Issues".
10085
10086 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10087
10088 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10089
10090 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10091
10092 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10093 GNAT_FORMAL.
10094 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10095 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10096 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10097 Do not generate the check directly, instead instantiate the template
10098 check present in the descriptor.
10099 (make_descriptor_field): Move around.
10100 (build_vms_descriptor32): Build a template check in the POINTER field.
10101 (build_vms_descriptor): Remove useless suffixes.
10102 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10103
10104 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10105
10106 PR bootstrap/47467
10107 * targext.c: Include target files if IN_RTS is defined.
10108
10109 2011-01-26 Richard Guenther <rguenther@suse.de>
10110
10111 PR bootstrap/47467
10112 * targext.c: Include config.h.
10113 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10114 dependency.
10115
10116 2011-01-04 Pascal Obry <obry@adacore.com>
10117 Eric Botcazou <ebotcazou@adacore.com>
10118
10119 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10120
10121 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10122
10123 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10124 end-of-case on the end label and its associated gotos, if any.
10125
10126 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10127
10128 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10129 expressions of the parameter cache within the statement group of
10130 the CICO mechanism.
10131
10132 2011-01-04 Olivier Hainque <hainque@adacore.com>
10133 Eric Botcazou <ebotcazou@adacore.com>
10134
10135 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10136 (set_end_locus_from_node): New function.
10137 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10138 make and the function end_locus.
10139 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10140 for the elaboration subprogram.
10141 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10142 set the end_locus of the expression as well.
10143
10144 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10145
10146 PR ada/47131
10147 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10148 variables that are referenced in exception handlers volatile.
10149
10150
10151 \f
10152 Copyright (C) 2011 Free Software Foundation, Inc.
10153
10154 Copying and distribution of this file, with or without modification,
10155 are permitted in any medium without royalty provided the copyright
10156 notice and this notice are preserved.
10157
10158 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10159 - fix bugs in the description of Source_Trace;
10160 - get rid of UNIT_NAME;
10161
10162 2011-08-02 Javier Miranda <miranda@adacore.com>
10163
10164 * exp_ch9.adb
10165 (Build_Dispatching_Requeue): Adding support for VM targets
10166 since we cannot directly reference the Tag entity.
10167 * exp_sel.adb (Build_K): Adding support for VM targets.
10168 (Build_S_Assignment): Adding support for VM targets.
10169 * exp_disp.adb
10170 (Default_Prim_Op_Position): In VM targets do not restrict availability
10171 of predefined interface primitives to compiling in Ada 2005 mode.
10172 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10173 restricted to compiling in Ada 2005 mode.
10174 (Make_VM_TSD): Generate code that declares and initializes the OSD
10175 record. Needed to support dispatching calls through synchronized
10176 interfaces.
10177 * exp_ch3.adb
10178 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10179 primitives associated with synchronized interfaces.
10180 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10181 primitives associated with synchronized interfaces.
10182
10183 2011-08-02 Yannick Moy <moy@adacore.com>
10184
10185 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10186 statements hidden in SPARK if preceded by the HIDE directive
10187 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10188 exception handlers as hidden in SPARK if preceded by the HIDE directive
10189 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10190 if starting with the HIDE directive
10191 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10192 starting with the HIDE directive; mark the declarations in a private
10193 part as hidden in SPARK if the private part starts with the HIDE
10194 directive
10195 * restrict.adb, restrict.ads
10196 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10197 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10198 argument node belongs to a part which is hidden in SPARK
10199 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10200 parts in SPARK; protect the possibly costly call to
10201 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10202 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10203 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10204 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10205 Tok_SPARK_Hide.
10206 (Scan): recognize special comment starting with '#' and followed by
10207 SPARK keyword "hide" as a HIDE directive.
10208
10209 2011-08-02 Yannick Moy <moy@adacore.com>
10210
10211 * types.ads, erroutc.ads: Minor reformatting.
10212
10213 2011-08-02 Vincent Celier <celier@adacore.com>
10214
10215 * link.c: Add response file support for cross platforms.
10216
10217 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10218
10219 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10220 in an association, set parent field of copy before partial analysis.
10221 * sem_res.adb (Resolve_Slice): create reference to itype only when
10222 expansion is enabled.
10223
10224 2011-08-02 Yannick Moy <moy@adacore.com>
10225
10226 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10227 for new flag denoting which subprogram bodies are in ALFA
10228 * restrict.adb, sem_ch7.adb: Update comment
10229 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10230 sem_ch9.adb, sem_res.adb: Add calls to
10231 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10232 * sem_ch6.adb (Analyze_Function_Return): add calls to
10233 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10234 middle of the body, and extended return.
10235 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10236 False when missing return.
10237 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10238 to True for subprograms whose spec is in ALFA. Remove later on the flag
10239 on the entity used for a subprogram body when there exists a separate
10240 declaration.
10241 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10242 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10243 False, otherwise do nothing.
10244
10245 2011-08-02 Robert Dewar <dewar@adacore.com>
10246
10247 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10248
10249 2011-08-02 Yannick Moy <moy@adacore.com>
10250
10251 * sem_ch4.ads: minor formatting.
10252
10253 2011-08-02 Yannick Moy <moy@adacore.com>
10254
10255 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10256 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10257 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10258 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10259 opt.ads: cleanup of SPARK mode
10260
10261 2011-08-02 Yannick Moy <moy@adacore.com>
10262
10263 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10264 types.
10265 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10266 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10267 * sem_ch3.adb
10268 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10269 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10270 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10271 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10272 types.
10273 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10274 non-static range.
10275 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10276 functions whose return type is not in ALFA.
10277 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10278 specifications.
10279 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10280 parameter's type is not in ALFA.
10281 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10282 types are in ALFA.
10283
10284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10285
10286 * sem_ch6 (Analyze_Expression_Function): treat the function as
10287 Inline_Always, and introduce a subprogram declaration for it when it is
10288 not a completion.
10289 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10290 expression functions, so that the back-end can determine whether they
10291 can in fact be inlined.
10292 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10293 a function body comes from an expression function.
10294
10295 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10296
10297 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10298 null exclusions to test Can_Never_Be_Null on the anonymous access types
10299 of the formals rather than testing the formals themselves. Exclude this
10300 check in cases where the Old_Formal is marked as a controlling formal,
10301 to avoid issuing spurious errors for bodies completing dispatching
10302 operations (due to the flag not getting set on controlling access
10303 formals in body specs).
10304 (Find_Corresponding_Spec): When checking full and subtype conformance of
10305 subprogram bodies in instances, pass Designated and E in that order, for
10306 consistency with the expected order of the formals (New_Id followed by
10307 Old_Id).
10308
10309 2011-08-02 Robert Dewar <dewar@adacore.com>
10310
10311 * sem_ch8.adb: Minor reformatting.
10312
10313 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10314
10315 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10316 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10317 primitive operations of class-wide actuals.
10318
10319 2011-08-02 Javier Miranda <miranda@adacore.com>
10320
10321 * exp_atag.ads, exp_atag.adb
10322 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10323 since its value is implicitly passed in argument Typ.
10324 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10325 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10326 Build_Common_Dispatching_Select_Statements.
10327
10328 2011-08-02 Robert Dewar <dewar@adacore.com>
10329
10330 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10331 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10332 Minor reformatting.
10333
10334 2011-08-02 Robert Dewar <dewar@adacore.com>
10335
10336 * sem_res.adb: Minor reformatting.
10337 * sem_prag.adb: Minor reformatting.
10338
10339 2011-08-02 Javier Miranda <miranda@adacore.com>
10340
10341 * exp_atag.adb, exp_atags.ads
10342 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10343 by the tagged type Entity. Required to use this routine in the VM
10344 targets since we do not have available the Tag entity in the VM
10345 platforms.
10346 * exp_ch6.adb
10347 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10348 Ada.Tags has not been previously loaded.
10349 * exp_ch7.adb
10350 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10351 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10352 * sem_aux.adb
10353 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10354 view of enclosing scopes. Required to handle enclosing scopes that
10355 are synchronized types whose full view is a task type.
10356 * exp_disp.adb
10357 (Build_VM_TSDs): Minor code improvement to avoid generating and
10358 analyzing lists with empty nodes.
10359 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10360 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10361 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10362 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10363 (Make_Select_Specific_Data_Table): Add support for VM targets.
10364 (Make_VM_TSD): Generate code to initialize the SSD structure of
10365 the TSD.
10366
10367 2011-08-02 Yannick Moy <moy@adacore.com>
10368
10369 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10370 cross-references section in ALI.
10371 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10372 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10373 Sub).
10374 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10375 subprogram or package entity of a node
10376 (Is_Local_Reference_Type): new function returns True for references
10377 selected in local cross-references.
10378 (Lt): function extracted from Lt in Output_References
10379 (Write_Entity_Name): function extracted from Output_References
10380 (Generate_Definition): generate reference with type 'D' for definition
10381 of objects (object declaration and parameter specification), with
10382 appropriate locations and units, for use in local cross-references.
10383 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10384 references of type 'I' for initialization in object definition.
10385 (Output_References): move part of function Lt and procedure
10386 Write_Entity_Name outside of the body. Ignore references of types 'D'
10387 and 'I' introduced for local cross-references.
10388 (Output_Local_References): new procedure to output the local
10389 cross-references sections.
10390 (Lref_Entity_Status): new array defining whether an entity is a local
10391 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10392 with 'I' type when initialization expression is present.
10393 * get_scos.adb, get_scos.ads: Correct comments and typos
10394
10395 2011-08-02 Javier Miranda <miranda@adacore.com>
10396
10397 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10398 the JVM target.
10399 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10400 the JVM target.
10401 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10402 TSD support.
10403
10404 2011-08-02 Vincent Celier <celier@adacore.com>
10405
10406 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10407 (No_Space_Img): New function
10408 (Find_Excluded_Sources): When reading from a file, record the file name
10409 and the line number for each excluded source.
10410 (Mark_Excluded_Sources): When reporting an error, if the excluded
10411 sources were read from a file, include file name and line number in
10412 the error message.
10413
10414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10415
10416 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10417
10418 2011-08-02 Robert Dewar <dewar@adacore.com>
10419
10420 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10421
10422 2011-08-02 Javier Miranda <miranda@adacore.com>
10423
10424 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10425 generation of TSDs to the DOTNET compiler.
10426 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10427 generation of TSDs to the DOTNET compiler.
10428
10429 2011-08-02 Javier Miranda <miranda@adacore.com>
10430
10431 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10432 record of all the tagged types declared inside library level package
10433 declarations, library level package bodies or library level subprograms.
10434 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10435 associated with a given tagged type.
10436 (Build_VM_TSDs): New subprogram.
10437 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10438 compilation units that are subprograms.
10439 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10440 compilation units that are package bodies.
10441 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10442 units that are a package declaration or a package instantiation.
10443 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10444 reorganization to improve the error generated by the frontend when the
10445 function Ada.Tags.Secondary_Tag is not available.
10446 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10447 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10448
10449 2011-08-02 Javier Miranda <miranda@adacore.com>
10450
10451 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10452
10453 2011-08-02 Robert Dewar <dewar@adacore.com>
10454
10455 * s-imenne.ads: Minor reformatting.
10456
10457 2011-08-02 Robert Dewar <dewar@adacore.com>
10458
10459 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10460 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10461 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10462
10463 2011-08-02 Robert Dewar <dewar@adacore.com>
10464
10465 * einfo.ads (Materialize_Entity): Document this is only for renamings
10466 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10467 required debug information in the case where we transform the object
10468 declaration into a renaming declaration.
10469 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10470 object
10471 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10472 Materialize_Entity.
10473
10474 2011-08-02 Robert Dewar <dewar@adacore.com>
10475
10476 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10477 Suppress_Init_Procs.
10478 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10479 Suppress_Initialization/Initialization_Suppressed.
10480 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10481 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10482 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10483 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10484
10485 2011-08-02 Robert Dewar <dewar@adacore.com>
10486
10487 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10488 Minor reformatting.
10489
10490 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10491
10492 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10493 only have inheritable classwide pre/postconditions.
10494
10495 2011-08-02 Javier Miranda <miranda@adacore.com>
10496
10497 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10498 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10499 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10500 checks if the external tag of a type is the same as the external tag
10501 of some other declaration.
10502
10503 2011-08-02 Thomas Quinot <quinot@adacore.com>
10504
10505 * s-taskin.ads: Minor reformatting.
10506
10507 2011-08-02 Emmanuel Briot <briot@adacore.com>
10508
10509 * g-comlin.adb (Display_Help): swap the order in which it prints the
10510 short help and the general usage.
10511
10512 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10513
10514 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10515 the aspect declarations and attach them to the generic copy for
10516 subsequent analysis.
10517 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10518 declarations of the generic tree to the new subprogram declarations.
10519 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10520 conditions that apply to a subprogram instance.
10521
10522 2011-08-02 Robert Dewar <dewar@adacore.com>
10523
10524 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10525
10526 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10527
10528 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10529 private type with a tagged full view is not derived in the immediate
10530 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10531
10532 2011-08-02 Robert Dewar <dewar@adacore.com>
10533
10534 * exp_ch4.adb: Minor reformatting.
10535
10536 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10537
10538 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10539 Ada2012 iterator, the loop will be rewritten during expansion into a
10540 while loop with a cursor and an element declaration. Do not analyze the
10541 body in this case, because if the container is for indefinite types the
10542 actual subtype of the elements will only be determined when the cursor
10543 declaration is analyzed.
10544
10545 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10546
10547 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10548 size/alignment related attributes in CodePeer_Mode.
10549
10550 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10551
10552 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10553 Prepend_Element, since this can result in the operation getting the
10554 wrong slot in the full type's dispatch table if the full type has
10555 inherited operations. The incomplete type's operation will get added
10556 to the proper position in the full type's primitives
10557 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10558 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10559 dispatching operations, since there are cases where nonprimitive
10560 subprograms can get added to the list of incomplete dependents (such
10561 as subprograms in nested packages).
10562 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10563 private part when determining whether to add a primitive with a
10564 parameter of a tagged incomplete type to the Private_Dependents list.
10565 Such primitives can also occur in the visible part, and should not have
10566 been excluded from being private dependents.
10567 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10568 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10569 list of a Taft-amendment incomplete type is a primitive before issuing
10570 an error that the full type must appear in the same unit. There are
10571 cases where nonprimitives can be in the list (such as subprograms in
10572 nested packages).
10573 * sem_disp.adb (Derives_From): Use correct condition for checking that
10574 a formal's type is derived from the type of the corresponding formal in
10575 the parent subprogram (the condition was completely wrong). Add
10576 checking that was missing for controlling result types being derived
10577 from the result type of the parent operation.
10578
10579 2011-08-02 Yannick Moy <moy@adacore.com>
10580
10581 * errout.adb (First_Node): minor renaming
10582 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10583 first node.
10584
10585 2011-08-02 Yannick Moy <moy@adacore.com>
10586
10587 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10588 before accessing operands.
10589 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10590 decide whether an initialization expression respects SPARK rules, as
10591 the plain node is the expanded one. This allows for more valid warnings
10592 to be issued.
10593 * gnat_rm.texi: Minor update.
10594
10595 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10596
10597 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10598 previous change.
10599
10600 2011-08-02 Robert Dewar <dewar@adacore.com>
10601
10602 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10603
10604 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10605
10606 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10607 loop statements and the element renaming declaration with a block when
10608 the element type is controlled.
10609
10610 2011-08-02 Yannick Moy <moy@adacore.com>
10611
10612 * sinfo.ads: Minor formatting.
10613
10614 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10615
10616 * sem_aggr.adb (Add_Association): if the association has a box and no
10617 expression, use the Sloc of the aggregate itself for the new
10618 association.
10619 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10620 the Original_Node.
10621
10622 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10623
10624 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10625 When a container is provided via a function call, generate a renaming
10626 of the function result. This avoids the creation of a transient scope
10627 and the premature finalization of the container.
10628 * exp_ch7.adb (Is_Container_Cursor): Removed.
10629 (Wrap_Transient_Declaration): Remove the supression of the finalization
10630 of the list controller when the declaration denotes a container cursor,
10631 it is not needed.
10632
10633 2011-08-02 Yannick Moy <moy@adacore.com>
10634
10635 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10636 node is from source, instead of the original node being from source.
10637 * sem_aggr.adb
10638 (Resolve_Array_Aggregate): refine the check for a static expression, to
10639 recognize also static ranges
10640 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10641 Array_Type_Declaration): postpone the test for the type being a subtype
10642 mark after the type has been resolved, so that component-selection and
10643 expanded-name are discriminated.
10644 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10645 to distinguish the case of an iteration scheme, so that an error is
10646 issed on a non-static range in SPARK except in an iteration scheme.
10647 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10648 In_Iter_Schm = True.
10649 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10650 user-defined operators so that they are allowed in renaming
10651 * sem_ch8.adb
10652 (Find_Selected_Component): refine the check for prefixing of operators
10653 so that they are allowed in renaming. Move the checks for restrictions
10654 on selector name after analysis discriminated between
10655 component-selection and expanded-name.
10656 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10657 concatenation argument of string type if it is static.
10658 * sem_util.adb, sem_util.ads
10659 (Check_Later_Vs_Basic_Declarations): add a new function
10660 Is_Later_Declarative_Item to decice which declarations are allowed as
10661 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10662 mode, add that renamings are considered as later items.
10663 (Enclosing_Package): new function to return the enclosing package
10664 (Enter_Name): correct the rule for homonyms in SPARK
10665 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10666 from source (result of expansion) to avoid issuing wrong warnings.
10667
10668 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10669
10670 * errout.adb: On anything but an expression First_Node returns its
10671 argument.
10672
10673 2011-08-02 Pascal Obry <obry@adacore.com>
10674
10675 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10676
10677 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10678
10679 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10680 Set the associated loop as the related expression of internally
10681 generated cursors.
10682 * exp_ch7.adb (Is_Container_Cursor): New routine.
10683 (Wrap_Transient_Declaration): Supress the finalization of the list
10684 controller when the declaration denotes a container cursor.
10685
10686 2011-08-02 Yannick Moy <moy@adacore.com>
10687
10688 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10689 command line now.
10690 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10691 expression is a simple expression. This check cannot be performed in
10692 the semantics, so just drop it.
10693 (P_Index_Or_Discriminant_Constraint): move check that the index or
10694 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10695 semantics. Other cases were previously checked in the semantics.
10696 * par-ch4.adb (P_Name): move checks that a selector name is not
10697 character literal or an operator symbol to Find_Selected_Component in
10698 the semantics
10699 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10700 declarations are not placed after later declarations in a separate
10701 procedure in Sem_Util (possibly not the best choice?), to be used both
10702 during parsing, for Ada 83 mode, and during semantic analysis, for
10703 SPARK mode.
10704 * par-endh.adb (Check_End): move check that end label is not missing
10705 to Process_End_Label in the semantics
10706 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10707 the special case for SPARK restriction
10708 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10709 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10710 parameter Force to issue the error message even on internal node (used
10711 for generated end label). Call Check_Restriction to check when an error
10712 must be issued. In SPARK mode, issue an error message even if the
10713 restriction is not set.
10714 (Check_Restriction): new procedure with an additional out parameter to
10715 inform the caller that a message has been issued
10716 * sem_aggr.adb: Minor modification of message
10717 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10718 instead of issuing an error message directly
10719 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10720 declarations are not placed after later declarations, by calling
10721 Check_Later_Vs_Basic_Declarations
10722 (Analyze_Subtype_Declaration): move here the check that an index or
10723 discriminant constraint must be a subtype mark. Change the check that
10724 a subtype of String must start at one so that it works on subtype marks.
10725 * sem_ch4.adb (Analyze_Call): move here the check that a named
10726 association cannot follow a positional one in a call
10727 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10728 instead of issuing an error message directly
10729 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10730 selector name is not a character literal or an operator symbol. Move
10731 here the check that the prefix of an expanded name cannot be a
10732 subprogram or a loop statement.
10733 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10734 procedure called from parsing and semantics to check that basic
10735 declarations are not placed after later declarations
10736 (Process_End_Label): move here the check that end label is not missing
10737
10738 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10739
10740 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10741 representation clause in codepeer mode, since it confuses CodePeer and
10742 does not bring useful info.
10743
10744 2011-08-02 Ed Falis <falis@adacore.com>
10745
10746 * init.c: initialize fp hw on MILS.
10747
10748 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10749
10750 * errout.adb (First_Node): for bodies, return the node itself (small
10751 optimization). For other nodes, do not check source_unit if the node
10752 comes from Standard.
10753
10754 2011-08-02 Robert Dewar <dewar@adacore.com>
10755
10756 * exp_ch3.adb: Minor comment additions.
10757 * sem_ch13.adb: Minor reformatting.
10758
10759 2011-08-02 Pascal Obry <obry@adacore.com>
10760
10761 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10762
10763 2011-08-02 Robert Dewar <dewar@adacore.com>
10764
10765 * sem_attr.adb: Minor reformatting.
10766
10767 2011-08-02 Robert Dewar <dewar@adacore.com>
10768
10769 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10770 (Has_Default_Component_Value): Removed
10771 * einfo.ads Comment updates
10772 (Has_Default_Aspect): Replaces Has_Default_Value
10773 (Has_Default_Component_Value): Removed
10774 * exp_ch13.adb
10775 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10776 * exp_ch3.adb
10777 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10778 (Get_Simple_Init_Val): Handle Default_Value aspect
10779 (Needs_Simple_Initialization): Handle Default_Value aspect
10780 * exp_ch3.ads: Needs_Simple_Initialization
10781 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10782 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10783 * sem_ch13.adb
10784 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10785 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10786 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10787
10788 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10789
10790 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10791 package containing iteration primitives.
10792 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10793
10794 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10795
10796 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10797 "of", pre-analyze expression in case it is a function call with
10798 finalization actions that must be placed ahead of the loop.
10799 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10800 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10801
10802 2011-08-02 Geert Bosch <bosch@adacore.com>
10803
10804 * cstand.adb (Create_Float_Types): Only consider C's long double for
10805 Long_Long_Float, in addition to double.
10806
10807 2011-08-02 Robert Dewar <dewar@adacore.com>
10808
10809 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10810 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10811 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10812 Minor reformatting.
10813
10814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10815
10816 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10817 indexed component.
10818
10819 2011-08-02 Javier Miranda <miranda@adacore.com>
10820
10821 * einfo.ads, einfo.adb
10822 (Original_Access_Type): Move this attribute to Node26 since there was
10823 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10824 which causes conflicts and breaks the generation of the .NET compiler.
10825 (Interface_Name): Add missing documentation on JGNAT only uses of
10826 this attribute.
10827
10828 2011-08-02 Geert Bosch <bosch@adacore.com>
10829
10830 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10831 (Find_Back_End_Float_Type): Likewise
10832 (Create_Back_End_Float_Types): Likewise
10833 (Create_Float_Types): Likewise
10834 (Register_Float_Type): Likewise
10835 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10836 Nlist and split out type selection in new local Find_Base_Type function.
10837 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10838 Nlist
10839 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10840
10841 2011-08-02 Robert Dewar <dewar@adacore.com>
10842
10843 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10844 alpha order).
10845 * opt.ads: Minor comment change.
10846 * sem_ch12.adb: Minor code reorganization.
10847
10848 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10849
10850 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10851 subtype's list of rep items to the list on the full subtype in the case
10852 where the lists are the same.
10853
10854 2011-08-02 Geert Bosch <bosch@adacore.com>
10855
10856 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10857 using the one from System.Strings, which also deallocates all strings.
10858
10859 2011-08-02 Geert Bosch <bosch@adacore.com>
10860
10861 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10862 function.
10863 * gcc-interface/Make-lang.in: Update dependencies.
10864
10865 2011-08-02 Olivier Hainque <hainque@adacore.com>
10866
10867 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10868 end_locus.
10869
10870 2011-08-02 Javier Miranda <miranda@adacore.com>
10871
10872 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10873 associated with anonymous access to subprograms.
10874
10875 2011-08-02 Geert Bosch <bosch@adacore.com>
10876
10877 * opt.ads
10878 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10879 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10880 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10881 (Add_Symbol_Definition): Move to switch-c.adb
10882 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10883 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10884 (Add_Symbol_Definition): Move to switch-c.adb.
10885 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10886 * sem_warn.adb
10887 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10888 Move to warnsw.adb.
10889 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10890 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10891 Move to warnsw.adb.
10892 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10893 (Add_Symbol_Definition): Moved from Prepcomp.
10894 * switch-c.ads: Update copyright notice. Use String_List instead of
10895 Argument_List, removing dependency on System.OS_Lib.
10896
10897 2011-08-02 Yannick Moy <moy@adacore.com>
10898
10899 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10900 mode on initialization expression which does not respect SPARK
10901 restrictions.
10902 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10903 if the tree referenced by its argument represents an initialization
10904 expression in SPARK, suitable for initializing an object in an object
10905 declaration.
10906
10907 2011-08-02 Javier Miranda <miranda@adacore.com>
10908
10909 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10910 internally generated access to subprogram with its associated protected
10911 subprogram type.
10912 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10913
10914 2011-08-02 Geert Bosch <bosch@adacore.com>
10915
10916 * cstand.adb (Register_Float_Type): Print information about type to
10917 register, if the Debug_Flag_Dot_B is set.
10918 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10919 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10920 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10921 with a requested precision of more than Max_Digits digits and no more
10922 than Max_Base_Digits digits, if a range specification is present and the
10923 Predefined_Float_Types list has a suitable type to derive from.
10924 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10925 case of type completion with pragma Import
10926 * sem_prag.adb
10927 (Process_Import_Predefined_Type): Processing to complete a type
10928 with pragma Import. Currently supports floating point types only.
10929 (Set_Convention_From_Pragma): Do nothing without underlying type.
10930 (Process_Convention): Guard against absence of underlying type,
10931 which may happen when importing incomplete types.
10932 (Process_Import_Or_Interface): Handle case of importing predefined
10933 types. Tweak error message.
10934
10935 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10936
10937 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10938 functions to previous change. Reorganize code slightly.
10939
10940 2011-08-02 Geert Bosch <bosch@adacore.com>
10941
10942 * back_end.ads (Register_Type_Proc): New call back procedure type for
10943 allowing the back end to provide information about available types.
10944 (Register_Back_End_Types): New procedure to register back end types.
10945 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10946 available types.
10947 * cstand.adb (Back_End_Float_Types): New list for floating point types
10948 supported by the back end.
10949 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10950 (Copy_Float_Type): New procedure to make new copies of predefined types.
10951 (Register_Float_Type): New call back procedure to populate the BEFT list
10952 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10953 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10954 (Create_Float_Types): New procedure to create entities for floating
10955 point types predefined in Standard, and put these and any remaining
10956 BEFTs on the Predefined_Float_Types list.
10957 * stand.ads (Predefined_Float_Types): New list for predefined floating
10958 point types that do not have declarations in package Standard.
10959
10960 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10961
10962 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10963 entity node for the unit containing the parameter.
10964 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10965 (Add_Inlined_Subprogram): Likewise.
10966 * gcc-interface/Make-lang.in: Update dependencies.
10967
10968 2011-08-02 Thomas Quinot <quinot@adacore.com>
10969
10970 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10971 suitable value.
10972
10973 2011-08-02 Geert Bosch <bosch@adacore.com>
10974
10975 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10976
10977 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10978
10979 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10980 computed value of Base_Type.
10981
10982 2011-08-02 Yannick Moy <moy@adacore.com>
10983
10984 * restrict.adb (Check_Restriction): issue an error for any use of
10985 class-wide, even if the No_Dispatch restriction is not set.
10986 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10987 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10988 when completing a private extension, the type named in the private part
10989 is not the same as that named in the visible part.
10990 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10991 of an inherited primitive operations of a tagged type or type extension
10992 that returns the tagged type.
10993 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10994 function which returns True for an implicit operation inherited by the
10995 derived type declaration for the argument type.
10996 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10997 order.
10998
10999 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11000
11001 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11002 Process_Bounds, to perform analysis with expansion of a range or an
11003 expression that is the iteration scheme for a loop.
11004 (Analyze_Iterator_Specification): If domain of iteration is given by a
11005 function call with a controlled result, as is the case if call returns
11006 a predefined container, ensure that finalization actions are properly
11007 generated.
11008 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11009
11010 2011-08-02 Javier Miranda <miranda@adacore.com>
11011
11012 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11013 * gcc-interface/Make-lang.in: Update dependencies.
11014
11015 2011-08-02 Javier Miranda <miranda@adacore.com>
11016
11017 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11018 determine if the analysis is performed using N or Original_Node (N).
11019 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11020 functionality of routine Is_Variable avoids code duplication.
11021 * checks.adb (Determine_Range): Handle temporaries generated by
11022 Remove_Side_Effects.
11023
11024 2011-08-02 Javier Miranda <miranda@adacore.com>
11025
11026 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11027 expansion of the condition. Required since the previous analysis was
11028 done with expansion disabled (see Resolve_Quantified_Expression) and
11029 hence checks were not inserted and record comparisons have not been
11030 expanded.
11031
11032 2011-08-02 Ed Falis <falis@adacore.com>
11033
11034 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11035 Update header.
11036
11037 2011-08-02 Bob Duff <duff@adacore.com>
11038
11039 * opt.ads: Minor comment fix.
11040
11041 2011-08-02 Bob Duff <duff@adacore.com>
11042
11043 * sem_ch12.adb (Analyze_Package_Instantiation,
11044 Analyze_Subprogram_Instantiation): Turn off style checking while
11045 analyzing an instance. Whatever style checks that apply to the generic
11046 unit should apply, so it makes no sense to apply them in an instance.
11047 This was causing trouble when compiling an instance of a runtime
11048 unit that violates the -gnatyO switch.
11049 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11050 one of the two case statements, causing spurious errors.
11051
11052 2011-08-02 Robert Dewar <dewar@adacore.com>
11053
11054 * uname.adb: Minor reformatting.
11055 * gnatcmd.adb: Minor reformatting.
11056 * exp_attr.adb: Minor reformatting.
11057
11058 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11059
11060 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11061 No_Dispatching_Calls, do not look for the Assign primitive, because
11062 predefined primitives are not created in this case.
11063
11064 2011-08-02 Bob Duff <duff@adacore.com>
11065
11066 * stylesw.ads: Minor comment fixes.
11067
11068 2011-08-02 Robert Dewar <dewar@adacore.com>
11069
11070 * freeze.adb (Add_To_Result): New procedure.
11071
11072 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11073
11074 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11075 time, if the specific run-time routines for handling streams of strings
11076 are not available, use the default mechanism.
11077
11078 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11079
11080 * s-regpat.ads: Fix typo.
11081
11082 2011-08-02 Vincent Celier <celier@adacore.com>
11083
11084 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11085 not null, call it to create the in memory config project file without
11086 parsing an existing default config project file.
11087
11088 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11089
11090 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11091
11092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11093
11094 * sem_elim.adb: an abstract subprogram does not need an eliminate
11095 pragma for its descendant to be eliminable.
11096
11097 2011-08-02 Ed Falis <falis@adacore.com>
11098
11099 * init.c: revert to handling before previous checkin for VxWorks
11100 * s-intman-vxworks.adb: delete unnecessary declarations related to
11101 using Ada interrupt facilities for handling signals.
11102 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11103 * s-intman-vxworks.ads: Import __gnat_install_handler as
11104 Initialize_Interrupts.
11105 * s-taprop-vxworks.adb: Delete Signal_Mask.
11106 (Abort_Handler): change construction of mask to unblock exception
11107 signals.
11108
11109 2011-08-02 Jerome Guitton <guitton@adacore.com>
11110
11111 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11112 Debug_Raise_Exception before propagation starts.
11113
11114 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11115
11116 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11117 to Restriction_Check_Required.
11118 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11119 * sem_res.adb (Resolve_Call): Likewise.
11120 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11121
11122 2011-08-02 Bob Duff <duff@adacore.com>
11123
11124 * stylesw.ads: Update comment.
11125 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11126 * errout.ads: Remove obsolete comment.
11127
11128 2011-08-02 Javier Miranda <miranda@adacore.com>
11129
11130 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11131 (Set_Is_Safe_To_Reevaluate): new procedure.
11132 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11133 assignment is allowed on safe-to-reevaluate variables.
11134 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11135 temporary created to remove side effects in expressions that use
11136 the secondary stack as safe-to-reevaluate.
11137 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11138 variables that are not true constants.
11139
11140 2011-08-02 Robert Dewar <dewar@adacore.com>
11141
11142 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11143 sem_res.adb, sem_ch6.adb: Minor reformatting.
11144
11145 2011-08-02 Jerome Guitton <guitton@adacore.com>
11146
11147 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11148
11149 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11150
11151 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11152 not set Overridden_Operation if subprogram is an initialization
11153 procedure.
11154
11155 2011-08-02 Yannick Moy <moy@adacore.com>
11156
11157 * par-ch6.adb: Correct obsolete name in comments
11158 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11159 which takes two message arguments (existing function takes one), with
11160 second message used for continuation.
11161 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11162 block statements that originate from a source block statement, not
11163 generated block statements
11164 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11165 symmetry with procedure case
11166 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11167 function to issue an error in formal mode if a package specification
11168 contains more than one tagged type or type extension.
11169 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11170 parameters matching formals of tagged types are objects (or ancestor
11171 type conversions of objects), not general expressions. Issue an error
11172 on view conversions that are not involving ancestor conversion of an
11173 extended type.
11174 (Resolve_Type_Conversion): in formal mode, issue an error on the
11175 operand of an ancestor type conversion which is not an object
11176 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11177 procedure so that it works also for actuals of function calls
11178 (Is_Actual_Tagged_Parameter): new function which determines if its
11179 argument is an actual parameter of a formal of tagged type in a
11180 subprogram call
11181 (Is_SPARK_Object_Reference): new function which determines if the tree
11182 referenced by its argument represents an object in SPARK
11183
11184 2011-08-02 Robert Dewar <dewar@adacore.com>
11185
11186 * sem_ch3.adb: Minor reformatting
11187 Minor comment addition
11188 Minor error msg text change
11189
11190 2011-08-02 Javier Miranda <miranda@adacore.com>
11191
11192 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11193 function. Used to be more precise when we generate a variable plus one
11194 assignment to remove side effects in the evaluation of the Bound
11195 expressions.
11196 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11197 of the bound expression to force its re-analysis and thus expand the
11198 associated transient scope (if required). Code cleanup replacing the
11199 previous code that declared the constant entity by an invocation to
11200 routine Force_Evaluation which centralizes this work in the frontend.
11201
11202 2011-08-02 Robert Dewar <dewar@adacore.com>
11203
11204 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11205 (Base_Type): Now uses improved Is_Base_Type function
11206 * einfo.ads (Base_Type): Inline this function
11207
11208 2011-08-02 Robert Dewar <dewar@adacore.com>
11209
11210 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11211 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11212
11213 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11214
11215 * gcc-interface/Make-lang.in: Update dependencies.
11216 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11217 targets.
11218
11219 2011-08-02 Yannick Moy <moy@adacore.com>
11220
11221 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11222 non-simple expression used in delta constraint
11223 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11224 index constraint which is not a subtype mark
11225 * par.adb: With and use Restrict
11226 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11227 mode on component type which is not a subtype mark and default
11228 expression on component
11229 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11230 of string which does not have a lower index bound equal to 1
11231 (Array_Type_Declaration): issue an error in formal mode on index or
11232 component type which is not a subtype mark, and on aliased keyword on
11233 component
11234 (Derived_Type_Declaration): issue an error in formal mode on interface,
11235 limited or abstract type
11236 (Record_Type_Declaration): issue an error in formal mode on interface
11237 (Record_Type_Definition): issue an error in formal mode on tagged types
11238 and type extensions not declared in the specification of a library unit
11239 package; on null non-tagged record; on variant part
11240
11241 2011-08-02 Vincent Celier <celier@adacore.com>
11242
11243 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11244 not declared for qualified library project when Library_Name is not
11245 declared, but Library_Dir is.
11246
11247 2011-08-02 Robert Dewar <dewar@adacore.com>
11248
11249 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11250 pragmas (affects aspects [Component_]Default_Value
11251 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11252 component type for the resolution
11253
11254 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11255
11256 * einfo.adb (Base_Type): Tune implementation for speed.
11257
11258 2011-08-02 Robert Dewar <dewar@adacore.com>
11259
11260 * freeze.adb: Minor reformatting.
11261
11262 2011-08-02 Thomas Quinot <quinot@adacore.com>
11263
11264 * scos.ads: Update comments.
11265
11266 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11267
11268 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11269 base type, because the parent may be a subtype of a private type whose
11270 convention is established in a private part.
11271
11272 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11273
11274 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11275 statement in a block when the expansion of the return expression has
11276 created a finalization chain.
11277 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11278 with the parent node.
11279 Add N_Extended_Return_Statement to handle the case where a transient
11280 object declaration appears in the Return_Object_Declarations list of
11281 an extended return statement.
11282
11283 2011-08-02 Matthew Gingell <gingell@adacore.com>
11284
11285 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11286 unused parameter 'name'.
11287
11288 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11289
11290 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11291 inherited operation, check whether its alias, which is the source
11292 operastion that it renames, has been marked eliminated.
11293
11294 2011-08-02 Javier Miranda <miranda@adacore.com>
11295
11296 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11297 in-mode parameter whose type is an access type since it can be used to
11298 modify its designated object. Enforce code that handles as safe an
11299 access type that is not access-to-constant but it is the result of a
11300 previous removal of side-effects.
11301 (Remove_Side_Effects): Minor code reorganization of cases which require
11302 no action. Done to incorporate documentation on new cases uncovered
11303 working in this ticket: no action needed if this routine was invoked
11304 too early and the nodes are not yet decorated.
11305 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11306 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11307 were issued with actuals that are implicitly provided by
11308 Force_Evaluation.
11309
11310 2011-08-02 Robert Dewar <dewar@adacore.com>
11311
11312 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11313
11314 2011-08-02 Yannick Moy <moy@adacore.com>
11315
11316 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11317 to issue an error in formal mode on attribute not supported in this mode
11318 (Analyze_Attribute): issue errors on standard attributes not supported
11319 in formal mode.
11320 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11321 comment, and issue error in formal mode on modulus which is not a power
11322 of 2.
11323 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11324 range.
11325 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11326 subtype mark.
11327 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11328 operator on modular type (except 'not').
11329
11330 2011-08-02 Robert Dewar <dewar@adacore.com>
11331
11332 * gnat_rm.texi: Minor reformatting.
11333
11334 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11335
11336 * s-osinte-linux.ads: Minor comment update and reformatting.
11337 * i-cexten.ads: Make this unit pure, as for its parent.
11338 Will allow its usage in more contexts if needed.
11339
11340 2011-08-02 Robert Dewar <dewar@adacore.com>
11341
11342 * s-utf_32.ads: Minor comment fix.
11343
11344 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11345
11346 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11347 operation of a tagged synchronized type, handle the case where the
11348 controlling argument is overloaded.
11349
11350 2011-08-02 Yannick Moy <moy@adacore.com>
11351
11352 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11353 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11354 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11355 SPARK mode and formal verification mode on processing SPARK restriction
11356 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11357 requiring consistency checking.
11358
11359 2011-08-02 Robert Dewar <dewar@adacore.com>
11360
11361 * sem_res.adb: Minor reformatting.
11362
11363 2011-08-02 Robert Dewar <dewar@adacore.com>
11364
11365 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11366 a-cforse.ads: Remove unneeded with of Ada.Containers
11367 Remove commented out pragma Inline's
11368 Move specifications of new subprograms to the actual specs
11369
11370 2011-08-02 Yannick Moy <moy@adacore.com>
11371
11372 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11373 a-cforse.ads: Update comments.
11374
11375 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11376
11377 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11378
11379 2011-08-02 Robert Dewar <dewar@adacore.com>
11380
11381 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11382 a-cforse.ads, a-cofove.ads: Minor reformatting.
11383
11384 2011-08-02 Claire Dross <dross@adacore.com>
11385
11386 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11387 a-cofove.ads: Add comments.
11388
11389 2011-08-02 Yannick Moy <moy@adacore.com>
11390
11391 * gnat_rm.texi: Document formal containers.
11392
11393 2011-08-02 Emmanuel Briot <briot@adacore.com>
11394
11395 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11396 are empty sections.
11397
11398 2011-08-02 Robert Dewar <dewar@adacore.com>
11399
11400 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11401 reformatting.
11402
11403 2011-08-02 Robert Dewar <dewar@adacore.com>
11404
11405 * aspects.adb: New aspects Default_Value and Default_Component_Value
11406 New format of Aspect_Names table checks for omitted entries
11407 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11408 handling of boolean aspects for derived types.
11409 New aspects Default_Value and Default_Component_Value
11410 New format of Aspect_Names table checks for omitted entries
11411 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11412 (Has_Default_Value): New flag
11413 (Has_Default_Component_Value): New flag
11414 (Has_Default_Value): New flag
11415 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11416 table.
11417 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11418 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11419 Default_Value and Default_Component_Value
11420 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11421 New aspects Default_Value and Default_Component_Value
11422 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11423 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11424
11425 2011-08-02 Vincent Celier <celier@adacore.com>
11426
11427 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11428 inherit library kind.
11429
11430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11431
11432 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11433 Minor reformatting.
11434
11435 2011-08-02 Robert Dewar <dewar@adacore.com>
11436
11437 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11438
11439 2011-08-02 Yannick Moy <moy@adacore.com>
11440
11441 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11442
11443 2011-08-02 Robert Dewar <dewar@adacore.com>
11444
11445 * impunit.adb: Add comment.
11446
11447 2011-08-02 Yannick Moy <moy@adacore.com>
11448
11449 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11450 qualification of aggregates in formal mode
11451 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11452 another aggregate
11453 (Resolve_Aggregate): complete the test that an aggregate is adequately
11454 qualified in formal mode
11455
11456 2011-08-02 Pascal Obry <obry@adacore.com>
11457
11458 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11459 * mlib-prj.adb: Supress warning when compiling binder generated file.
11460 (Build_Library): Supress all warnings when compiling the binder
11461 generated file.
11462
11463 2011-08-02 Yannick Moy <moy@adacore.com>
11464
11465 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11466 from here...
11467 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11468 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11469 Add with/use clauses to make Check_Formal_Restriction visible
11470
11471 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11472
11473 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11474 in-parameters when type of the generic formal is private in the generic
11475 spec and non-private in the body.
11476
11477 2011-08-02 Claire Dross <dross@adacore.com>
11478
11479 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11480 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11481 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11482 * impunit.adb, Makefile.rtl: Take new files into account.
11483
11484 2011-08-02 Robert Dewar <dewar@adacore.com>
11485
11486 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11487 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11488
11489 2011-08-02 Yannick Moy <moy@adacore.com>
11490
11491 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11492 formal mode
11493 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11494 matching static array bounds, taking into account the special case of
11495 string literals
11496 * sem_ch3.adb: Typo in comment.
11497
11498 2011-08-02 Yannick Moy <moy@adacore.com>
11499
11500 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11501 which issues an error in formal mode if its argument node is originally
11502 from source
11503 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11504 has a discriminant specification so that it does not include the case
11505 of derived types
11506 (Derived_Type_Declaration): move here the test that a derived type has a
11507 discriminant specification
11508 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11509 first element of a component association before accessing its choices
11510 (presence of component association is not enough)
11511 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11512 declaration is a library item before accessing the next element in a
11513 list, as library items are not member of lists
11514 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11515 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11516 Check_Formal_Restriction whenever possible.
11517
11518 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11519
11520 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11521 reference when needed.
11522
11523 2011-08-02 Bob Duff <duff@adacore.com>
11524
11525 * gnat_ugn.texi: Fix typo.
11526
11527 2011-08-02 Vincent Celier <celier@adacore.com>
11528
11529 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11530 archive file name. Do not use the full path name of archives for Open
11531 VMS.
11532
11533 2011-08-02 Robert Dewar <dewar@adacore.com>
11534
11535 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11536 Analyze_Aspect_Specifications
11537 * sem_ch13.adb
11538 (Analyze_Aspect_Specifications): New handling for boolean aspects
11539 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11540 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11541 sequence for Analyze_Aspect_Specifications
11542 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11543 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11544
11545 2011-08-02 Robert Dewar <dewar@adacore.com>
11546
11547 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11548 aspects, since these no longer exist.
11549
11550 2011-08-02 Robert Dewar <dewar@adacore.com>
11551
11552 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11553 semicolon, do not try to see if there are aspects following it.
11554 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11555 aspect spec.
11556
11557 2011-08-02 Robert Dewar <dewar@adacore.com>
11558
11559 * sem_ch8.adb, aspects.ads: Minor reformatting.
11560
11561 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11562
11563 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11564 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11565 extracted from...
11566 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11567
11568 2011-08-02 Yannick Moy <moy@adacore.com>
11569
11570 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11571 mode on subprogram declaration outside of package specification, unless
11572 it is followed by a pragma Import
11573 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11574 Access_Type_Declaration): issue error in formal mode on access type
11575 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11576 incomplete type
11577 (Analyze_Object_Declaration): issue error in formal mode on object
11578 declaration which does not respect SPARK restrictions
11579 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11580 declaration which does not respect SPARK restrictions
11581 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11582 error in formal mode on digits or delta constraint
11583 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11584 decimal fixed point type
11585 (Derived_Type_Declaration): issue error in formal mode on derived type
11586 other than type extensions of tagged record types
11587 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11588 with check on access definition
11589 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11590 mode on protected definition.
11591 (Analyze_Task_Definition): issue error in formal mode on task definition
11592
11593 2011-08-02 Robert Dewar <dewar@adacore.com>
11594
11595 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11596
11597 2011-08-02 Javier Miranda <miranda@adacore.com>
11598
11599 * sem_ch6.adb (Can_Override_Operator): New function.
11600 (Verify_Overriding_Indicator): Add missing code to check overriding
11601 indicator in operators. Fixes regression.
11602 (Check_Overriding_Indicator): Minor reformating after replacing the
11603 code that evaluates if the subprogram can override an operator by
11604 invocations to the above new function.
11605 * einfo.adb
11606 (Write_Field26_Name): Add missing code to ensure that, following
11607 the documentation in einfo.ads, this field is not shown as attribute
11608 "Static_Initialization" on non-dispatching functions.
11609
11610 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11611
11612 * sem_res.adb (Resolve_Call): A call to
11613 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11614 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11615 i.e., when the second parameter is of type Time_Span.
11616
11617 2011-08-02 Vincent Celier <celier@adacore.com>
11618
11619 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11620 with an archive instead of -L<library dir> -l<library name>.
11621
11622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11623
11624 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11625 mark the base types In_Use in addition to making the operations
11626 use_visible.
11627
11628 2011-08-02 Ed Falis <falis@adacore.com>
11629
11630 * init.c: add and setup __gnat_signal_mask for the exception signals
11631 * s-inmaop-vxworks.adb: new file.
11632 * s-intman-vxworks.adb: remove unnecessary initializations and
11633 simplify remaining
11634 * s-intman-vxworks.ads: remove unnecessary variable
11635 * s-taprop-vxworks.adb: simplify signal initialization
11636
11637 2011-08-02 Robert Dewar <dewar@adacore.com>
11638
11639 * sem_ch8.adb: Minor code reorganization, comment updates.
11640
11641 2011-08-02 Robert Dewar <dewar@adacore.com>
11642
11643 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11644 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11645 here from Sem_Res.
11646 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11647 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11648
11649 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11650
11651 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11652 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11653 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11654 use_type_clauses, to handle more efficiently use_type and use_all_type
11655 constructs.
11656 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11657 Ada2012 Use_All_Type clause.
11658 (Use_Class_Wide_Operations): new procedure.
11659
11660 2011-08-02 Robert Dewar <dewar@adacore.com>
11661
11662 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11663 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11664 expression to expression function.
11665
11666 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11667
11668 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11669 if types are compatible.
11670
11671 2011-08-02 Yannick Moy <moy@adacore.com>
11672
11673 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11674 returns True if its argument array types have same dimension and same
11675 static bounds at each index.
11676 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11677 OUT or IN OUT paramaters which are not view conversions in SPARK.
11678 (Resolve_Arithmetic_Op): issue an error in formal mode on
11679 multiplication or division with operands of fixed point types which are
11680 not qualified or explicitly converted.
11681 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11682 Boolean or array type (except String) operands.
11683 (Resolve_Equality_Op): issue an error in formal mode on equality
11684 operators for array types other than String with non-matching static
11685 bounds.
11686 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11687 for array types with non-matching static bounds. Factorize the code in
11688 Matching_Static_Array_Bounds.
11689 (Resolve_Qualified_Expression): issue an error in formal mode on
11690 qualified expressions for array types with non-matching static bounds.
11691 (Resolve_Type_Conversion): issue an error in formal mode on type
11692 conversion for array types with non-matching static bounds
11693
11694 2011-08-02 Robert Dewar <dewar@adacore.com>
11695
11696 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11697
11698 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11699
11700 * par-ch9.adb: save location of entry for proper error message.
11701
11702 2011-08-02 Javier Miranda <miranda@adacore.com>
11703
11704 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11705 (Use_Full_View) which permits this routine to climb through the
11706 ancestors using the full-view of private parents.
11707 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11708 Use_Full_View to true in calls to Is_Ancestor.
11709 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11710 true in call to Is_Ancestor.
11711 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11712 Use_Full_View to true in call to Is_Ancestor.
11713 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11714 call to Is_Ancestor.
11715 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11716 Use_Full_View to true in calls to Is_Ancestor.
11717 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11718 Make_Select_Specific_Data_Table, Register_Primitive,
11719 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11720 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11721 to true in call to Is_Ancestor.
11722 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11723 Use_Full_View to true in calls to Is_Ancestor.
11724 * exp_cg.adb
11725 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11726 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11727
11728 2011-08-02 Robert Dewar <dewar@adacore.com>
11729
11730 * gnat_rm.texi: Minor reformatting.
11731 * sem_prag.adb: Minor reformatting.
11732
11733 2011-08-02 Tristan Gingold <gingold@adacore.com>
11734
11735 * vms_data.ads: Add VMS qualifier for -gnateP.
11736
11737 2011-08-02 Robert Dewar <dewar@adacore.com>
11738
11739 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11740 * par-ch7.adb (P_Package): Proper placement of aspects for package
11741 decl/instantiation.
11742 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11743 (End_Statements): Add Is_Sloc parameterr
11744 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11745 (Check_End): Ad Is_Sloc parameter
11746 (End_Statements): Add Is_Sloc parameterr
11747
11748 2011-08-02 Vincent Celier <celier@adacore.com>
11749
11750 * ug_words: Add VMS qualifier equivalent to -gnateP:
11751 /SYMBOL_PREPROCESSING.
11752
11753 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11754
11755 * gnat-style.texi: For hexadecimal numeric literals the typical
11756 grouping of digits is 4 to represent 2 bytes.
11757 A procedure spec which is split into several lines is indented two
11758 characters.
11759
11760 2011-08-02 Yannick Moy <moy@adacore.com>
11761
11762 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11763 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11764 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11765 properly qualified
11766 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11767 choice in array aggregate
11768 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11769 mark as ancestor
11770 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11771 positional and named aggregate for record, or others in record
11772 aggregate, or multiple choice in record aggregate
11773 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11774 array operands to logical operations AND, OR and XOR do not have the
11775 same static lower and higher bounds
11776 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11777
11778 2011-08-01 Robert Dewar <dewar@adacore.com>
11779
11780 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11781 Replaces Last_Source_Node_In_Sequence.
11782 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11783 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11784 parens and blank in string (this was inconsistently implemented).
11785 * errout.ads
11786 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11787 blank in string (this was inconsistently implemented).
11788 * gnat1drv.adb
11789 (Set_Global_Switches): Set formal mode switches appropriately
11790 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11791 * par-prag.adb
11792 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11793 call Set_Error_Msg_Lang to set "spark" as language name.
11794 * par.adb: Remove unnecessary call to set formal language for errout
11795 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11796 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11797 name.
11798 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11799 calls to it, moved after resolution so that types are known
11800 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11801 result of concatenation is not of type String
11802 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11803 concatenation is not properly restricted
11804 * gnat_rm.texi: Add doc on pragma Spark_95.
11805 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11806 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11807 * gcc-interface/Make-lang.in: Update dependencies.
11808
11809 2011-08-01 Javier Miranda <miranda@adacore.com>
11810
11811 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11812 condition that detects if the overridden operation must replace an
11813 existing entity.
11814
11815 2011-08-01 Javier Miranda <miranda@adacore.com>
11816
11817 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11818 code declarations inserted by Insert_Actions in each alternative of the
11819 N_Case_Expression node.
11820
11821 2011-08-01 Robert Dewar <dewar@adacore.com>
11822
11823 * sem_ch6.adb: Minor code reorganization.
11824 * sem_util.adb: Minor reformatting.
11825
11826 2011-08-01 Pascal Obry <obry@adacore.com>
11827
11828 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11829 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11830
11831 2011-08-01 Yannick Moy <moy@adacore.com>
11832
11833 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11834 literal or operator symbol which is prefixed
11835 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11836 mode on access attributes.
11837 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11838 that concatenation operands are properly restricted in formal mode
11839 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11840 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11841 result of the concatenation has a type different from String.
11842 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11843 Analyze_Quantified_Expression, Analyze_Slice,
11844 Analyze_Null): issue an error in formal mode on unsupported constructs
11845 * sem_ch5.adb
11846 (Analyze_Block_Statement): only issue error on source block statement
11847 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11848 function which returns the last node in a list of nodes for which
11849 Comes_From_Source returns True, if any
11850 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11851 Last_Source_Node_In_Sequence
11852 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11853 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11854 mode on unsupported constructs
11855 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11856 rest of the actions may be needed later on since the error is marked as
11857 not serious.
11858 * sinfo.ads: Typos in comments.
11859
11860 2011-08-01 Pascal Obry <obry@adacore.com>
11861
11862 * projects.texi: Minor editing.
11863
11864 2011-08-01 Yannick Moy <moy@adacore.com>
11865
11866 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11867 insertion character ~~
11868 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11869 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11870 with insertion character ~~
11871 (Set_Msg_Text): treat insertion character ~~
11872 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11873 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11874 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11875 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11876 errors related to the formal language restriction not serious
11877 (insertion character |).
11878 * par.adb (Par): set formal language for error messages if needed
11879 * sem_ch6.adb (Check_Missing_Return): take into account possible
11880 generated statements at the end of the function
11881 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11882 enumeration value to define a new pragma SPARK_95
11883 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11884 SPARK_Version): new type and variables to store the SPARK version
11885 (none by default).
11886 (SPARK_Mode): return True when SPARK_Version is set
11887 * par-prag.adb: Correct indentation
11888 (Prag): take Pragma_SPARK_95 into account
11889 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11890 into account.
11891
11892 2011-08-01 Robert Dewar <dewar@adacore.com>
11893
11894 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11895 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11896 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11897
11898 2011-08-01 Pascal Obry <obry@adacore.com>
11899
11900 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11901 Target_Name to Get_Path call.
11902 (Parse_Single_Project): Likewise.
11903 (Post_Parse_Context_Clause): Likewise.
11904 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11905 Call Initialise_Project_Path with the proper Target_Name.
11906 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11907 search path.
11908 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11909 with the proper Target_Name.
11910 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11911 Part.Parse routine.
11912 (Parse_Project_And_Apply_Config): Likewise.
11913 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11914 This is fine as this part of the code is supporting only native
11915 compilation.
11916 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11917 is fine as this part of the code is supporting only native compilation.
11918
11919 2011-08-01 Yannick Moy <moy@adacore.com>
11920
11921 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11922 of homonym, unless the homonym is one of the cases allowed in SPARK
11923 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11924 package declaration occurring after a body.
11925
11926 2011-08-01 Robert Dewar <dewar@adacore.com>
11927
11928 * checks.adb, exp_ch4.adb: Minor reformatting.
11929
11930 2011-08-01 Javier Miranda <miranda@adacore.com>
11931
11932 * einfo.ads (Access_Disp_Table): Fix documentation.
11933 (Dispatch_Table_Wrappers): Fix documentation.
11934
11935 2011-08-01 Pascal Obry <obry@adacore.com>
11936
11937 * prj-env.adb, prj-env.ads: Minor reformatting.
11938
11939 2011-08-01 Yannick Moy <moy@adacore.com>
11940
11941 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11942 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11943 procedures out of these packages.
11944 * errout.ads, errout.adb
11945 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11946 procedures in of this package
11947 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11948 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11949 on misplaced later vs initial declarations, like in Ada 83
11950 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11951 formal mode on attribute of private type whose full type declaration
11952 is not visible
11953 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11954 package declaration inside a package specification
11955 (Analyze_Full_Type_Declaration): issue error in formal mode on
11956 controlled type or discriminant type
11957 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11958 user-defined operator means that it should come from the source
11959 (New_Overloaded_Entity): issue error in formal mode on overloaded
11960 entity.
11961 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11962
11963 2011-08-01 Thomas Quinot <quinot@adacore.com>
11964
11965 * atree.adb: Minor reformatting.
11966 * checks.adb: Minor reformatting.
11967
11968 2011-08-01 Vincent Celier <celier@adacore.com>
11969
11970 * s-parame-vms-ia64.ads: Fix typo in comment
11971 Minor reformatting
11972 * s-parame-vms-restrict.ads: Removed, unused.
11973
11974 2011-08-01 Javier Miranda <miranda@adacore.com>
11975
11976 * exp_ch3.adb
11977 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11978 * sem_ch3.adb
11979 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11980 * sem_ch3.ads, sem_ch3.adb
11981 (Is_Constant_Bound): New extended version of the subprogram that was
11982 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11983 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11984 * sem_aux.ads (Constant_Value): Fix typo in comment.
11985 * checks.adb (Generate_Index_Checks): New implementation which, for
11986 array objects with constant bounds, generates the runtime check
11987 referencing the bounds of the array type. For other cases this routine
11988 provides its previous behavior obtaining such values from the array
11989 object.
11990 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11991 parent type.
11992 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11993 we cannot have semantic interpretations of the new node.
11994
11995 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11996
11997 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11998 expressions.
11999
12000 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12001
12002 * sem_ch8.adb: Minor code editing.
12003 * s-vxwext.adb: Remove trailing space.
12004 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12005 consistency with other files.
12006
12007 2011-08-01 Thomas Quinot <quinot@adacore.com>
12008
12009 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12010
12011 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12012
12013 * par-ch10.adb: reject parameterized expressions as compilation unit.
12014 * sem_ch4.adb: handle properly conditional expression with overloaded
12015 then_clause and no else_clause.
12016
12017 2011-08-01 Tristan Gingold <gingold@adacore.com>
12018
12019 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12020 like done by System.Aux_DEC.
12021 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12022
12023 2011-08-01 Yannick Moy <moy@adacore.com>
12024
12025 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12026 missing label at end of declaration (subprogram or package)
12027 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12028 of positional and named parameter association
12029 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12030 Error_Msg_SP which adds a prefix to the error message giving the name
12031 of the formal language analyzed
12032 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12033 access result type in subprogram, unconstrained array as result type,.
12034 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12035 procedure
12036 * sem_ch8.adb: Code clean up.
12037
12038 2011-08-01 Javier Miranda <miranda@adacore.com>
12039
12040 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12041 * einfo.ads (Access_Disp_Table): Fix documentation.
12042 (Dispatch_Table_Wrappers): Fix documentation.
12043 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12044 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12045 to enforce the documentation of this attribute.
12046 (Set_Is_Interface): Cleanup the assertion.
12047 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12048 the Underlying_Type entity before reading attribute Access_Disp_Table.
12049 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12050 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12051 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12052 the Underlying_Type entity before reading attribute Access_Disp_Table.
12053 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12054 Locate the Underlying_Type entity before reading attribute
12055 Access_Disp_Table.
12056
12057 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12058
12059 * s-poosiz.ads: Additional overriding indicators.
12060
12061 2011-08-01 Yannick Moy <moy@adacore.com>
12062
12063 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12064 formal mode.
12065 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12066 parameter specification does not include a subtype mark.
12067 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12068 formal mode on abstract subprogram.
12069 (Analyze_Subprogram_Specification): issue error in formal mode on
12070 user-defined operator.
12071 (Process_Formals): issue error in formal mode on access parameter and
12072 default expression.
12073 * sem_ch9.adb (Analyze_Abort_Statement,
12074 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12075 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12076 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12077 Analyze_Requeue, Analyze_Selective_Accept,
12078 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12079 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12080 issue error in formal mode on user-defined raise statement.
12081
12082 2011-08-01 Thomas Quinot <quinot@adacore.com>
12083
12084 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12085 declaration being hidden when overriding an implicit inherited
12086 subprogram.
12087 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12088 (-gnats), do not complain about a source file that contains only a
12089 pragma No_Body.
12090
12091 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12092
12093 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12094 variable if already set.
12095
12096 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12097
12098 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12099 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12100 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12101 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12102 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12103 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12104 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12105 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12106 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12107 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12108 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12109 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12110 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12111 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12112 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12113 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12114 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12115 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12116 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12117 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12118 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12119 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12120 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12121 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12122 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12123 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12124 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12125 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12126 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12127 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12128 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12129 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12130 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12131 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12132 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12133 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12134 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12135 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12136 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12137 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12138 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12139 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12140 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12141 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12142 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12143 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12144 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12145 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12146 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12147 Use GNAT instead of GNARL.
12148
12149 2011-08-01 Bob Duff <duff@adacore.com>
12150
12151 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12152 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12153 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12154 reformatting.
12155
12156 2011-08-01 Yannick Moy <moy@adacore.com>
12157
12158 * debug.adb (d.D) reverve flag for the SPARK mode
12159 (d.E) reverve flag for SPARK generation mode
12160 (d.F) reverve flag for Why generation mode
12161 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12162 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12163 functions which return True when the corresponding modes are set
12164 (Formal_Language): return "spark" or "alfa" when in formal verification
12165 mode.
12166 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12167 Error_Msg to prefix the error message with a tag giving the formal
12168 language
12169 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12170 message with a tag giving the formal language
12171 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12172 block statement
12173 (Analyze_Case_Statement): issue error in formal mode on case statement
12174 with a single "others" case alternative
12175 (Analyze_Exit_Statement): issue errors in formal mode on exit
12176 statements which do not respect SPARK restrictions
12177 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12178 (Check_Unreachable_Code): always issue an error (not a warning) in
12179 formal mode on unreachable code (concerns both code after an infinite
12180 loop and after an unconditional jump, both not allowed in SPARK)
12181 * sem_ch6.adb (Analyze_Return_Statement): add call to
12182 Set_Return_Present for a procedure containing a return statement
12183 (already done for functions in Analyze_Function_Return)
12184 (Analyze_Function_Return): issue error in formal mode on extended
12185 return or if return is not last statement in function
12186 (Check_Missing_Return): issue error in formal mode if function does
12187 not end with return or if procedure contains a return
12188 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12189 function to detect if there is an inner scope of its parameter S which
12190 is a loop.
12191
12192 2011-08-01 Thomas Quinot <quinot@adacore.com>
12193
12194 * sem_ch6.ads: Minor reformatting.
12195
12196 2011-08-01 Javier Miranda <miranda@adacore.com>
12197
12198 * sem_util.adb (Abstract_Interface_List): Complete condition when
12199 processing private type declarations to avoid reading unavailable
12200 attribute.
12201 (Is_Synchronized_Tagged_Type): Complete condition when processing
12202 private extension declaration nodes to avoid reading unavailable
12203 attribute.
12204
12205 2011-08-01 Thomas Quinot <quinot@adacore.com>
12206
12207 * sem_ch3.adb: Minor reformatting.
12208
12209 2011-08-01 Thomas Quinot <quinot@adacore.com>
12210
12211 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12212 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12213 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12214 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12215 for VMS, instead parametrize the common implementation with
12216 System.Parameters declarations.
12217
12218 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12219
12220 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12221
12222 2011-08-01 Tristan Gingold <gingold@adacore.com>
12223
12224 * seh_init.c: Fix SEH handler installation on win64.
12225
12226 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12227
12228 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12229 double analysis of an anonymous access to subprogram, because it can
12230 lead to improper sharing of profiles and a back-end crash.
12231
12232 2011-08-01 Robert Dewar <dewar@adacore.com>
12233
12234 * make.adb, sem_ch4.adb: Minor reformatting.
12235 * gcc-interface/Make-lang.in: Update dependencies.
12236 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12237
12238 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12239
12240 * gnat_rm.texi: Fix definition of Long_Integer.
12241
12242 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12243
12244 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12245 to prevent storage exhaustion.
12246 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12247 finalized is a function body, insert the cleanup code before the final
12248 return statement, to prevent spurious warnings.
12249 * s-pooglo.ads: add overriding indicator.
12250
12251 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12252
12253 * sem_ch4.adb (Operator_Check): improve error message when both a
12254 with_clause and a use_clause are needed to make operator usage legal.
12255 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12256 determine whether a compilation unit is visible within an other,
12257 either through a with_clause in the current unit, or a with_clause in
12258 its library unit or one one of its parents.
12259
12260 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12261
12262 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12263 over an arbitrary expression of an array or container type.
12264 * lib-xref.adb: clarify comment.
12265
12266 2011-08-01 Bob Duff <duff@adacore.com>
12267
12268 * einfo.ads: Minor reformatting.
12269 * debug.adb: Minor comment improvement.
12270
12271 2011-08-01 Javier Miranda <miranda@adacore.com>
12272
12273 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12274 consider hidden subprograms as valid candidates.
12275
12276 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12277
12278 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12279
12280 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12281
12282 * gnat_ugn.texi: Fix typo.
12283
12284 2011-08-01 Robert Dewar <dewar@adacore.com>
12285
12286 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12287 lib-xref.adb: Minor reformatting
12288
12289 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12290
12291 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12292 when to generate a call to Move_Final_List.
12293 (Has_Controlled_Parts): Remove this function.
12294
12295 2011-08-01 Geert Bosch <bosch@adacore.com>
12296
12297 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12298 "," in choice list.
12299
12300 2011-08-01 Thomas Quinot <quinot@adacore.com>
12301
12302 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12303 explicit raise of a predefined exception as Comes_From_Source if the
12304 original N_Raise_Statement comes from source.
12305
12306 2011-08-01 Robert Dewar <dewar@adacore.com>
12307
12308 * sinfo.ads: Add comment.
12309 * sem_ch6.adb: Minor reformatting.
12310
12311 2011-08-01 Robert Dewar <dewar@adacore.com>
12312
12313 * freeze.adb (Freeze_Entity): Refine check for bad component size
12314 clause to avoid rejecting confirming clause when atomic/aliased present.
12315
12316 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12317
12318 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12319 better determine whether an entity reference is a write.
12320 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12321 subcomponent.
12322 * lib-xref.adb (Output_References): Do no suppress a read reference at
12323 the same location as an immediately preceeding modify-reference, to
12324 handle properly in-out actuals.
12325
12326 2011-08-01 Tristan Gingold <gingold@adacore.com>
12327
12328 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12329
12330 2011-08-01 Quentin Ochem <ochem@adacore.com>
12331
12332 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12333 heap to compute the result.
12334
12335 2011-08-01 Robert Dewar <dewar@adacore.com>
12336
12337 * atree.ads: Minor reformatting.
12338
12339 2011-08-01 Emmanuel Briot <briot@adacore.com>
12340
12341 * g-expect.adb (Get_Command_Output): Fix memory leak.
12342
12343 2011-08-01 Geert Bosch <bosch@adacore.com>
12344
12345 * cstand.adb (P_Float_Type): New procedure to print the definition of
12346 predefined fpt types.
12347 (P_Mixed_Name): New procedure to print a name using mixed case
12348 (Print_Standard): Use P_Float_Type for printing floating point types
12349 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12350 precision IEEE float.
12351
12352 2011-08-01 Thomas Quinot <quinot@adacore.com>
12353
12354 * sem_ch3.adb: Minor reformatting.
12355
12356 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12357
12358 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12359 the completion of a generic function, insert the new body rather than
12360 rewriting the original.
12361
12362 2011-08-01 Yannick Moy <moy@adacore.com>
12363
12364 * sinfo.ads, errout.ads: Typos in comments.
12365
12366 2011-08-01 Robert Dewar <dewar@adacore.com>
12367
12368 * par-endh.adb: Minor reformatting.
12369
12370 2011-08-01 Robert Dewar <dewar@adacore.com>
12371
12372 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12373 (Pre_Post_Aspects): New subtype.
12374 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12375 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12376 * par-ch7.adb (P_Package): Remove Decl parameter
12377 (P_Package): Handle new syntax for aspects (before IS)
12378 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12379 new aspect syntax
12380 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12381 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12382 (P_Package): Remove Decl parameter
12383 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12384 aspects
12385 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12386 specs
12387 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12388 * sinfo.ads: Document new syntax for aspects in packages etc.
12389 * sprint.adb: Handle new syntax of aspects before IS in package
12390
12391 2011-08-01 Thomas Quinot <quinot@adacore.com>
12392
12393 * atree.ads: Minor reformatting.
12394 * sem_prag.adb: Minor reformatting.
12395
12396 2011-08-01 Robert Dewar <dewar@adacore.com>
12397
12398 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12399 case expr alternative.
12400
12401 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12402
12403 * sem_ch12.adb: Fix typo.
12404
12405 2011-08-01 Geert Bosch <bosch@adacore.com>
12406
12407 * sem_prag.adb (Check_No_Link_Name): New procedure.
12408 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12409 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12410 instead of Standard_Long_Long_Float_Size global. Preparation for
12411 eventual removal of per type constants.
12412 * exp_util.ads (Get_Stream_Size): New function returning the stream
12413 size value of subtype E.
12414 * exp_util.adb (Get_Stream_Size): Implement new function.
12415 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12416 function.
12417 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12418 * einfo.adb:
12419 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12420
12421 2011-08-01 Geert Bosch <bosch@adacore.com>
12422
12423 * cstand.adb: Fix comments.
12424 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12425 count of arguments.
12426
12427 2011-08-01 Robert Dewar <dewar@adacore.com>
12428
12429 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12430
12431 2011-08-01 Geert Bosch <bosch@adacore.com>
12432
12433 * atree.ads: Fix comment.
12434
12435 2011-08-01 Robert Dewar <dewar@adacore.com>
12436
12437 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12438 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12439 * par.adb: Add with for Namet.Sp.
12440 * par-tchk.adb: Minor reformatting.
12441
12442 2011-08-01 Vincent Celier <celier@adacore.com>
12443
12444 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12445 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12446 of the init procedure of a SAL.
12447 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12448 New procedure.
12449
12450 2011-08-01 Thomas Quinot <quinot@adacore.com>
12451
12452 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12453 reformatting.
12454
12455 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12456
12457 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12458
12459 2011-08-01 Thomas Quinot <quinot@adacore.com>
12460
12461 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12462 conformant with its spec (return True only for types that have
12463 an overriding Initialize primitive operation that prevents them from
12464 having preelaborable initialization).
12465 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12466 initialization for controlled types in Ada 2005 or later mode.
12467
12468 2011-08-01 Robert Dewar <dewar@adacore.com>
12469
12470 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12471 Postcondition.
12472 (Same_Aspect): New function.
12473 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12474 Type_Invariant, Precondition, Postcondition.
12475 * snames.ads-tmpl: Add Name_Type_Invariant.
12476
12477 2011-08-01 Robert Dewar <dewar@adacore.com>
12478
12479 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12480 here.
12481 (Freeze_All_Ent): Fix error in handling inherited aspects.
12482 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12483 already analyzed, but don't skip entire processing of a declaration,
12484 that's wrong in some cases of declarations being rewritten.
12485 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12486 Don't delay for integer, string literals
12487 Treat predicates in usual manner for delay, remove special case code,
12488 not needed.
12489 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12490 (Build_Predicate_Function): Update saved expression in aspect
12491 (Build_Invariant_Procedure): Update saved expression in aspect
12492 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12493 of replacement of discriminant references if the reference is simple.
12494
12495 2011-08-01 Robert Dewar <dewar@adacore.com>
12496
12497 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12498 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12499 Static_Predicate and Dynamic_Predicate.
12500 (Build_Predicate_Function): Add processing for Static_Predicate
12501 and Dynamic_Predicate.
12502 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12503 (From_Static_Predicate): New flag
12504 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12505
12506 2011-08-01 Robert Dewar <dewar@adacore.com>
12507
12508 * usage.adb: Documentation cleanup for Ada version modes in usage.
12509 * expander.adb: Minor reformatting.
12510
12511 2011-08-01 Robert Dewar <dewar@adacore.com>
12512
12513 * atree.ads: Minor comment fix.
12514 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12515 a-witeio.ads, sem_prag.adb: Minor reformatting.
12516
12517 2011-08-01 Doug Rupp <rupp@adacore.com>
12518
12519 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12520 pointers. Use descrip.h header file for convenience. Add some
12521 comments.
12522
12523 2011-08-01 Robert Dewar <dewar@adacore.com>
12524
12525 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12526 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12527 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12528 New procedure.
12529 (Check_Aspect_At_End_Of_Declarations): New procedure
12530 (Analye_Aspect_Specification): Minor changes for above procedures
12531 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12532 specification node as well.
12533
12534 2011-08-01 Pascal Obry <obry@adacore.com>
12535
12536 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12537 Windows files. Use GetFilesAttributes() in this case to check for file
12538 existence instead of returning with an error code.
12539
12540 2011-08-01 Vincent Celier <celier@adacore.com>
12541
12542 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12543 High is above Source length.
12544
12545 2011-08-01 Robert Dewar <dewar@adacore.com>
12546
12547 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12548
12549 2011-08-01 Robert Dewar <dewar@adacore.com>
12550
12551 * aspects.ads (Boolean_Aspects): New subtype.
12552 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12553 for derived types in cases where the parent type and derived type have
12554 aspects.
12555 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12556 with aspects when parent type also has aspects.
12557 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12558 boolean expression at this point).
12559 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12560 accordance with final decision on the Ada 2012 feature.
12561 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12562
12563 2011-08-01 Matthew Heaney <heaney@adacore.com>
12564
12565 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12566
12567 2011-08-01 Pascal Obry <obry@adacore.com>
12568
12569 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12570 Fix Replace_Slice when High is above current string size.
12571 (Replace_Slice): Fix DL computation when High is above current
12572 string length.
12573
12574 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12575
12576 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12577
12578 2011-08-01 Matthew Heaney <heaney@adacore.com>
12579
12580 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12581 of node.
12582
12583 2011-08-01 Pascal Obry <obry@adacore.com>
12584
12585 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12586 reformatting.
12587
12588 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12589
12590 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12591 access to protected subprograms in generic bodies.
12592 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12593 protected type, indicate that the convention of the subprogram is
12594 Convention_Protected, because it may be used in subsequent declarations
12595 within the protected declaration.
12596
12597 2011-08-01 Vincent Celier <celier@adacore.com>
12598
12599 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12600 and "final" procedures when the name of the library is "ada", to avoid
12601 duplicate symbols "adainit" and "adafinal" in executables.
12602
12603 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12604
12605 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12606 quantified expression that appears within a postcondition and uses the
12607 Ada2012 'Result attribute.
12608
12609 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12610
12611 * init.c (__gnat_error_handler): Cast reason to int.
12612 (__gnat_install_handler): Explain sa_sigaction use.
12613
12614 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12615
12616 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12617 subprogram has copy-in copy-out parameters, try to promote the mode of
12618 the return type if it is passed in registers.
12619
12620 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12621
12622 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12623 left operand as addressable.
12624
12625 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12626
12627 * gcc-interface/gigi.h (build_function_stub): Remove.
12628 (build_return_expr): Likewise.
12629 (convert_vms_descriptor): Declare.
12630 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12631 (build_function_stub): Move to...
12632 * gcc-interface/utils2.c (build_return_expr): Move to...
12633 * gcc-interface/trans.c (build_function_stub): ...here.
12634 (build_return_expr): ...here.
12635 (Subprogram_Body_to_gnu): Add local variable for language_function.
12636 Disconnect the parameter attributes cache, if any, once done with it.
12637 Call end_subprog_body only after setting the end_locus.
12638 Build the stub associated with the function, if any, at the very end.
12639 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12640 variables and streamline control flow.
12641
12642 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12643
12644 PR ada/49819
12645 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12646 g-trasym-dwarf.adb.
12647
12648 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12649
12650 PR bootstrap/49794
12651 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12652 Assign to act.sa_sigaction.
12653 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12654 current->return_address to char * before arithmetic.
12655
12656 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12657
12658 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12659 Correct argument types.
12660 Extract code from reason.
12661 (__gnat_install_handler): Assign to act.sa_sigaction.
12662
12663 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12664
12665 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12666 (GNAT1_OBJS): ...here.
12667
12668 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12669
12670 PR ada/48711
12671 * g-socthi-mingw.adb (Fill): Fix formatting.
12672
12673 * gcc-interface/gigi.h: Move around comment.
12674
12675 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12676
12677 PR ada/46350
12678 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12679
12680 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12681
12682 PR ada/48711
12683 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12684
12685 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12686
12687 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12688 range comparison if Pmode is SImode.
12689
12690 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12691 Eric Botcazou <ebotcazou@adacore.com>
12692
12693 * adadecode.c: Wrap up in extern "C" block.
12694 * adadecode.h: Likewise.
12695 * adaint.c: Likewise. Remove 'const' keyword.
12696 * adaint.h: Likewise.
12697 * argv.c: Likewise.
12698 * atree.h: Likewise.
12699 * cio.c: Likewise.
12700 * cstreams.c: Likewise.
12701 * env.c: Likewise.
12702 * exit.c: Likewise.
12703 * fe.h: Likewise.
12704 * final.c: Likewise.
12705 * init.c: Likewise.
12706 * initialize.c: Likewise.
12707 * link.c: Likewise.
12708 * namet.h: Likewise.
12709 * nlists.h: Likewise.
12710 * raise.c: Likewise.
12711 * raise.h: Likewise.
12712 * repinfo.h: Likewise.
12713 * seh_init.c: Likewise.
12714 * targext.c: Likewise.
12715 * tracebak.c: Likewise.
12716 * uintp.h: Likewise.
12717 * urealp.h: Likewise.
12718 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12719 * xsinfo.adb: Likewise.
12720 * xsnamest.adb: Likewise.
12721 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12722 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12723 * gcc-interface/misc.c: Likewise.
12724 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12725 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12726 ada/targext.o here...
12727 (GNAT_ADA_OBJS): ...and not here.
12728 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12729 (GNATBIND_OBJS): Reorder.
12730
12731 2011-07-07 Richard Henderson <rth@redhat.com>
12732
12733 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12734 dwarf2out_frame_init.
12735
12736 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12737
12738 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12739
12740 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12741
12742 PR target/39150
12743 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12744
12745 2011-07-06 Richard Guenther <rguenther@suse.de>
12746
12747 * gcc-interface/misc.c (gnat_init): Merge calls to
12748 build_common_tree_nodes and build_common_tree_nodes_2.
12749 Re-initialize boolean_false_node.
12750
12751 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12752 Olivier Hainque <hainque@adacore.com>
12753 Nicolas Setton <setton@adacore.com>
12754
12755 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12756 the type according to the ARTIFICIAL_P parameter.
12757 (create_type_decl): Likewise.
12758 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12759
12760 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12761
12762 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12763 (gnatbind): Likewise.
12764
12765 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12766
12767 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12768
12769 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12770
12771 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12772 local variable throughout. Remove useless call to Base_Type.
12773 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12774 Take it also into account for the volatileness of the field. Set the
12775 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12776
12777 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12778
12779 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12780 on a dereference built for a by-ref object if it has an address clause.
12781
12782 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12783
12784 * einfo.ads (Address_Taken): Document use for the second argument of
12785 Asm_Input and Asm_Output attributes.
12786 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12787 argument is an entity name, then set Address_Taken on it.
12788 <Attribute_Asm_Output>: Likewise.
12789 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12790 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12791 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12792 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12793
12794 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12795
12796 PR middle-end/46500
12797 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12798
12799 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12800
12801 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12802 (ada/utils.o): Update dependencies.
12803 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12804 ../../../libcpp/libcpp.a.
12805 * gcc-interface/utils.c: Include common/common-target.h.
12806 (process_attributes): Use targetm_common.have_named_sections.
12807
12808 2011-06-07 Richard Guenther <rguenther@suse.de>
12809
12810 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12811 set_sizetype.
12812
12813 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12814
12815 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12816 TREE_THIS_NOTRAP flag.
12817
12818 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12819
12820 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12821 Fix thinko.
12822
12823 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12824
12825 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12826 constants whose full view has discriminants specially.
12827
12828 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12829
12830 * gcc-interface/utils.c: Include diagnostic.h.
12831 (gnat_write_global_declarations): Output debug information for all
12832 global type declarations before finalizing the compilation unit.
12833 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12834
12835 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12836
12837 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12838
12839 2011-05-25 Kai Tietz <ktietz@redhat.com>
12840
12841 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12842 initialization instead of const/none-const pointer assignment.
12843
12844 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12845
12846 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12847 $(EXTRA_GNAT1_OBJS).
12848 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12849 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12850 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12851 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12852 libcommon-target.a instead of prefix.o.
12853
12854 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12855
12856 PR ada/49097
12857 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12858
12859 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12860
12861 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12862 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12863 instead of version.o.
12864
12865 2011-05-18 Kai Tietz <ktietz@redhat.com>
12866
12867 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12868 boolean_false_node instead of integer_zero_node.
12869 (convert_with_check): Likewise.
12870 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12871
12872 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12873
12874 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12875 type of the parameter is an unconstrained array, convert the actual to
12876 the type of the formal in the In Out and Out cases as well.
12877
12878 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12879
12880 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12881 call build_function_type_array or build_varargs_function_type_array
12882 instead.
12883 (create_subprog_type): Don't call build_function_type; call
12884 build_function_type_vec instead.
12885
12886 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12887
12888 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12889 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12890 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12891
12892 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12893
12894 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12895
12896 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12897 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12898
12899 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12900
12901 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12902
12903 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12904
12905 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12906 instead of accessing TYPE_ARG_TYPES directly.
12907 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12908
12909 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12910
12911 PR ada/48844
12912 * gcc-interface/gigi.h (get_variant_part): Declare.
12913 * gcc-interface/decl.c (get_variant_part): Make global.
12914 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12915 types have the same constant size, are record types and T1 has a
12916 variant part while T2 doesn't.
12917
12918 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12919
12920 * gcc-interface/utils.c (begin_subprog_body): Do not call
12921 get_pending_sizes.
12922 (end_subprog_body): Likewise.
12923
12924 2011-05-04 Richard Guenther <rguenther@suse.de>
12925
12926 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12927 int_const_binop.
12928 (pos_to_constructor): Likewise.
12929
12930 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12931 Eric Botcazou <ebotcazou@adacore.com>
12932
12933 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12934 of build_function_type. Adjust calls to...
12935 (build_raise_check): ...this. Do not take a void_tree parameter.
12936 Call build_function_type_list instead of build_function_type.
12937 Fix head comment and swap couple of conditional blocks.
12938
12939 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12940
12941 * gnatvsn.ads (Library_Version): Bump to 4.7.
12942 (Current_Year): Bump to 2011.
12943
12944 2011-04-29 Michael Matz <matz@suse.de>
12945
12946 * gcc-interface/misc.c (gnat_handle_option): Set
12947 warn_maybe_uninitialized.
12948
12949 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12950
12951 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12952 the Watson/McCabe paper.
12953
12954 2011-04-23 Jim Meyering <meyering@redhat.com>
12955
12956 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12957
12958 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12959
12960 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12961 onto the new type.
12962
12963 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12964
12965 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12966 parameter.
12967 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12968 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12969 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12970 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12971 <all>: Do not set flags on the reused DECL node coming from an alias.
12972 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12973 don't need debug info here...
12974 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12975 (gigi): Adjust calls to create_subprog_decl.
12976 (build_raise_check): Likewise.
12977 (establish_gnat_vms_condition_handler): Likewise.
12978 (Compilation_Unit_to_gnu): Likewise.
12979 (gnat_to_gnu): Likewise.
12980
12981 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12982
12983 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12984 (NO_REORDER_ADAFLAGS): New variable.
12985 (EXTRA_GNATTOOLS): Always define.
12986 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12987 Clean up and adjust list of files compiled with special options.
12988 * gcc-interface/Make-lang.in: Likewise.
12989 (ada/decl.o): Cosmetical change.
12990 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12991
12992 2011-04-20 Jim Meyering <meyering@redhat.com>
12993
12994 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12995
12996 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12997
12998 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12999 $(CFLAGS) on the link line.
13000
13001 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13002
13003 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13004 padded type built for the return type if it is unconstrained.
13005
13006 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13007
13008 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13009
13010 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13011
13012 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13013 before calling TREE_CHAIN.
13014 * gcc-interface/misc.c (gnat_init_ts): New function.
13015 (LANG_HOOKS_INIT_TS): Define.
13016
13017 2011-04-12 Martin Jambor <mjambor@suse.cz>
13018
13019 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13020 instead of cgraph_node.
13021
13022 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13023
13024 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13025 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13026 mechanism.
13027
13028 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13029
13030 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13031 of aggregate types that contain a placeholder.
13032
13033 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13034
13035 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13036 TYPE_ARG_TYPES.
13037 (handle_type_generic_attribute): Likewise.
13038
13039 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13040
13041 PR ada/47163
13042 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13043
13044 2011-04-04 Kai Tietz <ktietz@redhat.com>
13045
13046 PR ada/47163
13047 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13048 to flag value.
13049
13050 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13051
13052 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13053 type case, do not strip a padding type around the array type.
13054
13055 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13056
13057 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13058 types.
13059
13060 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13061
13062 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13063 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13064 code for -feliminate-unused-debug-types.
13065 (gnat_post_options): Likewise.
13066
13067 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13068
13069 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13070 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13071 distinct copy.
13072
13073 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13074
13075 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13076 DECL_ARTIFICIAL flag on enumeration types.
13077
13078 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13079
13080 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13081 fat pointer types artificial unconditionally.
13082 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13083 isn't artificial.
13084
13085 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13086
13087 * gcc-interface/gigi.h (get_dummy_type): Declare.
13088 (build_dummy_unc_pointer_types): Likewise.
13089 (finish_fat_pointer_type): Likewise.
13090 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13091 fat pointer type has been built, complete it in place.
13092 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13093 and thin pointers. Remove useless variable.
13094 (finish_fat_pointer_type): Make global and move to...
13095 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13096 (get_dummy_type): New function.
13097 (build_dummy_unc_pointer_types): Likewise.
13098 (gnat_pushdecl): Propage the name to the anonymous variants only.
13099 (update_pointer_to): Only adjust the pointer types in the unconstrained
13100 array case.
13101
13102 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13103
13104 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13105 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13106 if this is a Taft amendment type and the full declaration is available.
13107 * gcc-interface/trans.c (process_type): Likewise.
13108 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13109 (process_freeze_entity): Likewise.
13110 * gcc-interface/utils.c (dummy_global): New static variable.
13111 (gnat_write_global_declarations): If there are types declared as used
13112 at the global level, insert them in the global hash table.
13113
13114 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13115
13116 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13117 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13118 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13119 copy.
13120 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13121 flag of the type accordingly.
13122 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13123
13124 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13125
13126 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13127 finalizing types when updating the pointers to the designated type.
13128 <all>: Finalize the deferred types even if we didn't defer processing
13129 of incomplete types in this invocation.
13130
13131 2011-04-01 Olivier Hainque <hainque@adacore.com>
13132 Nicolas Setton <setton@adacore.com>
13133 Eric Botcazou <ebotcazou@adacore.com>
13134
13135 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13136 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13137
13138 2011-03-28 Kai Tietz <ktietz@redhat.com>
13139
13140 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13141 Windows targets.
13142 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13143 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13144
13145 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13146
13147 2011-03-28 Tristan Gingold <gingold@adacore.com>
13148
13149 PR ada/44431
13150 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13151 Use ada output of gnatbind.
13152 (ada/b_gnatb.adb): Ditto.
13153 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13154 (ada.mostlyclean, ada.stage1)
13155 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13156 (ada.stagefeedback): Adjust.
13157 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13158 Use ada output of gnatbind.
13159 (b_gnatm.adb): Ditto.
13160 (b_gnatl.o, b_gnatm.o): New rules.
13161
13162 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13163
13164 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13165 for the padded type built to support a specified size or alignment.
13166
13167 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13168
13169 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13170 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13171 unconditionally to the end of the unit when the designated type is
13172 limited_with'ed.
13173 <all>: Rename local variable. Attempt to un-defer types only and do it
13174 for limited_with'ed types as well.
13175 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13176 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13177 consistently and remove redundant call to finalize_from_with_types.
13178
13179 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13180
13181 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13182 subprograms without a previous spec declared in the same unit.
13183 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13184 subprograms at the end of the unit instead of at the beginning.
13185 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13186 isn't public for the special handling of non-inline functions nested
13187 inside inline external functions.
13188
13189 2011-03-25 Jeff Law <law@redhat.com>
13190
13191 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13192
13193 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13194
13195 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13196 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13197 to compute Set_Size_Depends_On_Discriminant.
13198 (Layout_Type): Call it on array types in back-end layout mode.
13199 * sem_util.adb (Requires_Transient_Scope): Return true for array
13200 types only if the size depends on the value of discriminants.
13201 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13202 type if the RHS is a call to a function that returns an unconstrained
13203 type with default discriminant.
13204
13205 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13206
13207 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13208 non-conversion to the nominal result type at the end.
13209
13210 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13211
13212 * gcc-interface/trans.c (create_temporary): New function taken from...
13213 (create_init_temporary): ...here. Call it.
13214 (call_to_gnu): Create the temporary for the return value early, if any.
13215 Create it for a function with copy-in/copy-out parameters if there is
13216 no target; in other cases of copy-in/copy-out, use another temporary.
13217 Push the new binding level lazily. Add and rename local variables.
13218
13219 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13220
13221 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13222 error message.
13223 (set_rm_size): Likewise.
13224
13225 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13226
13227 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13228 for the padded type built in order to support a specified alignment.
13229 Fix incorrect formatting.
13230
13231 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13232
13233 PR bootstrap/48216
13234 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13235
13236 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13237
13238 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13239 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13240 to the end of the list. Adjust recursive call. Rename local variable.
13241 If REORDER is true, reorder components of the record type.
13242 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13243 components_to_record and adjust the parameter list.
13244
13245 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13246
13247 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13248 disabled, use the variable for bounds of loop iteration scheme.
13249
13250 2011-03-21 Kai Tietz <ktietz@redhat.com>
13251
13252 PR target/12171
13253 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13254
13255 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13256
13257 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13258 out whether the expression is read-only. Short-circuit placeholder
13259 case and rename a couple of local variables.
13260
13261 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13262
13263 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13264 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13265 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13266 (convert): Deal with conversions from a smaller form type specially.
13267
13268 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13269
13270 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13271 its argument, except for the special -I- switch.
13272
13273 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13274
13275 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13276 "Ada Issues".
13277
13278 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13279
13280 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13281
13282 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13283
13284 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13285 GNAT_FORMAL.
13286 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13287 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13288 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13289 Do not generate the check directly, instead instantiate the template
13290 check present in the descriptor.
13291 (make_descriptor_field): Move around.
13292 (build_vms_descriptor32): Build a template check in the POINTER field.
13293 (build_vms_descriptor): Remove useless suffixes.
13294 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13295
13296 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13297
13298 PR bootstrap/47467
13299 * targext.c: Include target files if IN_RTS is defined.
13300
13301 2011-01-26 Richard Guenther <rguenther@suse.de>
13302
13303 PR bootstrap/47467
13304 * targext.c: Include config.h.
13305 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13306 dependency.
13307
13308 2011-01-04 Pascal Obry <obry@adacore.com>
13309 Eric Botcazou <ebotcazou@adacore.com>
13310
13311 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13312
13313 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13314
13315 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13316 end-of-case on the end label and its associated gotos, if any.
13317
13318 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13319
13320 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13321 expressions of the parameter cache within the statement group of
13322 the CICO mechanism.
13323
13324 2011-01-04 Olivier Hainque <hainque@adacore.com>
13325 Eric Botcazou <ebotcazou@adacore.com>
13326
13327 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13328 (set_end_locus_from_node): New function.
13329 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13330 make and the function end_locus.
13331 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13332 for the elaboration subprogram.
13333 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13334 set the end_locus of the expression as well.
13335
13336 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13337
13338 PR ada/47131
13339 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13340 variables that are referenced in exception handlers volatile.
13341
13342
13343 \f
13344 Copyright (C) 2011 Free Software Foundation, Inc.
13345
13346 Copying and distribution of this file, with or without modification,
13347 are permitted in any medium without royalty provided the copyright
13348 notice and this notice are preserved.