1 2011-09-01 Vincent Celier <celier@adacore.com>
3 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
6 2011-09-01 Nicolas Roche <roche@adacore.com>
8 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
9 on VxWorks in kernel mode.
11 2011-09-01 Jose Ruiz <ruiz@adacore.com>
13 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
14 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
15 directly the bit array.
16 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
17 the linux macros with the same name.
18 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
19 wrappers around the CPU_ZERO and CPU_SET linux macros.
21 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
23 * exp_ch7.adb (Find_Insertion_List): Removed.
24 (Process_Transient_Objects): Insert the declarations of the hook
25 access type and the hook object before the associated transient object.
27 2011-09-01 Jose Ruiz <ruiz@adacore.com>
29 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
30 package System.Aux_Dec when using restricted run-time libraries which
31 do not have this package.
33 2011-09-01 Tristan Gingold <gingold@adacore.com>
35 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
37 2011-09-01 Bob Duff <duff@adacore.com>
39 * sem_attr.adb (Analyze_Access_Attribute): Do not call
40 Kill_Current_Values for P'Unrestricted_Access, where P is library level
42 2011-09-01 Thomas Quinot <quinot@adacore.com>
44 * exp_ch5.adb: Minor reformatting
45 * gnat_ugn.texi: Fix minor typos.
46 * gcc-interface/Make-lang.in: Update dependencies.
48 2011-09-01 Robert Dewar <dewar@adacore.com>
50 * inline.adb, sem_aggr.adb: Minor reformatting.
52 2011-09-01 Ed Schonberg <schonberg@adacore.com>
54 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
56 2011-09-01 Robert Dewar <dewar@adacore.com>
58 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
60 2011-09-01 Bob Duff <duff@adacore.com>
62 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
63 body" the same as "in inlined body", because visibility shouldn't
66 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
68 * inline.adb (Add_Inlined_Body): Refine previous change.
70 2011-09-01 Gary Dismukes <dismukes@adacore.com>
72 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
73 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
74 Test for case where call
75 initializes an object of a return statement before testing for
76 a constrained call, to ensure that all such cases get handled
77 by simply passing on the caller's parameters. Also, in that
78 case call Needs_BIP_Alloc_Form to determine whether to pass on
79 the BIP_Alloc_Form parameter of the enclosing function rather
80 than testing Is_Constrained. Add similar tests for the return
81 of a BIP call to later processing to ensure consistent handling.
82 (Needs_BIP_Alloc_Form): New utility function.
83 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
84 a BIP_Alloc_Form formal with call to new utility function
87 2011-09-01 Pascal Obry <obry@adacore.com>
89 * prj-part.adb: Minor reformatting.
91 2011-09-01 Vincent Celier <celier@adacore.com>
93 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
94 half character in the unit name.
96 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
98 * exp_ch4.adb: Minor code and comment reformatting.
100 2011-09-01 Thomas Quinot <quinot@adacore.com>
102 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
103 for Is_Limited_Type and Is_Tagged_Type in condition checking
104 for by-reference type.
105 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
106 subprograms may have a completion because of a previous
107 Inline_Always clause, but the enclosing package must be marked
108 inlined for the subprogram body to become visible to the backend.
110 2011-09-01 Thomas Quinot <quinot@adacore.com>
112 * sem_aux.adb, exp_ch4.adb: Minor reformatting
114 2011-09-01 Pascal Obry <obry@adacore.com>
116 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
118 2011-09-01 Ed Schonberg <schonberg@adacore.com>
120 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
121 the formals of a subprogram stub that acts as a spec.
123 2011-09-01 Ed Schonberg <schonberg@adacore.com>
125 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
126 type, declare a renaming for it, not an object declaration.
128 2011-09-01 Yannick Moy <moy@adacore.com>
130 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
131 Ignore_Errors to ignore failures to read ALI files when True.
133 2011-09-01 Javier Miranda <miranda@adacore.com>
135 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
136 constructor calls associated with non-tagged record types.
138 2011-09-01 Robert Dewar <dewar@adacore.com>
140 * g-socthi-vms.adb: Minor reformatting.
142 2011-09-01 Nicolas Roche <roche@adacore.com>
144 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
145 in order to avoid impact of imcompatible changes.
146 * cstreams.c: Likewise
150 2011-09-01 Yannick Moy <moy@adacore.com>
152 * lib-writ.adb (Write_With_Lines): Always output complete information
153 on "with" line in Alfa mode, as this is required by formal verification
156 2011-09-01 Tristan Gingold <gingold@adacore.com>
158 * g-socthi-vms.adb: Add comments.
160 2011-09-01 Pascal Obry <obry@adacore.com>
162 * prj.ads: Minor reformatting.
164 2011-09-01 Vincent Celier <celier@adacore.com>
166 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
167 exceptions in the config pragmas file.
169 2011-09-01 Tristan Gingold <gingold@adacore.com>
171 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
173 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
175 * exp_ch7.adb (Find_Insertion_List): New routine.
176 (Process_Transient_Objects): Add code to handle the abnormal
177 finalization of a controlled transient associated with a subprogram
178 call. Since transients are cleaned up right after the associated
179 context, an exception raised during a subprogram call may bypass the
182 2011-09-01 Robert Dewar <dewar@adacore.com>
184 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
187 2011-09-01 Robert Dewar <dewar@adacore.com>
189 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
191 2011-09-01 Robert Dewar <dewar@adacore.com>
193 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
195 2011-09-01 Thomas Quinot <quinot@adacore.com>
197 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
198 GNATRTL_NONTASKING_OBJS.
200 2011-09-01 Robert Dewar <dewar@adacore.com>
202 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
203 possibility of this flag being set for formals in Ada 2012 mode.
204 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
206 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
208 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
210 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
213 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
215 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
216 insertion node in a tree of nested Expression_With_Actions nodes.
217 (Process_Transient_Object): In the case where a complex if statement
218 has been converted into nested Expression_With_Actions nodes, the
219 "hook" object and the associated access type must be inserted before
220 the top most Expression_With_Actions.
222 2011-09-01 Robert Dewar <dewar@adacore.com>
224 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
225 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
227 2011-09-01 Ed Schonberg <schonberg@adacore.com>
229 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
231 2011-09-01 Jose Ruiz <ruiz@adacore.com>
233 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
235 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
236 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
237 in a similar way as we do for the Priority or Dispatching_Domain aspect.
238 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
239 Dispatching_Domains_Frozen): Move this local data to package
240 System.Tasking because with the CPU aspect we need to have access
241 to this data when creating the task in System.Tasking.Stages.Create_Task
242 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
243 Move these variables from the body of
244 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
245 we need to have access to this data when creating the task in
246 System.Tasking.Stages.Create_Task.
247 * s-taskin.adb (Initialize): Signal the allocation of the environment
248 task to a CPU, if any, so that we know whether the CPU can be
249 transferred to a different dispatching domain.
250 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
251 is being allocated belongs to the dispatching domain where the task
252 lives. Signal the allocation of the task to a CPU, if any, so that we
253 know whether the CPU can be transferred to a different dispatching
256 2011-09-01 Ed Schonberg <schonberg@adacore.com>
258 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
259 attributes Same_Storage and Overlaps_Storage.
261 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
263 * exp_strm.adb: Remove with and use clause for Opt.
264 (Build_Array_Input_Function): Remove the version-dependent generation
265 of the return statement. The Ada 2005 tree is now the default.
267 2011-09-01 Yannick Moy <moy@adacore.com>
269 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
270 it is never empty when compiling in Alfa mode.
272 2011-09-01 Robert Dewar <dewar@adacore.com>
274 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
275 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
276 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
277 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
279 2011-09-01 Matthew Heaney <heaney@adacore.com>
281 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
282 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
283 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
284 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
285 unbounded queue container.
286 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
287 bounded queue container.
288 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
289 unbounded priority queue container.
290 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
291 bounded priority queue container.
293 2011-08-31 Pascal Obry <obry@adacore.com>
295 * a-direct.adb: Do not try to create an UNC path on Windows.
296 (Create_Path): Skip leading computer name in UNC path if any.
298 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
300 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
301 version-dependent generation of the return statement. The Ada 2005 tree
304 2011-08-31 Thomas Quinot <quinot@adacore.com>
306 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
307 types Stream_Element_Offset and Storage_Offset have a different native
308 type depending on whether the platform is 32 or 64 bits. When
309 exchanging them, always convert to 64 bits.
311 2011-08-31 Yannick Moy <moy@adacore.com>
313 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
314 --force-alfa to gnat2why.
316 2011-08-31 Ed Schonberg <schonberg@adacore.com>
318 * sem_ch12.adb (Save_References): If the node has aspects, save
319 references within the corresponding expressions in a separate step,
320 because the aspects are not directly in the tree for the declaration
321 to which they belong.
323 2011-08-31 Arnaud Charlet <charlet@adacore.com>
325 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
326 in CodePeer mode, since representation clauses are partially ignored.
327 * gcc-interface/Make-lang.in: Update dependencies.
329 2011-08-31 Jose Ruiz <ruiz@adacore.com>
331 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
332 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
333 to any dispatching domain.
335 2011-08-31 Thomas Quinot <quinot@adacore.com>
337 * exp_ch4.adb: Minor reformatting.
339 2011-08-31 Bob Duff <duff@adacore.com>
341 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
342 on nodes for which it is not defined.
343 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
346 2011-08-31 Bob Duff <duff@adacore.com>
348 * sem_ch3.adb (Process_Full_View): Disable legality check if
349 In_Instance, to avoid spurious errors.
350 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
351 if In_Instance, to avoid spurious errors.
353 2011-08-31 Pascal Obry <obry@adacore.com>
355 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
356 directory speparators.
357 (Compose): Use Dir_Seps to handle both forms.
358 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
360 (Extension): Use Dir_Seps to handle both forms.
362 2011-08-31 Pascal Obry <obry@adacore.com>
364 * prj-conf.adb: Minor reformatting.
366 2011-08-31 Jose Ruiz <ruiz@adacore.com>
368 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
369 dispatching domain aspect.
370 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
372 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
373 Dispatching_Domain aspect in a similar way as we do for the Priority
375 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
376 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
378 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
379 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
380 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
381 Dispatching_Domain and add it to the task definition.
382 (Sig_Flags): Add Pragma_Dispatching_Domain.
383 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
384 support to find the types Dispatching_Domain and
385 Dispatching_Domain_Access.
386 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
387 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
388 query the availability of a pragma Dispatching_Domain.
389 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
390 the expander to pass the Dispatching_Domain when creating a task.
391 (Name_Dispatching_Domain): Add this new name for a pragma.
392 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
393 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
394 task has been allocated at creation time.
395 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
396 Ravenscar is always null.
397 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
398 the task has been allocated at creation time.
399 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
400 a specific dispatching domain.
401 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
402 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
403 and CPU are specified for the task, and the CPU value is not contained
404 within the range of processors for the domain.
406 2011-08-31 Vincent Celier <celier@adacore.com>
408 * make.adb (Original_Gcc) : New constant String_Access.
409 (Gnatmake): For VM targets, do not use VM version of the compiler if
410 --GCC= has been specified.
412 2011-08-31 Thomas Quinot <quinot@adacore.com>
414 * sem_ch5.adb: Minor reformatting.
416 2011-08-31 Ed Schonberg <schonberg@adacore.com>
418 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
421 2011-08-31 Bob Duff <duff@adacore.com>
423 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
424 the access type is private; we don't care about privacy in expansion.
426 2011-08-31 Ed Schonberg <schonberg@adacore.com>
428 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
429 subcomponents tnat may be limited, because they originate in view
430 conflicts. If the original aggregate is legal and the actuals are
431 legal, the aggregate itself is legal.
433 2011-08-31 Matthew Heaney <heaney@adacore.com>
435 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
438 2011-08-31 Ed Schonberg <schonberg@adacore.com>
440 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
443 2011-08-31 Jose Ruiz <ruiz@adacore.com>
445 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
446 Interrupt_Priority aspects, force the analysis of the aspect expression
447 (when building the equivalent pragma). Otherwise, its analysis is done
448 too late, after the task or protected object has been created.
449 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
450 Analyze_Single_Task_Declaration): Remove the code to move the aspects
451 to the object declaration because they are needed in the type
454 2011-08-31 Robert Dewar <dewar@adacore.com>
456 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
457 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
460 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
462 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
463 if the corresponding type is malformed due to restriction violations.
465 2011-08-31 Robert Dewar <dewar@adacore.com>
467 * s-ransee.ads, s-ransee.adb: Minor reformatting.
469 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
471 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
472 would cause the generation of Set_Finalize_Address if the target is a
473 VM and the designated type is not derived from [Limited_]Controlled.
475 2011-08-31 Arnaud Charlet <charlet@adacore.com>
477 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
479 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
480 case of a compilation error.
482 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
484 * init.c (__gnat_error_handler): Standardize the stack overflow or
485 erroneous memory access message.
486 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
487 or erroneous memory access message.
489 2011-08-31 Robert Dewar <dewar@adacore.com>
491 * sem_ch4.adb: Minor reformatting.
492 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
494 2011-08-31 Thomas Quinot <quinot@adacore.com>
496 * scos.ads: Minor documentation clarification.
497 * put_scos.adb: Do not generate SCO unit header line for a unit that
500 2011-08-31 Robert Dewar <dewar@adacore.com>
502 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
504 2011-08-31 Tristan Gingold <gingold@adacore.com>
506 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
507 hold variables between these following subprograms.
508 (Build_Exception_Handler, Build_Object_Declarations,
509 Build_Raise_Statement): Use the above type as parameter.
510 Make the above adjustments.
511 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
513 2011-08-31 Pascal Obry <obry@adacore.com>
515 * projects.texi: Minor reformatting.
517 2011-08-31 Tristan Gingold <gingold@adacore.com>
519 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
520 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
522 2011-08-31 Ed Schonberg <schonberg@adacore.com>
524 * exp_ch5.adb: Minor code cleanup.
525 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
526 prevent cascaded errors.
527 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
528 variable of an iterator specification in current scope.
529 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
530 postconditions on the stack, as they contain no return statements.
532 2011-08-31 Yannick Moy <moy@adacore.com>
534 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
535 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
536 call Qualify_Entity_Names.
537 (Expand_Alfa): call Qualify_Entity_Names in more cases
538 * lib-xref-alfa.adb: Take into account system package.
539 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
540 CodePeer mode in which we are interested in finding bugs even if
541 compiler cannot compile source.
542 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
545 2011-08-31 Gary Dismukes <dismukes@adacore.com>
547 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
548 denoted by the subtype mark to ensure getting the concurrent type in
549 the case where the subtype mark denotes a private subtype of a
550 concurrent type (needed when using -gnatc).
551 (Process_Subtype): For the processing specific to type kinds, case on
552 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
553 subtype denotes a private subtype whose base type is nonprivate (needed
554 for subtypes of private fulfilled by task types when compiling with
557 2011-08-31 Gary Dismukes <dismukes@adacore.com>
559 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
560 late primitives that override interface operations when the full
561 expander is not active, to avoid blowups in Register_Primitive when
562 types don't have associated secondary dispatch tables.
564 2011-08-31 Yannick Moy <moy@adacore.com>
566 * alfa_test.adb: Code clean up.
568 2011-08-31 Marc Sango <sango@adacore.com>
570 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
571 by Comes_From_Source (Original_Node (N)) in order to treat also the
572 nodes which have been rewritten.
573 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
574 explicit dereference and slice violation in spark mode on the nodes
575 coming only from the source code.
577 2011-08-31 Robert Dewar <dewar@adacore.com>
579 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
580 lib-xref-alfa.adb: Minor reformatting.
582 2011-08-31 Matthew Heaney <heaney@adacore.com>
584 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
586 2011-08-31 Javier Miranda <miranda@adacore.com>
588 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
589 only for class-wide subprograms conflicting with entities of concurrent
592 2011-08-31 Matthew Heaney <heaney@adacore.com>
594 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
597 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
599 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
600 general description of the routine.
602 2011-08-31 Ed Schonberg <schonberg@adacore.com>
604 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
607 2011-08-31 Gary Dismukes <dismukes@adacore.com>
609 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
610 check is needed for a left-hand side that is a dereference, and the
611 base type is private without discriminants (whereas the full type does
612 have discriminants), an extra retrieval of the underlying type may be
613 needed in the case where the subtype is a record subtype whose base
614 type is private. Update comments.
616 2011-08-31 Javier Miranda <miranda@adacore.com>
618 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
619 found check if there is a class-wide subprogram covering the primitive.
621 2011-08-31 Yannick Moy <moy@adacore.com>
623 * sem_res.adb: Further cases where full expansion test is needed,
624 rather than expansion test.
626 2011-08-31 Pascal Obry <obry@adacore.com>
628 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
630 2011-08-31 Ed Schonberg <schonberg@adacore.com>
632 * exp_ch5.adb: Handle iterators over derived container types.
634 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
636 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
637 (Has_Anonymous_Master): New routine.
638 (Set_Has_Anonymous_Master): New routine.
639 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
640 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
641 (Current_Anonymous_Master): New routine.
642 (Current_Unit_First_Declaration): Removed.
643 (Current_Unit_Scope): Removed.
644 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
645 their objects on a per-unit heterogeneous finalization master.
647 2011-08-31 Matthew Heaney <heaney@adacore.com>
649 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
652 2011-08-31 Jose Ruiz <ruiz@adacore.com>
654 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
657 2011-08-31 Gary Dismukes <dismukes@adacore.com>
659 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
660 where the actual is an unexpanded call to 'Input.
662 2011-08-31 Yannick Moy <moy@adacore.com>
664 * sem_ch4.adb: Code clean up.
666 2011-08-31 Yannick Moy <moy@adacore.com>
668 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
670 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
672 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
673 and TSS primitive Finalize_Address if finalization is suppressed.
674 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
675 primitive Finalize_Address if finalization is suppressed.
677 2011-08-31 Jose Ruiz <ruiz@adacore.com>
679 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
680 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
681 sure that the underlying task has already been created before trying
682 to change its affinity.
683 (Set_CPU): Use the term processor instead of CPU, as we do in
686 2011-08-31 Vincent Celier <celier@adacore.com>
688 * prj-attr.adb: New Compiler attribute Source_File_Switches.
689 * prj-nmsc.adb (Process_Compiler): Process attribute
690 Source_File_Switches.
691 * prj.ads (Language_Config): New name list component
692 Name_Source_File_Switches.
693 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
695 2011-08-31 Ed Schonberg <schonberg@adacore.com>
697 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
698 discriminated component of an actual, expand at once to prevent
699 ouf-of-order references with generated subtypes.
701 2011-08-31 Yannick Moy <moy@adacore.com>
703 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
704 reference to operator in Alfa xrefs.
706 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
708 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
709 where the parent instance was frozen before the current instance due to
710 the presence of a source body. Update calls to Insert_After_Last_Decl.
711 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
712 Update the comment which illustrates the purpose of the routine.
713 Package instances are now frozen by source bodies which appear after
714 the instance. This ensures that entities coming from within the
715 instance are available for use in the said bodies.
716 (Install_Body): Add code to handle the case where the parent instance
717 was frozen before the current instance due to the presence of a source
718 body. Update calls to Insert_After_Last_Decl.
720 2011-08-31 Jose Ruiz <ruiz@adacore.com>
722 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
724 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
726 2011-08-31 Yannick Moy <moy@adacore.com>
728 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
730 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
731 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
732 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
733 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
734 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
735 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
736 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
737 ALFA in Alfa (we dropped acronym).
738 * einfo.adb (Primitive_Operations): Correctly return list of primitive
739 operations in a case where it returned previously No_Elist.
741 2011-08-31 Robert Dewar <dewar@adacore.com>
743 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
744 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
745 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
746 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
747 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
748 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
751 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
753 * sem_ch12 (Check_Private_View): Revert previous change.
754 * sem_res.adb (Conversion_Check): Do not emit the error message if the
755 conversion is in a generic instance.
757 2011-08-31 Matthew Heaney <heaney@adacore.com>
759 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
760 * a-chtgbo.adb (Free): Allow 0 as index value.
762 2011-08-31 Matthew Heaney <heaney@adacore.com>
764 * a-cborma.adb (Insert): Add comment to explain why no element
767 2011-08-31 Gary Dismukes <dismukes@adacore.com>
769 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
770 spec discriminant is already a concurrent type, in which case just use
771 it, otherwise fetch the Corresponding_Concurrent_Type as before.
773 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
775 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
776 system-linux-mips.ads, system-linux-mipsel.ads,
777 system-linux-mips64el.ads, system-linux-ppc64.ads,
778 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
780 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
782 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
783 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
784 (build_unary_op): Likewise.
786 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
788 * raise-gcc.c: Do not include coretypes.h and tm.h.
789 (setup_to_install): Remove test for compiler macro.
790 * targext.c: Document use for the library.
791 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
793 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
795 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
796 the expression to the nominal type if the latter is a record type with
797 a variant part and the type of the former is a record type without one.
799 2011-08-30 Yannick Moy <moy@adacore.com>
801 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
802 expansion in Alfa mode.
803 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
804 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
806 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
807 * sem_res.adb: Ditto.
808 * gcc-interface/Make-lang.in: Update dependencies.
810 2011-08-30 Thomas Quinot <quinot@adacore.com>
812 * g-socket.ads: Minor documentation adjustment.
814 2011-08-30 Robert Dewar <dewar@adacore.com>
816 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
818 2011-08-30 Yannick Moy <moy@adacore.com>
820 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
821 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
822 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
823 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
824 Revert change which introduced files for "light"
825 expansion, to be replaced by a single file for Alfa expansion.
827 2011-08-30 Robert Dewar <dewar@adacore.com>
829 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
830 Minor code reorg/reformatting.
832 2011-08-30 Yannick Moy <moy@adacore.com>
834 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
835 common shorthand for (Expander_Active and not ALFA_Mode) that can be
836 used for testing full expansion, that is active expansion not in the
837 reduced mode for Alfa
838 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
839 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
840 of the verbose (Expander_Active and not ALFA_Mode)
842 2011-08-30 Tristan Gingold <gingold@adacore.com>
844 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
845 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
846 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
847 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
849 2011-08-30 Gary Dismukes <dismukes@adacore.com>
851 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
852 access conversions to check that the conversion is a rewritten node,
853 rather than just having Comes_From_Source set to False, which wasn't
856 2011-08-30 Robert Dewar <dewar@adacore.com>
858 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
859 g-socket.ads: Minor reformatting.
861 2011-08-30 Thomas Quinot <quinot@adacore.com>
863 * sem_util.adb: Minor reformatting.
865 2011-08-30 Tristan Gingold <gingold@adacore.com>
867 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
868 to be compliant with the ABI.
870 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
872 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
873 of a designated type when the related access type is an actual in an
874 instance. This ensures that the full view of designated type is
875 available when inside the body of the instance.
877 2011-08-30 Ed Schonberg <schonberg@adacore.com>
879 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
880 in a position to be modified, a slice is treated like an indexed
883 2011-08-30 Thomas Quinot <quinot@adacore.com>
885 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
886 field tv_sec in struct timeval.
888 2011-08-30 Yannick Moy <moy@adacore.com>
890 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
891 blocks of code doing full expansion, previously only guarded by
892 Expander_Active, by anding the test that ALFA_Mode is not set
894 2011-08-30 Ed Schonberg <schonberg@adacore.com>
896 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
897 add the function to the list of private dependents, for subsequent
898 legality check on Taft amendment types.
899 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
900 Private_Dependents, as for other incomplete types.
901 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
902 Taft-amendment type is used as the return type of a function.
904 2011-08-30 Javier Miranda <miranda@adacore.com>
906 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
907 which emits an error by a call to a new routine which report the error.
908 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
909 entity does not cover an existing interface.
910 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
912 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
913 protected procedures or entries whose mode is not conformant.
914 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
915 an error by a call to a new routine which report the error.
917 2011-08-30 Robert Dewar <dewar@adacore.com>
919 * gnat_rm.texi: Minor change.
920 * exp_attr_light.adb: Minor reformatting.
922 2011-08-30 Ed Schonberg <schonberg@adacore.com>
924 * sem_ch3.adb: Patch inheritance of aspects in
925 Complete_Private_Subtype, to avoid infinite loop.
927 2011-08-30 Javier Miranda <miranda@adacore.com>
929 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
930 been reported and a subprogram covering an interface primitive is not
931 found then skip generating the internal entity. Done to avoid crashing
933 (Check_Abstract_Overriding): Change text of error of wrong formal of
934 protected subprogram or entry. Done for consistency to emit exactly the
935 same error reported by Check_Synchronized_Overriding. In addition, the
936 error is restricted to protected types (bug found working on AI05-0090)
938 2011-08-30 Yannick Moy <moy@adacore.com>
940 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
941 expansion in Alfa mode.
942 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
943 * exp_light.adb, exp_light.ads: New package defining light expansion.
944 * expander.adb (Expand): Call light expansion in Alfa mode
945 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
947 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
949 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
950 * gnat1drv.adb (Adjust_Global_Switches): Comment
952 2011-08-30 Yannick Moy <moy@adacore.com>
954 * lib-xref-alfa.adb: Minor refactoring.
956 2011-08-30 Yannick Moy <moy@adacore.com>
958 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
960 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
961 expansion in Alfa mode.
962 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
965 2011-08-30 Robert Dewar <dewar@adacore.com>
967 * debug_a.adb: Update comment.
969 2011-08-30 Robert Dewar <dewar@adacore.com>
971 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
972 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
973 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
974 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
976 2011-08-30 Robert Dewar <dewar@adacore.com>
978 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
981 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
983 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
984 Build_Finalization_Master by supplying an insertion node and enclosing
985 scope. In its old version, the call did not generate a finalization
987 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
988 recognize anonymous access-to-controlled components. Rewrite the
989 machinery which creates finalization masters to service anonymous
990 access-to-controlled components of a record type. In its current state,
991 only one heterogeneous master is necessary to handle multiple anonymous
993 (Freeze_Type): Comment reformatting.
994 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
996 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
997 associates TSS primitive Finalize_Address with either the master itself
998 or with the internal hash table depending on the mode of operation of
1001 2011-08-30 Javier Miranda <miranda@adacore.com>
1003 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
1004 interface type then do not generate code to compare this component.
1005 Required since they have no components and their equality operator is
1008 2011-08-30 Steve Baird <baird@adacore.com>
1010 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1011 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1012 returns the (static) accessibility level of the object. Otherwise, the
1013 same as Type_Access_Level.
1014 (Dynamic_Accessibility_Level): New function; given an expression which
1015 could occur as the rhs of an assignment to a saooaaat (i.e., an
1016 expression of an access-to-object type), return the new value for the
1017 saooaaat's associated Extra_Accessibility object.
1018 (Effective_Extra_Accessibility): New function; same as
1019 Einfo.Extra_Accessibility except that object renames are looked through.
1021 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1022 (Dynamic_Accessibility_Level): New function; see sem_util.ads
1024 (Effective_Extra_Accessibility): New function; see sem_util.ads
1026 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1027 (Extra_Accessibility): Update comments.
1028 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1029 except RM_Size field (which is only for types) is unaffected.
1031 (Extra_Accessibility): Expand domain to allow objects, not just formals.
1032 (Set_Extra_Accessibility): Expand domain to allow objects, not just
1034 (Init_Size): Add assertion that we are not trashing the
1035 Extra_Accessibility attribute of an object.
1036 (Init_Size_Align): Add assertion that we are not trashing the
1037 Extra_Accessibility attribute of an object.
1038 (Init_Object_Size_Align): New procedure; see einfo.ads description.
1039 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1040 differently for the type of a (non-library-level) saooaaat depending
1041 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1042 is queried in this set of changes - everything else (in particular,
1043 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1044 driven off of the setting of the Is_Local_Anonymous_Access attribute.
1045 The special treatment of library-level saooaaats is an optimization,
1046 not required for correctnesss. This is based on the observation that the
1047 Ada2012 rules (static and dynamic) for saooaaats turn out to be
1048 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1050 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1051 false for the type of a saooaaat, declare and initialize its
1052 accessibility level object and set the Extra_Accessibility attribute
1053 of the saooaaat to refer to this object.
1054 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1055 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1056 calls to Effective_Extra_Accessibility in order to support
1057 renames of saooaaats.
1058 (Expand_N_Type_Conversion): Add new local function,
1059 Has_Extra_Accessibility, and call it when determining whether an
1060 accessibility check is needed.
1061 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1062 evaluate to True (without raising an exception).
1064 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1065 saooaaat, update its associated Extra_Accessibility object (if
1066 it has one). This includes an accessibility check.
1067 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1068 a saooaaat, update its Extra_Accessibility object too (if it
1070 (Expand_Call): Replace a couple of calls to Type_Access_Level
1071 with calls to Dynamic_Access_Level to handle cases where
1072 passing a literal (any literal) is incorrect.
1073 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1074 checks associated with "Saooaat := Some_Object'Access;"; this must
1075 be rejected if Some_Object is declared in a more nested scope
1077 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1078 assignment to a saooaaat even if Is_Local_Anonymous_Access
1079 returns False for its type (indicating a 2012-style saooaaat).
1081 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1082 (which is only appropriate for objects, not types) with a call
1083 of Init_Object_Size_Align in order to avoid trashing the
1084 Extra_Accessibility attribute of a rename (the two attributes
1087 (Valid_Conversion) Replace six calls to Type_Access_Level with
1088 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1089 Ada2012 non-library-level saooaaat, the former returns library level
1090 while the latter returns the (static) accessibility level of the
1091 saooaaat. A type conversion to the anonymous type of a saooaaat
1092 can only occur as part of an assignment to the saooaaat, so we
1093 know that such a conversion must be in a lhs context, so Deepest
1094 yields the result that we need. If such a conversion could occur,
1095 say, as the operand of an equality operator, then this might not
1096 be right. Also add a test so that static accessibilty checks are
1097 performed for converting to a saooaaat's type even if
1098 Is_Local_Anonymous_Access yields False for the type.
1100 2011-08-30 Javier Miranda <miranda@adacore.com>
1102 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1103 controls generation of a warning associated with late declaration of
1104 dispatching functions. Required to avoid generating spurious
1107 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1109 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1110 return object has an anonymous access type and the function's type is
1111 a named access type.
1112 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1113 conversions on implicit conversions, since such conversions can occur
1114 for anonymous access cases due to expansion. Issue error for attempt
1115 to rename an anonymous expression as an object of a named access type.
1116 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1117 to indicate whether this function should report errors on invalid
1119 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1120 the expression is of an anonymous access type and the expected type is
1121 a named general access type, rewrite the expression as a type
1122 conversion, unless this is an expression of a membership test.
1123 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1124 calling of Error_Msg_N on new formal Report_Errs.
1125 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1126 calling of Error_Msg_NE on new formal Report_Errs.
1127 (Valid_Conversion): Move declaration of this function to the package
1128 spec, to allow calls from membership test processing. For Ada 2012,
1129 enforce legality restrictions on implicit conversions of anonymous
1130 access values to general access types, disallowing such conversions in
1131 cases where the expression has a dynamic accessibility level (access
1132 parameters, stand-alone anonymous access objects, or a component of a
1133 dereference of one of the first two cases).
1134 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1135 in the context of a named general access expected type.
1136 * exp_ch4.adb Add with and use of Exp_Ch2.
1137 (Expand_N_In): Add processing for membership tests applied to
1138 expressions of an anonymous access type. First, Valid_Conversion is
1139 called to check whether the test is statically False, and then the
1140 conversion is expanded to test that the expression's accessibility
1141 level is no deeper than that of the tested type. In the case of
1142 anonymous access-to-tagged types, a tagged membership test is applied
1144 (Tagged_Membership): Extend to handle access type cases, applying the
1145 test to the designated types.
1146 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1147 accessibility level, and the actual is a 'Access applied to a current
1148 instance, pass the accessibility level of the type of the current
1149 instance rather than applying Object_Access_Level to the prefix. Add a
1150 ??? comment, since this level isn't quite right either (will eventually
1151 need to pass an implicit level parameter to init procs).
1153 2011-08-30 Bob Duff <duff@adacore.com>
1155 * s-taskin.ads: Minor comment fix.
1157 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1159 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1160 component and the selector is a dispatching operation, check if it is
1161 a prefixed call before rewriting as a parameterless function call.
1163 2011-08-29 Jakub Jelinek <jakub@redhat.com>
1165 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1166 tsystem.h into $(RTSDIR) instead of rts.
1168 2011-08-29 Robert Dewar <dewar@adacore.com>
1170 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1172 * gcc-interface/Make-lang.in: Update dependencies.
1174 2011-08-29 Yannick Moy <moy@adacore.com>
1176 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1177 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1178 table to hold dereferences.
1179 (Add_ALFA_Xrefs): Take into account dereferences as special
1180 reads/writes to the variable "HEAP".
1181 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1182 (Generate_Dereference): New procedure to store a read/write dereferencew
1184 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1185 the special "HEAP" var.
1186 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1188 * sem_util.adb (Note_Possible_Modification): Store write dereference
1191 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1193 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1194 ensures that the level of the subpool access type is not deeper than
1195 that of the pool object.
1196 * sem_util.adb (Object_Access_Level): Expand to handle defining
1198 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1199 subpool handle name of a rewritten allocator.
1201 2011-08-29 Robert Dewar <dewar@adacore.com>
1203 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1205 2011-08-29 Thomas Quinot <quinot@adacore.com>
1207 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1208 values, we generate multiple triples of parameters in the TypeCode.
1209 Bump Choice_Index for each such triple so that a subsequent default
1210 choice is associated with the correct index in the typecode.
1212 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1214 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1216 (First, Last): Handle properly an iterator over a null container.
1218 2011-08-29 Bob Duff <duff@adacore.com>
1220 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
1221 processing if we run across a node with no Scope. This can happen if
1222 we're with-ing an library-level instance, and that instance got errors
1223 that caused "instantiation abandoned".
1224 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
1225 an exception instead of using Assert, so it won't go into an infinite
1226 loop, even when assertions are turned off.
1228 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1230 * a-coorse.adb: Proper handling of empty ordered sets.
1232 2011-08-29 Johannes Kanig <kanig@adacore.com>
1234 * debug.adb: Add comments.
1236 2011-08-29 Thomas Quinot <quinot@adacore.com>
1238 * a-except.adb, a-except-2005.adb: Minor comment rewording and
1241 2011-08-29 Yannick Moy <moy@adacore.com>
1243 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
1244 declaration for Itypes in Alfa mode.
1246 2011-08-29 Robert Dewar <dewar@adacore.com>
1248 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
1249 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1250 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
1253 2011-08-29 Tristan Gingold <gingold@adacore.com>
1255 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
1257 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
1258 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
1261 2011-08-29 Robert Dewar <dewar@adacore.com>
1263 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1265 2011-08-29 Javier Miranda <miranda@adacore.com>
1267 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1268 renamings of formal subprograms when the actual for a formal type is
1271 2011-08-29 Matthew Heaney <heaney@adacore.com>
1273 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1276 2011-08-29 Matthew Heaney <heaney@adacore.com>
1278 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1279 components of record type.
1280 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1283 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1285 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1286 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1289 2011-08-29 Robert Dewar <dewar@adacore.com>
1291 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1294 2011-08-29 Matthew Heaney <heaney@adacore.com>
1296 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1297 components of record type.
1299 2011-08-29 Bob Duff <duff@adacore.com>
1301 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1302 by the termination handler.
1304 2011-08-29 Yannick Moy <moy@adacore.com>
1306 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1307 created in Alfa mode, instead of inserting artificial declarations of
1308 non-Itypes in the tree.
1309 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1310 know if an Itype has a corresponding declaration, as defined in
1313 2011-08-29 Yannick Moy <moy@adacore.com>
1315 * gnat1drv.adb: Minor rewrite.
1317 2011-08-29 Bob Duff <duff@adacore.com>
1319 * s-tasuti.adb (Make_Passive): Work around race condition in
1320 Make_Independent, which can cause Wait_Count to be zero. So instead of
1321 asserting that Wait_Count > 0, and then decrementing it, decrement it
1322 only if Wait_Count > 0.
1323 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1324 should be nonnegative, so declare them Natural instead of Integer.
1326 2011-08-29 Robert Dewar <dewar@adacore.com>
1328 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1329 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1330 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1331 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1332 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1334 2011-08-29 Tristan Gingold <gingold@adacore.com>
1336 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1338 2011-08-29 Vadim Godunko <godunko@adacore.com>
1340 * s-parint.ads: Minor comment clarification.
1342 2011-08-29 Vincent Celier <celier@adacore.com>
1344 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1345 may be used as identifiers.
1347 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1349 * a-coinho.ads: Minor reformating.
1351 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1353 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1354 container of a derived type.
1356 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1358 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1359 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1361 2011-08-29 Pascal Obry <obry@adacore.com>
1363 * exp_disp.adb: Minor comment fix.
1364 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1365 to avoid warnings when compiling with -Wall.
1366 (Make_Disp_Conditional_Select_Body): Likewise.
1367 (Make_Disp_Timed_Select_Body): Likewise.
1369 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1371 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1372 an entity name, generate reference for it.
1374 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1376 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1378 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1379 the class-wide type.
1380 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1382 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1384 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1385 subtype for an object whose type is an unconstrained union.
1387 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1389 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1390 is allowed in a component definition, by AI95-406.
1392 2011-08-29 Matthew Heaney <heaney@adacore.com>
1394 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1396 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1398 * a-except-2005.adb: Alphabetize all routines.
1399 (Triggered_By_Abort): New routine.
1400 * a-except-2005.ads (Triggered_By_Abort): New routine.
1401 * a-except.adb Alphabetize all routines.
1402 (Triggered_By_Abort): New routine.
1403 * a-except.ads (Triggered_By_Abort): New routine.
1404 * exp_ch7.adb: Update all comments involving the detection of aborts in
1406 (Build_Object_Declarations): Do not generate code to detect the
1407 presence of an abort at the start of finalization code, use a runtime
1409 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1411 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1412 allocate a task on a subpool.
1413 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1414 The flag disables all actions related to the maintenance of
1415 Finalize_Address_Table when subpools are not in use.
1416 (Allocate_Any_Controlled): Signal the machinery that subpools are in
1418 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1419 performs costly task locking when subpools are not in use.
1421 2011-08-29 Yannick Moy <moy@adacore.com>
1423 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1424 types and dispatching calls in Alfa mode.
1425 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1426 correspondance between body and spec scopes, to reuse utility functions
1427 (Traverse_Declarations_Or_Statements): Protect access to body for stub
1428 by testing the presence of the library unit for the body
1429 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1430 mode the expansion of accept statements is skipped
1431 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1432 the unique entity corresponding to the one returned by
1433 Unique_Defining_Entity applied to the enclosing declaration of the
1436 2011-08-29 Bob Duff <duff@adacore.com>
1438 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1439 gdb when x is not a node (it can be a node list, name_id, etc). pp is
1440 an alias for pn. ppp is an alias for pt.
1442 2011-08-29 Javier Miranda <miranda@adacore.com>
1444 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1445 aggregate to take a consistent decision on the need to convert into
1446 assignments aggregates that initialize constant objects.
1448 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1450 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1451 Build_Allocate_Deallocate_Proc in order to handle allocation of
1452 non-controlled objects on subpools.
1453 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1454 to be end-user visible.
1455 * s-finmas.adb: Add with and use clause for System.HTable.
1456 Add an instantiation of Simple_HTable which provides a mapping between
1457 the address of a controlled object and the corresponding
1458 Finalize_Address used to clean up the object. The table is used when a
1459 master is operating in heterogeneous mode.
1460 (Attach): Explain why the input node is not verified on being already
1462 (Delete_Finalize_Address): New routine.
1463 (Detach): Add pragma Assert which ensures that a node is already
1465 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1466 since nodes are no longer removed on traversal. Explain why node
1467 detachment is undesirable in this case.
1468 (Get_Finalize_Address): New routine.
1469 (Hash): New routine.
1470 (Is_Empty_List): Removed.
1471 (pm): Renamed to Print_Master. Add output for discriminant
1473 Comment reformatting.
1474 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1475 * s-finmas.ads: Various comments additions / improvements.
1476 Type Finalization_Master has a discriminant which determines the mode of
1478 (Delete_Finalize_Address): New routine.
1479 (Get_Finalize_Address): New routine.
1480 (pm): Renamed to Print_Master.
1481 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1482 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1483 use clause for System.IO.
1484 (Allocate_Any_Controlled): Add machinery to set TSS primitive
1485 Finalize_Address depending on the mode of allocation and the mode of
1487 (Deallocate_Any_Controlled): Remove the relation pair object -
1488 Finalize_Address regardless of the master mode. Add comment explaining
1490 (Detach): Ensure that fields Prev and Next are null after detachment.
1491 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1492 scheme to check whether the list of subpools is empty. There is no
1493 longer need to store the next subpool or advance the current pointer.
1494 (Is_Empty_List): New routine.
1495 (Print_Pool): New routine.
1496 (Print_Subpool): New routine.
1497 * s-stposu.ads: Various comments additions / improvements.
1498 Field Master of type Root_Subpool is now a heterogeneous collection.
1499 (Print_Pool): New routine.
1500 (Print_Subpool): New routine.
1502 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1504 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1505 forms, using aspects of container types.
1506 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1507 Has_Implicit_Dereference flags, that may be set on the partial view.
1508 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1509 container type with an indexing aspect.
1510 (Analyze_Quantified_Expression): Analyze construct with expansion
1511 disabled, because it will be rewritten as a loop during expansion.
1512 (Try_Container_Indexing): The prefix itself may be a container type
1513 with an indexing aspect, as with a vector of vectors.
1514 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1515 the original doamin of iteration, for name capture.
1516 (Analyze_Iterator_Specification): If the domain is an expression that
1517 needs finalization, create a separate declaration for it.
1518 For an iterator with "of" retrieve default iterator info from aspect of
1519 container type. For "in" iterator, retrieve type of Iterate function.
1520 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1521 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1522 analysis, to prevent spurious errors about late attributes.
1523 * sprint.adb: Handle quantified expression with either loop or iterator
1525 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1528 2011-08-29 Vincent Celier <celier@adacore.com>
1530 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1531 Binder or Linker of the main project file.
1533 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1535 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1538 2011-08-29 Yannick Moy <moy@adacore.com>
1540 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1542 2011-08-29 Yannick Moy <moy@adacore.com>
1544 * exp_ch11.adb: Minor expansion of comment.
1546 2011-08-29 Yannick Moy <moy@adacore.com>
1548 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1550 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1552 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1553 interpretation, set the type before resolving the operands, because
1554 legality checks on an exponention operand need to know the type of the
1557 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1559 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1560 cleanups on a master if the instance is within a generic unit.
1561 Complement to the corresponding fix to inline.adb for K520-030.
1563 2011-08-29 Tristan Gingold <gingold@adacore.com>
1565 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1567 * exp_intr.adb: Minor comment fix.
1569 2011-08-29 Bob Duff <duff@adacore.com>
1571 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1572 Delay_Required was used as an uninitialized variable.
1574 2011-08-29 Robert Dewar <dewar@adacore.com>
1576 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1577 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1578 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1580 2011-08-29 Thomas Quinot <quinot@adacore.com>
1582 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1583 Remove unused variables.
1585 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1587 * sem_res.adb: Remove Build_Explicit_Dereference.
1588 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1589 from sem_res.adb, used in analysis of additional constructs.
1590 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1591 expansion of iterators.
1592 (Is_Object_Reference): Recognize variables rewritten as explicit
1593 dereferences in Ada2012.
1594 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1595 Reversible_Iterator names, for expansion of Ada2012 iterators.
1596 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1597 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1598 linked list container.
1599 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1600 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1602 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1604 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1607 2011-08-29 Vincent Celier <celier@adacore.com>
1609 * make.adb (Gnatmake): Get the maximum number of simultaneous
1610 compilation processes after the Builder switches has been scanned, as
1611 there may include -jnn.
1613 2011-08-29 Matthew Heaney <heaney@adacore.com>
1615 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1617 2011-08-29 Tristan Gingold <gingold@adacore.com>
1619 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1620 GNAT_DRIVER_COMMAND_LINE to 255.
1622 2011-08-29 Pascal Obry <obry@adacore.com>
1624 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1625 reformatting and style fix (class attribute casing).
1627 2011-08-29 Yannick Moy <moy@adacore.com>
1629 * exp_ch11.adb: Yet another case where expansion should be common
1630 between CodePeer and Alfa.
1632 2011-08-29 Yannick Moy <moy@adacore.com>
1634 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1636 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1638 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1639 incomplete type and its completion match.
1641 2011-08-29 Yannick Moy <moy@adacore.com>
1643 * exp_ch13.adb: Adjust previous change.
1645 2011-08-29 Robert Dewar <dewar@adacore.com>
1647 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1648 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1651 2011-08-29 Emmanuel Briot <briot@adacore.com>
1653 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1654 initialize aggregated projects.
1656 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1658 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1659 depth of candidates to resolve a potentially spurious ambiguity between
1660 two visible subprograms.
1662 2011-08-29 Yannick Moy <moy@adacore.com>
1664 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1666 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1667 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1670 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1672 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1675 2011-08-29 Thomas Quinot <quinot@adacore.com>
1677 * sem_res.adb: Minor reformatting.
1679 2011-08-29 Johannes Kanig <kanig@adacore.com>
1681 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1683 * gnat1drv.adb (Adjust_Global_Switches): Set
1684 Use_Expressions_With_Actions to False in ALFA mode.
1685 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1688 2011-08-29 Yannick Moy <moy@adacore.com>
1690 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1691 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1692 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1693 tagged types and dispatching calls in Alfa mode.
1695 2011-08-29 Javier Miranda <miranda@adacore.com>
1697 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1698 we do not report an error on an Empty node.
1700 2011-08-29 Geert Bosch <bosch@adacore.com>
1702 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1703 a-nlrear.o and a-nurear.o.
1705 2011-08-29 Robert Dewar <dewar@adacore.com>
1707 * freeze.adb: Minor code reorganization.
1709 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1710 sem_ch6.adb: Minor reformatting
1712 2011-08-29 Tristan Gingold <gingold@adacore.com>
1714 * s-except.ads, s-except.adb: Provide dummy body.
1716 2011-08-29 Yannick Moy <moy@adacore.com>
1718 * sem_warn.adb (Within_Postcondition): Take into account the case of
1719 an Ensures component in a Test_Case.
1721 2011-08-29 Tristan Gingold <gingold@adacore.com>
1723 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1724 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1725 System_Exceptions_Debug
1726 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1727 * a-except.adb: With and use System.Exceptions_Debug instead of
1729 * a-except-2005.adb: Likewise.
1730 * s-assert.adb: Likewise.
1731 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1732 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1733 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1734 s-excdeb. Update dependencies.
1735 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1736 as these no longer need external libraries.
1738 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1740 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1741 exponentiation operator on universal values in a context that requires
1744 2011-08-29 Tristan Gingold <gingold@adacore.com>
1746 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
1747 before calling notify_handled_exception.
1748 * a-exextr.adb: Fix comment.
1750 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1752 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1753 Finalize_Address of the access type's finalization master.
1754 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1755 access type's finalization master. Add a guard to prevent
1756 Associated_Storage_Pool from being set on .NET/JVM.
1757 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1758 attribute Finalize_Address of the access type's finalization master.
1759 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
1760 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
1761 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
1763 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
1764 use clause for System.IO
1765 (Detach): Relax the assertion, to be reinstated later.
1766 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
1767 Relax the assertion on Finalize_Address, to be reinstated later.
1768 (Is_Empty_List): New routine.
1769 (pm): New debug routine.
1770 (Set_Finalize_Address): New routine.
1771 * s-finmas.ads (pm): New debug routine.
1772 (Set_Finalize_Address): New routine.
1773 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
1775 2011-08-29 Tristan Gingold <gingold@adacore.com>
1777 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
1778 Remove convention C.
1780 2011-08-29 Tristan Gingold <gingold@adacore.com>
1782 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
1783 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
1784 (Finalize_TCB): Remove its finalization.
1785 (Initialize): Remove assignment of GET_Exc_Stack_Addr
1786 * s-soflin.adb (NT_Exc_Stack): Remove
1787 (Get_Exc_Stack_Addr_NT): Likewise.
1788 (Get_Exc_Stack_Addr_Soft): Likewise.
1789 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
1790 (Get_Exc_Stack_Addr): Likewise.
1791 (Get_Exc_Stack_Addr_Soft): Likewise
1792 * s-taspri-vms.ads (Exc_Stack_T): Remove.
1793 (Exc_Stack_Ptr_T): Likewise.
1794 (Private_Data): Remove Exc_Stack_Ptr component.
1796 2011-08-29 Tristan Gingold <gingold@adacore.com>
1798 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1800 2011-08-29 Tristan Gingold <gingold@adacore.com>
1802 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1804 2011-08-29 Geert Bosch <bosch@adacore.com>
1806 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1807 L2_Norm, Swap_Column): New generic subprograms
1808 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1809 L2_Norm, Swap_Column): Implement new subprograms in order to
1810 eliminate dependency on BLAS and LAPACK libraries in
1811 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1812 version. Forward_Eliminate/Back_Substitute can be used to put a
1813 matrix in row echelon or reduced row echelon form using partial
1815 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1816 Swap_Column): Instantiate from System.Generic_Array_Operations.
1817 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1818 (Sqrt): Local function for simple computation of square root without
1819 adding dependencies on Generic_Elementary_Functions.
1820 (Swap): New subprogram to exchange floating point numbers.
1821 (Inverse): Reimplement using Jordan-Gauss elimination.
1822 (Jacobi): New procedure implementing Jacobi's method for computation
1823 of eigensystems, based on Rutishauser's implementation.
1824 (L2_Norm): Implement directly using the inner product.
1825 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1826 decreasing eigenvalue as required by the Ada RM.
1827 (Swap_Column): New helper procedure for Sort_Eigensystem.
1828 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1829 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1832 2011-08-29 Thomas Quinot <quinot@adacore.com>
1834 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1837 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1839 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1840 than the current node.
1841 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1842 Finalization_Master. The list headers have two fields instead of three.
1843 This should fix alignment issue but subpool allocations are now
1844 unusable. Alphabetize subprograms.
1845 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1846 the size of the header when converting the beginning of the object to
1847 a FM_Node. Set the master's Finalize_Address attribute if not already
1849 (Deallocate_Any_Controlled): Use the offset rather than the size of the
1850 header when converting the beginning of the object to a FM_Node.
1852 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1854 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1855 reraise when compiling for CodePeer.
1857 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1859 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1860 now needed by a-convec.adb. Fix warning.
1862 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1864 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1865 processing of TSS routine Finalize_Address when compiling in
1868 2011-08-29 Thomas Quinot <quinot@adacore.com>
1870 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1871 sem_warn.adb: Minor reformatting.
1873 2011-08-29 Emmanuel Briot <briot@adacore.com>
1875 * prj-conf.adb (Get_Config_Switches): Also collect the list of
1876 languages from aggregated projects.
1878 2011-08-29 Yannick Moy <moy@adacore.com>
1880 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1881 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1882 Traverse_Package_Declaration, Traverse_Subprogram_Body,
1883 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1884 for stubs are traversed too when parameter is set
1885 (Traverse_All_Compilation_Units): Traverse without going inside stubs
1886 (Traverse_Declarations_Or_Statements): Do the special traversing for
1887 stubs when required.
1888 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1889 return subprogram or package body from stub.
1890 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1891 stubs without prior subprogram decl.
1893 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1895 * gnat_ugn.texi: Fix typo.
1897 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1899 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1900 which accounts for size vs alignment issues and calculates the size of
1902 (Deallocate_Any_Controlled): Ditto.
1903 (Nearest_Multiple_Rounded_Up): New routine.
1905 2011-08-29 Tristan Gingold <gingold@adacore.com>
1907 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1908 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1909 (Set_Exception_Msg): Ditto.
1910 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
1912 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1913 Use Save_Occurrence instead of Save_Occurrence_No_Private.
1914 (Raise_With_Msg): Remove Cleanup_Flag.
1915 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1916 Clean_Flag and Private_Data components.
1918 2011-08-29 Yannick Moy <moy@adacore.com>
1920 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1922 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1923 of an explicitly declared type, so that the base types of the original
1924 type and this generated type are the same, and a "type" (not a subtype
1926 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1927 small" in Alfa mode, like in CodePeer mode.
1928 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1929 clauses in Alfa mode.
1931 2011-08-29 Javier Miranda <miranda@adacore.com>
1933 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1934 function to the package spec.
1935 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1936 internally generated bodies of null procedures locate the internally
1937 generated spec enforcing mode conformance.
1938 (Is_Interface_Conformant): Ensure that the controlling formal of the
1941 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1943 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1944 reject the pragma if it appears to apply to a formal subprogram.
1946 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1948 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1949 inner expression, to prevent double evaluation.
1951 2011-08-29 Tristan Gingold <gingold@adacore.com>
1953 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1955 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1956 * a-except-2005.adb (Propagate_Exception): Adjust spec.
1957 (Raise_Current_Excep): Adjust call.
1958 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1960 2011-08-29 Thomas Quinot <quinot@adacore.com>
1962 * exp_disp.adb: Minor reformatting.
1964 2011-08-29 Tristan Gingold <gingold@adacore.com>
1966 * a-exexpr.adb (Setup_Exception): Removed.
1967 * a-exexpr-gcc.adb (Setup_Exception): Removed.
1968 * a-except.adb (Exception_Propagation): Removed.
1969 * a-except-2005.adb (Setup_Exception): Removed.
1970 (Reraise): Remove call to Setup_Exception.
1971 (Reraise_Occurrence): Ditto.
1972 (Reraise_Occurrence_Always): Ditto.
1973 (Reraise_Occurrence_No_Defer): Ditto.
1974 (Transfer_Occurrence): Ditto.
1975 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1976 (Set_Exception_Msg): Ditto.
1978 2011-08-29 Robert Dewar <dewar@adacore.com>
1980 * a-convec.adb, exp_disp.adb: Minor reformatting.
1982 2011-08-29 Tristan Gingold <gingold@adacore.com>
1984 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1986 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1988 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1989 Exception_Handlers to No_List instead of Empty_List in the case where
1990 there are no handlers.
1992 2011-08-29 Tristan Gingold <gingold@adacore.com>
1994 * gcc-interface/gigi.h (enum standard_datatypes): Add
1995 ADT_reraise_zcx_decl
1996 (reraise_zcx_decl): New macro.
1997 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1998 (gigi): Set reraise_zcx_decl.
1999 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
2000 (gnat_to_gnu): Handle N_Raise_Statement.
2002 2011-08-29 Robert Dewar <dewar@adacore.com>
2004 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
2005 a-undesu.adb: Minor reformatting.
2007 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2009 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2010 table, accept an unfrozen untagged component if it is an actual for a
2011 formal incomplete type.
2012 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2013 provide new iterator forms over vectors.
2014 Introduce type Iterator in package body to implement operations of
2015 Reversible_Iterator interface.
2016 * a-iteint.ads: Make package pure so it is usable with new container
2017 packages, that are categorized Remote_Types.
2019 2011-08-29 Robert Dewar <dewar@adacore.com>
2021 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2023 2011-08-29 Bob Duff <duff@adacore.com>
2025 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2026 of <>, because this is the routine that checks for dimensionality
2027 errors (for example, for a two-dimensional array, (others => <>) should
2028 be (others => (others => <>)).
2030 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2032 * impunit.adb: Add new run-time units.
2033 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2034 s-stposu.ads, s-stposu.adb: Code clean up.
2035 Handle protected class-wide or task class-wide types
2036 Handle C/C++/CIL/Java types.
2037 * s-spsufi.adb, s-spsufi.ads: New files.
2039 2011-08-29 Yannick Moy <moy@adacore.com>
2041 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2042 library-level subprogram.
2043 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2045 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2047 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2049 * gnat_rm.texi: Update doc for Test_Case pragma.
2051 2011-08-29 Tristan Gingold <gingold@adacore.com>
2053 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2055 (GCC_Exception_Access): New type.
2056 (Unwind_DeleteException): New imported procedure
2057 (Foreign_Exception): Import it.
2058 (GNAT_GCC_Exception): Simply have the occurrence inside.
2059 (To_GCC_Exception): New function.
2060 (To_GNAT_GCC_Exception): New function.
2061 (GNAT_GCC_Exception_Cleanup): New procedure..
2062 (Propagate_GCC_Exception): New procedure.
2063 (Reraise_GCC_Exception): New procedure.
2064 (Setup_Current_Excep): New procedure.
2065 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2066 (Unwind_RaiseException): Ditto.
2067 (Unwind_ForcedUnwind): Ditto.
2069 (Begin_Handler): Change type of parameter.
2070 (End_Handler): Ditto. Now delete the exception if still present.
2071 (Setup_Key): Removed.
2072 (Is_Setup_And_Not_Propagated): Removed.
2073 (Set_Setup_And_Not_Propagated): Ditto.
2074 (Clear_Setup_And_Not_Propagated): Ditto.
2075 (Save_Occurrence_And_Private): Ditto.
2076 (EID_For): Add 'not null' constraint on parameter.
2077 (Setup_Exception): Does nothing.
2078 (Propagate_Exception): Simplified.
2079 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2080 re-raise is not expanded anymore.
2081 * s-except.ads (Foreign_Exception): New exception - placeholder for
2083 * raise-gcc.c (__gnat_setup_current_excep): Declare
2084 (CXX_EXCEPTION_CLASS): Define (not yet used)
2085 (GNAT_EXCEPTION_CLASS): Define.
2086 (is_handled_by): Handle foreign exceptions.
2087 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2089 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2091 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2093 2011-08-29 Thomas Quinot <quinot@adacore.com>
2095 * a-synbar-posix.adb: Minor reformatting.
2097 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2099 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2100 a-exetim-default.ads (Interrupt_Clocks_Supported,
2101 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2102 definitions to be compliant with AI-0171. The target systems do not
2103 support separate account for the execution time of interrupt handlers.
2105 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2107 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2108 in the barrier to put first the easiest to evaluate (and the one which
2109 will be True more often). More efficient.
2111 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2113 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2115 2011-08-29 Bob Duff <duff@adacore.com>
2117 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2118 attributes that are now aspects, as specified by AI05-0229-1.
2119 * sem_ch13.adb (Analyze_Aspect_Specifications,
2120 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2121 pragmas or attribute references, as appropriate.
2123 2011-08-29 Robert Dewar <dewar@adacore.com>
2125 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2126 a-synbar-posix.ads: Minor reformatting.
2128 2011-08-29 Yannick Moy <moy@adacore.com>
2130 * snames.ads-tmpl: Add name Force.
2132 2011-08-29 Pascal Obry <obry@adacore.com>
2134 * prj-nmsc.adb: Minor reformatting.
2136 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2138 * a-exetim.ads (Interrupt_Clocks_Supported,
2139 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2140 definitions to be compliant with AI-0171.
2142 2011-08-29 Robert Dewar <dewar@adacore.com>
2144 * a-ngelfu.adb: Add comments.
2146 2011-08-29 Geert Bosch <bosch@adacore.com>
2148 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2149 the closest machine number to Pi / 2.0.
2151 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2153 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2154 package Ada.Synchronous_Barriers.
2155 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2156 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2157 default implementation using protected objects and another one
2158 a-synbar-posix using POSIX barriers as the underlying support.
2159 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2160 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2161 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2162 Clean up dependencies.
2163 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2165 2011-08-29 Robert Dewar <dewar@adacore.com>
2167 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2168 exp_dist.adb: Minor code reorganization.
2171 2011-08-29 Thomas Quinot <quinot@adacore.com>
2173 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2174 primitive operation must support external streaming if it is not a
2175 controlling access result.
2177 2011-08-29 Thomas Quinot <quinot@adacore.com>
2179 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2181 2011-08-29 Bob Duff <duff@adacore.com>
2183 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2184 restriction on allocators, as required by AI05-0013-1.
2185 * restrict.ads: Minor comment fix.
2187 2011-08-29 Tristan Gingold <gingold@adacore.com>
2189 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2190 (To_Jmpbuf_Address): Ditto
2191 (builtin_longjmp): Ditto
2193 2011-08-29 Thomas Quinot <quinot@adacore.com>
2195 * sem_res.adb: Minor reformatting.
2197 2011-08-29 Vincent Celier <celier@adacore.com>
2199 * make.adb (Gnatmake): Move special processing for VM targets after the
2200 call to Get_Target_Parameters.
2202 2011-08-29 Thomas Quinot <quinot@adacore.com>
2204 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2206 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2208 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2209 where an anonymous access discriminant of a limited designated type
2210 appears in a non-immutably limited discriminated type and issue an
2211 error message. Add local variable Desig_T and replace all occurrences
2214 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2216 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2217 implementation is compliant to RM D.15(15/2) after the modification
2218 imposed by AI05-0094-1 (binding interpretation).
2220 2011-08-29 Robert Dewar <dewar@adacore.com>
2222 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
2223 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
2225 2011-08-29 Thomas Quinot <quinot@adacore.com>
2227 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
2228 the scope name, do not report a missing label as a style violation (it
2229 will be diagnosed as an illegality).
2230 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
2231 variant records: Get_Enum_Lit_From_Pos already returns a usage
2232 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
2233 on Expr in Integer_Literal case so that it can be used by
2236 2011-08-29 Tristan Gingold <gingold@adacore.com>
2238 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
2240 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
2241 (Build_Abort_Block_Handler): New function to build an Abort_Signal
2243 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
2244 Build_Abort_Block_Handler to build the exception handler. Do not
2245 undefer aborts for the Abort_Signal exception handler if back-end
2246 exception mechanism.
2247 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
2248 back_end exceptions for all others and abort_signal.
2249 * s-except.ads (ZCX_By_Default): New constant.
2250 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
2251 (Raise_Exception_Always): Ditto.
2252 (Raise_From_Signal_Handler): Ditto.
2253 (Raise_With_Location_And_Msg): Ditto.
2254 (Raise_With_Msg): Ditto.
2256 (Reraise_Occurence): Ditto.
2257 (Reraise_Occurrence_Always): Ditto.
2258 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
2259 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
2261 2011-08-29 Thomas Quinot <quinot@adacore.com>
2263 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2265 2011-08-29 Robert Dewar <dewar@adacore.com>
2267 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2268 Minor code reorganization.
2270 2011-08-29 Bob Duff <duff@adacore.com>
2272 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2273 2012, not just Ada 2005.
2275 2011-08-29 Vincent Celier <celier@adacore.com>
2277 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2278 with a project file or with gprbuid, if -gnatep= is specified, the
2279 builder may need to be invoked with -x.
2281 2011-08-29 Tristan Gingold <gingold@adacore.com>
2283 * a-exexpr-gcc.adb: Minor comment fix.
2285 2011-08-29 Robert Dewar <dewar@adacore.com>
2287 * sem_ch8.adb: Minor reformatting.
2289 2011-08-29 Bob Duff <duff@adacore.com>
2291 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2292 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2293 treating "some" as unreserved in earlier Ada versions. This is now
2294 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2295 rather than Name_Some, since Tok_Some is now recognized as reserved.
2296 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2298 * scans.ads: Minor comment fixes.
2299 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2300 for other language versions.
2301 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2302 treating "some" as unreserved in earlier Ada versions. This is now
2303 handled in Snames.Is_Keyword_Name.
2304 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2306 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2307 unreserved in earlier Ada versions. This is now handled in
2308 Snames.Is_Keyword_Name.
2309 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2310 words as for other language versions.
2311 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2312 Ada 2012, not just Ada 2005.
2314 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2316 * sem_ch13.adb: Additional semantic checks for aspects involved in
2319 2011-08-29 Matthew Heaney <heaney@adacore.com>
2321 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2322 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2323 Container parameter.
2324 (Ancestor_Find): ditto.
2326 2011-08-29 Thomas Quinot <quinot@adacore.com>
2328 * par-endh.adb: Minor reformatting.
2330 2011-08-29 Tristan Gingold <gingold@adacore.com>
2332 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2333 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2334 (Adjust_N_CLeanups_For): Remove.
2335 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2337 (Propgate_Exception): Adjust.
2338 * raise-gcc.c: Add a few static/const.
2339 (Adjust_N_Cleanups_For): Remove declaration.
2340 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2342 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2344 * sem_ch8.adb: Use type of function return when rewriting as object
2347 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2349 * sem_type.adb: Minor reformatting.
2351 2011-08-29 Robert Dewar <dewar@adacore.com>
2353 * makeutl.adb: Minor reformatting.
2355 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2357 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2358 function call of a limited type, the expansion of the renaming is
2359 complicated by the presence of various temporaries and subtypes that
2360 capture constraints of the renamed object.
2361 Rewrite node as an object declaration, whose expansion is simpler.
2362 Given that the object is limited there is no copy involved and no
2365 2011-08-29 Robert Dewar <dewar@adacore.com>
2367 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2368 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2370 2011-08-29 Tristan Gingold <gingold@adacore.com>
2372 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2373 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2374 system-linux-hppa.ads, system-linux-s390.ads,
2375 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2376 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2377 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2378 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2379 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2380 system-solaris-sparc.ads, system-lynxos-x86.ads,
2381 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2382 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2383 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2384 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
2385 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
2386 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2387 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2388 * opt.ads: Adjust comment.
2389 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2390 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2391 * system.ads: Move GCC_ZCX_Support to obsolete entries.
2393 2011-08-29 Emmanuel Briot <briot@adacore.com>
2395 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2396 file name is specified on the gnatmake or gprbuild command line, and
2397 before we search for that file in the project.
2399 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2401 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2402 used to determine whether a possible interpretation for an overloadable
2403 entity is declared within the current instantiation and should be
2404 included in the candidate set.
2406 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2408 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2410 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2412 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2413 access subtype is access_to_subprogram, when applying checks for
2416 2011-08-29 Matthew Heaney <heaney@adacore.com>
2418 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2419 for sibling when common parent.
2421 2011-08-29 Thomas Quinot <quinot@adacore.com>
2423 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2426 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2428 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2429 for the return type when in ASIS mode.
2431 2011-08-29 Vincent Celier <celier@adacore.com>
2433 * make.adb (Gnatmake): Get the default search dirs, then the target
2434 parameters after getting the Builder switches, as the Builder switches
2435 may include --RTS= and that could change the default search dirs.
2437 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2439 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2440 Make_Final_Call. Move the processing for class-wide types before the
2441 processing for derivations from [Limited_]Controlled.
2442 (Make_Final_Call): Move the processing for class-wide types before the
2443 processing for derivations from [Limited_]Controlled.
2444 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2445 Add code to account for alignments larger than the list header. Add a
2446 comment illustrating the structure of the allocated object + padding +
2448 (Deallocate_Any_Controlled): Add code to account for alignments larger
2449 than the list header.
2451 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2453 * sinfo.ads, sinfo.adb: New node kind
2454 N_Formal_Incomplete_Type_Definition, related flags.
2455 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2456 Parse formal incomplete types.
2457 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2459 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2460 Formal incomplete types do not need completion.
2461 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2462 Validate_Incomplete_Type_Instance): New procedures to handle formal
2464 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2465 that corresponds to a formal incomplete type.
2466 * sprint.adb: Handle formal incomplete type declarations.
2467 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2470 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2472 * a-fihema.ads, a-fihema.adb: Unit removed.
2473 * a-undesu.ads, a-undesu.adb: New unit implementing
2474 Ada.Unchecked_Deallocate_Subpool.
2475 * einfo.adb: Remove Associated_Collection from the node usage.
2476 Add Finalization_Master to the node usage.
2477 (Associated_Collection): Removed.
2478 (Finalization_Master): New routine.
2479 (Set_Associated_Collection): Removed.
2480 (Set_Finalization_Master): New routine.
2481 (Write_Field23_Name): Remove Associated_Collection from the output. Add
2482 Finalization_Master to the output.
2483 * einfo.ads: Remove attribute Associated_Collection and its uses in
2485 Add new attribute Finalization_Master along with its uses in entitites.
2486 (Associated_Collection): Removed along with its pragma import.
2487 (Finalization_Master): New routine along with a pragma import.
2488 (Set_Associated_Collection): Removed along with its pragma import.
2489 (Set_Finalization_Master): New routine along with a pragma import.
2490 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2491 Build_Finalization_Collection with Build_Finalization_Master.
2492 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2493 before the bodies of the predefined routines. Add comment explaining
2494 this. Replace call to Build_Finalization_Collection with
2495 Build_Finalization_Master.
2496 (Freeze_Type): Replace call to Build_Finalization_Collection with
2497 Build_Finalization_Master.
2498 (Make_Finalize_Address_Body): Comment reformatting.
2499 (Make_Predefined_Primitive_Specs): Code reformatting.
2500 (Stream_Operation_OK): Update comment mentioning finalization
2501 collections. Replace RE_Finalization_Collection with
2502 RE_Finalization_Master.
2503 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2504 Associated_Collection with Finalization_Master. Replace call to
2505 Build_Finalization_Collection with Build_Finalization_Master.
2506 (Expand_Allocator_Expression): Replace call to Associated_Collection
2507 with Finalization_Master. Replace call to Set_Associated_Collection with
2508 Set_Finalization_Master. Remove the generation of
2509 Set_Finalize_Address_Ptr.
2510 (Expand_N_Allocator): Replace call to Associated_Collection with
2511 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2512 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2513 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2514 comment on usage. Replace call to Needs_BIP_Collection with
2515 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2516 BIP_Finalization_Master. Update all comments which mention finalization
2517 collections. Replace Associated_Collection with
2518 Finalization_Master. Replace Build_Finalization_Collection with
2519 Build_Finalization_Master.
2520 (BIP_Formal_Suffix): Update BIP_Collection's case.
2521 (Build_Heap_Allocator): Update the related comment. Rename local
2522 variable Collect to Fin_Mas_Id and update its occurrences. Update
2523 comments which mention finalization collections. Replace
2524 Set_Associated_Collection with Set_Finalization_Master.
2525 (Expand_Call): Update the code which detects a special piece of library
2527 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2528 Add_Collection_Actual_To_Build_In_Place_Call with
2529 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2530 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2531 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2532 Add_Collection_Actual_To_Build_In_Place_Call with
2533 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2534 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2535 Add_Collection_Actual_To_Build_In_Place_Call with
2536 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2537 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2538 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2539 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2540 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2541 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2542 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2543 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2544 Replace the call to Associated_Collection with Finalization_Master.
2545 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2546 Update the way finalization master names are generated. Update the
2547 retrieval of the correct access type which will carry the pool and
2549 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2550 (Make_Finalize_Address_Body): Abstract types do not need
2551 Finalize_Address. Code reformatting.
2552 (Make_Finalize_Address_Stmts): Update comment on usage.
2553 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2554 (Process_Declarations): Update comments.
2555 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2556 Build_Finalization_Master. Update associated comment.
2557 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2558 * exp_ch13.adb: Update comments which mention finalization collections.
2559 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2560 with Finalization_Master.
2561 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2562 create calls to routines Allocate_Any_Controlled and
2563 Deallocate_Any_Controlled.
2564 (Find_Finalize_Address): New routine.
2565 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2567 (Requires_Cleanup_Actions): Update the comment on freeze node
2569 * exp_util.ads: Remove comment on generated code for
2570 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2571 is better to simply look in the body.
2572 * freeze.adb (Freeze_All): Update the comment of finalization
2573 collections. Replace the call to Associated_Collection with
2574 Finalization_Master. Replace the call to Build_Finalization_Collection
2575 with Build_Finalization_Master.
2576 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2577 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2579 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2580 Ada.Finalization. Add processing for children of System.Storage_Pools.
2581 * rtsfind.ads: Remove the naming of second level children of
2583 Remove Ada_Finalization_Heap_Management from the list of units.
2584 Remove subtype Ada_Finalization_Child.
2585 Remove the following subprogram entities:
2589 RE_Finalization_Collection
2590 RE_Finalization_Collection_Ptr
2591 RE_Set_Finalize_Address_Ptr
2593 Add the naming of second level children of System.Storage_Pools.
2594 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2596 Add subtype System_Storage_Pools_Child.
2597 Add the following subprogram entities to System.Finalization_Masters:
2599 RE_Finalization_Master
2600 RE_Finalization_Master_Ptr
2602 Add the following subprogram entities to System.Storage_Pools.Subpools:
2604 RE_Allocate_Any_Controlled
2605 RE_Deallocate_Any_Controlled
2606 RE_Root_Storage_Pool_With_Subpools
2610 Move the following subprogram entities from
2611 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2613 RE_Add_Offset_To_Address
2618 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2619 Set_Associated_Collection with Set_Finalization_Master.
2620 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2621 BIP_Finalization_Master is created.
2622 * s-finmas.adb: New unit System.Finalization_Masters.
2623 * s-finmas.ads: New unit System.Finalization_Masters.
2624 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2625 * s-stposu.ads, s-stposu.adb: New unit implementing
2626 System.Storage_Pools.Subpools.
2628 2011-08-29 Bob Duff <duff@adacore.com>
2630 * tbuild.adb: Add assertion.
2632 2011-08-29 Thomas Quinot <quinot@adacore.com>
2634 * s-pooglo.adb: Minor reformatting.
2636 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2638 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2639 an indexed component of a packed array whose element type is a record
2640 with a representation clause different from that of the right-hand
2641 side, generate a temporary to minimuze the number of bit-field
2642 operations generated.
2644 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2646 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2647 declarations, and thus are likely insertion points for actions.
2649 2011-08-29 Bob Duff <duff@adacore.com>
2651 * einfo.ads: Minor comment fix.
2653 2011-08-29 Robert Dewar <dewar@adacore.com>
2655 * frontend.adb, gnat1drv.adb: Minor reformatting.
2657 2011-08-29 Tristan Gingold <gingold@adacore.com>
2659 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2660 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2661 space in front of the header.
2663 2011-08-29 Johannes Kanig <kanig@adacore.com>
2665 * frontend.adb (Frontend): Exit after creating Standard package when
2666 -gnatd.H is present.
2667 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2670 2011-08-29 Robert Dewar <dewar@adacore.com>
2672 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2673 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2674 snames.ads-tmpl: Minor reformatting.
2676 2011-08-29 Philippe Gil <gil@adacore.com>
2678 * prj.adb (Reset_Units_In_Table): New procedure.
2679 Reset units to avoid access to freed memory.
2681 2011-08-29 Thomas Quinot <quinot@adacore.com>
2683 * get_scos.adb: When reading a P statement SCO without a pragma name
2684 (from an older ALI file), ensure that the Pragma_Name component is set
2685 to Unknown_Pragma (not left uninitialized).
2687 2011-08-29 Vincent Celier <celier@adacore.com>
2689 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2690 modified to compute correctly the object path of a SAL project that is
2691 extending another library project.
2692 (Write_Path_File): New procedure.
2693 * makeutl.ads (Directories): New table moved from Buildgpr
2694 (Get_Directories): New procedure moved from Buildgpr
2695 (Write_Path_File): New procedure
2696 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2697 paths before binding SALs, instead of Set_Ada_Paths.
2698 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2700 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2701 (Current_Source_Path_File_Of): New function
2702 (Set_Current_Object_Path_File_Of): New procedure
2703 (Current_Source_Object_File_Of): New function
2704 (Set_Current_Object_Path_File_Of): New procedure
2705 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2706 (Current_Source_Path_File_Of): New function
2707 (Set_Current_Object_Path_File_Of): New procedure
2708 (Current_Source_Object_File_Of): New function
2709 (Set_Current_Object_Path_File_Of): New procedure
2711 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2713 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2714 packed entity, use a bit-field assignment only if there is no change of
2717 2011-08-29 Thomas Quinot <quinot@adacore.com>
2719 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2720 Is_RTU instead of using Chars comparisons.
2722 2011-08-29 Thomas Quinot <quinot@adacore.com>
2724 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2725 temporary object if the actual is constrained, and the discriminants
2726 read from the stream don't match.
2728 2011-08-29 Tristan Gingold <gingold@adacore.com>
2730 * sem_attr.adb, exp_attr.adb: Add handling of
2731 Attribute_System_Allocator_Alignment
2732 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2733 Attribute_System_Allocator_Alignment.
2734 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2735 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2736 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2737 get_target_system_allocator_alignment.
2739 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2741 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2744 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2746 * exp_ch3.adb (In_Runtime): Fix typo.
2748 2011-08-29 Bob Duff <duff@adacore.com>
2750 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2752 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2754 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2755 and a separate tag assignment is generated, ensure that the tag
2756 assignment is analyzed.
2758 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2760 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
2761 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
2762 of statement lists that may contain local declarations.
2763 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
2764 duplicate the triggering statements needed for the expansion of this
2765 construct, when the trigger is a dispatching call to a synchronized
2768 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2770 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
2771 * bindgen.adb: Add comments.
2772 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
2775 2011-08-29 Robert Dewar <dewar@adacore.com>
2777 * exp_attr.adb: Minor reformatting.
2778 Minor code reorganization and commenting.
2779 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
2782 2011-08-29 Thomas Quinot <quinot@adacore.com>
2784 * get_scos.adb: Ignore chaining indicators not currently supported
2787 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2789 * system.ads: Minor editing.
2791 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2793 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2795 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2796 Attribute_Elab_Subp_Body.
2797 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2798 * sem_util.adb: Update comments.
2800 2011-08-29 Thomas Quinot <quinot@adacore.com>
2802 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2803 pragma name for each SCO statement corresponding to a pragma.
2805 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2807 * opt.ads: Minor editing.
2809 2011-08-29 Yannick Moy <moy@adacore.com>
2811 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2812 that only made sense for CodePeer mode.
2814 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2816 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2817 which is no longer used.
2818 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2819 handling of the 64-bit division check.
2820 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2822 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2825 2011-08-29 Thomas Quinot <quinot@adacore.com>
2827 * get_scos.adb: Minor reformatting.
2829 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2831 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2832 statement list is wrapped in a block, the block is explicitly analyzed
2833 in order to properly redecorate the entities and create a servicing
2836 2011-08-29 Tristan Gingold <gingold@adacore.com>
2838 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2839 (Set_Zero_Cost_Handling): Remove.
2841 2011-08-29 Thomas Quinot <quinot@adacore.com>
2843 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2845 2011-08-29 Geert Bosch <bosch@adacore.com>
2847 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2848 instruction, as the latter may produce -0.0, which is not a valid VAX
2850 (Neg_G): Likewise for VAX F float.
2852 2011-08-29 Robert Dewar <dewar@adacore.com>
2854 * exp_util.adb: Minor reformatting.
2856 2011-08-29 Yannick Moy <moy@adacore.com>
2858 * sem_ch3.adb: Minor comment update.
2860 2011-08-29 Thomas Quinot <quinot@adacore.com>
2862 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2865 2011-08-29 Thomas Quinot <quinot@adacore.com>
2867 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2868 current statement sequence on a generic instantiation or a subprogram
2871 2011-08-29 Robert Dewar <dewar@adacore.com>
2873 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2876 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2878 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2879 Correct the check which involves the freeze node of a controlled or
2880 access-to-controlled type.
2882 2011-08-29 Geert Bosch <bosch@adacore.com>
2884 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2886 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2889 2011-08-29 Yannick Moy <moy@adacore.com>
2891 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2892 for every index type and component type that is not a subtype_mark.
2893 (Process_Subtype): Set Etype of subtype.
2895 2011-08-29 Robert Dewar <dewar@adacore.com>
2897 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2898 reorganization. Minor reformatting.
2900 2011-08-29 Steve Baird <baird@adacore.com>
2902 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2903 for CodePeer and ALFA modes.
2905 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2907 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2908 that comes from an enclosing scope if it is not the renaming of an
2909 actual, to handle properly a spurious ambiguity in an instance.
2911 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2913 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2914 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
2915 use it instead of the Esize of the first parameter.
2916 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2918 <Size>: Likewise. Call it for composite types on the RM size.
2920 2011-08-29 Yannick Moy <moy@adacore.com>
2922 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2923 * sem_util.adb (Unique_Name): Correct behaviour for names of
2926 2011-08-29 Yannick Moy <moy@adacore.com>
2928 * sem_prag.adb (Check_Precondition_Postcondition): In formal
2929 verification mode, analyze pragma expression for correctness, for
2930 pre/post on library-level subprogram, as it is not expanded later.
2932 2011-08-29 Yannick Moy <moy@adacore.com>
2934 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2935 in formal verification.
2937 2011-08-29 Thomas Quinot <quinot@adacore.com>
2939 * sem_util.adb: Minor reformatting.
2940 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2942 * par_sco.ads, par_sco.adb: Update comments.
2944 2011-08-29 Yannick Moy <moy@adacore.com>
2946 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2947 associated getter/setter.
2948 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2950 2011-08-29 Vincent Celier <celier@adacore.com>
2952 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2953 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2954 with declarations for Language_Kind and Dependency_Kind for Ada.
2955 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2956 (Process_Compiler): Take into account the new attributes Dependency_Kind
2958 (Check_Configuration): Check if language kind is unit based, not if the
2959 language name is Ada.
2960 (Process_Exceptions_Unit_Based): Ditto
2961 (Add_Language): Remove default additions of language and dependency kind
2962 * prj.ads: Minor comment change
2963 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2965 2011-08-29 Johannes Kanig <kanig@adacore.com>
2967 * debug.adb: Update comments.
2969 2011-08-24 Joseph Myers <joseph@codesourcery.com>
2971 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2972 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2973 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2974 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2975 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2977 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2979 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2980 (GNATLIBCFLAGS_FOR_C): Replace
2981 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2982 (gnatlib-shared-default, gnatlib-shared-dual-win32)
2983 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2984 (gnatlib-sjlj, gnatlib-zcx): Likewise.
2986 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
2988 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2990 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2992 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2994 2011-08-05 Nicolas Roche <roche@adacore.com>
2996 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2997 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2999 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
3001 2011-08-05 Matthew Heaney <heaney@adacore.com>
3003 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
3004 subprogram bodies declared out-of-order.
3006 2011-08-05 Yannick Moy <moy@adacore.com>
3008 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
3009 entities directly in package Standard, otherwise skip the standard
3012 2011-08-05 Robert Dewar <dewar@adacore.com>
3014 * a-cbmutr.adb: Minor reformatting
3015 (Allocate_Node): refactor node allocation algorithm
3017 2011-08-05 Robert Dewar <dewar@adacore.com>
3019 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3020 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3022 (Analyze_Pragma, case Check_Policy): Ditto.
3023 * sem_prag.ads (Check_Disabled): New function
3024 * snames.ads-tmpl: Add Name_Disable.
3026 2011-08-05 Robert Dewar <dewar@adacore.com>
3028 * gnat_rm.texi: Document implementation-defined policy DISABLE for
3029 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3031 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3033 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3034 that appears in a generic formal part and applies to a formal
3037 2011-08-05 Robert Dewar <dewar@adacore.com>
3039 * a-cbmutr.ads: Minor reformatting.
3041 2011-08-05 Matthew Heaney <heaney@adacore.com>
3043 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3044 to check count, check sign of value instead.
3045 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3046 (Copy_Subtree): allocate copy of source element
3047 (Equal_Subtree): compare elements, not access objects
3049 2011-08-05 Vincent Celier <celier@adacore.com>
3051 * gnat_ugn.texi: Fix VMS alternative.
3053 2011-08-05 Thomas Quinot <quinot@adacore.com>
3055 * sem_ch11.adb: Add comment.
3057 2011-08-05 Robert Dewar <dewar@adacore.com>
3059 * exp_util.adb: Minor comment fix.
3061 2011-08-05 Robert Dewar <dewar@adacore.com>
3063 * scng.adb (Error_Unterminated_String): Improve flag position when
3066 2011-08-05 Matthew Heaney <heaney@adacore.com>
3068 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3070 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3071 multiway tree containers.
3073 2011-08-05 Robert Dewar <dewar@adacore.com>
3075 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3076 * stylesw.adb: Implement -gnatyC to control comment spacing
3077 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3079 * usage.adb: Add line for -gnatyC.
3081 2011-08-05 Robert Dewar <dewar@adacore.com>
3083 * gnat_ugn.texi: Document -gnatyC.
3084 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3085 synonym for COMMENTS2).
3087 2011-08-05 Robert Dewar <dewar@adacore.com>
3089 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3090 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3091 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3092 a-comutr.ads, lib-xref.adb: Minor reformatting.
3094 2011-08-05 Robert Dewar <dewar@adacore.com>
3096 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3097 warning if there is an exception handler present.
3099 2011-08-05 Pascal Obry <obry@adacore.com>
3101 * a-iteint.ads: Fix copyright year.
3103 2011-08-05 Thomas Quinot <quinot@adacore.com>
3105 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3106 statement SCO for a USE clause or a representation clause.
3108 2011-08-05 Yannick Moy <moy@adacore.com>
3110 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3111 between body and spec for stub.
3112 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3113 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3114 pragma precondition or postcondition, for which the enclosing
3115 subprogram or package in the AST is not the desired one, return empty.
3117 2011-08-05 Thomas Quinot <quinot@adacore.com>
3119 * g-expect.adb: Minor reformatting.
3121 2011-08-05 Bob Duff <duff@adacore.com>
3123 * a-fihema.adb: Comment out OS_Lib.
3125 2011-08-05 Matthew Heaney <heaney@adacore.com>
3127 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3128 (unbounded multiway tree containers) and a-iteint.ads.
3129 * a-comutr.ads, a-comutr.adb:
3130 This is the new Ada 2012 unit for unbounded multiway tree containers
3131 * a-cimutr.ads, a-cimutr.adb
3132 This is the new Ada 2012 unit for indefinite multiway tree containers
3133 * a-iteint.ads: New file.
3135 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3137 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3139 2011-08-05 Bob Duff <duff@adacore.com>
3141 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3143 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3145 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3147 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3148 general indexing aspects of Ada2012. Called when analyzing indexed
3149 components when other interpretations fail.
3150 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3151 in an expression context where overloading is meaningful. This excludes
3152 the occurrence in an aspect specification (efficiency only).
3153 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3154 related to iterators can be set by an attribute specification, but
3156 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3157 Constant_Indexing and Variable_Indexing.
3158 (Check_Indexing_Functions): New procedure to perform legality checks.
3159 Additional semantic checks at end of declarations.
3161 2011-08-05 Sergey Rybin <rybin@adacore.com>
3163 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3164 order of calling Tree_Write/Tree_Read routines made for aspects.
3166 2011-08-05 Bob Duff <duff@adacore.com>
3168 * a-fihema.adb (Finalize): Fix race condition.
3170 2011-08-05 Yannick Moy <moy@adacore.com>
3172 * sem_ch12.adb (Analyze_Package_Instantiation,
3173 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3176 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3178 * sem_type.adb (Specific_Type): in an instance, the type-specific
3179 operand of an equality check that involves null may have a private
3180 type. Use full view to determine legality of construct.
3182 2011-08-05 Vincent Celier <celier@adacore.com>
3184 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3185 delete or close the file when the call to gnatmake was successful.
3187 2011-08-05 Yannick Moy <moy@adacore.com>
3189 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3190 Global_Discard_Names.
3192 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3194 * sinfo.ads: comments on use of entity field for aspect specifications.
3196 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3198 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3199 node is not itself an entity but a selected component, it is a
3200 rewritten parameterless call to an en enclosing synchronized operation,
3201 and this expansion will be performed again in the instance, so there is
3202 no global information to preserve.
3204 2011-08-05 Javier Miranda <miranda@adacore.com>
3206 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3207 for renamings of predefined primitives.
3208 (In_Predef_Prims_DT): New subprogram.
3210 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3212 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3213 possible interpretation of name is a reference type, add an
3214 interpretation that is the designated type of the reference
3215 discriminant of that type.
3216 * sem_res.adb (resolve): If the interpretation imposed by context is an
3217 implicit dereference, rewrite the node as the deference of the
3218 reference discriminant.
3219 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
3220 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
3221 parent type or base type.
3222 * sem_ch4.adb (Process_Indexed_Component,
3223 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
3224 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
3225 Check for implicit dereference.
3226 (List_Operand_Interps): Indicate when an implicit dereference is
3228 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
3230 2011-08-05 Thomas Quinot <quinot@adacore.com>
3232 * scos.ads: Update documentation of SCO table. Pragma statements can now
3233 be marked as disabled (using 'p' instead of 'P' as the statement kind).
3234 * par_sco.ads, par_sco.adb: Implement the above change.
3235 (Process_Decisions_Defer): Generate a P decision for the first parameter
3236 of a dyadic pragma Debug.
3237 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
3239 * put_scos.adb: Code simplification based on above change.
3241 2011-08-05 Robert Dewar <dewar@adacore.com>
3243 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
3244 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
3245 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
3246 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
3248 2011-08-05 Bob Duff <duff@adacore.com>
3250 * a-stunau.ads, g-spipat.adb: Update comments.
3252 2011-08-05 Bob Duff <duff@adacore.com>
3254 * a-fihema.ads: Minor comment fix.
3255 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
3257 (Attach, Detach): Remove some unnecessary code.
3258 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
3260 2011-08-05 Bob Duff <duff@adacore.com>
3262 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3263 allocation for Objects component. This simplifies the code somewhat. It
3264 is also a little more efficient in the not-so-unusual case where there
3265 are no controlled objects allocated.
3266 Make Finalization_Started flag atomic.
3267 (Finalize): Avoid unnecessary detachment of items from the list.
3268 (pcol): Minor cleanup.
3270 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3272 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3273 package whose name is the same as that of the generic unit, or its
3276 2011-08-05 Bob Duff <duff@adacore.com>
3278 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3279 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3280 Minor comment fixes.
3282 2011-08-05 Arnaud Charlet <charlet@adacore.com>
3284 * make.adb (Linking_Phase): No longer need to set source search path
3285 before calling gnatlink in CodePeer mode.
3286 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3287 gcc in CodePeer mode, since the binder generated file no longer has a
3289 * switch.ads, switch.adb (Is_Language_Switch): Removed.
3290 * switch-c.adb: Update comment.
3292 2011-08-05 Thomas Quinot <quinot@adacore.com>
3294 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3296 2011-08-05 Nicolas Roche <roche@adacore.com>
3298 * gnat_ugn.texi: Fix minor syntax error issue.
3300 2011-08-05 Vincent Celier <celier@adacore.com>
3302 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3303 delete or close the file when the call to gnatmake returns a non
3304 successful return code.
3306 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3308 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3309 check, indicate that the copy of the original node does not come from
3310 source, to prevent an infinite recursion of the expansion.
3312 2011-08-05 Johannes Kanig <kanig@adacore.com>
3314 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3315 VC generation for subprogram bodies.
3317 2011-08-05 Yannick Moy <moy@adacore.com>
3320 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3321 the base type with the smallest allowed base type.
3323 2011-08-05 Sergey Rybin <rybin@adacore.com>
3325 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3328 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3330 * sem_ch12.ads: minor comment updates.
3332 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3334 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3335 instantiation and a formal package the compiler generates a package
3336 renaming declaration so that the generic name within the declaration
3337 is interpreted as a renaming of the instance. At the end of a formal
3338 package declaration, this renaming must become invisible.
3340 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3342 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3343 comparison and rely on concrete entities instead.
3345 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3347 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3348 and discriminants, to indicate that the type has an access discriminant
3349 that supports implicit dereference.
3350 * snames.ads-tmpl: Add names of aspects and attributes related to
3351 Ada2012 iterators: constant_indexing, default_iterator,
3352 iterator_element, implicit_dereference, variable_indexing.
3353 * aspects.ads, aspects.adb: entries for iterator-related aspects.
3354 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3355 iterator-related aspects.
3356 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3358 2011-08-05 Sergey Rybin <rybin@adacore.com>
3360 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3361 metrics in gnatmetric to cover new kinds of coupling mentrics.
3363 2011-08-05 Steve Baird <baird@adacore.com>
3365 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
3366 of calling the user-defined main subprogram.
3367 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
3368 is set) Call_Main_Subprogram ahead of, as opposed to
3370 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3371 generation of a "with" of the user-defined main subprogram.
3372 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3373 (which is now called from Gen_Main instead).
3375 2011-08-05 Emmanuel Briot <briot@adacore.com>
3377 * projects.texi: Added reference to the Makefile package.
3379 2011-08-05 Thomas Quinot <quinot@adacore.com>
3381 * exp_ch7.adb: Minor comment rewording.
3383 2011-08-05 Ed Falis <falis@adacore.com>
3385 * env.c: Fix comment.
3387 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3389 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3390 character comparison and rely on concrete entities instead.
3392 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3394 * sem_ch3.adb: (Check_Private_Overriding): better error message,
3395 suggested by AI95-0068.
3397 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3399 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3400 the two potential initialization calls. This accounts for any
3401 access-before-elaboration checks which may precede the initialization
3403 (Next_Suitable_Statement): New routine. Returns the next real statement
3404 after the input node while skipping generated checks.
3405 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3406 with comment on usage.
3407 Do not generate Elaborate_All when the trigger is a finalization call
3408 coming from a type init proc.
3409 (Check_Elab_Call): Propagate the initialization procedure context to
3410 subsequent calls to Check_A_Call.
3411 (Check_Internal_Call_Continue): Propagate the initialization procedure
3412 context to subsequent calls to Check_Elab_Call.
3413 (Is_Finalization_Procedure): New routine. Returns True if the input
3414 entity denotes a [Deep_]Finalize routine.
3415 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3416 along with comment on usage.
3418 2011-08-05 Vadim Godunko <godunko@adacore.com>
3420 * s-atocou.ads: Add list of supported platforms.
3422 2011-08-05 Yannick Moy <moy@adacore.com>
3424 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3426 * opt.ads (Disable_ALI_File): new Boolean flag
3427 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3429 2011-08-05 Ed Falis <falis@adacore.com>
3431 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3432 environ is properly defined.
3434 2011-08-05 Vincent Celier <celier@adacore.com>
3436 * make.adb (Compilation_Phase): Exit immediately when all objects have
3437 been found up to date, to avoid multiple exit messages.
3438 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3439 same project for languages with no compiler.
3440 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3442 2011-08-05 Robert Dewar <dewar@adacore.com>
3444 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3445 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3446 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3447 s-atocou-builtin.adb: Minor reformatting.
3449 2011-08-05 Yannick Moy <moy@adacore.com>
3451 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3452 if the node to wrap is a pragma check, this node and enclosed
3453 expression are not expanded, so do not apply any transformations here.
3454 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3455 introducing transient scopes.
3457 2011-08-05 Jose Ruiz <ruiz@adacore.com>
3459 * adaint.c (__gnat_set_writable, __gnat_set_readable,
3460 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3461 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3462 routine is available, so we use the default implementation of these
3464 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3465 support for copying attributes on VxWorks 6.
3467 2011-08-05 Yannick Moy <moy@adacore.com>
3469 * debug.adb: Remove use of -gnatd.D.
3470 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3471 * opt.ads: Simplify variables for ALFA mode, to keep one only
3472 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3475 2011-08-05 Vincent Celier <celier@adacore.com>
3477 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3478 Builder'Default_Switches.
3480 2011-08-05 Vincent Celier <celier@adacore.com>
3482 * makeusg.adb: Add lines for --create-map-file switches.
3484 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3486 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3487 profile is incomplete and the full view is available, replace it with
3489 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3490 incomplete, freezing the subprogram is delayed until the full view is
3492 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3493 fixed-point multiplication operator and the predefined operator is
3494 resolved in favor of the user-defined one.
3496 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3498 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3501 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3503 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3504 whether a type lacks user-defined Read or Write operations, or has a
3505 component that lacks them.
3506 * sem_attr.adb (Check_Stream_Attribute): if restriction
3507 No_Default_Stream_Attributes is active, verify that all subcomponent
3508 types of the target have user-defined stream operations, and report
3510 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3511 * exp_strm.adb: Build_Elementary_Input_Call,
3512 Build_Elementary_Write_Call): remove checks for restriction
3513 No_Default_Stream_Attributes, now checked in semantics.
3515 2011-08-04 Vincent Celier <celier@adacore.com>
3517 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3518 switches on the command line, look for all valid --RTS switches in the
3519 Builder switches and for each language use the first runtime name found
3520 to invoke gprconfig.
3521 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3522 command line and there is no auto-configuration.
3523 (Runtime_Name_Set_For): New function.
3525 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3527 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3528 elaborate initialization expression for variable Abort when processing
3529 a package body or a declaration.
3530 (Create_Finalizer): Propagate the package context when creating the
3531 exception-related variables.
3532 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3533 For_Package along with usage comment.
3535 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3537 * gcc-interface/Makefile.in: Clean up targets.
3538 Enable new package for atomic counters and copy-on-write implementation
3539 of unbounded strings on x86 platforms.
3540 * gcc-interface/Make-lang.in: Update dependencies.
3542 2011-08-04 Robert Dewar <dewar@adacore.com>
3544 * exp_ch7.adb: Minor reformatting.
3546 2011-08-04 Robert Dewar <dewar@adacore.com>
3548 * exp_strm.adb: Minor reformatting.
3550 2011-08-04 Vadim Godunko <godunko@adacore.com>
3552 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3553 operations are not supported.
3554 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3555 * s-atocou-x86.adb: New file.
3556 * Makefile.rtl: Add s-atocou.o file
3558 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3560 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3561 (Compilation_Phase): ... here.
3562 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3564 2011-08-04 Thomas Quinot <quinot@adacore.com>
3566 * Make-generated.in: Fix minor typo in comment.
3568 2011-08-04 Thomas Quinot <quinot@adacore.com>
3570 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3573 2011-08-04 Robert Dewar <dewar@adacore.com>
3575 * a-coinho.adb: Minor reformatting.
3577 2011-08-04 Robert Dewar <dewar@adacore.com>
3579 * a-coinho.ads: Minor reformatting.
3581 2011-08-04 Vadim Godunko <godunko@adacore.com>
3583 * s-atocou.ads, s-atocou.adb: New files.
3584 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3585 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3586 direct use of GCC's atomic builtins and replace them by use of new
3587 atomic counter package.
3589 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3591 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3593 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3595 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3596 with a call to Get_External_Tag.
3597 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3598 subprogram usage. Remove the guard against package declarations and
3599 bodies since Build_Cleanup_Statements is no longer invoked in that
3601 (Build_Components): Initialize Tagged_Type_Stmts when the context
3602 contains at least one library-level tagged type.
3603 (Build_Finalizer): New local variables Has_Tagged_Types and
3604 Tagged_Type_Stmts along with associated comments on usage. Update the
3605 logic to include tagged type processing.
3606 (Create_Finalizer): Insert all library-level tagged type unregistration
3607 code before the jump block circuitry.
3608 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3609 (Expand_N_Package_Declaration): Remove the call to
3610 Build_Cleanup_Statements.
3611 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3612 unregister the external tag of a tagged type.
3613 (Processing_Actions): Reimplemented to handle tagged types.
3614 (Process_Declarations): Detect the declaration of a library-level
3615 tagged type and carry out the appropriate actions.
3616 (Unregister_Tagged_Types): Removed. The machinery has been directly
3617 merged with Build_Finalizer.
3619 2011-08-04 Robert Dewar <dewar@adacore.com>
3621 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3622 gnatls.adb, exp_ch3.adb: Minor reformatting.
3624 2011-08-04 Marc Sango <sango@adacore.com>
3626 * sem_attr.adb (Analyze_Attribute): Replace the message
3627 "invisible attribute of}" of the spark restriction violation in
3628 attribute reference by the simple message "invisible attribute of type".
3629 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3630 two insertion characters: '&' and '}'.
3632 2011-08-04 Vadim Godunko <godunko@adacore.com>
3634 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3635 * a-coinho.ads, a-coinho.adb: New file.
3636 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3638 2011-08-04 Nicolas Roche <roche@adacore.com>
3640 * alfa_test.adb: Not all ali files are containing alfa information even
3641 if compiled with -gnatd.F. So suppress warning about missing ALFA
3644 2011-08-04 Yannick Moy <moy@adacore.com>
3646 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3648 * put_alfa.adb: Check that scope name is not empty.
3650 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3652 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3653 Needs_Elementary_Stream_Operation, to determine whether user-defined
3654 Read and Write attributes are available for the elementary components
3655 of the given type. If only the predefined attributes are available,
3656 then when restriction No_Default_Stream_Attributes is active the
3657 predefined stream attributes for the composite type cannot be created.
3659 2011-08-04 Robert Dewar <dewar@adacore.com>
3661 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3662 Put routines in alpha order
3664 2011-08-04 Jose Ruiz <ruiz@adacore.com>
3666 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3667 * gcc-interface/Make-lang.in: Update dependencies.
3669 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3671 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3672 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3675 2011-08-04 Robert Dewar <dewar@adacore.com>
3677 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3678 lib-xref-alfa.adb: Minor reformatting.
3680 2011-08-04 Marc Sango <sango@adacore.com>
3682 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3683 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3684 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3687 2011-08-04 Tristan Gingold <gingold@adacore.com>
3689 * bindgen.adb (Gen_Adainit_C): Remove.
3690 (Gen_Adafinal_C): Ditto.
3691 (Gen_Elab_Externals_C): Ditto.
3692 (Gen_Elab_Calls_C): Ditto.
3693 (Gen_Elab_Order_C): Ditto.
3694 (Gen_Elab_Defs_C): Ditto.
3695 (Gen_Finalize_Library_C): Ditto.
3696 (Gen_Finalize_Library_Defs_C): Ditto.
3697 (Gen_Main_C): Ditto.
3698 (Gen_Output_File_C): Ditto.
3699 (Gen_Restrictions_C): Ditto.
3700 (Gen_Versions_C): Ditto.
3701 (Write_Info_Ada_C): Ditto.
3702 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3703 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3704 Always call Gen_Output_File_Ada.
3705 * gnatlink.adb (Begin_Info): Now a constant.
3707 (Ada_Bind_File): Remove
3708 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3709 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3710 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3711 * opt.ads (Ada_Bind_File): Remove.
3713 2011-08-04 Thomas Quinot <quinot@adacore.com>
3715 * projects.texi: Document target-specific directory in default project
3718 2011-08-04 Thomas Quinot <quinot@adacore.com>
3720 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3723 2011-08-04 Yannick Moy <moy@adacore.com>
3725 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3726 opt.ads, lib-xref.ads: Code clean up.
3728 2011-08-04 Yannick Moy <moy@adacore.com>
3730 * gnat_rm.texi: Update description of Test_Case
3731 * gnat_ugn.texi: Typo.
3733 2011-08-04 Ed Falis <falis@adacore.com>
3735 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3737 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3739 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3740 it is of type Root_Controlled. This action eliminates fields Prev and
3741 Next from type equality.
3743 2011-08-04 Yannick Moy <moy@adacore.com>
3745 * lib-xref-alfa.adb: Correct typo.
3747 2011-08-04 Matthew Heaney <heaney@adacore.com>
3749 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3752 2011-08-04 Yannick Moy <moy@adacore.com>
3754 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3755 (Analyze_Pragma): allow static string expression for name of Test_Case,
3756 instead of simply string literals.
3757 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3760 2011-08-04 Vincent Celier <celier@adacore.com>
3762 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
3763 case suffixes to find truncated main sources.
3765 2011-08-04 Tristan Gingold <gingold@adacore.com>
3767 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
3768 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
3769 (Compute_Current_Task): Ditto.
3771 2011-08-04 Tristan Gingold <gingold@adacore.com>
3773 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
3775 2011-08-04 Yannick Moy <moy@adacore.com>
3777 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
3778 library-level constant.
3779 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
3780 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
3781 used as selector of parameter association, in ALFA mode.
3783 2011-08-04 Robert Dewar <dewar@adacore.com>
3785 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
3786 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
3789 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3791 * make.adb (Linking_Phase): Set source search path before calling
3792 gnatlink in CodePeer mode.
3794 2011-08-04 Javier Miranda <miranda@adacore.com>
3796 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3797 Remove code which takes care of building TSDs.
3798 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3799 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3800 the accessibility check in VM targets.
3801 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3802 (Building_Static_DT): Now returns false for VM targets.
3803 (Build_VM_TSDs): Removed.
3804 (Expand_Interface_Conversion): Generate missing runtime check for
3805 conversions to interface types whose target type is unknown at compile
3807 (Make_VM_TSD): Add missing code to disable the generation of calls to
3808 Check_TSD if the tagged type is not defined at library level, or not
3809 has a representation clause specifying its external tag, or -gnatdQ is
3811 * exp_disp.ads (Build_VM_TSDs): Removed.
3812 (Make_VM_TSDs): Spec relocated from exp_disp.adb
3813 * sem_disp.adb (Check_Dispatching_Operation): No code required to
3814 register primitives in the dispatch tables in VM targets.
3815 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3816 initialization of class-wide interface objects in VM targets.
3817 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3820 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3822 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3823 when dotnet-ld cannot be found.
3825 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3827 * bindgen.adb: Simplify significantly generation of binder body file in
3829 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3830 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3833 2011-08-04 Yannick Moy <moy@adacore.com>
3835 * sem_prag.adb, sem.ads: Code cleanup.
3837 2011-08-04 Tristan Gingold <gingold@adacore.com>
3839 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3840 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3841 results if possible.
3842 * s-stusta.adb (Print): Adjust after changes in s-stausa.
3843 * gnat_ugn.texi: Update dynamic stack usage section.
3845 2011-08-04 Steve Baird <baird@adacore.com>
3847 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3848 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3849 contains only a call to the user-defined main subprogram.
3850 (Gen_Main_Ada) - If CodePeer_Mode is set, then
3851 call the "wrapper" subprogram instead of directly
3852 calling the user-defined main subprogram.
3854 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3856 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3857 alternatives of a case statement for controlled objects. Rename local
3858 variable A to Dead_Alt.
3859 (Expand_N_If_Statement): Check the then and else statements of an if
3860 statement for controlled objects. Check the then statements of all
3861 elsif parts of an if statement for controlled objects.
3862 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3864 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3865 detects a loop associated with the expansion of an array object.
3866 Augment the processing of the loop statements to account for a possible
3867 wrap done by Process_Statements_For_Controlled_Objects.
3868 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3869 statements and abortable part of an asynchronous select for controlled
3871 (Expand_N_Conditional_Entry_Call): Check the else statements of a
3872 conditional entry call for controlled objects.
3873 (Expand_N_Selective_Accept): Check the alternatives of a selective
3874 accept for controlled objects.
3875 (Expand_N_Timed_Entry_Call): Check the entry call and delay
3876 alternatives of a timed entry call for controlled objects.
3877 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3878 exception handler for controlled objects.
3879 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3880 Add formal parameter Nested_Constructs along with its associated
3882 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3883 Requires_Cleanup_Actions.
3884 (Process_Statements_For_Controlled_Objects): New routine.
3885 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3886 routine. Inspect a node which contains a non-handled sequence of
3887 statements for controlled objects. If such an object is found, the
3888 statements are wrapped in a block.
3890 2011-08-04 Bob Duff <duff@adacore.com>
3892 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3893 need to compare with Class_Wide_Type (T2), in order to get at the
3894 original class-wide type node.
3895 * sem_type.ads (Covers): Improve the comment.
3896 * einfo.ads (Class_Wide_Type): Improve the comment.
3897 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3898 the type of the Deref.
3900 2011-08-04 Yannick Moy <moy@adacore.com>
3902 * gnat_rm.texi: Document that Test_Case pragma can only appear on
3903 separate declarations.
3904 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3905 check identifier of pragma argument.
3906 (Chain_TC): check that no other test case associated to the same entity
3907 share the same name.
3908 (Check_Test_Case): disallow test case inside subprogram body
3909 (Analyze_Pragma): correct call to check identifier and not argument
3910 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3911 function gets name from test case pragma.
3913 2011-08-04 Yannick Moy <moy@adacore.com>
3915 * gnat_rm.texi: Document new pragma and aspect.
3916 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3917 (No_Duplicates_Allowed): new constant array defining whether duplicates
3918 aspects of each kind can appear on the same declaration.
3919 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3920 field, which points to a node holding the previous Spec_PPC_List.
3921 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3922 through the indirection with Contract.
3923 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3924 * par-prag.adb (Prag): do nothing on Test_Case pragma
3925 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3927 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3928 component Ensures of Test_Case.
3929 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3930 (Analyze_Generic_Subprogram_Declaration,
3931 Analyze_Subprogram_Instantiation,
3932 Analyze_Abstract_Subprogram_Declaration,
3933 Analyze_Subprogram_Body_Helper,
3934 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3935 insert contract in subprogram node at point of definition
3937 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3938 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3939 corresponding pragma
3940 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3941 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3942 similar to the analysis of pre/post
3943 (Derive_Subprogram): insert contract in subprogram node at point of
3945 * sem_prag.adb, sem_prag.ads
3946 (Check_Arg_Is_String_Literal, Check_Identifier):
3947 new checking procedures to be called in treatment of pragmas
3948 (Check_Test_Case): new procedure to check that a Test_Case aspect or
3949 pragma is well-formed. This does not check currently that 'Result is
3950 used only in the Ensures component of a Test_Case.
3951 (Analyze_Pragma): add case for Test_Case
3952 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3953 components of a Test_Case.
3954 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3955 expressions in the 3rd (and 4th if present) arguments of a Test_Case
3956 pragma, treated as spec expressions.
3957 (Sig_Flags): add value -1 for Test_Case.
3958 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3959 Get_Requires_From_Test_Case_Pragma): getters for both expression
3960 components of a Test_Case.
3961 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3962 indirection between an entry or [generic] subprogram entity and its
3963 pre/post + test-cases.
3964 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3965 get/set for fields of an N_Contract node.
3966 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3967 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3968 names and pragma for Test_Case.
3969 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3971 2011-08-04 Vincent Celier <celier@adacore.com>
3973 * gnat_ugn.texi: Improve documentation of gnatmake switch
3974 --source-info-file=.
3976 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3978 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3979 type). Initialize Atyp to the appropriate type which is later checked
3980 for completion. Rewrite the assertion associated with private type
3983 2011-08-04 Ed Falis <falis@adacore.com>
3985 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3986 initialize the number of CPUs.
3988 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3990 * sem_type.adb (Disambiguate): New subsidiary routine
3991 In_Same_Declaration_List, to implement AI05-0020: a user-defined
3992 equality on an anonymous access type whose designated type is private
3993 does not lead to an ambiguity with the universal access equality
3994 operator in the body or child units of the defining package. The same
3995 is true for a multiplication operator on a private type completed with
3998 2011-08-04 Javier Miranda <miranda@adacore.com>
4000 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
4001 (Normalize_Scalars_Config): Removed.
4003 (Register_Opt_Config_Switches): Remove registering config values of
4004 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
4005 (Restore_Opt_Config_Switches): Remove code which restores the values of
4006 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4007 Init_Or_Norm_Scalars.
4008 (Save_Opt_Config_Switches): Remove code which saves values of
4009 Init_Or_Norm_Scalars and Normalize_Scalars.
4010 (Set_Opt_Config_Switches): Remove code which restores config values of
4011 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4012 Init_Or_Norm_Scalars.
4014 2011-08-04 Yannick Moy <moy@adacore.com>
4016 * frontend.adb (Frontend): remove previous patch to avoid full
4017 qualification in ALFA mode.
4018 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4019 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4020 unique name for an entity, which could be used to identify the entity
4021 across compilation units.
4023 2011-08-04 Thomas Quinot <quinot@adacore.com>
4026 (Initialize_Default_Project_Path): Add target specific directory
4027 ($prefix/$target/lib/gnat) in front of project path in all cases
4028 (making gnatmake's behaviour consistent with gprbuild).
4029 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4030 Pass target name from Sdefault to project subsystem.
4031 * gnatls.adb: Show new target specific default project directory.
4033 2011-08-04 Johannes Kanig <kanig@adacore.com>
4035 * cstand.adb: Add Information to Identifier in Standard
4036 (Identifer_For): Set Entity to the corresponding entity
4038 2011-08-04 Sergey Rybin <rybin@adacore.com>
4040 * gnat_ugn.texi: Update doc on gnatcheck.
4042 2011-08-04 Yannick Moy <moy@adacore.com>
4044 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4047 2011-08-04 Yannick Moy <moy@adacore.com>
4049 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4050 performing expansion.
4051 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4052 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4053 it is not called in ALFA mode.
4055 2011-08-04 Emmanuel Briot <briot@adacore.com>
4057 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4058 after all, so removed.
4060 2011-08-04 Sergey Rybin <rybin@adacore.com>
4062 * vms_data.ads: Add missing VMS qualifiers.
4064 2011-08-04 Emmanuel Briot <briot@adacore.com>
4066 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4067 the list of files on the command line after processing it through
4070 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4072 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4073 processing for .NET/JVM. These targets can now benefit from
4074 Raise_From_Controlled_Operation and they share the same processing with
4076 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4077 These targets need transient scopes in order to properly finalize short
4078 lived controlled objects.
4079 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4080 NET/JVM. These targets can now benefit from
4081 Raise_From_Controlled_Operation and they share the same processing with
4084 2011-08-04 Geert Bosch <bosch@adacore.com>
4086 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4088 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4090 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4091 Expand_Record_Aggregate, to determine whether aggregate must be
4092 expanded into assignments. This is the case if the ancestor part is
4093 private, regarless of the setting of the flag Has_Private_Ancestor.
4095 2011-08-04 Ed Falis <falis@adacore.com>
4097 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4099 2011-08-04 Bob Duff <duff@adacore.com>
4101 * sinfo.ads: Fix comment.
4103 2011-08-04 Steve Baird <baird@adacore.com>
4105 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4106 choose a package name in much the same way as is
4107 done for JGNAT when VM_Target /= No_VM, except that
4108 a slightly more distinctive prefix string is used.
4110 2011-08-04 Emmanuel Briot <briot@adacore.com>
4112 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4113 gnatmake command line.
4114 This behavior was never documented (and was supported only because of
4115 an early bug in the code). This case might lead to ambiguous cases
4116 (between unit names and truncated base names without suffixes).
4118 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4120 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4121 Remove the external tag of a tagged type from the internal hash table.
4122 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4123 expanded usage of the routine. Strenghten the check for Is_Master. Add
4124 processing for tagged types.
4125 (Build_Finalizer): Create all the necessary lists used in finalizer
4126 creation when the processed context is a package that may contain
4128 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4129 Requires_Cleanup_Actions.
4130 (Expand_N_Package_Body): Package bodies may need clean up code
4131 depending on whether they contain tagged types.
4132 (Expand_N_Package_Declaration): Package declarations may need clean up
4133 code depending on whether they contain tagged types.
4134 (Unregister_Tagged_Types): New routine. Search through a list of
4135 declarations or statements, looking for non-abstract Ada tagged types.
4136 For each such type, generate code to unregister the external tag.
4137 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4138 Requires_Cleanup_Actions.
4139 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4140 through a list of declarations or statements looking for non-abstract
4141 Ada tagged types or controlled objects.
4142 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4143 Requires_Cleanup_Actions.
4144 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4145 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4148 2011-08-04 Vincent Celier <celier@adacore.com>
4150 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4151 has Ada sources, not project Project, because if the root project
4152 Project has no sources of its own, all projects will be deemed without
4155 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4157 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4158 of the No_Param_Proc acc-to-subp type used for initialization of
4159 __gnat_finalize_library_objects so that it's declared at library level
4160 rather than nested inside of the adainit routine.
4162 2011-08-04 Javier Miranda <miranda@adacore.com>
4164 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4165 if the tagged type has a representation clause which specifies its
4168 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4170 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4171 Remove previous procedure with that name.
4172 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4174 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4175 subtype mark, the ancestor cannot have unknown discriminants.
4176 (Resolve_Record_Aggregate): if the type has invisible components
4177 because of a private ancestor, the aggregate is illegal.
4179 2011-08-04 Vincent Celier <celier@adacore.com>
4181 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4182 account switches -gnat2005, -gnat12 and -gnat2012.
4184 2011-08-04 Bob Duff <duff@adacore.com>
4186 * s-tasdeb.ads: Minor comment fix.
4188 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4190 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4192 * switch.ads, switch.adb (Is_Language_Switch): New function.
4194 2011-08-04 Vincent Celier <celier@adacore.com>
4196 * switch-c.adb: Minor comment addition.
4198 2011-08-04 Vincent Celier <celier@adacore.com>
4200 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4201 ending with '=' is followed by a space (missing file name).
4203 2011-08-04 Pascal Obry <obry@adacore.com>
4205 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4207 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4209 * sem_ch12.adb (Analyze_Associations): New routine
4210 Check_Overloaded_Formal_Subprogram to reject a formal package when
4211 there is a named association or a box initialisation for an overloaded
4212 formal subprogram of the corresponding generic.
4214 2011-08-04 Yannick Moy <moy@adacore.com>
4216 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4217 * get_alfa.adb, put_alfa.adb: Read and write new component of
4219 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
4221 2011-08-04 Pascal Obry <obry@adacore.com>
4223 * urealp.adb: Minor reformatting.
4225 2011-08-04 Tristan Gingold <gingold@adacore.com>
4227 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
4228 Handle the case when Cleanup_Protected_Object returns Empty.
4230 2011-08-04 Yannick Moy <moy@adacore.com>
4232 * frontend.adb (Frontend): only qualify names in non-ALFA mode
4234 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4236 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
4237 call, ignore functions.
4239 2011-08-04 Geert Bosch <bosch@adacore.com>
4241 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
4244 2011-08-04 Emmanuel Briot <briot@adacore.com>
4246 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
4247 as an index for Builder'Switches. This conforms to the documentation.
4248 * make.adb (Insert_Project_Sources): avoid duplicate code
4250 2011-08-04 Emmanuel Briot <briot@adacore.com>
4252 * makeutl.adb (Complete_Mains): if the user has passed a relative file
4253 name on the command line (for instance "../dummy"), never assume it can
4256 2011-08-04 Tristan Gingold <gingold@adacore.com>
4258 * bindgen.adb: Remove code the reference or create the
4259 Break_Start/__gnat_break_start procedure.
4260 * s-stalib.adb (Break_Start): Removed.
4262 2011-08-04 Emmanuel Briot <briot@adacore.com>
4264 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4265 shared with gprbuild.
4267 2011-08-04 Yannick Moy <moy@adacore.com>
4269 * par-ch4.adb (P_Primary): preferentially issue an error message about
4270 a missing parenthesis arount a conditional or case expression in Ada
4271 2012 mode, if we detect that the alignment is not correct for a
4274 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4276 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4277 tag-to-class-wide conversion as needing finalization actions.
4278 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4279 a tag-to-class-wide conversion as needing finalization actions.
4280 (Is_Finalizable_Transient): The result of a tag-to-class-wide
4281 conversion does not need finalization actions.
4282 (Is_Tag_To_CW_Conversion): New routine.
4283 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4284 whether an object is the result of a tag-to-class-wide conversion.
4286 2011-08-04 Yannick Moy <moy@adacore.com>
4288 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4289 the left-hand-side and right-hand-side of a conjunct are inserted when
4290 translating a pre- or postcondition
4291 * sem_ch6.adb: Correct typo in comment
4293 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4295 * gnat_rm.texi: Ravenscar does not prohibit dependence on
4296 Unchecked_Conversion and Unchecked_Deallocation.
4298 2011-08-04 Thomas Quinot <quinot@adacore.com>
4300 * make.adb: Minor reformatting.
4302 2011-08-04 Emmanuel Briot <briot@adacore.com>
4304 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4305 sources in the project and its imported projects, but not in the whole
4308 2011-08-04 Emmanuel Briot <briot@adacore.com>
4310 * make.adb: Remove debug trace.
4312 2011-08-04 Vincent Celier <celier@adacore.com>
4314 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4315 path in canonical form, to be able to compare path names on platforms
4316 such as Windows or Darwin.
4318 2011-08-04 Thomas Quinot <quinot@adacore.com>
4320 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4321 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4322 * scos.ads: Update documentation accordingly.
4323 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4326 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4328 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4329 attribute only if prefix type is scalar.
4331 2011-08-04 Emmanuel Briot <briot@adacore.com>
4333 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4334 in gnatmake for specifying mains on the command line that do not belong
4335 to the main project. These mains must currently all belong to the same
4337 (Ultimate_Extension_Of): removed, since duplicated
4338 Ultimate_Extending_Project.
4340 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4342 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4344 (CodePeer_Mode_String): New.
4345 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4347 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4348 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4349 mode, since no useful elaboration subprogram is needed by CodePeer.
4350 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4351 In this mode, compile binder file with -gnatC and do stop after this
4354 2011-08-04 Vincent Celier <celier@adacore.com>
4356 * exp_ch7.adb: Minor comment fix.
4358 2011-08-04 Robert Dewar <dewar@adacore.com>
4360 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4361 exp_ch4.adb, makeutl.adb: Minor reformatting.
4363 2011-08-04 Emmanuel Briot <briot@adacore.com>
4365 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4366 Create several new subprograms to move code out of Make. This makes the
4367 code more readable, removes code duplication, and is a preparation work
4368 for adding support for aggregate projects.
4370 2011-08-04 Tristan Gingold <gingold@adacore.com>
4372 * s-po32gl.ads, s-po32gl.adb: New files.
4373 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4374 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4375 (Build_Finalization_Collection): Use it.
4376 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4377 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4379 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4380 * gcc-interface/Make-lang.in: Update dependencies.
4382 2011-08-04 Emmanuel Briot <briot@adacore.com>
4384 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4387 2011-08-04 Emmanuel Briot <briot@adacore.com>
4389 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4390 command line is not a file name, also check whether it could be a unit
4393 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4395 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4396 the header of the finalization routine.
4397 If the unit has no finalizer but is a body whose spec has one, then
4398 generate the decrement of the elaboration entity only.
4399 If the unit has a finalizer and is a spec, then do not generate the
4400 decrement of the elaboration entity.
4401 (Gen_Finalize_Library_C): Likewise.
4403 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4405 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4406 (Bounds_Size_Expression): Removed.
4407 (Double_Alignment_Of): New subsidiary routine.
4408 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4409 for a hole in the dope vector of unconstrained arrays due to different
4410 index and element alignments.
4412 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4414 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4415 raise program_error because body has not been seen yet.
4417 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4419 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4422 2011-08-04 Vincent Celier <celier@adacore.com>
4424 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4426 2011-08-04 Yannick Moy <moy@adacore.com>
4428 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4429 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4431 2011-08-04 Thomas Quinot <quinot@adacore.com>
4433 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4434 instantiation in RCI.
4436 2011-08-04 Emmanuel Briot <briot@adacore.com>
4438 * make.adb: Share more code with gprbuild
4440 2011-08-04 Emmanuel Briot <briot@adacore.com>
4442 * projects.texi: Added documentation for the IDE'Gnat project file
4445 2011-08-04 Nicolas Roche <roche@adacore.com>
4447 * gnat_rm.texi: Minor editing.
4449 2011-08-04 Javier Miranda <miranda@adacore.com>
4451 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4452 and the library case for VM targets.
4453 (Gen_Adainit_Ada): Likewise.
4455 2011-08-04 Robert Dewar <dewar@adacore.com>
4457 * g-altive.ads: Minor comment updates.
4458 * prj-nmsc.adb: Minor reformatting.
4460 2011-08-04 Javier Miranda <miranda@adacore.com>
4463 (Normalize_Scalars_Config): Value of the configuration switch set by
4464 pragma Normalize_Scalars when it appears in the gnat.adc file.
4465 (Normalize_Scalars): New field for record Config_Switches_Type. Used
4466 to save and restore settings of this pragma.
4468 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4469 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4471 2011-08-04 Vincent Celier <celier@adacore.com>
4473 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4475 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4477 * makeutl.adb: Minor reformatting.
4479 2011-08-04 Olivier Hainque <hainque@adacore.com>
4481 * g-altive.ads: Update comments to reflect that only the soft
4482 binding is available today.
4484 2011-08-04 Robert Dewar <dewar@adacore.com>
4486 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4487 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4488 * gcc-interface/Make-lang.in: Update dependencies.
4490 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4492 * prj-env.adb: Remove local debug traces.
4494 2011-08-04 Yannick Moy <moy@adacore.com>
4496 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4497 was used instead of Hi_OK, which could cause a read of an uninitialized
4498 value later on. Detected while working on the new warning.
4499 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4501 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4502 in more cases, in order to detect more unreferenced values.
4503 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4504 object for expression, if any.
4506 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4508 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4509 the operand types instead of the Esize.
4511 2011-08-04 Steve Baird <baird@adacore.com>
4513 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4514 enable CodePeer_Mode.
4515 * bindusg.adb (Display): Add help message describing -P binder switch.
4516 * gnat_ugn.texi: Document -P binder switch.
4517 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4518 user-defined main program directly.
4519 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4520 user-defined main program in the context clause of the package body.
4522 2011-08-04 Yannick Moy <moy@adacore.com>
4524 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4525 duplicate of Defining_Entity
4526 (Get_Unique_Entity_For_Decl): rename function into
4527 Unique_Defining_Entity
4528 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4529 (Formal_Proof_On): remove synthesized flag
4530 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4531 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4532 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4533 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4534 Annotate (Formal_Proof)
4536 2011-08-04 Emmanuel Briot <briot@adacore.com>
4538 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4539 source files with non-standard naming schemes, in imported projects
4541 2011-08-04 Emmanuel Briot <briot@adacore.com>
4543 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4544 specified on the gprbuild command line, we need to compile all units
4545 within that file, not just the first one we find
4546 Fix error message for mains that are not found.
4548 2011-08-04 Thomas Quinot <quinot@adacore.com>
4550 * sem_ch6.adb: Update comment.
4551 * sem_ch12.adb: Minor reformatting.
4553 2011-08-04 Bob Duff <duff@adacore.com>
4555 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4556 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4557 race condition whose symptom is to fail to lock Parent. That, in turn,
4558 causes Parent.Awake_Count to be accessed without locking Parent, which
4559 causes another race condition whose symptom is that Parent.Awake_Count
4560 can be off by 1 (either too high or too low). The solution is to lock
4561 Parent unconditionally, and then lock Acceptor, before reading
4562 Acceptor.Terminate_Alternative.
4564 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4566 * debug.adb: Update comment.
4568 2011-08-04 Robert Dewar <dewar@adacore.com>
4570 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4571 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4572 exp_ch6.adb: Minor reformatting.
4574 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4576 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4579 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4581 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4583 2011-08-04 Thomas Quinot <quinot@adacore.com>
4585 * sinfo.ads: Minor reformatting.
4587 2011-08-04 Emmanuel Briot <briot@adacore.com>
4589 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4590 even if there is no location.
4592 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4594 * sem_res.adb, sem_ch4.adb: move check for restriction
4595 No_Task_Hierarchy to resolve_allocator.
4597 2011-08-04 Thomas Quinot <quinot@adacore.com>
4599 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4600 This flag of N_Pragma nodes is not used, remove it as well as all of
4601 the associated circuitry.
4603 2011-08-04 Javier Miranda <miranda@adacore.com>
4605 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4606 runtime check on duplicated externa tags
4607 * debug.adb Document switch -gnatdQ.
4609 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4611 * a-fihema.ads: Minor typo fix.
4613 2011-08-04 Yannick Moy <moy@adacore.com>
4615 * sem_ch10.adb: Minor comment update.
4617 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4619 * einfo.adb: Update the node field usage to reflect the renaming of
4620 Return_Flag to Return_ Flag_Or_Transient_Decl.
4621 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4622 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4623 (Write_Field15_Name): Change Return_Flag to
4624 Return_Flag_Or_Transient_Decl.
4625 * einfo.ads: Rename node field Return_Flag to
4626 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4627 occurrences in entities.
4628 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4629 associated Inline pragma.
4630 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4631 associated Inline pragma.
4632 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4634 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4635 Return_Flag and Set_Return_Flag.
4636 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4637 objects generated for controlled transients declared inside an
4638 Exception_With_Actions. Update the calls to Return_Flag.
4639 (Process_Object_Declaration): Add code to add a null guard for hook
4640 objects generated for controlled transients declared inside an
4641 Exception_With_Actions. Update related comment.
4642 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4643 objects generated for controlled transients declared inside an
4644 Exception_With_Actions. Update the calls to Return_Flag.
4645 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4647 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4649 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4650 positional aggregate.
4652 2011-08-04 Vincent Celier <celier@adacore.com>
4654 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4655 SLOC only for pragmas.
4657 2011-08-04 Emmanuel Briot <briot@adacore.com>
4659 * projects.texi: Minor typo fix.
4661 2011-08-04 Emmanuel Briot <briot@adacore.com>
4663 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4664 on case-sensitive file systems.
4666 2011-08-04 Thomas Quinot <quinot@adacore.com>
4668 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4669 nested in a disabled pragma.
4670 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4671 enclosing pragma, if any, for X decisions.
4673 2011-08-04 Thomas Quinot <quinot@adacore.com>
4675 * sem_prag.adb: Minor reformatting.
4677 2011-08-04 Vincent Celier <celier@adacore.com>
4679 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4680 allowed in no run time mode.
4682 2011-08-04 Vincent Celier <celier@adacore.com>
4684 * make.adb (Check): When -gnatc is used, check for the source file
4685 inside the ALI file with a canonical case file name.
4687 2011-08-04 Emmanuel Briot <briot@adacore.com>
4689 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4690 overriding the separator.
4692 2011-08-04 Robert Dewar <dewar@adacore.com>
4694 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4695 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4697 2011-08-04 Robert Dewar <dewar@adacore.com>
4699 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4701 2011-08-04 Yannick Moy <moy@adacore.com>
4703 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4704 'Result only appears in postcondition of function.
4706 2011-08-04 Thomas Quinot <quinot@adacore.com>
4708 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4709 external tag, include the value of the external tag in the exception
4712 2011-08-04 Yannick Moy <moy@adacore.com>
4714 * sem_attr.adb (Result): modify error message for misplaced 'Result
4716 2011-08-04 Sergey Rybin <rybin@adacore.com>
4718 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4719 clear that the second argument must be an identifier.
4721 2011-08-04 Thomas Quinot <quinot@adacore.com>
4723 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4724 -fpreserve-control-flow, insert an IF statement on the barrier
4725 condition to ensure that a conditional branch instruction is generated.
4727 2011-08-04 Emmanuel Briot <briot@adacore.com>
4729 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4730 (Processing_Flags.Ignore_Missing_With): new flag.
4732 2011-08-04 Emmanuel Briot <briot@adacore.com>
4734 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4735 Source_List_File on case-insensitive systems where the file is actually
4736 on a case-sensitive file system (NFS,...).
4738 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4740 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4741 function return contains a controlled [extension] aggregate and the
4742 return statement is not part of a handled sequence of statements, wrap
4743 the return in a block. This ensures that all controlled temporaries
4744 generated during aggregate resolution will be picked up by the
4745 finalization machinery.
4747 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4749 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4750 components, freeze type before resolution, to ensure that default
4751 initializations are present for all components.
4752 * sem_res.adb (Resolve_Actuals): the designated object of an
4753 accces-to-constant type is a legal actual in a call to an
4754 initialization procedure.
4756 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4758 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
4759 N_Unchecked_Type_Conversion to the possible containers of a renamed
4762 2011-08-04 Yannick Moy <moy@adacore.com>
4764 * par-ch13.adb (Aspect_Specifications_Present): recognize
4765 "with Identifier'Class =>" as an aspect, so that a meaningful warning
4766 is issued in Strict mode.
4767 * par.adb: Fix typos in comments.
4769 2011-08-04 Yannick Moy <moy@adacore.com>
4771 * sem_attr.adb (Result): modify error message to take into account Post
4772 aspect when compiling Ada 2012 (or newer) code.
4774 2011-08-04 Nicolas Roche <roche@adacore.com>
4776 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
4777 remove need for GCC exceptions.
4779 2011-08-04 Vincent Celier <celier@adacore.com>
4781 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
4782 project, not the source file name.
4783 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
4784 excluded, continue looking. This excluded source will only be returned
4785 if there is no other source with the same base name that is not locally
4788 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4790 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
4791 private and one of the operands is a real literal, use a qualified
4792 expression rather than a conversion which is not meaningful to the
4795 2011-08-04 Yannick Moy <moy@adacore.com>
4797 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4798 corresponding aspect X'Class are allowed, proceed with analysis of the
4799 aspect instead of skipping it.
4801 2011-08-04 Tristan Gingold <gingold@adacore.com>
4803 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4804 This will allow to have an Ada implementation for the subprogram.
4806 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4808 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4809 completion and aspects are present, apply them to the entity for the
4810 type which is currently the partial view, but which is the one that
4812 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4813 applies to a partial view, indicate that the full view has predicates
4814 and delayed aspects.
4815 (Replace_Type_Reference): Handle properly predicates that apply to the
4816 full view of a private completion.
4818 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4820 * layout.adb (Layout_Type): For composite types, do not set Esize.
4821 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4823 (Size_Known): Look at the RM size of components instead of the Esize.
4824 (Freeze_Record_Type): Look at the RM size instead of the Esize to
4825 issue warning and activate Implicit_Packing.
4826 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
4827 if the Esize is not known.
4828 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4829 for elementary types only.
4830 (Analyze_Record_Representation_Clause): Look at the RM size instead
4831 of the Esize to issue errors.
4832 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4834 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
4836 Look at the RM size instead of the Esize for types if the latter is
4838 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4840 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4842 * sem_type.adb: proper handling of equality not involving anonymous
4845 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4847 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4848 Vis_Decls. When creating a library-level finalizer for a package spec,
4849 both the declaration and body of the finalizer are inserted either in
4850 the visible or private declarations of the package spec.
4852 2011-08-04 Javier Miranda <miranda@adacore.com>
4854 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4855 use of the full-view of a type when invoking Is_Ancestor.
4856 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4857 the full-view of private parents is requested, then use also the
4858 full-view of the parent of the first derivation.
4860 2011-08-04 Tristan Gingold <gingold@adacore.com>
4862 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4863 instead of the locally imported procedure.
4864 * s-taprop-mingw.adb (Enter_Task): Ditto.
4865 * s-valrea.adb (Scan_Real): Ditto.
4866 * s-imgrea.adb (Set_Image_Real): Ditto.
4867 * s-flocon.ads: Make the package pure.
4869 2011-08-04 Thomas Quinot <quinot@adacore.com>
4871 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4872 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4873 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4874 New subprogram, moved here from...
4875 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4876 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4877 rewriting of the last argument into a procedure call statement here...
4878 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4881 2011-08-04 Thomas Quinot <quinot@adacore.com>
4883 * par_sco.adb: Minor reformatting.
4885 2011-08-04 Robert Dewar <dewar@adacore.com>
4887 * erroutc.adb: Minor reformatting.
4889 2011-08-04 Thomas Quinot <quinot@adacore.com>
4891 * par_sco.adb: Comment update.
4893 2011-08-04 Tristan Gingold <gingold@adacore.com>
4895 * s-flocon.ads: New file.
4896 * g-flocon.ads: Now a renaming of s-flocon.
4897 * Makefile.rtl: Add s-flocon.o
4899 2011-08-04 Javier Miranda <miranda@adacore.com>
4901 * exp_strm.adb (Build_Array_Input_Function): if the array type is
4902 constrained, do not attempt to build a subtype of it.
4904 2011-08-04 Yannick Moy <moy@adacore.com>
4906 * errout.ads Change comments: remove 'R'M as an example where quotes
4907 are needed; add ALFA as another case where quotes are not needed
4908 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4909 case where quotes are not needed.
4910 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4911 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4912 Remove all occurrences of 'A'L'F'A
4914 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4916 * sem_ch13.adb: check legality of invariant pragma.
4918 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4920 * bindgen.adb: Add comments.
4922 2011-08-04 Yannick Moy <moy@adacore.com>
4924 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4926 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4927 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4929 2011-08-04 Robert Dewar <dewar@adacore.com>
4931 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4932 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4933 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4935 2011-08-04 Thomas Quinot <quinot@adacore.com>
4937 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4939 2011-08-04 Thomas Quinot <quinot@adacore.com>
4942 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4945 2011-08-04 Robert Dewar <dewar@adacore.com>
4947 * einfo.ads, exp_ch4.adb: Minor reformatting.
4949 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4951 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4953 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4955 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4956 type in all cases to compute list of primitive operations, because full
4957 view may be an itype that is not attached to the list of declarations.
4959 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4961 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4962 library has already been finalized.
4963 (Gen_Adafinal_C): Likewise.
4964 (Gen_Adainit_Ada): Generate an early return if the library has
4965 already been elaborated.
4966 (Gen_Adainit_C): Likewise.
4967 (Gen_Output_File_Ada): Generate an elaboration flag.
4968 (Gen_Output_File_C): Likewise.
4970 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4972 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4973 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4974 built in the first place.
4975 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4976 for CodePeer because Finalize_Address was not built to begin with.
4977 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4979 2011-08-04 Pascal Obry <obry@adacore.com>
4981 * adaint.c (__gnat_tmp_name): Use current process id to create temp
4982 filenames, this ensures unicity of filenames across processes.
4984 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4986 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4987 Raise_Controlled to Raise_From_Controlled_Operation. Update the
4988 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4989 Add False as the actual to From_Abort in the generated call to
4990 Raise_From_Controlled_Operation.
4992 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4994 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4995 so that the ali file name can be retrieved from outside of this package.
4996 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4997 doing nothing in the general case, but used to update the object file
4998 timestamp if directly generated by the backend.
4999 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
5000 to a later time than the ali file one.
5002 2011-08-04 Yannick Moy <moy@adacore.com>
5004 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
5005 entities whose body contains an Annotate pragma which forces formal
5007 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5008 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
5009 Mark_Non_ALFA_Subprogram to pass in a message and node.
5010 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5011 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5012 surrounding subprogram.
5013 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5014 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5015 as not in ALFA is annotated with Formal_Proof being On, then an error
5016 is issued based on the additional parameters for message and node.
5017 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5018 * gcc-interface/Make-lang.in: Update dependencies.
5020 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5022 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5023 Finalize_Address when CodePeer is enabled.
5025 2011-08-04 Pascal Obry <obry@adacore.com>
5027 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5028 the latter returns a pointer to a static buffer which is deallocated
5029 at the end of the routine.
5031 2011-08-04 Yannick Moy <moy@adacore.com>
5033 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5034 after index creation; mark unconstrained base array type generated as
5035 being in/not in ALFA as well
5036 (Make_Index): mark subtype created as in/not in ALFA
5037 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5038 over a loop as in/not in ALFA, depending on its type and form of loop
5041 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5043 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5044 directly to False on .NET and JVM.
5046 2011-08-04 Yannick Moy <moy@adacore.com>
5048 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5049 constraint that subtype must come from source code to be in ALFA, so
5050 that anonymous subtypes can be in ALFA too.
5052 2011-08-04 Yannick Moy <moy@adacore.com>
5054 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5055 reference for ALFA mode.
5056 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5057 procedure public so as to use it from formal verification back-end.
5059 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5061 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5062 invalid checks of the Parameter, making Remove_Switch not working
5065 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5067 * targparm.ads: Update header: no run-time exception is needed on this
5070 2011-08-04 Vincent Celier <celier@adacore.com>
5072 * a-fihema.adb: Use System.IO instead of GNAT.IO
5074 2011-08-04 Thomas Quinot <quinot@adacore.com>
5076 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5077 are forbidden in Compiler_Unit mode.
5079 2011-08-04 Robert Dewar <dewar@adacore.com>
5081 * sem_util.adb: Minor reformatting.
5083 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5085 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5086 library-level finalizers.
5087 (Gen_Finalize_Library_C): Update the import string for library-level
5089 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5090 library-level finalizer.
5091 * exp_ch7.adb: Remove with and use clauses for Stringt.
5092 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5093 Spec_Decl. Add local variable Body_Id. The names of library-level
5094 finalizers are now manually fully qualified and are no longer external.
5095 A single name is now capable of servicing .NET, JVM and non-VM targets.
5096 Pragma Export is no longer required to provide visibility for the name.
5097 (Create_Finalizer_String): Removed.
5098 (New_Finalizer_Name): New routine which mimics New_..._Name.
5100 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5102 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5103 elaboration counter to Standard_Short_Integer.
5104 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5105 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5106 (Gen_Elab_Externals_C): Likewise.
5108 2011-08-04 Ed Falis <falis@adacore.com>
5110 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5111 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5112 system-vxworks-mips.ads, system-vxworks-x86.ads
5113 (Always_Compatible_Rep): set to False for all VxWorks targets.
5115 2011-08-04 Robert Dewar <dewar@adacore.com>
5117 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5118 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5119 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5120 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5121 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5122 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5123 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5124 Minor reformatting and code reorganization.
5126 2011-08-04 Emmanuel Briot <briot@adacore.com>
5128 * projects.texi: Added doc for aggregate projects.
5130 2011-08-04 Emmanuel Briot <briot@adacore.com>
5132 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5133 Add support for overriding the Project_Path in aggregate projects.
5135 2011-08-04 Robert Dewar <dewar@adacore.com>
5137 * a-cofove.ads: Minor reformatting.
5139 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5141 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5142 on the generated code.
5143 (Build_Finalize_Statements): Update the comment on the generated code.
5144 (Build_Initialize_Statements): Update the comment on the generated code.
5145 (Build_Object_Declarations): Add local variable Result. The object
5146 declarations are now built in sequence.
5147 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5150 2011-08-04 Robert Dewar <dewar@adacore.com>
5152 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5154 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5156 * einfo.ads (Elaboration_Entity): Document new definition and use.
5157 (Elaboration_Entity_Required): Adjust to above change.
5158 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5159 * exp_ch12.adb: And with and use for Snames.
5160 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5161 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5162 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5163 <Check_Unit_Name>: Deal with N_Expanded_Name.
5164 <Attribute_Elaborated>: Extend to all unit names.
5165 * sem_elab.adb: And with and use for Uintp.
5166 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5167 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5168 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5169 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5170 from Gen_Adainit_Ada.
5171 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5172 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5173 case, do not call System.Standard_Library.Adafinal; instead call
5174 finalize_library if needed.
5175 (Gen_Adafinal_C): Likewise.
5176 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5177 non-main program case.
5178 (Gen_Adainit_C): Generate a couple of external declarations here.
5179 In the main program case, set SSL.Finalize_Library_Objects.
5180 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5181 (Gen_Elab_Calls_C): Likewise.
5182 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5183 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5184 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5186 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5187 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5189 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5190 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
5191 of external declarations. Call Gen_Finalize_Library_C.
5193 2011-08-04 Emmanuel Briot <briot@adacore.com>
5195 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5196 Compute_Compilation_Phases): new subprogram.
5197 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5198 The number of mains as well as the various compilation phases that
5199 need to be run are now project tree specific, since various
5200 aggregated trees might have different requirements. In particular,
5201 they do not all require bind or link phases.
5203 2011-08-04 Emmanuel Briot <briot@adacore.com>
5205 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5206 (Project_Tree_Appdata): New type.
5207 It is now possible to associate application-specific data to a project
5208 tree. In particular, this is used in the gprbuild builder to avoid a
5209 number of global tables and htables, especially now that there can be
5210 several project trees loaded at once because of aggregate projects.
5211 (Debug_Name): new procedure.
5212 * projects.texi: Clarify syntax of "**" for Source_Dirs
5214 2011-08-03 Emmanuel Briot <briot@adacore.com>
5216 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5217 the "roots" for a main.
5218 (Fill_From_Project): add support for aggregate projects. Main units
5219 in aggregated projects are now automatically added in the list of
5220 files to build (although this fails later on in gprbuild, because
5221 these files are not using the root proejct tree, so this needs
5223 * gcc-interface/Make-lang.in: Update dependencies.
5225 2011-08-03 Yannick Moy <moy@adacore.com>
5227 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
5228 conditional expression in ALFA.
5229 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
5230 expressions as not in ALFA.
5232 2011-08-03 Robert Dewar <dewar@adacore.com>
5234 * a-cofove.adb: Minor reformatting.
5236 2011-08-03 Emmanuel Briot <briot@adacore.com>
5238 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
5239 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
5241 These packages are more logically placed in the Queue package, since
5242 they manipulate the queue. It is also likely that they can be adapted
5243 for gnatmake, thus sharing more code.
5244 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
5245 that we could move the above.
5247 2011-08-03 Emmanuel Briot <briot@adacore.com>
5249 * errutil.adb (Finalize): clean up the list of error messages on exit.
5250 Calling this subprogram multiple times will no longer show duplicate
5251 error messages on stderr.
5253 2011-08-03 Emmanuel Briot <briot@adacore.com>
5255 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
5256 Getopt_Switches when we have already define a command line
5259 2011-08-03 Yannick Moy <moy@adacore.com>
5261 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5262 in ALFA. Instead, they are considered as assertions to prove.
5263 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5264 nodes as not in ALFA. Instead, include conditional expressions in ALFA
5265 if they have no ELSE part, or if they occur in pre- and postconditions,
5266 where the Condition cannot have side-effects in ALFA
5267 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5268 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5269 Instead, include type conversion between scalar types in ALFA.
5270 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5271 if-and-only-if its type is in ALFA.
5273 2011-08-03 Thomas Quinot <quinot@adacore.com>
5275 * scos.adb, get_scos.adb, put_scos.adb
5276 New code letter for decisions: G (entry guard)
5278 (Traverse_Subprogram_Body): Rename to...
5279 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5280 (Traverse_Protected_Body): New subprogram
5281 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5282 protected bodies and entry bodies.
5284 2011-08-03 Yannick Moy <moy@adacore.com>
5286 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5287 entities with get/set subprograms, which is set on procedure entities
5288 generated by the compiler for a postcondition.
5289 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5290 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5291 entity for a declaration
5292 (Get_Unique_Entity_For_Decl): new function returning an entity which
5293 represents a declaration, so that matching spec and body have the same
5296 2011-08-03 Robert Dewar <dewar@adacore.com>
5298 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5299 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5301 2011-08-03 Yannick Moy <moy@adacore.com>
5303 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5304 library-level because retriction No_Implicit_Dynamic_Code in the
5305 front-end prevents its definition as a local subprogram
5306 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5307 for reuse in other contexts
5308 (Traverse_Declarations_Or_Statements,
5309 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5310 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5311 procedures take a callback parameter to be called on all declarations
5313 (Traverse_All_Compilation_Units): new generic function to traverse a
5314 compilation unit and call a callback parameter on all declarations
5316 2011-08-03 Javier Miranda <miranda@adacore.com>
5318 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5319 in Java since they are always enclosed in a namespace that
5320 differentiates them, and overloaded entities are supported by the VM.
5322 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5324 * checks.adb (Determine_Range): If a computed bound of an operation is
5325 outside the range of the base type of the expression, and overflow
5326 checks are enabled, the result is unknown and cannot be used for any
5327 subsequent constant folding.
5328 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5329 unknown, so is the result of the comparison.
5331 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5333 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5334 From_Abort. When finalization was triggered by an abort, propagate
5335 Standard'Abort_Signal rather than Program_Error.
5336 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5338 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5339 From_Abort. When finalization was triggered by an abort, propagate
5340 Standard'Abort_Signal rather than Program_Error.
5341 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5343 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5344 Abort_Id. Update the calls to Build_Object_Declarations and
5345 Build_Raise_Statement to include Abort_Id.
5346 (Build_Adjust_Statements): New local variable Abort_Id. Update the
5347 calls to Build_Object_Declarations and Build_Raise_Statement to include
5349 (Build_Finalize_Statements): New local variable Abort_Id. Update the
5350 calls to Build_Object_Declarations and Build_Raise_Statement to include
5352 (Build_Components): Create an entity for Abort_Id when exceptions are
5353 allowed on the target.
5354 (Build_Finalizer): New local variable Abort_Id.
5355 (Build_Initialize_Statements): New local variable Abort_Id. Update the
5356 calls to Build_Object_Declarations and Build_Raise_Statement to include
5358 (Build_Object_Declarations): Add new formal Abort_Id. Create the
5359 declaration of flag Abort_Id to preserve the original abort status
5360 before finalization code is executed.
5361 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5362 runtime routine Raise_From_Controlled_Operation.
5363 (Create_Finalizer): Update the call to Build_Raise_Statement to include
5364 Abort_Id. Update the call to Build_Object_Declarations to include
5365 Abort_Id. Update the layout of the finalizer body.
5366 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5367 (Process_Transient_Objects): New local variable Abort_Id. Remove the
5368 clunky code to create all flags and objects related to
5369 exception propagation and replace it with a call to
5370 Build_Object_Declarations. Update the call to Build_Raise_Statement to
5372 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5373 Add new formal Abort_Id and associated comment on its use.
5374 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5376 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5377 Remove the clunky code to create all flags and objects related to
5378 exception propagation and replace it with a call to
5379 Build_Object_Declarations. Update the call to Build_Raise_Statement.
5381 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5383 * s-tassta.adb: Fix minor typos.
5385 2011-08-03 Robert Dewar <dewar@adacore.com>
5387 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5388 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5390 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5392 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5393 to packages. This ensures that the finalizer body will not end up
5394 inside the freeze node.
5395 (Process_Declarations): Add code to detect whether a freeze node has a
5396 nested finalization collection.
5398 2011-08-03 Pascal Obry <obry@adacore.com>
5400 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5401 (Current_Session): Return a not null access to Session_Type.
5402 (Default_Session): Likewise.
5404 2011-08-03 Robert Dewar <dewar@adacore.com>
5406 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5407 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5409 2011-08-03 Pascal Obry <obry@adacore.com>
5411 * g-awk.ads: Minor comment fix.
5413 2011-08-03 Sergey Rybin <rybin@adacore.com>
5415 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5416 the tree structure related to discriminant constraints.
5417 Original_Discriminant cannot be used any more for computing the
5418 defining name for the reference to a discriminant.
5420 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5422 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5423 function is not visibly tagged, this is not a dispatching call and
5424 therfore is not Tag_Indeterminate, even if the function is marked as
5425 dispatching on result.
5427 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5429 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5430 (Expand_N_Free_Statement): Add a guard to protect against run-times
5431 which do not support controlled types.
5432 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5433 against run-times which do not support controlled types.
5434 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5435 against run-times which do not support controlled types.
5436 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5437 against run-times which do not support controlled types.
5438 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5439 protect against run-times which do not support controlled types.
5441 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5443 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5444 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5446 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5448 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5449 modified in the source, to prevent spurious warnings when compiling
5452 2011-08-03 Thomas Quinot <quinot@adacore.com>
5454 * a-except-2005.adb: Minor reformatting.
5456 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5458 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5459 is a renaming declaration in the private part of a package, do not emit
5460 a warning that the with_clause could be moved because the renaming may
5461 be used in the body or in a child unit.
5463 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5465 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5466 Propagate the Comes_From_Source attribute from the original return
5467 object to the renaming.
5469 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5471 * exp_ch7.adb (Build_Raise_Statement): Do not call
5472 Raise_From_Controlled_Operation when this routine is not present in
5473 the run-time library.
5474 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5475 libraries (Ravenscar), tasks are non-terminating, and protected objects
5476 and tasks can only appear at library level, so we do not want
5477 finalization of protected objects nor tasks.
5478 * exp_intr.adb: Minor clarification in comment.
5479 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5480 Gen_Output_File_C): Remove references to finalization of library-level
5481 objects when using restricted run-time libraries.
5483 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5485 * sem_ch3.adb (Build_Discriminant_Constraints): Set
5486 Original_Discriminant only if the parent type is a generic formal.
5488 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5490 * exp_ch13.adb: Add with and use clause for Targparm;
5491 (Expand_N_Free_Statement): Prevent the generation of a custom
5492 Deallocate on .NET/JVM targets since this requires pools and address
5494 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5495 .NET/JVM targets, attach the newly allocated object to the access
5496 type's finalization collection. Do not generate a call to
5497 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5498 exist in the runtime.
5499 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5500 create a custom Allocate for object that do not require initialization.
5501 Attach a newly allocated object to the access type's finalization
5502 collection on .NET/JVM.
5503 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5504 assignment of controlled types on .NET/JVM. The two hidden pointers
5505 Prev and Next and stored and later restored after the assignment takes
5507 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5508 kludge for .NET/JVM to recognize a particular piece of code coming from
5509 Heap_Management and change the call to Finalize into Deep_Finalize.
5510 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5511 finalization collections on .NET/JVM only for types derived from
5512 Controlled. Separate the association of storage pools with a collection
5513 and only allow it on non-.NET/JVM targets.
5514 (Make_Attach_Call): New routine.
5515 (Make_Detach_Call): New routine.
5516 (Process_Object_Declarations): Suppress the generation of
5517 build-in-place return object clean up code on .NET/JVM since it uses
5519 * exp_ch7.ads (Make_Attach_Call): New routine.
5520 (Make_Detach_Call): New routine.
5521 * exp_intr.adb Add with and use clause for Targparm.
5522 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5523 on .NET/JVM targets.
5524 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5525 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5526 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5527 names used in finalization.
5529 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5531 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5532 (Attach, Detach): Lock the current task when chaining an object onto a
5535 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5537 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5538 Rewritten to create the message strings when the exception is not
5539 raised by an abort during finalization.
5540 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5541 Raise_From_Controlled_Operation and update its associated comment.
5542 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5543 Ada.Finalization.Heap_Management provides key functionality
5544 associated with controlled objects on the heap, their creation,
5545 finalization and reclamation. Type Finalization_Collection is
5546 effectively a wrapper which sits ontop of a storage pool and performs
5547 all necessary bookkeeping for all the objects it contains. Each
5548 access-to-controlled or access-to-class-wide type receives a collection
5549 as part of its expansion. The compiler generates buffer code and
5550 invokes Allocate / Deallocate to create and destroy allocated
5552 * a-finali.adb ("="): Removed.
5553 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5554 fields Prev and Next.
5555 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5556 A library unit with at least one controlled object on the library level
5557 has a special finalizer which is invoked by the binder. To signal this,
5558 ali files carry field PF.
5559 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5560 associated comment on field usage.
5561 * a-tags.adb (Get_RC_Offset): Removed.
5562 (Needs_Finalization): New routine.
5563 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5564 Dispatch tables now carry field Needs_Finalization which provides
5565 runtime indication whether a type is controlled or has controlled
5566 components or both. Remove field RC_Offset.
5567 (Get_RC_Offset): Removed along with its associated pragma Export.
5568 Since tagged types with controlled components no longer carry hidden
5569 field _controller, the special mechanism to retrieve its location is no
5571 (Needs_Finalization): New routine.
5572 * atree.ads, atree.adb (Elist24): New routine.
5573 (Set_Elist24): New routine.
5574 * atree.h: Add a define clause for Elist24.
5575 * bindgen.adb New library-level variable Lib_Final_Built.
5576 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5577 presence of a VM target, the routine generates calls to the proper
5578 library finalization routine.
5579 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5580 targets. Set the correct library finalization routine depending on
5581 whether the library has controlled objects or this is a VM compilation.
5582 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5583 to library-level finalizers of compiled units in reverse order of
5584 elaboration. It also produces exception management code and reraises a
5585 potential exception after all units have been finalized.
5586 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5587 library-level finalizers of compiled units in reverse order of
5589 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5590 definitions of all library-level finalizers available to the compilation
5591 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5593 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5594 System.Standard_Library.Adafinal directly. If the library needs
5595 finalization actions, create the sequence of finalization calls.
5596 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5597 Generate a with clause for System.Soft_Links when compiling for a VM.
5598 Remove the code which imports System.Standard_Library.Adafinal as
5599 Do_Finalize. Generate the library finalization routine.
5600 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5601 If the library needs finalization actions, create all the definitions
5602 of library- level finalizers.
5603 (Has_Finalizer): New routine. Determines whether at least one compiled
5604 unit has a library-level finalizer.
5605 Add type Qualification_Mode.
5606 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5607 * einfo.adb: New usage of field 15 as Return_Flag.
5608 Remove Finalization_Chain_Entity from the usages of field 19.
5609 Remove Associated_Final_Chain from the usages of field 23.
5610 New usage of field 23 as Associated_Collection.
5611 New usage of field 24 as Finalizer.
5612 New usage of flag 252 as Is_Processed_Transient.
5613 (Associated_Final_Chain): Removed.
5614 (Associated_Collection): New routine.
5615 (Finalization_Chain_Entity): Removed.
5616 (Finalizer): New routine.
5617 (Is_Finalizer): New routine.
5618 (Is_Processed_Transient): New routine.
5619 (Return_Flag): New routine.
5620 (Set_Associated_Final_Chain): Removed.
5621 (Set_Associated_Collection): New routine.
5622 (Set_Finalization_Chain_Entity): Removed.
5623 (Set_Finalizer): New routine.
5624 (Set_Is_Processed_Transient): New routine.
5625 (Set_Return_Flag): New routine.
5626 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5628 (Write_Field8_Name): Alphabetize the output.
5629 (Write_Field11_Name): Alphabetize the output.
5630 (Write_Field12_Name): Alphabetize the output.
5631 (Write_Field13_Name): Alphabetize the output.
5632 (Write_Field14_Name): Alphabetize the output.
5633 (Write_Field15_Name): Alphabetize the output.
5634 (Write_Field16_Name): Alphabetize the output.
5635 (Write_Field17_Name): Alphabetize the output.
5636 (Write_Field18_Name): Alphabetize the output.
5637 (Write_Field19_Name): Alphabetize the output. Remove the output of
5638 Finalization_Chain_Entity.
5639 (Write_Field20_Name): Alphabetize the output.
5640 (Write_Field21_Name): Alphabetize the output.
5641 (Write_Field22_Name): Alphabetize the output.
5642 (Write_Field23_Name): Alphabetize the output. Remove the output of
5643 Associated_Final_Chain. Add output for Associated_Collection.
5644 (Write_Field24_Name): Alphabetize the output.
5645 (Write_Field25_Name): Add output for Finalizer.
5646 (Write_Field26_Name): Alphabetize the output.
5647 (Write_Field27_Name): Alphabetize the output.
5648 (Write_Field28_Name): Alphabetize the output.
5649 * einfo.ads: Add new field description for Associated_Collection and
5651 Remove Associated_Final_Chain and its uses in nodes.
5652 Remove Finalization_Chain_Entity and its uses in nodes.
5653 Add new field description for Finalizer and its uses in nodes.
5654 Add new synthesized attribute Is_Finalizer.
5655 Add new flag description for Is_Processed_Transient and its uses in
5657 Add new field description for Return_Flag and its uses in nodes.
5658 (Associated_Final_Chain): Removed along with its pragma Inline.
5659 (Associated_Collection): New routine and pragma Inline.
5660 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5661 (Finalizer): New routine and pragma Inline.
5662 (Is_Finalizer): New routine and pragma Inline.
5663 (Is_Processed_Transient): New routine and pragma Inline.
5664 (Return_Flag): New routine and pragma Inline.
5665 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5666 (Set_Associated_Collection): New routine and pragma Inline.
5667 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5668 (Set_Finalizer): New routine and pragma Inline.
5669 (Set_Is_Processed_Transient): New routine and pragma Inline.
5670 (Set_Return_Flag): New routine and pragma Inline.
5671 * exp_aggr.adb: Alphabetize subprograms.
5672 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5673 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5674 associated comments. Remove local variables External_Final_List and
5676 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5677 Ancestor. Remove the retrieval of finalization lists. Update the call to
5679 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5680 lists. Update the call to Late_Expansion.
5681 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5682 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5683 (Gen_Assign): Remove the retrieval of the finalization list used to
5684 build the assignment. Update the calls to Make_Init_Call and
5686 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5687 Remove the mechanism to determine attachment levels and finalization
5688 list retrieval. Remove the processing for coextensions.
5689 (Init_Controller): Removed. Controllers no longer exist.
5690 (Late_Expansion): Remove formals Flist and Obj along with their
5691 associated comments. Update the calls to Build_Record_Aggr_Code and
5692 Build_Array_Aggr_Code.
5693 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5694 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5695 appear in entry bodies, protected subprograms and task bodies.
5696 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5697 * exp_ch3.adb (Add_Final_Chain): Removed.
5698 (Build_Array_Init_Proc): Alphabetize local variables.
5699 (Build_Assignment): Alphabetize local variables. Update the call to
5701 (Build_Class_Wide_Master): Rename local variables to better reflect
5703 (Build_Discriminant_Assignments): Code reformatting.
5704 (Build_Init_Call_Thru): Code reformatting.
5705 (Build_Init_Procedure): Code reformatting. Generate a special version
5706 of Deep_Finalize which is capable of finalizing all initialized
5707 components and ignore the rest.
5708 (Build_Init_Statements): Rename local variables to better reflect their
5710 Reimplement the mechanism to include the creation and update of an index
5711 variable called a "counter". It is used as a bookmark for tracing
5712 initialized and non-initialized components.
5713 (Build_Initialization_Call): Remove local variable Controller_Typ.
5714 Alphabetize all local variables. Remove the initialization of the
5715 record controller and update the call to Make_Init_Call.
5716 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5717 New local variable Counter.
5718 (Constrain_Array): Alphabetize.
5719 (Expand_Freeze_Array_Type): Create a collection instead of a
5721 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5722 Finalize_Address which is used in conjunction with allocated controlled
5724 (Expand_N_Object_Declaration): Remove the creation of a finalization
5725 list for anonymous access types. Update the calls to Make_Init_Call and
5727 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5728 retrieval of finalization lists. Remove the expansion of the record
5729 controller. Create TSS primitive Finalize_Address used in conjunction
5730 with controlled objects on the heap. Create finalization collections
5731 for access-to-controlled record components.
5732 (Expand_Record_Controller): Removed.
5733 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5734 class-wide types now requires additional processing. Create
5735 finalization collections for access-to-controlled types.
5736 (Increment_Counter): New routine.
5737 (Make_Counter): New routine.
5738 (Make_Eq_If): Remove the mention of Name_uController.
5739 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5740 types coming from System.Finalization_Root.
5741 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5742 (Predefined_Primitive_Bodies): There is no longer need to skip types
5743 coming from System.Finalization_Root.
5744 (Stream_Operation_OK): Do not generate stream routines for
5745 type Ada.Finalization.Heap_Management.Finalization_Collection.
5746 * exp_ch3.ads: Alphabetize subprograms.
5747 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5748 Add with and use clause for Lib.
5749 (Complete_Coextension_Finalization): Removed.
5750 (Complete_Controlled_Allocation): New routine. Create a finalization
5751 collection for anonymous access-to-controlled types. Create a custom
5752 Allocate which interfaces with the back end and the machinery in
5754 (Expand_Allocator_Expression): Add necessary calls to
5755 Complete_Controlled_Allocation. Remove the retrieval of finalization
5756 lists. Update the calls to Make_Adjust_Call. Generate a call to
5757 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5758 the associated collection.
5759 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
5760 Code clean up. Remove the retrieval of finalization lists and
5762 Update the call to Make_Init_Call. Generate a call to
5763 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5764 the associated collection.
5765 (Get_Allocator_Final_List): Removed. Finalization lists are not
5767 (Suitable_Element): Remove the mention of Name_uController.
5768 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
5769 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
5770 the left hand side, carry out the assignment and adjust the left hand
5772 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
5773 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
5774 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
5775 BIP_Collection and BIPcollection.
5776 (Build_Heap_Allocator): New routine used to allocate the return object
5777 of a build-in-place function onto a collection.
5778 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
5779 (Expand_Call): Do not replace direct calls to Deep routines with their
5781 (Expand_N_Extended_Return_Statement): Give all variables shorter names
5782 and update their occurrences. Add a special return flag to monitor the
5783 [ab]normal execution of the function. The flag is set right before the
5785 Rewrite the mechanism used to allocate a build-in-place return object
5786 on the heap or on a storage pool.
5787 (Is_Direct_Deep_Call): New routine.
5788 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
5789 build-in-place function call instead of a final list. Build a call to
5790 Set_Finalize_Address_Ptr to decorate the associated collection.
5791 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5792 order to name the build-in-place function call's result for later
5793 finalization. Add a collection to a build-in-place function call
5794 instead of a final list.
5795 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5796 build-in-place function call instead of a final list. Remove the code
5797 which moves one final list and transforms it into the actual in a
5798 nested build-in-place call.
5799 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5800 build-in-place function call instead of a final list.
5801 (Move_Final_List): Removed.
5802 (Needs_BIP_Collection): New routine.
5803 (Needs_BIP_Final_List): Removed.
5804 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5805 enumeration type BIP_Formal_Kind.
5806 Update the related comment.
5807 (Needs_BIP_Collection): New routine.
5808 (Needs_BIP_Final_List): Removed.
5809 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5810 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5811 majority of subprograms in this unit. Add Name_Finalize_Address to
5812 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5813 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5814 statements for an array type.
5815 (Build_Adjust_Statements): Create the adjust statements for a record
5817 (Build_Cleanup_Statements): New routine. A procedure which given any
5818 construct containing asynchronous calls, references to _master, or is a
5819 task body, a task allocation or a protected body produces the necessary
5820 runtime calls to clean up these constructs.
5821 (Build_Exception_Handler): New routine.
5822 (Build_Final_List): Removed.
5823 (Build_Finalization_Collection): New routine. A core procedure which
5824 creates a collection to service heap allocated controlled objects
5825 associated with an access-to-controlled type.
5826 (Build_Finalize_Statements): Create the finalization statements for a
5828 (Build_Finalizer): New routine. A core procedure which given any
5829 construct with declarations and/or statements detects all objects which
5830 need any type of clean up (controlled objects, protected objects) and
5831 generates all necessary code to clean up the said objects in the proper
5833 (Build_Finalizer_Call): New routine.
5834 (Build_Initialize_Statements): Create the initialization statements for
5835 an array type. The generated routine contains code to finalize partially
5837 (Build_Object_Declarations): New routine.
5838 (Build_Raise_Statement): New routine.
5839 (Clean_Simple_Protected_Objects): Removed.
5840 (Controller_Component): Removed.
5841 (Enclosing_Function): New routine.
5842 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5843 either declarations or statements or both.
5844 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5845 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5847 (Find_Final_List): Removed.
5848 (Global_Flist_Ref): Removed.
5849 (In_Finalization_Root): Removed.
5850 (Insert_Actions_In_Scope_Around): Determine the range of the transient
5851 scope in terms of tree nodes. Process all transient variables within
5853 (Make_Adjust_Call): Rewritten. There is no longer an attach call
5854 generated after the adjust.
5855 (Make_Attach_Call): Removed.
5856 (Make_Call): New routine.
5857 (Make_Clean): Removed.
5858 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5860 (Make_Deep_Proc): Rewritten to generate the new profile signature used
5862 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5864 (Make_Final_Call): Modified to simply create a call to either
5865 Deep_Finalize or Finalize.
5866 (Make_Finalize_Address_Body): New routine.
5867 (Make_Finalize_Address_Stmts): New routine. A function which produces
5868 TSS primitive Finalize_Address used in conjunction with heap allocated
5870 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5871 (Make_Init_Call): Rewritten. There is no longer an attach call
5872 generated after initialization.
5873 (Make_Local_Deep_Finalize): New routine.
5874 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5875 (Make_Transient_Block): Remove the finalization list retrieval and
5877 (Needs_Finalization): Moved to Exp_Util.
5878 (Parent_Field_Type): New routine.
5879 (Preprocess_Components): New routine.
5880 (Process_Transient_Objects): New routine.
5881 (Wrap_HSS_In_Block): New routine.
5882 (Wrap_Transient_Declaration): Remove finalization list management and
5883 controller insertion.
5884 (Wrap_Transient_Expression): Code reformatting.
5885 (Wrap_Transient_Statement): Code reformatting.
5886 * exp_ch7.ads (Build_Final_List): Removed.
5887 (Build_Finalization_Collection): New routine.
5888 (Build_Raise_Statement): New routine.
5889 (Controller_Component): Removed.
5890 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5891 (Find_Final_List): Removed.
5892 (In_Finalization_Root): Removed.
5893 (Is_Simple_Protected_Type): Update related comment.
5894 (Make_Adjust_Call): New parameter profile and associated comments.
5895 (Make_Attach_Call): Removed.
5896 (Make_Final_Call): New parameter profile and associated comments.
5897 (Make_Finalize_Address_Body): New routine.
5898 (Make_Init_Call): New parameter profile and associated comments.
5899 (Make_Local_Deep_Finalize): New routine.
5900 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5901 (Needs_Finalization): Moved to Exp_Util.
5902 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5903 (Expand_N_Protected_Body): Remove the handling of finalization lists.
5904 (Find_Protection_Type): Moved to Exp_Util.
5905 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5906 (Make_DT): Update sequence of dispatch table initialization. Remove the
5907 initialization of field RC_Offset. Add initialization of field Needs_
5909 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5910 Reimplement how an object is first finalized, then deallocated.
5911 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5913 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5914 Register TSS_Finalize_Address with type TSS_Names.
5915 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5916 procedure provides the interface between an allocation / deallocation
5917 and the support machinery in Ada.Finalization.Heap_Management.
5918 (Find_Init_Call): Code reformatting.
5919 (Find_Init_Call_In_List): Code reformatting.
5920 (Find_Protection_Type): Moved from Exp_Ch9.
5921 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5922 (Has_Controlled_Coextensions): Removed.
5923 (Has_Controlled_Objects): New routine.
5924 (In_Library_Level_Package_Body): New routine.
5925 (Insert_Action_After): New routine.
5926 (Is_Finalizable_Transient): New routine. This predicate determines
5927 whether an object declaration is one of the many variants of controlled
5929 (Is_Null_Access_BIP_Func_Call): New routine.
5930 (Is_Non_BIP_Func_Call): New routine.
5931 (Is_Related_To_Func_Return): New routine.
5932 (Needs_Finalization): Moved from Exp_Ch7.
5933 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5934 (Find_Protection_Type): Moved from Exp_Ch9.
5935 (Has_Controlled_Coextensions): Removed.
5936 (Has_Controlled_Objects): New routine.
5937 (In_Library_Level_Package_Body): New routine.
5938 (Insert_Action_After): New routine.
5939 (Is_Finalizable_Transient): New routine.
5940 (Is_Null_Access_BIP_Func_Call): New routine.
5941 (Is_Non_BIP_Func_Call): New routine.
5942 (Is_Related_To_Func_Return): New routine.
5943 (Needs_Finalization): Moved from Exp_ch7.
5944 * expander.adb (Expand): Add a case for N_Free_Statement.
5945 * freeze.adb (Freeze_All): Replace the generation of a finalization
5946 list with a collection for access-to-controlled types.
5947 (Freeze_Entity): Code reformatting.
5948 (Freeze_Record_Type): Remove the freezing of a record controller
5950 (Freeze_Subprogram): Code reformatting.
5951 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5953 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5954 has a library-level finalizer.
5955 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5956 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5957 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5958 files. Add a-fihema to the list of object files.
5960 Alphabetize the associations in type Is_Parameterless_Attribute.
5961 * rtsfind.ads: Ada.Finalization_List.Controller and
5962 System.Finalization_Implementation are no longer a GNAT unit.
5963 Update the range of type Ada_Finalization_Child. Remove the following
5964 recoverable entities:
5966 RE_Attach_To_Final_List
5970 RE_Finalizable_Ptr_Ptr
5971 RE_Global_Final_List
5972 RE_Limited_Record_Controller
5975 RE_Record_Controller
5976 RE_Simple_List_Controller
5978 Add the following recoverable entities:
5980 RE_Add_Offset_To_Address
5984 RE_Exception_Identity
5985 RE_Finalization_Collection
5986 RE_Finalization_Collection_Ptr
5987 RE_Needs_Finalization
5988 RE_Save_Library_Occurrence
5989 RE_Set_Finalize_Address_Ptr
5990 RE_Set_Storage_Pool_Ptr
5992 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5994 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5995 (First_Stored_Discriminant): Remove the mention of Name_uController.
5996 * sem_aux.ads: Comment reformatting.
5997 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5998 to redecorate an already existing class-wide type.
5999 (Decorate_Tagged_Type): New parameter profile and associated comment.
6000 Create a "shadow class-wide type" for a shadow entity.
6001 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
6002 of the final chain along with the associated comment.
6003 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
6004 Full_Desig and set it to the full view of the designated type.
6005 Initialize the finalization collection to empty.
6006 (Build_Derived_Record_Type): Alphabetize local variables. Code
6008 (Collect_Fixed_Components): Remove the mention of Name_uController.
6009 (Create_Constrained_Components): Remove the mention of Name_uController.
6010 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6011 class-wide type of a shadow entity.
6012 (Process_Full_View): Update the machinery which marks type
6013 Limited_Controlled's entity as limited.
6014 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6015 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6016 list, instead make a collection build-in-place formal.
6017 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6018 a designated type in order to establish a match between the renaming
6019 and the renamed entity.
6020 (Find_Selected_Component): Add guard to prevent spurious exceptions
6021 from being raised on .NET/JVM.
6022 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6023 to the list of primitive that need special processing. Update arrays
6024 C_Names and D_Names.
6025 (Replace_Types): Handle class-wide types.
6026 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6027 different parameter profile, look at the first formal.
6028 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6029 use clauses for Exp_Util.
6030 * sem_res.adb: Remove with and use clauses for Elists.
6031 (Propagate_Coextensions): Removed.
6032 (Resolve_Allocator): Do not propagate the list of coextensions from one
6033 allocator to another.
6034 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6035 Deaccessed_T to Desig_Typ.
6036 (Enter_Name): Remove the mention of Name_uController.
6037 (Gather_Components): Remove the mention of Name_uController.
6038 (Incomplete_Or_Private_View): New routine.
6039 (Is_Coextension_Root): Removed.
6040 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6041 * sem_util.ads (Incomplete_Or_Private_View): New routine.
6042 (Is_Coextension_Root): Removed.
6043 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6044 Controlled types are now derived from a null tagged record. Remove
6045 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6046 * sinfo.adb (Coextensions): Removed.
6047 (Set_Coextensions): Removed.
6048 * sinfo.ads: Remove Coextensions from the explanation of node fields
6049 and its uses in nodes.
6050 Update the field usage of N_Allocator.
6051 (Coextensions): Removed along with its pragma Inline.
6052 (Set_Coextensions): Removed along with its pragma Inline.
6053 * snames.ads-tmpl: Remove names
6058 Name_uLocal_Final_List
6059 Name_Finalization_Root
6066 Name_Finalize_Address
6067 * s-pooglo.adb (Allocate): Add overriding indicator.
6068 (Deallocate): Add overriding indicator.
6069 (Storage_Size): Add overriding indicator.
6070 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6071 than Finalize_Global_List.
6072 (Null_Finalize_Global_List): Removed.
6073 (Save_Library_Occurrence): New routine.
6074 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6075 initialization. Add variable Finalize_Library_Objects along with its
6076 pragma Export. Add variables Library_Exception and
6077 Library_Exception_Set along with their pragma Export.
6078 (Null_Finalize_Global_List): Removed.
6079 (Save_Library_Occurrence): New routine.
6080 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6081 rather than Finalize_Global_List.
6082 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6083 of the constructed node.
6085 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6087 * link.c: Include "auto-host.h" before system headers.
6089 2011-08-03 Vincent Celier <celier@adacore.com>
6091 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6092 that are not extended. Do not check if a library project that is
6093 extended should be regenerated. Do not add to table Library_Paths the
6094 libraries that are in extended projects. Link only with libraries that
6095 are in libray projects that are not extended.
6096 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6097 for a library project that is extended.
6099 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6101 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6102 conforming subprogram renamings that appear to be completions if they
6103 are not fully conformant.
6104 Such renamings are homographs but not completions.
6105 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6106 names in a subprogram renaming that appears in an instance.
6108 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6110 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6111 not immutably limited, build actual subtype from expression to provide
6112 proper bounds to caller.
6114 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6116 * sem_ch8.adb: Minor comment correction.
6118 2011-08-03 Thomas Quinot <quinot@adacore.com>
6120 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6121 returning a limited array, use an extended return statement.
6123 2011-08-03 Vincent Celier <celier@adacore.com>
6125 * make.adb (Initialize): If --subdirs= is used, but no project file is
6126 specified, attempt to create the specify subdir if it does not already
6127 exist and use it as the object directory as if -D had been specified.
6129 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6131 * s-tpopsp-vms.adb: New file.
6132 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6133 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6135 2011-08-03 Emmanuel Briot <briot@adacore.com>
6137 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6140 2011-08-03 Yannick Moy <moy@adacore.com>
6142 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6143 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6144 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6145 detect that an array has static bounds.
6147 2011-08-03 Thomas Quinot <quinot@adacore.com>
6149 * exp_dist.adb: Minor reformatting.
6151 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6153 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6154 (ATCB_Key): Removed, not always used.
6156 2011-08-03 Emmanuel Briot <briot@adacore.com>
6158 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6159 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6160 most remaining global variables.
6162 2011-08-03 Robert Dewar <dewar@adacore.com>
6164 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6165 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6168 2011-08-03 Javier Miranda <miranda@adacore.com>
6170 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6171 that must be passed by copy in VM targets.
6173 2011-08-03 Emmanuel Briot <briot@adacore.com>
6175 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6176 duplicates a similar htable now in the project tree.
6178 2011-08-03 Claire Dross <dross@adacore.com>
6180 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6181 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6182 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6183 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6184 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6185 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6186 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6189 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6191 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6192 (ATCB_Key): Removed, not always used.
6193 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6195 * s-tpopsp-tls.adb: New file.
6196 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6197 x86/x64/ia64/powerpc/sparc Linux.
6199 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6201 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6202 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6204 2011-08-03 Thomas Quinot <quinot@adacore.com>
6206 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6207 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6208 Fix type selection for mapping integer types to PolyORB types.
6210 2011-08-03 Bob Duff <duff@adacore.com>
6212 * sem_ch7.adb: Minor comment clarification.
6214 2011-08-03 Bob Duff <duff@adacore.com>
6216 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6217 an error analyzing a choice, skip further processing. Further
6218 processing could cause a crash or cascade errors.
6220 2011-08-03 Emmanuel Briot <briot@adacore.com>
6222 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
6223 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
6224 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6225 prj-env.ads (Shared_Project_Tree_Data): new type
6226 An aggregate project and its aggregated trees need to share the common
6227 data structures used for lists of strings, packages,... This makes the
6228 code simpler since otherwise we have to pass the root tree (also used
6229 for the configuration file data) in addition to the current project
6230 tree. This also avoids ambiguities as to which tree should be used.
6231 And finally this saves a bit of memory.
6232 (For_Every_Project_Imported): new parameter Tree.
6233 Since aggregated projects are using a different tree, we need to let
6234 the caller know which tree to use to manipulate the returned project.
6236 2011-08-03 Robert Dewar <dewar@adacore.com>
6238 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
6239 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
6240 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
6241 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
6243 2011-08-03 Javier Miranda <miranda@adacore.com>
6245 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
6246 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
6248 2011-08-03 Bob Duff <duff@adacore.com>
6250 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
6253 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
6255 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
6256 g-sehash.ads: Fix typo. Update header.
6258 2011-08-03 Thomas Quinot <quinot@adacore.com>
6260 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6263 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6265 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6266 prefixes of private types along with records, since the selector may be
6268 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6269 private types along with records, since the selector may be a
6272 2011-08-03 Emmanuel Briot <briot@adacore.com>
6274 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
6276 2011-08-03 Javier Miranda <miranda@adacore.com>
6278 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6279 Tagged_Type_Expansion.
6281 2011-08-03 Yannick Moy <moy@adacore.com>
6283 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6284 violation when the argument of concatenation is the name of a
6287 2011-08-03 Emmanuel Briot <briot@adacore.com>
6289 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6290 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6291 (Process_Declarative_Items): new parameter Child_Env.
6293 2011-08-03 Yannick Moy <moy@adacore.com>
6295 * alfa.ads: Update format of ALFA section in ALI file in order to
6296 add a mapping from bodies to specs when both are present.
6297 (ALFA_Scope_Record): Add components for spec file/scope.
6298 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6300 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6301 collected, fill in the spec information when relevant.
6302 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
6305 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6307 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6308 code unit to decide whether to add internally generated subprograms.
6310 2011-08-03 Javier Miranda <miranda@adacore.com>
6312 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
6313 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6314 be handled by copy in VM targets.
6316 2011-08-03 Emmanuel Briot <briot@adacore.com>
6318 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
6319 code with Makeutl.Get_Switches.
6320 * prj-tree.adb: Update comment.
6322 2011-08-03 Thomas Quinot <quinot@adacore.com>
6324 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6325 subprogram with a limited formal that does not support external
6328 2011-08-03 Yannick Moy <moy@adacore.com>
6330 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6332 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6333 not from current unit in two phases, because it is not possible to
6334 change the table while iterating over its content.
6335 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6337 2011-08-03 Sergey Rybin <rybin@adacore.com>
6339 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6340 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6342 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6344 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6345 and the component type is composite, this is ambiguous for predefined
6346 concatenation, but if the node is not overloaded and the entity is a use
6347 -defined function its profile can be used to resolve that aggregate.
6349 2011-08-03 Robert Dewar <dewar@adacore.com>
6351 * exp_ch4.adb: Minor code cleanup.
6353 2011-08-03 Thomas Quinot <quinot@adacore.com>
6355 * exp_dist.adb: Do not generate distribution stubs if serious errors
6356 have been diagnosed.
6358 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6360 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6361 the first formal of a primitive operation, go to the base type to
6362 handle properly an access to a derived type with constrained
6364 * sem_type.adb (Disambiguate): an immediately visible operator hides a
6365 user-defined function that is only use-visible.
6367 2011-08-03 Robert Dewar <dewar@adacore.com>
6369 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6370 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6371 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6372 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6373 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6374 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6375 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6376 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6378 2011-08-03 Robert Dewar <dewar@adacore.com>
6380 * repinfo.adb (List_Mechanism): Add handling of
6381 Convention_Ada_Pass_By_XXX.
6382 * sem_mech.adb (Set_Mechanism): Ditto.
6383 * sem_prag.adb (Process_Convention): Add entries for
6384 Convention_Ada_Pass_By_XXX.
6385 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6387 2011-08-03 Pascal Obry <obry@adacore.com>
6389 * makeutl.adb: Minor reformatting.
6391 2011-08-03 Vincent Celier <celier@adacore.com>
6394 (Get_File_Name) If the file cannot be found when there are no config
6395 pragmas file and May_Fail is True, return No_File instead of the file
6396 name, to be consistent.
6398 2011-08-03 Pascal Obry <obry@adacore.com>
6400 * adaint.c (__gnat_is_executable_file_attr): Avoid access
6403 2011-08-03 Javier Miranda <miranda@adacore.com>
6406 (Same_Representation): In VM targets the representation of arrays with
6407 aliased components differs from arrays with non-aliased components.
6409 2011-08-03 Emmanuel Briot <briot@adacore.com>
6411 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6412 not systematically lower case attribute indexes that contain no "."
6413 Fix definition of several Naming attributes, which take
6414 a unit name as index and therefore should be case insensitive.
6415 Minor refactoring (reduce length of variable names).
6417 2011-08-03 Emmanuel Briot <briot@adacore.com>
6419 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6421 2011-08-03 Emmanuel Briot <briot@adacore.com>
6423 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6424 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6425 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6426 prj-tree.ads (Prj.Tree.Environment): new type.
6428 2011-08-03 Emmanuel Briot <briot@adacore.com>
6430 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6431 prj-tree.adb, prj-tree.ads (Environment): new type.
6433 2011-08-03 Emmanuel Briot <briot@adacore.com>
6435 * prj-tree.ads: Remove unused variable.
6437 2011-08-03 Yannick Moy <moy@adacore.com>
6439 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6440 issuing messages related to SPARK restriction violation.
6442 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6444 * sem_ch6.adb: guard against error nodes in return statements.
6446 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6448 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6449 a warning can only appear on a configuration file, so emit warning
6450 without further checks.
6452 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6454 * s-interr.ads: add overriding keyword.
6456 2011-08-03 Geert Bosch <bosch@adacore.com>
6458 * exp_attr.adb: Fix minor typo.
6460 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6462 * par-ch4.adb: improve error recovery.
6464 2011-08-03 Emmanuel Briot <briot@adacore.com>
6466 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6467 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6470 2011-08-03 Emmanuel Briot <briot@adacore.com>
6472 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6473 "external" as an attribute name in aggregate projects.
6475 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6477 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6478 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6479 from 0, so we need to adjust.
6481 2011-08-03 Emmanuel Briot <briot@adacore.com>
6483 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6484 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6486 2011-08-03 Yannick Moy <moy@adacore.com>
6488 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6489 restriction on overloaded entity if the entity is not an operator.
6491 2011-08-03 Yannick Moy <moy@adacore.com>
6493 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6494 restrict.ads: Rename remaining Check_Formal_Restriction* into
6495 Check_SPARK_Restriction*.
6497 2011-08-03 Emmanuel Briot <briot@adacore.com>
6499 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6500 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6502 (Project_Empty): removed
6503 (Empty_Project): new parameter Qualifier
6504 This is used to have fields specific to aggregate projects, cleaner
6505 New field to store the list of aggregated projects.
6506 (Check_Aggregate_Project): removed
6507 (Process_Aggregated_Projects, Free): new subprograms.
6509 2011-08-03 Olivier Hainque <hainque@adacore.com>
6511 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6513 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6515 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6516 explicit dereference of an unconstrained type, create a constrained
6517 subtype for it, as is done for function calls that return an
6520 2011-08-03 Thomas Quinot <quinot@adacore.com>
6522 * g-pehage.adb (Finalize): Avoid possible double-free.
6524 2011-08-03 Steve Baird <baird@adacore.com>
6526 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6527 Elab_Spec/Body attrs in CodePeer_Mode.
6529 2011-08-03 Javier Miranda <miranda@adacore.com>
6531 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6532 low bound is not known at compile time but they have no others choice.
6533 Done because in this case the bounds can be obtained directly from the
6536 2011-08-03 Ed Falis <falis@adacore.com>
6538 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6539 on VxWorks SMP. Remove unusable constant ANY_CPU.
6541 2011-08-03 Emmanuel Briot <briot@adacore.com>
6543 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6544 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6545 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6546 Prj.Env.Initialize_Empty): new subprograms
6547 (Get_Env, Find_Project): remove parameter Target_Name.
6549 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6551 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6552 as a condition for the delayed call to Derived_Subprograms done for the
6553 case of the rewriting of a derived type that constrains the
6554 discriminants of its parent type.
6555 Avoids redundant subprogram derivations for private subtype derivations.
6557 2011-08-03 Javier Miranda <miranda@adacore.com>
6559 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6560 Build_Record_Aggr_Code.
6561 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6562 discriminants in extension aggregates.
6564 2011-08-03 Emmanuel Briot <briot@adacore.com>
6566 * prj-pp.adb (Print): also output project qualifiers, since in
6567 particular "aggregate" is mandatory in an aggregate project.
6569 2011-08-03 Emmanuel Briot <briot@adacore.com>
6571 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6572 (Debug_Output): new function.
6574 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6576 * gnat_ugn.texi: Document -Wstack-usage.
6577 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6579 2011-08-03 Thomas Quinot <quinot@adacore.com>
6581 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6582 have keyword LIMITED.
6584 2011-08-03 Yannick Moy <moy@adacore.com>
6586 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6587 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6588 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6589 section (does not happen in compiler, only if code directly calls
6591 * get_alfa.adb, get_alfa.ads: New files.
6592 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6594 * lib-xref-alfa.adb: New file.
6595 * lib-xref.adb, lib-xref.ads
6596 (Xref_Entry): redefine information needed in cross-references for ALFA.
6597 Push ALFA treatments in separated local package.
6598 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6599 identifiers. Return entity of package body instead of spec. Return
6600 Empty for a scope with no location.
6601 (Generate_Reference): adapt to new components for ALFA information.
6602 Remove the need for D references on definitions.
6603 (Is_Local_Reference): moved to ALFA local package
6604 (Output_References): extract subfunction as Extract_Source_Name
6605 (Output_Local_References): remove procedure, replaced by filtering of
6606 cross-references in package ALFA and printing in Put_ALFA.
6607 (Write_Entity_Name): remove procedure
6608 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6609 print exact name of entity as it appears in source file
6610 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6611 * put_alfa.adb, put_alfa.ads: New files.
6612 * xref_lib.adb (Search_Xref): protect read of cross-references against
6613 reading other sections of the ALI file, in gnatxref
6614 (Search): protect read of cross-references against reading other
6615 sections of the ALI file, in gnatfind.
6616 * gcc-interface/Make-lang.in: Update dependencies.
6618 2011-08-03 Thomas Quinot <quinot@adacore.com>
6620 * sem_ch3.adb: Minor reformatting.
6622 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6624 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6625 raising an exception.
6627 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6629 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6630 type, always use 1 as the lower bound or string, even if lower bound of
6631 context is not static, to handle properly null strings in a non-static
6634 2011-08-03 Bob Duff <duff@adacore.com>
6636 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6637 always legal on the right-hand side of an assignment statement; there
6638 is always an applicable index constraint in this case. Therefore, the
6639 check for Pkind = N_Assignment_Statement is now unconditional -- it
6640 doesn't depend on whether Is_Constrained (Typ).
6642 2011-08-03 Robert Dewar <dewar@adacore.com>
6644 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6646 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6648 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6649 for an itype created within a generic unit.
6651 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6653 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6654 suppresses all inlining.
6656 2011-08-03 Robert Dewar <dewar@adacore.com>
6658 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6659 exp_aggr.adb: Minor reformatting.
6661 2011-08-03 Thomas Quinot <quinot@adacore.com>
6663 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6664 tagged assignment when discriminant checks are suppressed. This is
6665 useless and extremely costly in terms of static stack usage.
6667 2011-08-03 Bob Duff <duff@adacore.com>
6669 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6670 of generics, because this leads to the wrong entity in the wrong scope,
6671 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6673 (Process_Interface_Name): Follow Alias for instances of generics, to
6674 correct for the above change.
6676 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6678 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6679 is an integer literal it is always safe to replace the reference. In
6680 addition, if the reference appears in the generated code for an object
6681 declaration it is necessary to copy because otherwise the reference
6682 might be to the uninitilized value of the discriminant of the object
6685 2011-08-03 Pascal Obry <obry@adacore.com>
6687 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6688 ACL used, in this case we want to check for ending .exe, not .exe
6689 anywhere in the path.
6691 2011-08-03 Sergey Rybin <rybin@adacore.com>
6693 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6694 the tree structure (semantic decoration of references to record
6697 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6699 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6700 choices of a named array aggregate, bail out when any choices are
6701 marked as Errors_Posted.
6703 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6705 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6706 in which entity is frozen, to handle properly loop variables in
6709 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6711 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6712 subtype is not static, compute the upper bound using attributes, to
6713 handle properly index types that are not integer types.
6715 2011-08-03 Bob Duff <duff@adacore.com>
6717 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6718 Update copyright notice.
6720 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6722 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6723 Original_Discriminant if within an instance.
6724 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6726 2011-08-03 Thomas Quinot <quinot@adacore.com>
6728 * einfo.ads: Minor reformatting.
6730 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6732 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6733 composite type with an unfrozen subcomponent, in the profile of a
6734 primitive operation.
6736 2011-08-03 Robert Dewar <dewar@adacore.com>
6738 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6740 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6742 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6743 unconstrained type with discriminants is initialized with an aggregate,
6744 use the constrained subtype of the aggregate as the type of the object,
6745 because it is immutable, and this allows the back-end to generate no
6746 code for the object declaration.
6748 2011-08-03 Robert Dewar <dewar@adacore.com>
6750 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6751 comparison operand is variable, and turns out to be zero or negative.
6753 2011-08-03 Javier Miranda <miranda@adacore.com>
6756 (Expand_Dispatching_Constructor_Call): Disable expansion of
6757 code required for native targets. Done to avoid generating
6758 references to unavailable runtime entities in VM targets.
6760 (Expand_N_Object_Declaration): Add missing support to handle
6761 the explicit initialization of class-wide interface objects.
6764 2011-08-03 Matthew Heaney <heaney@adacore.com>
6766 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
6768 2011-08-03 Matthew Heaney <heaney@adacore.com>
6770 * a-cbdlli.adb (Splice): move source items from first to last
6772 2011-08-03 Yannick Moy <moy@adacore.com>
6774 * sem_util.ads: comment added.
6776 2011-08-03 Javier Miranda <miranda@adacore.com>
6779 (Expand_Record_Aggregate): In VM targets disable the expansion into
6780 assignments of aggregates whose type is not known at compile time.
6782 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6784 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
6785 protected entries and task entries, to build the proper renaming
6786 declaration for entry formals, used in debugging.
6787 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
6788 parameters in the same way.
6790 2011-08-02 Robert Dewar <dewar@adacore.com>
6792 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6793 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6794 code reorganization.
6796 2011-08-02 Robert Dewar <dewar@adacore.com>
6798 * debug.adb: Debug flag d.P to suppress length comparison optimization
6799 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6800 comparison of Length by comparing First/Last instead.
6802 2011-08-02 Matthew Heaney <heaney@adacore.com>
6804 * a-cobove.ads: Code clean up.
6806 2011-08-02 Vincent Celier <celier@adacore.com>
6808 * adaint.c (file_names_case_sensitive_cache): New static int.
6809 (__gnat_get_file_names_case_sensitive): Cache the return value in
6810 file_names_case_sensitive_cache at the first invocation, to avoid
6811 multiple calls to getenv.
6813 2011-08-02 Bob Duff <duff@adacore.com>
6815 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6817 2011-08-02 Yannick Moy <moy@adacore.com>
6819 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6820 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6821 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6822 indicate that we are in a precondition or postcondition. This is used in
6823 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6824 decide whether to flag the spec or body of the current subprogram as
6827 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
6829 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6831 * a-extiin.ads: New file.
6833 2011-08-02 Bob Duff <duff@adacore.com>
6835 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6836 now raises Name_Error instead of Use_Error in certain cases. The other
6837 parts of this AI were already implemented properly.
6839 2011-08-02 Vincent Celier <celier@adacore.com>
6841 * link.c: Only import "auto-host.h" when building the gnattools.
6843 2011-08-02 Yannick Moy <moy@adacore.com>
6845 * sem_util.adb: Inter-unit inlining does not work for a subprogram
6846 which calls a local subprogram, so extract subprogram
6847 from Mark_Non_ALFA_Subprogram_Body.
6849 2011-08-02 Javier Miranda <miranda@adacore.com>
6852 (Extract_Dispatching_Call): If the type of the dispatching object is an
6853 access type then return an explicit dereference in the Object out-mode
6856 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6858 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6859 compatibility checks for all indexes of an array subtype, not just the
6860 first. Reset Has_Dynamic_Range_Check on the subtype before each
6861 potential check to ensure that Insert_Range_Checks will not elide any
6862 of the dynamic checks.
6864 2011-08-02 Yannick Moy <moy@adacore.com>
6866 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6867 SPARK restriction at parsing time.
6868 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6869 directive only if the SPARK restriction is set for this unit.
6871 2011-08-02 Yannick Moy <moy@adacore.com>
6873 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6874 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6875 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6876 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6877 Mark_Non_ALFA_Subprogram_Body.
6878 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6881 2011-08-02 Yannick Moy <moy@adacore.com>
6883 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6886 2011-08-02 Robert Dewar <dewar@adacore.com>
6888 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6889 exp_ch3.adb: Minor reformatting.
6891 2011-08-02 Emmanuel Briot <briot@adacore.com>
6893 * adaint.c (__gnat_locate_exec_on_path): only returns executable
6894 files, not any regular file.
6895 (__gnat_locate_file_with_predicate): new subprogram.
6897 2011-08-02 Yannick Moy <moy@adacore.com>
6899 * sinfo.adb, sinfo.ads: Restrict the use of flags
6900 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6901 nodes, plus N_Subtype_Declaration for the 2nd one.
6903 2011-08-02 Sergey Rybin <rybin@adacore.com>
6905 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6906 - fix bugs in the description of Source_Trace;
6907 - get rid of UNIT_NAME;
6909 2011-08-02 Javier Miranda <miranda@adacore.com>
6912 (Build_Dispatching_Requeue): Adding support for VM targets
6913 since we cannot directly reference the Tag entity.
6914 * exp_sel.adb (Build_K): Adding support for VM targets.
6915 (Build_S_Assignment): Adding support for VM targets.
6917 (Default_Prim_Op_Position): In VM targets do not restrict availability
6918 of predefined interface primitives to compiling in Ada 2005 mode.
6919 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6920 restricted to compiling in Ada 2005 mode.
6921 (Make_VM_TSD): Generate code that declares and initializes the OSD
6922 record. Needed to support dispatching calls through synchronized
6925 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6926 primitives associated with synchronized interfaces.
6927 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6928 primitives associated with synchronized interfaces.
6930 2011-08-02 Yannick Moy <moy@adacore.com>
6932 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6933 statements hidden in SPARK if preceded by the HIDE directive
6934 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6935 exception handlers as hidden in SPARK if preceded by the HIDE directive
6936 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6937 if starting with the HIDE directive
6938 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6939 starting with the HIDE directive; mark the declarations in a private
6940 part as hidden in SPARK if the private part starts with the HIDE
6942 * restrict.adb, restrict.ads
6943 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6944 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6945 argument node belongs to a part which is hidden in SPARK
6946 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6947 parts in SPARK; protect the possibly costly call to
6948 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6949 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6950 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6951 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6953 (Scan): recognize special comment starting with '#' and followed by
6954 SPARK keyword "hide" as a HIDE directive.
6956 2011-08-02 Yannick Moy <moy@adacore.com>
6958 * types.ads, erroutc.ads: Minor reformatting.
6960 2011-08-02 Vincent Celier <celier@adacore.com>
6962 * link.c: Add response file support for cross platforms.
6964 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6966 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6967 in an association, set parent field of copy before partial analysis.
6968 * sem_res.adb (Resolve_Slice): create reference to itype only when
6969 expansion is enabled.
6971 2011-08-02 Yannick Moy <moy@adacore.com>
6973 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6974 for new flag denoting which subprogram bodies are in ALFA
6975 * restrict.adb, sem_ch7.adb: Update comment
6976 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6977 sem_ch9.adb, sem_res.adb: Add calls to
6978 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6979 * sem_ch6.adb (Analyze_Function_Return): add calls to
6980 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6981 middle of the body, and extended return.
6982 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6983 False when missing return.
6984 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6985 to True for subprograms whose spec is in ALFA. Remove later on the flag
6986 on the entity used for a subprogram body when there exists a separate
6988 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6989 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6990 False, otherwise do nothing.
6992 2011-08-02 Robert Dewar <dewar@adacore.com>
6994 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6996 2011-08-02 Yannick Moy <moy@adacore.com>
6998 * sem_ch4.ads: minor formatting.
7000 2011-08-02 Yannick Moy <moy@adacore.com>
7002 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7003 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7004 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7005 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7006 opt.ads: cleanup of SPARK mode
7008 2011-08-02 Yannick Moy <moy@adacore.com>
7010 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7012 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7013 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7015 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7016 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7017 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7018 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7020 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7022 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7023 functions whose return type is not in ALFA.
7024 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7026 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7027 parameter's type is not in ALFA.
7028 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7033 * sem_ch6 (Analyze_Expression_Function): treat the function as
7034 Inline_Always, and introduce a subprogram declaration for it when it is
7036 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7037 expression functions, so that the back-end can determine whether they
7038 can in fact be inlined.
7039 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7040 a function body comes from an expression function.
7042 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7044 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7045 null exclusions to test Can_Never_Be_Null on the anonymous access types
7046 of the formals rather than testing the formals themselves. Exclude this
7047 check in cases where the Old_Formal is marked as a controlling formal,
7048 to avoid issuing spurious errors for bodies completing dispatching
7049 operations (due to the flag not getting set on controlling access
7050 formals in body specs).
7051 (Find_Corresponding_Spec): When checking full and subtype conformance of
7052 subprogram bodies in instances, pass Designated and E in that order, for
7053 consistency with the expected order of the formals (New_Id followed by
7056 2011-08-02 Robert Dewar <dewar@adacore.com>
7058 * sem_ch8.adb: Minor reformatting.
7060 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7062 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7063 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7064 primitive operations of class-wide actuals.
7066 2011-08-02 Javier Miranda <miranda@adacore.com>
7068 * exp_atag.ads, exp_atag.adb
7069 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7070 since its value is implicitly passed in argument Typ.
7071 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7072 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7073 Build_Common_Dispatching_Select_Statements.
7075 2011-08-02 Robert Dewar <dewar@adacore.com>
7077 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7078 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7081 2011-08-02 Robert Dewar <dewar@adacore.com>
7083 * sem_res.adb: Minor reformatting.
7084 * sem_prag.adb: Minor reformatting.
7086 2011-08-02 Javier Miranda <miranda@adacore.com>
7088 * exp_atag.adb, exp_atags.ads
7089 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7090 by the tagged type Entity. Required to use this routine in the VM
7091 targets since we do not have available the Tag entity in the VM
7094 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7095 Ada.Tags has not been previously loaded.
7097 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7098 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7100 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7101 view of enclosing scopes. Required to handle enclosing scopes that
7102 are synchronized types whose full view is a task type.
7104 (Build_VM_TSDs): Minor code improvement to avoid generating and
7105 analyzing lists with empty nodes.
7106 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7107 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7108 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7109 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7110 (Make_Select_Specific_Data_Table): Add support for VM targets.
7111 (Make_VM_TSD): Generate code to initialize the SSD structure of
7114 2011-08-02 Yannick Moy <moy@adacore.com>
7116 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7117 cross-references section in ALI.
7118 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7119 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7121 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7122 subprogram or package entity of a node
7123 (Is_Local_Reference_Type): new function returns True for references
7124 selected in local cross-references.
7125 (Lt): function extracted from Lt in Output_References
7126 (Write_Entity_Name): function extracted from Output_References
7127 (Generate_Definition): generate reference with type 'D' for definition
7128 of objects (object declaration and parameter specification), with
7129 appropriate locations and units, for use in local cross-references.
7130 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7131 references of type 'I' for initialization in object definition.
7132 (Output_References): move part of function Lt and procedure
7133 Write_Entity_Name outside of the body. Ignore references of types 'D'
7134 and 'I' introduced for local cross-references.
7135 (Output_Local_References): new procedure to output the local
7136 cross-references sections.
7137 (Lref_Entity_Status): new array defining whether an entity is a local
7138 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7139 with 'I' type when initialization expression is present.
7140 * get_scos.adb, get_scos.ads: Correct comments and typos
7142 2011-08-02 Javier Miranda <miranda@adacore.com>
7144 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7146 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7148 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7151 2011-08-02 Vincent Celier <celier@adacore.com>
7153 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7154 (No_Space_Img): New function
7155 (Find_Excluded_Sources): When reading from a file, record the file name
7156 and the line number for each excluded source.
7157 (Mark_Excluded_Sources): When reporting an error, if the excluded
7158 sources were read from a file, include file name and line number in
7161 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7163 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7165 2011-08-02 Robert Dewar <dewar@adacore.com>
7167 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7169 2011-08-02 Javier Miranda <miranda@adacore.com>
7171 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7172 generation of TSDs to the DOTNET compiler.
7173 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7174 generation of TSDs to the DOTNET compiler.
7176 2011-08-02 Javier Miranda <miranda@adacore.com>
7178 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7179 record of all the tagged types declared inside library level package
7180 declarations, library level package bodies or library level subprograms.
7181 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7182 associated with a given tagged type.
7183 (Build_VM_TSDs): New subprogram.
7184 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7185 compilation units that are subprograms.
7186 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7187 compilation units that are package bodies.
7188 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7189 units that are a package declaration or a package instantiation.
7190 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7191 reorganization to improve the error generated by the frontend when the
7192 function Ada.Tags.Secondary_Tag is not available.
7193 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7194 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7196 2011-08-02 Javier Miranda <miranda@adacore.com>
7198 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7200 2011-08-02 Robert Dewar <dewar@adacore.com>
7202 * s-imenne.ads: Minor reformatting.
7204 2011-08-02 Robert Dewar <dewar@adacore.com>
7206 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7207 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7208 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7210 2011-08-02 Robert Dewar <dewar@adacore.com>
7212 * einfo.ads (Materialize_Entity): Document this is only for renamings
7213 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7214 required debug information in the case where we transform the object
7215 declaration into a renaming declaration.
7216 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7218 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7221 2011-08-02 Robert Dewar <dewar@adacore.com>
7223 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7224 Suppress_Init_Procs.
7225 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7226 Suppress_Initialization/Initialization_Suppressed.
7227 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7228 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7229 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7230 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7232 2011-08-02 Robert Dewar <dewar@adacore.com>
7234 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7237 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7239 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7240 only have inheritable classwide pre/postconditions.
7242 2011-08-02 Javier Miranda <miranda@adacore.com>
7244 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7245 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7246 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7247 checks if the external tag of a type is the same as the external tag
7248 of some other declaration.
7250 2011-08-02 Thomas Quinot <quinot@adacore.com>
7252 * s-taskin.ads: Minor reformatting.
7254 2011-08-02 Emmanuel Briot <briot@adacore.com>
7256 * g-comlin.adb (Display_Help): swap the order in which it prints the
7257 short help and the general usage.
7259 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7261 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7262 the aspect declarations and attach them to the generic copy for
7263 subsequent analysis.
7264 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7265 declarations of the generic tree to the new subprogram declarations.
7266 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7267 conditions that apply to a subprogram instance.
7269 2011-08-02 Robert Dewar <dewar@adacore.com>
7271 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7275 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7276 private type with a tagged full view is not derived in the immediate
7277 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7279 2011-08-02 Robert Dewar <dewar@adacore.com>
7281 * exp_ch4.adb: Minor reformatting.
7283 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7285 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7286 Ada2012 iterator, the loop will be rewritten during expansion into a
7287 while loop with a cursor and an element declaration. Do not analyze the
7288 body in this case, because if the container is for indefinite types the
7289 actual subtype of the elements will only be determined when the cursor
7290 declaration is analyzed.
7292 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7294 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7295 size/alignment related attributes in CodePeer_Mode.
7297 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7299 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7300 Prepend_Element, since this can result in the operation getting the
7301 wrong slot in the full type's dispatch table if the full type has
7302 inherited operations. The incomplete type's operation will get added
7303 to the proper position in the full type's primitives
7304 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7305 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7306 dispatching operations, since there are cases where nonprimitive
7307 subprograms can get added to the list of incomplete dependents (such
7308 as subprograms in nested packages).
7309 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7310 private part when determining whether to add a primitive with a
7311 parameter of a tagged incomplete type to the Private_Dependents list.
7312 Such primitives can also occur in the visible part, and should not have
7313 been excluded from being private dependents.
7314 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7315 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7316 list of a Taft-amendment incomplete type is a primitive before issuing
7317 an error that the full type must appear in the same unit. There are
7318 cases where nonprimitives can be in the list (such as subprograms in
7320 * sem_disp.adb (Derives_From): Use correct condition for checking that
7321 a formal's type is derived from the type of the corresponding formal in
7322 the parent subprogram (the condition was completely wrong). Add
7323 checking that was missing for controlling result types being derived
7324 from the result type of the parent operation.
7326 2011-08-02 Yannick Moy <moy@adacore.com>
7328 * errout.adb (First_Node): minor renaming
7329 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7332 2011-08-02 Yannick Moy <moy@adacore.com>
7334 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7335 before accessing operands.
7336 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7337 decide whether an initialization expression respects SPARK rules, as
7338 the plain node is the expanded one. This allows for more valid warnings
7340 * gnat_rm.texi: Minor update.
7342 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7344 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7347 2011-08-02 Robert Dewar <dewar@adacore.com>
7349 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7351 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7353 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7354 loop statements and the element renaming declaration with a block when
7355 the element type is controlled.
7357 2011-08-02 Yannick Moy <moy@adacore.com>
7359 * sinfo.ads: Minor formatting.
7361 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7363 * sem_aggr.adb (Add_Association): if the association has a box and no
7364 expression, use the Sloc of the aggregate itself for the new
7366 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7369 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7371 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7372 When a container is provided via a function call, generate a renaming
7373 of the function result. This avoids the creation of a transient scope
7374 and the premature finalization of the container.
7375 * exp_ch7.adb (Is_Container_Cursor): Removed.
7376 (Wrap_Transient_Declaration): Remove the supression of the finalization
7377 of the list controller when the declaration denotes a container cursor,
7380 2011-08-02 Yannick Moy <moy@adacore.com>
7382 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7383 node is from source, instead of the original node being from source.
7385 (Resolve_Array_Aggregate): refine the check for a static expression, to
7386 recognize also static ranges
7387 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7388 Array_Type_Declaration): postpone the test for the type being a subtype
7389 mark after the type has been resolved, so that component-selection and
7390 expanded-name are discriminated.
7391 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7392 to distinguish the case of an iteration scheme, so that an error is
7393 issed on a non-static range in SPARK except in an iteration scheme.
7394 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7395 In_Iter_Schm = True.
7396 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7397 user-defined operators so that they are allowed in renaming
7399 (Find_Selected_Component): refine the check for prefixing of operators
7400 so that they are allowed in renaming. Move the checks for restrictions
7401 on selector name after analysis discriminated between
7402 component-selection and expanded-name.
7403 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7404 concatenation argument of string type if it is static.
7405 * sem_util.adb, sem_util.ads
7406 (Check_Later_Vs_Basic_Declarations): add a new function
7407 Is_Later_Declarative_Item to decice which declarations are allowed as
7408 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7409 mode, add that renamings are considered as later items.
7410 (Enclosing_Package): new function to return the enclosing package
7411 (Enter_Name): correct the rule for homonyms in SPARK
7412 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7413 from source (result of expansion) to avoid issuing wrong warnings.
7415 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7417 * errout.adb: On anything but an expression First_Node returns its
7420 2011-08-02 Pascal Obry <obry@adacore.com>
7422 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7424 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7426 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7427 Set the associated loop as the related expression of internally
7429 * exp_ch7.adb (Is_Container_Cursor): New routine.
7430 (Wrap_Transient_Declaration): Supress the finalization of the list
7431 controller when the declaration denotes a container cursor.
7433 2011-08-02 Yannick Moy <moy@adacore.com>
7435 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7437 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7438 expression is a simple expression. This check cannot be performed in
7439 the semantics, so just drop it.
7440 (P_Index_Or_Discriminant_Constraint): move check that the index or
7441 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7442 semantics. Other cases were previously checked in the semantics.
7443 * par-ch4.adb (P_Name): move checks that a selector name is not
7444 character literal or an operator symbol to Find_Selected_Component in
7446 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7447 declarations are not placed after later declarations in a separate
7448 procedure in Sem_Util (possibly not the best choice?), to be used both
7449 during parsing, for Ada 83 mode, and during semantic analysis, for
7451 * par-endh.adb (Check_End): move check that end label is not missing
7452 to Process_End_Label in the semantics
7453 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7454 the special case for SPARK restriction
7455 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7456 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7457 parameter Force to issue the error message even on internal node (used
7458 for generated end label). Call Check_Restriction to check when an error
7459 must be issued. In SPARK mode, issue an error message even if the
7460 restriction is not set.
7461 (Check_Restriction): new procedure with an additional out parameter to
7462 inform the caller that a message has been issued
7463 * sem_aggr.adb: Minor modification of message
7464 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7465 instead of issuing an error message directly
7466 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7467 declarations are not placed after later declarations, by calling
7468 Check_Later_Vs_Basic_Declarations
7469 (Analyze_Subtype_Declaration): move here the check that an index or
7470 discriminant constraint must be a subtype mark. Change the check that
7471 a subtype of String must start at one so that it works on subtype marks.
7472 * sem_ch4.adb (Analyze_Call): move here the check that a named
7473 association cannot follow a positional one in a call
7474 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7475 instead of issuing an error message directly
7476 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7477 selector name is not a character literal or an operator symbol. Move
7478 here the check that the prefix of an expanded name cannot be a
7479 subprogram or a loop statement.
7480 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7481 procedure called from parsing and semantics to check that basic
7482 declarations are not placed after later declarations
7483 (Process_End_Label): move here the check that end label is not missing
7485 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7487 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7488 representation clause in codepeer mode, since it confuses CodePeer and
7489 does not bring useful info.
7491 2011-08-02 Ed Falis <falis@adacore.com>
7493 * init.c: initialize fp hw on MILS.
7495 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7497 * errout.adb (First_Node): for bodies, return the node itself (small
7498 optimization). For other nodes, do not check source_unit if the node
7499 comes from Standard.
7501 2011-08-02 Robert Dewar <dewar@adacore.com>
7503 * exp_ch3.adb: Minor comment additions.
7504 * sem_ch13.adb: Minor reformatting.
7506 2011-08-02 Pascal Obry <obry@adacore.com>
7508 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7510 2011-08-02 Robert Dewar <dewar@adacore.com>
7512 * sem_attr.adb: Minor reformatting.
7514 2011-08-02 Robert Dewar <dewar@adacore.com>
7516 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7517 (Has_Default_Component_Value): Removed
7518 * einfo.ads Comment updates
7519 (Has_Default_Aspect): Replaces Has_Default_Value
7520 (Has_Default_Component_Value): Removed
7522 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7524 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7525 (Get_Simple_Init_Val): Handle Default_Value aspect
7526 (Needs_Simple_Initialization): Handle Default_Value aspect
7527 * exp_ch3.ads: Needs_Simple_Initialization
7528 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7529 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7531 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7532 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7533 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7537 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7538 package containing iteration primitives.
7539 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7541 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7543 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7544 "of", pre-analyze expression in case it is a function call with
7545 finalization actions that must be placed ahead of the loop.
7546 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7547 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7549 2011-08-02 Geert Bosch <bosch@adacore.com>
7551 * cstand.adb (Create_Float_Types): Only consider C's long double for
7552 Long_Long_Float, in addition to double.
7554 2011-08-02 Robert Dewar <dewar@adacore.com>
7556 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7557 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7558 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7561 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7563 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7566 2011-08-02 Javier Miranda <miranda@adacore.com>
7568 * einfo.ads, einfo.adb
7569 (Original_Access_Type): Move this attribute to Node26 since there was
7570 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7571 which causes conflicts and breaks the generation of the .NET compiler.
7572 (Interface_Name): Add missing documentation on JGNAT only uses of
7575 2011-08-02 Geert Bosch <bosch@adacore.com>
7577 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7578 (Find_Back_End_Float_Type): Likewise
7579 (Create_Back_End_Float_Types): Likewise
7580 (Create_Float_Types): Likewise
7581 (Register_Float_Type): Likewise
7582 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7583 Nlist and split out type selection in new local Find_Base_Type function.
7584 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7586 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7588 2011-08-02 Robert Dewar <dewar@adacore.com>
7590 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7592 * opt.ads: Minor comment change.
7593 * sem_ch12.adb: Minor code reorganization.
7595 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7597 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7598 subtype's list of rep items to the list on the full subtype in the case
7599 where the lists are the same.
7601 2011-08-02 Geert Bosch <bosch@adacore.com>
7603 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7604 using the one from System.Strings, which also deallocates all strings.
7606 2011-08-02 Geert Bosch <bosch@adacore.com>
7608 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7610 * gcc-interface/Make-lang.in: Update dependencies.
7612 2011-08-02 Olivier Hainque <hainque@adacore.com>
7614 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7617 2011-08-02 Javier Miranda <miranda@adacore.com>
7619 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7620 associated with anonymous access to subprograms.
7622 2011-08-02 Geert Bosch <bosch@adacore.com>
7625 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7626 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7627 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7628 (Add_Symbol_Definition): Move to switch-c.adb
7629 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7630 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7631 (Add_Symbol_Definition): Move to switch-c.adb.
7632 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7634 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7636 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7637 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7639 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7640 (Add_Symbol_Definition): Moved from Prepcomp.
7641 * switch-c.ads: Update copyright notice. Use String_List instead of
7642 Argument_List, removing dependency on System.OS_Lib.
7644 2011-08-02 Yannick Moy <moy@adacore.com>
7646 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7647 mode on initialization expression which does not respect SPARK
7649 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7650 if the tree referenced by its argument represents an initialization
7651 expression in SPARK, suitable for initializing an object in an object
7654 2011-08-02 Javier Miranda <miranda@adacore.com>
7656 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7657 internally generated access to subprogram with its associated protected
7659 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7661 2011-08-02 Geert Bosch <bosch@adacore.com>
7663 * cstand.adb (Register_Float_Type): Print information about type to
7664 register, if the Debug_Flag_Dot_B is set.
7665 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7666 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7667 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7668 with a requested precision of more than Max_Digits digits and no more
7669 than Max_Base_Digits digits, if a range specification is present and the
7670 Predefined_Float_Types list has a suitable type to derive from.
7671 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7672 case of type completion with pragma Import
7674 (Process_Import_Predefined_Type): Processing to complete a type
7675 with pragma Import. Currently supports floating point types only.
7676 (Set_Convention_From_Pragma): Do nothing without underlying type.
7677 (Process_Convention): Guard against absence of underlying type,
7678 which may happen when importing incomplete types.
7679 (Process_Import_Or_Interface): Handle case of importing predefined
7680 types. Tweak error message.
7682 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7684 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7685 functions to previous change. Reorganize code slightly.
7687 2011-08-02 Geert Bosch <bosch@adacore.com>
7689 * back_end.ads (Register_Type_Proc): New call back procedure type for
7690 allowing the back end to provide information about available types.
7691 (Register_Back_End_Types): New procedure to register back end types.
7692 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7694 * cstand.adb (Back_End_Float_Types): New list for floating point types
7695 supported by the back end.
7696 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7697 (Copy_Float_Type): New procedure to make new copies of predefined types.
7698 (Register_Float_Type): New call back procedure to populate the BEFT list
7699 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7700 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7701 (Create_Float_Types): New procedure to create entities for floating
7702 point types predefined in Standard, and put these and any remaining
7703 BEFTs on the Predefined_Float_Types list.
7704 * stand.ads (Predefined_Float_Types): New list for predefined floating
7705 point types that do not have declarations in package Standard.
7707 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7709 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7710 entity node for the unit containing the parameter.
7711 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7712 (Add_Inlined_Subprogram): Likewise.
7713 * gcc-interface/Make-lang.in: Update dependencies.
7715 2011-08-02 Thomas Quinot <quinot@adacore.com>
7717 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7720 2011-08-02 Geert Bosch <bosch@adacore.com>
7722 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7724 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7726 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7727 computed value of Base_Type.
7729 2011-08-02 Yannick Moy <moy@adacore.com>
7731 * restrict.adb (Check_Restriction): issue an error for any use of
7732 class-wide, even if the No_Dispatch restriction is not set.
7733 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7734 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7735 when completing a private extension, the type named in the private part
7736 is not the same as that named in the visible part.
7737 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7738 of an inherited primitive operations of a tagged type or type extension
7739 that returns the tagged type.
7740 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7741 function which returns True for an implicit operation inherited by the
7742 derived type declaration for the argument type.
7743 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7748 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7749 Process_Bounds, to perform analysis with expansion of a range or an
7750 expression that is the iteration scheme for a loop.
7751 (Analyze_Iterator_Specification): If domain of iteration is given by a
7752 function call with a controlled result, as is the case if call returns
7753 a predefined container, ensure that finalization actions are properly
7755 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7757 2011-08-02 Javier Miranda <miranda@adacore.com>
7759 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7760 * gcc-interface/Make-lang.in: Update dependencies.
7762 2011-08-02 Javier Miranda <miranda@adacore.com>
7764 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7765 determine if the analysis is performed using N or Original_Node (N).
7766 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7767 functionality of routine Is_Variable avoids code duplication.
7768 * checks.adb (Determine_Range): Handle temporaries generated by
7769 Remove_Side_Effects.
7771 2011-08-02 Javier Miranda <miranda@adacore.com>
7773 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7774 expansion of the condition. Required since the previous analysis was
7775 done with expansion disabled (see Resolve_Quantified_Expression) and
7776 hence checks were not inserted and record comparisons have not been
7779 2011-08-02 Ed Falis <falis@adacore.com>
7781 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7784 2011-08-02 Bob Duff <duff@adacore.com>
7786 * opt.ads: Minor comment fix.
7788 2011-08-02 Bob Duff <duff@adacore.com>
7790 * sem_ch12.adb (Analyze_Package_Instantiation,
7791 Analyze_Subprogram_Instantiation): Turn off style checking while
7792 analyzing an instance. Whatever style checks that apply to the generic
7793 unit should apply, so it makes no sense to apply them in an instance.
7794 This was causing trouble when compiling an instance of a runtime
7795 unit that violates the -gnatyO switch.
7796 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7797 one of the two case statements, causing spurious errors.
7799 2011-08-02 Robert Dewar <dewar@adacore.com>
7801 * uname.adb: Minor reformatting.
7802 * gnatcmd.adb: Minor reformatting.
7803 * exp_attr.adb: Minor reformatting.
7805 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7807 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7808 No_Dispatching_Calls, do not look for the Assign primitive, because
7809 predefined primitives are not created in this case.
7811 2011-08-02 Bob Duff <duff@adacore.com>
7813 * stylesw.ads: Minor comment fixes.
7815 2011-08-02 Robert Dewar <dewar@adacore.com>
7817 * freeze.adb (Add_To_Result): New procedure.
7819 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7821 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7822 time, if the specific run-time routines for handling streams of strings
7823 are not available, use the default mechanism.
7825 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7827 * s-regpat.ads: Fix typo.
7829 2011-08-02 Vincent Celier <celier@adacore.com>
7831 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7832 not null, call it to create the in memory config project file without
7833 parsing an existing default config project file.
7835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7837 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7839 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7841 * sem_elim.adb: an abstract subprogram does not need an eliminate
7842 pragma for its descendant to be eliminable.
7844 2011-08-02 Ed Falis <falis@adacore.com>
7846 * init.c: revert to handling before previous checkin for VxWorks
7847 * s-intman-vxworks.adb: delete unnecessary declarations related to
7848 using Ada interrupt facilities for handling signals.
7849 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7850 * s-intman-vxworks.ads: Import __gnat_install_handler as
7851 Initialize_Interrupts.
7852 * s-taprop-vxworks.adb: Delete Signal_Mask.
7853 (Abort_Handler): change construction of mask to unblock exception
7856 2011-08-02 Jerome Guitton <guitton@adacore.com>
7858 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7859 Debug_Raise_Exception before propagation starts.
7861 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7863 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7864 to Restriction_Check_Required.
7865 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7866 * sem_res.adb (Resolve_Call): Likewise.
7867 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7869 2011-08-02 Bob Duff <duff@adacore.com>
7871 * stylesw.ads: Update comment.
7872 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7873 * errout.ads: Remove obsolete comment.
7875 2011-08-02 Javier Miranda <miranda@adacore.com>
7877 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7878 (Set_Is_Safe_To_Reevaluate): new procedure.
7879 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7880 assignment is allowed on safe-to-reevaluate variables.
7881 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7882 temporary created to remove side effects in expressions that use
7883 the secondary stack as safe-to-reevaluate.
7884 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7885 variables that are not true constants.
7887 2011-08-02 Robert Dewar <dewar@adacore.com>
7889 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7890 sem_res.adb, sem_ch6.adb: Minor reformatting.
7892 2011-08-02 Jerome Guitton <guitton@adacore.com>
7894 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7896 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7898 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7899 not set Overridden_Operation if subprogram is an initialization
7902 2011-08-02 Yannick Moy <moy@adacore.com>
7904 * par-ch6.adb: Correct obsolete name in comments
7905 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7906 which takes two message arguments (existing function takes one), with
7907 second message used for continuation.
7908 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7909 block statements that originate from a source block statement, not
7910 generated block statements
7911 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7912 symmetry with procedure case
7913 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7914 function to issue an error in formal mode if a package specification
7915 contains more than one tagged type or type extension.
7916 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7917 parameters matching formals of tagged types are objects (or ancestor
7918 type conversions of objects), not general expressions. Issue an error
7919 on view conversions that are not involving ancestor conversion of an
7921 (Resolve_Type_Conversion): in formal mode, issue an error on the
7922 operand of an ancestor type conversion which is not an object
7923 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7924 procedure so that it works also for actuals of function calls
7925 (Is_Actual_Tagged_Parameter): new function which determines if its
7926 argument is an actual parameter of a formal of tagged type in a
7928 (Is_SPARK_Object_Reference): new function which determines if the tree
7929 referenced by its argument represents an object in SPARK
7931 2011-08-02 Robert Dewar <dewar@adacore.com>
7933 * sem_ch3.adb: Minor reformatting
7934 Minor comment addition
7935 Minor error msg text change
7937 2011-08-02 Javier Miranda <miranda@adacore.com>
7939 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7940 function. Used to be more precise when we generate a variable plus one
7941 assignment to remove side effects in the evaluation of the Bound
7943 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7944 of the bound expression to force its re-analysis and thus expand the
7945 associated transient scope (if required). Code cleanup replacing the
7946 previous code that declared the constant entity by an invocation to
7947 routine Force_Evaluation which centralizes this work in the frontend.
7949 2011-08-02 Robert Dewar <dewar@adacore.com>
7951 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7952 (Base_Type): Now uses improved Is_Base_Type function
7953 * einfo.ads (Base_Type): Inline this function
7955 2011-08-02 Robert Dewar <dewar@adacore.com>
7957 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7958 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7960 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7962 * gcc-interface/Make-lang.in: Update dependencies.
7963 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7966 2011-08-02 Yannick Moy <moy@adacore.com>
7968 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7969 non-simple expression used in delta constraint
7970 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7971 index constraint which is not a subtype mark
7972 * par.adb: With and use Restrict
7973 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7974 mode on component type which is not a subtype mark and default
7975 expression on component
7976 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7977 of string which does not have a lower index bound equal to 1
7978 (Array_Type_Declaration): issue an error in formal mode on index or
7979 component type which is not a subtype mark, and on aliased keyword on
7981 (Derived_Type_Declaration): issue an error in formal mode on interface,
7982 limited or abstract type
7983 (Record_Type_Declaration): issue an error in formal mode on interface
7984 (Record_Type_Definition): issue an error in formal mode on tagged types
7985 and type extensions not declared in the specification of a library unit
7986 package; on null non-tagged record; on variant part
7988 2011-08-02 Vincent Celier <celier@adacore.com>
7990 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7991 not declared for qualified library project when Library_Name is not
7992 declared, but Library_Dir is.
7994 2011-08-02 Robert Dewar <dewar@adacore.com>
7996 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7997 pragmas (affects aspects [Component_]Default_Value
7998 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7999 component type for the resolution
8001 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8003 * einfo.adb (Base_Type): Tune implementation for speed.
8005 2011-08-02 Robert Dewar <dewar@adacore.com>
8007 * freeze.adb: Minor reformatting.
8009 2011-08-02 Thomas Quinot <quinot@adacore.com>
8011 * scos.ads: Update comments.
8013 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8015 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8016 base type, because the parent may be a subtype of a private type whose
8017 convention is established in a private part.
8019 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8021 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8022 statement in a block when the expansion of the return expression has
8023 created a finalization chain.
8024 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8025 with the parent node.
8026 Add N_Extended_Return_Statement to handle the case where a transient
8027 object declaration appears in the Return_Object_Declarations list of
8028 an extended return statement.
8030 2011-08-02 Matthew Gingell <gingell@adacore.com>
8032 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8033 unused parameter 'name'.
8035 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8037 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8038 inherited operation, check whether its alias, which is the source
8039 operastion that it renames, has been marked eliminated.
8041 2011-08-02 Javier Miranda <miranda@adacore.com>
8043 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8044 in-mode parameter whose type is an access type since it can be used to
8045 modify its designated object. Enforce code that handles as safe an
8046 access type that is not access-to-constant but it is the result of a
8047 previous removal of side-effects.
8048 (Remove_Side_Effects): Minor code reorganization of cases which require
8049 no action. Done to incorporate documentation on new cases uncovered
8050 working in this ticket: no action needed if this routine was invoked
8051 too early and the nodes are not yet decorated.
8052 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8053 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8054 were issued with actuals that are implicitly provided by
8057 2011-08-02 Robert Dewar <dewar@adacore.com>
8059 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8061 2011-08-02 Yannick Moy <moy@adacore.com>
8063 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8064 to issue an error in formal mode on attribute not supported in this mode
8065 (Analyze_Attribute): issue errors on standard attributes not supported
8067 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8068 comment, and issue error in formal mode on modulus which is not a power
8070 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8072 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8074 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8075 operator on modular type (except 'not').
8077 2011-08-02 Robert Dewar <dewar@adacore.com>
8079 * gnat_rm.texi: Minor reformatting.
8081 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8083 * s-osinte-linux.ads: Minor comment update and reformatting.
8084 * i-cexten.ads: Make this unit pure, as for its parent.
8085 Will allow its usage in more contexts if needed.
8087 2011-08-02 Robert Dewar <dewar@adacore.com>
8089 * s-utf_32.ads: Minor comment fix.
8091 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8093 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8094 operation of a tagged synchronized type, handle the case where the
8095 controlling argument is overloaded.
8097 2011-08-02 Yannick Moy <moy@adacore.com>
8099 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8100 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8101 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8102 SPARK mode and formal verification mode on processing SPARK restriction
8103 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8104 requiring consistency checking.
8106 2011-08-02 Robert Dewar <dewar@adacore.com>
8108 * sem_res.adb: Minor reformatting.
8110 2011-08-02 Robert Dewar <dewar@adacore.com>
8112 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8113 a-cforse.ads: Remove unneeded with of Ada.Containers
8114 Remove commented out pragma Inline's
8115 Move specifications of new subprograms to the actual specs
8117 2011-08-02 Yannick Moy <moy@adacore.com>
8119 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8120 a-cforse.ads: Update comments.
8122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8124 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8126 2011-08-02 Robert Dewar <dewar@adacore.com>
8128 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8129 a-cforse.ads, a-cofove.ads: Minor reformatting.
8131 2011-08-02 Claire Dross <dross@adacore.com>
8133 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8134 a-cofove.ads: Add comments.
8136 2011-08-02 Yannick Moy <moy@adacore.com>
8138 * gnat_rm.texi: Document formal containers.
8140 2011-08-02 Emmanuel Briot <briot@adacore.com>
8142 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8145 2011-08-02 Robert Dewar <dewar@adacore.com>
8147 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8150 2011-08-02 Robert Dewar <dewar@adacore.com>
8152 * aspects.adb: New aspects Default_Value and Default_Component_Value
8153 New format of Aspect_Names table checks for omitted entries
8154 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8155 handling of boolean aspects for derived types.
8156 New aspects Default_Value and Default_Component_Value
8157 New format of Aspect_Names table checks for omitted entries
8158 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8159 (Has_Default_Value): New flag
8160 (Has_Default_Component_Value): New flag
8161 (Has_Default_Value): New flag
8162 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8164 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8165 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8166 Default_Value and Default_Component_Value
8167 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8168 New aspects Default_Value and Default_Component_Value
8169 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8170 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8172 2011-08-02 Vincent Celier <celier@adacore.com>
8174 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8175 inherit library kind.
8177 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8179 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8182 2011-08-02 Robert Dewar <dewar@adacore.com>
8184 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8186 2011-08-02 Yannick Moy <moy@adacore.com>
8188 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8190 2011-08-02 Robert Dewar <dewar@adacore.com>
8192 * impunit.adb: Add comment.
8194 2011-08-02 Yannick Moy <moy@adacore.com>
8196 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8197 qualification of aggregates in formal mode
8198 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8200 (Resolve_Aggregate): complete the test that an aggregate is adequately
8201 qualified in formal mode
8203 2011-08-02 Pascal Obry <obry@adacore.com>
8205 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8206 * mlib-prj.adb: Supress warning when compiling binder generated file.
8207 (Build_Library): Supress all warnings when compiling the binder
8210 2011-08-02 Yannick Moy <moy@adacore.com>
8212 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8214 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8215 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8216 Add with/use clauses to make Check_Formal_Restriction visible
8218 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8220 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8221 in-parameters when type of the generic formal is private in the generic
8222 spec and non-private in the body.
8224 2011-08-02 Claire Dross <dross@adacore.com>
8226 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8227 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8228 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8229 * impunit.adb, Makefile.rtl: Take new files into account.
8231 2011-08-02 Robert Dewar <dewar@adacore.com>
8233 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8234 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8236 2011-08-02 Yannick Moy <moy@adacore.com>
8238 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8240 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8241 matching static array bounds, taking into account the special case of
8243 * sem_ch3.adb: Typo in comment.
8245 2011-08-02 Yannick Moy <moy@adacore.com>
8247 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8248 which issues an error in formal mode if its argument node is originally
8250 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8251 has a discriminant specification so that it does not include the case
8253 (Derived_Type_Declaration): move here the test that a derived type has a
8254 discriminant specification
8255 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8256 first element of a component association before accessing its choices
8257 (presence of component association is not enough)
8258 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8259 declaration is a library item before accessing the next element in a
8260 list, as library items are not member of lists
8261 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8262 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8263 Check_Formal_Restriction whenever possible.
8265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8267 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8268 reference when needed.
8270 2011-08-02 Bob Duff <duff@adacore.com>
8272 * gnat_ugn.texi: Fix typo.
8274 2011-08-02 Vincent Celier <celier@adacore.com>
8276 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8277 archive file name. Do not use the full path name of archives for Open
8280 2011-08-02 Robert Dewar <dewar@adacore.com>
8282 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8283 Analyze_Aspect_Specifications
8285 (Analyze_Aspect_Specifications): New handling for boolean aspects
8286 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8287 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8288 sequence for Analyze_Aspect_Specifications
8289 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8290 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8292 2011-08-02 Robert Dewar <dewar@adacore.com>
8294 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8295 aspects, since these no longer exist.
8297 2011-08-02 Robert Dewar <dewar@adacore.com>
8299 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8300 semicolon, do not try to see if there are aspects following it.
8301 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8304 2011-08-02 Robert Dewar <dewar@adacore.com>
8306 * sem_ch8.adb, aspects.ads: Minor reformatting.
8308 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8310 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8311 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8313 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8315 2011-08-02 Yannick Moy <moy@adacore.com>
8317 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8318 mode on subprogram declaration outside of package specification, unless
8319 it is followed by a pragma Import
8320 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8321 Access_Type_Declaration): issue error in formal mode on access type
8322 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8324 (Analyze_Object_Declaration): issue error in formal mode on object
8325 declaration which does not respect SPARK restrictions
8326 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8327 declaration which does not respect SPARK restrictions
8328 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8329 error in formal mode on digits or delta constraint
8330 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8331 decimal fixed point type
8332 (Derived_Type_Declaration): issue error in formal mode on derived type
8333 other than type extensions of tagged record types
8334 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8335 with check on access definition
8336 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8337 mode on protected definition.
8338 (Analyze_Task_Definition): issue error in formal mode on task definition
8340 2011-08-02 Robert Dewar <dewar@adacore.com>
8342 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8344 2011-08-02 Javier Miranda <miranda@adacore.com>
8346 * sem_ch6.adb (Can_Override_Operator): New function.
8347 (Verify_Overriding_Indicator): Add missing code to check overriding
8348 indicator in operators. Fixes regression.
8349 (Check_Overriding_Indicator): Minor reformating after replacing the
8350 code that evaluates if the subprogram can override an operator by
8351 invocations to the above new function.
8353 (Write_Field26_Name): Add missing code to ensure that, following
8354 the documentation in einfo.ads, this field is not shown as attribute
8355 "Static_Initialization" on non-dispatching functions.
8357 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8359 * sem_res.adb (Resolve_Call): A call to
8360 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8361 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8362 i.e., when the second parameter is of type Time_Span.
8364 2011-08-02 Vincent Celier <celier@adacore.com>
8366 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8367 with an archive instead of -L<library dir> -l<library name>.
8369 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8371 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8372 mark the base types In_Use in addition to making the operations
8375 2011-08-02 Ed Falis <falis@adacore.com>
8377 * init.c: add and setup __gnat_signal_mask for the exception signals
8378 * s-inmaop-vxworks.adb: new file.
8379 * s-intman-vxworks.adb: remove unnecessary initializations and
8381 * s-intman-vxworks.ads: remove unnecessary variable
8382 * s-taprop-vxworks.adb: simplify signal initialization
8384 2011-08-02 Robert Dewar <dewar@adacore.com>
8386 * sem_ch8.adb: Minor code reorganization, comment updates.
8388 2011-08-02 Robert Dewar <dewar@adacore.com>
8390 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8391 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8393 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8394 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8396 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8398 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8399 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8400 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8401 use_type_clauses, to handle more efficiently use_type and use_all_type
8403 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8404 Ada2012 Use_All_Type clause.
8405 (Use_Class_Wide_Operations): new procedure.
8407 2011-08-02 Robert Dewar <dewar@adacore.com>
8409 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8410 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8411 expression to expression function.
8413 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8415 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8416 if types are compatible.
8418 2011-08-02 Yannick Moy <moy@adacore.com>
8420 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8421 returns True if its argument array types have same dimension and same
8422 static bounds at each index.
8423 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8424 OUT or IN OUT paramaters which are not view conversions in SPARK.
8425 (Resolve_Arithmetic_Op): issue an error in formal mode on
8426 multiplication or division with operands of fixed point types which are
8427 not qualified or explicitly converted.
8428 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8429 Boolean or array type (except String) operands.
8430 (Resolve_Equality_Op): issue an error in formal mode on equality
8431 operators for array types other than String with non-matching static
8433 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8434 for array types with non-matching static bounds. Factorize the code in
8435 Matching_Static_Array_Bounds.
8436 (Resolve_Qualified_Expression): issue an error in formal mode on
8437 qualified expressions for array types with non-matching static bounds.
8438 (Resolve_Type_Conversion): issue an error in formal mode on type
8439 conversion for array types with non-matching static bounds
8441 2011-08-02 Robert Dewar <dewar@adacore.com>
8443 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8445 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8447 * par-ch9.adb: save location of entry for proper error message.
8449 2011-08-02 Javier Miranda <miranda@adacore.com>
8451 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8452 (Use_Full_View) which permits this routine to climb through the
8453 ancestors using the full-view of private parents.
8454 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8455 Use_Full_View to true in calls to Is_Ancestor.
8456 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8457 true in call to Is_Ancestor.
8458 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8459 Use_Full_View to true in call to Is_Ancestor.
8460 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8461 call to Is_Ancestor.
8462 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8463 Use_Full_View to true in calls to Is_Ancestor.
8464 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8465 Make_Select_Specific_Data_Table, Register_Primitive,
8466 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8467 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8468 to true in call to Is_Ancestor.
8469 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8470 Use_Full_View to true in calls to Is_Ancestor.
8472 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8473 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8475 2011-08-02 Robert Dewar <dewar@adacore.com>
8477 * gnat_rm.texi: Minor reformatting.
8478 * sem_prag.adb: Minor reformatting.
8480 2011-08-02 Tristan Gingold <gingold@adacore.com>
8482 * vms_data.ads: Add VMS qualifier for -gnateP.
8484 2011-08-02 Robert Dewar <dewar@adacore.com>
8486 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8487 * par-ch7.adb (P_Package): Proper placement of aspects for package
8489 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8490 (End_Statements): Add Is_Sloc parameterr
8491 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8492 (Check_End): Ad Is_Sloc parameter
8493 (End_Statements): Add Is_Sloc parameterr
8495 2011-08-02 Vincent Celier <celier@adacore.com>
8497 * ug_words: Add VMS qualifier equivalent to -gnateP:
8498 /SYMBOL_PREPROCESSING.
8500 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8502 * gnat-style.texi: For hexadecimal numeric literals the typical
8503 grouping of digits is 4 to represent 2 bytes.
8504 A procedure spec which is split into several lines is indented two
8507 2011-08-02 Yannick Moy <moy@adacore.com>
8509 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8510 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8511 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8513 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8514 choice in array aggregate
8515 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8517 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8518 positional and named aggregate for record, or others in record
8519 aggregate, or multiple choice in record aggregate
8520 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8521 array operands to logical operations AND, OR and XOR do not have the
8522 same static lower and higher bounds
8523 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8525 2011-08-01 Robert Dewar <dewar@adacore.com>
8527 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8528 Replaces Last_Source_Node_In_Sequence.
8529 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8530 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8531 parens and blank in string (this was inconsistently implemented).
8533 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8534 blank in string (this was inconsistently implemented).
8536 (Set_Global_Switches): Set formal mode switches appropriately
8537 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8539 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8540 call Set_Error_Msg_Lang to set "spark" as language name.
8541 * par.adb: Remove unnecessary call to set formal language for errout
8542 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8543 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8545 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8546 calls to it, moved after resolution so that types are known
8547 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8548 result of concatenation is not of type String
8549 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8550 concatenation is not properly restricted
8551 * gnat_rm.texi: Add doc on pragma Spark_95.
8552 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8553 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8554 * gcc-interface/Make-lang.in: Update dependencies.
8556 2011-08-01 Javier Miranda <miranda@adacore.com>
8558 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8559 condition that detects if the overridden operation must replace an
8562 2011-08-01 Javier Miranda <miranda@adacore.com>
8564 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8565 code declarations inserted by Insert_Actions in each alternative of the
8566 N_Case_Expression node.
8568 2011-08-01 Robert Dewar <dewar@adacore.com>
8570 * sem_ch6.adb: Minor code reorganization.
8571 * sem_util.adb: Minor reformatting.
8573 2011-08-01 Pascal Obry <obry@adacore.com>
8575 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8576 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8578 2011-08-01 Yannick Moy <moy@adacore.com>
8580 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8581 literal or operator symbol which is prefixed
8582 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8583 mode on access attributes.
8584 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8585 that concatenation operands are properly restricted in formal mode
8586 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8587 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8588 result of the concatenation has a type different from String.
8589 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8590 Analyze_Quantified_Expression, Analyze_Slice,
8591 Analyze_Null): issue an error in formal mode on unsupported constructs
8593 (Analyze_Block_Statement): only issue error on source block statement
8594 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8595 function which returns the last node in a list of nodes for which
8596 Comes_From_Source returns True, if any
8597 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8598 Last_Source_Node_In_Sequence
8599 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8600 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8601 mode on unsupported constructs
8602 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8603 rest of the actions may be needed later on since the error is marked as
8605 * sinfo.ads: Typos in comments.
8607 2011-08-01 Pascal Obry <obry@adacore.com>
8609 * projects.texi: Minor editing.
8611 2011-08-01 Yannick Moy <moy@adacore.com>
8613 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8614 insertion character ~~
8615 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8616 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8617 with insertion character ~~
8618 (Set_Msg_Text): treat insertion character ~~
8619 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8620 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8621 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8622 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8623 errors related to the formal language restriction not serious
8624 (insertion character |).
8625 * par.adb (Par): set formal language for error messages if needed
8626 * sem_ch6.adb (Check_Missing_Return): take into account possible
8627 generated statements at the end of the function
8628 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8629 enumeration value to define a new pragma SPARK_95
8630 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8631 SPARK_Version): new type and variables to store the SPARK version
8633 (SPARK_Mode): return True when SPARK_Version is set
8634 * par-prag.adb: Correct indentation
8635 (Prag): take Pragma_SPARK_95 into account
8636 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8639 2011-08-01 Robert Dewar <dewar@adacore.com>
8641 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8642 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8643 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8645 2011-08-01 Pascal Obry <obry@adacore.com>
8647 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8648 Target_Name to Get_Path call.
8649 (Parse_Single_Project): Likewise.
8650 (Post_Parse_Context_Clause): Likewise.
8651 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8652 Call Initialise_Project_Path with the proper Target_Name.
8653 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8655 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8656 with the proper Target_Name.
8657 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8659 (Parse_Project_And_Apply_Config): Likewise.
8660 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8661 This is fine as this part of the code is supporting only native
8663 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8664 is fine as this part of the code is supporting only native compilation.
8666 2011-08-01 Yannick Moy <moy@adacore.com>
8668 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8669 of homonym, unless the homonym is one of the cases allowed in SPARK
8670 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8671 package declaration occurring after a body.
8673 2011-08-01 Robert Dewar <dewar@adacore.com>
8675 * checks.adb, exp_ch4.adb: Minor reformatting.
8677 2011-08-01 Javier Miranda <miranda@adacore.com>
8679 * einfo.ads (Access_Disp_Table): Fix documentation.
8680 (Dispatch_Table_Wrappers): Fix documentation.
8682 2011-08-01 Pascal Obry <obry@adacore.com>
8684 * prj-env.adb, prj-env.ads: Minor reformatting.
8686 2011-08-01 Yannick Moy <moy@adacore.com>
8688 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8689 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8690 procedures out of these packages.
8691 * errout.ads, errout.adb
8692 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8693 procedures in of this package
8694 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8695 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8696 on misplaced later vs initial declarations, like in Ada 83
8697 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8698 formal mode on attribute of private type whose full type declaration
8700 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8701 package declaration inside a package specification
8702 (Analyze_Full_Type_Declaration): issue error in formal mode on
8703 controlled type or discriminant type
8704 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8705 user-defined operator means that it should come from the source
8706 (New_Overloaded_Entity): issue error in formal mode on overloaded
8708 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8710 2011-08-01 Thomas Quinot <quinot@adacore.com>
8712 * atree.adb: Minor reformatting.
8713 * checks.adb: Minor reformatting.
8715 2011-08-01 Vincent Celier <celier@adacore.com>
8717 * s-parame-vms-ia64.ads: Fix typo in comment
8719 * s-parame-vms-restrict.ads: Removed, unused.
8721 2011-08-01 Javier Miranda <miranda@adacore.com>
8724 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8726 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8727 * sem_ch3.ads, sem_ch3.adb
8728 (Is_Constant_Bound): New extended version of the subprogram that was
8729 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8730 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8731 * sem_aux.ads (Constant_Value): Fix typo in comment.
8732 * checks.adb (Generate_Index_Checks): New implementation which, for
8733 array objects with constant bounds, generates the runtime check
8734 referencing the bounds of the array type. For other cases this routine
8735 provides its previous behavior obtaining such values from the array
8737 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8739 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8740 we cannot have semantic interpretations of the new node.
8742 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8744 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8747 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8749 * sem_ch8.adb: Minor code editing.
8750 * s-vxwext.adb: Remove trailing space.
8751 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8752 consistency with other files.
8754 2011-08-01 Thomas Quinot <quinot@adacore.com>
8756 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8758 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8760 * par-ch10.adb: reject parameterized expressions as compilation unit.
8761 * sem_ch4.adb: handle properly conditional expression with overloaded
8762 then_clause and no else_clause.
8764 2011-08-01 Tristan Gingold <gingold@adacore.com>
8766 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8767 like done by System.Aux_DEC.
8768 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8770 2011-08-01 Yannick Moy <moy@adacore.com>
8772 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8773 missing label at end of declaration (subprogram or package)
8774 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8775 of positional and named parameter association
8776 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8777 Error_Msg_SP which adds a prefix to the error message giving the name
8778 of the formal language analyzed
8779 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8780 access result type in subprogram, unconstrained array as result type,.
8781 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8783 * sem_ch8.adb: Code clean up.
8785 2011-08-01 Javier Miranda <miranda@adacore.com>
8787 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8788 * einfo.ads (Access_Disp_Table): Fix documentation.
8789 (Dispatch_Table_Wrappers): Fix documentation.
8790 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8791 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8792 to enforce the documentation of this attribute.
8793 (Set_Is_Interface): Cleanup the assertion.
8794 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8795 the Underlying_Type entity before reading attribute Access_Disp_Table.
8796 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8797 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8798 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8799 the Underlying_Type entity before reading attribute Access_Disp_Table.
8800 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8801 Locate the Underlying_Type entity before reading attribute
8804 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8806 * s-poosiz.ads: Additional overriding indicators.
8808 2011-08-01 Yannick Moy <moy@adacore.com>
8810 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8812 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8813 parameter specification does not include a subtype mark.
8814 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8815 formal mode on abstract subprogram.
8816 (Analyze_Subprogram_Specification): issue error in formal mode on
8817 user-defined operator.
8818 (Process_Formals): issue error in formal mode on access parameter and
8820 * sem_ch9.adb (Analyze_Abort_Statement,
8821 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8822 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8823 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8824 Analyze_Requeue, Analyze_Selective_Accept,
8825 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8826 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8827 issue error in formal mode on user-defined raise statement.
8829 2011-08-01 Thomas Quinot <quinot@adacore.com>
8831 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8832 declaration being hidden when overriding an implicit inherited
8834 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8835 (-gnats), do not complain about a source file that contains only a
8838 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8840 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8841 variable if already set.
8843 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8845 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8846 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8847 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8848 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8849 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8850 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8851 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8852 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8853 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8854 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8855 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8856 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8857 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8858 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8859 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8860 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8861 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8862 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8863 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8864 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8865 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8866 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8867 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8868 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8869 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8870 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8871 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8872 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8873 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8874 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8875 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8876 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8877 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8878 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8879 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8880 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8881 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8882 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8883 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8884 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8885 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8886 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8887 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8888 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8889 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8890 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8891 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8892 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8893 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8894 Use GNAT instead of GNARL.
8896 2011-08-01 Bob Duff <duff@adacore.com>
8898 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8899 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8900 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8903 2011-08-01 Yannick Moy <moy@adacore.com>
8905 * debug.adb (d.D) reverve flag for the SPARK mode
8906 (d.E) reverve flag for SPARK generation mode
8907 (d.F) reverve flag for Why generation mode
8908 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8909 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8910 functions which return True when the corresponding modes are set
8911 (Formal_Language): return "spark" or "alfa" when in formal verification
8913 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8914 Error_Msg to prefix the error message with a tag giving the formal
8916 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8917 message with a tag giving the formal language
8918 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8920 (Analyze_Case_Statement): issue error in formal mode on case statement
8921 with a single "others" case alternative
8922 (Analyze_Exit_Statement): issue errors in formal mode on exit
8923 statements which do not respect SPARK restrictions
8924 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8925 (Check_Unreachable_Code): always issue an error (not a warning) in
8926 formal mode on unreachable code (concerns both code after an infinite
8927 loop and after an unconditional jump, both not allowed in SPARK)
8928 * sem_ch6.adb (Analyze_Return_Statement): add call to
8929 Set_Return_Present for a procedure containing a return statement
8930 (already done for functions in Analyze_Function_Return)
8931 (Analyze_Function_Return): issue error in formal mode on extended
8932 return or if return is not last statement in function
8933 (Check_Missing_Return): issue error in formal mode if function does
8934 not end with return or if procedure contains a return
8935 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8936 function to detect if there is an inner scope of its parameter S which
8939 2011-08-01 Thomas Quinot <quinot@adacore.com>
8941 * sem_ch6.ads: Minor reformatting.
8943 2011-08-01 Javier Miranda <miranda@adacore.com>
8945 * sem_util.adb (Abstract_Interface_List): Complete condition when
8946 processing private type declarations to avoid reading unavailable
8948 (Is_Synchronized_Tagged_Type): Complete condition when processing
8949 private extension declaration nodes to avoid reading unavailable
8952 2011-08-01 Thomas Quinot <quinot@adacore.com>
8954 * sem_ch3.adb: Minor reformatting.
8956 2011-08-01 Thomas Quinot <quinot@adacore.com>
8958 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8959 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8960 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8961 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8962 for VMS, instead parametrize the common implementation with
8963 System.Parameters declarations.
8965 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8967 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8969 2011-08-01 Tristan Gingold <gingold@adacore.com>
8971 * seh_init.c: Fix SEH handler installation on win64.
8973 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8975 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8976 double analysis of an anonymous access to subprogram, because it can
8977 lead to improper sharing of profiles and a back-end crash.
8979 2011-08-01 Robert Dewar <dewar@adacore.com>
8981 * make.adb, sem_ch4.adb: Minor reformatting.
8982 * gcc-interface/Make-lang.in: Update dependencies.
8983 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8985 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8987 * gnat_rm.texi: Fix definition of Long_Integer.
8989 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8991 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8992 to prevent storage exhaustion.
8993 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8994 finalized is a function body, insert the cleanup code before the final
8995 return statement, to prevent spurious warnings.
8996 * s-pooglo.ads: add overriding indicator.
8998 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9000 * sem_ch4.adb (Operator_Check): improve error message when both a
9001 with_clause and a use_clause are needed to make operator usage legal.
9002 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9003 determine whether a compilation unit is visible within an other,
9004 either through a with_clause in the current unit, or a with_clause in
9005 its library unit or one one of its parents.
9007 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9009 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9010 over an arbitrary expression of an array or container type.
9011 * lib-xref.adb: clarify comment.
9013 2011-08-01 Bob Duff <duff@adacore.com>
9015 * einfo.ads: Minor reformatting.
9016 * debug.adb: Minor comment improvement.
9018 2011-08-01 Javier Miranda <miranda@adacore.com>
9020 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9021 consider hidden subprograms as valid candidates.
9023 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9025 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9027 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9029 * gnat_ugn.texi: Fix typo.
9031 2011-08-01 Robert Dewar <dewar@adacore.com>
9033 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9034 lib-xref.adb: Minor reformatting
9036 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9038 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9039 when to generate a call to Move_Final_List.
9040 (Has_Controlled_Parts): Remove this function.
9042 2011-08-01 Geert Bosch <bosch@adacore.com>
9044 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9047 2011-08-01 Thomas Quinot <quinot@adacore.com>
9049 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9050 explicit raise of a predefined exception as Comes_From_Source if the
9051 original N_Raise_Statement comes from source.
9053 2011-08-01 Robert Dewar <dewar@adacore.com>
9055 * sinfo.ads: Add comment.
9056 * sem_ch6.adb: Minor reformatting.
9058 2011-08-01 Robert Dewar <dewar@adacore.com>
9060 * freeze.adb (Freeze_Entity): Refine check for bad component size
9061 clause to avoid rejecting confirming clause when atomic/aliased present.
9063 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9065 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9066 better determine whether an entity reference is a write.
9067 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9069 * lib-xref.adb (Output_References): Do no suppress a read reference at
9070 the same location as an immediately preceeding modify-reference, to
9071 handle properly in-out actuals.
9073 2011-08-01 Tristan Gingold <gingold@adacore.com>
9075 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9077 2011-08-01 Quentin Ochem <ochem@adacore.com>
9079 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9080 heap to compute the result.
9082 2011-08-01 Robert Dewar <dewar@adacore.com>
9084 * atree.ads: Minor reformatting.
9086 2011-08-01 Emmanuel Briot <briot@adacore.com>
9088 * g-expect.adb (Get_Command_Output): Fix memory leak.
9090 2011-08-01 Geert Bosch <bosch@adacore.com>
9092 * cstand.adb (P_Float_Type): New procedure to print the definition of
9093 predefined fpt types.
9094 (P_Mixed_Name): New procedure to print a name using mixed case
9095 (Print_Standard): Use P_Float_Type for printing floating point types
9096 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9097 precision IEEE float.
9099 2011-08-01 Thomas Quinot <quinot@adacore.com>
9101 * sem_ch3.adb: Minor reformatting.
9103 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9105 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9106 the completion of a generic function, insert the new body rather than
9107 rewriting the original.
9109 2011-08-01 Yannick Moy <moy@adacore.com>
9111 * sinfo.ads, errout.ads: Typos in comments.
9113 2011-08-01 Robert Dewar <dewar@adacore.com>
9115 * par-endh.adb: Minor reformatting.
9117 2011-08-01 Robert Dewar <dewar@adacore.com>
9119 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9120 (Pre_Post_Aspects): New subtype.
9121 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9122 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9123 * par-ch7.adb (P_Package): Remove Decl parameter
9124 (P_Package): Handle new syntax for aspects (before IS)
9125 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9127 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9128 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9129 (P_Package): Remove Decl parameter
9130 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9132 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9134 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9135 * sinfo.ads: Document new syntax for aspects in packages etc.
9136 * sprint.adb: Handle new syntax of aspects before IS in package
9138 2011-08-01 Thomas Quinot <quinot@adacore.com>
9140 * atree.ads: Minor reformatting.
9141 * sem_prag.adb: Minor reformatting.
9143 2011-08-01 Robert Dewar <dewar@adacore.com>
9145 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9146 case expr alternative.
9148 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9150 * sem_ch12.adb: Fix typo.
9152 2011-08-01 Geert Bosch <bosch@adacore.com>
9154 * sem_prag.adb (Check_No_Link_Name): New procedure.
9155 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9156 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9157 instead of Standard_Long_Long_Float_Size global. Preparation for
9158 eventual removal of per type constants.
9159 * exp_util.ads (Get_Stream_Size): New function returning the stream
9160 size value of subtype E.
9161 * exp_util.adb (Get_Stream_Size): Implement new function.
9162 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9164 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9166 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9168 2011-08-01 Geert Bosch <bosch@adacore.com>
9170 * cstand.adb: Fix comments.
9171 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9174 2011-08-01 Robert Dewar <dewar@adacore.com>
9176 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9178 2011-08-01 Geert Bosch <bosch@adacore.com>
9180 * atree.ads: Fix comment.
9182 2011-08-01 Robert Dewar <dewar@adacore.com>
9184 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9185 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9186 * par.adb: Add with for Namet.Sp.
9187 * par-tchk.adb: Minor reformatting.
9189 2011-08-01 Vincent Celier <celier@adacore.com>
9191 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9192 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9193 of the init procedure of a SAL.
9194 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9197 2011-08-01 Thomas Quinot <quinot@adacore.com>
9199 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9202 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9204 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9206 2011-08-01 Thomas Quinot <quinot@adacore.com>
9208 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9209 conformant with its spec (return True only for types that have
9210 an overriding Initialize primitive operation that prevents them from
9211 having preelaborable initialization).
9212 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9213 initialization for controlled types in Ada 2005 or later mode.
9215 2011-08-01 Robert Dewar <dewar@adacore.com>
9217 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9219 (Same_Aspect): New function.
9220 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9221 Type_Invariant, Precondition, Postcondition.
9222 * snames.ads-tmpl: Add Name_Type_Invariant.
9224 2011-08-01 Robert Dewar <dewar@adacore.com>
9226 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9228 (Freeze_All_Ent): Fix error in handling inherited aspects.
9229 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9230 already analyzed, but don't skip entire processing of a declaration,
9231 that's wrong in some cases of declarations being rewritten.
9232 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9233 Don't delay for integer, string literals
9234 Treat predicates in usual manner for delay, remove special case code,
9236 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9237 (Build_Predicate_Function): Update saved expression in aspect
9238 (Build_Invariant_Procedure): Update saved expression in aspect
9239 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9240 of replacement of discriminant references if the reference is simple.
9242 2011-08-01 Robert Dewar <dewar@adacore.com>
9244 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9245 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9246 Static_Predicate and Dynamic_Predicate.
9247 (Build_Predicate_Function): Add processing for Static_Predicate
9248 and Dynamic_Predicate.
9249 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9250 (From_Static_Predicate): New flag
9251 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9253 2011-08-01 Robert Dewar <dewar@adacore.com>
9255 * usage.adb: Documentation cleanup for Ada version modes in usage.
9256 * expander.adb: Minor reformatting.
9258 2011-08-01 Robert Dewar <dewar@adacore.com>
9260 * atree.ads: Minor comment fix.
9261 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9262 a-witeio.ads, sem_prag.adb: Minor reformatting.
9264 2011-08-01 Doug Rupp <rupp@adacore.com>
9266 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9267 pointers. Use descrip.h header file for convenience. Add some
9270 2011-08-01 Robert Dewar <dewar@adacore.com>
9272 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9273 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9274 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9276 (Check_Aspect_At_End_Of_Declarations): New procedure
9277 (Analye_Aspect_Specification): Minor changes for above procedures
9278 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9279 specification node as well.
9281 2011-08-01 Pascal Obry <obry@adacore.com>
9283 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9284 Windows files. Use GetFilesAttributes() in this case to check for file
9285 existence instead of returning with an error code.
9287 2011-08-01 Vincent Celier <celier@adacore.com>
9289 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9290 High is above Source length.
9292 2011-08-01 Robert Dewar <dewar@adacore.com>
9294 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9296 2011-08-01 Robert Dewar <dewar@adacore.com>
9298 * aspects.ads (Boolean_Aspects): New subtype.
9299 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9300 for derived types in cases where the parent type and derived type have
9302 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9303 with aspects when parent type also has aspects.
9304 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9305 boolean expression at this point).
9306 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9307 accordance with final decision on the Ada 2012 feature.
9308 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9310 2011-08-01 Matthew Heaney <heaney@adacore.com>
9312 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9314 2011-08-01 Pascal Obry <obry@adacore.com>
9316 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9317 Fix Replace_Slice when High is above current string size.
9318 (Replace_Slice): Fix DL computation when High is above current
9321 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9323 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9325 2011-08-01 Matthew Heaney <heaney@adacore.com>
9327 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9330 2011-08-01 Pascal Obry <obry@adacore.com>
9332 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9335 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9337 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9338 access to protected subprograms in generic bodies.
9339 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9340 protected type, indicate that the convention of the subprogram is
9341 Convention_Protected, because it may be used in subsequent declarations
9342 within the protected declaration.
9344 2011-08-01 Vincent Celier <celier@adacore.com>
9346 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9347 and "final" procedures when the name of the library is "ada", to avoid
9348 duplicate symbols "adainit" and "adafinal" in executables.
9350 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9352 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9353 quantified expression that appears within a postcondition and uses the
9354 Ada2012 'Result attribute.
9356 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9358 * init.c (__gnat_error_handler): Cast reason to int.
9359 (__gnat_install_handler): Explain sa_sigaction use.
9361 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9363 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9364 subprogram has copy-in copy-out parameters, try to promote the mode of
9365 the return type if it is passed in registers.
9367 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9369 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9370 left operand as addressable.
9372 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9374 * gcc-interface/gigi.h (build_function_stub): Remove.
9375 (build_return_expr): Likewise.
9376 (convert_vms_descriptor): Declare.
9377 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9378 (build_function_stub): Move to...
9379 * gcc-interface/utils2.c (build_return_expr): Move to...
9380 * gcc-interface/trans.c (build_function_stub): ...here.
9381 (build_return_expr): ...here.
9382 (Subprogram_Body_to_gnu): Add local variable for language_function.
9383 Disconnect the parameter attributes cache, if any, once done with it.
9384 Call end_subprog_body only after setting the end_locus.
9385 Build the stub associated with the function, if any, at the very end.
9386 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9387 variables and streamline control flow.
9389 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9392 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9395 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9398 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9399 Assign to act.sa_sigaction.
9400 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9401 current->return_address to char * before arithmetic.
9403 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9405 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9406 Correct argument types.
9407 Extract code from reason.
9408 (__gnat_install_handler): Assign to act.sa_sigaction.
9410 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9412 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9413 (GNAT1_OBJS): ...here.
9415 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9418 * g-socthi-mingw.adb (Fill): Fix formatting.
9420 * gcc-interface/gigi.h: Move around comment.
9422 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9425 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9427 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9430 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9432 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9434 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9435 range comparison if Pmode is SImode.
9437 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9438 Eric Botcazou <ebotcazou@adacore.com>
9440 * adadecode.c: Wrap up in extern "C" block.
9441 * adadecode.h: Likewise.
9442 * adaint.c: Likewise. Remove 'const' keyword.
9443 * adaint.h: Likewise.
9445 * atree.h: Likewise.
9447 * cstreams.c: Likewise.
9451 * final.c: Likewise.
9453 * initialize.c: Likewise.
9455 * namet.h: Likewise.
9456 * nlists.h: Likewise.
9457 * raise.c: Likewise.
9458 * raise.h: Likewise.
9459 * repinfo.h: Likewise.
9460 * seh_init.c: Likewise.
9461 * targext.c: Likewise.
9462 * tracebak.c: Likewise.
9463 * uintp.h: Likewise.
9464 * urealp.h: Likewise.
9465 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9466 * xsinfo.adb: Likewise.
9467 * xsnamest.adb: Likewise.
9468 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9469 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9470 * gcc-interface/misc.c: Likewise.
9471 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9472 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9473 ada/targext.o here...
9474 (GNAT_ADA_OBJS): ...and not here.
9475 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9476 (GNATBIND_OBJS): Reorder.
9478 2011-07-07 Richard Henderson <rth@redhat.com>
9480 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9481 dwarf2out_frame_init.
9483 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9485 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9487 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9490 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9492 2011-07-06 Richard Guenther <rguenther@suse.de>
9494 * gcc-interface/misc.c (gnat_init): Merge calls to
9495 build_common_tree_nodes and build_common_tree_nodes_2.
9496 Re-initialize boolean_false_node.
9498 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9499 Olivier Hainque <hainque@adacore.com>
9500 Nicolas Setton <setton@adacore.com>
9502 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9503 the type according to the ARTIFICIAL_P parameter.
9504 (create_type_decl): Likewise.
9505 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9507 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9509 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9510 (gnatbind): Likewise.
9512 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9514 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9516 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9518 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9519 local variable throughout. Remove useless call to Base_Type.
9520 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9521 Take it also into account for the volatileness of the field. Set the
9522 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9524 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9526 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9527 on a dereference built for a by-ref object if it has an address clause.
9529 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9531 * einfo.ads (Address_Taken): Document use for the second argument of
9532 Asm_Input and Asm_Output attributes.
9533 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9534 argument is an entity name, then set Address_Taken on it.
9535 <Attribute_Asm_Output>: Likewise.
9536 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9537 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9538 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9539 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9541 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9544 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9546 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9548 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9549 (ada/utils.o): Update dependencies.
9550 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9551 ../../../libcpp/libcpp.a.
9552 * gcc-interface/utils.c: Include common/common-target.h.
9553 (process_attributes): Use targetm_common.have_named_sections.
9555 2011-06-07 Richard Guenther <rguenther@suse.de>
9557 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9560 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9562 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9563 TREE_THIS_NOTRAP flag.
9565 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9567 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9570 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9572 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9573 constants whose full view has discriminants specially.
9575 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9577 * gcc-interface/utils.c: Include diagnostic.h.
9578 (gnat_write_global_declarations): Output debug information for all
9579 global type declarations before finalizing the compilation unit.
9580 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9582 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9584 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9586 2011-05-25 Kai Tietz <ktietz@redhat.com>
9588 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9589 initialization instead of const/none-const pointer assignment.
9591 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9593 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9594 $(EXTRA_GNAT1_OBJS).
9595 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9596 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9597 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9598 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9599 libcommon-target.a instead of prefix.o.
9601 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9604 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9606 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9608 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9609 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9610 instead of version.o.
9612 2011-05-18 Kai Tietz <ktietz@redhat.com>
9614 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9615 boolean_false_node instead of integer_zero_node.
9616 (convert_with_check): Likewise.
9617 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9619 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9621 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9622 type of the parameter is an unconstrained array, convert the actual to
9623 the type of the formal in the In Out and Out cases as well.
9625 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9627 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9628 call build_function_type_array or build_varargs_function_type_array
9630 (create_subprog_type): Don't call build_function_type; call
9631 build_function_type_vec instead.
9633 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9635 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9636 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9637 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9639 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9641 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9643 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9644 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9646 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9648 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9650 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9652 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9653 instead of accessing TYPE_ARG_TYPES directly.
9654 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9656 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9659 * gcc-interface/gigi.h (get_variant_part): Declare.
9660 * gcc-interface/decl.c (get_variant_part): Make global.
9661 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9662 types have the same constant size, are record types and T1 has a
9663 variant part while T2 doesn't.
9665 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9667 * gcc-interface/utils.c (begin_subprog_body): Do not call
9669 (end_subprog_body): Likewise.
9671 2011-05-04 Richard Guenther <rguenther@suse.de>
9673 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9675 (pos_to_constructor): Likewise.
9677 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9678 Eric Botcazou <ebotcazou@adacore.com>
9680 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9681 of build_function_type. Adjust calls to...
9682 (build_raise_check): ...this. Do not take a void_tree parameter.
9683 Call build_function_type_list instead of build_function_type.
9684 Fix head comment and swap couple of conditional blocks.
9686 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9688 * gnatvsn.ads (Library_Version): Bump to 4.7.
9689 (Current_Year): Bump to 2011.
9691 2011-04-29 Michael Matz <matz@suse.de>
9693 * gcc-interface/misc.c (gnat_handle_option): Set
9694 warn_maybe_uninitialized.
9696 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9698 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9699 the Watson/McCabe paper.
9701 2011-04-23 Jim Meyering <meyering@redhat.com>
9703 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9705 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9707 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9710 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9712 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9714 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9715 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9716 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9717 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9718 <all>: Do not set flags on the reused DECL node coming from an alias.
9719 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9720 don't need debug info here...
9721 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9722 (gigi): Adjust calls to create_subprog_decl.
9723 (build_raise_check): Likewise.
9724 (establish_gnat_vms_condition_handler): Likewise.
9725 (Compilation_Unit_to_gnu): Likewise.
9726 (gnat_to_gnu): Likewise.
9728 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9730 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9731 (NO_REORDER_ADAFLAGS): New variable.
9732 (EXTRA_GNATTOOLS): Always define.
9733 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9734 Clean up and adjust list of files compiled with special options.
9735 * gcc-interface/Make-lang.in: Likewise.
9736 (ada/decl.o): Cosmetical change.
9737 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9739 2011-04-20 Jim Meyering <meyering@redhat.com>
9741 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9743 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9745 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9746 $(CFLAGS) on the link line.
9748 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9750 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9751 padded type built for the return type if it is unconstrained.
9753 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9755 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9757 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9759 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9760 before calling TREE_CHAIN.
9761 * gcc-interface/misc.c (gnat_init_ts): New function.
9762 (LANG_HOOKS_INIT_TS): Define.
9764 2011-04-12 Martin Jambor <mjambor@suse.cz>
9766 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9767 instead of cgraph_node.
9769 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9771 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9772 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9775 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9777 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9778 of aggregate types that contain a placeholder.
9780 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9782 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9784 (handle_type_generic_attribute): Likewise.
9786 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9789 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9791 2011-04-04 Kai Tietz <ktietz@redhat.com>
9794 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9797 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9799 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9800 type case, do not strip a padding type around the array type.
9802 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9804 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9807 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9809 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9810 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9811 code for -feliminate-unused-debug-types.
9812 (gnat_post_options): Likewise.
9814 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9816 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9817 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9820 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9822 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9823 DECL_ARTIFICIAL flag on enumeration types.
9825 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9827 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9828 fat pointer types artificial unconditionally.
9829 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9832 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9834 * gcc-interface/gigi.h (get_dummy_type): Declare.
9835 (build_dummy_unc_pointer_types): Likewise.
9836 (finish_fat_pointer_type): Likewise.
9837 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9838 fat pointer type has been built, complete it in place.
9839 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9840 and thin pointers. Remove useless variable.
9841 (finish_fat_pointer_type): Make global and move to...
9842 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9843 (get_dummy_type): New function.
9844 (build_dummy_unc_pointer_types): Likewise.
9845 (gnat_pushdecl): Propage the name to the anonymous variants only.
9846 (update_pointer_to): Only adjust the pointer types in the unconstrained
9849 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9851 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9852 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9853 if this is a Taft amendment type and the full declaration is available.
9854 * gcc-interface/trans.c (process_type): Likewise.
9855 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9856 (process_freeze_entity): Likewise.
9857 * gcc-interface/utils.c (dummy_global): New static variable.
9858 (gnat_write_global_declarations): If there are types declared as used
9859 at the global level, insert them in the global hash table.
9861 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9863 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9864 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9865 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9867 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9868 flag of the type accordingly.
9869 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9871 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9873 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9874 finalizing types when updating the pointers to the designated type.
9875 <all>: Finalize the deferred types even if we didn't defer processing
9876 of incomplete types in this invocation.
9878 2011-04-01 Olivier Hainque <hainque@adacore.com>
9879 Nicolas Setton <setton@adacore.com>
9880 Eric Botcazou <ebotcazou@adacore.com>
9882 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9883 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9885 2011-03-28 Kai Tietz <ktietz@redhat.com>
9887 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9889 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9890 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9892 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9894 2011-03-28 Tristan Gingold <gingold@adacore.com>
9897 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9898 Use ada output of gnatbind.
9899 (ada/b_gnatb.adb): Ditto.
9900 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9901 (ada.mostlyclean, ada.stage1)
9902 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9903 (ada.stagefeedback): Adjust.
9904 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9905 Use ada output of gnatbind.
9906 (b_gnatm.adb): Ditto.
9907 (b_gnatl.o, b_gnatm.o): New rules.
9909 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9911 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9912 for the padded type built to support a specified size or alignment.
9914 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9916 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9917 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9918 unconditionally to the end of the unit when the designated type is
9920 <all>: Rename local variable. Attempt to un-defer types only and do it
9921 for limited_with'ed types as well.
9922 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9923 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9924 consistently and remove redundant call to finalize_from_with_types.
9926 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9928 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9929 subprograms without a previous spec declared in the same unit.
9930 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9931 subprograms at the end of the unit instead of at the beginning.
9932 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9933 isn't public for the special handling of non-inline functions nested
9934 inside inline external functions.
9936 2011-03-25 Jeff Law <law@redhat.com>
9938 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9940 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9942 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9943 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9944 to compute Set_Size_Depends_On_Discriminant.
9945 (Layout_Type): Call it on array types in back-end layout mode.
9946 * sem_util.adb (Requires_Transient_Scope): Return true for array
9947 types only if the size depends on the value of discriminants.
9948 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9949 type if the RHS is a call to a function that returns an unconstrained
9950 type with default discriminant.
9952 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9954 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9955 non-conversion to the nominal result type at the end.
9957 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9959 * gcc-interface/trans.c (create_temporary): New function taken from...
9960 (create_init_temporary): ...here. Call it.
9961 (call_to_gnu): Create the temporary for the return value early, if any.
9962 Create it for a function with copy-in/copy-out parameters if there is
9963 no target; in other cases of copy-in/copy-out, use another temporary.
9964 Push the new binding level lazily. Add and rename local variables.
9966 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9968 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9970 (set_rm_size): Likewise.
9972 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9974 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9975 for the padded type built in order to support a specified alignment.
9976 Fix incorrect formatting.
9978 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9981 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9983 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9985 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9986 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9987 to the end of the list. Adjust recursive call. Rename local variable.
9988 If REORDER is true, reorder components of the record type.
9989 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9990 components_to_record and adjust the parameter list.
9992 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9994 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9995 disabled, use the variable for bounds of loop iteration scheme.
9997 2011-03-21 Kai Tietz <ktietz@redhat.com>
10000 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10002 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10004 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10005 out whether the expression is read-only. Short-circuit placeholder
10006 case and rename a couple of local variables.
10008 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10010 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10011 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10012 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10013 (convert): Deal with conversions from a smaller form type specially.
10015 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10017 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10018 its argument, except for the special -I- switch.
10020 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10022 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10025 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10027 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10029 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10031 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10033 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10034 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10035 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10036 Do not generate the check directly, instead instantiate the template
10037 check present in the descriptor.
10038 (make_descriptor_field): Move around.
10039 (build_vms_descriptor32): Build a template check in the POINTER field.
10040 (build_vms_descriptor): Remove useless suffixes.
10041 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10043 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10046 * targext.c: Include target files if IN_RTS is defined.
10048 2011-01-26 Richard Guenther <rguenther@suse.de>
10051 * targext.c: Include config.h.
10052 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10055 2011-01-04 Pascal Obry <obry@adacore.com>
10056 Eric Botcazou <ebotcazou@adacore.com>
10058 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10060 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10062 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10063 end-of-case on the end label and its associated gotos, if any.
10065 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10067 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10068 expressions of the parameter cache within the statement group of
10069 the CICO mechanism.
10071 2011-01-04 Olivier Hainque <hainque@adacore.com>
10072 Eric Botcazou <ebotcazou@adacore.com>
10074 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10075 (set_end_locus_from_node): New function.
10076 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10077 make and the function end_locus.
10078 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10079 for the elaboration subprogram.
10080 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10081 set the end_locus of the expression as well.
10083 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10086 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10087 variables that are referenced in exception handlers volatile.
10091 Copyright (C) 2011 Free Software Foundation, Inc.
10093 Copying and distribution of this file, with or without modification,
10094 are permitted in any medium without royalty provided the copyright
10095 notice and this notice are preserved.
10097 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10098 - fix bugs in the description of Source_Trace;
10099 - get rid of UNIT_NAME;
10101 2011-08-02 Javier Miranda <miranda@adacore.com>
10104 (Build_Dispatching_Requeue): Adding support for VM targets
10105 since we cannot directly reference the Tag entity.
10106 * exp_sel.adb (Build_K): Adding support for VM targets.
10107 (Build_S_Assignment): Adding support for VM targets.
10109 (Default_Prim_Op_Position): In VM targets do not restrict availability
10110 of predefined interface primitives to compiling in Ada 2005 mode.
10111 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10112 restricted to compiling in Ada 2005 mode.
10113 (Make_VM_TSD): Generate code that declares and initializes the OSD
10114 record. Needed to support dispatching calls through synchronized
10117 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10118 primitives associated with synchronized interfaces.
10119 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10120 primitives associated with synchronized interfaces.
10122 2011-08-02 Yannick Moy <moy@adacore.com>
10124 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10125 statements hidden in SPARK if preceded by the HIDE directive
10126 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10127 exception handlers as hidden in SPARK if preceded by the HIDE directive
10128 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10129 if starting with the HIDE directive
10130 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10131 starting with the HIDE directive; mark the declarations in a private
10132 part as hidden in SPARK if the private part starts with the HIDE
10134 * restrict.adb, restrict.ads
10135 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10136 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10137 argument node belongs to a part which is hidden in SPARK
10138 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10139 parts in SPARK; protect the possibly costly call to
10140 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10141 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10142 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10143 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10145 (Scan): recognize special comment starting with '#' and followed by
10146 SPARK keyword "hide" as a HIDE directive.
10148 2011-08-02 Yannick Moy <moy@adacore.com>
10150 * types.ads, erroutc.ads: Minor reformatting.
10152 2011-08-02 Vincent Celier <celier@adacore.com>
10154 * link.c: Add response file support for cross platforms.
10156 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10158 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10159 in an association, set parent field of copy before partial analysis.
10160 * sem_res.adb (Resolve_Slice): create reference to itype only when
10161 expansion is enabled.
10163 2011-08-02 Yannick Moy <moy@adacore.com>
10165 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10166 for new flag denoting which subprogram bodies are in ALFA
10167 * restrict.adb, sem_ch7.adb: Update comment
10168 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10169 sem_ch9.adb, sem_res.adb: Add calls to
10170 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10171 * sem_ch6.adb (Analyze_Function_Return): add calls to
10172 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10173 middle of the body, and extended return.
10174 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10175 False when missing return.
10176 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10177 to True for subprograms whose spec is in ALFA. Remove later on the flag
10178 on the entity used for a subprogram body when there exists a separate
10180 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10181 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10182 False, otherwise do nothing.
10184 2011-08-02 Robert Dewar <dewar@adacore.com>
10186 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10188 2011-08-02 Yannick Moy <moy@adacore.com>
10190 * sem_ch4.ads: minor formatting.
10192 2011-08-02 Yannick Moy <moy@adacore.com>
10194 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10195 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10196 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10197 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10198 opt.ads: cleanup of SPARK mode
10200 2011-08-02 Yannick Moy <moy@adacore.com>
10202 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10204 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10205 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10207 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10208 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10209 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10210 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10212 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10214 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10215 functions whose return type is not in ALFA.
10216 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10218 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10219 parameter's type is not in ALFA.
10220 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10223 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10225 * sem_ch6 (Analyze_Expression_Function): treat the function as
10226 Inline_Always, and introduce a subprogram declaration for it when it is
10228 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10229 expression functions, so that the back-end can determine whether they
10230 can in fact be inlined.
10231 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10232 a function body comes from an expression function.
10234 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10236 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10237 null exclusions to test Can_Never_Be_Null on the anonymous access types
10238 of the formals rather than testing the formals themselves. Exclude this
10239 check in cases where the Old_Formal is marked as a controlling formal,
10240 to avoid issuing spurious errors for bodies completing dispatching
10241 operations (due to the flag not getting set on controlling access
10242 formals in body specs).
10243 (Find_Corresponding_Spec): When checking full and subtype conformance of
10244 subprogram bodies in instances, pass Designated and E in that order, for
10245 consistency with the expected order of the formals (New_Id followed by
10248 2011-08-02 Robert Dewar <dewar@adacore.com>
10250 * sem_ch8.adb: Minor reformatting.
10252 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10254 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10255 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10256 primitive operations of class-wide actuals.
10258 2011-08-02 Javier Miranda <miranda@adacore.com>
10260 * exp_atag.ads, exp_atag.adb
10261 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10262 since its value is implicitly passed in argument Typ.
10263 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10264 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10265 Build_Common_Dispatching_Select_Statements.
10267 2011-08-02 Robert Dewar <dewar@adacore.com>
10269 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10270 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10271 Minor reformatting.
10273 2011-08-02 Robert Dewar <dewar@adacore.com>
10275 * sem_res.adb: Minor reformatting.
10276 * sem_prag.adb: Minor reformatting.
10278 2011-08-02 Javier Miranda <miranda@adacore.com>
10280 * exp_atag.adb, exp_atags.ads
10281 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10282 by the tagged type Entity. Required to use this routine in the VM
10283 targets since we do not have available the Tag entity in the VM
10286 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10287 Ada.Tags has not been previously loaded.
10289 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10290 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10292 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10293 view of enclosing scopes. Required to handle enclosing scopes that
10294 are synchronized types whose full view is a task type.
10296 (Build_VM_TSDs): Minor code improvement to avoid generating and
10297 analyzing lists with empty nodes.
10298 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10299 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10300 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10301 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10302 (Make_Select_Specific_Data_Table): Add support for VM targets.
10303 (Make_VM_TSD): Generate code to initialize the SSD structure of
10306 2011-08-02 Yannick Moy <moy@adacore.com>
10308 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10309 cross-references section in ALI.
10310 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10311 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10313 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10314 subprogram or package entity of a node
10315 (Is_Local_Reference_Type): new function returns True for references
10316 selected in local cross-references.
10317 (Lt): function extracted from Lt in Output_References
10318 (Write_Entity_Name): function extracted from Output_References
10319 (Generate_Definition): generate reference with type 'D' for definition
10320 of objects (object declaration and parameter specification), with
10321 appropriate locations and units, for use in local cross-references.
10322 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10323 references of type 'I' for initialization in object definition.
10324 (Output_References): move part of function Lt and procedure
10325 Write_Entity_Name outside of the body. Ignore references of types 'D'
10326 and 'I' introduced for local cross-references.
10327 (Output_Local_References): new procedure to output the local
10328 cross-references sections.
10329 (Lref_Entity_Status): new array defining whether an entity is a local
10330 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10331 with 'I' type when initialization expression is present.
10332 * get_scos.adb, get_scos.ads: Correct comments and typos
10334 2011-08-02 Javier Miranda <miranda@adacore.com>
10336 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10338 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10340 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10343 2011-08-02 Vincent Celier <celier@adacore.com>
10345 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10346 (No_Space_Img): New function
10347 (Find_Excluded_Sources): When reading from a file, record the file name
10348 and the line number for each excluded source.
10349 (Mark_Excluded_Sources): When reporting an error, if the excluded
10350 sources were read from a file, include file name and line number in
10353 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10355 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10357 2011-08-02 Robert Dewar <dewar@adacore.com>
10359 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10361 2011-08-02 Javier Miranda <miranda@adacore.com>
10363 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10364 generation of TSDs to the DOTNET compiler.
10365 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10366 generation of TSDs to the DOTNET compiler.
10368 2011-08-02 Javier Miranda <miranda@adacore.com>
10370 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10371 record of all the tagged types declared inside library level package
10372 declarations, library level package bodies or library level subprograms.
10373 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10374 associated with a given tagged type.
10375 (Build_VM_TSDs): New subprogram.
10376 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10377 compilation units that are subprograms.
10378 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10379 compilation units that are package bodies.
10380 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10381 units that are a package declaration or a package instantiation.
10382 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10383 reorganization to improve the error generated by the frontend when the
10384 function Ada.Tags.Secondary_Tag is not available.
10385 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10386 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10388 2011-08-02 Javier Miranda <miranda@adacore.com>
10390 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10392 2011-08-02 Robert Dewar <dewar@adacore.com>
10394 * s-imenne.ads: Minor reformatting.
10396 2011-08-02 Robert Dewar <dewar@adacore.com>
10398 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10399 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10400 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10402 2011-08-02 Robert Dewar <dewar@adacore.com>
10404 * einfo.ads (Materialize_Entity): Document this is only for renamings
10405 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10406 required debug information in the case where we transform the object
10407 declaration into a renaming declaration.
10408 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10410 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10411 Materialize_Entity.
10413 2011-08-02 Robert Dewar <dewar@adacore.com>
10415 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10416 Suppress_Init_Procs.
10417 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10418 Suppress_Initialization/Initialization_Suppressed.
10419 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10420 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10421 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10422 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10424 2011-08-02 Robert Dewar <dewar@adacore.com>
10426 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10427 Minor reformatting.
10429 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10431 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10432 only have inheritable classwide pre/postconditions.
10434 2011-08-02 Javier Miranda <miranda@adacore.com>
10436 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10437 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10438 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10439 checks if the external tag of a type is the same as the external tag
10440 of some other declaration.
10442 2011-08-02 Thomas Quinot <quinot@adacore.com>
10444 * s-taskin.ads: Minor reformatting.
10446 2011-08-02 Emmanuel Briot <briot@adacore.com>
10448 * g-comlin.adb (Display_Help): swap the order in which it prints the
10449 short help and the general usage.
10451 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10453 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10454 the aspect declarations and attach them to the generic copy for
10455 subsequent analysis.
10456 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10457 declarations of the generic tree to the new subprogram declarations.
10458 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10459 conditions that apply to a subprogram instance.
10461 2011-08-02 Robert Dewar <dewar@adacore.com>
10463 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10465 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10467 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10468 private type with a tagged full view is not derived in the immediate
10469 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10471 2011-08-02 Robert Dewar <dewar@adacore.com>
10473 * exp_ch4.adb: Minor reformatting.
10475 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10477 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10478 Ada2012 iterator, the loop will be rewritten during expansion into a
10479 while loop with a cursor and an element declaration. Do not analyze the
10480 body in this case, because if the container is for indefinite types the
10481 actual subtype of the elements will only be determined when the cursor
10482 declaration is analyzed.
10484 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10486 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10487 size/alignment related attributes in CodePeer_Mode.
10489 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10491 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10492 Prepend_Element, since this can result in the operation getting the
10493 wrong slot in the full type's dispatch table if the full type has
10494 inherited operations. The incomplete type's operation will get added
10495 to the proper position in the full type's primitives
10496 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10497 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10498 dispatching operations, since there are cases where nonprimitive
10499 subprograms can get added to the list of incomplete dependents (such
10500 as subprograms in nested packages).
10501 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10502 private part when determining whether to add a primitive with a
10503 parameter of a tagged incomplete type to the Private_Dependents list.
10504 Such primitives can also occur in the visible part, and should not have
10505 been excluded from being private dependents.
10506 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10507 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10508 list of a Taft-amendment incomplete type is a primitive before issuing
10509 an error that the full type must appear in the same unit. There are
10510 cases where nonprimitives can be in the list (such as subprograms in
10512 * sem_disp.adb (Derives_From): Use correct condition for checking that
10513 a formal's type is derived from the type of the corresponding formal in
10514 the parent subprogram (the condition was completely wrong). Add
10515 checking that was missing for controlling result types being derived
10516 from the result type of the parent operation.
10518 2011-08-02 Yannick Moy <moy@adacore.com>
10520 * errout.adb (First_Node): minor renaming
10521 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10524 2011-08-02 Yannick Moy <moy@adacore.com>
10526 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10527 before accessing operands.
10528 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10529 decide whether an initialization expression respects SPARK rules, as
10530 the plain node is the expanded one. This allows for more valid warnings
10532 * gnat_rm.texi: Minor update.
10534 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10536 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10539 2011-08-02 Robert Dewar <dewar@adacore.com>
10541 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10543 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10545 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10546 loop statements and the element renaming declaration with a block when
10547 the element type is controlled.
10549 2011-08-02 Yannick Moy <moy@adacore.com>
10551 * sinfo.ads: Minor formatting.
10553 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10555 * sem_aggr.adb (Add_Association): if the association has a box and no
10556 expression, use the Sloc of the aggregate itself for the new
10558 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10561 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10563 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10564 When a container is provided via a function call, generate a renaming
10565 of the function result. This avoids the creation of a transient scope
10566 and the premature finalization of the container.
10567 * exp_ch7.adb (Is_Container_Cursor): Removed.
10568 (Wrap_Transient_Declaration): Remove the supression of the finalization
10569 of the list controller when the declaration denotes a container cursor,
10572 2011-08-02 Yannick Moy <moy@adacore.com>
10574 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10575 node is from source, instead of the original node being from source.
10577 (Resolve_Array_Aggregate): refine the check for a static expression, to
10578 recognize also static ranges
10579 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10580 Array_Type_Declaration): postpone the test for the type being a subtype
10581 mark after the type has been resolved, so that component-selection and
10582 expanded-name are discriminated.
10583 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10584 to distinguish the case of an iteration scheme, so that an error is
10585 issed on a non-static range in SPARK except in an iteration scheme.
10586 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10587 In_Iter_Schm = True.
10588 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10589 user-defined operators so that they are allowed in renaming
10591 (Find_Selected_Component): refine the check for prefixing of operators
10592 so that they are allowed in renaming. Move the checks for restrictions
10593 on selector name after analysis discriminated between
10594 component-selection and expanded-name.
10595 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10596 concatenation argument of string type if it is static.
10597 * sem_util.adb, sem_util.ads
10598 (Check_Later_Vs_Basic_Declarations): add a new function
10599 Is_Later_Declarative_Item to decice which declarations are allowed as
10600 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10601 mode, add that renamings are considered as later items.
10602 (Enclosing_Package): new function to return the enclosing package
10603 (Enter_Name): correct the rule for homonyms in SPARK
10604 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10605 from source (result of expansion) to avoid issuing wrong warnings.
10607 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10609 * errout.adb: On anything but an expression First_Node returns its
10612 2011-08-02 Pascal Obry <obry@adacore.com>
10614 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10616 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10618 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10619 Set the associated loop as the related expression of internally
10621 * exp_ch7.adb (Is_Container_Cursor): New routine.
10622 (Wrap_Transient_Declaration): Supress the finalization of the list
10623 controller when the declaration denotes a container cursor.
10625 2011-08-02 Yannick Moy <moy@adacore.com>
10627 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10629 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10630 expression is a simple expression. This check cannot be performed in
10631 the semantics, so just drop it.
10632 (P_Index_Or_Discriminant_Constraint): move check that the index or
10633 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10634 semantics. Other cases were previously checked in the semantics.
10635 * par-ch4.adb (P_Name): move checks that a selector name is not
10636 character literal or an operator symbol to Find_Selected_Component in
10638 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10639 declarations are not placed after later declarations in a separate
10640 procedure in Sem_Util (possibly not the best choice?), to be used both
10641 during parsing, for Ada 83 mode, and during semantic analysis, for
10643 * par-endh.adb (Check_End): move check that end label is not missing
10644 to Process_End_Label in the semantics
10645 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10646 the special case for SPARK restriction
10647 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10648 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10649 parameter Force to issue the error message even on internal node (used
10650 for generated end label). Call Check_Restriction to check when an error
10651 must be issued. In SPARK mode, issue an error message even if the
10652 restriction is not set.
10653 (Check_Restriction): new procedure with an additional out parameter to
10654 inform the caller that a message has been issued
10655 * sem_aggr.adb: Minor modification of message
10656 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10657 instead of issuing an error message directly
10658 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10659 declarations are not placed after later declarations, by calling
10660 Check_Later_Vs_Basic_Declarations
10661 (Analyze_Subtype_Declaration): move here the check that an index or
10662 discriminant constraint must be a subtype mark. Change the check that
10663 a subtype of String must start at one so that it works on subtype marks.
10664 * sem_ch4.adb (Analyze_Call): move here the check that a named
10665 association cannot follow a positional one in a call
10666 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10667 instead of issuing an error message directly
10668 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10669 selector name is not a character literal or an operator symbol. Move
10670 here the check that the prefix of an expanded name cannot be a
10671 subprogram or a loop statement.
10672 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10673 procedure called from parsing and semantics to check that basic
10674 declarations are not placed after later declarations
10675 (Process_End_Label): move here the check that end label is not missing
10677 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10679 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10680 representation clause in codepeer mode, since it confuses CodePeer and
10681 does not bring useful info.
10683 2011-08-02 Ed Falis <falis@adacore.com>
10685 * init.c: initialize fp hw on MILS.
10687 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10689 * errout.adb (First_Node): for bodies, return the node itself (small
10690 optimization). For other nodes, do not check source_unit if the node
10691 comes from Standard.
10693 2011-08-02 Robert Dewar <dewar@adacore.com>
10695 * exp_ch3.adb: Minor comment additions.
10696 * sem_ch13.adb: Minor reformatting.
10698 2011-08-02 Pascal Obry <obry@adacore.com>
10700 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10702 2011-08-02 Robert Dewar <dewar@adacore.com>
10704 * sem_attr.adb: Minor reformatting.
10706 2011-08-02 Robert Dewar <dewar@adacore.com>
10708 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10709 (Has_Default_Component_Value): Removed
10710 * einfo.ads Comment updates
10711 (Has_Default_Aspect): Replaces Has_Default_Value
10712 (Has_Default_Component_Value): Removed
10714 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10716 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10717 (Get_Simple_Init_Val): Handle Default_Value aspect
10718 (Needs_Simple_Initialization): Handle Default_Value aspect
10719 * exp_ch3.ads: Needs_Simple_Initialization
10720 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10721 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10723 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10724 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10725 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10727 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10729 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10730 package containing iteration primitives.
10731 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10733 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10735 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10736 "of", pre-analyze expression in case it is a function call with
10737 finalization actions that must be placed ahead of the loop.
10738 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10739 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10741 2011-08-02 Geert Bosch <bosch@adacore.com>
10743 * cstand.adb (Create_Float_Types): Only consider C's long double for
10744 Long_Long_Float, in addition to double.
10746 2011-08-02 Robert Dewar <dewar@adacore.com>
10748 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10749 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10750 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10751 Minor reformatting.
10753 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10755 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10758 2011-08-02 Javier Miranda <miranda@adacore.com>
10760 * einfo.ads, einfo.adb
10761 (Original_Access_Type): Move this attribute to Node26 since there was
10762 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10763 which causes conflicts and breaks the generation of the .NET compiler.
10764 (Interface_Name): Add missing documentation on JGNAT only uses of
10767 2011-08-02 Geert Bosch <bosch@adacore.com>
10769 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10770 (Find_Back_End_Float_Type): Likewise
10771 (Create_Back_End_Float_Types): Likewise
10772 (Create_Float_Types): Likewise
10773 (Register_Float_Type): Likewise
10774 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10775 Nlist and split out type selection in new local Find_Base_Type function.
10776 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10778 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10780 2011-08-02 Robert Dewar <dewar@adacore.com>
10782 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10784 * opt.ads: Minor comment change.
10785 * sem_ch12.adb: Minor code reorganization.
10787 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10789 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10790 subtype's list of rep items to the list on the full subtype in the case
10791 where the lists are the same.
10793 2011-08-02 Geert Bosch <bosch@adacore.com>
10795 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10796 using the one from System.Strings, which also deallocates all strings.
10798 2011-08-02 Geert Bosch <bosch@adacore.com>
10800 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10802 * gcc-interface/Make-lang.in: Update dependencies.
10804 2011-08-02 Olivier Hainque <hainque@adacore.com>
10806 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10809 2011-08-02 Javier Miranda <miranda@adacore.com>
10811 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10812 associated with anonymous access to subprograms.
10814 2011-08-02 Geert Bosch <bosch@adacore.com>
10817 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10818 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10819 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10820 (Add_Symbol_Definition): Move to switch-c.adb
10821 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10822 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10823 (Add_Symbol_Definition): Move to switch-c.adb.
10824 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10826 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10827 Move to warnsw.adb.
10828 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10829 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10830 Move to warnsw.adb.
10831 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10832 (Add_Symbol_Definition): Moved from Prepcomp.
10833 * switch-c.ads: Update copyright notice. Use String_List instead of
10834 Argument_List, removing dependency on System.OS_Lib.
10836 2011-08-02 Yannick Moy <moy@adacore.com>
10838 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10839 mode on initialization expression which does not respect SPARK
10841 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10842 if the tree referenced by its argument represents an initialization
10843 expression in SPARK, suitable for initializing an object in an object
10846 2011-08-02 Javier Miranda <miranda@adacore.com>
10848 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10849 internally generated access to subprogram with its associated protected
10851 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10853 2011-08-02 Geert Bosch <bosch@adacore.com>
10855 * cstand.adb (Register_Float_Type): Print information about type to
10856 register, if the Debug_Flag_Dot_B is set.
10857 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10858 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10859 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10860 with a requested precision of more than Max_Digits digits and no more
10861 than Max_Base_Digits digits, if a range specification is present and the
10862 Predefined_Float_Types list has a suitable type to derive from.
10863 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10864 case of type completion with pragma Import
10866 (Process_Import_Predefined_Type): Processing to complete a type
10867 with pragma Import. Currently supports floating point types only.
10868 (Set_Convention_From_Pragma): Do nothing without underlying type.
10869 (Process_Convention): Guard against absence of underlying type,
10870 which may happen when importing incomplete types.
10871 (Process_Import_Or_Interface): Handle case of importing predefined
10872 types. Tweak error message.
10874 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10876 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10877 functions to previous change. Reorganize code slightly.
10879 2011-08-02 Geert Bosch <bosch@adacore.com>
10881 * back_end.ads (Register_Type_Proc): New call back procedure type for
10882 allowing the back end to provide information about available types.
10883 (Register_Back_End_Types): New procedure to register back end types.
10884 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10886 * cstand.adb (Back_End_Float_Types): New list for floating point types
10887 supported by the back end.
10888 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10889 (Copy_Float_Type): New procedure to make new copies of predefined types.
10890 (Register_Float_Type): New call back procedure to populate the BEFT list
10891 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10892 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10893 (Create_Float_Types): New procedure to create entities for floating
10894 point types predefined in Standard, and put these and any remaining
10895 BEFTs on the Predefined_Float_Types list.
10896 * stand.ads (Predefined_Float_Types): New list for predefined floating
10897 point types that do not have declarations in package Standard.
10899 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10901 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10902 entity node for the unit containing the parameter.
10903 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10904 (Add_Inlined_Subprogram): Likewise.
10905 * gcc-interface/Make-lang.in: Update dependencies.
10907 2011-08-02 Thomas Quinot <quinot@adacore.com>
10909 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10912 2011-08-02 Geert Bosch <bosch@adacore.com>
10914 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10916 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10918 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10919 computed value of Base_Type.
10921 2011-08-02 Yannick Moy <moy@adacore.com>
10923 * restrict.adb (Check_Restriction): issue an error for any use of
10924 class-wide, even if the No_Dispatch restriction is not set.
10925 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10926 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10927 when completing a private extension, the type named in the private part
10928 is not the same as that named in the visible part.
10929 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10930 of an inherited primitive operations of a tagged type or type extension
10931 that returns the tagged type.
10932 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10933 function which returns True for an implicit operation inherited by the
10934 derived type declaration for the argument type.
10935 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10940 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10941 Process_Bounds, to perform analysis with expansion of a range or an
10942 expression that is the iteration scheme for a loop.
10943 (Analyze_Iterator_Specification): If domain of iteration is given by a
10944 function call with a controlled result, as is the case if call returns
10945 a predefined container, ensure that finalization actions are properly
10947 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10949 2011-08-02 Javier Miranda <miranda@adacore.com>
10951 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10952 * gcc-interface/Make-lang.in: Update dependencies.
10954 2011-08-02 Javier Miranda <miranda@adacore.com>
10956 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10957 determine if the analysis is performed using N or Original_Node (N).
10958 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10959 functionality of routine Is_Variable avoids code duplication.
10960 * checks.adb (Determine_Range): Handle temporaries generated by
10961 Remove_Side_Effects.
10963 2011-08-02 Javier Miranda <miranda@adacore.com>
10965 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10966 expansion of the condition. Required since the previous analysis was
10967 done with expansion disabled (see Resolve_Quantified_Expression) and
10968 hence checks were not inserted and record comparisons have not been
10971 2011-08-02 Ed Falis <falis@adacore.com>
10973 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10976 2011-08-02 Bob Duff <duff@adacore.com>
10978 * opt.ads: Minor comment fix.
10980 2011-08-02 Bob Duff <duff@adacore.com>
10982 * sem_ch12.adb (Analyze_Package_Instantiation,
10983 Analyze_Subprogram_Instantiation): Turn off style checking while
10984 analyzing an instance. Whatever style checks that apply to the generic
10985 unit should apply, so it makes no sense to apply them in an instance.
10986 This was causing trouble when compiling an instance of a runtime
10987 unit that violates the -gnatyO switch.
10988 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10989 one of the two case statements, causing spurious errors.
10991 2011-08-02 Robert Dewar <dewar@adacore.com>
10993 * uname.adb: Minor reformatting.
10994 * gnatcmd.adb: Minor reformatting.
10995 * exp_attr.adb: Minor reformatting.
10997 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10999 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11000 No_Dispatching_Calls, do not look for the Assign primitive, because
11001 predefined primitives are not created in this case.
11003 2011-08-02 Bob Duff <duff@adacore.com>
11005 * stylesw.ads: Minor comment fixes.
11007 2011-08-02 Robert Dewar <dewar@adacore.com>
11009 * freeze.adb (Add_To_Result): New procedure.
11011 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11013 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11014 time, if the specific run-time routines for handling streams of strings
11015 are not available, use the default mechanism.
11017 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11019 * s-regpat.ads: Fix typo.
11021 2011-08-02 Vincent Celier <celier@adacore.com>
11023 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11024 not null, call it to create the in memory config project file without
11025 parsing an existing default config project file.
11027 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11029 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11033 * sem_elim.adb: an abstract subprogram does not need an eliminate
11034 pragma for its descendant to be eliminable.
11036 2011-08-02 Ed Falis <falis@adacore.com>
11038 * init.c: revert to handling before previous checkin for VxWorks
11039 * s-intman-vxworks.adb: delete unnecessary declarations related to
11040 using Ada interrupt facilities for handling signals.
11041 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11042 * s-intman-vxworks.ads: Import __gnat_install_handler as
11043 Initialize_Interrupts.
11044 * s-taprop-vxworks.adb: Delete Signal_Mask.
11045 (Abort_Handler): change construction of mask to unblock exception
11048 2011-08-02 Jerome Guitton <guitton@adacore.com>
11050 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11051 Debug_Raise_Exception before propagation starts.
11053 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11055 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11056 to Restriction_Check_Required.
11057 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11058 * sem_res.adb (Resolve_Call): Likewise.
11059 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11061 2011-08-02 Bob Duff <duff@adacore.com>
11063 * stylesw.ads: Update comment.
11064 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11065 * errout.ads: Remove obsolete comment.
11067 2011-08-02 Javier Miranda <miranda@adacore.com>
11069 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11070 (Set_Is_Safe_To_Reevaluate): new procedure.
11071 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11072 assignment is allowed on safe-to-reevaluate variables.
11073 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11074 temporary created to remove side effects in expressions that use
11075 the secondary stack as safe-to-reevaluate.
11076 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11077 variables that are not true constants.
11079 2011-08-02 Robert Dewar <dewar@adacore.com>
11081 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11082 sem_res.adb, sem_ch6.adb: Minor reformatting.
11084 2011-08-02 Jerome Guitton <guitton@adacore.com>
11086 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11088 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11090 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11091 not set Overridden_Operation if subprogram is an initialization
11094 2011-08-02 Yannick Moy <moy@adacore.com>
11096 * par-ch6.adb: Correct obsolete name in comments
11097 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11098 which takes two message arguments (existing function takes one), with
11099 second message used for continuation.
11100 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11101 block statements that originate from a source block statement, not
11102 generated block statements
11103 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11104 symmetry with procedure case
11105 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11106 function to issue an error in formal mode if a package specification
11107 contains more than one tagged type or type extension.
11108 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11109 parameters matching formals of tagged types are objects (or ancestor
11110 type conversions of objects), not general expressions. Issue an error
11111 on view conversions that are not involving ancestor conversion of an
11113 (Resolve_Type_Conversion): in formal mode, issue an error on the
11114 operand of an ancestor type conversion which is not an object
11115 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11116 procedure so that it works also for actuals of function calls
11117 (Is_Actual_Tagged_Parameter): new function which determines if its
11118 argument is an actual parameter of a formal of tagged type in a
11120 (Is_SPARK_Object_Reference): new function which determines if the tree
11121 referenced by its argument represents an object in SPARK
11123 2011-08-02 Robert Dewar <dewar@adacore.com>
11125 * sem_ch3.adb: Minor reformatting
11126 Minor comment addition
11127 Minor error msg text change
11129 2011-08-02 Javier Miranda <miranda@adacore.com>
11131 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11132 function. Used to be more precise when we generate a variable plus one
11133 assignment to remove side effects in the evaluation of the Bound
11135 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11136 of the bound expression to force its re-analysis and thus expand the
11137 associated transient scope (if required). Code cleanup replacing the
11138 previous code that declared the constant entity by an invocation to
11139 routine Force_Evaluation which centralizes this work in the frontend.
11141 2011-08-02 Robert Dewar <dewar@adacore.com>
11143 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11144 (Base_Type): Now uses improved Is_Base_Type function
11145 * einfo.ads (Base_Type): Inline this function
11147 2011-08-02 Robert Dewar <dewar@adacore.com>
11149 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11150 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11152 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11154 * gcc-interface/Make-lang.in: Update dependencies.
11155 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11158 2011-08-02 Yannick Moy <moy@adacore.com>
11160 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11161 non-simple expression used in delta constraint
11162 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11163 index constraint which is not a subtype mark
11164 * par.adb: With and use Restrict
11165 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11166 mode on component type which is not a subtype mark and default
11167 expression on component
11168 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11169 of string which does not have a lower index bound equal to 1
11170 (Array_Type_Declaration): issue an error in formal mode on index or
11171 component type which is not a subtype mark, and on aliased keyword on
11173 (Derived_Type_Declaration): issue an error in formal mode on interface,
11174 limited or abstract type
11175 (Record_Type_Declaration): issue an error in formal mode on interface
11176 (Record_Type_Definition): issue an error in formal mode on tagged types
11177 and type extensions not declared in the specification of a library unit
11178 package; on null non-tagged record; on variant part
11180 2011-08-02 Vincent Celier <celier@adacore.com>
11182 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11183 not declared for qualified library project when Library_Name is not
11184 declared, but Library_Dir is.
11186 2011-08-02 Robert Dewar <dewar@adacore.com>
11188 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11189 pragmas (affects aspects [Component_]Default_Value
11190 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11191 component type for the resolution
11193 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11195 * einfo.adb (Base_Type): Tune implementation for speed.
11197 2011-08-02 Robert Dewar <dewar@adacore.com>
11199 * freeze.adb: Minor reformatting.
11201 2011-08-02 Thomas Quinot <quinot@adacore.com>
11203 * scos.ads: Update comments.
11205 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11207 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11208 base type, because the parent may be a subtype of a private type whose
11209 convention is established in a private part.
11211 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11213 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11214 statement in a block when the expansion of the return expression has
11215 created a finalization chain.
11216 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11217 with the parent node.
11218 Add N_Extended_Return_Statement to handle the case where a transient
11219 object declaration appears in the Return_Object_Declarations list of
11220 an extended return statement.
11222 2011-08-02 Matthew Gingell <gingell@adacore.com>
11224 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11225 unused parameter 'name'.
11227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11229 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11230 inherited operation, check whether its alias, which is the source
11231 operastion that it renames, has been marked eliminated.
11233 2011-08-02 Javier Miranda <miranda@adacore.com>
11235 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11236 in-mode parameter whose type is an access type since it can be used to
11237 modify its designated object. Enforce code that handles as safe an
11238 access type that is not access-to-constant but it is the result of a
11239 previous removal of side-effects.
11240 (Remove_Side_Effects): Minor code reorganization of cases which require
11241 no action. Done to incorporate documentation on new cases uncovered
11242 working in this ticket: no action needed if this routine was invoked
11243 too early and the nodes are not yet decorated.
11244 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11245 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11246 were issued with actuals that are implicitly provided by
11249 2011-08-02 Robert Dewar <dewar@adacore.com>
11251 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11253 2011-08-02 Yannick Moy <moy@adacore.com>
11255 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11256 to issue an error in formal mode on attribute not supported in this mode
11257 (Analyze_Attribute): issue errors on standard attributes not supported
11259 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11260 comment, and issue error in formal mode on modulus which is not a power
11262 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11264 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11266 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11267 operator on modular type (except 'not').
11269 2011-08-02 Robert Dewar <dewar@adacore.com>
11271 * gnat_rm.texi: Minor reformatting.
11273 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11275 * s-osinte-linux.ads: Minor comment update and reformatting.
11276 * i-cexten.ads: Make this unit pure, as for its parent.
11277 Will allow its usage in more contexts if needed.
11279 2011-08-02 Robert Dewar <dewar@adacore.com>
11281 * s-utf_32.ads: Minor comment fix.
11283 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11285 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11286 operation of a tagged synchronized type, handle the case where the
11287 controlling argument is overloaded.
11289 2011-08-02 Yannick Moy <moy@adacore.com>
11291 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11292 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11293 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11294 SPARK mode and formal verification mode on processing SPARK restriction
11295 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11296 requiring consistency checking.
11298 2011-08-02 Robert Dewar <dewar@adacore.com>
11300 * sem_res.adb: Minor reformatting.
11302 2011-08-02 Robert Dewar <dewar@adacore.com>
11304 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11305 a-cforse.ads: Remove unneeded with of Ada.Containers
11306 Remove commented out pragma Inline's
11307 Move specifications of new subprograms to the actual specs
11309 2011-08-02 Yannick Moy <moy@adacore.com>
11311 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11312 a-cforse.ads: Update comments.
11314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11316 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11318 2011-08-02 Robert Dewar <dewar@adacore.com>
11320 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11321 a-cforse.ads, a-cofove.ads: Minor reformatting.
11323 2011-08-02 Claire Dross <dross@adacore.com>
11325 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11326 a-cofove.ads: Add comments.
11328 2011-08-02 Yannick Moy <moy@adacore.com>
11330 * gnat_rm.texi: Document formal containers.
11332 2011-08-02 Emmanuel Briot <briot@adacore.com>
11334 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11335 are empty sections.
11337 2011-08-02 Robert Dewar <dewar@adacore.com>
11339 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11342 2011-08-02 Robert Dewar <dewar@adacore.com>
11344 * aspects.adb: New aspects Default_Value and Default_Component_Value
11345 New format of Aspect_Names table checks for omitted entries
11346 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11347 handling of boolean aspects for derived types.
11348 New aspects Default_Value and Default_Component_Value
11349 New format of Aspect_Names table checks for omitted entries
11350 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11351 (Has_Default_Value): New flag
11352 (Has_Default_Component_Value): New flag
11353 (Has_Default_Value): New flag
11354 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11356 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11357 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11358 Default_Value and Default_Component_Value
11359 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11360 New aspects Default_Value and Default_Component_Value
11361 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11362 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11364 2011-08-02 Vincent Celier <celier@adacore.com>
11366 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11367 inherit library kind.
11369 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11371 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11372 Minor reformatting.
11374 2011-08-02 Robert Dewar <dewar@adacore.com>
11376 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11378 2011-08-02 Yannick Moy <moy@adacore.com>
11380 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11382 2011-08-02 Robert Dewar <dewar@adacore.com>
11384 * impunit.adb: Add comment.
11386 2011-08-02 Yannick Moy <moy@adacore.com>
11388 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11389 qualification of aggregates in formal mode
11390 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11392 (Resolve_Aggregate): complete the test that an aggregate is adequately
11393 qualified in formal mode
11395 2011-08-02 Pascal Obry <obry@adacore.com>
11397 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11398 * mlib-prj.adb: Supress warning when compiling binder generated file.
11399 (Build_Library): Supress all warnings when compiling the binder
11402 2011-08-02 Yannick Moy <moy@adacore.com>
11404 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11406 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11407 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11408 Add with/use clauses to make Check_Formal_Restriction visible
11410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11412 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11413 in-parameters when type of the generic formal is private in the generic
11414 spec and non-private in the body.
11416 2011-08-02 Claire Dross <dross@adacore.com>
11418 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11419 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11420 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11421 * impunit.adb, Makefile.rtl: Take new files into account.
11423 2011-08-02 Robert Dewar <dewar@adacore.com>
11425 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11426 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11428 2011-08-02 Yannick Moy <moy@adacore.com>
11430 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11432 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11433 matching static array bounds, taking into account the special case of
11435 * sem_ch3.adb: Typo in comment.
11437 2011-08-02 Yannick Moy <moy@adacore.com>
11439 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11440 which issues an error in formal mode if its argument node is originally
11442 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11443 has a discriminant specification so that it does not include the case
11445 (Derived_Type_Declaration): move here the test that a derived type has a
11446 discriminant specification
11447 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11448 first element of a component association before accessing its choices
11449 (presence of component association is not enough)
11450 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11451 declaration is a library item before accessing the next element in a
11452 list, as library items are not member of lists
11453 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11454 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11455 Check_Formal_Restriction whenever possible.
11457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11459 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11460 reference when needed.
11462 2011-08-02 Bob Duff <duff@adacore.com>
11464 * gnat_ugn.texi: Fix typo.
11466 2011-08-02 Vincent Celier <celier@adacore.com>
11468 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11469 archive file name. Do not use the full path name of archives for Open
11472 2011-08-02 Robert Dewar <dewar@adacore.com>
11474 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11475 Analyze_Aspect_Specifications
11477 (Analyze_Aspect_Specifications): New handling for boolean aspects
11478 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11479 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11480 sequence for Analyze_Aspect_Specifications
11481 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11482 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11484 2011-08-02 Robert Dewar <dewar@adacore.com>
11486 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11487 aspects, since these no longer exist.
11489 2011-08-02 Robert Dewar <dewar@adacore.com>
11491 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11492 semicolon, do not try to see if there are aspects following it.
11493 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11496 2011-08-02 Robert Dewar <dewar@adacore.com>
11498 * sem_ch8.adb, aspects.ads: Minor reformatting.
11500 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11502 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11503 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11505 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11507 2011-08-02 Yannick Moy <moy@adacore.com>
11509 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11510 mode on subprogram declaration outside of package specification, unless
11511 it is followed by a pragma Import
11512 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11513 Access_Type_Declaration): issue error in formal mode on access type
11514 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11516 (Analyze_Object_Declaration): issue error in formal mode on object
11517 declaration which does not respect SPARK restrictions
11518 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11519 declaration which does not respect SPARK restrictions
11520 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11521 error in formal mode on digits or delta constraint
11522 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11523 decimal fixed point type
11524 (Derived_Type_Declaration): issue error in formal mode on derived type
11525 other than type extensions of tagged record types
11526 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11527 with check on access definition
11528 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11529 mode on protected definition.
11530 (Analyze_Task_Definition): issue error in formal mode on task definition
11532 2011-08-02 Robert Dewar <dewar@adacore.com>
11534 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11536 2011-08-02 Javier Miranda <miranda@adacore.com>
11538 * sem_ch6.adb (Can_Override_Operator): New function.
11539 (Verify_Overriding_Indicator): Add missing code to check overriding
11540 indicator in operators. Fixes regression.
11541 (Check_Overriding_Indicator): Minor reformating after replacing the
11542 code that evaluates if the subprogram can override an operator by
11543 invocations to the above new function.
11545 (Write_Field26_Name): Add missing code to ensure that, following
11546 the documentation in einfo.ads, this field is not shown as attribute
11547 "Static_Initialization" on non-dispatching functions.
11549 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11551 * sem_res.adb (Resolve_Call): A call to
11552 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11553 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11554 i.e., when the second parameter is of type Time_Span.
11556 2011-08-02 Vincent Celier <celier@adacore.com>
11558 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11559 with an archive instead of -L<library dir> -l<library name>.
11561 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11563 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11564 mark the base types In_Use in addition to making the operations
11567 2011-08-02 Ed Falis <falis@adacore.com>
11569 * init.c: add and setup __gnat_signal_mask for the exception signals
11570 * s-inmaop-vxworks.adb: new file.
11571 * s-intman-vxworks.adb: remove unnecessary initializations and
11573 * s-intman-vxworks.ads: remove unnecessary variable
11574 * s-taprop-vxworks.adb: simplify signal initialization
11576 2011-08-02 Robert Dewar <dewar@adacore.com>
11578 * sem_ch8.adb: Minor code reorganization, comment updates.
11580 2011-08-02 Robert Dewar <dewar@adacore.com>
11582 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11583 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11585 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11586 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11588 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11590 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11591 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11592 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11593 use_type_clauses, to handle more efficiently use_type and use_all_type
11595 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11596 Ada2012 Use_All_Type clause.
11597 (Use_Class_Wide_Operations): new procedure.
11599 2011-08-02 Robert Dewar <dewar@adacore.com>
11601 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11602 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11603 expression to expression function.
11605 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11607 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11608 if types are compatible.
11610 2011-08-02 Yannick Moy <moy@adacore.com>
11612 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11613 returns True if its argument array types have same dimension and same
11614 static bounds at each index.
11615 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11616 OUT or IN OUT paramaters which are not view conversions in SPARK.
11617 (Resolve_Arithmetic_Op): issue an error in formal mode on
11618 multiplication or division with operands of fixed point types which are
11619 not qualified or explicitly converted.
11620 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11621 Boolean or array type (except String) operands.
11622 (Resolve_Equality_Op): issue an error in formal mode on equality
11623 operators for array types other than String with non-matching static
11625 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11626 for array types with non-matching static bounds. Factorize the code in
11627 Matching_Static_Array_Bounds.
11628 (Resolve_Qualified_Expression): issue an error in formal mode on
11629 qualified expressions for array types with non-matching static bounds.
11630 (Resolve_Type_Conversion): issue an error in formal mode on type
11631 conversion for array types with non-matching static bounds
11633 2011-08-02 Robert Dewar <dewar@adacore.com>
11635 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11637 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11639 * par-ch9.adb: save location of entry for proper error message.
11641 2011-08-02 Javier Miranda <miranda@adacore.com>
11643 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11644 (Use_Full_View) which permits this routine to climb through the
11645 ancestors using the full-view of private parents.
11646 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11647 Use_Full_View to true in calls to Is_Ancestor.
11648 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11649 true in call to Is_Ancestor.
11650 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11651 Use_Full_View to true in call to Is_Ancestor.
11652 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11653 call to Is_Ancestor.
11654 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11655 Use_Full_View to true in calls to Is_Ancestor.
11656 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11657 Make_Select_Specific_Data_Table, Register_Primitive,
11658 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11659 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11660 to true in call to Is_Ancestor.
11661 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11662 Use_Full_View to true in calls to Is_Ancestor.
11664 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11665 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11667 2011-08-02 Robert Dewar <dewar@adacore.com>
11669 * gnat_rm.texi: Minor reformatting.
11670 * sem_prag.adb: Minor reformatting.
11672 2011-08-02 Tristan Gingold <gingold@adacore.com>
11674 * vms_data.ads: Add VMS qualifier for -gnateP.
11676 2011-08-02 Robert Dewar <dewar@adacore.com>
11678 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11679 * par-ch7.adb (P_Package): Proper placement of aspects for package
11680 decl/instantiation.
11681 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11682 (End_Statements): Add Is_Sloc parameterr
11683 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11684 (Check_End): Ad Is_Sloc parameter
11685 (End_Statements): Add Is_Sloc parameterr
11687 2011-08-02 Vincent Celier <celier@adacore.com>
11689 * ug_words: Add VMS qualifier equivalent to -gnateP:
11690 /SYMBOL_PREPROCESSING.
11692 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11694 * gnat-style.texi: For hexadecimal numeric literals the typical
11695 grouping of digits is 4 to represent 2 bytes.
11696 A procedure spec which is split into several lines is indented two
11699 2011-08-02 Yannick Moy <moy@adacore.com>
11701 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11702 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11703 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11705 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11706 choice in array aggregate
11707 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11709 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11710 positional and named aggregate for record, or others in record
11711 aggregate, or multiple choice in record aggregate
11712 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11713 array operands to logical operations AND, OR and XOR do not have the
11714 same static lower and higher bounds
11715 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11717 2011-08-01 Robert Dewar <dewar@adacore.com>
11719 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11720 Replaces Last_Source_Node_In_Sequence.
11721 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11722 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11723 parens and blank in string (this was inconsistently implemented).
11725 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11726 blank in string (this was inconsistently implemented).
11728 (Set_Global_Switches): Set formal mode switches appropriately
11729 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11731 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11732 call Set_Error_Msg_Lang to set "spark" as language name.
11733 * par.adb: Remove unnecessary call to set formal language for errout
11734 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11735 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11737 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11738 calls to it, moved after resolution so that types are known
11739 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11740 result of concatenation is not of type String
11741 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11742 concatenation is not properly restricted
11743 * gnat_rm.texi: Add doc on pragma Spark_95.
11744 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11745 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11746 * gcc-interface/Make-lang.in: Update dependencies.
11748 2011-08-01 Javier Miranda <miranda@adacore.com>
11750 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11751 condition that detects if the overridden operation must replace an
11754 2011-08-01 Javier Miranda <miranda@adacore.com>
11756 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11757 code declarations inserted by Insert_Actions in each alternative of the
11758 N_Case_Expression node.
11760 2011-08-01 Robert Dewar <dewar@adacore.com>
11762 * sem_ch6.adb: Minor code reorganization.
11763 * sem_util.adb: Minor reformatting.
11765 2011-08-01 Pascal Obry <obry@adacore.com>
11767 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11768 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11770 2011-08-01 Yannick Moy <moy@adacore.com>
11772 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11773 literal or operator symbol which is prefixed
11774 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11775 mode on access attributes.
11776 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11777 that concatenation operands are properly restricted in formal mode
11778 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11779 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11780 result of the concatenation has a type different from String.
11781 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11782 Analyze_Quantified_Expression, Analyze_Slice,
11783 Analyze_Null): issue an error in formal mode on unsupported constructs
11785 (Analyze_Block_Statement): only issue error on source block statement
11786 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11787 function which returns the last node in a list of nodes for which
11788 Comes_From_Source returns True, if any
11789 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11790 Last_Source_Node_In_Sequence
11791 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11792 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11793 mode on unsupported constructs
11794 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11795 rest of the actions may be needed later on since the error is marked as
11797 * sinfo.ads: Typos in comments.
11799 2011-08-01 Pascal Obry <obry@adacore.com>
11801 * projects.texi: Minor editing.
11803 2011-08-01 Yannick Moy <moy@adacore.com>
11805 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11806 insertion character ~~
11807 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11808 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11809 with insertion character ~~
11810 (Set_Msg_Text): treat insertion character ~~
11811 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11812 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11813 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11814 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11815 errors related to the formal language restriction not serious
11816 (insertion character |).
11817 * par.adb (Par): set formal language for error messages if needed
11818 * sem_ch6.adb (Check_Missing_Return): take into account possible
11819 generated statements at the end of the function
11820 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11821 enumeration value to define a new pragma SPARK_95
11822 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11823 SPARK_Version): new type and variables to store the SPARK version
11825 (SPARK_Mode): return True when SPARK_Version is set
11826 * par-prag.adb: Correct indentation
11827 (Prag): take Pragma_SPARK_95 into account
11828 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11831 2011-08-01 Robert Dewar <dewar@adacore.com>
11833 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11834 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11835 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11837 2011-08-01 Pascal Obry <obry@adacore.com>
11839 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11840 Target_Name to Get_Path call.
11841 (Parse_Single_Project): Likewise.
11842 (Post_Parse_Context_Clause): Likewise.
11843 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11844 Call Initialise_Project_Path with the proper Target_Name.
11845 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11847 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11848 with the proper Target_Name.
11849 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11850 Part.Parse routine.
11851 (Parse_Project_And_Apply_Config): Likewise.
11852 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11853 This is fine as this part of the code is supporting only native
11855 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11856 is fine as this part of the code is supporting only native compilation.
11858 2011-08-01 Yannick Moy <moy@adacore.com>
11860 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11861 of homonym, unless the homonym is one of the cases allowed in SPARK
11862 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11863 package declaration occurring after a body.
11865 2011-08-01 Robert Dewar <dewar@adacore.com>
11867 * checks.adb, exp_ch4.adb: Minor reformatting.
11869 2011-08-01 Javier Miranda <miranda@adacore.com>
11871 * einfo.ads (Access_Disp_Table): Fix documentation.
11872 (Dispatch_Table_Wrappers): Fix documentation.
11874 2011-08-01 Pascal Obry <obry@adacore.com>
11876 * prj-env.adb, prj-env.ads: Minor reformatting.
11878 2011-08-01 Yannick Moy <moy@adacore.com>
11880 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11881 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11882 procedures out of these packages.
11883 * errout.ads, errout.adb
11884 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11885 procedures in of this package
11886 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11887 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11888 on misplaced later vs initial declarations, like in Ada 83
11889 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11890 formal mode on attribute of private type whose full type declaration
11892 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11893 package declaration inside a package specification
11894 (Analyze_Full_Type_Declaration): issue error in formal mode on
11895 controlled type or discriminant type
11896 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11897 user-defined operator means that it should come from the source
11898 (New_Overloaded_Entity): issue error in formal mode on overloaded
11900 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11902 2011-08-01 Thomas Quinot <quinot@adacore.com>
11904 * atree.adb: Minor reformatting.
11905 * checks.adb: Minor reformatting.
11907 2011-08-01 Vincent Celier <celier@adacore.com>
11909 * s-parame-vms-ia64.ads: Fix typo in comment
11911 * s-parame-vms-restrict.ads: Removed, unused.
11913 2011-08-01 Javier Miranda <miranda@adacore.com>
11916 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11918 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11919 * sem_ch3.ads, sem_ch3.adb
11920 (Is_Constant_Bound): New extended version of the subprogram that was
11921 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11922 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11923 * sem_aux.ads (Constant_Value): Fix typo in comment.
11924 * checks.adb (Generate_Index_Checks): New implementation which, for
11925 array objects with constant bounds, generates the runtime check
11926 referencing the bounds of the array type. For other cases this routine
11927 provides its previous behavior obtaining such values from the array
11929 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11931 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11932 we cannot have semantic interpretations of the new node.
11934 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11936 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11939 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11941 * sem_ch8.adb: Minor code editing.
11942 * s-vxwext.adb: Remove trailing space.
11943 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11944 consistency with other files.
11946 2011-08-01 Thomas Quinot <quinot@adacore.com>
11948 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11950 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11952 * par-ch10.adb: reject parameterized expressions as compilation unit.
11953 * sem_ch4.adb: handle properly conditional expression with overloaded
11954 then_clause and no else_clause.
11956 2011-08-01 Tristan Gingold <gingold@adacore.com>
11958 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11959 like done by System.Aux_DEC.
11960 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11962 2011-08-01 Yannick Moy <moy@adacore.com>
11964 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11965 missing label at end of declaration (subprogram or package)
11966 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11967 of positional and named parameter association
11968 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11969 Error_Msg_SP which adds a prefix to the error message giving the name
11970 of the formal language analyzed
11971 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11972 access result type in subprogram, unconstrained array as result type,.
11973 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11975 * sem_ch8.adb: Code clean up.
11977 2011-08-01 Javier Miranda <miranda@adacore.com>
11979 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11980 * einfo.ads (Access_Disp_Table): Fix documentation.
11981 (Dispatch_Table_Wrappers): Fix documentation.
11982 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11983 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11984 to enforce the documentation of this attribute.
11985 (Set_Is_Interface): Cleanup the assertion.
11986 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11987 the Underlying_Type entity before reading attribute Access_Disp_Table.
11988 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11989 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11990 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11991 the Underlying_Type entity before reading attribute Access_Disp_Table.
11992 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11993 Locate the Underlying_Type entity before reading attribute
11996 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11998 * s-poosiz.ads: Additional overriding indicators.
12000 2011-08-01 Yannick Moy <moy@adacore.com>
12002 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12004 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12005 parameter specification does not include a subtype mark.
12006 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12007 formal mode on abstract subprogram.
12008 (Analyze_Subprogram_Specification): issue error in formal mode on
12009 user-defined operator.
12010 (Process_Formals): issue error in formal mode on access parameter and
12011 default expression.
12012 * sem_ch9.adb (Analyze_Abort_Statement,
12013 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12014 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12015 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12016 Analyze_Requeue, Analyze_Selective_Accept,
12017 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12018 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12019 issue error in formal mode on user-defined raise statement.
12021 2011-08-01 Thomas Quinot <quinot@adacore.com>
12023 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12024 declaration being hidden when overriding an implicit inherited
12026 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12027 (-gnats), do not complain about a source file that contains only a
12030 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12032 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12033 variable if already set.
12035 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12037 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12038 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12039 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12040 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12041 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12042 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12043 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12044 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12045 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12046 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12047 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12048 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12049 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12050 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12051 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12052 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12053 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12054 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12055 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12056 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12057 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12058 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12059 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12060 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12061 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12062 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12063 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12064 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12065 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12066 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12067 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12068 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12069 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12070 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12071 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12072 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12073 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12074 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12075 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12076 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12077 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12078 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12079 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12080 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12081 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12082 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12083 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12084 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12085 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12086 Use GNAT instead of GNARL.
12088 2011-08-01 Bob Duff <duff@adacore.com>
12090 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12091 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12092 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12095 2011-08-01 Yannick Moy <moy@adacore.com>
12097 * debug.adb (d.D) reverve flag for the SPARK mode
12098 (d.E) reverve flag for SPARK generation mode
12099 (d.F) reverve flag for Why generation mode
12100 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12101 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12102 functions which return True when the corresponding modes are set
12103 (Formal_Language): return "spark" or "alfa" when in formal verification
12105 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12106 Error_Msg to prefix the error message with a tag giving the formal
12108 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12109 message with a tag giving the formal language
12110 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12112 (Analyze_Case_Statement): issue error in formal mode on case statement
12113 with a single "others" case alternative
12114 (Analyze_Exit_Statement): issue errors in formal mode on exit
12115 statements which do not respect SPARK restrictions
12116 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12117 (Check_Unreachable_Code): always issue an error (not a warning) in
12118 formal mode on unreachable code (concerns both code after an infinite
12119 loop and after an unconditional jump, both not allowed in SPARK)
12120 * sem_ch6.adb (Analyze_Return_Statement): add call to
12121 Set_Return_Present for a procedure containing a return statement
12122 (already done for functions in Analyze_Function_Return)
12123 (Analyze_Function_Return): issue error in formal mode on extended
12124 return or if return is not last statement in function
12125 (Check_Missing_Return): issue error in formal mode if function does
12126 not end with return or if procedure contains a return
12127 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12128 function to detect if there is an inner scope of its parameter S which
12131 2011-08-01 Thomas Quinot <quinot@adacore.com>
12133 * sem_ch6.ads: Minor reformatting.
12135 2011-08-01 Javier Miranda <miranda@adacore.com>
12137 * sem_util.adb (Abstract_Interface_List): Complete condition when
12138 processing private type declarations to avoid reading unavailable
12140 (Is_Synchronized_Tagged_Type): Complete condition when processing
12141 private extension declaration nodes to avoid reading unavailable
12144 2011-08-01 Thomas Quinot <quinot@adacore.com>
12146 * sem_ch3.adb: Minor reformatting.
12148 2011-08-01 Thomas Quinot <quinot@adacore.com>
12150 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12151 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12152 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12153 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12154 for VMS, instead parametrize the common implementation with
12155 System.Parameters declarations.
12157 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12159 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12161 2011-08-01 Tristan Gingold <gingold@adacore.com>
12163 * seh_init.c: Fix SEH handler installation on win64.
12165 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12167 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12168 double analysis of an anonymous access to subprogram, because it can
12169 lead to improper sharing of profiles and a back-end crash.
12171 2011-08-01 Robert Dewar <dewar@adacore.com>
12173 * make.adb, sem_ch4.adb: Minor reformatting.
12174 * gcc-interface/Make-lang.in: Update dependencies.
12175 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12177 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12179 * gnat_rm.texi: Fix definition of Long_Integer.
12181 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12183 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12184 to prevent storage exhaustion.
12185 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12186 finalized is a function body, insert the cleanup code before the final
12187 return statement, to prevent spurious warnings.
12188 * s-pooglo.ads: add overriding indicator.
12190 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12192 * sem_ch4.adb (Operator_Check): improve error message when both a
12193 with_clause and a use_clause are needed to make operator usage legal.
12194 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12195 determine whether a compilation unit is visible within an other,
12196 either through a with_clause in the current unit, or a with_clause in
12197 its library unit or one one of its parents.
12199 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12201 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12202 over an arbitrary expression of an array or container type.
12203 * lib-xref.adb: clarify comment.
12205 2011-08-01 Bob Duff <duff@adacore.com>
12207 * einfo.ads: Minor reformatting.
12208 * debug.adb: Minor comment improvement.
12210 2011-08-01 Javier Miranda <miranda@adacore.com>
12212 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12213 consider hidden subprograms as valid candidates.
12215 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12217 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12219 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12221 * gnat_ugn.texi: Fix typo.
12223 2011-08-01 Robert Dewar <dewar@adacore.com>
12225 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12226 lib-xref.adb: Minor reformatting
12228 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12230 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12231 when to generate a call to Move_Final_List.
12232 (Has_Controlled_Parts): Remove this function.
12234 2011-08-01 Geert Bosch <bosch@adacore.com>
12236 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12237 "," in choice list.
12239 2011-08-01 Thomas Quinot <quinot@adacore.com>
12241 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12242 explicit raise of a predefined exception as Comes_From_Source if the
12243 original N_Raise_Statement comes from source.
12245 2011-08-01 Robert Dewar <dewar@adacore.com>
12247 * sinfo.ads: Add comment.
12248 * sem_ch6.adb: Minor reformatting.
12250 2011-08-01 Robert Dewar <dewar@adacore.com>
12252 * freeze.adb (Freeze_Entity): Refine check for bad component size
12253 clause to avoid rejecting confirming clause when atomic/aliased present.
12255 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12257 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12258 better determine whether an entity reference is a write.
12259 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12261 * lib-xref.adb (Output_References): Do no suppress a read reference at
12262 the same location as an immediately preceeding modify-reference, to
12263 handle properly in-out actuals.
12265 2011-08-01 Tristan Gingold <gingold@adacore.com>
12267 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12269 2011-08-01 Quentin Ochem <ochem@adacore.com>
12271 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12272 heap to compute the result.
12274 2011-08-01 Robert Dewar <dewar@adacore.com>
12276 * atree.ads: Minor reformatting.
12278 2011-08-01 Emmanuel Briot <briot@adacore.com>
12280 * g-expect.adb (Get_Command_Output): Fix memory leak.
12282 2011-08-01 Geert Bosch <bosch@adacore.com>
12284 * cstand.adb (P_Float_Type): New procedure to print the definition of
12285 predefined fpt types.
12286 (P_Mixed_Name): New procedure to print a name using mixed case
12287 (Print_Standard): Use P_Float_Type for printing floating point types
12288 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12289 precision IEEE float.
12291 2011-08-01 Thomas Quinot <quinot@adacore.com>
12293 * sem_ch3.adb: Minor reformatting.
12295 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12297 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12298 the completion of a generic function, insert the new body rather than
12299 rewriting the original.
12301 2011-08-01 Yannick Moy <moy@adacore.com>
12303 * sinfo.ads, errout.ads: Typos in comments.
12305 2011-08-01 Robert Dewar <dewar@adacore.com>
12307 * par-endh.adb: Minor reformatting.
12309 2011-08-01 Robert Dewar <dewar@adacore.com>
12311 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12312 (Pre_Post_Aspects): New subtype.
12313 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12314 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12315 * par-ch7.adb (P_Package): Remove Decl parameter
12316 (P_Package): Handle new syntax for aspects (before IS)
12317 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12319 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12320 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12321 (P_Package): Remove Decl parameter
12322 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12324 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12326 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12327 * sinfo.ads: Document new syntax for aspects in packages etc.
12328 * sprint.adb: Handle new syntax of aspects before IS in package
12330 2011-08-01 Thomas Quinot <quinot@adacore.com>
12332 * atree.ads: Minor reformatting.
12333 * sem_prag.adb: Minor reformatting.
12335 2011-08-01 Robert Dewar <dewar@adacore.com>
12337 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12338 case expr alternative.
12340 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12342 * sem_ch12.adb: Fix typo.
12344 2011-08-01 Geert Bosch <bosch@adacore.com>
12346 * sem_prag.adb (Check_No_Link_Name): New procedure.
12347 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12348 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12349 instead of Standard_Long_Long_Float_Size global. Preparation for
12350 eventual removal of per type constants.
12351 * exp_util.ads (Get_Stream_Size): New function returning the stream
12352 size value of subtype E.
12353 * exp_util.adb (Get_Stream_Size): Implement new function.
12354 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12356 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12358 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12360 2011-08-01 Geert Bosch <bosch@adacore.com>
12362 * cstand.adb: Fix comments.
12363 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12364 count of arguments.
12366 2011-08-01 Robert Dewar <dewar@adacore.com>
12368 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12370 2011-08-01 Geert Bosch <bosch@adacore.com>
12372 * atree.ads: Fix comment.
12374 2011-08-01 Robert Dewar <dewar@adacore.com>
12376 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12377 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12378 * par.adb: Add with for Namet.Sp.
12379 * par-tchk.adb: Minor reformatting.
12381 2011-08-01 Vincent Celier <celier@adacore.com>
12383 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12384 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12385 of the init procedure of a SAL.
12386 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12389 2011-08-01 Thomas Quinot <quinot@adacore.com>
12391 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12394 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12396 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12398 2011-08-01 Thomas Quinot <quinot@adacore.com>
12400 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12401 conformant with its spec (return True only for types that have
12402 an overriding Initialize primitive operation that prevents them from
12403 having preelaborable initialization).
12404 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12405 initialization for controlled types in Ada 2005 or later mode.
12407 2011-08-01 Robert Dewar <dewar@adacore.com>
12409 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12411 (Same_Aspect): New function.
12412 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12413 Type_Invariant, Precondition, Postcondition.
12414 * snames.ads-tmpl: Add Name_Type_Invariant.
12416 2011-08-01 Robert Dewar <dewar@adacore.com>
12418 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12420 (Freeze_All_Ent): Fix error in handling inherited aspects.
12421 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12422 already analyzed, but don't skip entire processing of a declaration,
12423 that's wrong in some cases of declarations being rewritten.
12424 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12425 Don't delay for integer, string literals
12426 Treat predicates in usual manner for delay, remove special case code,
12428 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12429 (Build_Predicate_Function): Update saved expression in aspect
12430 (Build_Invariant_Procedure): Update saved expression in aspect
12431 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12432 of replacement of discriminant references if the reference is simple.
12434 2011-08-01 Robert Dewar <dewar@adacore.com>
12436 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12437 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12438 Static_Predicate and Dynamic_Predicate.
12439 (Build_Predicate_Function): Add processing for Static_Predicate
12440 and Dynamic_Predicate.
12441 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12442 (From_Static_Predicate): New flag
12443 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12445 2011-08-01 Robert Dewar <dewar@adacore.com>
12447 * usage.adb: Documentation cleanup for Ada version modes in usage.
12448 * expander.adb: Minor reformatting.
12450 2011-08-01 Robert Dewar <dewar@adacore.com>
12452 * atree.ads: Minor comment fix.
12453 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12454 a-witeio.ads, sem_prag.adb: Minor reformatting.
12456 2011-08-01 Doug Rupp <rupp@adacore.com>
12458 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12459 pointers. Use descrip.h header file for convenience. Add some
12462 2011-08-01 Robert Dewar <dewar@adacore.com>
12464 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12465 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12466 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12468 (Check_Aspect_At_End_Of_Declarations): New procedure
12469 (Analye_Aspect_Specification): Minor changes for above procedures
12470 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12471 specification node as well.
12473 2011-08-01 Pascal Obry <obry@adacore.com>
12475 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12476 Windows files. Use GetFilesAttributes() in this case to check for file
12477 existence instead of returning with an error code.
12479 2011-08-01 Vincent Celier <celier@adacore.com>
12481 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12482 High is above Source length.
12484 2011-08-01 Robert Dewar <dewar@adacore.com>
12486 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12488 2011-08-01 Robert Dewar <dewar@adacore.com>
12490 * aspects.ads (Boolean_Aspects): New subtype.
12491 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12492 for derived types in cases where the parent type and derived type have
12494 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12495 with aspects when parent type also has aspects.
12496 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12497 boolean expression at this point).
12498 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12499 accordance with final decision on the Ada 2012 feature.
12500 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12502 2011-08-01 Matthew Heaney <heaney@adacore.com>
12504 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12506 2011-08-01 Pascal Obry <obry@adacore.com>
12508 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12509 Fix Replace_Slice when High is above current string size.
12510 (Replace_Slice): Fix DL computation when High is above current
12513 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12515 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12517 2011-08-01 Matthew Heaney <heaney@adacore.com>
12519 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12522 2011-08-01 Pascal Obry <obry@adacore.com>
12524 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12527 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12529 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12530 access to protected subprograms in generic bodies.
12531 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12532 protected type, indicate that the convention of the subprogram is
12533 Convention_Protected, because it may be used in subsequent declarations
12534 within the protected declaration.
12536 2011-08-01 Vincent Celier <celier@adacore.com>
12538 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12539 and "final" procedures when the name of the library is "ada", to avoid
12540 duplicate symbols "adainit" and "adafinal" in executables.
12542 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12544 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12545 quantified expression that appears within a postcondition and uses the
12546 Ada2012 'Result attribute.
12548 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12550 * init.c (__gnat_error_handler): Cast reason to int.
12551 (__gnat_install_handler): Explain sa_sigaction use.
12553 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12555 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12556 subprogram has copy-in copy-out parameters, try to promote the mode of
12557 the return type if it is passed in registers.
12559 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12561 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12562 left operand as addressable.
12564 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12566 * gcc-interface/gigi.h (build_function_stub): Remove.
12567 (build_return_expr): Likewise.
12568 (convert_vms_descriptor): Declare.
12569 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12570 (build_function_stub): Move to...
12571 * gcc-interface/utils2.c (build_return_expr): Move to...
12572 * gcc-interface/trans.c (build_function_stub): ...here.
12573 (build_return_expr): ...here.
12574 (Subprogram_Body_to_gnu): Add local variable for language_function.
12575 Disconnect the parameter attributes cache, if any, once done with it.
12576 Call end_subprog_body only after setting the end_locus.
12577 Build the stub associated with the function, if any, at the very end.
12578 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12579 variables and streamline control flow.
12581 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12584 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12585 g-trasym-dwarf.adb.
12587 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12590 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12591 Assign to act.sa_sigaction.
12592 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12593 current->return_address to char * before arithmetic.
12595 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12597 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12598 Correct argument types.
12599 Extract code from reason.
12600 (__gnat_install_handler): Assign to act.sa_sigaction.
12602 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12604 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12605 (GNAT1_OBJS): ...here.
12607 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12610 * g-socthi-mingw.adb (Fill): Fix formatting.
12612 * gcc-interface/gigi.h: Move around comment.
12614 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12617 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12619 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12622 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12624 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12626 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12627 range comparison if Pmode is SImode.
12629 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12630 Eric Botcazou <ebotcazou@adacore.com>
12632 * adadecode.c: Wrap up in extern "C" block.
12633 * adadecode.h: Likewise.
12634 * adaint.c: Likewise. Remove 'const' keyword.
12635 * adaint.h: Likewise.
12636 * argv.c: Likewise.
12637 * atree.h: Likewise.
12639 * cstreams.c: Likewise.
12641 * exit.c: Likewise.
12643 * final.c: Likewise.
12644 * init.c: Likewise.
12645 * initialize.c: Likewise.
12646 * link.c: Likewise.
12647 * namet.h: Likewise.
12648 * nlists.h: Likewise.
12649 * raise.c: Likewise.
12650 * raise.h: Likewise.
12651 * repinfo.h: Likewise.
12652 * seh_init.c: Likewise.
12653 * targext.c: Likewise.
12654 * tracebak.c: Likewise.
12655 * uintp.h: Likewise.
12656 * urealp.h: Likewise.
12657 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12658 * xsinfo.adb: Likewise.
12659 * xsnamest.adb: Likewise.
12660 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12661 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12662 * gcc-interface/misc.c: Likewise.
12663 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12664 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12665 ada/targext.o here...
12666 (GNAT_ADA_OBJS): ...and not here.
12667 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12668 (GNATBIND_OBJS): Reorder.
12670 2011-07-07 Richard Henderson <rth@redhat.com>
12672 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12673 dwarf2out_frame_init.
12675 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12677 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12679 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12682 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12684 2011-07-06 Richard Guenther <rguenther@suse.de>
12686 * gcc-interface/misc.c (gnat_init): Merge calls to
12687 build_common_tree_nodes and build_common_tree_nodes_2.
12688 Re-initialize boolean_false_node.
12690 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12691 Olivier Hainque <hainque@adacore.com>
12692 Nicolas Setton <setton@adacore.com>
12694 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12695 the type according to the ARTIFICIAL_P parameter.
12696 (create_type_decl): Likewise.
12697 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12699 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12701 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12702 (gnatbind): Likewise.
12704 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12706 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12708 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12710 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12711 local variable throughout. Remove useless call to Base_Type.
12712 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12713 Take it also into account for the volatileness of the field. Set the
12714 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12716 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12718 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12719 on a dereference built for a by-ref object if it has an address clause.
12721 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12723 * einfo.ads (Address_Taken): Document use for the second argument of
12724 Asm_Input and Asm_Output attributes.
12725 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12726 argument is an entity name, then set Address_Taken on it.
12727 <Attribute_Asm_Output>: Likewise.
12728 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12729 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12730 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12731 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12733 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12735 PR middle-end/46500
12736 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12738 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12740 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12741 (ada/utils.o): Update dependencies.
12742 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12743 ../../../libcpp/libcpp.a.
12744 * gcc-interface/utils.c: Include common/common-target.h.
12745 (process_attributes): Use targetm_common.have_named_sections.
12747 2011-06-07 Richard Guenther <rguenther@suse.de>
12749 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12752 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12754 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12755 TREE_THIS_NOTRAP flag.
12757 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12759 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12762 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12764 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12765 constants whose full view has discriminants specially.
12767 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12769 * gcc-interface/utils.c: Include diagnostic.h.
12770 (gnat_write_global_declarations): Output debug information for all
12771 global type declarations before finalizing the compilation unit.
12772 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12774 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12776 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12778 2011-05-25 Kai Tietz <ktietz@redhat.com>
12780 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12781 initialization instead of const/none-const pointer assignment.
12783 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12785 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12786 $(EXTRA_GNAT1_OBJS).
12787 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12788 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12789 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12790 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12791 libcommon-target.a instead of prefix.o.
12793 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12796 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12798 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12800 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12801 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12802 instead of version.o.
12804 2011-05-18 Kai Tietz <ktietz@redhat.com>
12806 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12807 boolean_false_node instead of integer_zero_node.
12808 (convert_with_check): Likewise.
12809 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12811 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12813 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12814 type of the parameter is an unconstrained array, convert the actual to
12815 the type of the formal in the In Out and Out cases as well.
12817 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12819 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12820 call build_function_type_array or build_varargs_function_type_array
12822 (create_subprog_type): Don't call build_function_type; call
12823 build_function_type_vec instead.
12825 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12827 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12828 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12829 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12831 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12833 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12835 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12836 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12838 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12840 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12842 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12844 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12845 instead of accessing TYPE_ARG_TYPES directly.
12846 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12848 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12851 * gcc-interface/gigi.h (get_variant_part): Declare.
12852 * gcc-interface/decl.c (get_variant_part): Make global.
12853 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12854 types have the same constant size, are record types and T1 has a
12855 variant part while T2 doesn't.
12857 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12859 * gcc-interface/utils.c (begin_subprog_body): Do not call
12861 (end_subprog_body): Likewise.
12863 2011-05-04 Richard Guenther <rguenther@suse.de>
12865 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12867 (pos_to_constructor): Likewise.
12869 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12870 Eric Botcazou <ebotcazou@adacore.com>
12872 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12873 of build_function_type. Adjust calls to...
12874 (build_raise_check): ...this. Do not take a void_tree parameter.
12875 Call build_function_type_list instead of build_function_type.
12876 Fix head comment and swap couple of conditional blocks.
12878 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12880 * gnatvsn.ads (Library_Version): Bump to 4.7.
12881 (Current_Year): Bump to 2011.
12883 2011-04-29 Michael Matz <matz@suse.de>
12885 * gcc-interface/misc.c (gnat_handle_option): Set
12886 warn_maybe_uninitialized.
12888 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12890 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12891 the Watson/McCabe paper.
12893 2011-04-23 Jim Meyering <meyering@redhat.com>
12895 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12897 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12899 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12902 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12904 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12906 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12907 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12908 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12909 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12910 <all>: Do not set flags on the reused DECL node coming from an alias.
12911 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12912 don't need debug info here...
12913 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12914 (gigi): Adjust calls to create_subprog_decl.
12915 (build_raise_check): Likewise.
12916 (establish_gnat_vms_condition_handler): Likewise.
12917 (Compilation_Unit_to_gnu): Likewise.
12918 (gnat_to_gnu): Likewise.
12920 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12922 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12923 (NO_REORDER_ADAFLAGS): New variable.
12924 (EXTRA_GNATTOOLS): Always define.
12925 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12926 Clean up and adjust list of files compiled with special options.
12927 * gcc-interface/Make-lang.in: Likewise.
12928 (ada/decl.o): Cosmetical change.
12929 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12931 2011-04-20 Jim Meyering <meyering@redhat.com>
12933 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12935 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12937 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12938 $(CFLAGS) on the link line.
12940 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12942 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12943 padded type built for the return type if it is unconstrained.
12945 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12947 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12949 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12951 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12952 before calling TREE_CHAIN.
12953 * gcc-interface/misc.c (gnat_init_ts): New function.
12954 (LANG_HOOKS_INIT_TS): Define.
12956 2011-04-12 Martin Jambor <mjambor@suse.cz>
12958 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12959 instead of cgraph_node.
12961 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12963 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12964 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12967 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12969 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12970 of aggregate types that contain a placeholder.
12972 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12974 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12976 (handle_type_generic_attribute): Likewise.
12978 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12981 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12983 2011-04-04 Kai Tietz <ktietz@redhat.com>
12986 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12989 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12991 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12992 type case, do not strip a padding type around the array type.
12994 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12996 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12999 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13001 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13002 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13003 code for -feliminate-unused-debug-types.
13004 (gnat_post_options): Likewise.
13006 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13008 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13009 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13012 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13014 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13015 DECL_ARTIFICIAL flag on enumeration types.
13017 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13019 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13020 fat pointer types artificial unconditionally.
13021 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13024 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13026 * gcc-interface/gigi.h (get_dummy_type): Declare.
13027 (build_dummy_unc_pointer_types): Likewise.
13028 (finish_fat_pointer_type): Likewise.
13029 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13030 fat pointer type has been built, complete it in place.
13031 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13032 and thin pointers. Remove useless variable.
13033 (finish_fat_pointer_type): Make global and move to...
13034 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13035 (get_dummy_type): New function.
13036 (build_dummy_unc_pointer_types): Likewise.
13037 (gnat_pushdecl): Propage the name to the anonymous variants only.
13038 (update_pointer_to): Only adjust the pointer types in the unconstrained
13041 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13043 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13044 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13045 if this is a Taft amendment type and the full declaration is available.
13046 * gcc-interface/trans.c (process_type): Likewise.
13047 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13048 (process_freeze_entity): Likewise.
13049 * gcc-interface/utils.c (dummy_global): New static variable.
13050 (gnat_write_global_declarations): If there are types declared as used
13051 at the global level, insert them in the global hash table.
13053 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13055 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13056 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13057 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13059 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13060 flag of the type accordingly.
13061 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13063 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13065 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13066 finalizing types when updating the pointers to the designated type.
13067 <all>: Finalize the deferred types even if we didn't defer processing
13068 of incomplete types in this invocation.
13070 2011-04-01 Olivier Hainque <hainque@adacore.com>
13071 Nicolas Setton <setton@adacore.com>
13072 Eric Botcazou <ebotcazou@adacore.com>
13074 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13075 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13077 2011-03-28 Kai Tietz <ktietz@redhat.com>
13079 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13081 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13082 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13084 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13086 2011-03-28 Tristan Gingold <gingold@adacore.com>
13089 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13090 Use ada output of gnatbind.
13091 (ada/b_gnatb.adb): Ditto.
13092 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13093 (ada.mostlyclean, ada.stage1)
13094 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13095 (ada.stagefeedback): Adjust.
13096 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13097 Use ada output of gnatbind.
13098 (b_gnatm.adb): Ditto.
13099 (b_gnatl.o, b_gnatm.o): New rules.
13101 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13103 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13104 for the padded type built to support a specified size or alignment.
13106 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13108 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13109 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13110 unconditionally to the end of the unit when the designated type is
13112 <all>: Rename local variable. Attempt to un-defer types only and do it
13113 for limited_with'ed types as well.
13114 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13115 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13116 consistently and remove redundant call to finalize_from_with_types.
13118 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13120 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13121 subprograms without a previous spec declared in the same unit.
13122 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13123 subprograms at the end of the unit instead of at the beginning.
13124 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13125 isn't public for the special handling of non-inline functions nested
13126 inside inline external functions.
13128 2011-03-25 Jeff Law <law@redhat.com>
13130 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13132 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13134 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13135 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13136 to compute Set_Size_Depends_On_Discriminant.
13137 (Layout_Type): Call it on array types in back-end layout mode.
13138 * sem_util.adb (Requires_Transient_Scope): Return true for array
13139 types only if the size depends on the value of discriminants.
13140 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13141 type if the RHS is a call to a function that returns an unconstrained
13142 type with default discriminant.
13144 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13146 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13147 non-conversion to the nominal result type at the end.
13149 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13151 * gcc-interface/trans.c (create_temporary): New function taken from...
13152 (create_init_temporary): ...here. Call it.
13153 (call_to_gnu): Create the temporary for the return value early, if any.
13154 Create it for a function with copy-in/copy-out parameters if there is
13155 no target; in other cases of copy-in/copy-out, use another temporary.
13156 Push the new binding level lazily. Add and rename local variables.
13158 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13160 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13162 (set_rm_size): Likewise.
13164 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13166 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13167 for the padded type built in order to support a specified alignment.
13168 Fix incorrect formatting.
13170 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13173 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13175 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13177 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13178 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13179 to the end of the list. Adjust recursive call. Rename local variable.
13180 If REORDER is true, reorder components of the record type.
13181 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13182 components_to_record and adjust the parameter list.
13184 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13186 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13187 disabled, use the variable for bounds of loop iteration scheme.
13189 2011-03-21 Kai Tietz <ktietz@redhat.com>
13192 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13194 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13196 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13197 out whether the expression is read-only. Short-circuit placeholder
13198 case and rename a couple of local variables.
13200 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13202 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13203 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13204 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13205 (convert): Deal with conversions from a smaller form type specially.
13207 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13209 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13210 its argument, except for the special -I- switch.
13212 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13214 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13217 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13219 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13221 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13223 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13225 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13226 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13227 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13228 Do not generate the check directly, instead instantiate the template
13229 check present in the descriptor.
13230 (make_descriptor_field): Move around.
13231 (build_vms_descriptor32): Build a template check in the POINTER field.
13232 (build_vms_descriptor): Remove useless suffixes.
13233 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13235 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13238 * targext.c: Include target files if IN_RTS is defined.
13240 2011-01-26 Richard Guenther <rguenther@suse.de>
13243 * targext.c: Include config.h.
13244 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13247 2011-01-04 Pascal Obry <obry@adacore.com>
13248 Eric Botcazou <ebotcazou@adacore.com>
13250 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13252 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13254 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13255 end-of-case on the end label and its associated gotos, if any.
13257 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13259 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13260 expressions of the parameter cache within the statement group of
13261 the CICO mechanism.
13263 2011-01-04 Olivier Hainque <hainque@adacore.com>
13264 Eric Botcazou <ebotcazou@adacore.com>
13266 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13267 (set_end_locus_from_node): New function.
13268 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13269 make and the function end_locus.
13270 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13271 for the elaboration subprogram.
13272 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13273 set the end_locus of the expression as well.
13275 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13278 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13279 variables that are referenced in exception handlers volatile.
13283 Copyright (C) 2011 Free Software Foundation, Inc.
13285 Copying and distribution of this file, with or without modification,
13286 are permitted in any medium without royalty provided the copyright
13287 notice and this notice are preserved.