1 2011-12-12 Robert Dewar <dewar@adacore.com>
3 * s-taprop-mingw.adb: Minor reformatting.
5 2011-12-12 Nicolas Roche <roche@adacore.com>
7 * gcc-interface/Make-lang.in: Update dependencies.
8 Add gnattools4 target when building tools in canadian mode
10 2011-12-12 Javier Miranda <miranda@adacore.com>
12 * exp_disp.adb (Make_VM_TSD): Complete previous
15 2011-12-12 Bob Duff <duff@adacore.com>
17 * s-tpobop.adb: Use named notation.
18 * g-bytswa.ads, s-taprop.ads: Minor comment fix.
20 2011-12-12 Arnaud Charlet <charlet@adacore.com>
22 * make.adb: Minor comment update.
24 2011-12-12 Robert Dewar <dewar@adacore.com>
26 * freeze.adb, s-taprop-mingw.adb, exp_disp.adb, sem_ch13.adb: Minor
29 2011-12-12 Robert Dewar <dewar@adacore.com>
31 * sem_ch6.adb, gnatls.adb: Minor reformatting.
33 2011-12-12 Ed Schonberg <schonberg@adacore.com>
35 * freeze.adb (Freeze_Entity): If a type declared in a generic
36 context has predicates, generate a freeze node for it.
37 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
38 has not been analyzed yet, entity has not been frozen, so analyze
41 2011-12-12 Javier Miranda <miranda@adacore.com>
43 * exp_disp.adb (Make_VM_TSD): Generate code
44 to store the value 'alignment in the TSD.
46 2011-12-12 Bob Duff <duff@adacore.com>
48 * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
51 2011-12-12 Hristian Kirtchev <kirtchev@adacore.com>
53 * exp_ch4.adb (Expand_N_Allocator): Update the master of an
54 anonymous access-to-controlled type to utilize the heterogeneous
55 master associated with the current unit.
57 2011-12-12 Ed Schonberg <schonberg@adacore.com>
59 * sem_ch6.adb (Analyze_Expression_Function): If the function
60 is not a completion, pre-analyze the expression now to prevent
61 spurious visibility on later entities. The body is inserted at
62 the end of the current declaration list or package to prevent
63 early freezing, but the visibility is established at the point
66 2011-12-12 Bob Duff <duff@adacore.com>
68 * sem.adb, sem.ads: Add debugging routines.
70 2011-12-12 Tristan Gingold <gingold@adacore.com>
72 * gnatls.adb: (gnatls): Also add the objects dir in search list.
74 2011-12-12 Robert Dewar <dewar@adacore.com>
76 * exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb,
77 sem_ch13.adb: Minor reformatting.
79 2011-12-12 Gary Dismukes <dismukes@adacore.com>
81 * sem_ch7.adb (Uninstall_Declarations): Don't
82 apply check for incomplete types used as a result type for an
83 access-to-function type when compiling for Ada 2012 or later.
84 * sem_ch6.adb (Analyze_Subprogram_Declaration):
85 Specialize error message for interface subprograms that are
86 not declared abstract nor null (functions can't be declared as
87 null). Also, remove "(Ada 2005)" from message.
89 2011-12-12 Robert Dewar <dewar@adacore.com>
91 * sem_prag.adb (GNAT_Pragma): Check comes from source.
93 2011-12-12 Robert Dewar <dewar@adacore.com>
95 * gnatls.adb: Minor reformatting.
97 2011-12-12 Javier Miranda <miranda@adacore.com>
99 * a-tags.ads (Alignment): New TSD field.
100 (Max_Predef_Prims): Value lowered to 15 (or 9 in case of
101 configurable runtime) Update documentation of predefined
102 primitives since Alignment has been removed.
103 * exp_disp.ads Update documentation of slots of dispatching
105 * exp_disp.adb (Default_Prim_Op_Position): Update slot
106 values since alignment is no longer a predefined primitive.
107 (Is_Predefined_Dispatch_Operation): Remove _alignment.
108 (Is_Predefined_Internal_Operation): Remove _alignment.
109 (Make_DT): Update static test on the value stored in a-tags.ads
110 for Max_Predef_Prims; store the value of 'alignment in the TSD.
111 * exp_atag.ads, exp_atag.adb (Build_Get_Alignment): New subprogram
112 that retrieves the alignment from the TSD
113 * exp_util.adb (Build_Allocated_Deallocate_Proc): For deallocation
114 of class-wide types obtain the value of alignment from the TSD.
115 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
116 applied to a class-wide type invoke Build_Get_Alignment to
117 generate code which retrieves the value of the alignment from
119 * rtsfind.ads (RE_Alignment): New Ada.Tags entity
120 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For tagged
121 types if the value of the alignment is bigger than the Maximum
122 alignment then set the value of the alignment to the Maximum
123 alignment and report a warning.
124 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate
126 (Predefined_Primitive_Bodies): Do not generate body of _alignment.
128 2011-12-12 Gary Dismukes <dismukes@adacore.com>
130 * freeze.adb (Freeze_Expression): Allow freezing of static
131 scalar subtypes that are prefixes of an attribute, even if not
132 yet marked static. Such attributes will get marked as static
133 later in Eval_Attribute (as called from Resolve_Attribute).
134 * sem_attr.adb (Eval_Attribute): Remove wrong code that does an
135 early return for attribute prefixes that are unfrozen source-level
136 types. This code was incorrectly bypassing folding of unfrozen
137 static subtype attributes in default expressions (the executable
138 example in the now-deleted comment was in fact illegal).
140 2011-12-12 Robert Dewar <dewar@adacore.com>
142 * a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb,
143 gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting.
145 2011-12-12 Tristan Gingold <gingold@adacore.com>
147 * gsocket.h: Adjust previous patch.
149 2011-12-12 Thomas Quinot <quinot@adacore.com>
151 * exp_disp.adb: Minor reformatting.
153 2011-12-12 Tristan Gingold <gingold@adacore.com>
155 * gnatls.adb (Search_RTS): New procedure.
156 (Scan_Ls_Arg): Move code that search the RTS.
157 (Gnatls): search the RTS later.
158 * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function.
160 2011-12-12 Ed Falis <falis@adacore.com>
162 * sysdep.c: Fix treatment of VxWorks task options so that run-times
163 built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK.
165 2011-12-12 Bob Duff <duff@adacore.com>
167 * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads:
168 Minor cleanup and fiddling with debug printouts.
170 2011-12-12 Vincent Celier <celier@adacore.com>
172 * prj-nmsc.adb (Get_Directories): For a non extending project,
173 always get a declared object and/or exec directory if it already
174 exists, even when there are no sources, but do not create them.
176 2011-12-12 Bob Duff <duff@adacore.com>
178 * sem_res.adb (Resolve): Deal with the case where an abstract
179 operator is called with operands of type universal_integer.
181 2011-12-12 Thomas Quinot <quinot@adacore.com>
183 * par_sco.adb: Minor fix to dominance marker referencing WHILE
186 2011-12-12 Tristan Gingold <gingold@adacore.com>
188 * mlib-tgt-specific-xi.adb: (Get_Target_Prefix): Simplify code.
190 2011-12-12 Thomas Quinot <quinot@adacore.com>
192 * par_sco.adb: Adjust dominant marker for branches of CASE
195 2011-12-12 Thomas Quinot <quinot@adacore.com>
197 * gsocket.h, s-oscons-tmplt.c: Ensure we do not include any system
198 header file prior to redefining FD_SETSIZE.
200 2011-12-12 Ed Schonberg <schonberg@adacore.com>
202 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In
203 a generic context the aspect expressions may not have been
204 preanalyzed if there was no previous freeze point, so the
205 expressions must be preanalyzed now, and there is no conformance
206 to check for visibility changes.
208 2011-12-12 Matthew Heaney <heaney@adacore.com>
210 * a-convec.adb, a-coinve.adb, a-cobove.adb (Iterator): Use
211 subtype Index_Type'Base for Index component (Finalize): Remove
212 unnecessary access check (First, Last): Cursor return value
213 depends on iterator index value (Iterate): Use start position as
214 iterator index value (Next, Previous): Forward to corresponding
215 cursor-based operation.
216 * a-cborma.adb (Iterate): Properly initialize iterator object (with 0
219 2011-12-12 Robert Dewar <dewar@adacore.com>
221 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
223 2011-12-12 Steve Baird <baird@adacore.com>
225 * sem_ch3.adb (Check_Completion): Improve a comment.
227 2011-12-12 Tristan Gingold <gingold@adacore.com>
229 * cstand.adb: Minor comment fix.
231 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
233 * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
234 flag of elements to compute that of the constructor.
236 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
238 * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
239 on references built for parameters which aren't specifically by-ref.
241 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
243 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
244 alignment set on a renaming, assert that the renamed object is aligned
245 enough as to make it possible to honor it.
247 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
249 * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
251 2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
253 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
254 Correctly detect cygwin, which no longer has the '32' suffix, and use
255 appropriate implementations of the sockets and memory packages.
256 * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
257 setmode/_setmode for MinGW and Cygwin, respectively.
258 (__gnat_set_binary_mode [windows targets]): Use the above, and enable
259 the windows version for Cygwin as well as MinGW.
260 (__gnat_set_text_mode [windows targets]): Likewise.
261 (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
262 in addition to the MinGW version.
263 (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
264 (__gnat_get_stack_bounds): Likewise.
266 2011-12-05 Bob Duff <duff@adacore.com>
268 * sem_ch4.adb: Minor comment fix.
270 2011-12-05 Robert Dewar <dewar@adacore.com>
272 * gnat_ugn.texi: Add documentation for -gnatw.e.
274 2011-12-05 Bob Duff <duff@adacore.com>
276 * treepr.adb (pn): Print something useful for
277 Elmt_Ids. Add Write_Eol to 'when others' case, so the output
278 will be seen immediately in gdb.
280 2011-12-05 Ed Schonberg <schonberg@adacore.com>
282 * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
283 is never a main program.
285 2011-12-05 Thomas Quinot <quinot@adacore.com>
287 * par_sco.adb: Various minor adjustments to dominance markers
290 2011-12-05 Ed Schonberg <schonberg@adacore.com>
292 * sem_ch6.adb (Analyze_Expression_Function): If the function is
293 a completion, generate a body reference for its defining entity,
294 before rewriting the node as a body.
295 * sem_util.adb (Defining_Entity): Add entry for expression
298 2011-12-05 Bob Duff <duff@adacore.com>
300 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
301 to the Comes_From_Source check, to deal properly with the case
302 of indirect inheritance of "=".
304 2011-12-05 Thomas Quinot <quinot@adacore.com>
307 * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
310 2011-12-05 Thomas Quinot <quinot@adacore.com>
312 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
315 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
316 Thomas Quinot <quinot@adacore.com>
318 * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
319 (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
320 Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
321 which allows the file to be installed in adainclude.
322 * gcc-interface/Make-lang.in: Update dependencies.
324 2011-12-02 Javier Miranda <miranda@adacore.com>
326 * sem_ch3.adb (Constrain_Access): Undo previous
327 patch for this routine. Required since the RM rule 3.7.1(7/3)
328 applies to all access types.
330 2011-12-02 Bob Duff <duff@adacore.com>
332 * sem_ch6.adb: Minor comment fix.
334 2011-12-02 Joel Sherrill <joel.sherrill@oarcorp.com>
336 * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
337 for consistency with other ports.
338 * s-osinte-rtems.adb: Add body for dummy implementation of
339 pthread_rwlockattr_setkind_np().
340 * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
341 * terminals.c: Add __rtems__ conditionals to account for differences
342 in termios implementation.
344 2011-12-02 Robert Dewar <dewar@adacore.com>
346 * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
347 a-cbmutr.ads: Minor reformatting.
349 2011-12-02 Hristian Kirtchev <kirtchev@adacore.com>
351 * exp_dbug.adb: Comment reformatting.
352 (Get_External_Name): Use Reset_Buffers to reset the contents of
353 Name_Buffer and Homonym_Numbers.
354 (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
355 Homonym_Numbers before creating a new qualified name for a particular
357 (Reset_Buffers): New routine.
359 2011-12-02 Matthew Heaney <heaney@adacore.com>
361 * a-cbmutr.ads (No_Node): Moved declaration from body to spec
362 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
364 (Child_Iterator): Derives from Root_Iterator.
365 (Finalize): Implemented as an override operation for Root_Iterator.
366 (First): Return value depends on Subtree component.
367 (Last): Component was renamed from Parent to Subtree.
368 (Next): Checks parameter value, and uses simplified loop.
369 (Iterate): Forwards to Iterate_Subtree.
370 (Iterate_Children): Component was renamed from Parent to Subtree.
371 (Iterate_Subtree): Checks parameter value
373 2011-12-02 Robert Dewar <dewar@adacore.com>
375 * usage.adb: Add lines for -gnatw.n and -gnatw.N
376 (atomic sync info msgs).
378 2011-12-02 Steve Baird <baird@adacore.com>
380 * sem_ch3.adb (Check_Completion): An Ada 2012
381 generic formal type doesn't require a completion.
383 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
385 * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
386 packed array type if it is to be set on the array type used to
389 2011-12-02 Robert Dewar <dewar@adacore.com>
391 * gnat_rm.texi: Eliminate confusing use of type name.
393 2011-12-02 Thomas Quinot <quinot@adacore.com>
395 * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
396 body that acts as spec, do not create a shallow copy of the context
397 clause for the synthetized spec (instead, use the same list as
400 2011-12-02 Bob Duff <duff@adacore.com>
402 * gnat_ugn.texi: Clarify usage of -p binder switch.
404 2011-12-02 Javier Miranda <miranda@adacore.com>
406 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
407 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
408 (In_Generic_Body): Moved to sem_aux.
409 (Unit_Declaration_Node): Moved to sem_aux.
410 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
412 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
413 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
414 exp_ch13.adb: Add with-clause on Sem_Aux.
416 2011-12-02 Yannick Moy <moy@adacore.com>
418 * sem_util.adb (Unique_Name): Reach through Unique_Entity to
419 get the name of the entity.
420 (Unique_Entity): Correct case for subprogram stubs.
422 2011-12-02 Yannick Moy <moy@adacore.com>
424 * sem_ch3.adb (Check_Initialization): Do not emit warning on
425 initialization of limited type object in Alfa mode.
427 2011-12-02 Robert Dewar <dewar@adacore.com>
429 * sinfo.ads: Minor reformatting.
430 * gnat_ugn.texi: Fix confusion in use of term "type name".
432 2011-12-02 Robert Dewar <dewar@adacore.com>
434 * sem_ch6.adb: Minor change in error message.
436 2011-12-02 Robert Dewar <dewar@adacore.com>
438 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
441 2011-12-02 Javier Miranda <miranda@adacore.com>
443 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
444 static check of the rule of general access types whose designated
445 type has discriminants.
446 * sem_util.ads, sem_util.adb
447 (Effectively_Has_Constrained_Partial_View): New subprogram.
448 (In_Generic_Body): New subprogram.
449 * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
450 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
451 subprogram In_Generic_Body.
452 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
453 sem_ch4.adb: In addition, this patch replaces the occurrences of
454 Has_Constrained_Partial_View by
455 Effectively_Has_Constrained_Partial_View.
457 2011-12-02 Matthew Heaney <heaney@adacore.com>
459 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
461 (Finalize): Remove unnecessary access check.
462 (First): Forward to First_Child.
463 (Last): Forward to Last_Child.
464 (Iterate): Check preconditions for parent node parameter.
465 (Next): Forward to Next_Sibling.
466 (Previous): Forward to Previous_Sibling.
468 2011-12-02 Robert Dewar <dewar@adacore.com>
470 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
471 a-coormu.adb, a-convec.adb: Minor reformatting.
473 2011-12-02 Matthew Heaney <heaney@adacore.com>
475 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
476 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
478 (Finalize): Decrement busy counter.
479 (First, Last): Cursor return value depends on iterator node value.
480 (Iterate): Use start position as iterator node value.
481 (Next, Previous): Forward to corresponding cursor-based operation.
483 2011-12-02 Robert Dewar <dewar@adacore.com>
485 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
486 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
487 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
488 a-ciorma.adb, a-cobove.adb: Minor reformatting.
490 2011-12-01 Jakub Jelinek <jakub@redhat.com>
493 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
495 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
497 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
499 2011-11-23 Thomas Quinot <quinot@adacore.com>
501 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
502 only on platforms where this is required, as determined by
505 2011-11-23 Ed Schonberg <schonberg@adacore.com>
507 * sem_ch9.adb: No check on entry index if error on index.
509 2011-11-23 Gary Dismukes <dismukes@adacore.com>
511 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
512 return statements nested inside an extended_return_statement.
513 * gcc-interface/Make-lang.in: Update dependencies.
514 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
516 2011-11-23 Ed Schonberg <schonberg@adacore.com>
518 * freeze.adb (Freeze_All_Ent): An incomplete type is not
519 frozen by a subprogram body that does not come from source.
521 2011-11-23 Pascal Obry <obry@adacore.com>
523 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
524 the library for pseudo terminal support.
525 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
528 2011-11-23 Ed Schonberg <schonberg@adacore.com>
530 * sem_ch9.adb: No check on entry family index if generic.
532 2011-11-23 Thomas Quinot <quinot@adacore.com>
534 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
535 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
536 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
537 System.OS_Constants from shared spec of
538 System.Tasking.Primitive_Operations to the specific body variants
539 that really require this dependency.
541 2011-11-23 Ed Schonberg <schonberg@adacore.com>
543 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
544 If the declaration has aspects, analyze them so they can be
547 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
549 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
550 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
551 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
552 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
553 Add with and use clause for Ada.Finalization. Type
554 Iterator and Child_Iterator are now derived from Limited_Controlled.
555 (Finalize): New routine.
556 (Iterate): Add a renaming of counter Busy and
557 increment it. Update the return aggregate.
558 (Iterate_Children): Add a renaming of
559 counter Busy and increment it. Update the return aggregate.
560 (Iterate_Subtree): Add a renaming of counter Busy and increment
561 it. Update the return aggregate.
562 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
564 * a-cihama.ads: Type Map_Access is now a general access type.
565 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
566 associated with the tree.
567 * a-cohama.ads: Type Map_Access is now a general access type.
568 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
570 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
571 to wrap the loop as this is done at an earlier step, during
572 analysis. The declarations of the iterator and the cursor use
573 the usual Insert_Action mechanism when added into the tree.
574 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
575 Loop_Statement and replace all respective uses by N. Add local
576 constant Loc. Preanalyze the loop iterator to discover whether
577 it is a container iterator and if it is, wrap the loop in a
578 block. This ensures that any controlled temporaries produced
579 by the iteration scheme share the same lifetime of the loop.
580 (Is_Container_Iterator): New routine.
581 (Is_Wrapped_In_Block): New routine.
582 (Pre_Analyze_Range): Move spec and body to the library level.
584 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
586 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
587 that controls casing of type and subtype names.
589 2011-11-23 Yannick Moy <moy@adacore.com>
591 * sem_ch3.adb: Minor addition of comments.
593 2011-11-23 Thomas Quinot <quinot@adacore.com>
595 * prj-part.adb (Extension_Withs): New global variable,
596 contains the head of the list of WITH clauses from the EXTENDS
597 ALL projects for which virtual packages are being created.
598 (Look_For_Virtual_Projects_For): When recursing through
599 an EXTENDS ALL, add the WITH clauses of the extending
600 project to Extension_Withs. When adding a project to the
601 Virtual_Hash, record the associated Extension_Withs list.
602 (Create_Virtual_Extending_Project): Add a copy of the appropriate
603 Extension_Withs to the virtual project.
605 2011-11-23 Thomas Quinot <quinot@adacore.com>
607 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
609 2011-11-23 Thomas Quinot <quinot@adacore.com>
611 * Make-generated.in (Sdefault.Target_Name): Set to
612 $(target_noncanonical) instead of $(target) for consistency.
614 2011-11-23 Matthew Heaney <heaney@adacore.com>
616 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
617 Iterator type as limited (First, Last): Cursor return value
618 depends on iterator node value (Iterate): Use start position as
619 iterator node value (Next, Previous): Forward to corresponding
620 cursor-based operation.
622 2011-11-23 Matthew Heaney <heaney@adacore.com>
624 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
625 Renamed from Ordered_Set_Iterator_Interfaces.
626 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
627 Iterator type as limited (First, Last): Cursor return value
628 depends on iterator node value (Iterate): Use start position as
629 iterator node value (Next, Previous): Forward to corresponding
630 cursor-based operation.
631 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
632 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
633 node component (First, Next): Forward call to corresponding
634 cursor-based operation (Iterate): Representation of iterator no
635 longer has node component
637 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
639 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
640 dereference has a proper type before the side effect removal
642 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
643 where the base type of the subtype is a private itype created
644 to act as the partial view of a constrained record type. This
645 scenario manifests with equivalent class-wide types for records
646 with unknown discriminants.
648 2011-11-23 Jerome Guitton <guitton@adacore.com>
650 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
652 2011-11-23 Thomas Quinot <quinot@adacore.com>
654 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
655 reformatting/reorganization.
657 2011-11-23 Thomas Quinot <quinot@adacore.com>
659 * g-htable.ads: Remove old comments.
661 2011-11-23 Thomas Quinot <quinot@adacore.com>
663 * exp_imgv.adb: Minor reformatting.
665 2011-11-23 Robert Dewar <dewar@adacore.com>
667 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
668 family bounds out of range.
670 2011-11-23 Matthew Heaney <heaney@adacore.com>
672 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
673 type as limited, and remove node component.
674 (First, Next): Forward call to corresponding cursor-based operation.
675 (Iterate): Representation of iterator no longer has node component.
677 2011-11-23 Yannick Moy <moy@adacore.com>
679 * exp_util.adb: Revert previous change to remove side-effects in Alfa
680 mode, which is not the correct thing to do for renamings.
682 2011-11-23 Thomas Quinot <quinot@adacore.com>
684 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
685 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
686 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
687 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
688 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
689 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
690 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
691 s-taprop-posix.adb: Remove hard-coded clock ids;
692 instead, generate them in System.OS_Constants.
693 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
694 id of the clock providing Ada.Real_Time.Monotonic_Clock.
695 * thread.c: New file.
696 (__gnat_pthread_condattr_setup): New function. For platforms where
697 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
700 2011-11-23 Yannick Moy <moy@adacore.com>
702 * sem_ch3.adb: Restore the use of Expander_Active instead of
703 Full_Expander_Active, so that the evaluation is forced in Alfa
704 mode too. Otherwise, we end up with an unexpected insertion in a
705 place where it is not supposed to happen, on default parameters
708 2011-11-23 Thomas Quinot <quinot@adacore.com>
710 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
711 for Pretty_Print, for use from within gdb.
713 2011-11-23 Ed Schonberg <schonberg@adacore.com>
715 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
716 and the cursor declarations in a block, so that the loop variable
717 is local to the construct.
719 2011-11-23 Matthew Heaney <heaney@adacore.com>
721 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
722 type Reversible_Iterator'Class.
723 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
724 Declare type as limited.
725 (First, Last): Return value depends on iterator's start node value.
726 (Next, Previous): Call corresponding Cursor-based operation.
727 (Iterate): Indicate whether complete or partial iteration
729 2011-11-23 Robert Dewar <dewar@adacore.com>
731 * errout.adb: Minor reformattin (Finalize): Take templates into
732 account for warning suppression.
733 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
734 * erroutc.adb: Minor reformatting (Finalize): Take generic
735 templates into account for warning suppress.
736 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
737 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
738 case Warnings): Provide Used parameter in call to
739 Set_Specific_Warnings_Off (to deal with generic template case).
741 2011-11-23 Pascal Obry <obry@adacore.com>
743 * sem_prag.adb (Process_Convention): Better error message for
744 stdcall convention on dispatching calls.
746 2011-11-23 Gary Dismukes <dismukes@adacore.com>
748 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
750 2011-11-23 Javier Miranda <miranda@adacore.com>
752 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
753 implicit type conversion when the returned object is allocated
754 in the secondary stack and the type of the returned object is
755 an interface. Done to force generation of displacement of the
758 2011-11-23 Pascal Obry <obry@adacore.com>
760 * impunit.adb: Add g-exptty and g-tty units.
762 2011-11-23 Robert Dewar <dewar@adacore.com>
764 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
766 2011-11-23 Robert Dewar <dewar@adacore.com>
768 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
771 2011-11-23 Yannick Moy <moy@adacore.com>
773 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
774 line of precondition/ postcondition/invariant.
776 2011-11-23 Pascal Obry <obry@adacore.com>
778 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
779 terminals.c: New files.
780 Makefile.rtl: Add these new files.
781 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
782 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
783 * gcc-interface/Make-lang.in: Update dependencies.
785 2011-11-21 Robert Dewar <dewar@adacore.com>
787 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
788 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
790 2011-11-21 Thomas Quinot <quinot@adacore.com>
792 * sinfo.ads: Minor reformatting.
794 2011-11-21 Yannick Moy <moy@adacore.com>
796 * exp_util.adb: Minor reformatting. Update comments.
798 2011-11-21 Robert Dewar <dewar@adacore.com>
800 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
801 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
802 sem_ch6.adb: Minor reformatting.
804 2011-11-21 Arnaud Charlet <charlet@adacore.com>
806 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
807 Unrestricted_Access to deal with fact that we properly detect the
808 error if Access is used.
809 * gcc-interface/Make-lang.in: Update dependencies.
811 2011-11-21 Yannick Moy <moy@adacore.com>
813 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
815 * sem_res.adb (Resolve_Short_Circuit): Place error on first
816 character of expression.
818 2011-11-21 Yannick Moy <moy@adacore.com>
820 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
822 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
824 * exp_attr.adb (Expand_N_Attribute_Reference, case
825 Max_Size_In_Storage_Elements): Account for the size of the
826 hidden list header which precedes controlled objects allocated
828 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
830 * sinfo.adb (Header_Size_Added): New routine.
831 (Set_Header_Size_Added): New routine.
832 * sinfo.ads: Add flag Controlled_Header_Added along with
834 (Header_Size_Added): New inlined routine.
835 (Set_Header_Size_Added): New inlined routine.
836 * s-stposu.adb (Allocate_Any_Controlled): Use
837 Header_Size_With_Padding to calculate the proper
839 (Deallocate_Any_Controlled): Use
840 Header_Size_With_Padding to calculate the proper size
841 of the header. (Header_Size_With_Padding): New routine.
842 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
843 * s-stposu.ads (Header_Size_With_Padding): New routine.
845 2011-11-21 Ed Schonberg <schonberg@adacore.com>
847 * aspects.adb: Aspect specifications are allowed on renaming
849 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
850 subprogram renaming declaration
852 2011-11-21 Tristan Gingold <gingold@adacore.com>
854 * env.c: Remove unused declaration.
856 2011-11-21 Pascal Obry <obry@adacore.com>
858 * s-os_lib.ads: Minor style fix.
860 2011-11-21 Pascal Obry <obry@adacore.com>
862 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
863 identical, do nothing on Windows XP.
865 2011-11-21 Yannick Moy <moy@adacore.com>
867 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
868 Use Full_Expander_Active instead of Expander_Active to control
869 the forced evaluation of expressions for the sake of generating
872 2011-11-21 Thomas Quinot <quinot@adacore.com>
874 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
876 2011-11-21 Tristan Gingold <gingold@adacore.com>
878 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
879 mode_read_binary, mode_write_binary, mode_append_binary,
880 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
881 mode_read_binary_plus, mode_write_binary_plus,
882 mode_append_binary_plus): Remove unused declarations.
884 2011-11-21 Yannick Moy <moy@adacore.com>
886 * gnat_rm.texi: Minor rewording.
888 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
890 * exp_imgv.adb (Expand_Width_Attribute): Emit
891 an error message rather than a warning when pragma Discard_Names
892 prevents the computation of 'Width. Do not emit an error through
895 2011-11-21 Javier Miranda <miranda@adacore.com>
897 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
898 implicit type conversion when the type of the allocator is an
899 interface. Done to force generation of displacement of the "this"
900 pointer when required.
902 2011-11-21 Ed Schonberg <schonberg@adacore.com>
904 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
905 functions, and is set when the expression is a completion of a
906 previous declaration.
907 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
908 whether an expression function completes a previous declaration,
909 use Find_Corresponding_Spec, as when analyzing a subprogram body.
911 2011-11-21 Steve Baird <baird@adacore.com>
913 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
914 (Type_Access_Level): Improve comment.
916 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
918 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
919 means of -iquote unconditionally.
921 2011-11-21 Robert Dewar <dewar@adacore.com>
923 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
926 2011-11-21 Arnaud Charlet <charlet@adacore.com>
928 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
929 to deal with fact that we properly detect the error if Access
932 2011-11-21 Steve Baird <baird@adacore.com>
934 * sem_util.ads: Update comment describing function
935 Deepest_Access_Level.
936 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
938 (Type_Access_Level): Return library level
939 for a generic formal type.
940 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
941 calls with calls to Deepest_Type_Access_Level.
942 * sem_ch3.adb (Analyze_Component_Declaration): replace a
943 Type_Access_Level call with a call to Deepest_Type_Access_Level.
944 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
945 Replace three Type_Access_Level calls with calls to
946 Deepest_Type_Access_Level.
947 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
948 Deepest_Type_Access_Level.
949 (Valid_Conversion.Valid_Array_Conversion): Replace a
950 Type_Access_Level call with a call to Deepest_Type_Access_Level.
952 2011-11-21 Robert Dewar <dewar@adacore.com>
954 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
956 2011-11-21 Robert Dewar <dewar@adacore.com>
958 * sinput.ads: Minor comment fix.
960 2011-11-21 Robert Dewar <dewar@adacore.com>
962 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
963 Last_Bit, Position): Handle 2005 case.
965 2011-11-21 Robert Dewar <dewar@adacore.com>
967 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
968 to deal with fact that we properly detect the error if Access
970 (Increment): Same fix.
971 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
972 to deal with fact that we properly detect the error if Access
974 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
975 volatile if the B component is volatile. This affects the check
976 for passing such a by reference volatile actual to a non-volatile
977 formal (which should be illegal)
979 2011-11-21 Robert Dewar <dewar@adacore.com>
981 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
982 size and alignment for foreign convention enumeration types.
983 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
986 2011-11-21 Yannick Moy <moy@adacore.com>
988 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
989 Apply_Discriminant_Check, Apply_Divide_Check,
990 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
991 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
992 Selected_Range_Checks): Replace reference to Expander_Active
993 with reference to Full_Expander_Active, so that expansion of
994 checks is not performed in Alfa mode
996 2011-11-21 Tristan Gingold <gingold@adacore.com>
998 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
999 fact that we properly detect the error if Access is used.
1001 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1003 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
1005 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1007 * exp_imgv.adb: Add with and use clause for Errout.
1008 (Expand_Width_Attribute): Emit a warning when in
1009 configurable run-time mode to provide a better diagnostic message.
1011 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1013 * s-finmas.adb (Finalize): Add comment concerning double finalization.
1015 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1017 * sem_ch3.adb (Access_Definition): If the access definition
1018 is itself the return type of an access to function definition
1019 which is ultimately the return type of an access to subprogram
1020 declaration, its scope is the enclosing scope of the ultimate
1021 access to subprogram.
1023 2011-11-21 Steve Baird <baird@adacore.com>
1025 * sem_res.adb (Valid_Conversion): If a conversion was legal
1026 in the body of a generic, then the corresponding conversion is
1027 legal in the expanded body of an instance of the generic.
1029 2011-11-21 Robert Dewar <dewar@adacore.com>
1031 * sem_ch3.adb: Minor reformatting.
1033 2011-11-21 Robert Dewar <dewar@adacore.com>
1035 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
1037 * sinput.ads: Add section on Handling of Source Line Terminators.
1038 * types.ads (Line_Terminator): Adjust comments.
1040 2011-11-21 Robert Dewar <dewar@adacore.com>
1042 * frontend.adb (Frontend): Capture restrictions from config files
1043 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
1045 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
1046 references. This was noticed during debugging, but it is not
1047 known if it causes real bugs.
1048 * restrict.ads, restrict.adb: New routines to save/set/restore
1049 non-partition-wide restrictions.
1050 * s-rident.ads: Comment changes for new handling of
1052 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
1053 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
1054 attempt to save/restore non-partition-wide restrictions (now
1055 this work is all done in Sem).
1056 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1057 Special handling for restriction No_Elaboration_Code.
1059 2011-11-21 Robert Dewar <dewar@adacore.com>
1061 * gnat_ugn.texi: Document new handling of restrictions pragmas.
1063 2011-11-21 Pascal Obry <obry@adacore.com>
1065 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
1066 attribute as not needed.
1068 2011-11-21 Robert Dewar <dewar@adacore.com>
1070 * sem_prag.adb: Minor reformatting.
1072 2011-11-21 Pascal Obry <obry@adacore.com>
1074 * gnat_rm.texi: Document restriction for stdcall convention on
1077 2011-11-21 Pascal Obry <obry@adacore.com>
1079 * sem_prag.adb (Process_Convention): A dispatching call cannot
1080 have a stdcall calling convention.
1082 2011-11-21 Pascal Obry <obry@adacore.com>
1084 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
1085 mutex attribute as not needed.
1086 (Initialize_TCB): Likewise.
1087 (Initialize): Likewise.
1089 2011-11-21 Robert Dewar <dewar@adacore.com>
1091 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
1092 (Process_PPCs): Invariants only apply to public subprograms.
1094 2011-11-21 Robert Dewar <dewar@adacore.com>
1096 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
1097 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
1099 2011-11-21 Robert Dewar <dewar@adacore.com>
1101 * a-finali.ads: Use pragma Pure_12 for this unit
1102 * aspects.adb: Add aspect Pure_12
1103 * aspects.ads: Add aspect Pure_12
1104 * opt.ads: Add note on Pure_12
1105 * par-prag.adb: Add dummy entry for Pure_12
1106 * sem_prag.adb: Implement Pure_12 pragma
1107 * snames.ads-tmpl: Add Entry for Pure_12
1109 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
1111 * vms_data.ads: Add qualifiers for new gnatpp options
1112 '--call_threshold' and '--par_threshold".
1113 * gnat_ugn.texi: Add description for new gnatpp options
1114 '--call_threshold' and '--par_threshold".
1116 2011-11-21 Robert Dewar <dewar@adacore.com>
1118 * lib.ads: Minor reformatting.
1120 2011-11-21 Robert Dewar <dewar@adacore.com>
1122 * lib-load.ads: Add comment.
1124 2011-11-21 Gary Dismukes <dismukes@adacore.com>
1126 * sem_elab.adb: Minor reformatting
1128 2011-11-21 Robert Dewar <dewar@adacore.com>
1130 * exp_ch6.adb: Minor reformatting.
1132 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1134 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
1135 subprogram of the formal package is covered by an others
1136 association with a box initialization, no check is needed
1137 against the actual in the instantiation of the formal package.
1139 2011-11-21 Robert Dewar <dewar@adacore.com>
1141 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
1142 elab warning from within precondition/postcondition etc.
1144 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1146 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
1147 with out parameters may generate assignments to force constraint
1148 checks. These checks must be properly placed in the code after the
1149 declaration or statement that contains the call.
1151 2011-11-21 Fedor Rybin <frybin@adacore.com>
1153 * gnat_ugn.texi: Adding info on current gnattest limitations an
1154 support of -X option.
1156 2011-11-21 Robert Dewar <dewar@adacore.com>
1158 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
1160 2011-11-20 Robert Dewar <dewar@adacore.com>
1162 * exp_ch6.adb, exp_util.adb: Minor reformatting
1164 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1166 * sinfo.ads (Reference): Document that it is OK to set
1167 Is_Known_Non_Null on a temporary initialized to a N_Reference
1170 2011-11-20 Matthew Heaney <heaney@adacore.com>
1172 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
1175 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1177 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
1178 Declare NEW_EXPR local variable and attach the
1179 temporary to it. Set Is_Known_Non_Null on the temporary.
1180 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
1181 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
1182 the temporary created to hold the 'Reference of the expression,
1184 * checks.adb (Install_Null_Excluding_Check): Bail out for the
1185 Get_Current_Excep.all.all idiom generated by the expander.
1187 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1189 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
1190 (f_gnat_ret): New macro.
1191 (struct nrv_data): Add GNAT_RET.
1192 (finalize_nrv_unc_r): New helper function.
1193 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
1194 function returns unconstrained, use finalize_nrv_unc_r as callback.
1195 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
1196 RET_OBJ is non-null.
1197 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
1198 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
1199 if optimization is enabled, record candidates for the Named Return
1202 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1204 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
1205 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
1206 test. Tweak default case.
1207 <N_Goto_Statement>: Use better formatting.
1208 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
1209 MODIFY_EXPR to initialize the storage.
1210 (build_allocator): Likewise.
1212 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1214 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
1215 call to components_to_record.
1216 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
1217 part, reuse enclosing union even if there is a representation clause
1218 on the Unchecked_Union. If there is a variant part, compute the new
1219 first free position, if any. Adjust call to self. Use a single field
1220 directly only if it hasn't got a representation clause or is placed at
1221 offset zero. Create the variant part at offset 0 if all the fields
1222 down to this level have a rep clause. Do not chain the variant part
1223 immediately and adjust downstream.
1224 Do not test ALL_REP before moving the fields without rep clause to the
1225 previous level. Call create_rep_part to create the REP part and force
1226 a minimum size on it if necessary. Do not chain it immediately.
1227 Create a fake REP part if there are fields without rep clause that need
1228 to be laid out starting from FIRST_FREE_POS.
1229 At the end, chain the REP part and then the variant part.
1230 (create_rep_part): New function.
1231 (get_rep_part): Minor tweak.
1232 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1234 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
1237 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1238 bug filed as radar #10302855 from __gnat_error_handler to...
1239 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
1240 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1242 2011-11-18 Tristan Gingold <gingold@adacore.com>
1243 Iain Sandoe <iains@gcc.gnu.org>
1246 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1247 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1249 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
1251 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1253 (OSCONS_CPP, OSCONS_EXTRACT): New.
1254 (./bldtools/oscons/xoscons): New target.
1255 ($(RTSDIR)/s-oscons.ads): Likewise.
1256 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1257 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1258 * Make-generated.in: Remove machinery to generate xoscons and
1261 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
1263 * fe.h (Serious_Errors_Detected): New macro.
1264 * gcc-interface/gigi.h (build_atomic_load): Declare.
1265 (build_atomic_store): Likewise.
1266 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1267 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
1268 Build an atomic load for an In or In Out parameter if needed.
1269 Build an atomic store for the assignment of an Out parameter if needed.
1270 Build an atomic store to the target if ATOMIC_SYNC is true.
1271 (present_in_lhs_or_actual_p): New predicate.
1272 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1273 <N_Explicit_Dereference>: Likewise.
1274 <N_Indexed_Component>: Likewise.
1275 <N_Selected_Component>: Likewise.
1276 <N_Assignment_Statement>: Adjust call to call_to_gnu.
1277 Build an atomic store to the LHS if needed.
1278 <N_Function_Call>: Adjust call to call_to_gnu.
1279 * gcc-interface/utils2.c: Include toplev.h.
1280 (resolve_atomic_size): New static function.
1281 (build_atomic_load): New function.
1282 (build_atomic_store): Likewise.
1283 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1285 2011-11-07 Olivier Hainque <hainque@adacore.com>
1287 * sigtramp-ppcvxw.c: Add general comments.
1288 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1289 rules for r2 to r13, plus CTR and XER.
1290 (CFA_REG): New, register number used to hold the local CFA.
1291 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1292 Make that 15, not 14, with documentation.
1293 (TCR): Undef before definition, preventing conflict with reg number in
1296 2011-11-07 Robert Dewar <dewar@adacore.com>
1298 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1299 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1300 * gcc-interface/Make-lang.in: Update dependencies.
1302 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1304 * exp_ch6.adb: A tagged type is a legal actual for an aliased
1307 2011-11-07 Pascal Obry <obry@adacore.com>
1309 * g-socket.adb, g-socket.ads: Minor reformatting.
1311 2011-11-07 Robert Dewar <dewar@adacore.com>
1313 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1315 2011-11-07 Robert Dewar <dewar@adacore.com>
1317 * gnat_ugn.texi: Add discussion of default mode handling of
1318 source representation with no -gnatW option given, in particular
1319 noting that NEL (next line) is not recognized in this context.
1321 2011-11-07 Yannick Moy <moy@adacore.com>
1323 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1324 generate a reference for a modification even when the modification
1325 does not come from source.
1327 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1329 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1330 use the indexing attributes rather than the Element function,
1331 to obtain variable references.
1332 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1333 Find_Aspect rather than iterating over representation
1334 items. Improve error message.
1335 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1336 of Reference functions.
1338 2011-11-07 Yannick Moy <moy@adacore.com>
1340 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1341 body that has a corresponding parameter on the subprogram
1342 declaration, define the unique entity as being the declaration
1345 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1347 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1348 return type of a function is the class-wide type of an incomplete
1349 type T, T can be a Taft-amendment type and does not have to be
1350 completed in the current private part.
1352 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1354 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1355 that are inherited by default, and apply to the class-wide type
1357 * aspects.adb (Find_Aspect): If the entity is class-wide and the
1358 aspect is inherited, use the aspect of the specific type.
1360 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
1362 * exp_alfa.adb: Remove with and use clause for
1363 Exp_Ch8. Add with and use clause for Exp_Util.
1364 Remove local constant Disable_Processing_Of_Renamings.
1365 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1366 object renamings has been reenabled.
1367 (Expand_Possible_Renaming):
1368 The expansion of identifier and expanded names has been
1369 reenabled. Perform the substitutions only for entities that
1371 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1372 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1373 (Remove_Side_Effects): Alphabetize local variables. Add a guard
1374 to avoid the infinite expansion of an expression in Alfa mode. Add
1375 processing for function calls in Alfa mode.
1376 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1378 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1380 * freeze.adb (Freeze_Entity): If the entity is an access to
1381 subprogram whose designated type is itself a subprogram type,
1382 its own return type must be decorated with size information.
1384 2011-11-04 Arnaud Charlet <charlet@adacore.com>
1386 * gcc-interface/Make-lang.in: Update dependencies.
1388 2011-11-04 Robert Dewar <dewar@adacore.com>
1390 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1391 Avoid junk semicolon after argument of machine code Asm operand.
1393 2011-11-04 Robert Dewar <dewar@adacore.com>
1395 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1396 CodePeer mode or if restriction No_Exception_Handlers is present.
1397 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1398 nodes in CodePeer mode or if restriction No_Exception_Handlers
1401 2011-11-04 Robert Dewar <dewar@adacore.com>
1403 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1405 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1407 * sem_ch6.adb (Analyze_Subprogram_Specification): The
1408 specification is legal if it is a function that returns an
1409 abstract type, if it comes from an attribute renaming of a stream
1410 attribute of an abstract type.
1412 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1414 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1415 components, check whether recursively check whether the prefix
1416 denotes an unaligned object.
1418 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1420 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1421 the pragma is legal if it is an expanded name that denotes a
1422 procedure that be can called without parameters.
1424 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1426 * gnat_ugn.texi (Performance Considerations) <Vectorization
1427 of loops>: New sub-section. <Other Optimization Switches>:
1430 2011-11-04 Robert Dewar <dewar@adacore.com>
1432 * gnat_rm.texi: Minor reformatting.
1434 2011-11-04 Matthew Heaney <heaney@adacore.com>
1436 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1437 when Target and Source denote same non-empty object
1438 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1440 2011-11-04 Robert Dewar <dewar@adacore.com>
1442 * exp_attr.adb: Minor reformatting.
1444 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1446 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1447 discriminant assignment within an initialization proc if the
1448 record is an unchecked union, as it can only come from the
1449 initialization of an unchecked union component.
1451 2011-11-04 Robert Dewar <dewar@adacore.com>
1453 * gnat_ugn.texi: Minor reformatting.
1455 2011-11-04 Robert Dewar <dewar@adacore.com>
1457 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1460 2011-11-04 Robert Dewar <dewar@adacore.com>
1462 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1465 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1467 * exp_alfa.adb: Add local constant
1468 Disable_Processing_Of_Renamings;
1469 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1470 the name evaluation of object renamings for now.
1471 (Expand_Potential_Renaming): Do not perform the substitution
1473 * exp_util.adb (Remove_Side_Effects): Remove processing for
1474 functions with side effects in Alfa mode.
1476 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1478 * bindgen.adb (Gen_Elab_Calls): In the case
1479 of the AAMP target, set elaboration entities to 1 rather than
1482 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1484 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1485 proper entities on the ancestors of a child unit that appear
1486 in a limited_with clause, follow the unit links because the
1487 units are not analyzed and scope information is incomplete.
1489 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1491 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1492 setting the Atomic_Sync_Required flag to detect one more case.
1493 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1494 setting the Atomic_Sync_Required flag to exclude more cases,
1495 depending on the parent of the node to be examined.
1497 2011-11-04 Bob Duff <duff@adacore.com>
1499 * g-excact.adb: Minor: use named notation.
1501 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1503 * sem_ch5.adb: Improve error messages for illegal iterators.
1505 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1507 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1509 (Expand_Alfa): Alphabetize cases on first choice. Add
1510 processing for object renaming declarations, identifiers and
1512 (Expand_Alfa_N_In): Remove useless return.
1513 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1514 (Expand_Potential_Renaming): New routine.
1515 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1516 (Expand_N_Object_Declaration): Alphabetize local variables. Move
1517 Evaluate_Name out to the top level.
1518 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1519 * exp_util.adb (Remove_Side_Effects): Add processing for
1520 functions with side effects in Alfa mode.
1522 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1524 * gnat_rm.texi: Add entries for
1525 restrictions No_Relative_Delay, No_Requeue_Statements and
1526 No_Stream_Optimizations.
1528 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1530 * sem_ch4.adb: Set type of entity in prefixed call, for
1531 completeness in a generic context.
1533 2011-11-04 Yannick Moy <moy@adacore.com>
1535 * sem_prag.adb: Minor refactoring (renaming of a parameter).
1537 2011-11-04 Robert Dewar <dewar@adacore.com>
1539 * atree.ads: Minor reformatting.
1541 2011-11-04 Robert Dewar <dewar@adacore.com>
1543 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1545 * exp_ch2.adb (Expand_Entity_Reference): Use
1546 Activate_Atomic_Synchronization
1547 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1548 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1549 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1550 Use Activate_Atomic_Synchronization
1551 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1553 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1554 N_Selected_Component node
1556 2011-11-04 Robert Dewar <dewar@adacore.com>
1558 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1560 2011-11-04 Yannick Moy <moy@adacore.com>
1562 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1563 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1564 In ASIS mode, no splitting of aspects between conjuncts.
1565 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1566 expressions refer to the original aspect expressions through
1567 the Original_Node link. This is used in semantic analysis for
1568 ASIS mode, so that the original expression also gets analyzed.
1569 * sem_prag.adb (Preanalyze_TC_Args,
1570 Check_Precondition_Postcondition,
1571 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1572 generated from a source aspect, also analyze the original aspect
1574 (Check_Expr_Is_Static_Expression): New procedure
1575 similar to existing procedure Check_Arg_Is_Static_Expression,
1576 except called on expression inside pragma.
1578 2011-11-04 Tristan Gingold <gingold@adacore.com>
1580 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1581 Find_Project.Try_Path_Name.
1582 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1584 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1586 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1588 2011-11-04 Pascal Obry <obry@adacore.com>
1590 * projects.texi: Add short description for qualifiers aggregate
1591 and aggregate library.
1593 2011-11-04 Matthew Heaney <heaney@adacore.com>
1595 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1596 * a-cgaaso.adb: Replaced implementation with instantiation
1598 * a-cogeso.ad[sb] This is the new Ada 2012 unit
1599 Ada.Containers.Generic_Sort
1601 2011-11-04 Robert Dewar <dewar@adacore.com>
1603 * exp_ch2.adb (Expand_Entity_Reference): Do not set
1604 Atomic_Sync_Required for the case of a prefix of an attribute.
1605 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1606 atomic synchronization
1607 (Expand_N_Indexed_Component): Ditto.
1608 (Expand_B_Selected_Component): Ditto.
1609 * sem_prag.adb (Process_Suppress_Unsuppress):
1610 Disable/Enable_Atomic_Synchronization can now occur for array
1611 types with pragma Atomic_Components.
1612 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1613 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1615 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1617 * gnat_ugn.texi: Editorial corrections for gnattest section.
1619 2011-11-04 Robert Dewar <dewar@adacore.com>
1621 * sem_prag.adb: Minor reformatting.
1622 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1624 * exp_ch2.adb (Expand_Entity_Reference): Only set
1625 Atomic_Sync_Required on entities that are variables. Doesn't
1626 make any sense on anything else.
1628 2011-11-04 Robert Dewar <dewar@adacore.com>
1630 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1631 atomic sync to type case.
1632 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1635 2011-11-04 Robert Dewar <dewar@adacore.com>
1637 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1639 * gcc-interface/Make-lang.in: Update dependencies.
1641 2011-11-04 Robert Dewar <dewar@adacore.com>
1643 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1646 2011-11-04 Matthew Heaney <heaney@adacore.com>
1648 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1649 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1650 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1651 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1652 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1653 a-sulcin.ad[sb]: New files.
1655 2011-11-04 Geert Bosch <bosch@adacore.com>
1657 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1658 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1659 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1660 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1661 * gcc-interface/Makefile.in: Remove libgnala and related objects.
1663 2011-11-04 Matthew Heaney <heaney@adacore.com>
1665 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1666 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1667 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1668 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1671 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1673 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1674 that the type of the parameters isn't dummy in type_annotate_only mode.
1676 2011-11-04 Robert Dewar <dewar@adacore.com>
1678 * sem_ch12.adb: Minor reformatting
1680 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1682 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1683 initialize elaboration entities to zero when specs are processed.
1685 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
1686 Eric Botcazou <ebotcazou@adacore.com>
1689 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1690 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1692 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
1695 * gcc-interface/Makefile.in (SYMDEPS): Delete.
1696 (LIBICONV): New variable.
1697 (LIBICONV_DEP): Likewise.
1698 (LIBS): Add $(LIBICONV).
1699 (LIBDEPS): Add $(LIBICONV_DEP).
1700 (EXTRA_GNATTOOLS_OBJS): Merge into...
1701 (TOOLS_LIBS): ...this. Add $(LIBICONV).
1703 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1705 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1706 variable. Always create the elaboration variable, if any, as constant.
1708 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1710 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1711 make a packable type for fields of union types as well.
1712 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1713 (gnat_to_gnu_component_type): Try to make a packable type for fields
1714 of union types as well.
1715 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1716 (maybe_pad_type): Try to make a packable type for fields of union types
1718 (gnat_to_gnu_field): Likewise.
1719 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1720 (set_rm_size): Likewise.
1721 (rm_size): Likewise.
1722 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1723 * gcc-interface/trans.c (add_decl_expr): Likewise.
1724 * gcc-interface/utils.c (finish_record_type): Likewise.
1725 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1727 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1729 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1730 declared as atomic. Move around conditionally executed code.
1732 2011-10-24 Robert Dewar <dewar@adacore.com>
1734 * sem.adb (Initialize): Fix bug that blew up if called a second time.
1736 2011-10-24 Robert Dewar <dewar@adacore.com>
1738 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1739 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1741 2011-10-24 Robert Dewar <dewar@adacore.com>
1743 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1746 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1748 * gnat_rm.texi: Add an entry for restriction No_Finalization.
1750 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1752 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
1753 current instance is within the one that contains the generic,
1754 the freeze node for the current one must appear in the current
1755 declarative part. Ditto if the current instance is within another
1756 package instance. In both of these cases the freeze node of the
1757 previous instance is not relevant.
1759 2011-10-24 Gary Dismukes <dismukes@adacore.com>
1761 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1762 of AAMP-specific switches -univ and -aamp_target.
1764 2011-10-24 Robert Dewar <dewar@adacore.com>
1766 * a-tienau.adb (Put): Deal properly with limited line length.
1768 2011-10-24 Robert Dewar <dewar@adacore.com>
1770 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1772 2011-10-24 Tristan Gingold <gingold@adacore.com>
1774 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1777 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1779 * sem_ch12.adb (Earlier): make available globally. If both
1780 nodes have the same sloc, the freeze node that does not come
1781 from source is the later one.
1782 (True_Parent): Make available globally.
1783 (Previous_Instance): Subsidiary of
1784 Insert_Freeze_Node_For_Instance, to check whether the generic
1785 parent of the current instance is declared within a previous
1786 instance in the same unit or declarative part, in which case the
1787 freeze nodes of both instances must appear in order to prevent
1788 elaboration problems in gigi.
1789 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1790 freeze point, and the freeze node of a preceding instantiation
1791 must be inserted before it.
1793 2011-10-24 Robert Dewar <dewar@adacore.com>
1795 * checks.ads, checks.adb: Add handling of Synchronization_Check
1796 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1798 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1799 flag Minor code reorganization.
1800 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1801 * par-prag.adb: Add dummy entries for pragma
1802 Disable/Enable_Atomic_Synchronization.
1803 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1804 case of Atomic_Synchronization specially (not suppressed
1805 by All_Checks, cannot be set from Source).
1806 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1807 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1808 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1809 entry for pragma Disable/Enable_Atomic_Synchronization
1810 * switch-c.adb: The -gnatp switch does not disable
1811 Atomic_Synchronization Add -gnatep switch to disable
1812 Atomic_Synchronization.
1813 * types.ads: Add entry for Synchronization_Check
1814 * usage.adb: Add line for -gnated switch
1815 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1817 2011-10-24 Geert Bosch <bosch@adacore.com>
1819 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1822 2011-10-24 Robert Dewar <dewar@adacore.com>
1824 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
1826 2011-10-24 Robert Dewar <dewar@adacore.com>
1828 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
1829 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
1831 2011-10-24 Emmanuel Briot <briot@adacore.com>
1833 * prj-proc.adb (Process_Expression_Variable_Decl): No special
1834 handling for Project_Path unless it is an attribute.
1836 2011-10-24 Javier Miranda <miranda@adacore.com>
1838 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
1839 (Install_Hidden_Primitives): New subprogram.
1840 (Restore_Hidden_Primitives): New subprogram.
1841 (Analyze_Formal_Package_Declaration,
1842 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
1843 Invoke Check_Hidden_Primitives after every call to
1844 Analyze_Associations, and invoke Restore_Hidden_Primitives to
1845 restore their visibility after processing the instantiation.
1846 (Instantiate_Package_Body): Install visible primitives before
1847 analyzing the instantiation and uninstall them to restore their
1848 visibility when the instantiation has been analyzed.
1849 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
1850 (Remove_Suffix): New subprogram
1851 * sem_ch3.adb (Derive_Subprogram): When handling
1852 a derived subprogram for the instantiation of a formal derived
1853 tagged type, inherit the dispatching attributes from the actual
1854 subprogram (not from the parent type).
1856 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
1858 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
1860 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1862 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
1864 (Build_Discriminant_Assignments): Add local variable D_Loc and update
1866 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
1867 Var_Loc and update their uses.
1868 (Build_Record_Init_Proc): Code reformatting.
1869 (Increment_Counter): Add formal parameter Loc.
1870 (Make_Counter): Add formal parameter Loc.
1872 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
1874 * sem_disp.adb (Covers_Some_Interface): Fix typo.
1876 2011-10-24 Matthew Heaney <heaney@adacore.com>
1878 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
1881 2011-10-24 Yannick Moy <moy@adacore.com>
1883 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
1884 Translate arguments in positional notation into pragma argument
1885 association arguments for the generated pragma.
1887 2011-10-24 Arnaud Charlet <charlet@adacore.com>
1889 * exp_ch5.adb: Fix minor typo.
1891 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1893 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
1894 the case of a component reference in an instance body, when the
1895 enclosing type is private.
1897 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
1899 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
1900 driver for getting the project support into gnatelim section.
1902 2011-10-24 Robert Dewar <dewar@adacore.com>
1904 * gnat_rm.texi: Minor correction to documentation on address clause.
1906 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1908 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
1909 (Attach_Unprotected): New routine.
1910 (Delete_Finalize_Address): Removed.
1911 (Delete_Finalize_Address_Unprotected): New routine.
1912 (Detach): Synchronize and call the unprotected version.
1913 (Detach_Unprotected): Remove locking.
1914 (Finalize): Add various comment on synchronization. Lock the critical
1915 region and call the unprotected versions of routines.
1916 (Finalize_Address): Removed.
1917 (Finalize_Address_Unprotected): New routine.
1918 (Set_Finalize_Address): Synchronize and call
1919 the unprotected version.
1920 (Set_Finalize_Address_Unprotected): New routine.
1921 (Set_Heterogeneous_Finalize_Address): Removed.
1922 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
1923 (Set_Is_Heterogeneous): Add comment on synchronization and
1925 * s-finmas.ads: Flag Finalization_Started is no longer atomic
1926 because synchronization uses task locking / unlocking.
1927 (Attach): Add comment on usage.
1928 (Attach_Unprotected): New routine.
1929 (Delete_Finalize_Address): Renamed to
1930 Delete_Finalize_Address_Unprotected.
1931 (Detach): Add comment on usage.
1932 (Detach_Unprotected): New routine.
1933 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
1934 (Set_Finalize_Address): Add comment on usage.
1935 (Set_Finalize_Address_Unprotected): New routine.
1936 (Set_Heterogeneous_Finalize_Address): Renamed to
1937 Set_Heterogeneous_Finalize_Address_Unprotected.
1938 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
1939 Allocation_Locked. Add various comments on synchronization. Lock
1940 the critical region and call the unprotected version of
1942 (Deallocate_Any_Controlled): Add various comments on
1943 synchronization. Lock the critical region and call the unprotected
1944 version of routines.
1946 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1948 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
1949 are universal and must carry the corresponding type.
1950 * sem_eval.adb (Check_Non_Static_Context): If the type of the
1951 expression is universal real, as may be the case for a fixed point
1952 expression with constant operands in the context of a conversion,
1953 there is nothing to check.
1954 * s-finmas.adb: Minor reformatting
1956 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
1958 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1960 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1962 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1963 TRACE): Reintroduce.
1964 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1965 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1967 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1969 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1970 (unchecked_conversion_nop): Use it.
1971 (gnat_to_gnu): Likewise.
1973 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1975 * back_end.adb (Call_Back_End): Pass the maximum logical line number
1976 instead of the maximum physical line number to gigi.
1977 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1979 2011-10-16 Tom Tromey <tromey@redhat.com>
1980 Dodji Seketeli <dodji@redhat.com>
1982 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1983 public ordinary map interface.
1985 2011-10-16 Tristan Gingold <gingold@adacore.com>
1987 * link.c (_AIX): Add support for GNU ld.
1989 2011-10-16 Fedor Rybin <frybin@adacore.com>
1991 * gnat_ugn.texi: Fixing gnattest example names in the doc.
1992 Adding explanation to additional tests usage.
1994 2011-10-16 Robert Dewar <dewar@adacore.com>
1996 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1998 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
2000 * a-convec.adb: Fix minor inconsistencies.
2002 2011-10-16 Matthew Heaney <heaney@adacore.com>
2004 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
2005 Implementation): Specify pragma Implementation_Defined.
2007 2011-10-15 Nicolas Roche <roche@adacore.com>
2009 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
2010 either rtp-smp or ravenscar-cert-rtp runtimes.
2012 2011-10-15 Bob Duff <duff@adacore.com>
2014 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2015 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
2017 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
2018 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
2020 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
2021 pool only if RE_Root_Storage_Pool_Ptr is available.
2022 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
2023 pool actual unless RE_Root_Storage_Pool_Ptr is available.
2024 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
2025 formal only if RE_Root_Storage_Pool_Ptr is available.
2027 2011-10-15 Matthew Heaney <heaney@adacore.com>
2029 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
2030 type): Specify Priority aspect for protected type.
2032 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2034 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
2035 is a generic actual, it is a subtype of a type that was frozen
2036 by the instantiation, and even if not marked frozen it does not
2037 affect the construction of the dispatch table.
2039 2011-10-14 Robert Dewar <dewar@adacore.com>
2041 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
2043 * s-rident.ads: Add missing Compiler_Unit pragma.
2045 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2047 * sem_res.adb: Minor reformatting.
2049 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2051 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2052 Code and comment reformatting. Use BIP_Task_Master
2053 when creating a _master.
2054 (BIP_Formal_Suffix): Code reformatting. Correct the case for
2056 (Make_Build_In_Place_Call_In_Object_Declaration): Use
2057 BIP_Task_Master when creating a reference to the enclosing
2058 function's _master formal.
2059 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
2061 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
2062 (Needs_BIP_Finalization_Master): Alphabetized.
2063 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
2066 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2068 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
2069 reject an aliased keyword on the object declaration of an extended
2070 return statement. In older versions of the language indicate
2071 that this is illegal in the standard.
2073 2011-10-14 Pascal Obry <obry@adacore.com>
2075 * sem_util.adb, sem_ch4.adb: Minor reformatting.
2077 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2079 * sem_ch13.adb: Recognize properly procedure calls that are
2080 transformed into code statements.
2082 2011-10-14 Vincent Celier <celier@adacore.com>
2084 * projects.texi: Minor fix in project example.
2086 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2088 * sem_util.adb: Return objects are aliased if their type is
2089 immutably limited as per AI05-0053.
2091 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2093 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
2094 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
2095 Short_Circuit_And_Or expansion code (moved to sem_res).
2096 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
2097 "and" and "or" operators as short-circuit "and then" and "or
2098 else", when pragma Short_Circuit_And_Or is active.
2100 2011-10-13 Robert Dewar <dewar@adacore.com>
2102 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
2103 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2105 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2107 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
2109 2011-10-13 Jerome Guitton <guitton@adacore.com>
2111 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
2113 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2115 * a-convec.ads (Cursor): Minor reformatting.
2116 * a-convec.adb (Next): Fix minor inconsistencies.
2117 (Previous): Likewise.
2119 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2121 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
2122 New predicate to determine whether some operations on an array
2123 type are available when the full view of its component may differ
2124 from the view of the point of the array declaration.
2125 * sem_ch4.adb (Find_Equality_Types): Use
2126 Available_Full_View_Of_Component.
2127 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
2129 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2131 * sem_ch9.adb: Analyze aspects while discriminants of protected
2134 2011-10-13 Geert Bosch <bosch@adacore.com>
2136 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
2137 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
2138 longer depend on an external library.
2139 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
2140 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
2141 Update dependencies.
2142 * gcc-interface/Make-lang.in: Update dependencies.
2144 2011-10-13 Cyrille Comar <comar@adacore.com>
2146 * gnat_ugn.texi: Minor editing.
2148 2011-10-13 Vincent Celier <celier@adacore.com>
2150 * projects.texi: Add documentation on packages and attributes
2151 that are inherited from a project being extended into the
2154 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2156 * exp_ch3.adb (Build_Master): Rewritten.
2157 (Expand_N_Full_Type_Declaration): Reformat the declarative
2158 region. Update the call to Build_Master_Renaming.
2159 (Expand_Previous_Access_Type): Rewritten.
2160 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2161 Add local constant Result_Subt and update related usage.
2162 (Expand_N_Extended_Return_Statement): Add local constant
2163 Result_Subt and update related usage.
2164 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
2165 new context detection mechanism.
2166 (Build_Class_Wide_Master):
2167 Use Insert_Action to add the renaming into the tree.
2168 (Build_Master_Entity): Rewritten to use the new context detection
2170 (Build_Master_Renaming): Add formal parameter Ins_Nod
2171 and related usage. Use Insert_Action to add the renaming into the
2173 (Find_Enclosing_Context): New subsidiary routine. Rather
2174 than relying on enclosing scopes, this routine looks at the
2175 tree structure to figure out the proper context for a _master
2176 or a _chain. This approach eliminates the issues with transient
2177 scopes which have not been converted into blocks.
2178 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
2179 to better reflect the new usage. Update the related comment.
2180 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
2181 the comment on usage.
2182 * sem_ch3.adb (Access_Definition): Update the calls to
2183 Build_Master_Entity and Build_Master_Renaming.
2184 * sem_ch6.adb (Create_Extra_Formals): Add local variable
2185 Full_Subt. Code reformatting.
2186 * sem_util.adb (Is_Iterator): Alphabetized.
2187 (Is_LHS): Alphabetized.
2188 (Is_Limited_Class_Wide_Type): New routine.
2189 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
2191 2011-10-13 Geert Bosch <bosch@adacore.com>
2193 * a-ngrear.adb (Solve): Make generic and move to
2194 System.Generic_Array_Operations.
2195 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2196 New generic solvers to compute a vector resp. matrix Y such
2197 that A * Y = X, approximately.
2198 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2199 Implement using Forward_Eliminate and Back_Substitute
2200 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
2202 * a-ngcoar.ads ("abs"): Fix return type to be real.
2204 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2207 * s-linux-alpha.ads: Do not "with" Interfaces.C.
2208 * s-linux-sparc.ads: Likewise.
2210 2011-10-13 Geert Bosch <bosch@adacore.com>
2212 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
2214 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
2216 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
2219 2011-10-13 Geert Bosch <bosch@adacore.com>
2221 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2222 move to System.Generic_Array_Operations.
2224 2011-10-13 Geert Bosch <bosch@adacore.com>
2226 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2227 * s-gearop.ads (L2_Norm): Change profile to be suitable for
2229 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2232 2011-10-13 Robert Dewar <dewar@adacore.com>
2234 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2235 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2236 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2237 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2238 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2239 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2241 2011-10-13 Geert Bosch <bosch@adacore.com>
2243 * s-gearop.adb: Minor comment additions.
2245 2011-10-13 Fedor Rybin <frybin@adacore.com>
2247 * gnat_ugn.texi: Add gnattest section.
2249 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2251 * freeze.adb: Do not create body of renaming if declaration has
2254 2011-10-13 Olivier Hainque <hainque@adacore.com>
2256 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2257 further, to the ppc+kernel case only.
2259 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2261 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2262 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2263 Do not create a pool formal on .NET/JVM.
2264 (Expand_N_Extended_Return_Statement): Alphabetize local
2265 variables. Do not create a renaming of the build-in-place pool
2266 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
2267 Add the user-defined pool only on non-VM targets.
2268 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2269 local variables. Do not add a pool actual on .NET/JVM.
2270 * sem_ch6.adb: Add with and use clause for Targparm.
2271 (Create_Extra_Formals): Add build-in-place pool formal only on
2273 * rtsfind.ads: Alphabetize entries.
2275 2011-10-13 Sergey Rybin <rybin@adacore.com>
2277 * gnat_ugn.texi: Minor correction.
2279 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2281 * sem_ch8.adb: Minor error message improvement.
2283 2011-10-13 Robert Dewar <dewar@adacore.com>
2285 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2287 2011-10-13 Gary Dismukes <dismukes@adacore.com>
2289 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2290 of a for loop for an enumeration type with an enumeration rep
2291 clause, which involves moving the original loop parameter into
2292 a nested block, the loop parameter's entity must be removed from
2293 the entity list of the loop scope.
2295 2011-10-13 Bob Duff <duff@adacore.com>
2297 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2298 that gets passed in the same cases where BIP_Alloc_Form is passed
2299 (caller-unknown-size results). BIP_Storage_Pool is used when
2300 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
2301 to the user-defined storage pool is passed at the call site,
2302 and this pool is used in callee to allocate the result.
2303 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2304 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2305 the additional BIP_Storage_Pool actual.
2306 (Expand_N_Extended_Return_Statement): Allocate the function
2307 result using the user-defined storage pool, if BIP_Alloc_Form =
2309 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2310 * exp_ch4.adb: Don't overwrite storage pool set by
2311 Expand_N_Extended_Return_Statement.
2312 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2313 for use in build-in-place function calls within allocators
2314 where the access type has a user-defined storage pool.
2316 2011-10-13 Sergey Rybin <rybin@adacore.com>
2318 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2321 2011-10-13 Nicolas Roche <roche@adacore.com>
2323 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2326 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2328 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2329 account that an unchecked union type can be limited.
2331 2011-10-13 Olivier Hainque <hainque@adacore.com>
2333 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2334 the use of the signal trampoline for PPC in the sjlj case as well.
2335 Add legitimate casts, preventing compile time warnings on the
2336 (sighandler *) profile.
2338 2011-10-13 Yannick Moy <moy@adacore.com>
2340 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2343 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2345 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2346 expressions are legal limited return values if each one of their
2347 dependent expressions are legal.
2349 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2351 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2352 if the prefix of the call is a qualified expression, rewrite as
2354 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2355 code statement is legal if it is a rewriting of a procedure call.
2357 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2359 * exp_aggr.adb (Flatten): If a component association has a box,
2360 assume that aggregate is not static.
2361 (Safe_Aggregate): If a component association in a non-limited
2362 aggregate has a box, assume that it cannot be expanded in place.
2364 2011-10-13 Vincent Celier <celier@adacore.com>
2366 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2367 Process_Project_Tree_Phase_1 with Packages_To_Check.
2368 (Process_Project_And_Apply_Config): Ditto
2369 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2370 Remove default for argument Packages_To_Check.
2371 * prj-proc.adb (Recursive_Process): New argument
2374 (Process_Project_Tree_Phase_1): Ditto.
2375 (Recursive_Project.Process_Aggregated_Projects): Call
2376 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2378 * prj-proc.ads (Process): New argument Packages_To_Check
2379 (Process_Project_Tree_Phase_1): Ditto
2381 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2383 * gcc-interface/Makefile.in: Fix typo.
2385 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2387 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2388 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
2389 Use sloc of defining identifier of farmal type declaration,
2390 as sloc of generated internal entity, to prevent misplaced
2393 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2395 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2396 is fully defined before checking that it is a numeric type.
2398 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2400 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2401 association for component X has a box, then X is covered in the
2402 aggregate even if there is not default value for X in the type
2403 declaration, and X has to be default-initialized.
2405 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2407 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2408 literals as referenced only if reference is in current source unit.
2410 2011-10-13 Matthew Heaney <heaney@adacore.com>
2412 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2414 2011-10-13 Olivier Hainque <hainque@adacore.com>
2416 * sigtramp.h: New file. Prototype and spec of the signal
2417 trampoline to be called by an established handler to provide
2418 dwarf call frame info before the real signal processing code.
2419 * sigtramp-ppcvxw.c: New file. Implementation of the signal
2420 trampoline for ppc-vxworks.
2421 * init.c (vxworks section): Use it for ppc.
2423 2011-10-13 Thomas Quinot <quinot@adacore.com>
2425 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2426 (Check_Future_Identifier): New subprogram,
2427 factors duplicated code from Par.Ch2.P_Identifier and
2428 Par.Ch3.P_Defining_Identifier.
2430 2011-10-13 Thomas Quinot <quinot@adacore.com>
2432 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2433 if we fail to initialize CV attributes or CV.
2435 2011-10-13 Thomas Quinot <quinot@adacore.com>
2437 * s-tasren.adb (Timed_Selective_Wait, case
2438 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2439 we know abortion is already deferred.
2441 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2443 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2444 (Build_Master_Renaming (function)): Removed.
2445 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2446 (Expand_Full_Type_Declaration): Alphabetize
2447 variables. Reformatting of code and comments. Rewrite the
2448 section on processing of anonymous access-to-task types in
2450 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2451 (Build_Master_Renaming): Moved to exp_ch9.
2452 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2453 (Build_Master_Entity): Add formal parameter
2454 Use_Current. Reformatting of code and comments.
2455 (Build_Master_Renaming): Moved from exp_ch3.
2456 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2457 exp_ch3. Update comment on usage.
2458 (Build_Master_Entity):
2459 Add formal parameter Use_Current. Update comment on usage.
2460 (Build_Master_Renaming): Moved from exp_ch3.
2461 * sem_ch3.adb (Access_Definition): Remove redundant code to
2462 create a _master and a renaming.
2464 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2466 * lib-xref.adb: Do no emit reference to overridden operation,
2467 if it is internally generated.
2469 2011-10-13 Vincent Celier <celier@adacore.com>
2471 * bindgen.adb: Remove any processing related to g-trasym
2472 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2473 * mlib-prj.adb: Remove any processing related to g-trasym.
2475 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2477 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2478 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2479 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2480 (ADA_FLAGS_TO_PASS): Likewise.
2481 (COMMON_FLAGS_TO_PASS): New.
2482 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
2483 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2484 (gnatlib): Use COMMON_FLAGS_TO_PASS.
2485 (ada.install-common): Likewise.
2486 (install-gnatlib): Likewise.
2487 (install-gnatlib-obj): Likewise.
2488 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2489 (gnat-cross): Delete.
2490 (gnatboot): Likewise.
2491 (gnatboot2): Likewise.
2492 (gnatboot3): Likewise.
2493 (gnatstage1): Likewise.
2494 (gnatstage2): Likewise.
2495 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2496 (MOST_ADAFLAGS): Likewise.
2497 (LOOSE_CFLAGS): Likewise.
2498 (gnat-cross): Likewise.
2499 (GNATLIBFLAGS): Add -W -Wall.
2500 (GNATLIBCFLAGS_FOR_C): Likewise.
2501 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
2502 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2504 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2506 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2507 (push_range_check_info): Likewise.
2508 (gnat_to_gnu) <N_Code_Statement>: Likewise.
2509 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2510 (gnat_invariant_expr): Likewise.
2511 * gcc-interface/utils.c (compute_related_constant): Likewise.
2512 (max_size): Fix handling of SAVE_EXPR.
2513 (remove_conversions): Fix formatting.
2515 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2517 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2518 (DECL_INDUCTION_VAR): New macro.
2519 (SET_DECL_INDUCTION_VAR): Likewise.
2520 * gcc-interface/gigi.h (convert_to_index_type): Declare.
2521 (gnat_invariant_expr): Likewise.
2522 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2523 parameter, set DECL_LOOP_PARM_P on it.
2524 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2525 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2526 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2527 (struct range_check_info_d): New type.
2528 (struct loop_info_d): Likewise.
2529 (gnu_loop_stack): New stack.
2530 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2531 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
2532 is set, do not test DECL_RENAMED_OBJECT.
2533 (push_range_check_info): New function.
2534 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2535 the label. Reference the label and the iteration variable from it.
2536 Build the special induction variable in the unsigned version of the
2537 size type, if it is larger than the base type. And attach it to the
2538 iteration variable if the latter isn't by-ref. In the iteration scheme
2539 case, initialize the invariant conditions in front of the loop if
2540 deemed profitable. Use gnu_loop_stack.
2541 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2542 <N_Raise_Constraint_Error>: Always process the reason. In the range
2543 check and related cases, and if loop unswitching is enabled, compute
2544 invariant conditions and push this information onto the stack.
2545 Do not translate again the condition if it has been already translated.
2546 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2547 DECL_LOOP_PARM_P isn't set.
2548 (convert_to_index_type): New function.
2549 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2550 to convert the index from the base index type to sizetype.
2551 (gnat_invariant_expr): New function.
2553 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2555 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2556 two parallel arrays to hold standard builtin declarations, and
2557 replace it with a function based interface that can support
2558 creating builtins on the fly in the future.
2559 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2560 (gnat_to_gnu): Ditto.
2562 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2565 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2566 * gcc-interface/utils.c (global_context): New variable.
2567 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2568 that are either public external or at top level. Use "No" macro.
2569 (end_subprog_body): Call decl_function_context.
2570 (rest_of_subprog_body_compilation): Likewise.
2572 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2574 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2575 (rest_of_subprog_body_compilation): Likewise.
2576 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2577 test for useless conversions by means of gnat_useless_type_conversion.
2578 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2579 (language_function): Add named_ret_val and other_ret_val.
2580 (f_named_ret_val): New macro.
2581 (f_other_ret_val): Likewise.
2582 (gigi): Call rest_of_subprog_body_compilation.
2583 (struct nrv_data): New structure.
2584 (is_nrv_p): New predicate.
2585 (prune_nrv_r): New helper function.
2586 (prune_nrv_in_block): New function.
2587 (finalize_nrv_r): New helper function.
2588 (finalize_nrv): New function.
2589 (return_value_ok_for_nrv_p): New predicate.
2590 (build_return_expr): If optimization is enabled, record candidates for
2591 the Named Return Value optimization.
2592 (build_function_stub): Call rest_of_subprog_body_compilation.
2593 (Subprogram_Body_to_gnu): If optimization is enabled and there are
2594 candidates, finalize the Named Return Value optimization.
2595 Call rest_of_subprog_body_compilation.
2596 (call_to_gnu): At the end, if a return value is needed, simplify the
2597 result before wrapping it up in a COMPOUND_EXPR.
2598 * gcc-interface/utils.c (end_subprog_body): Split into...
2599 (rest_of_subprog_body_compilation): ...this. New function.
2600 (gnat_useless_type_conversion): Likewise.
2602 2011-10-06 Thomas Quinot <quinot@adacore.com>
2604 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2605 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2606 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2607 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2608 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2609 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2610 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2611 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2613 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2615 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2618 2011-10-06 Matthew Heaney <heaney@adacore.com>
2620 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2621 (Dequeue_Only_High_Priority): Protected procedure now implemented.
2623 2011-10-06 Vincent Celier <celier@adacore.com>
2625 * g-trasym.adb: Replace old implementation with the default
2626 implementation that returns list of addresses as "0x...".
2627 * g-trasym.ads: Update the list of platforms with the full
2628 capability. Indicate that there is a default implementation
2629 for other platforms.
2630 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2631 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2632 is now a default implementation for all platforms without the full
2635 2011-10-06 Robert Dewar <dewar@adacore.com>
2637 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2638 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2639 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2640 reorganization (use conditional expressions).
2642 2011-10-06 Robert Dewar <dewar@adacore.com>
2644 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2645 floating divide by zero.
2647 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2649 * sem_ch6.adb: Limited interfaces that are not immutably limited
2650 are OK in return statements.
2652 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
2654 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2655 change to powerpc section.
2657 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
2659 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2662 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2664 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2665 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2666 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2668 * a-coorma.ads: Minor reformmating.
2669 * einfo.ads: Improve the comment describing the
2670 Directly_Designated_Type function.
2671 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2673 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2676 2011-09-27 Robert Dewar <dewar@adacore.com>
2678 * a-comutr.ads: Minor reformatting.
2680 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2682 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2683 iterators to multiway trees.
2685 2011-09-27 Yannick Moy <moy@adacore.com>
2687 * debug.adb (d.D): New option for strict Alfa mode.
2688 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2689 permissions as strictly as possible.
2690 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2691 Alfa mode, now, interpret ranges of base types like GNAT does; in
2692 strict mode, simply change the range of the implicit base Itype.
2693 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2695 2011-09-27 Robert Dewar <dewar@adacore.com>
2697 * exp_ch9.adb: Minor comment fixes.
2699 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2701 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2704 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2706 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2707 instead of Directly_Designated_Type in the indirect array case.
2709 2011-09-27 Robert Dewar <dewar@adacore.com>
2711 * exp_util.adb, exp_aggr.adb: Minor reformatting.
2713 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2715 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2716 on subtype declarations.
2717 * exp_aggr.adb: Minor comment update.
2719 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2721 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2722 test in the N_Explicit_Dereference case. Fold double logical
2723 negation in the special loop case and conditionalize it on
2724 Variable_Ref being true.
2726 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2728 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2729 single protected object and the selector is a discriminant or an
2730 entry family, this is a non-overloaded candidate interpretation,
2731 and possible primitive operations of the type must not be
2734 2011-09-27 Arnaud Charlet <charlet@adacore.com>
2736 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2738 2011-09-27 Pascal Obry <obry@adacore.com>
2740 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2741 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2742 Add dummy definitions for pthread_rwlock_t
2743 and pthread_rwlockattr_t on all POSIX platforms.
2744 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2746 (Finalize_Lock): Likewise.
2747 (Write_Lock): Likewise.
2750 2011-09-27 Tristan Gingold <gingold@adacore.com>
2752 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2755 2011-09-27 Pascal Obry <obry@adacore.com>
2757 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2758 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2759 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2760 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2761 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2762 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2763 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2764 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2765 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2766 s-taprop-posix.adb: Revert previous changes.
2767 (Lock): Now a record containing the two possible lock
2768 (mutex and read/write) defined in OS_Interface.
2769 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2771 (Initialize_Protection): Likewise.
2773 (Lock_Read_Only): Likewise.
2776 2011-09-27 Pascal Obry <obry@adacore.com>
2778 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2779 OS_Interface.pthread_rwlock_t.
2781 2011-09-27 Robert Dewar <dewar@adacore.com>
2783 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2784 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2785 sem_ch5.adb, sem_util.adb: Minor reformatting.
2787 2011-09-27 Pascal Obry <obry@adacore.com>
2789 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2790 (Finalize_Lock)[RW_Lock]: Likewise.
2791 (Write_Lock)[RW_Lock]: Likewise.
2792 (Unlock)[RW_Lock]: Likewise.
2793 (Read_Lock): Define L as RW_Lock (instead of Lock).
2794 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2795 routine for r/w lock.
2796 (Finalize_Lock)[RW_Lock]: Likewise.
2797 (Write_Lock)[RW_Lock]: Likewise.
2798 (Unlock)[RW_Lock]: Likewise.
2799 (Read_Lock): Define L as RW_Lock (instead of Lock).
2801 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2802 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2803 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2804 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2805 routine for standard lock.
2806 (Finalize_Lock)[RW_Lock]: Likewise.
2807 (Write_Lock)[RW_Lock]: Likewise.
2808 (Unlock)[RW_Lock]: Likewise.
2809 (Read_Lock): Define L as RW_Lock (instead of Lock).
2810 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2811 in the record definition.
2812 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2813 lock for 'R' locking policy.
2814 (Initialize_Protection): Likewise.
2816 (Lock_Read_Only): Likewise.
2818 * s-taspri-posix.ads (RW_Lock): New type defined as
2819 OS_Interface.pthread_rwlock_t.
2821 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2822 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2823 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
2824 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
2826 2011-09-27 Pascal Obry <obry@adacore.com>
2828 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
2830 2011-09-27 Pascal Obry <obry@adacore.com>
2832 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2833 s-osinte-hpux.ads, s-osinte-irix.ads,
2834 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
2836 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
2837 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
2838 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
2839 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
2840 pthread_rwlock_destroy, pthread_rwlock_rdlock,
2841 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
2843 2011-09-27 Pascal Obry <obry@adacore.com>
2845 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2846 (RE_Id): Add RE_Lock_Read_Only.
2847 (RE_Unit_Table): Likewise.
2848 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
2849 to lift restriction on first character. Handle now the
2850 Name_Concurrent_Readers_Locking where policy character is set to
2852 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
2854 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
2855 read only lock for function in protected object.
2856 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
2857 this routine is now used.
2859 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2861 * s-atocou-x86.adb (Decrement): Use %;.
2862 (Increment): Likewise.
2864 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2866 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
2867 dereference of the pointer to the storage area. Remove useless type
2868 conversions and factor out common code.
2870 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2872 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
2873 variable and use it throughout.
2874 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
2875 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
2876 first step. Also convert to the unpadded type as a last step.
2878 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2880 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
2881 DECL_CHAIN in comment.
2882 * gcc-interface/trans.c (gigi): Likewise.
2883 (Attribute_to_gnu): Likewise.
2884 (build_function_stub): Likewise.
2885 (gnat_to_gnu): Likewise.
2886 * gcc-interface/utils.c (create_subprog_decl): Likewise.
2887 (convert_vms_descriptor64): Likewise.
2888 (convert_vms_descriptor32): Likewise.
2890 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2892 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
2893 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
2894 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
2895 the type of the record is TYPE_READONLY.
2897 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2898 Robert Dewar <dewar@adacore.com>
2900 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
2901 OUT formal parameter which is of an null-exclusion access subtype.
2903 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2905 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
2906 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
2907 (gnat_to_gnu_param): Likewise.
2908 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
2909 maybe_unconstrained_array instead of doing the work manually.
2910 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
2911 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
2912 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
2913 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
2914 (gnat_stabilize_reference): Likewise.
2916 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2918 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
2919 (SET_TYPE_NULL_BOUNDS): Likewise.
2920 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
2921 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
2922 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
2924 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
2925 check that the initializer is a valid constant expression for use in
2926 initializing a static variable. Add missing guard.
2927 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
2928 (convert_to_fat_pointer): In the null fat pointer case, build a valid
2929 pointer for the bounds.
2930 * gcc-interface/utils2.c (compare_fat_pointers): New function.
2931 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
2933 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2935 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
2936 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
2937 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
2938 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
2939 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
2940 to the indirect case.
2941 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
2942 the TREE_THIS_NOTRAP flag.
2944 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2946 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
2947 iteration scheme, always generate the do-while form if optimization
2948 is enabled. Use more straightforward test at the end.
2950 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2952 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
2953 XNEW instead of xmalloc. Do not build useless pointer type.
2954 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2955 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2956 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2958 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2960 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2961 the alignment if this doesn't prevent BLKmode access to the object.
2963 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
2965 * gcc-interface/Makefile.in (darwin): Do not issue the
2966 '-flat_namespace' linker flag during Ada build.
2967 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2968 default shared library options.
2970 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
2972 * gcc-interface/decl.c (annotate_value): Look up expression for
2973 insertion in the cache at the end.
2975 2011-09-19 Arnaud Charlet <charlet@adacore.com>
2977 * gcc-interface/Make-lang.in: Update dependencies.
2979 2011-09-19 Steve Baird <baird@adacore.com>
2981 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2982 configuration pragma names so that Is_Configuration_Pragma_Name
2983 will return True for Name_Annotate. Make corresponding change in
2984 Pragma_Id enumeration type. This is needed to allow an Annotate
2985 pragma to occur in a configuration pragma file (typically,
2987 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2988 * gnat_rm.texi: Note that pragma Annotate may be used as a
2989 configuration pragma.
2991 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2993 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2994 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2996 2011-09-19 Yannick Moy <moy@adacore.com>
2998 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2999 for expansion of set membership.
3000 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
3001 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
3002 visible for use in Alfa expansion.
3003 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
3004 variable in Alfa mode.
3006 2011-09-19 Thomas Quinot <quinot@adacore.com>
3008 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
3010 2011-09-19 Thomas Quinot <quinot@adacore.com>
3012 * exp_ch9.adb: Minor reformatting.
3014 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
3016 * freeze.adb (Build_Renamed_Body): Generic subprograms
3017 instantiations cannot be poperly inlined by the compiler, do
3018 not set the Body_To_Inline attribute in such cases.
3019 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
3020 inlining-related flags from the generic subprogram declaration.
3022 2011-09-19 Thomas Quinot <quinot@adacore.com>
3024 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
3025 (Build_Stub_Type): Remove, instead copy components from
3026 System.Partition_Interface.RACW_Stub_Type.
3027 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
3028 (Copy_Component_List): New subprogram.
3030 2011-09-19 Yannick Moy <moy@adacore.com>
3032 * lib-xref.adb (Generate_Reference): Ignore references to
3033 constants in Standard.
3035 2011-09-19 Robert Dewar <dewar@adacore.com>
3037 * err_vars.ads, errout.ads: Minor reformatting.
3039 2011-09-19 Robert Dewar <dewar@adacore.com>
3041 * aspects.ads (Impl_Defined_Aspects): New array
3042 * lib-writ.adb (No_Dependences): New name for No_Dependence
3043 * restrict.adb (No_Dependences): New name for No_Dependence
3044 (Check_Restriction_No_Specification_Of_Aspect): New
3046 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3047 (Restricted_Profile_Result): New variable
3048 (No_Specification_Of_Aspects): New variable
3049 (No_Specification_Of_Aspect_Warning): New variable
3050 * restrict.ads (No_Dependences): New name for No_Dependence
3051 (Check_Restriction_No_Specification_Of_Aspect): New procedure
3052 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3053 * s-rident.ads: Add restriction
3054 No_Implementation_Aspect_Specifications, this is also added to
3055 the No_Implementation_Extensions profile.
3056 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
3057 No_Implementation_Defined_Aspects
3058 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3059 * sem_prag.adb (Analyze_Aspect_Specifications): Check
3060 No_Implementation_Aspects
3061 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3062 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
3064 2011-09-19 Yannick Moy <moy@adacore.com>
3066 * lib-xref.adb (Generate_Reference): Take into account multiple
3067 renamings for Alfa refs.
3069 2011-09-19 Thomas Quinot <quinot@adacore.com>
3071 * g-socthi-mingw.adb: Minor reformatting.
3073 2011-09-19 Yannick Moy <moy@adacore.com>
3075 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
3076 expansion to False in mode Alfa
3078 2011-09-19 Pascal Obry <obry@adacore.com>
3080 * mingw32.h: Remove obsolete code needed for old versions
3083 2011-09-19 Robert Dewar <dewar@adacore.com>
3085 * errout.ads: Minor reformatting.
3087 2011-09-19 Ed Schonberg <schonberg@adacore.com>
3089 * sem_ch6.adb (Analyze_Expression_Function): When the expression
3090 function is transformed into a declaration and a body, insert
3091 body at the end of the declarative part, to prevent premature
3092 freeze actions, and preserve original specification in the
3093 subprogram declaration.
3095 2011-09-19 Vincent Celier <celier@adacore.com>
3097 * projects.texi: Minor editing.
3099 2011-09-19 Robert Dewar <dewar@adacore.com>
3101 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
3102 exp_aggr.adb: Minor reformatting.
3104 2011-09-19 Yannick Moy <moy@adacore.com>
3106 * lib-xref.adb (Generate_Reference): Change entity referenced
3107 to underlying object if any, or else reference to the HEAP.
3109 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3111 * gcc-interface/Make-lang.in: Update dependencies.
3113 2011-09-15 Robert Dewar <dewar@adacore.com>
3115 * tree_io.ads: Minor reformatting.
3116 * a-intnam.ads: Fix bad header.
3118 2011-09-15 Thomas Quinot <quinot@adacore.com>
3120 * a-exexpr-gcc.adb: Minor reformatting.
3122 2011-09-15 Yannick Moy <moy@adacore.com>
3124 * sem_ch6.adb: Propagate information that an expression function comes
3125 from source (otherwise references to this entity are not stored).
3127 2011-09-15 Robert Dewar <dewar@adacore.com>
3129 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
3130 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
3131 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
3133 2011-09-15 Ed Schonberg <schonberg@adacore.com>
3135 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
3136 if the expression function is not a completion, create a
3137 new specification for the generated declaration, and keep the
3138 original specification in the generated body. Shorter code also
3139 ensures that proper warnings are generated for unused formals
3142 2011-09-15 Sergey Rybin <rybin@adacore.com>
3144 * tree_io.ads: Update ASIS_Version_Number because of the changes
3145 in the tree structures for expression functions.
3147 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3149 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3150 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
3151 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
3152 (CLOCK_REALTIME): Fix wrong value on some OSes.
3153 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
3155 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3157 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
3158 to unconstrained array case, deal with each branch of a COND_EXPR.
3159 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
3160 a COND_EXPR in the initializer, if present.
3162 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3164 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
3165 of an addressable type.
3166 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
3167 Deal with those cases for which creating a temporary is mandatory.
3169 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3171 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
3172 this is a real formal parameter before testing whether it is by ref.
3174 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3176 * gcc-interface/gigi.h (build_call_0_expr): Delete.
3177 (build_call_1_expr): Likewise.
3178 (build_call_2_expr): Likewise.
3179 (build_call_n_expr): New prototype.
3180 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
3181 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
3182 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
3183 (Exception_Handler_to_gnu_zcx): Likewise.
3184 (gnat_to_gnu): Likewise.
3185 (build_binary_op_trapv): Likewise.
3186 * gcc-interface/utils2.c (build_call_0_expr): Delete.
3187 (build_call_1_expr): Likewise.
3188 (build_call_2_expr): Likewise.
3189 (build_call_n_expr): New function.
3190 (build_call_raise): Use build_call_n_expr.
3191 (build_call_raise_range): Likewise.
3192 (build_call_raise_column): Likewise.
3193 (build_call_alloc_dealloc_proc): Likewise.
3194 (maybe_wrap_malloc): Likewise.
3195 (maybe_wrap_free): Likewise.
3197 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3199 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
3201 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
3202 the result type is null if ENABLE_CHECKING. Set operation_type at the
3203 end unconditionally if not set in the previous cases.
3204 Use build2 and void_type_node for MODIFY_EXPR.
3205 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
3207 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
3209 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
3210 precision when converting to or from an integral type whose precision
3211 is not equal to its size.
3213 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
3215 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
3217 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
3219 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3221 * system-darwin-ppc64.ads: New file.
3223 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3225 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3228 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3230 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3231 size switches to the link phase for shared libs.
3233 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3235 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3236 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3238 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3240 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3241 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3242 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3244 (TOOLS_FLAGS_TO_PASS): New.
3245 (../stamp-tools): Reintroduce, to avoid merge conflicts.
3247 2011-09-06 Robert Dewar <dewar@adacore.com>
3249 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3250 name for Is_RM_Defined_Unit. Also several fixes to this unit.
3252 2011-09-06 Robert Dewar <dewar@adacore.com>
3254 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3255 * s-rident.ads: New restriction No_Implementation_Units
3256 (this restriction is also part of the profile
3257 No_Implementation_Extensions)
3258 * sem_ch10.adb (Analyze_With_Clause): Add check for
3259 No_Implementation_Units restriction.
3261 2011-09-06 Jerome Guitton <guitton@adacore.com>
3263 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3266 2011-09-06 Thomas Quinot <quinot@adacore.com>
3268 * s-solita.adb: Minor reformatting.
3270 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3272 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3273 is a rewriting of an expression function does not freeze previous
3276 2011-09-06 Robert Dewar <dewar@adacore.com>
3278 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3280 2011-09-06 Tristan Gingold <gingold@adacore.com>
3282 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3283 powerpc-wrs-vxworksae.
3285 2011-09-06 Thomas Quinot <quinot@adacore.com>
3287 * s-os_lib.ads (Spawn): Minor documentation clarification,
3288 Success is True for a zero exit status.
3290 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3292 * sem_ch5.adb: Add message for common iterator error.
3294 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3296 * exp_ch3.adb (Build_Initialization_Call): If the target is a
3297 selected component discriminated by a current instance, replace
3298 the constraint with a reference to the target object, regardless
3299 of whether the context is an init_proc.
3301 2011-09-06 Robert Dewar <dewar@adacore.com>
3303 * exp_attr.adb: Descriptor_Size is never static.
3305 2011-09-06 Robert Dewar <dewar@adacore.com>
3307 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3309 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3311 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3314 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3316 * sem_res.adb (Resolve): An expression that is the body of an
3317 expression function does not freeze.
3319 2011-09-06 Matthew Heaney <heaney@adacore.com>
3321 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3322 a-cuprqu.adb: Changed copyright notice to indicate current
3325 2011-09-06 Vincent Celier <celier@adacore.com>
3327 * prj.adb: Minor spelling error fix in comment
3328 * sem_res.adb: Minor reformatting
3330 2011-09-06 Pascal Obry <obry@adacore.com>
3332 * sysdep.c (winflush_nt): Removed as not needed anymore.
3333 (winflush_95): Likewise.
3334 (winflush_init): Likewise.
3335 (winflush_function): Likewise.
3336 (getc_immediate_common): Remove call to winflush_function.
3338 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3340 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3341 processing for Descriptor_Size.
3342 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3343 to account for its broader usage.
3344 * sem_attr.adb (Analyze_Attribute): Change the error detection
3345 circuitry for Descriptor_Size as the attribute is now applicable
3348 2011-09-06 Robert Dewar <dewar@adacore.com>
3350 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3352 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3354 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3355 in a parameter association must not set the Referenced flag on
3357 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3359 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3361 * gnat_rm.texi: Add a section on attribute Descriptor_Size
3363 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3365 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3366 gnatlink-re): Speed up by using -j0.
3368 2011-09-06 Yannick Moy <moy@adacore.com>
3370 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3371 Set_Corresponding_Aspect when creating pragma from aspect.
3372 (Add_Predicates): Use new field Corresponding_Aspect.
3373 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3374 name when present, for the purpose of issuing error messages;
3375 remove local procedure Error_Pragma_Arg_Alternate_Name.
3376 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3378 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3381 2011-09-06 Robert Dewar <dewar@adacore.com>
3383 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3385 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3387 * exp_ch6.adb (Build_Heap_Allocator): Add new
3388 local variable Desig_Typ. Code and comment reformatting. Add
3389 machinery to ensure that the allocation uses a fat pointer when
3390 the type of the return object is a constrained array and the
3391 function return type is an unconstrained array.
3393 2011-09-06 Vincent Celier <celier@adacore.com>
3395 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3396 parameters in subprograms.
3398 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3400 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3402 2011-09-06 Thomas Quinot <quinot@adacore.com>
3404 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3405 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3407 (System.Tasking.Primitive_Operations.Specific.Set): If argument
3408 is null, destroy task specific data, to make API consistent with
3409 other platforms, and thus compatible with the shared version
3411 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3412 Document the above assumption.
3414 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3416 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3417 variable for type of return value when return type is
3418 unconstrained and context is an assignment.
3420 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3422 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3423 class-wide operation if expansion is not enabled.
3425 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
3427 * checks.adb (Apply_Scalar_Range_Check): Deal with access
3430 2011-09-06 Yannick Moy <moy@adacore.com>
3432 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3433 Aspect_Invariant): Do not issue error at this point on illegal
3434 pragma placement, as this is checked later on when analyzing
3435 the corresponding pragma.
3436 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3437 similar to Error_Pragma_Arg, except the source name of the
3438 aspect/pragma to use in warnings may be equal to parameter
3439 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3440 message to distinguish source name of pragma/aspect, and whether
3441 the illegality resides in the type being public, or being private
3442 without a public declaration
3444 2011-09-06 Thomas Quinot <quinot@adacore.com>
3446 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3447 size check (fd_set is implemented differently on that platform).
3449 2011-09-06 Thomas Quinot <quinot@adacore.com>
3451 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3452 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3453 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3454 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3455 (ATCB_Allocation): New subpackage of
3456 System.Tasking.Primitive_Operations, shared across all targets
3457 with full tasking runtime.
3458 (ATCB_Allocation.New_ATCB): Moved there (from target specific
3460 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3461 taking care of establishing a local temporary ATCB if the one
3462 being deallocated is Self, to avoid a reference to the freed
3463 ATCB in Abort_Undefer.
3465 2011-09-06 Thomas Quinot <quinot@adacore.com>
3467 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3468 terminated, mark it for deallocation upon termination.
3469 (Terminate_Task): Call Free_Task again if the task is marked
3470 for automatic deallocation upon termination.
3472 2011-09-06 Robert Dewar <dewar@adacore.com>
3474 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3475 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3476 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3477 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3478 a-intnam-solaris.ads, a-intnam-tru64.ads,
3479 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3480 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3481 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3482 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3483 * s-rident.ads: Add new restriction No_Implementation_Identifiers
3484 Add new profile No_Implementation_Extensions
3485 * sem_prag.adb: Implement pragma Implementation_Defined Implement
3486 profile No_Implementation_Extensions
3487 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3488 Check violation of restriction No_Implementation_Identifiers
3489 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3490 Add entry for Name_No_Implementation_Extensions
3492 2011-09-06 Robert Dewar <dewar@adacore.com>
3494 * impunit.ads: Minor reformatting.
3496 2011-09-06 Robert Dewar <dewar@adacore.com>
3498 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3500 2011-09-06 Pascal Obry <obry@adacore.com>
3502 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3505 2011-09-06 Robert Dewar <dewar@adacore.com>
3507 * g-socket.adb: Minor reformatting
3509 2011-09-06 Javier Miranda <miranda@adacore.com>
3511 * ali.adb (Scan_ALI): Add missing support to load references of
3512 entities imported from other languages.
3513 * ali.ads (Xref_Record): Adding new fields to store the language and
3514 name of an imported entity.
3515 * lib-xref.adb (Output_Import_Export_Info): Fix typo
3518 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3520 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3521 is allowed on a full type declaration if it is the completion of
3522 a private declarations.
3523 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3524 aspect is allowed on a full type declaration in the private part
3527 2011-09-06 Robert Dewar <dewar@adacore.com>
3529 * sem_ch8.ads: Minor reformatting
3531 2011-09-06 Thomas Quinot <quinot@adacore.com>
3533 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3534 Guard against socket values that are not in [0;FD_SETSIZE[
3536 2011-09-06 Robert Dewar <dewar@adacore.com>
3538 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3541 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3543 * s-linux-alpha.ads: Minor reformatting
3544 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3545 Use sizeof instead of corresponding C defines in s-oscons template.
3547 2011-09-06 Vadim Godunko <godunko@adacore.com>
3549 * a-convec.ads, a-iteint.ads: Minor reformatting.
3551 2011-09-06 Vincent Celier <celier@adacore.com>
3553 * projects.texi: Add menus and @node lines.
3555 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3557 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3558 where the return type is an unconstrained array and the context
3559 is an assignment. Optimize the case when the target of the
3560 assignment is a selected component.
3562 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3564 * s-solita.adb: Update comments.
3566 2011-09-06 Pascal Obry <obry@adacore.com>
3568 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3569 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3570 * s-oscons-tmplt.c: Add support for generating pthread related
3571 types size on GNU/Linux as done for Darwin.
3572 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3574 2011-09-06 Robert Dewar <dewar@adacore.com>
3576 * exp_ch6.adb: Fix minor typo.
3578 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3580 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3581 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3582 (Double_Size_Of): Alphabetized. Update the comment on usage.
3583 (Make_Finalize_Address_Stmts): Update comments and reformat code.
3584 (Nearest_Multiple_Rounded_Up): New routine.
3585 (Size_Of): Update comment on usage. The generated expression now
3586 accounts for alignment gaps by rounding the size of the type to the
3587 nearest multiple rounded up of the type's alignment.
3589 2011-09-06 Robert Dewar <dewar@adacore.com>
3591 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3593 2011-09-06 Steve Baird <baird@adacore.com>
3595 * exp_ch4.adb (Expand_Allocator_Expression): Look through
3596 derived subprograms in checking for presence of an
3597 Extra_Accessibility_Of_Result formal parameter.
3598 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3599 checking for presence of an Extra_Accessibility_Of_Result formal
3601 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3602 case where the Parameter_Associatiations attribute is already set,
3603 but set to an empty list.
3604 (Needs_Result_Accessibility_Level):
3605 Unconditionally return False. This is a temporary
3606 change, disabling the Extra_Accessibility_Of_Result
3608 (Expand_Simple_Function_Return): Check for
3609 Extra_Accessibility_Of_Result parameter's presence instead of
3610 testing Ada_Version when generating a runtime accessibility
3611 check which makes use of the parameter.
3613 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3615 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3616 expression in a given case alternative must be attached to the
3617 statement list of the ccrresponding case statement alternative
3618 They cannot be propagated ahead of the case statement, because
3619 the validity of the expression that generated the action may
3620 hold only for that alternative.
3622 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3624 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3625 (Alignment_Of): Remove the code for strict alignment targets.
3626 (Double_Alignment_Of): Removed.
3627 (Double_Size_Of): New routine.
3628 (Make_Finalize_Address_Stmts): Change the
3629 calculation of the dope's size. Update relevant comments.
3630 (Size_Of): New routine.
3632 2011-09-06 Steve Baird <baird@adacore.com>
3634 * einfo.ads (Extra_Accessibility): Update associated comment to use
3635 the term "present" correctly ("present" just means that it is not
3636 an error to query the value of the attribute - it does not imply
3637 that the value must be non-null).
3638 (Extra_Constrained): Ditto.
3639 (Is_Visible_Formal): Ditto.
3640 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3641 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3642 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3643 * exp_ch6.adb (Expand_Call): The callee may require an
3644 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3645 < Ada_2012. This can occur if the callee is exported from a Gnat
3646 runtimes unit. Also improve a comment.
3648 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3650 * exp_ch7.adb: Add with and use clauses for Get_Targ.
3651 (Alignment_Of): Rename formal parameter Some_Typ
3652 to Typ, update related comment. Use the allocator alignment on
3653 strict alignment targets such as SPARC.
3654 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3657 2011-09-06 Gary Dismukes <dismukes@adacore.com>
3659 * sem_ch9.adb (Check_Interfaces): Test
3660 Is_Limited_Type rather than Is_Limited_Record when checking that
3661 the partial view of a synchronized full view must be limited.
3663 2011-09-06 Emmanuel Briot <briot@adacore.com>
3665 * g-comlin.adb (Free): Fix memory leak.
3667 2011-09-06 Robert Dewar <dewar@adacore.com>
3669 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3671 2011-09-06 Steve Baird <baird@adacore.com>
3673 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3674 (Ada2012) cases described in AI05-0234 where the accessibility
3675 level of a function result is "determined by the point of
3676 call", an implicit parameter representing that accessibility
3677 level is passed in. Extra_Accessibilty_Of_Result yields this
3678 additional formal parameter. Extra_Accessibility_Of_Result
3679 is analogous to the existing Extra_Accessibility
3680 function used in the implementation of access parameters.
3681 (Set_Extra_Accessibility_Of_Result): New procedure; sets
3682 Extra_Accessibility_Of_Result attribute.
3683 * einfo.adb (Extra_Accessibility_Of_Result): New function.
3684 (Set_Extra_Accessibility_Of_Result): New procedure.
3685 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3686 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3687 an accessibility level literal to Natural; introduce a nested
3688 function, Make_Level_Literal, to do this.
3689 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3690 determines whether a given function (or access-to-function
3691 type) needs to have an implicitly-declared accessibility-level
3692 parameter added to its profile.
3693 (Add_Extra_Actual_To_Call): Export an existing procedure which was
3694 previously declared in the body of Exp_Ch6.
3695 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3697 (Has_Unconstrained_Access_Discriminants): New Function; a
3698 predicate on subtype entities which returns True if the given
3699 subtype is unconstrained and has one or more access discriminants.
3700 (Expand_Call): When expanding a call to a function which takes an
3701 Extra_Accessibility_Of_Result parameter, pass in the appropriate
3702 actual parameter value. In the case of a function call which is
3703 used to initialize an allocator, this may not be possible because
3704 the Etype of the allocator may not have been set yet. In this
3705 case, we defer passing in the parameter and handle it later in
3706 Expand_Allocator_Expression.
3707 (Expand_Simple_Function_Return): When returning from a function which
3708 returns an unconstrained subtype having at least one access
3709 discriminant, generate the accessibility check needed to ensure that
3710 the function result will not outlive any objects designated by its
3712 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3714 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3715 is used to initialize an allocator, we may need to pass in "the
3716 accessibility level determined by the point of call" (AI05-0234)
3717 to the function. Expand_Call, where such actual parameters are
3718 usually generated, is too early in this case because the Etype of
3719 the allocator (which is used in determining the level to be passed
3720 in) may not have been set yet when Expand_Call executes. Instead,
3721 we generate code to pass in the appropriate actual parameter
3722 in Expand_Allocator_Expression.
3723 * sem_ch6.adb (Create_Extra_Formals): Create
3724 the new Extra_Accessibility_Of_Result formal if
3725 Needs_Result_Accessibility_Level returns True. This includes the
3726 introduction of a nested procedure, Check_Against_Result_Level.
3728 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3730 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3733 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3735 * s-finmas.adb (Set_Finalize_Address): Explain the reason
3736 for the synchronization. Move the test for null from
3737 s-stposu.Allocate_Any_Controlled to this routine since the check
3738 needs to be protected too.
3739 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3740 synchronization code.
3741 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3742 explaining the context in which this routine is used.
3743 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3744 to s-finmas.Set_Finalize_Address.
3746 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3748 * einfo.ads: Document that itypes have no parent field.
3750 2011-09-05 Robert Dewar <dewar@adacore.com>
3752 * rtsfind.adb (Check_CRT): Check for overloaded entity
3753 * rtsfind.ads: Document that entities to be found by rtsfind
3754 cannot be overloaded
3755 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3756 (Lock_Entries_With_Status): New name for Lock_Entries with two
3757 arguments (changed to meet rtsfind no overloading rule).
3759 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3761 * s-finmas.adb (Set_Finalize_Address (Address,
3762 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3763 (Set_Finalize_Address (in out Finalization_Master,
3764 Finalize_Address_Ptr): Add synchronization code.
3765 * s-finmas.ads (Set_Finalize_Address (Address,
3766 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3767 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3768 Set_Finalize_Address for the heterogeneous case.
3770 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3772 * sem_ch3.adb: Undo previous change, not suitable after all.
3774 2011-09-05 Robert Dewar <dewar@adacore.com>
3776 * einfo.ads: Minor comment clarification.
3778 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3780 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3781 no longer needs to search through the entities of the return
3782 statement scope to find the _chain.
3783 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3784 (Analyze_Block_Statement): Add local variable
3785 Is_BIP_Return_Statement. Add machinery to install all entities
3786 produced by the expansion of the return object declaration.
3787 (Install_Return_Entities): New routine.
3788 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3790 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3792 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3793 of subunit is incomplete.
3794 (Analyze_Proper_Body): If parent spec is not available, do not
3797 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3799 * sem_disp.adb (Find_Controlling_Arg): Add checks for
3800 interface type conversions, that are expanded into dereferences.
3802 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3804 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3805 Examine the parameter and return profile of a subprogram and swap
3806 any incomplete types coming from a limited context with their
3807 corresponding non-limited views.
3808 (Exchange_Limited_Views): New routine.
3810 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3812 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3813 of internal entity to the subtype declaration, so that when
3814 entities are subsequently exchanged in a package body, the tree
3815 remains properly formatted for ASIS.
3817 2011-09-05 Johannes Kanig <kanig@adacore.com>
3819 * g-comlin.adb (Set_Usage): Additional optional argument to set help
3821 (Display_Help): display the user given help message, if available.
3823 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3825 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
3826 is legal if the original node is an identifier that is a
3827 parameterless function call.
3829 2011-09-05 Pascal Obry <obry@adacore.com>
3831 * prj-nmsc.adb: Minor reformatting.
3832 Add support for standalone aggregate library.
3833 (Check_Stand_Alone_Library): Handle standalone aggregate library.
3834 * projects.texi: Fix documentation for aggregate library projects.
3836 2011-09-05 Robert Dewar <dewar@adacore.com>
3838 * sem_ch6.adb: Minor reformatting.
3840 2011-09-05 Matthew Gingell <gingell@adacore.com>
3842 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
3843 stack guard page on PPC Linux. This patch ensures the 64K guard page at
3844 the bottom of the stack is not overwritten.
3846 2011-09-05 Thomas Quinot <quinot@adacore.com>
3848 * exp_intr.adb, s-tasini.adb: Minor reformatting.
3850 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3852 * sem_ch3.adb (Access_Definition): If an access type declaration
3853 appears in a child unit, the scope of whatever anonymous type
3854 may be generated is the child unit itself.
3856 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3858 * sem_ch6.adb (Analyze_Expression_Function): Do not set
3859 Comes_From_Source on rewritten body.
3860 (Analyze_Subprogram_Body_Helper): Check that the original node for
3861 the body comes from source, when determining whether expansion
3862 of a protected operation is needed.
3864 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3866 * exp_aggr.adb (Replace_Type): If the target of the assignment is
3867 a selected component and the right-hand side is a self-referential
3868 access, the proper prefix of the rewritten attribute is a copy
3869 of the left-hand side, not of its prefix.
3871 2011-09-05 Robert Dewar <dewar@adacore.com>
3873 * sem_ch5.adb: Minor reformatting.
3874 * sem_ch3.adb: Minor code clean up.
3876 2011-09-05 Jose Ruiz <ruiz@adacore.com>
3878 * exp_ch9.adb (Make_Initialize_Protection): The fact that
3879 restriction No_Dynamic_Attachment is in effect or not should
3880 not influence the default priority associated to a protected
3881 object. With this change, when the restriction is in effect (as
3882 is the case for the Ravenscar profile) the default priority of
3883 a protected object with an interrupt handler is in the range of
3884 interrupt priorities (Default_Interrupt_Priority) as required
3887 2011-09-05 Arnaud Charlet <charlet@adacore.com>
3889 * a-iteint.ads: Fix header.
3891 2011-09-05 Vincent Celier <celier@adacore.com>
3893 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
3894 with a directory separator to avoid output such as:
3895 "/path/to/objauto.cgpr" has been deleted.
3897 2011-09-05 Robert Dewar <dewar@adacore.com>
3899 * sem_ch3.adb: Minor reformatting.
3901 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3903 * sem_ch5.adb: Better error message.
3905 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3907 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
3908 (Expand_Array_Aggregate): Detect a special case of an aggregate
3909 which contains tasks in the context of an unexpanded return
3910 statement of a build-in-place function.
3911 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
3912 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
3913 which contains tasks and expand it now that the original simple
3914 return statement has been rewritten.
3915 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
3916 reformatting. Do not create a chain for an extended return
3917 statement if one is already available.
3918 (Has_Activation_Chain): New routine.
3920 2011-09-05 Marc Sango <sango@adacore.com>
3922 * sem_ch3.adb (Analyze_Object_Declaration): Remove
3923 the wrong test and add the correct test to detect the violation
3924 of illegal use of unconstrained string type in SPARK mode.
3926 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3928 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
3929 message on an iterator over an array.
3931 2011-09-05 Robert Dewar <dewar@adacore.com>
3933 * lib-xref-alfa.adb: Minor reformatting.
3935 2011-09-05 Robert Dewar <dewar@adacore.com>
3937 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
3938 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
3940 2011-09-05 Gary Dismukes <dismukes@adacore.com>
3942 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
3944 2011-09-05 Johannes Kanig <kanig@adacore.com>
3946 * lib-xref-alfa.adb: Update comments.
3948 2011-09-05 Thomas Quinot <quinot@adacore.com>
3950 * sem_res.adb: Minor reformatting
3952 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3954 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3955 present, create them now. Needed in case the return type was
3956 a limited view in the function declaration.
3957 (Make_Build_In_Place_Call_In_Allocator): If return type contains
3958 tasks, build the activation chain for it. Pass a reference to
3959 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3960 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3961 with build_in_place calls.
3962 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3963 incomplete, inatialize its Corresponding_Record_Type component.
3964 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3967 2011-09-05 Johannes Kanig <kanig@adacore.com>
3969 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3972 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3974 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3975 appears within a package specification and the token after "IS"
3976 is not a parenthesis, assume that this is an unparenthesized
3977 expression function, even if the token appears in a line by
3979 * par.adb: Clarify use of Labl field of scope stack in error
3982 2011-09-05 Bob Duff <duff@adacore.com>
3984 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3985 conversions instead of normal type conversions in all cases where a
3986 type conversion would be illegal. In particular, use unchecked
3987 conversions when the operand types are private.
3989 2011-09-05 Johannes Kanig <kanig@adacore.com>
3991 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3992 objects of task type or protected type.
3994 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3996 * sem_ch6.adb (Analyze_Expression_Function): If the expression
3997 function comes from source, indicate that so does its rewriting,
3998 so it is compatible with any subsequent expansion of the
3999 subprogram body (e.g. when it is a protected operation).
4000 * sem_ch4.adb: minor reformatting
4002 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4004 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
4005 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
4006 may lead to wrong ancestor package in the case of instantiated subunit
4007 bodies. If a subunit is instantiated, follow the chain of instantiations
4008 rather than the stub structure.
4010 2011-09-02 Robert Dewar <dewar@adacore.com>
4012 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
4013 * gcc-interface/Make-lang.in: Update dependencies.
4015 2011-09-02 Marc Sango <sango@adacore.com>
4017 * sem_ch3.adb (Analyze_Object_Declaration): Change
4018 comment and add additional check to differentiate constant of
4019 type string from others unconstrained type.
4021 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4023 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
4024 present in incomplete type declarations to refine the error
4025 message the full declaration is in the same unit.
4026 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
4027 an incomplete type, set the Premature_Use for additional message.
4028 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
4029 and Premature_Use is set, place additional information at the
4030 point of premature use.
4032 2011-09-02 Bob Duff <duff@adacore.com>
4034 * sem_ch6.adb: (Check_Post_State): Suppress warning
4035 "postcondition refers only to pre-state" when the expression has not
4036 yet been analyzed, because it causes false alarms. This can happen when
4037 the postcondition contains a quantified expression, because those are
4038 analyzed later. This is a temporary/partial fix.
4039 (Process_Post_Conditions): Minor: change wording of warning.
4041 2011-09-02 Marc Sango <sango@adacore.com>
4043 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
4044 illegal use of unconstrained string type in SPARK mode.
4045 * sem_res.adb (Analyze_Operator_Symbol): Set the
4046 right place where the string operand of concatenation should be
4047 violate in SPARK mode.
4049 2011-09-02 Robert Dewar <dewar@adacore.com>
4051 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
4052 exp_ch3.adb: Minor reformatting.
4054 2011-09-02 Vincent Celier <celier@adacore.com>
4056 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
4057 as the compiler driver so Is_Compilable returns True for sources.
4058 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
4061 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4063 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
4064 condition, a reference to a controlling formal must be interpreted
4065 as having the class-wide type (or an access to such) so that the
4066 inherited condition can be properly applied to any overriding
4067 operation (see ARM12 6.6.1 (7)).
4069 2011-09-02 Tristan Gingold <gingold@adacore.com>
4071 * init.c (__gnat_is_vms_v7): Fix case and add prototype
4074 2011-09-02 Javier Miranda <miranda@adacore.com>
4076 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
4077 initializing expression of a class-wide interface object declaration
4078 if its type is limited.
4080 2011-09-02 Johannes Kanig <kanig@adacore.com>
4082 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
4083 literals, take into account the type name; the type is *not*
4084 the scope for an enumeration literal.
4086 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4088 * sem_ch6.adb (Check_Overriding_Indicator): add special check
4089 to reject an overriding indicator on a user-defined Adjust
4090 subprogram for a limited controlled type.
4092 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4094 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
4095 for an actual that is a function call returning an unconstrained
4096 limited controlled type.
4098 2011-09-02 Tristan Gingold <gingold@adacore.com>
4100 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
4102 2011-09-02 Johannes Kanig <kanig@adacore.com>
4104 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
4105 from "HEAP" to __HEAP Change comment that refers to that variable
4106 * put_alfa.adb: Change comment that refers to that variable
4108 2011-09-02 Robert Dewar <dewar@adacore.com>
4110 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
4112 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4114 * exp_util.adb (Extract_Renamed_Object): Renamed to
4115 Find_Renamed_Object. This routine has been reimplemented and now uses
4116 tree traversal to locate a renamed object.
4117 (Is_Aliased): Replace call to Extract_Renamed_Object with
4118 Find_Renamed_Object.
4120 2011-09-02 Tristan Gingold <gingold@adacore.com>
4122 * init.c: (__gnat_is_vms_v7): New function.
4124 2011-09-02 Olivier Hainque <hainque@adacore.com>
4126 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
4127 that have a misaligned backchain, necessarily bogus.
4129 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4131 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
4132 TSS routine Finalize_Address when compiling in Alfa mode.
4133 (Expand_Freeze_Record_Type): Do not create TSS routine
4134 Finalize_Address when compiling in Alfa mode.
4135 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
4136 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
4138 (Expand_N_Allocator): Do not produce a call to
4139 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
4140 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
4141 produce a call to primitive Set_Finalize_Address in Alfa mode because
4142 Finalize_Address is not built.
4143 * exp_ch7.adb (Build_Finalization_Master): Do not create
4144 finalization masters in Afa mode since they are not needed.
4145 (Build_Finalizer): Do not create scope and library-level
4146 finalizers in Alfa mode since they are not needed.
4147 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
4148 "new" and "free" when applied to controlled objects in Alfa mode since
4151 2011-09-02 Vincent Celier <celier@adacore.com>
4153 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
4154 only library names with the syntax of Ada identifiers, to avoid errors
4155 when compiling the binder generated files.
4156 * projects.texi: Document restriction on SAL library names
4158 2011-09-02 Thomas Quinot <quinot@adacore.com>
4160 * a-chtgbo.adb: Minor comment fix.
4162 2011-09-02 Robert Dewar <dewar@adacore.com>
4164 * lib-xref.adb: Minor reformatting
4166 2011-09-02 Vincent Celier <celier@adacore.com>
4168 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
4169 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
4170 --version and --help in usage.
4171 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
4173 2011-09-02 Bob Duff <duff@adacore.com>
4175 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
4176 compilers don't understand it.
4178 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4180 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
4181 underlying subtype rather than its base type on the call to
4182 Build_Record_Or_Elementary_Input_Function, so that any
4183 constraints on a discriminated subtype will be available for
4184 doing the check required by AI05-0192.
4185 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4186 If the prefix subtype of the 'Input attribute is a constrained
4187 discriminated subtype, then check each constrained discriminant value
4188 against the corresponding value read from the stream.
4190 2011-09-02 Yannick Moy <moy@adacore.com>
4192 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
4193 warnings on suspicious contracts, and enable them with -gnatwa.
4195 2011-09-02 Robert Dewar <dewar@adacore.com>
4197 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
4200 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4202 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
4203 which ensure that restriction No_Dynamic_Attachment has not been
4205 (Make_Initialize_Protection): Protected types with attach or
4206 interrupt handlers must not violate restriction No_Dynamic_Attachment.
4207 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
4208 which ensures that restriction No_Dynamic_Attachment has not been
4210 * sem_attr.adb: (Eval_Attribute): Transform
4211 VAX_Float_Type'First and 'Last into references to
4212 the temporaries which store the corresponding bounds. The
4213 transformation is needed since the back end cannot evaluate
4214 'First and 'Last on VAX.
4215 (Is_VAX_Float): New routine.
4217 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4219 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4220 generic unit is not intrinsic and has an explicit convention,
4221 the instance inherits it.
4223 2011-09-02 Robert Dewar <dewar@adacore.com>
4225 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4226 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4228 2011-09-02 Thomas Quinot <quinot@adacore.com>
4230 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4231 Guard against a prefix that is an N_Has_Entity but has no
4234 2011-09-02 Yannick Moy <moy@adacore.com>
4236 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4239 2011-09-02 Yannick Moy <moy@adacore.com>
4241 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4242 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4244 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4245 procedure looking for suspicious postconditions.
4246 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4247 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4248 options -gnatw.t and -gnatw.T.
4250 2011-09-02 Pascal Obry <obry@adacore.com>
4252 * prj.adb: Minor code refactoring. Move check for null project in
4254 * projects.texi: Fix minor typos.
4256 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4258 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4259 of iteration is an expression, its value must be captured in a
4260 renaming declaration, so that modification of the elements is
4261 propagated to the original container.
4263 2011-09-02 Pascal Obry <obry@adacore.com>
4265 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4266 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4267 prj-tree.adb: Minor reformatting and style fixes.
4269 2011-09-02 Robert Dewar <dewar@adacore.com>
4271 * s-rident.ads: Add new restriction No_Implicit_Aliasing
4272 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4273 No_Implicit_Aliasing
4274 (Analyze_Attribute, case Address): ditto
4275 (Analyze_Attribute, case Unrestricted_Access): ditto
4276 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4277 No_Implicit_Aliasing restriction.
4278 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4280 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4282 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4283 is an unchecked conversion, apply test to its expression.
4285 2011-09-02 Javier Miranda <miranda@adacore.com>
4287 * sem_ch3.adb (Check_Abstract_Overriding): When
4288 traversing the chain of aliased subprograms avoid reporting a
4289 redundant error on the current entity.
4291 2011-09-02 Sergey Rybin <rybin@adacore.com>
4293 * gnat_ugn.texi: Minor clean up.
4295 2011-09-02 Bob Duff <duff@adacore.com>
4297 * s-htable.adb (Set_If_Not_Present): Use renaming
4298 instead of ":=", because the type Key is limited in the generic (even
4299 if not in the instances).
4301 2011-09-02 Robert Dewar <dewar@adacore.com>
4303 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4304 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4307 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4309 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4310 inherited component with the enclosing derived type. Code reformatting.
4312 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4314 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4315 return done when overflow checks are enabled, since comparisons against
4316 Lor and Hir should not be done when OK1 is False.
4318 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4320 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4321 Add new formal Master_Exp. When present, add that expression to the
4322 call as an extra actual.
4323 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4324 Fmaster_Actual and in the case of a BIP call initializing a return
4325 object of an enclosing BIP function set it to a
4326 new reference to the implicit finalization master
4327 formal of the enclosing function. Fmaster_Actual is
4328 then passed to the new formal Master_Exp on the call to
4329 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4330 initializations of Enclosing_Func to its declaration.
4332 2011-09-02 Thomas Quinot <quinot@adacore.com>
4334 * csets.ads: Minor reformatting
4336 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4338 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4339 the full view of a private type coming from an instantiation.
4340 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4341 loop to iterate over the declarations rather than use the
4342 First_Entity / Next_Entity scheme.
4344 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4346 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4347 X'range (N) into X'First (N) .. X'Last (N), do not share the
4348 dimension indicator N, if present. Even though it is a static
4349 constant, its source location may be modified when printing
4350 expanded code under -gnatDL, and node sharing will lead to chaos
4351 in Sprint on large files, by generating a sloc value that does
4352 not correspond to any source file.
4354 2011-09-02 Bob Duff <duff@adacore.com>
4356 * einfo.adb: (Has_Xref_Entry): Do not call
4357 Implementation_Base_Type. Lib.Xref has been
4358 rewritten to avoid the need for it, and it was costly.
4359 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4360 functions in support of efficient xref.
4361 * lib-xref-alfa.adb: Misc changes related to Key component of
4363 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4364 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4365 no longer does. This is the one place where it is needed.
4367 2011-09-02 Johannes Kanig <kanig@adacore.com>
4369 * g-comlin.adb (Getopt): New optional argument Concatenate to have
4370 similar interface as the other Getopt function.
4372 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4374 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4375 a call to Set_Finalize_Address if there is no allocator available.
4376 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4377 a case of allocator expansion where the allocator is not expanded but
4378 needs a custom allocate routine. Code reformatting.
4379 (Is_Finalizable_Transient): Remove local variables Has_Rens and
4380 Ren_Obj. Code reformatting.
4381 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4382 through the use of 'reference.
4383 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4384 as part of build-in-place expansion. They are intentionally marked as
4385 coming from source, but their parents are not.
4387 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4389 * sem_ch10.adb (Analyze_With_Clause): If the library unit
4390 is the generated subprogram declaration for a child unit body
4391 that acts as spec, use the original body in the with_clause,
4392 to prevent binding errors.
4394 2011-09-02 Vincent Celier <celier@adacore.com>
4396 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4397 qualifier /MULTI_UNIT_INDEX=
4399 2011-09-02 Johannes Kanig <kanig@adacore.com>
4401 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4402 instead of calling the callback function
4404 2011-09-02 Robert Dewar <dewar@adacore.com>
4406 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4407 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4409 2011-09-02 Vincent Celier <celier@adacore.com>
4411 * prj-nmsc.adb: (Find_Sources): When the list of sources is
4412 explicitly declared in an extending project, do not warn if a source
4413 for an inherited naming exception is not found.
4415 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4417 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4418 expansion is inactive.
4420 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4422 * sem_util.adb (Note_Possible_Modification): If the entity
4423 being modified is the renaming generated for an Ada2012 iterator
4424 element, the enclosing container or array is modified as well.
4426 2011-09-02 Jose Ruiz <ruiz@adacore.com>
4428 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4429 Initialize): Define and initialize the
4430 mutex attributes and condition variable attributes locally.
4432 2011-09-02 Vincent Celier <celier@adacore.com>
4434 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4435 exception replaced in an extending project.
4436 (Check_Object): No error when the other source is locally removed.
4438 2011-09-02 Yannick Moy <moy@adacore.com>
4440 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4443 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4445 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4447 * gcc-interface/Make-lang.in: Update dependencies.
4449 2011-09-01 Robert Dewar <dewar@adacore.com>
4451 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4453 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4455 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4456 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4457 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4458 specific for systems where their glibc version does not define the
4459 routines to handle dynamically allocated CPU sets.
4461 2011-09-01 Vincent Celier <celier@adacore.com>
4463 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4464 prj-env.adb: Implement inheritance of naming exceptions in extending
4467 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
4469 * gnatls.adb: Display simple message instead of content of
4472 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4474 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4475 access discriminant and anonymous access component scopes.
4476 (Inherit_Component): Reuse the itype of an access discriminant
4477 or anonymous access component by copying it in order to set the proper
4478 scope. This is done only when the parent and the derived type
4479 are in different scopes.
4480 (Set_Anonymous_Etype): New routine.
4482 2011-09-01 Robert Dewar <dewar@adacore.com>
4484 * a-convec.adb: Minor reformatting throughout.
4486 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4488 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4489 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4490 CPU_ALLOC_SIZE and CPU_FREE linux macros.
4491 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4492 CPU_SET_S respectively because we are now using dynamically allocated
4493 CPU sets which are more portable across different glibc versions.
4494 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4495 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4496 masks dynamically according to the number of processors in the target
4498 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4499 respectively, so we need to pass the size of the masks as
4501 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4502 created cpu_set_t masks
4503 with the number of processors available in the target platform,
4504 instead of static bit arrays. It enhances portability because
4505 it uses the information from the target platform.
4506 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4507 are using a restricted run-time library, use the flag
4508 Configurable_Run_Time_Mode instead of Restricted_Profile.
4510 2011-09-01 Vincent Celier <celier@adacore.com>
4512 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4513 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4515 2011-09-01 Nicolas Roche <roche@adacore.com>
4517 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4518 on VxWorks in kernel mode.
4520 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4522 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4523 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4524 directly the bit array.
4525 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4526 the linux macros with the same name.
4527 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4528 wrappers around the CPU_ZERO and CPU_SET linux macros.
4530 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4532 * exp_ch7.adb (Find_Insertion_List): Removed.
4533 (Process_Transient_Objects): Insert the declarations of the hook
4534 access type and the hook object before the associated transient object.
4536 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4538 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4539 package System.Aux_Dec when using restricted run-time libraries which
4540 do not have this package.
4542 2011-09-01 Tristan Gingold <gingold@adacore.com>
4544 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4546 2011-09-01 Bob Duff <duff@adacore.com>
4548 * sem_attr.adb (Analyze_Access_Attribute): Do not call
4549 Kill_Current_Values for P'Unrestricted_Access, where P is library level
4551 2011-09-01 Thomas Quinot <quinot@adacore.com>
4553 * exp_ch5.adb: Minor reformatting
4554 * gnat_ugn.texi: Fix minor typos.
4555 * gcc-interface/Make-lang.in: Update dependencies.
4557 2011-09-01 Robert Dewar <dewar@adacore.com>
4559 * inline.adb, sem_aggr.adb: Minor reformatting.
4561 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4563 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4565 2011-09-01 Robert Dewar <dewar@adacore.com>
4567 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4569 2011-09-01 Bob Duff <duff@adacore.com>
4571 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4572 body" the same as "in inlined body", because visibility shouldn't
4575 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
4577 * inline.adb (Add_Inlined_Body): Refine previous change.
4579 2011-09-01 Gary Dismukes <dismukes@adacore.com>
4581 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4582 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4583 Test for case where call
4584 initializes an object of a return statement before testing for
4585 a constrained call, to ensure that all such cases get handled
4586 by simply passing on the caller's parameters. Also, in that
4587 case call Needs_BIP_Alloc_Form to determine whether to pass on
4588 the BIP_Alloc_Form parameter of the enclosing function rather
4589 than testing Is_Constrained. Add similar tests for the return
4590 of a BIP call to later processing to ensure consistent handling.
4591 (Needs_BIP_Alloc_Form): New utility function.
4592 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4593 a BIP_Alloc_Form formal with call to new utility function
4594 Needs_BIP_Alloc_Form.
4596 2011-09-01 Pascal Obry <obry@adacore.com>
4598 * prj-part.adb: Minor reformatting.
4600 2011-09-01 Vincent Celier <celier@adacore.com>
4602 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4603 half character in the unit name.
4605 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4607 * exp_ch4.adb: Minor code and comment reformatting.
4609 2011-09-01 Thomas Quinot <quinot@adacore.com>
4611 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4612 for Is_Limited_Type and Is_Tagged_Type in condition checking
4613 for by-reference type.
4614 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4615 subprograms may have a completion because of a previous
4616 Inline_Always clause, but the enclosing package must be marked
4617 inlined for the subprogram body to become visible to the backend.
4619 2011-09-01 Thomas Quinot <quinot@adacore.com>
4621 * sem_aux.adb, exp_ch4.adb: Minor reformatting
4623 2011-09-01 Pascal Obry <obry@adacore.com>
4625 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4627 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4629 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4630 the formals of a subprogram stub that acts as a spec.
4632 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4634 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4635 type, declare a renaming for it, not an object declaration.
4637 2011-09-01 Yannick Moy <moy@adacore.com>
4639 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4640 Ignore_Errors to ignore failures to read ALI files when True.
4642 2011-09-01 Javier Miranda <miranda@adacore.com>
4644 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4645 constructor calls associated with non-tagged record types.
4647 2011-09-01 Robert Dewar <dewar@adacore.com>
4649 * g-socthi-vms.adb: Minor reformatting.
4651 2011-09-01 Nicolas Roche <roche@adacore.com>
4653 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4654 in order to avoid impact of imcompatible changes.
4655 * cstreams.c: Likewise
4657 * aux-io.c: Likewise
4659 2011-09-01 Yannick Moy <moy@adacore.com>
4661 * lib-writ.adb (Write_With_Lines): Always output complete information
4662 on "with" line in Alfa mode, as this is required by formal verification
4665 2011-09-01 Tristan Gingold <gingold@adacore.com>
4667 * g-socthi-vms.adb: Add comments.
4669 2011-09-01 Pascal Obry <obry@adacore.com>
4671 * prj.ads: Minor reformatting.
4673 2011-09-01 Vincent Celier <celier@adacore.com>
4675 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4676 exceptions in the config pragmas file.
4678 2011-09-01 Tristan Gingold <gingold@adacore.com>
4680 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4682 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4684 * exp_ch7.adb (Find_Insertion_List): New routine.
4685 (Process_Transient_Objects): Add code to handle the abnormal
4686 finalization of a controlled transient associated with a subprogram
4687 call. Since transients are cleaned up right after the associated
4688 context, an exception raised during a subprogram call may bypass the
4691 2011-09-01 Robert Dewar <dewar@adacore.com>
4693 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4696 2011-09-01 Robert Dewar <dewar@adacore.com>
4698 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4700 2011-09-01 Robert Dewar <dewar@adacore.com>
4702 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4704 2011-09-01 Thomas Quinot <quinot@adacore.com>
4706 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4707 GNATRTL_NONTASKING_OBJS.
4709 2011-09-01 Robert Dewar <dewar@adacore.com>
4711 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4712 possibility of this flag being set for formals in Ada 2012 mode.
4713 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4715 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4717 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4719 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4722 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4724 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4725 insertion node in a tree of nested Expression_With_Actions nodes.
4726 (Process_Transient_Object): In the case where a complex if statement
4727 has been converted into nested Expression_With_Actions nodes, the
4728 "hook" object and the associated access type must be inserted before
4729 the top most Expression_With_Actions.
4731 2011-09-01 Robert Dewar <dewar@adacore.com>
4733 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4734 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4736 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4738 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4740 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4742 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4744 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4745 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4746 in a similar way as we do for the Priority or Dispatching_Domain aspect.
4747 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4748 Dispatching_Domains_Frozen): Move this local data to package
4749 System.Tasking because with the CPU aspect we need to have access
4750 to this data when creating the task in System.Tasking.Stages.Create_Task
4751 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4752 Move these variables from the body of
4753 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4754 we need to have access to this data when creating the task in
4755 System.Tasking.Stages.Create_Task.
4756 * s-taskin.adb (Initialize): Signal the allocation of the environment
4757 task to a CPU, if any, so that we know whether the CPU can be
4758 transferred to a different dispatching domain.
4759 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4760 is being allocated belongs to the dispatching domain where the task
4761 lives. Signal the allocation of the task to a CPU, if any, so that we
4762 know whether the CPU can be transferred to a different dispatching
4765 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4767 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4768 attributes Same_Storage and Overlaps_Storage.
4770 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4772 * exp_strm.adb: Remove with and use clause for Opt.
4773 (Build_Array_Input_Function): Remove the version-dependent generation
4774 of the return statement. The Ada 2005 tree is now the default.
4776 2011-09-01 Yannick Moy <moy@adacore.com>
4778 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4779 it is never empty when compiling in Alfa mode.
4781 2011-09-01 Robert Dewar <dewar@adacore.com>
4783 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4784 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4785 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4786 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4788 2011-09-01 Matthew Heaney <heaney@adacore.com>
4790 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4791 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4792 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4793 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4794 unbounded queue container.
4795 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4796 bounded queue container.
4797 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4798 unbounded priority queue container.
4799 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4800 bounded priority queue container.
4802 2011-08-31 Pascal Obry <obry@adacore.com>
4804 * a-direct.adb: Do not try to create an UNC path on Windows.
4805 (Create_Path): Skip leading computer name in UNC path if any.
4807 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4809 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4810 version-dependent generation of the return statement. The Ada 2005 tree
4813 2011-08-31 Thomas Quinot <quinot@adacore.com>
4815 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4816 types Stream_Element_Offset and Storage_Offset have a different native
4817 type depending on whether the platform is 32 or 64 bits. When
4818 exchanging them, always convert to 64 bits.
4820 2011-08-31 Yannick Moy <moy@adacore.com>
4822 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4823 --force-alfa to gnat2why.
4825 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4827 * sem_ch12.adb (Save_References): If the node has aspects, save
4828 references within the corresponding expressions in a separate step,
4829 because the aspects are not directly in the tree for the declaration
4830 to which they belong.
4832 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4834 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
4835 in CodePeer mode, since representation clauses are partially ignored.
4836 * gcc-interface/Make-lang.in: Update dependencies.
4838 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4840 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4841 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
4842 to any dispatching domain.
4844 2011-08-31 Thomas Quinot <quinot@adacore.com>
4846 * exp_ch4.adb: Minor reformatting.
4848 2011-08-31 Bob Duff <duff@adacore.com>
4850 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
4851 on nodes for which it is not defined.
4852 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
4855 2011-08-31 Bob Duff <duff@adacore.com>
4857 * sem_ch3.adb (Process_Full_View): Disable legality check if
4858 In_Instance, to avoid spurious errors.
4859 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
4860 if In_Instance, to avoid spurious errors.
4862 2011-08-31 Pascal Obry <obry@adacore.com>
4864 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
4865 directory speparators.
4866 (Compose): Use Dir_Seps to handle both forms.
4867 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
4869 (Extension): Use Dir_Seps to handle both forms.
4871 2011-08-31 Pascal Obry <obry@adacore.com>
4873 * prj-conf.adb: Minor reformatting.
4875 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4877 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
4878 dispatching domain aspect.
4879 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
4881 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
4882 Dispatching_Domain aspect in a similar way as we do for the Priority
4884 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
4885 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
4887 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
4888 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
4889 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
4890 Dispatching_Domain and add it to the task definition.
4891 (Sig_Flags): Add Pragma_Dispatching_Domain.
4892 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
4893 support to find the types Dispatching_Domain and
4894 Dispatching_Domain_Access.
4895 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
4896 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
4897 query the availability of a pragma Dispatching_Domain.
4898 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
4899 the expander to pass the Dispatching_Domain when creating a task.
4900 (Name_Dispatching_Domain): Add this new name for a pragma.
4901 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
4902 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
4903 task has been allocated at creation time.
4904 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
4905 Ravenscar is always null.
4906 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
4907 the task has been allocated at creation time.
4908 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
4909 a specific dispatching domain.
4910 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
4911 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
4912 and CPU are specified for the task, and the CPU value is not contained
4913 within the range of processors for the domain.
4915 2011-08-31 Vincent Celier <celier@adacore.com>
4917 * make.adb (Original_Gcc) : New constant String_Access.
4918 (Gnatmake): For VM targets, do not use VM version of the compiler if
4919 --GCC= has been specified.
4921 2011-08-31 Thomas Quinot <quinot@adacore.com>
4923 * sem_ch5.adb: Minor reformatting.
4925 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4927 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
4930 2011-08-31 Bob Duff <duff@adacore.com>
4932 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
4933 the access type is private; we don't care about privacy in expansion.
4935 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4937 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
4938 subcomponents tnat may be limited, because they originate in view
4939 conflicts. If the original aggregate is legal and the actuals are
4940 legal, the aggregate itself is legal.
4942 2011-08-31 Matthew Heaney <heaney@adacore.com>
4944 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
4947 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4949 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
4952 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4954 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4955 Interrupt_Priority aspects, force the analysis of the aspect expression
4956 (when building the equivalent pragma). Otherwise, its analysis is done
4957 too late, after the task or protected object has been created.
4958 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4959 Analyze_Single_Task_Declaration): Remove the code to move the aspects
4960 to the object declaration because they are needed in the type
4963 2011-08-31 Robert Dewar <dewar@adacore.com>
4965 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4966 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4969 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4971 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4972 if the corresponding type is malformed due to restriction violations.
4974 2011-08-31 Robert Dewar <dewar@adacore.com>
4976 * s-ransee.ads, s-ransee.adb: Minor reformatting.
4978 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4980 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4981 would cause the generation of Set_Finalize_Address if the target is a
4982 VM and the designated type is not derived from [Limited_]Controlled.
4984 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4986 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4988 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4989 case of a compilation error.
4991 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4993 * init.c (__gnat_error_handler): Standardize the stack overflow or
4994 erroneous memory access message.
4995 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4996 or erroneous memory access message.
4998 2011-08-31 Robert Dewar <dewar@adacore.com>
5000 * sem_ch4.adb: Minor reformatting.
5001 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
5003 2011-08-31 Thomas Quinot <quinot@adacore.com>
5005 * scos.ads: Minor documentation clarification.
5006 * put_scos.adb: Do not generate SCO unit header line for a unit that
5009 2011-08-31 Robert Dewar <dewar@adacore.com>
5011 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
5013 2011-08-31 Tristan Gingold <gingold@adacore.com>
5015 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
5016 hold variables between these following subprograms.
5017 (Build_Exception_Handler, Build_Object_Declarations,
5018 Build_Raise_Statement): Use the above type as parameter.
5019 Make the above adjustments.
5020 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
5022 2011-08-31 Pascal Obry <obry@adacore.com>
5024 * projects.texi: Minor reformatting.
5026 2011-08-31 Tristan Gingold <gingold@adacore.com>
5028 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
5029 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
5031 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5033 * exp_ch5.adb: Minor code cleanup.
5034 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
5035 prevent cascaded errors.
5036 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
5037 variable of an iterator specification in current scope.
5038 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
5039 postconditions on the stack, as they contain no return statements.
5041 2011-08-31 Yannick Moy <moy@adacore.com>
5043 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
5044 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
5045 call Qualify_Entity_Names.
5046 (Expand_Alfa): call Qualify_Entity_Names in more cases
5047 * lib-xref-alfa.adb: Take into account system package.
5048 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
5049 CodePeer mode in which we are interested in finding bugs even if
5050 compiler cannot compile source.
5051 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
5054 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5056 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
5057 denoted by the subtype mark to ensure getting the concurrent type in
5058 the case where the subtype mark denotes a private subtype of a
5059 concurrent type (needed when using -gnatc).
5060 (Process_Subtype): For the processing specific to type kinds, case on
5061 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
5062 subtype denotes a private subtype whose base type is nonprivate (needed
5063 for subtypes of private fulfilled by task types when compiling with
5066 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5068 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
5069 late primitives that override interface operations when the full
5070 expander is not active, to avoid blowups in Register_Primitive when
5071 types don't have associated secondary dispatch tables.
5073 2011-08-31 Yannick Moy <moy@adacore.com>
5075 * alfa_test.adb: Code clean up.
5077 2011-08-31 Marc Sango <sango@adacore.com>
5079 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
5080 by Comes_From_Source (Original_Node (N)) in order to treat also the
5081 nodes which have been rewritten.
5082 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
5083 explicit dereference and slice violation in spark mode on the nodes
5084 coming only from the source code.
5086 2011-08-31 Robert Dewar <dewar@adacore.com>
5088 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
5089 lib-xref-alfa.adb: Minor reformatting.
5091 2011-08-31 Matthew Heaney <heaney@adacore.com>
5093 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
5095 2011-08-31 Javier Miranda <miranda@adacore.com>
5097 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
5098 only for class-wide subprograms conflicting with entities of concurrent
5101 2011-08-31 Matthew Heaney <heaney@adacore.com>
5103 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
5106 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5108 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
5109 general description of the routine.
5111 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5113 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
5114 doubly-linked lists.
5116 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5118 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
5119 check is needed for a left-hand side that is a dereference, and the
5120 base type is private without discriminants (whereas the full type does
5121 have discriminants), an extra retrieval of the underlying type may be
5122 needed in the case where the subtype is a record subtype whose base
5123 type is private. Update comments.
5125 2011-08-31 Javier Miranda <miranda@adacore.com>
5127 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
5128 found check if there is a class-wide subprogram covering the primitive.
5130 2011-08-31 Yannick Moy <moy@adacore.com>
5132 * sem_res.adb: Further cases where full expansion test is needed,
5133 rather than expansion test.
5135 2011-08-31 Pascal Obry <obry@adacore.com>
5137 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
5139 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5141 * exp_ch5.adb: Handle iterators over derived container types.
5143 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5145 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
5146 (Has_Anonymous_Master): New routine.
5147 (Set_Has_Anonymous_Master): New routine.
5148 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
5149 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
5150 (Current_Anonymous_Master): New routine.
5151 (Current_Unit_First_Declaration): Removed.
5152 (Current_Unit_Scope): Removed.
5153 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
5154 their objects on a per-unit heterogeneous finalization master.
5156 2011-08-31 Matthew Heaney <heaney@adacore.com>
5158 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
5161 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5163 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
5166 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5168 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
5169 where the actual is an unexpanded call to 'Input.
5171 2011-08-31 Yannick Moy <moy@adacore.com>
5173 * sem_ch4.adb: Code clean up.
5175 2011-08-31 Yannick Moy <moy@adacore.com>
5177 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
5179 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5181 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
5182 and TSS primitive Finalize_Address if finalization is suppressed.
5183 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
5184 primitive Finalize_Address if finalization is suppressed.
5186 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5188 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
5189 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
5190 sure that the underlying task has already been created before trying
5191 to change its affinity.
5192 (Set_CPU): Use the term processor instead of CPU, as we do in
5195 2011-08-31 Vincent Celier <celier@adacore.com>
5197 * prj-attr.adb: New Compiler attribute Source_File_Switches.
5198 * prj-nmsc.adb (Process_Compiler): Process attribute
5199 Source_File_Switches.
5200 * prj.ads (Language_Config): New name list component
5201 Name_Source_File_Switches.
5202 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
5204 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5206 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
5207 discriminated component of an actual, expand at once to prevent
5208 ouf-of-order references with generated subtypes.
5210 2011-08-31 Yannick Moy <moy@adacore.com>
5212 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
5213 reference to operator in Alfa xrefs.
5215 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5217 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5218 where the parent instance was frozen before the current instance due to
5219 the presence of a source body. Update calls to Insert_After_Last_Decl.
5220 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5221 Update the comment which illustrates the purpose of the routine.
5222 Package instances are now frozen by source bodies which appear after
5223 the instance. This ensures that entities coming from within the
5224 instance are available for use in the said bodies.
5225 (Install_Body): Add code to handle the case where the parent instance
5226 was frozen before the current instance due to the presence of a source
5227 body. Update calls to Insert_After_Last_Decl.
5229 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5231 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5233 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5235 2011-08-31 Yannick Moy <moy@adacore.com>
5237 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5239 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5240 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5241 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5242 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5243 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5244 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5245 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5246 ALFA in Alfa (we dropped acronym).
5247 * einfo.adb (Primitive_Operations): Correctly return list of primitive
5248 operations in a case where it returned previously No_Elist.
5250 2011-08-31 Robert Dewar <dewar@adacore.com>
5252 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5253 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5254 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5255 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5256 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5257 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5260 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5262 * sem_ch12 (Check_Private_View): Revert previous change.
5263 * sem_res.adb (Conversion_Check): Do not emit the error message if the
5264 conversion is in a generic instance.
5266 2011-08-31 Matthew Heaney <heaney@adacore.com>
5268 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5269 * a-chtgbo.adb (Free): Allow 0 as index value.
5271 2011-08-31 Matthew Heaney <heaney@adacore.com>
5273 * a-cborma.adb (Insert): Add comment to explain why no element
5276 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5278 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5279 spec discriminant is already a concurrent type, in which case just use
5280 it, otherwise fetch the Corresponding_Concurrent_Type as before.
5282 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5284 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5285 system-linux-mips.ads, system-linux-mipsel.ads,
5286 system-linux-mips64el.ads, system-linux-ppc64.ads,
5287 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5289 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5291 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5292 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5293 (build_unary_op): Likewise.
5295 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5297 * raise-gcc.c: Do not include coretypes.h and tm.h.
5298 (setup_to_install): Remove test for compiler macro.
5299 * targext.c: Document use for the library.
5300 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5302 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5304 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5305 the expression to the nominal type if the latter is a record type with
5306 a variant part and the type of the former is a record type without one.
5308 2011-08-30 Yannick Moy <moy@adacore.com>
5310 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5311 expansion in Alfa mode.
5312 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5313 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5315 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5316 * sem_res.adb: Ditto.
5317 * gcc-interface/Make-lang.in: Update dependencies.
5319 2011-08-30 Thomas Quinot <quinot@adacore.com>
5321 * g-socket.ads: Minor documentation adjustment.
5323 2011-08-30 Robert Dewar <dewar@adacore.com>
5325 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5327 2011-08-30 Yannick Moy <moy@adacore.com>
5329 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5330 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5331 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5332 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5333 Revert change which introduced files for "light"
5334 expansion, to be replaced by a single file for Alfa expansion.
5336 2011-08-30 Robert Dewar <dewar@adacore.com>
5338 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5339 Minor code reorg/reformatting.
5341 2011-08-30 Yannick Moy <moy@adacore.com>
5343 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5344 common shorthand for (Expander_Active and not ALFA_Mode) that can be
5345 used for testing full expansion, that is active expansion not in the
5346 reduced mode for Alfa
5347 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5348 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5349 of the verbose (Expander_Active and not ALFA_Mode)
5351 2011-08-30 Tristan Gingold <gingold@adacore.com>
5353 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5354 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5355 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5356 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5358 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5360 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5361 access conversions to check that the conversion is a rewritten node,
5362 rather than just having Comes_From_Source set to False, which wasn't
5365 2011-08-30 Robert Dewar <dewar@adacore.com>
5367 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5368 g-socket.ads: Minor reformatting.
5370 2011-08-30 Thomas Quinot <quinot@adacore.com>
5372 * sem_util.adb: Minor reformatting.
5374 2011-08-30 Tristan Gingold <gingold@adacore.com>
5376 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5377 to be compliant with the ABI.
5379 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5381 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5382 of a designated type when the related access type is an actual in an
5383 instance. This ensures that the full view of designated type is
5384 available when inside the body of the instance.
5386 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5388 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5389 in a position to be modified, a slice is treated like an indexed
5392 2011-08-30 Thomas Quinot <quinot@adacore.com>
5394 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5395 field tv_sec in struct timeval.
5397 2011-08-30 Yannick Moy <moy@adacore.com>
5399 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5400 blocks of code doing full expansion, previously only guarded by
5401 Expander_Active, by anding the test that ALFA_Mode is not set
5403 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5405 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5406 add the function to the list of private dependents, for subsequent
5407 legality check on Taft amendment types.
5408 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5409 Private_Dependents, as for other incomplete types.
5410 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5411 Taft-amendment type is used as the return type of a function.
5413 2011-08-30 Javier Miranda <miranda@adacore.com>
5415 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5416 which emits an error by a call to a new routine which report the error.
5417 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5418 entity does not cover an existing interface.
5419 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5421 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5422 protected procedures or entries whose mode is not conformant.
5423 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5424 an error by a call to a new routine which report the error.
5426 2011-08-30 Robert Dewar <dewar@adacore.com>
5428 * gnat_rm.texi: Minor change.
5429 * exp_attr_light.adb: Minor reformatting.
5431 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5433 * sem_ch3.adb: Patch inheritance of aspects in
5434 Complete_Private_Subtype, to avoid infinite loop.
5436 2011-08-30 Javier Miranda <miranda@adacore.com>
5438 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5439 been reported and a subprogram covering an interface primitive is not
5440 found then skip generating the internal entity. Done to avoid crashing
5442 (Check_Abstract_Overriding): Change text of error of wrong formal of
5443 protected subprogram or entry. Done for consistency to emit exactly the
5444 same error reported by Check_Synchronized_Overriding. In addition, the
5445 error is restricted to protected types (bug found working on AI05-0090)
5447 2011-08-30 Yannick Moy <moy@adacore.com>
5449 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5450 expansion in Alfa mode.
5451 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5452 * exp_light.adb, exp_light.ads: New package defining light expansion.
5453 * expander.adb (Expand): Call light expansion in Alfa mode
5454 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5456 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5458 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5459 * gnat1drv.adb (Adjust_Global_Switches): Comment
5461 2011-08-30 Yannick Moy <moy@adacore.com>
5463 * lib-xref-alfa.adb: Minor refactoring.
5465 2011-08-30 Yannick Moy <moy@adacore.com>
5467 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5469 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5470 expansion in Alfa mode.
5471 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5474 2011-08-30 Robert Dewar <dewar@adacore.com>
5476 * debug_a.adb: Update comment.
5478 2011-08-30 Robert Dewar <dewar@adacore.com>
5480 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5481 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5482 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5483 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5485 2011-08-30 Robert Dewar <dewar@adacore.com>
5487 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5490 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5492 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5493 Build_Finalization_Master by supplying an insertion node and enclosing
5494 scope. In its old version, the call did not generate a finalization
5496 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5497 recognize anonymous access-to-controlled components. Rewrite the
5498 machinery which creates finalization masters to service anonymous
5499 access-to-controlled components of a record type. In its current state,
5500 only one heterogeneous master is necessary to handle multiple anonymous
5502 (Freeze_Type): Comment reformatting.
5503 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5505 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5506 associates TSS primitive Finalize_Address with either the master itself
5507 or with the internal hash table depending on the mode of operation of
5510 2011-08-30 Javier Miranda <miranda@adacore.com>
5512 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5513 interface type then do not generate code to compare this component.
5514 Required since they have no components and their equality operator is
5517 2011-08-30 Steve Baird <baird@adacore.com>
5519 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5520 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5521 returns the (static) accessibility level of the object. Otherwise, the
5522 same as Type_Access_Level.
5523 (Dynamic_Accessibility_Level): New function; given an expression which
5524 could occur as the rhs of an assignment to a saooaaat (i.e., an
5525 expression of an access-to-object type), return the new value for the
5526 saooaaat's associated Extra_Accessibility object.
5527 (Effective_Extra_Accessibility): New function; same as
5528 Einfo.Extra_Accessibility except that object renames are looked through.
5530 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5531 (Dynamic_Accessibility_Level): New function; see sem_util.ads
5533 (Effective_Extra_Accessibility): New function; see sem_util.ads
5535 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5536 (Extra_Accessibility): Update comments.
5537 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5538 except RM_Size field (which is only for types) is unaffected.
5540 (Extra_Accessibility): Expand domain to allow objects, not just formals.
5541 (Set_Extra_Accessibility): Expand domain to allow objects, not just
5543 (Init_Size): Add assertion that we are not trashing the
5544 Extra_Accessibility attribute of an object.
5545 (Init_Size_Align): Add assertion that we are not trashing the
5546 Extra_Accessibility attribute of an object.
5547 (Init_Object_Size_Align): New procedure; see einfo.ads description.
5548 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5549 differently for the type of a (non-library-level) saooaaat depending
5550 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5551 is queried in this set of changes - everything else (in particular,
5552 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5553 driven off of the setting of the Is_Local_Anonymous_Access attribute.
5554 The special treatment of library-level saooaaats is an optimization,
5555 not required for correctnesss. This is based on the observation that the
5556 Ada2012 rules (static and dynamic) for saooaaats turn out to be
5557 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5559 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5560 false for the type of a saooaaat, declare and initialize its
5561 accessibility level object and set the Extra_Accessibility attribute
5562 of the saooaaat to refer to this object.
5563 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5564 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5565 calls to Effective_Extra_Accessibility in order to support
5566 renames of saooaaats.
5567 (Expand_N_Type_Conversion): Add new local function,
5568 Has_Extra_Accessibility, and call it when determining whether an
5569 accessibility check is needed.
5570 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5571 evaluate to True (without raising an exception).
5573 (Expand_N_Assignment_Statement): When assigning to an Ada2012
5574 saooaaat, update its associated Extra_Accessibility object (if
5575 it has one). This includes an accessibility check.
5576 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5577 a saooaaat, update its Extra_Accessibility object too (if it
5579 (Expand_Call): Replace a couple of calls to Type_Access_Level
5580 with calls to Dynamic_Access_Level to handle cases where
5581 passing a literal (any literal) is incorrect.
5582 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5583 checks associated with "Saooaat := Some_Object'Access;"; this must
5584 be rejected if Some_Object is declared in a more nested scope
5586 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5587 assignment to a saooaaat even if Is_Local_Anonymous_Access
5588 returns False for its type (indicating a 2012-style saooaaat).
5590 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5591 (which is only appropriate for objects, not types) with a call
5592 of Init_Object_Size_Align in order to avoid trashing the
5593 Extra_Accessibility attribute of a rename (the two attributes
5596 (Valid_Conversion) Replace six calls to Type_Access_Level with
5597 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5598 Ada2012 non-library-level saooaaat, the former returns library level
5599 while the latter returns the (static) accessibility level of the
5600 saooaaat. A type conversion to the anonymous type of a saooaaat
5601 can only occur as part of an assignment to the saooaaat, so we
5602 know that such a conversion must be in a lhs context, so Deepest
5603 yields the result that we need. If such a conversion could occur,
5604 say, as the operand of an equality operator, then this might not
5605 be right. Also add a test so that static accessibilty checks are
5606 performed for converting to a saooaaat's type even if
5607 Is_Local_Anonymous_Access yields False for the type.
5609 2011-08-30 Javier Miranda <miranda@adacore.com>
5611 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5612 controls generation of a warning associated with late declaration of
5613 dispatching functions. Required to avoid generating spurious
5616 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5618 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5619 return object has an anonymous access type and the function's type is
5620 a named access type.
5621 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5622 conversions on implicit conversions, since such conversions can occur
5623 for anonymous access cases due to expansion. Issue error for attempt
5624 to rename an anonymous expression as an object of a named access type.
5625 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5626 to indicate whether this function should report errors on invalid
5628 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5629 the expression is of an anonymous access type and the expected type is
5630 a named general access type, rewrite the expression as a type
5631 conversion, unless this is an expression of a membership test.
5632 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5633 calling of Error_Msg_N on new formal Report_Errs.
5634 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5635 calling of Error_Msg_NE on new formal Report_Errs.
5636 (Valid_Conversion): Move declaration of this function to the package
5637 spec, to allow calls from membership test processing. For Ada 2012,
5638 enforce legality restrictions on implicit conversions of anonymous
5639 access values to general access types, disallowing such conversions in
5640 cases where the expression has a dynamic accessibility level (access
5641 parameters, stand-alone anonymous access objects, or a component of a
5642 dereference of one of the first two cases).
5643 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5644 in the context of a named general access expected type.
5645 * exp_ch4.adb Add with and use of Exp_Ch2.
5646 (Expand_N_In): Add processing for membership tests applied to
5647 expressions of an anonymous access type. First, Valid_Conversion is
5648 called to check whether the test is statically False, and then the
5649 conversion is expanded to test that the expression's accessibility
5650 level is no deeper than that of the tested type. In the case of
5651 anonymous access-to-tagged types, a tagged membership test is applied
5653 (Tagged_Membership): Extend to handle access type cases, applying the
5654 test to the designated types.
5655 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5656 accessibility level, and the actual is a 'Access applied to a current
5657 instance, pass the accessibility level of the type of the current
5658 instance rather than applying Object_Access_Level to the prefix. Add a
5659 ??? comment, since this level isn't quite right either (will eventually
5660 need to pass an implicit level parameter to init procs).
5662 2011-08-30 Bob Duff <duff@adacore.com>
5664 * s-taskin.ads: Minor comment fix.
5666 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5668 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5669 component and the selector is a dispatching operation, check if it is
5670 a prefixed call before rewriting as a parameterless function call.
5672 2011-08-29 Jakub Jelinek <jakub@redhat.com>
5674 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5675 tsystem.h into $(RTSDIR) instead of rts.
5677 2011-08-29 Robert Dewar <dewar@adacore.com>
5679 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5681 * gcc-interface/Make-lang.in: Update dependencies.
5683 2011-08-29 Yannick Moy <moy@adacore.com>
5685 * alfa.ads (Name_Of_Heap_Variable): New constant name.
5686 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5687 table to hold dereferences.
5688 (Add_ALFA_Xrefs): Take into account dereferences as special
5689 reads/writes to the variable "HEAP".
5690 (Enclosing_Subprogram_Or_Package): Move subprogram here.
5691 (Generate_Dereference): New procedure to store a read/write dereferencew
5693 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5694 the special "HEAP" var.
5695 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5697 * sem_util.adb (Note_Possible_Modification): Store write dereference
5700 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5702 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5703 ensures that the level of the subpool access type is not deeper than
5704 that of the pool object.
5705 * sem_util.adb (Object_Access_Level): Expand to handle defining
5707 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5708 subpool handle name of a rewritten allocator.
5710 2011-08-29 Robert Dewar <dewar@adacore.com>
5712 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5714 2011-08-29 Thomas Quinot <quinot@adacore.com>
5716 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5717 values, we generate multiple triples of parameters in the TypeCode.
5718 Bump Choice_Index for each such triple so that a subsequent default
5719 choice is associated with the correct index in the typecode.
5721 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5723 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5725 (First, Last): Handle properly an iterator over a null container.
5727 2011-08-29 Bob Duff <duff@adacore.com>
5729 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5730 processing if we run across a node with no Scope. This can happen if
5731 we're with-ing an library-level instance, and that instance got errors
5732 that caused "instantiation abandoned".
5733 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5734 an exception instead of using Assert, so it won't go into an infinite
5735 loop, even when assertions are turned off.
5737 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5739 * a-coorse.adb: Proper handling of empty ordered sets.
5741 2011-08-29 Johannes Kanig <kanig@adacore.com>
5743 * debug.adb: Add comments.
5745 2011-08-29 Thomas Quinot <quinot@adacore.com>
5747 * a-except.adb, a-except-2005.adb: Minor comment rewording and
5750 2011-08-29 Yannick Moy <moy@adacore.com>
5752 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5753 declaration for Itypes in Alfa mode.
5755 2011-08-29 Robert Dewar <dewar@adacore.com>
5757 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5758 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5759 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5762 2011-08-29 Tristan Gingold <gingold@adacore.com>
5764 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5766 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5767 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5770 2011-08-29 Robert Dewar <dewar@adacore.com>
5772 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5774 2011-08-29 Javier Miranda <miranda@adacore.com>
5776 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5777 renamings of formal subprograms when the actual for a formal type is
5780 2011-08-29 Matthew Heaney <heaney@adacore.com>
5782 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5785 2011-08-29 Matthew Heaney <heaney@adacore.com>
5787 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5788 components of record type.
5789 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5792 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5794 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5795 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5798 2011-08-29 Robert Dewar <dewar@adacore.com>
5800 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5803 2011-08-29 Matthew Heaney <heaney@adacore.com>
5805 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5806 components of record type.
5808 2011-08-29 Bob Duff <duff@adacore.com>
5810 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5811 by the termination handler.
5813 2011-08-29 Yannick Moy <moy@adacore.com>
5815 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5816 created in Alfa mode, instead of inserting artificial declarations of
5817 non-Itypes in the tree.
5818 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5819 know if an Itype has a corresponding declaration, as defined in
5822 2011-08-29 Yannick Moy <moy@adacore.com>
5824 * gnat1drv.adb: Minor rewrite.
5826 2011-08-29 Bob Duff <duff@adacore.com>
5828 * s-tasuti.adb (Make_Passive): Work around race condition in
5829 Make_Independent, which can cause Wait_Count to be zero. So instead of
5830 asserting that Wait_Count > 0, and then decrementing it, decrement it
5831 only if Wait_Count > 0.
5832 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
5833 should be nonnegative, so declare them Natural instead of Integer.
5835 2011-08-29 Robert Dewar <dewar@adacore.com>
5837 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
5838 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
5839 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
5840 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
5841 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
5843 2011-08-29 Tristan Gingold <gingold@adacore.com>
5845 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
5847 2011-08-29 Vadim Godunko <godunko@adacore.com>
5849 * s-parint.ads: Minor comment clarification.
5851 2011-08-29 Vincent Celier <celier@adacore.com>
5853 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
5854 may be used as identifiers.
5856 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5858 * a-coinho.ads: Minor reformating.
5860 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5862 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
5863 container of a derived type.
5865 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5867 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
5868 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
5870 2011-08-29 Pascal Obry <obry@adacore.com>
5872 * exp_disp.adb: Minor comment fix.
5873 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5874 to avoid warnings when compiling with -Wall.
5875 (Make_Disp_Conditional_Select_Body): Likewise.
5876 (Make_Disp_Timed_Select_Body): Likewise.
5878 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5880 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
5881 an entity name, generate reference for it.
5883 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5885 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
5887 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
5888 the class-wide type.
5889 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
5891 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5893 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
5894 subtype for an object whose type is an unconstrained union.
5896 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5898 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
5899 is allowed in a component definition, by AI95-406.
5901 2011-08-29 Matthew Heaney <heaney@adacore.com>
5903 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
5905 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5907 * a-except-2005.adb: Alphabetize all routines.
5908 (Triggered_By_Abort): New routine.
5909 * a-except-2005.ads (Triggered_By_Abort): New routine.
5910 * a-except.adb Alphabetize all routines.
5911 (Triggered_By_Abort): New routine.
5912 * a-except.ads (Triggered_By_Abort): New routine.
5913 * exp_ch7.adb: Update all comments involving the detection of aborts in
5915 (Build_Object_Declarations): Do not generate code to detect the
5916 presence of an abort at the start of finalization code, use a runtime
5918 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
5920 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
5921 allocate a task on a subpool.
5922 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
5923 The flag disables all actions related to the maintenance of
5924 Finalize_Address_Table when subpools are not in use.
5925 (Allocate_Any_Controlled): Signal the machinery that subpools are in
5927 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
5928 performs costly task locking when subpools are not in use.
5930 2011-08-29 Yannick Moy <moy@adacore.com>
5932 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
5933 types and dispatching calls in Alfa mode.
5934 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
5935 correspondance between body and spec scopes, to reuse utility functions
5936 (Traverse_Declarations_Or_Statements): Protect access to body for stub
5937 by testing the presence of the library unit for the body
5938 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
5939 mode the expansion of accept statements is skipped
5940 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
5941 the unique entity corresponding to the one returned by
5942 Unique_Defining_Entity applied to the enclosing declaration of the
5945 2011-08-29 Bob Duff <duff@adacore.com>
5947 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
5948 gdb when x is not a node (it can be a node list, name_id, etc). pp is
5949 an alias for pn. ppp is an alias for pt.
5951 2011-08-29 Javier Miranda <miranda@adacore.com>
5953 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
5954 aggregate to take a consistent decision on the need to convert into
5955 assignments aggregates that initialize constant objects.
5957 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5959 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5960 Build_Allocate_Deallocate_Proc in order to handle allocation of
5961 non-controlled objects on subpools.
5962 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5963 to be end-user visible.
5964 * s-finmas.adb: Add with and use clause for System.HTable.
5965 Add an instantiation of Simple_HTable which provides a mapping between
5966 the address of a controlled object and the corresponding
5967 Finalize_Address used to clean up the object. The table is used when a
5968 master is operating in heterogeneous mode.
5969 (Attach): Explain why the input node is not verified on being already
5971 (Delete_Finalize_Address): New routine.
5972 (Detach): Add pragma Assert which ensures that a node is already
5974 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5975 since nodes are no longer removed on traversal. Explain why node
5976 detachment is undesirable in this case.
5977 (Get_Finalize_Address): New routine.
5978 (Hash): New routine.
5979 (Is_Empty_List): Removed.
5980 (pm): Renamed to Print_Master. Add output for discriminant
5982 Comment reformatting.
5983 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5984 * s-finmas.ads: Various comments additions / improvements.
5985 Type Finalization_Master has a discriminant which determines the mode of
5987 (Delete_Finalize_Address): New routine.
5988 (Get_Finalize_Address): New routine.
5989 (pm): Renamed to Print_Master.
5990 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5991 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5992 use clause for System.IO.
5993 (Allocate_Any_Controlled): Add machinery to set TSS primitive
5994 Finalize_Address depending on the mode of allocation and the mode of
5996 (Deallocate_Any_Controlled): Remove the relation pair object -
5997 Finalize_Address regardless of the master mode. Add comment explaining
5999 (Detach): Ensure that fields Prev and Next are null after detachment.
6000 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
6001 scheme to check whether the list of subpools is empty. There is no
6002 longer need to store the next subpool or advance the current pointer.
6003 (Is_Empty_List): New routine.
6004 (Print_Pool): New routine.
6005 (Print_Subpool): New routine.
6006 * s-stposu.ads: Various comments additions / improvements.
6007 Field Master of type Root_Subpool is now a heterogeneous collection.
6008 (Print_Pool): New routine.
6009 (Print_Subpool): New routine.
6011 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6013 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
6014 forms, using aspects of container types.
6015 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
6016 Has_Implicit_Dereference flags, that may be set on the partial view.
6017 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
6018 container type with an indexing aspect.
6019 (Analyze_Quantified_Expression): Analyze construct with expansion
6020 disabled, because it will be rewritten as a loop during expansion.
6021 (Try_Container_Indexing): The prefix itself may be a container type
6022 with an indexing aspect, as with a vector of vectors.
6023 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
6024 the original doamin of iteration, for name capture.
6025 (Analyze_Iterator_Specification): If the domain is an expression that
6026 needs finalization, create a separate declaration for it.
6027 For an iterator with "of" retrieve default iterator info from aspect of
6028 container type. For "in" iterator, retrieve type of Iterate function.
6029 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
6030 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
6031 analysis, to prevent spurious errors about late attributes.
6032 * sprint.adb: Handle quantified expression with either loop or iterator
6034 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
6037 2011-08-29 Vincent Celier <celier@adacore.com>
6039 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
6040 Binder or Linker of the main project file.
6042 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6044 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
6047 2011-08-29 Yannick Moy <moy@adacore.com>
6049 * exp_ch9.adb: Partial revert of previous change for Alfa mode
6051 2011-08-29 Yannick Moy <moy@adacore.com>
6053 * exp_ch11.adb: Minor expansion of comment.
6055 2011-08-29 Yannick Moy <moy@adacore.com>
6057 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
6059 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6061 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
6062 interpretation, set the type before resolving the operands, because
6063 legality checks on an exponention operand need to know the type of the
6066 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6068 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
6069 cleanups on a master if the instance is within a generic unit.
6070 Complement to the corresponding fix to inline.adb for K520-030.
6072 2011-08-29 Tristan Gingold <gingold@adacore.com>
6074 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
6076 * exp_intr.adb: Minor comment fix.
6078 2011-08-29 Bob Duff <duff@adacore.com>
6080 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
6081 Delay_Required was used as an uninitialized variable.
6083 2011-08-29 Robert Dewar <dewar@adacore.com>
6085 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
6086 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
6087 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
6089 2011-08-29 Thomas Quinot <quinot@adacore.com>
6091 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
6092 Remove unused variables.
6094 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6096 * sem_res.adb: Remove Build_Explicit_Dereference.
6097 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
6098 from sem_res.adb, used in analysis of additional constructs.
6099 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
6100 expansion of iterators.
6101 (Is_Object_Reference): Recognize variables rewritten as explicit
6102 dereferences in Ada2012.
6103 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
6104 Reversible_Iterator names, for expansion of Ada2012 iterators.
6105 * aspects.ads, aspects.adb (Find_Aspect): Utility.
6106 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
6107 linked list container.
6108 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
6109 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
6111 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6113 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
6116 2011-08-29 Vincent Celier <celier@adacore.com>
6118 * make.adb (Gnatmake): Get the maximum number of simultaneous
6119 compilation processes after the Builder switches has been scanned, as
6120 there may include -jnn.
6122 2011-08-29 Matthew Heaney <heaney@adacore.com>
6124 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
6126 2011-08-29 Tristan Gingold <gingold@adacore.com>
6128 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
6129 GNAT_DRIVER_COMMAND_LINE to 255.
6131 2011-08-29 Pascal Obry <obry@adacore.com>
6133 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
6134 reformatting and style fix (class attribute casing).
6136 2011-08-29 Yannick Moy <moy@adacore.com>
6138 * exp_ch11.adb: Yet another case where expansion should be common
6139 between CodePeer and Alfa.
6141 2011-08-29 Yannick Moy <moy@adacore.com>
6143 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
6145 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6147 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
6148 incomplete type and its completion match.
6150 2011-08-29 Yannick Moy <moy@adacore.com>
6152 * exp_ch13.adb: Adjust previous change.
6154 2011-08-29 Robert Dewar <dewar@adacore.com>
6156 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
6157 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
6160 2011-08-29 Emmanuel Briot <briot@adacore.com>
6162 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
6163 initialize aggregated projects.
6165 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6167 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
6168 depth of candidates to resolve a potentially spurious ambiguity between
6169 two visible subprograms.
6171 2011-08-29 Yannick Moy <moy@adacore.com>
6173 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
6175 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6176 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
6179 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6181 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
6184 2011-08-29 Thomas Quinot <quinot@adacore.com>
6186 * sem_res.adb: Minor reformatting.
6188 2011-08-29 Johannes Kanig <kanig@adacore.com>
6190 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
6192 * gnat1drv.adb (Adjust_Global_Switches): Set
6193 Use_Expressions_With_Actions to False in ALFA mode.
6194 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
6197 2011-08-29 Yannick Moy <moy@adacore.com>
6199 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
6200 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
6201 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
6202 tagged types and dispatching calls in Alfa mode.
6204 2011-08-29 Javier Miranda <miranda@adacore.com>
6206 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
6207 we do not report an error on an Empty node.
6209 2011-08-29 Geert Bosch <bosch@adacore.com>
6211 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
6212 a-nlrear.o and a-nurear.o.
6214 2011-08-29 Robert Dewar <dewar@adacore.com>
6216 * freeze.adb: Minor code reorganization.
6218 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6219 sem_ch6.adb: Minor reformatting
6221 2011-08-29 Tristan Gingold <gingold@adacore.com>
6223 * s-except.ads, s-except.adb: Provide dummy body.
6225 2011-08-29 Yannick Moy <moy@adacore.com>
6227 * sem_warn.adb (Within_Postcondition): Take into account the case of
6228 an Ensures component in a Test_Case.
6230 2011-08-29 Tristan Gingold <gingold@adacore.com>
6232 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6233 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6234 System_Exceptions_Debug
6235 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6236 * a-except.adb: With and use System.Exceptions_Debug instead of
6238 * a-except-2005.adb: Likewise.
6239 * s-assert.adb: Likewise.
6240 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6241 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
6242 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6243 s-excdeb. Update dependencies.
6244 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6245 as these no longer need external libraries.
6247 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6249 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6250 exponentiation operator on universal values in a context that requires
6253 2011-08-29 Tristan Gingold <gingold@adacore.com>
6255 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
6256 before calling notify_handled_exception.
6257 * a-exextr.adb: Fix comment.
6259 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6261 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6262 Finalize_Address of the access type's finalization master.
6263 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6264 access type's finalization master. Add a guard to prevent
6265 Associated_Storage_Pool from being set on .NET/JVM.
6266 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6267 attribute Finalize_Address of the access type's finalization master.
6268 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6269 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6270 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6272 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6273 use clause for System.IO
6274 (Detach): Relax the assertion, to be reinstated later.
6275 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6276 Relax the assertion on Finalize_Address, to be reinstated later.
6277 (Is_Empty_List): New routine.
6278 (pm): New debug routine.
6279 (Set_Finalize_Address): New routine.
6280 * s-finmas.ads (pm): New debug routine.
6281 (Set_Finalize_Address): New routine.
6282 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6284 2011-08-29 Tristan Gingold <gingold@adacore.com>
6286 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6287 Remove convention C.
6289 2011-08-29 Tristan Gingold <gingold@adacore.com>
6291 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6292 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6293 (Finalize_TCB): Remove its finalization.
6294 (Initialize): Remove assignment of GET_Exc_Stack_Addr
6295 * s-soflin.adb (NT_Exc_Stack): Remove
6296 (Get_Exc_Stack_Addr_NT): Likewise.
6297 (Get_Exc_Stack_Addr_Soft): Likewise.
6298 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6299 (Get_Exc_Stack_Addr): Likewise.
6300 (Get_Exc_Stack_Addr_Soft): Likewise
6301 * s-taspri-vms.ads (Exc_Stack_T): Remove.
6302 (Exc_Stack_Ptr_T): Likewise.
6303 (Private_Data): Remove Exc_Stack_Ptr component.
6305 2011-08-29 Tristan Gingold <gingold@adacore.com>
6307 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6309 2011-08-29 Tristan Gingold <gingold@adacore.com>
6311 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6313 2011-08-29 Geert Bosch <bosch@adacore.com>
6315 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6316 L2_Norm, Swap_Column): New generic subprograms
6317 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6318 L2_Norm, Swap_Column): Implement new subprograms in order to
6319 eliminate dependency on BLAS and LAPACK libraries in
6320 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6321 version. Forward_Eliminate/Back_Substitute can be used to put a
6322 matrix in row echelon or reduced row echelon form using partial
6324 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6325 Swap_Column): Instantiate from System.Generic_Array_Operations.
6326 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6327 (Sqrt): Local function for simple computation of square root without
6328 adding dependencies on Generic_Elementary_Functions.
6329 (Swap): New subprogram to exchange floating point numbers.
6330 (Inverse): Reimplement using Jordan-Gauss elimination.
6331 (Jacobi): New procedure implementing Jacobi's method for computation
6332 of eigensystems, based on Rutishauser's implementation.
6333 (L2_Norm): Implement directly using the inner product.
6334 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6335 decreasing eigenvalue as required by the Ada RM.
6336 (Swap_Column): New helper procedure for Sort_Eigensystem.
6337 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6338 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6341 2011-08-29 Thomas Quinot <quinot@adacore.com>
6343 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6346 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6348 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6349 than the current node.
6350 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6351 Finalization_Master. The list headers have two fields instead of three.
6352 This should fix alignment issue but subpool allocations are now
6353 unusable. Alphabetize subprograms.
6354 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6355 the size of the header when converting the beginning of the object to
6356 a FM_Node. Set the master's Finalize_Address attribute if not already
6358 (Deallocate_Any_Controlled): Use the offset rather than the size of the
6359 header when converting the beginning of the object to a FM_Node.
6361 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6363 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6364 reraise when compiling for CodePeer.
6366 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6368 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6369 now needed by a-convec.adb. Fix warning.
6371 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6373 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6374 processing of TSS routine Finalize_Address when compiling in
6377 2011-08-29 Thomas Quinot <quinot@adacore.com>
6379 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6380 sem_warn.adb: Minor reformatting.
6382 2011-08-29 Emmanuel Briot <briot@adacore.com>
6384 * prj-conf.adb (Get_Config_Switches): Also collect the list of
6385 languages from aggregated projects.
6387 2011-08-29 Yannick Moy <moy@adacore.com>
6389 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6390 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6391 Traverse_Package_Declaration, Traverse_Subprogram_Body,
6392 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6393 for stubs are traversed too when parameter is set
6394 (Traverse_All_Compilation_Units): Traverse without going inside stubs
6395 (Traverse_Declarations_Or_Statements): Do the special traversing for
6396 stubs when required.
6397 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6398 return subprogram or package body from stub.
6399 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6400 stubs without prior subprogram decl.
6402 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6404 * gnat_ugn.texi: Fix typo.
6406 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6408 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6409 which accounts for size vs alignment issues and calculates the size of
6411 (Deallocate_Any_Controlled): Ditto.
6412 (Nearest_Multiple_Rounded_Up): New routine.
6414 2011-08-29 Tristan Gingold <gingold@adacore.com>
6416 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6417 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6418 (Set_Exception_Msg): Ditto.
6419 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
6421 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6422 Use Save_Occurrence instead of Save_Occurrence_No_Private.
6423 (Raise_With_Msg): Remove Cleanup_Flag.
6424 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6425 Clean_Flag and Private_Data components.
6427 2011-08-29 Yannick Moy <moy@adacore.com>
6429 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6431 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6432 of an explicitly declared type, so that the base types of the original
6433 type and this generated type are the same, and a "type" (not a subtype
6435 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6436 small" in Alfa mode, like in CodePeer mode.
6437 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6438 clauses in Alfa mode.
6440 2011-08-29 Javier Miranda <miranda@adacore.com>
6442 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6443 function to the package spec.
6444 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6445 internally generated bodies of null procedures locate the internally
6446 generated spec enforcing mode conformance.
6447 (Is_Interface_Conformant): Ensure that the controlling formal of the
6450 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6452 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6453 reject the pragma if it appears to apply to a formal subprogram.
6455 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6457 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6458 inner expression, to prevent double evaluation.
6460 2011-08-29 Tristan Gingold <gingold@adacore.com>
6462 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6464 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6465 * a-except-2005.adb (Propagate_Exception): Adjust spec.
6466 (Raise_Current_Excep): Adjust call.
6467 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6469 2011-08-29 Thomas Quinot <quinot@adacore.com>
6471 * exp_disp.adb: Minor reformatting.
6473 2011-08-29 Tristan Gingold <gingold@adacore.com>
6475 * a-exexpr.adb (Setup_Exception): Removed.
6476 * a-exexpr-gcc.adb (Setup_Exception): Removed.
6477 * a-except.adb (Exception_Propagation): Removed.
6478 * a-except-2005.adb (Setup_Exception): Removed.
6479 (Reraise): Remove call to Setup_Exception.
6480 (Reraise_Occurrence): Ditto.
6481 (Reraise_Occurrence_Always): Ditto.
6482 (Reraise_Occurrence_No_Defer): Ditto.
6483 (Transfer_Occurrence): Ditto.
6484 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6485 (Set_Exception_Msg): Ditto.
6487 2011-08-29 Robert Dewar <dewar@adacore.com>
6489 * a-convec.adb, exp_disp.adb: Minor reformatting.
6491 2011-08-29 Tristan Gingold <gingold@adacore.com>
6493 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6495 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6497 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6498 Exception_Handlers to No_List instead of Empty_List in the case where
6499 there are no handlers.
6501 2011-08-29 Tristan Gingold <gingold@adacore.com>
6503 * gcc-interface/gigi.h (enum standard_datatypes): Add
6504 ADT_reraise_zcx_decl
6505 (reraise_zcx_decl): New macro.
6506 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6507 (gigi): Set reraise_zcx_decl.
6508 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6509 (gnat_to_gnu): Handle N_Raise_Statement.
6511 2011-08-29 Robert Dewar <dewar@adacore.com>
6513 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6514 a-undesu.adb: Minor reformatting.
6516 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6518 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6519 table, accept an unfrozen untagged component if it is an actual for a
6520 formal incomplete type.
6521 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6522 provide new iterator forms over vectors.
6523 Introduce type Iterator in package body to implement operations of
6524 Reversible_Iterator interface.
6525 * a-iteint.ads: Make package pure so it is usable with new container
6526 packages, that are categorized Remote_Types.
6528 2011-08-29 Robert Dewar <dewar@adacore.com>
6530 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6532 2011-08-29 Bob Duff <duff@adacore.com>
6534 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6535 of <>, because this is the routine that checks for dimensionality
6536 errors (for example, for a two-dimensional array, (others => <>) should
6537 be (others => (others => <>)).
6539 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6541 * impunit.adb: Add new run-time units.
6542 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6543 s-stposu.ads, s-stposu.adb: Code clean up.
6544 Handle protected class-wide or task class-wide types
6545 Handle C/C++/CIL/Java types.
6546 * s-spsufi.adb, s-spsufi.ads: New files.
6548 2011-08-29 Yannick Moy <moy@adacore.com>
6550 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6551 library-level subprogram.
6552 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6554 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6556 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6558 * gnat_rm.texi: Update doc for Test_Case pragma.
6560 2011-08-29 Tristan Gingold <gingold@adacore.com>
6562 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6564 (GCC_Exception_Access): New type.
6565 (Unwind_DeleteException): New imported procedure
6566 (Foreign_Exception): Import it.
6567 (GNAT_GCC_Exception): Simply have the occurrence inside.
6568 (To_GCC_Exception): New function.
6569 (To_GNAT_GCC_Exception): New function.
6570 (GNAT_GCC_Exception_Cleanup): New procedure..
6571 (Propagate_GCC_Exception): New procedure.
6572 (Reraise_GCC_Exception): New procedure.
6573 (Setup_Current_Excep): New procedure.
6574 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6575 (Unwind_RaiseException): Ditto.
6576 (Unwind_ForcedUnwind): Ditto.
6578 (Begin_Handler): Change type of parameter.
6579 (End_Handler): Ditto. Now delete the exception if still present.
6580 (Setup_Key): Removed.
6581 (Is_Setup_And_Not_Propagated): Removed.
6582 (Set_Setup_And_Not_Propagated): Ditto.
6583 (Clear_Setup_And_Not_Propagated): Ditto.
6584 (Save_Occurrence_And_Private): Ditto.
6585 (EID_For): Add 'not null' constraint on parameter.
6586 (Setup_Exception): Does nothing.
6587 (Propagate_Exception): Simplified.
6588 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6589 re-raise is not expanded anymore.
6590 * s-except.ads (Foreign_Exception): New exception - placeholder for
6592 * raise-gcc.c (__gnat_setup_current_excep): Declare
6593 (CXX_EXCEPTION_CLASS): Define (not yet used)
6594 (GNAT_EXCEPTION_CLASS): Define.
6595 (is_handled_by): Handle foreign exceptions.
6596 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6598 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6600 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6602 2011-08-29 Thomas Quinot <quinot@adacore.com>
6604 * a-synbar-posix.adb: Minor reformatting.
6606 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6608 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6609 a-exetim-default.ads (Interrupt_Clocks_Supported,
6610 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6611 definitions to be compliant with AI-0171. The target systems do not
6612 support separate account for the execution time of interrupt handlers.
6614 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6616 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6617 in the barrier to put first the easiest to evaluate (and the one which
6618 will be True more often). More efficient.
6620 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6622 * s-atocou-x86.adb: Fix constraint in machine code insertion.
6624 2011-08-29 Bob Duff <duff@adacore.com>
6626 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6627 attributes that are now aspects, as specified by AI05-0229-1.
6628 * sem_ch13.adb (Analyze_Aspect_Specifications,
6629 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6630 pragmas or attribute references, as appropriate.
6632 2011-08-29 Robert Dewar <dewar@adacore.com>
6634 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6635 a-synbar-posix.ads: Minor reformatting.
6637 2011-08-29 Yannick Moy <moy@adacore.com>
6639 * snames.ads-tmpl: Add name Force.
6641 2011-08-29 Pascal Obry <obry@adacore.com>
6643 * prj-nmsc.adb: Minor reformatting.
6645 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6647 * a-exetim.ads (Interrupt_Clocks_Supported,
6648 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6649 definitions to be compliant with AI-0171.
6651 2011-08-29 Robert Dewar <dewar@adacore.com>
6653 * a-ngelfu.adb: Add comments.
6655 2011-08-29 Geert Bosch <bosch@adacore.com>
6657 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6658 the closest machine number to Pi / 2.0.
6660 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6662 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6663 package Ada.Synchronous_Barriers.
6664 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6665 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6666 default implementation using protected objects and another one
6667 a-synbar-posix using POSIX barriers as the underlying support.
6668 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6669 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6670 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6671 Clean up dependencies.
6672 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6674 2011-08-29 Robert Dewar <dewar@adacore.com>
6676 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6677 exp_dist.adb: Minor code reorganization.
6680 2011-08-29 Thomas Quinot <quinot@adacore.com>
6682 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6683 primitive operation must support external streaming if it is not a
6684 controlling access result.
6686 2011-08-29 Thomas Quinot <quinot@adacore.com>
6688 * sinfo.ads, sem_ch7.adb: Minor reformatting.
6690 2011-08-29 Bob Duff <duff@adacore.com>
6692 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6693 restriction on allocators, as required by AI05-0013-1.
6694 * restrict.ads: Minor comment fix.
6696 2011-08-29 Tristan Gingold <gingold@adacore.com>
6698 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6699 (To_Jmpbuf_Address): Ditto
6700 (builtin_longjmp): Ditto
6702 2011-08-29 Thomas Quinot <quinot@adacore.com>
6704 * sem_res.adb: Minor reformatting.
6706 2011-08-29 Vincent Celier <celier@adacore.com>
6708 * make.adb (Gnatmake): Move special processing for VM targets after the
6709 call to Get_Target_Parameters.
6711 2011-08-29 Thomas Quinot <quinot@adacore.com>
6713 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6715 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6717 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6718 where an anonymous access discriminant of a limited designated type
6719 appears in a non-immutably limited discriminated type and issue an
6720 error message. Add local variable Desig_T and replace all occurrences
6723 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6725 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6726 implementation is compliant to RM D.15(15/2) after the modification
6727 imposed by AI05-0094-1 (binding interpretation).
6729 2011-08-29 Robert Dewar <dewar@adacore.com>
6731 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6732 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6734 2011-08-29 Thomas Quinot <quinot@adacore.com>
6736 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6737 the scope name, do not report a missing label as a style violation (it
6738 will be diagnosed as an illegality).
6739 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6740 variant records: Get_Enum_Lit_From_Pos already returns a usage
6741 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6742 on Expr in Integer_Literal case so that it can be used by
6745 2011-08-29 Tristan Gingold <gingold@adacore.com>
6747 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6749 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6750 (Build_Abort_Block_Handler): New function to build an Abort_Signal
6752 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6753 Build_Abort_Block_Handler to build the exception handler. Do not
6754 undefer aborts for the Abort_Signal exception handler if back-end
6755 exception mechanism.
6756 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6757 back_end exceptions for all others and abort_signal.
6758 * s-except.ads (ZCX_By_Default): New constant.
6759 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6760 (Raise_Exception_Always): Ditto.
6761 (Raise_From_Signal_Handler): Ditto.
6762 (Raise_With_Location_And_Msg): Ditto.
6763 (Raise_With_Msg): Ditto.
6765 (Reraise_Occurence): Ditto.
6766 (Reraise_Occurrence_Always): Ditto.
6767 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6768 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6770 2011-08-29 Thomas Quinot <quinot@adacore.com>
6772 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6774 2011-08-29 Robert Dewar <dewar@adacore.com>
6776 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6777 Minor code reorganization.
6779 2011-08-29 Bob Duff <duff@adacore.com>
6781 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6782 2012, not just Ada 2005.
6784 2011-08-29 Vincent Celier <celier@adacore.com>
6786 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6787 with a project file or with gprbuid, if -gnatep= is specified, the
6788 builder may need to be invoked with -x.
6790 2011-08-29 Tristan Gingold <gingold@adacore.com>
6792 * a-exexpr-gcc.adb: Minor comment fix.
6794 2011-08-29 Robert Dewar <dewar@adacore.com>
6796 * sem_ch8.adb: Minor reformatting.
6798 2011-08-29 Bob Duff <duff@adacore.com>
6800 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6801 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6802 treating "some" as unreserved in earlier Ada versions. This is now
6803 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6804 rather than Name_Some, since Tok_Some is now recognized as reserved.
6805 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6807 * scans.ads: Minor comment fixes.
6808 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6809 for other language versions.
6810 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6811 treating "some" as unreserved in earlier Ada versions. This is now
6812 handled in Snames.Is_Keyword_Name.
6813 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6815 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6816 unreserved in earlier Ada versions. This is now handled in
6817 Snames.Is_Keyword_Name.
6818 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6819 words as for other language versions.
6820 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6821 Ada 2012, not just Ada 2005.
6823 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6825 * sem_ch13.adb: Additional semantic checks for aspects involved in
6828 2011-08-29 Matthew Heaney <heaney@adacore.com>
6830 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
6831 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
6832 Container parameter.
6833 (Ancestor_Find): ditto.
6835 2011-08-29 Thomas Quinot <quinot@adacore.com>
6837 * par-endh.adb: Minor reformatting.
6839 2011-08-29 Tristan Gingold <gingold@adacore.com>
6841 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
6842 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
6843 (Adjust_N_CLeanups_For): Remove.
6844 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
6846 (Propgate_Exception): Adjust.
6847 * raise-gcc.c: Add a few static/const.
6848 (Adjust_N_Cleanups_For): Remove declaration.
6849 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
6851 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6853 * sem_ch8.adb: Use type of function return when rewriting as object
6856 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6858 * sem_type.adb: Minor reformatting.
6860 2011-08-29 Robert Dewar <dewar@adacore.com>
6862 * makeutl.adb: Minor reformatting.
6864 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6866 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
6867 function call of a limited type, the expansion of the renaming is
6868 complicated by the presence of various temporaries and subtypes that
6869 capture constraints of the renamed object.
6870 Rewrite node as an object declaration, whose expansion is simpler.
6871 Given that the object is limited there is no copy involved and no
6874 2011-08-29 Robert Dewar <dewar@adacore.com>
6876 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
6877 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
6879 2011-08-29 Tristan Gingold <gingold@adacore.com>
6881 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
6882 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
6883 system-linux-hppa.ads, system-linux-s390.ads,
6884 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
6885 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
6886 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
6887 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
6888 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
6889 system-solaris-sparc.ads, system-lynxos-x86.ads,
6890 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
6891 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
6892 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
6893 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
6894 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
6895 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
6896 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
6897 * opt.ads: Adjust comment.
6898 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
6899 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
6900 * system.ads: Move GCC_ZCX_Support to obsolete entries.
6902 2011-08-29 Emmanuel Briot <briot@adacore.com>
6904 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
6905 file name is specified on the gnatmake or gprbuild command line, and
6906 before we search for that file in the project.
6908 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6910 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
6911 used to determine whether a possible interpretation for an overloadable
6912 entity is declared within the current instantiation and should be
6913 included in the candidate set.
6915 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6917 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
6919 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6921 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
6922 access subtype is access_to_subprogram, when applying checks for
6925 2011-08-29 Matthew Heaney <heaney@adacore.com>
6927 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
6928 for sibling when common parent.
6930 2011-08-29 Thomas Quinot <quinot@adacore.com>
6932 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
6935 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6937 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
6938 for the return type when in ASIS mode.
6940 2011-08-29 Vincent Celier <celier@adacore.com>
6942 * make.adb (Gnatmake): Get the default search dirs, then the target
6943 parameters after getting the Builder switches, as the Builder switches
6944 may include --RTS= and that could change the default search dirs.
6946 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6948 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
6949 Make_Final_Call. Move the processing for class-wide types before the
6950 processing for derivations from [Limited_]Controlled.
6951 (Make_Final_Call): Move the processing for class-wide types before the
6952 processing for derivations from [Limited_]Controlled.
6953 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
6954 Add code to account for alignments larger than the list header. Add a
6955 comment illustrating the structure of the allocated object + padding +
6957 (Deallocate_Any_Controlled): Add code to account for alignments larger
6958 than the list header.
6960 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6962 * sinfo.ads, sinfo.adb: New node kind
6963 N_Formal_Incomplete_Type_Definition, related flags.
6964 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6965 Parse formal incomplete types.
6966 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6968 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6969 Formal incomplete types do not need completion.
6970 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6971 Validate_Incomplete_Type_Instance): New procedures to handle formal
6973 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6974 that corresponds to a formal incomplete type.
6975 * sprint.adb: Handle formal incomplete type declarations.
6976 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6979 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6981 * a-fihema.ads, a-fihema.adb: Unit removed.
6982 * a-undesu.ads, a-undesu.adb: New unit implementing
6983 Ada.Unchecked_Deallocate_Subpool.
6984 * einfo.adb: Remove Associated_Collection from the node usage.
6985 Add Finalization_Master to the node usage.
6986 (Associated_Collection): Removed.
6987 (Finalization_Master): New routine.
6988 (Set_Associated_Collection): Removed.
6989 (Set_Finalization_Master): New routine.
6990 (Write_Field23_Name): Remove Associated_Collection from the output. Add
6991 Finalization_Master to the output.
6992 * einfo.ads: Remove attribute Associated_Collection and its uses in
6994 Add new attribute Finalization_Master along with its uses in entitites.
6995 (Associated_Collection): Removed along with its pragma import.
6996 (Finalization_Master): New routine along with a pragma import.
6997 (Set_Associated_Collection): Removed along with its pragma import.
6998 (Set_Finalization_Master): New routine along with a pragma import.
6999 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
7000 Build_Finalization_Collection with Build_Finalization_Master.
7001 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
7002 before the bodies of the predefined routines. Add comment explaining
7003 this. Replace call to Build_Finalization_Collection with
7004 Build_Finalization_Master.
7005 (Freeze_Type): Replace call to Build_Finalization_Collection with
7006 Build_Finalization_Master.
7007 (Make_Finalize_Address_Body): Comment reformatting.
7008 (Make_Predefined_Primitive_Specs): Code reformatting.
7009 (Stream_Operation_OK): Update comment mentioning finalization
7010 collections. Replace RE_Finalization_Collection with
7011 RE_Finalization_Master.
7012 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
7013 Associated_Collection with Finalization_Master. Replace call to
7014 Build_Finalization_Collection with Build_Finalization_Master.
7015 (Expand_Allocator_Expression): Replace call to Associated_Collection
7016 with Finalization_Master. Replace call to Set_Associated_Collection with
7017 Set_Finalization_Master. Remove the generation of
7018 Set_Finalize_Address_Ptr.
7019 (Expand_N_Allocator): Replace call to Associated_Collection with
7020 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
7021 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
7022 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
7023 comment on usage. Replace call to Needs_BIP_Collection with
7024 Needs_BIP_Finalization_Master Remplace BIP_Collection with
7025 BIP_Finalization_Master. Update all comments which mention finalization
7026 collections. Replace Associated_Collection with
7027 Finalization_Master. Replace Build_Finalization_Collection with
7028 Build_Finalization_Master.
7029 (BIP_Formal_Suffix): Update BIP_Collection's case.
7030 (Build_Heap_Allocator): Update the related comment. Rename local
7031 variable Collect to Fin_Mas_Id and update its occurrences. Update
7032 comments which mention finalization collections. Replace
7033 Set_Associated_Collection with Set_Finalization_Master.
7034 (Expand_Call): Update the code which detects a special piece of library
7036 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
7037 Add_Collection_Actual_To_Build_In_Place_Call with
7038 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
7039 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
7040 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
7041 Add_Collection_Actual_To_Build_In_Place_Call with
7042 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7043 (Make_Build_In_Place_Call_In_Assignment): Replace call to
7044 Add_Collection_Actual_To_Build_In_Place_Call with
7045 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7046 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7047 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
7048 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7049 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
7050 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
7051 Replace call to Set_Associated_Collection with Set_Finalization_Master.
7052 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
7053 Replace the call to Associated_Collection with Finalization_Master.
7054 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
7055 Update the way finalization master names are generated. Update the
7056 retrieval of the correct access type which will carry the pool and
7058 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
7059 (Make_Finalize_Address_Body): Abstract types do not need
7060 Finalize_Address. Code reformatting.
7061 (Make_Finalize_Address_Stmts): Update comment on usage.
7062 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7063 (Process_Declarations): Update comments.
7064 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
7065 Build_Finalization_Master. Update associated comment.
7066 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7067 * exp_ch13.adb: Update comments which mention finalization collections.
7068 (Expand_N_Free_Statement): Replace the call to Associated_Collection
7069 with Finalization_Master.
7070 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
7071 create calls to routines Allocate_Any_Controlled and
7072 Deallocate_Any_Controlled.
7073 (Find_Finalize_Address): New routine.
7074 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
7076 (Requires_Cleanup_Actions): Update the comment on freeze node
7078 * exp_util.ads: Remove comment on generated code for
7079 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
7080 is better to simply look in the body.
7081 * freeze.adb (Freeze_All): Update the comment of finalization
7082 collections. Replace the call to Associated_Collection with
7083 Finalization_Master. Replace the call to Build_Finalization_Collection
7084 with Build_Finalization_Master.
7085 * impunit.adb: Add a-undesu and s-stposu to the list of units.
7086 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
7088 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
7089 Ada.Finalization. Add processing for children of System.Storage_Pools.
7090 * rtsfind.ads: Remove the naming of second level children of
7092 Remove Ada_Finalization_Heap_Management from the list of units.
7093 Remove subtype Ada_Finalization_Child.
7094 Remove the following subprogram entities:
7098 RE_Finalization_Collection
7099 RE_Finalization_Collection_Ptr
7100 RE_Set_Finalize_Address_Ptr
7102 Add the naming of second level children of System.Storage_Pools.
7103 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
7105 Add subtype System_Storage_Pools_Child.
7106 Add the following subprogram entities to System.Finalization_Masters:
7108 RE_Finalization_Master
7109 RE_Finalization_Master_Ptr
7111 Add the following subprogram entities to System.Storage_Pools.Subpools:
7113 RE_Allocate_Any_Controlled
7114 RE_Deallocate_Any_Controlled
7115 RE_Root_Storage_Pool_With_Subpools
7119 Move the following subprogram entities from
7120 Ada.Finalization.Heap_Management to System.Finalization_Masters:
7122 RE_Add_Offset_To_Address
7127 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
7128 Set_Associated_Collection with Set_Finalization_Master.
7129 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
7130 BIP_Finalization_Master is created.
7131 * s-finmas.adb: New unit System.Finalization_Masters.
7132 * s-finmas.ads: New unit System.Finalization_Masters.
7133 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
7134 * s-stposu.ads, s-stposu.adb: New unit implementing
7135 System.Storage_Pools.Subpools.
7137 2011-08-29 Bob Duff <duff@adacore.com>
7139 * tbuild.adb: Add assertion.
7141 2011-08-29 Thomas Quinot <quinot@adacore.com>
7143 * s-pooglo.adb: Minor reformatting.
7145 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7147 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
7148 an indexed component of a packed array whose element type is a record
7149 with a representation clause different from that of the right-hand
7150 side, generate a temporary to minimuze the number of bit-field
7151 operations generated.
7153 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7155 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
7156 declarations, and thus are likely insertion points for actions.
7158 2011-08-29 Bob Duff <duff@adacore.com>
7160 * einfo.ads: Minor comment fix.
7162 2011-08-29 Robert Dewar <dewar@adacore.com>
7164 * frontend.adb, gnat1drv.adb: Minor reformatting.
7166 2011-08-29 Tristan Gingold <gingold@adacore.com>
7168 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
7169 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
7170 space in front of the header.
7172 2011-08-29 Johannes Kanig <kanig@adacore.com>
7174 * frontend.adb (Frontend): Exit after creating Standard package when
7175 -gnatd.H is present.
7176 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
7179 2011-08-29 Robert Dewar <dewar@adacore.com>
7181 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
7182 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
7183 snames.ads-tmpl: Minor reformatting.
7185 2011-08-29 Philippe Gil <gil@adacore.com>
7187 * prj.adb (Reset_Units_In_Table): New procedure.
7188 Reset units to avoid access to freed memory.
7190 2011-08-29 Thomas Quinot <quinot@adacore.com>
7192 * get_scos.adb: When reading a P statement SCO without a pragma name
7193 (from an older ALI file), ensure that the Pragma_Name component is set
7194 to Unknown_Pragma (not left uninitialized).
7196 2011-08-29 Vincent Celier <celier@adacore.com>
7198 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
7199 modified to compute correctly the object path of a SAL project that is
7200 extending another library project.
7201 (Write_Path_File): New procedure.
7202 * makeutl.ads (Directories): New table moved from Buildgpr
7203 (Get_Directories): New procedure moved from Buildgpr
7204 (Write_Path_File): New procedure
7205 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
7206 paths before binding SALs, instead of Set_Ada_Paths.
7207 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
7209 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
7210 (Current_Source_Path_File_Of): New function
7211 (Set_Current_Object_Path_File_Of): New procedure
7212 (Current_Source_Object_File_Of): New function
7213 (Set_Current_Object_Path_File_Of): New procedure
7214 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
7215 (Current_Source_Path_File_Of): New function
7216 (Set_Current_Object_Path_File_Of): New procedure
7217 (Current_Source_Object_File_Of): New function
7218 (Set_Current_Object_Path_File_Of): New procedure
7220 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7222 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7223 packed entity, use a bit-field assignment only if there is no change of
7226 2011-08-29 Thomas Quinot <quinot@adacore.com>
7228 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7229 Is_RTU instead of using Chars comparisons.
7231 2011-08-29 Thomas Quinot <quinot@adacore.com>
7233 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7234 temporary object if the actual is constrained, and the discriminants
7235 read from the stream don't match.
7237 2011-08-29 Tristan Gingold <gingold@adacore.com>
7239 * sem_attr.adb, exp_attr.adb: Add handling of
7240 Attribute_System_Allocator_Alignment
7241 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7242 Attribute_System_Allocator_Alignment.
7243 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7244 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7245 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7246 get_target_system_allocator_alignment.
7248 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7250 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7253 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7255 * exp_ch3.adb (In_Runtime): Fix typo.
7257 2011-08-29 Bob Duff <duff@adacore.com>
7259 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7261 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7263 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7264 and a separate tag assignment is generated, ensure that the tag
7265 assignment is analyzed.
7267 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7269 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7270 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7271 of statement lists that may contain local declarations.
7272 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7273 duplicate the triggering statements needed for the expansion of this
7274 construct, when the trigger is a dispatching call to a synchronized
7277 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7279 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7280 * bindgen.adb: Add comments.
7281 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7284 2011-08-29 Robert Dewar <dewar@adacore.com>
7286 * exp_attr.adb: Minor reformatting.
7287 Minor code reorganization and commenting.
7288 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7291 2011-08-29 Thomas Quinot <quinot@adacore.com>
7293 * get_scos.adb: Ignore chaining indicators not currently supported
7296 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7298 * system.ads: Minor editing.
7300 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7302 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7304 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7305 Attribute_Elab_Subp_Body.
7306 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7307 * sem_util.adb: Update comments.
7309 2011-08-29 Thomas Quinot <quinot@adacore.com>
7311 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7312 pragma name for each SCO statement corresponding to a pragma.
7314 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7316 * opt.ads: Minor editing.
7318 2011-08-29 Yannick Moy <moy@adacore.com>
7320 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7321 that only made sense for CodePeer mode.
7323 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7325 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7326 which is no longer used.
7327 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7328 handling of the 64-bit division check.
7329 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7331 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7334 2011-08-29 Thomas Quinot <quinot@adacore.com>
7336 * get_scos.adb: Minor reformatting.
7338 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7340 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7341 statement list is wrapped in a block, the block is explicitly analyzed
7342 in order to properly redecorate the entities and create a servicing
7345 2011-08-29 Tristan Gingold <gingold@adacore.com>
7347 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7348 (Set_Zero_Cost_Handling): Remove.
7350 2011-08-29 Thomas Quinot <quinot@adacore.com>
7352 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7354 2011-08-29 Geert Bosch <bosch@adacore.com>
7356 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7357 instruction, as the latter may produce -0.0, which is not a valid VAX
7359 (Neg_G): Likewise for VAX F float.
7361 2011-08-29 Robert Dewar <dewar@adacore.com>
7363 * exp_util.adb: Minor reformatting.
7365 2011-08-29 Yannick Moy <moy@adacore.com>
7367 * sem_ch3.adb: Minor comment update.
7369 2011-08-29 Thomas Quinot <quinot@adacore.com>
7371 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7374 2011-08-29 Thomas Quinot <quinot@adacore.com>
7376 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7377 current statement sequence on a generic instantiation or a subprogram
7380 2011-08-29 Robert Dewar <dewar@adacore.com>
7382 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7385 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7387 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7388 Correct the check which involves the freeze node of a controlled or
7389 access-to-controlled type.
7391 2011-08-29 Geert Bosch <bosch@adacore.com>
7393 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7395 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7398 2011-08-29 Yannick Moy <moy@adacore.com>
7400 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7401 for every index type and component type that is not a subtype_mark.
7402 (Process_Subtype): Set Etype of subtype.
7404 2011-08-29 Robert Dewar <dewar@adacore.com>
7406 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7407 reorganization. Minor reformatting.
7409 2011-08-29 Steve Baird <baird@adacore.com>
7411 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7412 for CodePeer and ALFA modes.
7414 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7416 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7417 that comes from an enclosing scope if it is not the renaming of an
7418 actual, to handle properly a spurious ambiguity in an instance.
7420 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
7422 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7423 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
7424 use it instead of the Esize of the first parameter.
7425 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7427 <Size>: Likewise. Call it for composite types on the RM size.
7429 2011-08-29 Yannick Moy <moy@adacore.com>
7431 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7432 * sem_util.adb (Unique_Name): Correct behaviour for names of
7435 2011-08-29 Yannick Moy <moy@adacore.com>
7437 * sem_prag.adb (Check_Precondition_Postcondition): In formal
7438 verification mode, analyze pragma expression for correctness, for
7439 pre/post on library-level subprogram, as it is not expanded later.
7441 2011-08-29 Yannick Moy <moy@adacore.com>
7443 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7444 in formal verification.
7446 2011-08-29 Thomas Quinot <quinot@adacore.com>
7448 * sem_util.adb: Minor reformatting.
7449 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7451 * par_sco.ads, par_sco.adb: Update comments.
7453 2011-08-29 Yannick Moy <moy@adacore.com>
7455 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7456 associated getter/setter.
7457 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7459 2011-08-29 Vincent Celier <celier@adacore.com>
7461 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7462 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7463 with declarations for Language_Kind and Dependency_Kind for Ada.
7464 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7465 (Process_Compiler): Take into account the new attributes Dependency_Kind
7467 (Check_Configuration): Check if language kind is unit based, not if the
7468 language name is Ada.
7469 (Process_Exceptions_Unit_Based): Ditto
7470 (Add_Language): Remove default additions of language and dependency kind
7471 * prj.ads: Minor comment change
7472 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7474 2011-08-29 Johannes Kanig <kanig@adacore.com>
7476 * debug.adb: Update comments.
7478 2011-08-24 Joseph Myers <joseph@codesourcery.com>
7480 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7481 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7482 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7483 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7484 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7486 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7488 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7489 (GNATLIBCFLAGS_FOR_C): Replace
7490 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7491 (gnatlib-shared-default, gnatlib-shared-dual-win32)
7492 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7493 (gnatlib-sjlj, gnatlib-zcx): Likewise.
7495 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
7497 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7499 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7501 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7503 2011-08-05 Nicolas Roche <roche@adacore.com>
7505 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7506 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7508 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7510 2011-08-05 Matthew Heaney <heaney@adacore.com>
7512 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7513 subprogram bodies declared out-of-order.
7515 2011-08-05 Yannick Moy <moy@adacore.com>
7517 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7518 entities directly in package Standard, otherwise skip the standard
7521 2011-08-05 Robert Dewar <dewar@adacore.com>
7523 * a-cbmutr.adb: Minor reformatting
7524 (Allocate_Node): refactor node allocation algorithm
7526 2011-08-05 Robert Dewar <dewar@adacore.com>
7528 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7529 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7531 (Analyze_Pragma, case Check_Policy): Ditto.
7532 * sem_prag.ads (Check_Disabled): New function
7533 * snames.ads-tmpl: Add Name_Disable.
7535 2011-08-05 Robert Dewar <dewar@adacore.com>
7537 * gnat_rm.texi: Document implementation-defined policy DISABLE for
7538 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7540 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7542 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7543 that appears in a generic formal part and applies to a formal
7546 2011-08-05 Robert Dewar <dewar@adacore.com>
7548 * a-cbmutr.ads: Minor reformatting.
7550 2011-08-05 Matthew Heaney <heaney@adacore.com>
7552 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7553 to check count, check sign of value instead.
7554 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7555 (Copy_Subtree): allocate copy of source element
7556 (Equal_Subtree): compare elements, not access objects
7558 2011-08-05 Vincent Celier <celier@adacore.com>
7560 * gnat_ugn.texi: Fix VMS alternative.
7562 2011-08-05 Thomas Quinot <quinot@adacore.com>
7564 * sem_ch11.adb: Add comment.
7566 2011-08-05 Robert Dewar <dewar@adacore.com>
7568 * exp_util.adb: Minor comment fix.
7570 2011-08-05 Robert Dewar <dewar@adacore.com>
7572 * scng.adb (Error_Unterminated_String): Improve flag position when
7575 2011-08-05 Matthew Heaney <heaney@adacore.com>
7577 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7579 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7580 multiway tree containers.
7582 2011-08-05 Robert Dewar <dewar@adacore.com>
7584 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7585 * stylesw.adb: Implement -gnatyC to control comment spacing
7586 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7588 * usage.adb: Add line for -gnatyC.
7590 2011-08-05 Robert Dewar <dewar@adacore.com>
7592 * gnat_ugn.texi: Document -gnatyC.
7593 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7594 synonym for COMMENTS2).
7596 2011-08-05 Robert Dewar <dewar@adacore.com>
7598 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7599 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7600 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7601 a-comutr.ads, lib-xref.adb: Minor reformatting.
7603 2011-08-05 Robert Dewar <dewar@adacore.com>
7605 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7606 warning if there is an exception handler present.
7608 2011-08-05 Pascal Obry <obry@adacore.com>
7610 * a-iteint.ads: Fix copyright year.
7612 2011-08-05 Thomas Quinot <quinot@adacore.com>
7614 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7615 statement SCO for a USE clause or a representation clause.
7617 2011-08-05 Yannick Moy <moy@adacore.com>
7619 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7620 between body and spec for stub.
7621 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7622 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7623 pragma precondition or postcondition, for which the enclosing
7624 subprogram or package in the AST is not the desired one, return empty.
7626 2011-08-05 Thomas Quinot <quinot@adacore.com>
7628 * g-expect.adb: Minor reformatting.
7630 2011-08-05 Bob Duff <duff@adacore.com>
7632 * a-fihema.adb: Comment out OS_Lib.
7634 2011-08-05 Matthew Heaney <heaney@adacore.com>
7636 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7637 (unbounded multiway tree containers) and a-iteint.ads.
7638 * a-comutr.ads, a-comutr.adb:
7639 This is the new Ada 2012 unit for unbounded multiway tree containers
7640 * a-cimutr.ads, a-cimutr.adb
7641 This is the new Ada 2012 unit for indefinite multiway tree containers
7642 * a-iteint.ads: New file.
7644 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7646 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7648 2011-08-05 Bob Duff <duff@adacore.com>
7650 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7652 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7654 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7656 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7657 general indexing aspects of Ada2012. Called when analyzing indexed
7658 components when other interpretations fail.
7659 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7660 in an expression context where overloading is meaningful. This excludes
7661 the occurrence in an aspect specification (efficiency only).
7662 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7663 related to iterators can be set by an attribute specification, but
7665 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7666 Constant_Indexing and Variable_Indexing.
7667 (Check_Indexing_Functions): New procedure to perform legality checks.
7668 Additional semantic checks at end of declarations.
7670 2011-08-05 Sergey Rybin <rybin@adacore.com>
7672 * tree_io.ads: Update ASIS_Version_Number because of the change of the
7673 order of calling Tree_Write/Tree_Read routines made for aspects.
7675 2011-08-05 Bob Duff <duff@adacore.com>
7677 * a-fihema.adb (Finalize): Fix race condition.
7679 2011-08-05 Yannick Moy <moy@adacore.com>
7681 * sem_ch12.adb (Analyze_Package_Instantiation,
7682 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7685 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7687 * sem_type.adb (Specific_Type): in an instance, the type-specific
7688 operand of an equality check that involves null may have a private
7689 type. Use full view to determine legality of construct.
7691 2011-08-05 Vincent Celier <celier@adacore.com>
7693 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7694 delete or close the file when the call to gnatmake was successful.
7696 2011-08-05 Yannick Moy <moy@adacore.com>
7698 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7699 Global_Discard_Names.
7701 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7703 * sinfo.ads: comments on use of entity field for aspect specifications.
7705 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7707 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7708 node is not itself an entity but a selected component, it is a
7709 rewritten parameterless call to an en enclosing synchronized operation,
7710 and this expansion will be performed again in the instance, so there is
7711 no global information to preserve.
7713 2011-08-05 Javier Miranda <miranda@adacore.com>
7715 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7716 for renamings of predefined primitives.
7717 (In_Predef_Prims_DT): New subprogram.
7719 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7721 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7722 possible interpretation of name is a reference type, add an
7723 interpretation that is the designated type of the reference
7724 discriminant of that type.
7725 * sem_res.adb (resolve): If the interpretation imposed by context is an
7726 implicit dereference, rewrite the node as the deference of the
7727 reference discriminant.
7728 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7729 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7730 parent type or base type.
7731 * sem_ch4.adb (Process_Indexed_Component,
7732 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7733 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7734 Check for implicit dereference.
7735 (List_Operand_Interps): Indicate when an implicit dereference is
7737 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7739 2011-08-05 Thomas Quinot <quinot@adacore.com>
7741 * scos.ads: Update documentation of SCO table. Pragma statements can now
7742 be marked as disabled (using 'p' instead of 'P' as the statement kind).
7743 * par_sco.ads, par_sco.adb: Implement the above change.
7744 (Process_Decisions_Defer): Generate a P decision for the first parameter
7745 of a dyadic pragma Debug.
7746 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7748 * put_scos.adb: Code simplification based on above change.
7750 2011-08-05 Robert Dewar <dewar@adacore.com>
7752 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7753 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7754 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7755 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7757 2011-08-05 Bob Duff <duff@adacore.com>
7759 * a-stunau.ads, g-spipat.adb: Update comments.
7761 2011-08-05 Bob Duff <duff@adacore.com>
7763 * a-fihema.ads: Minor comment fix.
7764 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7766 (Attach, Detach): Remove some unnecessary code.
7767 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7769 2011-08-05 Bob Duff <duff@adacore.com>
7771 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7772 allocation for Objects component. This simplifies the code somewhat. It
7773 is also a little more efficient in the not-so-unusual case where there
7774 are no controlled objects allocated.
7775 Make Finalization_Started flag atomic.
7776 (Finalize): Avoid unnecessary detachment of items from the list.
7777 (pcol): Minor cleanup.
7779 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7781 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7782 package whose name is the same as that of the generic unit, or its
7785 2011-08-05 Bob Duff <duff@adacore.com>
7787 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7788 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7789 Minor comment fixes.
7791 2011-08-05 Arnaud Charlet <charlet@adacore.com>
7793 * make.adb (Linking_Phase): No longer need to set source search path
7794 before calling gnatlink in CodePeer mode.
7795 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7796 gcc in CodePeer mode, since the binder generated file no longer has a
7798 * switch.ads, switch.adb (Is_Language_Switch): Removed.
7799 * switch-c.adb: Update comment.
7801 2011-08-05 Thomas Quinot <quinot@adacore.com>
7803 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7805 2011-08-05 Nicolas Roche <roche@adacore.com>
7807 * gnat_ugn.texi: Fix minor syntax error issue.
7809 2011-08-05 Vincent Celier <celier@adacore.com>
7811 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7812 delete or close the file when the call to gnatmake returns a non
7813 successful return code.
7815 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7817 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7818 check, indicate that the copy of the original node does not come from
7819 source, to prevent an infinite recursion of the expansion.
7821 2011-08-05 Johannes Kanig <kanig@adacore.com>
7823 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
7824 VC generation for subprogram bodies.
7826 2011-08-05 Yannick Moy <moy@adacore.com>
7829 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
7830 the base type with the smallest allowed base type.
7832 2011-08-05 Sergey Rybin <rybin@adacore.com>
7834 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
7837 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7839 * sem_ch12.ads: minor comment updates.
7841 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7843 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
7844 instantiation and a formal package the compiler generates a package
7845 renaming declaration so that the generic name within the declaration
7846 is interpreted as a renaming of the instance. At the end of a formal
7847 package declaration, this renaming must become invisible.
7849 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7851 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
7852 comparison and rely on concrete entities instead.
7854 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7856 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
7857 and discriminants, to indicate that the type has an access discriminant
7858 that supports implicit dereference.
7859 * snames.ads-tmpl: Add names of aspects and attributes related to
7860 Ada2012 iterators: constant_indexing, default_iterator,
7861 iterator_element, implicit_dereference, variable_indexing.
7862 * aspects.ads, aspects.adb: entries for iterator-related aspects.
7863 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
7864 iterator-related aspects.
7865 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
7867 2011-08-05 Sergey Rybin <rybin@adacore.com>
7869 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
7870 metrics in gnatmetric to cover new kinds of coupling mentrics.
7872 2011-08-05 Steve Baird <baird@adacore.com>
7874 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
7875 of calling the user-defined main subprogram.
7876 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
7877 is set) Call_Main_Subprogram ahead of, as opposed to
7879 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
7880 generation of a "with" of the user-defined main subprogram.
7881 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
7882 (which is now called from Gen_Main instead).
7884 2011-08-05 Emmanuel Briot <briot@adacore.com>
7886 * projects.texi: Added reference to the Makefile package.
7888 2011-08-05 Thomas Quinot <quinot@adacore.com>
7890 * exp_ch7.adb: Minor comment rewording.
7892 2011-08-05 Ed Falis <falis@adacore.com>
7894 * env.c: Fix comment.
7896 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7898 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
7899 character comparison and rely on concrete entities instead.
7901 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7903 * sem_ch3.adb: (Check_Private_Overriding): better error message,
7904 suggested by AI95-0068.
7906 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7908 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
7909 the two potential initialization calls. This accounts for any
7910 access-before-elaboration checks which may precede the initialization
7912 (Next_Suitable_Statement): New routine. Returns the next real statement
7913 after the input node while skipping generated checks.
7914 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
7915 with comment on usage.
7916 Do not generate Elaborate_All when the trigger is a finalization call
7917 coming from a type init proc.
7918 (Check_Elab_Call): Propagate the initialization procedure context to
7919 subsequent calls to Check_A_Call.
7920 (Check_Internal_Call_Continue): Propagate the initialization procedure
7921 context to subsequent calls to Check_Elab_Call.
7922 (Is_Finalization_Procedure): New routine. Returns True if the input
7923 entity denotes a [Deep_]Finalize routine.
7924 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
7925 along with comment on usage.
7927 2011-08-05 Vadim Godunko <godunko@adacore.com>
7929 * s-atocou.ads: Add list of supported platforms.
7931 2011-08-05 Yannick Moy <moy@adacore.com>
7933 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
7935 * opt.ads (Disable_ALI_File): new Boolean flag
7936 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
7938 2011-08-05 Ed Falis <falis@adacore.com>
7940 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
7941 environ is properly defined.
7943 2011-08-05 Vincent Celier <celier@adacore.com>
7945 * make.adb (Compilation_Phase): Exit immediately when all objects have
7946 been found up to date, to avoid multiple exit messages.
7947 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
7948 same project for languages with no compiler.
7949 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
7951 2011-08-05 Robert Dewar <dewar@adacore.com>
7953 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
7954 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7955 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7956 s-atocou-builtin.adb: Minor reformatting.
7958 2011-08-05 Yannick Moy <moy@adacore.com>
7960 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7961 if the node to wrap is a pragma check, this node and enclosed
7962 expression are not expanded, so do not apply any transformations here.
7963 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7964 introducing transient scopes.
7966 2011-08-05 Jose Ruiz <ruiz@adacore.com>
7968 * adaint.c (__gnat_set_writable, __gnat_set_readable,
7969 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7970 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7971 routine is available, so we use the default implementation of these
7973 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7974 support for copying attributes on VxWorks 6.
7976 2011-08-05 Yannick Moy <moy@adacore.com>
7978 * debug.adb: Remove use of -gnatd.D.
7979 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7980 * opt.ads: Simplify variables for ALFA mode, to keep one only
7981 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7984 2011-08-05 Vincent Celier <celier@adacore.com>
7986 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7987 Builder'Default_Switches.
7989 2011-08-05 Vincent Celier <celier@adacore.com>
7991 * makeusg.adb: Add lines for --create-map-file switches.
7993 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7995 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7996 profile is incomplete and the full view is available, replace it with
7998 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7999 incomplete, freezing the subprogram is delayed until the full view is
8001 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
8002 fixed-point multiplication operator and the predefined operator is
8003 resolved in favor of the user-defined one.
8005 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8007 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
8010 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8012 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
8013 whether a type lacks user-defined Read or Write operations, or has a
8014 component that lacks them.
8015 * sem_attr.adb (Check_Stream_Attribute): if restriction
8016 No_Default_Stream_Attributes is active, verify that all subcomponent
8017 types of the target have user-defined stream operations, and report
8019 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
8020 * exp_strm.adb: Build_Elementary_Input_Call,
8021 Build_Elementary_Write_Call): remove checks for restriction
8022 No_Default_Stream_Attributes, now checked in semantics.
8024 2011-08-04 Vincent Celier <celier@adacore.com>
8026 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
8027 switches on the command line, look for all valid --RTS switches in the
8028 Builder switches and for each language use the first runtime name found
8029 to invoke gprconfig.
8030 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
8031 command line and there is no auto-configuration.
8032 (Runtime_Name_Set_For): New function.
8034 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8036 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
8037 elaborate initialization expression for variable Abort when processing
8038 a package body or a declaration.
8039 (Create_Finalizer): Propagate the package context when creating the
8040 exception-related variables.
8041 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
8042 For_Package along with usage comment.
8044 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8046 * gcc-interface/Makefile.in: Clean up targets.
8047 Enable new package for atomic counters and copy-on-write implementation
8048 of unbounded strings on x86 platforms.
8049 * gcc-interface/Make-lang.in: Update dependencies.
8051 2011-08-04 Robert Dewar <dewar@adacore.com>
8053 * exp_ch7.adb: Minor reformatting.
8055 2011-08-04 Robert Dewar <dewar@adacore.com>
8057 * exp_strm.adb: Minor reformatting.
8059 2011-08-04 Vadim Godunko <godunko@adacore.com>
8061 * s-atocou.adb: Replace by dummy version and use on targets where atomic
8062 operations are not supported.
8063 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
8064 * s-atocou-x86.adb: New file.
8065 * Makefile.rtl: Add s-atocou.o file
8067 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8069 * make.adb (Compile): Move setting of CodePeer_Mode to ...
8070 (Compilation_Phase): ... here.
8071 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
8073 2011-08-04 Thomas Quinot <quinot@adacore.com>
8075 * Make-generated.in: Fix minor typo in comment.
8077 2011-08-04 Thomas Quinot <quinot@adacore.com>
8079 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
8082 2011-08-04 Robert Dewar <dewar@adacore.com>
8084 * a-coinho.adb: Minor reformatting.
8086 2011-08-04 Robert Dewar <dewar@adacore.com>
8088 * a-coinho.ads: Minor reformatting.
8090 2011-08-04 Vadim Godunko <godunko@adacore.com>
8092 * s-atocou.ads, s-atocou.adb: New files.
8093 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
8094 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
8095 direct use of GCC's atomic builtins and replace them by use of new
8096 atomic counter package.
8098 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8100 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
8102 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8104 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
8105 with a call to Get_External_Tag.
8106 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
8107 subprogram usage. Remove the guard against package declarations and
8108 bodies since Build_Cleanup_Statements is no longer invoked in that
8110 (Build_Components): Initialize Tagged_Type_Stmts when the context
8111 contains at least one library-level tagged type.
8112 (Build_Finalizer): New local variables Has_Tagged_Types and
8113 Tagged_Type_Stmts along with associated comments on usage. Update the
8114 logic to include tagged type processing.
8115 (Create_Finalizer): Insert all library-level tagged type unregistration
8116 code before the jump block circuitry.
8117 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
8118 (Expand_N_Package_Declaration): Remove the call to
8119 Build_Cleanup_Statements.
8120 (Process_Tagged_Type_Declaration): New routine. Generate a call to
8121 unregister the external tag of a tagged type.
8122 (Processing_Actions): Reimplemented to handle tagged types.
8123 (Process_Declarations): Detect the declaration of a library-level
8124 tagged type and carry out the appropriate actions.
8125 (Unregister_Tagged_Types): Removed. The machinery has been directly
8126 merged with Build_Finalizer.
8128 2011-08-04 Robert Dewar <dewar@adacore.com>
8130 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
8131 gnatls.adb, exp_ch3.adb: Minor reformatting.
8133 2011-08-04 Marc Sango <sango@adacore.com>
8135 * sem_attr.adb (Analyze_Attribute): Replace the message
8136 "invisible attribute of}" of the spark restriction violation in
8137 attribute reference by the simple message "invisible attribute of type".
8138 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
8139 two insertion characters: '&' and '}'.
8141 2011-08-04 Vadim Godunko <godunko@adacore.com>
8143 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
8144 * a-coinho.ads, a-coinho.adb: New file.
8145 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
8147 2011-08-04 Nicolas Roche <roche@adacore.com>
8149 * alfa_test.adb: Not all ali files are containing alfa information even
8150 if compiled with -gnatd.F. So suppress warning about missing ALFA
8153 2011-08-04 Yannick Moy <moy@adacore.com>
8155 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
8157 * put_alfa.adb: Check that scope name is not empty.
8159 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8161 * exp_ch3.adb (Stream_Operation_Ok): new predicate
8162 Needs_Elementary_Stream_Operation, to determine whether user-defined
8163 Read and Write attributes are available for the elementary components
8164 of the given type. If only the predefined attributes are available,
8165 then when restriction No_Default_Stream_Attributes is active the
8166 predefined stream attributes for the composite type cannot be created.
8168 2011-08-04 Robert Dewar <dewar@adacore.com>
8170 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
8171 Put routines in alpha order
8173 2011-08-04 Jose Ruiz <ruiz@adacore.com>
8175 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
8176 * gcc-interface/Make-lang.in: Update dependencies.
8178 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8180 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
8181 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
8184 2011-08-04 Robert Dewar <dewar@adacore.com>
8186 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
8187 lib-xref-alfa.adb: Minor reformatting.
8189 2011-08-04 Marc Sango <sango@adacore.com>
8191 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
8192 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
8193 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
8196 2011-08-04 Tristan Gingold <gingold@adacore.com>
8198 * bindgen.adb (Gen_Adainit_C): Remove.
8199 (Gen_Adafinal_C): Ditto.
8200 (Gen_Elab_Externals_C): Ditto.
8201 (Gen_Elab_Calls_C): Ditto.
8202 (Gen_Elab_Order_C): Ditto.
8203 (Gen_Elab_Defs_C): Ditto.
8204 (Gen_Finalize_Library_C): Ditto.
8205 (Gen_Finalize_Library_Defs_C): Ditto.
8206 (Gen_Main_C): Ditto.
8207 (Gen_Output_File_C): Ditto.
8208 (Gen_Restrictions_C): Ditto.
8209 (Gen_Versions_C): Ditto.
8210 (Write_Info_Ada_C): Ditto.
8211 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
8212 (Gen_Output_File): Do not force Ada_Bind_File anymore.
8213 Always call Gen_Output_File_Ada.
8214 * gnatlink.adb (Begin_Info): Now a constant.
8216 (Ada_Bind_File): Remove
8217 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
8218 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8219 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8220 * opt.ads (Ada_Bind_File): Remove.
8222 2011-08-04 Thomas Quinot <quinot@adacore.com>
8224 * projects.texi: Document target-specific directory in default project
8227 2011-08-04 Thomas Quinot <quinot@adacore.com>
8229 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8232 2011-08-04 Yannick Moy <moy@adacore.com>
8234 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8235 opt.ads, lib-xref.ads: Code clean up.
8237 2011-08-04 Yannick Moy <moy@adacore.com>
8239 * gnat_rm.texi: Update description of Test_Case
8240 * gnat_ugn.texi: Typo.
8242 2011-08-04 Ed Falis <falis@adacore.com>
8244 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8246 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8248 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8249 it is of type Root_Controlled. This action eliminates fields Prev and
8250 Next from type equality.
8252 2011-08-04 Yannick Moy <moy@adacore.com>
8254 * lib-xref-alfa.adb: Correct typo.
8256 2011-08-04 Matthew Heaney <heaney@adacore.com>
8258 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8261 2011-08-04 Yannick Moy <moy@adacore.com>
8263 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8264 (Analyze_Pragma): allow static string expression for name of Test_Case,
8265 instead of simply string literals.
8266 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8269 2011-08-04 Vincent Celier <celier@adacore.com>
8271 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8272 case suffixes to find truncated main sources.
8274 2011-08-04 Tristan Gingold <gingold@adacore.com>
8276 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8277 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8278 (Compute_Current_Task): Ditto.
8280 2011-08-04 Tristan Gingold <gingold@adacore.com>
8282 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8284 2011-08-04 Yannick Moy <moy@adacore.com>
8286 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8287 library-level constant.
8288 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8289 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8290 used as selector of parameter association, in ALFA mode.
8292 2011-08-04 Robert Dewar <dewar@adacore.com>
8294 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8295 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8298 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8300 * make.adb (Linking_Phase): Set source search path before calling
8301 gnatlink in CodePeer mode.
8303 2011-08-04 Javier Miranda <miranda@adacore.com>
8305 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8306 Remove code which takes care of building TSDs.
8307 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8308 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8309 the accessibility check in VM targets.
8310 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8311 (Building_Static_DT): Now returns false for VM targets.
8312 (Build_VM_TSDs): Removed.
8313 (Expand_Interface_Conversion): Generate missing runtime check for
8314 conversions to interface types whose target type is unknown at compile
8316 (Make_VM_TSD): Add missing code to disable the generation of calls to
8317 Check_TSD if the tagged type is not defined at library level, or not
8318 has a representation clause specifying its external tag, or -gnatdQ is
8320 * exp_disp.ads (Build_VM_TSDs): Removed.
8321 (Make_VM_TSDs): Spec relocated from exp_disp.adb
8322 * sem_disp.adb (Check_Dispatching_Operation): No code required to
8323 register primitives in the dispatch tables in VM targets.
8324 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8325 initialization of class-wide interface objects in VM targets.
8326 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8329 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8331 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8332 when dotnet-ld cannot be found.
8334 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8336 * bindgen.adb: Simplify significantly generation of binder body file in
8338 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8339 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8342 2011-08-04 Yannick Moy <moy@adacore.com>
8344 * sem_prag.adb, sem.ads: Code cleanup.
8346 2011-08-04 Tristan Gingold <gingold@adacore.com>
8348 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8349 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8350 results if possible.
8351 * s-stusta.adb (Print): Adjust after changes in s-stausa.
8352 * gnat_ugn.texi: Update dynamic stack usage section.
8354 2011-08-04 Steve Baird <baird@adacore.com>
8356 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8357 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8358 contains only a call to the user-defined main subprogram.
8359 (Gen_Main_Ada) - If CodePeer_Mode is set, then
8360 call the "wrapper" subprogram instead of directly
8361 calling the user-defined main subprogram.
8363 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8365 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8366 alternatives of a case statement for controlled objects. Rename local
8367 variable A to Dead_Alt.
8368 (Expand_N_If_Statement): Check the then and else statements of an if
8369 statement for controlled objects. Check the then statements of all
8370 elsif parts of an if statement for controlled objects.
8371 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8373 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8374 detects a loop associated with the expansion of an array object.
8375 Augment the processing of the loop statements to account for a possible
8376 wrap done by Process_Statements_For_Controlled_Objects.
8377 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8378 statements and abortable part of an asynchronous select for controlled
8380 (Expand_N_Conditional_Entry_Call): Check the else statements of a
8381 conditional entry call for controlled objects.
8382 (Expand_N_Selective_Accept): Check the alternatives of a selective
8383 accept for controlled objects.
8384 (Expand_N_Timed_Entry_Call): Check the entry call and delay
8385 alternatives of a timed entry call for controlled objects.
8386 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8387 exception handler for controlled objects.
8388 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8389 Add formal parameter Nested_Constructs along with its associated
8391 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8392 Requires_Cleanup_Actions.
8393 (Process_Statements_For_Controlled_Objects): New routine.
8394 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8395 routine. Inspect a node which contains a non-handled sequence of
8396 statements for controlled objects. If such an object is found, the
8397 statements are wrapped in a block.
8399 2011-08-04 Bob Duff <duff@adacore.com>
8401 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8402 need to compare with Class_Wide_Type (T2), in order to get at the
8403 original class-wide type node.
8404 * sem_type.ads (Covers): Improve the comment.
8405 * einfo.ads (Class_Wide_Type): Improve the comment.
8406 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8407 the type of the Deref.
8409 2011-08-04 Yannick Moy <moy@adacore.com>
8411 * gnat_rm.texi: Document that Test_Case pragma can only appear on
8412 separate declarations.
8413 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8414 check identifier of pragma argument.
8415 (Chain_TC): check that no other test case associated to the same entity
8416 share the same name.
8417 (Check_Test_Case): disallow test case inside subprogram body
8418 (Analyze_Pragma): correct call to check identifier and not argument
8419 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8420 function gets name from test case pragma.
8422 2011-08-04 Yannick Moy <moy@adacore.com>
8424 * gnat_rm.texi: Document new pragma and aspect.
8425 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8426 (No_Duplicates_Allowed): new constant array defining whether duplicates
8427 aspects of each kind can appear on the same declaration.
8428 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8429 field, which points to a node holding the previous Spec_PPC_List.
8430 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8431 through the indirection with Contract.
8432 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8433 * par-prag.adb (Prag): do nothing on Test_Case pragma
8434 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8436 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8437 component Ensures of Test_Case.
8438 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8439 (Analyze_Generic_Subprogram_Declaration,
8440 Analyze_Subprogram_Instantiation,
8441 Analyze_Abstract_Subprogram_Declaration,
8442 Analyze_Subprogram_Body_Helper,
8443 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8444 insert contract in subprogram node at point of definition
8446 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8447 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8448 corresponding pragma
8449 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8450 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8451 similar to the analysis of pre/post
8452 (Derive_Subprogram): insert contract in subprogram node at point of
8454 * sem_prag.adb, sem_prag.ads
8455 (Check_Arg_Is_String_Literal, Check_Identifier):
8456 new checking procedures to be called in treatment of pragmas
8457 (Check_Test_Case): new procedure to check that a Test_Case aspect or
8458 pragma is well-formed. This does not check currently that 'Result is
8459 used only in the Ensures component of a Test_Case.
8460 (Analyze_Pragma): add case for Test_Case
8461 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8462 components of a Test_Case.
8463 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8464 expressions in the 3rd (and 4th if present) arguments of a Test_Case
8465 pragma, treated as spec expressions.
8466 (Sig_Flags): add value -1 for Test_Case.
8467 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8468 Get_Requires_From_Test_Case_Pragma): getters for both expression
8469 components of a Test_Case.
8470 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8471 indirection between an entry or [generic] subprogram entity and its
8472 pre/post + test-cases.
8473 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8474 get/set for fields of an N_Contract node.
8475 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8476 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8477 names and pragma for Test_Case.
8478 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8480 2011-08-04 Vincent Celier <celier@adacore.com>
8482 * gnat_ugn.texi: Improve documentation of gnatmake switch
8483 --source-info-file=.
8485 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8487 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8488 type). Initialize Atyp to the appropriate type which is later checked
8489 for completion. Rewrite the assertion associated with private type
8492 2011-08-04 Ed Falis <falis@adacore.com>
8494 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8495 initialize the number of CPUs.
8497 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8499 * sem_type.adb (Disambiguate): New subsidiary routine
8500 In_Same_Declaration_List, to implement AI05-0020: a user-defined
8501 equality on an anonymous access type whose designated type is private
8502 does not lead to an ambiguity with the universal access equality
8503 operator in the body or child units of the defining package. The same
8504 is true for a multiplication operator on a private type completed with
8507 2011-08-04 Javier Miranda <miranda@adacore.com>
8509 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8510 (Normalize_Scalars_Config): Removed.
8512 (Register_Opt_Config_Switches): Remove registering config values of
8513 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8514 (Restore_Opt_Config_Switches): Remove code which restores the values of
8515 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8516 Init_Or_Norm_Scalars.
8517 (Save_Opt_Config_Switches): Remove code which saves values of
8518 Init_Or_Norm_Scalars and Normalize_Scalars.
8519 (Set_Opt_Config_Switches): Remove code which restores config values of
8520 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8521 Init_Or_Norm_Scalars.
8523 2011-08-04 Yannick Moy <moy@adacore.com>
8525 * frontend.adb (Frontend): remove previous patch to avoid full
8526 qualification in ALFA mode.
8527 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8528 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8529 unique name for an entity, which could be used to identify the entity
8530 across compilation units.
8532 2011-08-04 Thomas Quinot <quinot@adacore.com>
8535 (Initialize_Default_Project_Path): Add target specific directory
8536 ($prefix/$target/lib/gnat) in front of project path in all cases
8537 (making gnatmake's behaviour consistent with gprbuild).
8538 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8539 Pass target name from Sdefault to project subsystem.
8540 * gnatls.adb: Show new target specific default project directory.
8542 2011-08-04 Johannes Kanig <kanig@adacore.com>
8544 * cstand.adb: Add Information to Identifier in Standard
8545 (Identifer_For): Set Entity to the corresponding entity
8547 2011-08-04 Sergey Rybin <rybin@adacore.com>
8549 * gnat_ugn.texi: Update doc on gnatcheck.
8551 2011-08-04 Yannick Moy <moy@adacore.com>
8553 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8556 2011-08-04 Yannick Moy <moy@adacore.com>
8558 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8559 performing expansion.
8560 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8561 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8562 it is not called in ALFA mode.
8564 2011-08-04 Emmanuel Briot <briot@adacore.com>
8566 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8567 after all, so removed.
8569 2011-08-04 Sergey Rybin <rybin@adacore.com>
8571 * vms_data.ads: Add missing VMS qualifiers.
8573 2011-08-04 Emmanuel Briot <briot@adacore.com>
8575 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8576 the list of files on the command line after processing it through
8579 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8581 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8582 processing for .NET/JVM. These targets can now benefit from
8583 Raise_From_Controlled_Operation and they share the same processing with
8585 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8586 These targets need transient scopes in order to properly finalize short
8587 lived controlled objects.
8588 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8589 NET/JVM. These targets can now benefit from
8590 Raise_From_Controlled_Operation and they share the same processing with
8593 2011-08-04 Geert Bosch <bosch@adacore.com>
8595 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8597 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8599 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8600 Expand_Record_Aggregate, to determine whether aggregate must be
8601 expanded into assignments. This is the case if the ancestor part is
8602 private, regarless of the setting of the flag Has_Private_Ancestor.
8604 2011-08-04 Ed Falis <falis@adacore.com>
8606 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8608 2011-08-04 Bob Duff <duff@adacore.com>
8610 * sinfo.ads: Fix comment.
8612 2011-08-04 Steve Baird <baird@adacore.com>
8614 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8615 choose a package name in much the same way as is
8616 done for JGNAT when VM_Target /= No_VM, except that
8617 a slightly more distinctive prefix string is used.
8619 2011-08-04 Emmanuel Briot <briot@adacore.com>
8621 * makeutl.adb (Complete_Mains): no longer accept unit names on the
8622 gnatmake command line.
8623 This behavior was never documented (and was supported only because of
8624 an early bug in the code). This case might lead to ambiguous cases
8625 (between unit names and truncated base names without suffixes).
8627 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8629 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8630 Remove the external tag of a tagged type from the internal hash table.
8631 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8632 expanded usage of the routine. Strenghten the check for Is_Master. Add
8633 processing for tagged types.
8634 (Build_Finalizer): Create all the necessary lists used in finalizer
8635 creation when the processed context is a package that may contain
8637 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8638 Requires_Cleanup_Actions.
8639 (Expand_N_Package_Body): Package bodies may need clean up code
8640 depending on whether they contain tagged types.
8641 (Expand_N_Package_Declaration): Package declarations may need clean up
8642 code depending on whether they contain tagged types.
8643 (Unregister_Tagged_Types): New routine. Search through a list of
8644 declarations or statements, looking for non-abstract Ada tagged types.
8645 For each such type, generate code to unregister the external tag.
8646 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8647 Requires_Cleanup_Actions.
8648 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8649 through a list of declarations or statements looking for non-abstract
8650 Ada tagged types or controlled objects.
8651 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8652 Requires_Cleanup_Actions.
8653 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8654 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8657 2011-08-04 Vincent Celier <celier@adacore.com>
8659 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8660 has Ada sources, not project Project, because if the root project
8661 Project has no sources of its own, all projects will be deemed without
8664 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8666 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8667 of the No_Param_Proc acc-to-subp type used for initialization of
8668 __gnat_finalize_library_objects so that it's declared at library level
8669 rather than nested inside of the adainit routine.
8671 2011-08-04 Javier Miranda <miranda@adacore.com>
8673 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8674 if the tagged type has a representation clause which specifies its
8677 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8679 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8680 Remove previous procedure with that name.
8681 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8683 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8684 subtype mark, the ancestor cannot have unknown discriminants.
8685 (Resolve_Record_Aggregate): if the type has invisible components
8686 because of a private ancestor, the aggregate is illegal.
8688 2011-08-04 Vincent Celier <celier@adacore.com>
8690 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8691 account switches -gnat2005, -gnat12 and -gnat2012.
8693 2011-08-04 Bob Duff <duff@adacore.com>
8695 * s-tasdeb.ads: Minor comment fix.
8697 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8699 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8701 * switch.ads, switch.adb (Is_Language_Switch): New function.
8703 2011-08-04 Vincent Celier <celier@adacore.com>
8705 * switch-c.adb: Minor comment addition.
8707 2011-08-04 Vincent Celier <celier@adacore.com>
8709 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8710 ending with '=' is followed by a space (missing file name).
8712 2011-08-04 Pascal Obry <obry@adacore.com>
8714 * g-regist.ads: Fix size of HKEY on x86_64-windows.
8716 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8718 * sem_ch12.adb (Analyze_Associations): New routine
8719 Check_Overloaded_Formal_Subprogram to reject a formal package when
8720 there is a named association or a box initialisation for an overloaded
8721 formal subprogram of the corresponding generic.
8723 2011-08-04 Yannick Moy <moy@adacore.com>
8725 * alfa.ads (ALFA_Xref_Record): add component for type of entity
8726 * get_alfa.adb, put_alfa.adb: Read and write new component of
8728 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8730 2011-08-04 Pascal Obry <obry@adacore.com>
8732 * urealp.adb: Minor reformatting.
8734 2011-08-04 Tristan Gingold <gingold@adacore.com>
8736 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8737 Handle the case when Cleanup_Protected_Object returns Empty.
8739 2011-08-04 Yannick Moy <moy@adacore.com>
8741 * frontend.adb (Frontend): only qualify names in non-ALFA mode
8743 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8745 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8746 call, ignore functions.
8748 2011-08-04 Geert Bosch <bosch@adacore.com>
8750 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8753 2011-08-04 Emmanuel Briot <briot@adacore.com>
8755 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8756 as an index for Builder'Switches. This conforms to the documentation.
8757 * make.adb (Insert_Project_Sources): avoid duplicate code
8759 2011-08-04 Emmanuel Briot <briot@adacore.com>
8761 * makeutl.adb (Complete_Mains): if the user has passed a relative file
8762 name on the command line (for instance "../dummy"), never assume it can
8765 2011-08-04 Tristan Gingold <gingold@adacore.com>
8767 * bindgen.adb: Remove code the reference or create the
8768 Break_Start/__gnat_break_start procedure.
8769 * s-stalib.adb (Break_Start): Removed.
8771 2011-08-04 Emmanuel Briot <briot@adacore.com>
8773 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8774 shared with gprbuild.
8776 2011-08-04 Yannick Moy <moy@adacore.com>
8778 * par-ch4.adb (P_Primary): preferentially issue an error message about
8779 a missing parenthesis arount a conditional or case expression in Ada
8780 2012 mode, if we detect that the alignment is not correct for a
8783 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8785 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8786 tag-to-class-wide conversion as needing finalization actions.
8787 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8788 a tag-to-class-wide conversion as needing finalization actions.
8789 (Is_Finalizable_Transient): The result of a tag-to-class-wide
8790 conversion does not need finalization actions.
8791 (Is_Tag_To_CW_Conversion): New routine.
8792 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8793 whether an object is the result of a tag-to-class-wide conversion.
8795 2011-08-04 Yannick Moy <moy@adacore.com>
8797 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8798 the left-hand-side and right-hand-side of a conjunct are inserted when
8799 translating a pre- or postcondition
8800 * sem_ch6.adb: Correct typo in comment
8802 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8804 * gnat_rm.texi: Ravenscar does not prohibit dependence on
8805 Unchecked_Conversion and Unchecked_Deallocation.
8807 2011-08-04 Thomas Quinot <quinot@adacore.com>
8809 * make.adb: Minor reformatting.
8811 2011-08-04 Emmanuel Briot <briot@adacore.com>
8813 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8814 sources in the project and its imported projects, but not in the whole
8817 2011-08-04 Emmanuel Briot <briot@adacore.com>
8819 * make.adb: Remove debug trace.
8821 2011-08-04 Vincent Celier <celier@adacore.com>
8823 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
8824 path in canonical form, to be able to compare path names on platforms
8825 such as Windows or Darwin.
8827 2011-08-04 Thomas Quinot <quinot@adacore.com>
8829 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
8830 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
8831 * scos.ads: Update documentation accordingly.
8832 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
8835 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8837 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
8838 attribute only if prefix type is scalar.
8840 2011-08-04 Emmanuel Briot <briot@adacore.com>
8842 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
8843 in gnatmake for specifying mains on the command line that do not belong
8844 to the main project. These mains must currently all belong to the same
8846 (Ultimate_Extension_Of): removed, since duplicated
8847 Ultimate_Extending_Project.
8849 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8851 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
8853 (CodePeer_Mode_String): New.
8854 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
8856 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
8857 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
8858 mode, since no useful elaboration subprogram is needed by CodePeer.
8859 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
8860 In this mode, compile binder file with -gnatC and do stop after this
8863 2011-08-04 Vincent Celier <celier@adacore.com>
8865 * exp_ch7.adb: Minor comment fix.
8867 2011-08-04 Robert Dewar <dewar@adacore.com>
8869 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
8870 exp_ch4.adb, makeutl.adb: Minor reformatting.
8872 2011-08-04 Emmanuel Briot <briot@adacore.com>
8874 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
8875 Create several new subprograms to move code out of Make. This makes the
8876 code more readable, removes code duplication, and is a preparation work
8877 for adding support for aggregate projects.
8879 2011-08-04 Tristan Gingold <gingold@adacore.com>
8881 * s-po32gl.ads, s-po32gl.adb: New files.
8882 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
8883 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
8884 (Build_Finalization_Collection): Use it.
8885 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
8886 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
8888 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
8889 * gcc-interface/Make-lang.in: Update dependencies.
8891 2011-08-04 Emmanuel Briot <briot@adacore.com>
8893 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
8896 2011-08-04 Emmanuel Briot <briot@adacore.com>
8898 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
8899 command line is not a file name, also check whether it could be a unit
8902 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8904 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
8905 the header of the finalization routine.
8906 If the unit has no finalizer but is a body whose spec has one, then
8907 generate the decrement of the elaboration entity only.
8908 If the unit has a finalizer and is a spec, then do not generate the
8909 decrement of the elaboration entity.
8910 (Gen_Finalize_Library_C): Likewise.
8912 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8914 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
8915 (Bounds_Size_Expression): Removed.
8916 (Double_Alignment_Of): New subsidiary routine.
8917 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
8918 for a hole in the dope vector of unconstrained arrays due to different
8919 index and element alignments.
8921 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8923 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
8924 raise program_error because body has not been seen yet.
8926 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8928 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
8931 2011-08-04 Vincent Celier <celier@adacore.com>
8933 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
8935 2011-08-04 Yannick Moy <moy@adacore.com>
8937 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
8938 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
8940 2011-08-04 Thomas Quinot <quinot@adacore.com>
8942 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
8943 instantiation in RCI.
8945 2011-08-04 Emmanuel Briot <briot@adacore.com>
8947 * make.adb: Share more code with gprbuild
8949 2011-08-04 Emmanuel Briot <briot@adacore.com>
8951 * projects.texi: Added documentation for the IDE'Gnat project file
8954 2011-08-04 Nicolas Roche <roche@adacore.com>
8956 * gnat_rm.texi: Minor editing.
8958 2011-08-04 Javier Miranda <miranda@adacore.com>
8960 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8961 and the library case for VM targets.
8962 (Gen_Adainit_Ada): Likewise.
8964 2011-08-04 Robert Dewar <dewar@adacore.com>
8966 * g-altive.ads: Minor comment updates.
8967 * prj-nmsc.adb: Minor reformatting.
8969 2011-08-04 Javier Miranda <miranda@adacore.com>
8972 (Normalize_Scalars_Config): Value of the configuration switch set by
8973 pragma Normalize_Scalars when it appears in the gnat.adc file.
8974 (Normalize_Scalars): New field for record Config_Switches_Type. Used
8975 to save and restore settings of this pragma.
8977 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8978 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8980 2011-08-04 Vincent Celier <celier@adacore.com>
8982 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8984 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8986 * makeutl.adb: Minor reformatting.
8988 2011-08-04 Olivier Hainque <hainque@adacore.com>
8990 * g-altive.ads: Update comments to reflect that only the soft
8991 binding is available today.
8993 2011-08-04 Robert Dewar <dewar@adacore.com>
8995 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8996 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8997 * gcc-interface/Make-lang.in: Update dependencies.
8999 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9001 * prj-env.adb: Remove local debug traces.
9003 2011-08-04 Yannick Moy <moy@adacore.com>
9005 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
9006 was used instead of Hi_OK, which could cause a read of an uninitialized
9007 value later on. Detected while working on the new warning.
9008 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
9010 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
9011 in more cases, in order to detect more unreferenced values.
9012 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
9013 object for expression, if any.
9015 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9017 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
9018 the operand types instead of the Esize.
9020 2011-08-04 Steve Baird <baird@adacore.com>
9022 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
9023 enable CodePeer_Mode.
9024 * bindusg.adb (Display): Add help message describing -P binder switch.
9025 * gnat_ugn.texi: Document -P binder switch.
9026 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
9027 user-defined main program directly.
9028 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
9029 user-defined main program in the context clause of the package body.
9031 2011-08-04 Yannick Moy <moy@adacore.com>
9033 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
9034 duplicate of Defining_Entity
9035 (Get_Unique_Entity_For_Decl): rename function into
9036 Unique_Defining_Entity
9037 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
9038 (Formal_Proof_On): remove synthesized flag
9039 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9040 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
9041 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
9042 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
9043 Annotate (Formal_Proof)
9045 2011-08-04 Emmanuel Briot <briot@adacore.com>
9047 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
9048 source files with non-standard naming schemes, in imported projects
9050 2011-08-04 Emmanuel Briot <briot@adacore.com>
9052 * makeutl.adb (Complete_Mains): when a multi-unit source file is
9053 specified on the gprbuild command line, we need to compile all units
9054 within that file, not just the first one we find
9055 Fix error message for mains that are not found.
9057 2011-08-04 Thomas Quinot <quinot@adacore.com>
9059 * sem_ch6.adb: Update comment.
9060 * sem_ch12.adb: Minor reformatting.
9062 2011-08-04 Bob Duff <duff@adacore.com>
9064 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
9065 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
9066 race condition whose symptom is to fail to lock Parent. That, in turn,
9067 causes Parent.Awake_Count to be accessed without locking Parent, which
9068 causes another race condition whose symptom is that Parent.Awake_Count
9069 can be off by 1 (either too high or too low). The solution is to lock
9070 Parent unconditionally, and then lock Acceptor, before reading
9071 Acceptor.Terminate_Alternative.
9073 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9075 * debug.adb: Update comment.
9077 2011-08-04 Robert Dewar <dewar@adacore.com>
9079 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
9080 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
9081 exp_ch6.adb: Minor reformatting.
9083 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9085 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
9088 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9090 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
9092 2011-08-04 Thomas Quinot <quinot@adacore.com>
9094 * sinfo.ads: Minor reformatting.
9096 2011-08-04 Emmanuel Briot <briot@adacore.com>
9098 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
9099 even if there is no location.
9101 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9103 * sem_res.adb, sem_ch4.adb: move check for restriction
9104 No_Task_Hierarchy to resolve_allocator.
9106 2011-08-04 Thomas Quinot <quinot@adacore.com>
9108 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
9109 This flag of N_Pragma nodes is not used, remove it as well as all of
9110 the associated circuitry.
9112 2011-08-04 Javier Miranda <miranda@adacore.com>
9114 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
9115 runtime check on duplicated externa tags
9116 * debug.adb Document switch -gnatdQ.
9118 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9120 * a-fihema.ads: Minor typo fix.
9122 2011-08-04 Yannick Moy <moy@adacore.com>
9124 * sem_ch10.adb: Minor comment update.
9126 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9128 * einfo.adb: Update the node field usage to reflect the renaming of
9129 Return_Flag to Return_ Flag_Or_Transient_Decl.
9130 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
9131 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
9132 (Write_Field15_Name): Change Return_Flag to
9133 Return_Flag_Or_Transient_Decl.
9134 * einfo.ads: Rename node field Return_Flag to
9135 Return_Flag_Or_Transient_Decl. Update the associated comment and all
9136 occurrences in entities.
9137 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
9138 associated Inline pragma.
9139 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
9140 associated Inline pragma.
9141 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
9143 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
9144 Return_Flag and Set_Return_Flag.
9145 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
9146 objects generated for controlled transients declared inside an
9147 Exception_With_Actions. Update the calls to Return_Flag.
9148 (Process_Object_Declaration): Add code to add a null guard for hook
9149 objects generated for controlled transients declared inside an
9150 Exception_With_Actions. Update related comment.
9151 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
9152 objects generated for controlled transients declared inside an
9153 Exception_With_Actions. Update the calls to Return_Flag.
9154 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
9156 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9158 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
9159 positional aggregate.
9161 2011-08-04 Vincent Celier <celier@adacore.com>
9163 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
9164 SLOC only for pragmas.
9166 2011-08-04 Emmanuel Briot <briot@adacore.com>
9168 * projects.texi: Minor typo fix.
9170 2011-08-04 Emmanuel Briot <briot@adacore.com>
9172 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
9173 on case-sensitive file systems.
9175 2011-08-04 Thomas Quinot <quinot@adacore.com>
9177 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
9178 nested in a disabled pragma.
9179 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
9180 enclosing pragma, if any, for X decisions.
9182 2011-08-04 Thomas Quinot <quinot@adacore.com>
9184 * sem_prag.adb: Minor reformatting.
9186 2011-08-04 Vincent Celier <celier@adacore.com>
9188 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
9189 allowed in no run time mode.
9191 2011-08-04 Vincent Celier <celier@adacore.com>
9193 * make.adb (Check): When -gnatc is used, check for the source file
9194 inside the ALI file with a canonical case file name.
9196 2011-08-04 Emmanuel Briot <briot@adacore.com>
9198 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
9199 overriding the separator.
9201 2011-08-04 Robert Dewar <dewar@adacore.com>
9203 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
9204 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
9206 2011-08-04 Robert Dewar <dewar@adacore.com>
9208 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
9210 2011-08-04 Yannick Moy <moy@adacore.com>
9212 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
9213 'Result only appears in postcondition of function.
9215 2011-08-04 Thomas Quinot <quinot@adacore.com>
9217 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9218 external tag, include the value of the external tag in the exception
9221 2011-08-04 Yannick Moy <moy@adacore.com>
9223 * sem_attr.adb (Result): modify error message for misplaced 'Result
9225 2011-08-04 Sergey Rybin <rybin@adacore.com>
9227 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9228 clear that the second argument must be an identifier.
9230 2011-08-04 Thomas Quinot <quinot@adacore.com>
9232 * exp_ch9.adb (Build_Barrier_Function): When compiling with
9233 -fpreserve-control-flow, insert an IF statement on the barrier
9234 condition to ensure that a conditional branch instruction is generated.
9236 2011-08-04 Emmanuel Briot <briot@adacore.com>
9238 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9239 (Processing_Flags.Ignore_Missing_With): new flag.
9241 2011-08-04 Emmanuel Briot <briot@adacore.com>
9243 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9244 Source_List_File on case-insensitive systems where the file is actually
9245 on a case-sensitive file system (NFS,...).
9247 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9249 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9250 function return contains a controlled [extension] aggregate and the
9251 return statement is not part of a handled sequence of statements, wrap
9252 the return in a block. This ensures that all controlled temporaries
9253 generated during aggregate resolution will be picked up by the
9254 finalization machinery.
9256 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9258 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9259 components, freeze type before resolution, to ensure that default
9260 initializations are present for all components.
9261 * sem_res.adb (Resolve_Actuals): the designated object of an
9262 accces-to-constant type is a legal actual in a call to an
9263 initialization procedure.
9265 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9267 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9268 N_Unchecked_Type_Conversion to the possible containers of a renamed
9271 2011-08-04 Yannick Moy <moy@adacore.com>
9273 * par-ch13.adb (Aspect_Specifications_Present): recognize
9274 "with Identifier'Class =>" as an aspect, so that a meaningful warning
9275 is issued in Strict mode.
9276 * par.adb: Fix typos in comments.
9278 2011-08-04 Yannick Moy <moy@adacore.com>
9280 * sem_attr.adb (Result): modify error message to take into account Post
9281 aspect when compiling Ada 2012 (or newer) code.
9283 2011-08-04 Nicolas Roche <roche@adacore.com>
9285 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9286 remove need for GCC exceptions.
9288 2011-08-04 Vincent Celier <celier@adacore.com>
9290 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9291 project, not the source file name.
9292 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9293 excluded, continue looking. This excluded source will only be returned
9294 if there is no other source with the same base name that is not locally
9297 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9299 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9300 private and one of the operands is a real literal, use a qualified
9301 expression rather than a conversion which is not meaningful to the
9304 2011-08-04 Yannick Moy <moy@adacore.com>
9306 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9307 corresponding aspect X'Class are allowed, proceed with analysis of the
9308 aspect instead of skipping it.
9310 2011-08-04 Tristan Gingold <gingold@adacore.com>
9312 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9313 This will allow to have an Ada implementation for the subprogram.
9315 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9317 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9318 completion and aspects are present, apply them to the entity for the
9319 type which is currently the partial view, but which is the one that
9321 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9322 applies to a partial view, indicate that the full view has predicates
9323 and delayed aspects.
9324 (Replace_Type_Reference): Handle properly predicates that apply to the
9325 full view of a private completion.
9327 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9329 * layout.adb (Layout_Type): For composite types, do not set Esize.
9330 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9332 (Size_Known): Look at the RM size of components instead of the Esize.
9333 (Freeze_Record_Type): Look at the RM size instead of the Esize to
9334 issue warning and activate Implicit_Packing.
9335 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
9336 if the Esize is not known.
9337 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9338 for elementary types only.
9339 (Analyze_Record_Representation_Clause): Look at the RM size instead
9340 of the Esize to issue errors.
9341 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9343 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
9345 Look at the RM size instead of the Esize for types if the latter is
9347 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9349 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9351 * sem_type.adb: proper handling of equality not involving anonymous
9354 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9356 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9357 Vis_Decls. When creating a library-level finalizer for a package spec,
9358 both the declaration and body of the finalizer are inserted either in
9359 the visible or private declarations of the package spec.
9361 2011-08-04 Javier Miranda <miranda@adacore.com>
9363 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9364 use of the full-view of a type when invoking Is_Ancestor.
9365 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9366 the full-view of private parents is requested, then use also the
9367 full-view of the parent of the first derivation.
9369 2011-08-04 Tristan Gingold <gingold@adacore.com>
9371 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9372 instead of the locally imported procedure.
9373 * s-taprop-mingw.adb (Enter_Task): Ditto.
9374 * s-valrea.adb (Scan_Real): Ditto.
9375 * s-imgrea.adb (Set_Image_Real): Ditto.
9376 * s-flocon.ads: Make the package pure.
9378 2011-08-04 Thomas Quinot <quinot@adacore.com>
9380 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9381 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9382 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9383 New subprogram, moved here from...
9384 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9385 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9386 rewriting of the last argument into a procedure call statement here...
9387 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9390 2011-08-04 Thomas Quinot <quinot@adacore.com>
9392 * par_sco.adb: Minor reformatting.
9394 2011-08-04 Robert Dewar <dewar@adacore.com>
9396 * erroutc.adb: Minor reformatting.
9398 2011-08-04 Thomas Quinot <quinot@adacore.com>
9400 * par_sco.adb: Comment update.
9402 2011-08-04 Tristan Gingold <gingold@adacore.com>
9404 * s-flocon.ads: New file.
9405 * g-flocon.ads: Now a renaming of s-flocon.
9406 * Makefile.rtl: Add s-flocon.o
9408 2011-08-04 Javier Miranda <miranda@adacore.com>
9410 * exp_strm.adb (Build_Array_Input_Function): if the array type is
9411 constrained, do not attempt to build a subtype of it.
9413 2011-08-04 Yannick Moy <moy@adacore.com>
9415 * errout.ads Change comments: remove 'R'M as an example where quotes
9416 are needed; add ALFA as another case where quotes are not needed
9417 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9418 case where quotes are not needed.
9419 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9420 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9421 Remove all occurrences of 'A'L'F'A
9423 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9425 * sem_ch13.adb: check legality of invariant pragma.
9427 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9429 * bindgen.adb: Add comments.
9431 2011-08-04 Yannick Moy <moy@adacore.com>
9433 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9435 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9436 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9438 2011-08-04 Robert Dewar <dewar@adacore.com>
9440 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9441 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9442 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9444 2011-08-04 Thomas Quinot <quinot@adacore.com>
9446 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9448 2011-08-04 Thomas Quinot <quinot@adacore.com>
9451 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9454 2011-08-04 Robert Dewar <dewar@adacore.com>
9456 * einfo.ads, exp_ch4.adb: Minor reformatting.
9458 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9460 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9462 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9464 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9465 type in all cases to compute list of primitive operations, because full
9466 view may be an itype that is not attached to the list of declarations.
9468 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9470 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9471 library has already been finalized.
9472 (Gen_Adafinal_C): Likewise.
9473 (Gen_Adainit_Ada): Generate an early return if the library has
9474 already been elaborated.
9475 (Gen_Adainit_C): Likewise.
9476 (Gen_Output_File_Ada): Generate an elaboration flag.
9477 (Gen_Output_File_C): Likewise.
9479 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9481 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9482 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9483 built in the first place.
9484 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9485 for CodePeer because Finalize_Address was not built to begin with.
9486 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9488 2011-08-04 Pascal Obry <obry@adacore.com>
9490 * adaint.c (__gnat_tmp_name): Use current process id to create temp
9491 filenames, this ensures unicity of filenames across processes.
9493 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9495 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9496 Raise_Controlled to Raise_From_Controlled_Operation. Update the
9497 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9498 Add False as the actual to From_Abort in the generated call to
9499 Raise_From_Controlled_Operation.
9501 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9503 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9504 so that the ali file name can be retrieved from outside of this package.
9505 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9506 doing nothing in the general case, but used to update the object file
9507 timestamp if directly generated by the backend.
9508 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9509 to a later time than the ali file one.
9511 2011-08-04 Yannick Moy <moy@adacore.com>
9513 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9514 entities whose body contains an Annotate pragma which forces formal
9516 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9517 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9518 Mark_Non_ALFA_Subprogram to pass in a message and node.
9519 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9520 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9521 surrounding subprogram.
9522 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9523 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9524 as not in ALFA is annotated with Formal_Proof being On, then an error
9525 is issued based on the additional parameters for message and node.
9526 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9527 * gcc-interface/Make-lang.in: Update dependencies.
9529 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9531 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9532 Finalize_Address when CodePeer is enabled.
9534 2011-08-04 Pascal Obry <obry@adacore.com>
9536 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9537 the latter returns a pointer to a static buffer which is deallocated
9538 at the end of the routine.
9540 2011-08-04 Yannick Moy <moy@adacore.com>
9542 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9543 after index creation; mark unconstrained base array type generated as
9544 being in/not in ALFA as well
9545 (Make_Index): mark subtype created as in/not in ALFA
9546 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9547 over a loop as in/not in ALFA, depending on its type and form of loop
9550 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9552 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9553 directly to False on .NET and JVM.
9555 2011-08-04 Yannick Moy <moy@adacore.com>
9557 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9558 constraint that subtype must come from source code to be in ALFA, so
9559 that anonymous subtypes can be in ALFA too.
9561 2011-08-04 Yannick Moy <moy@adacore.com>
9563 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9564 reference for ALFA mode.
9565 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9566 procedure public so as to use it from formal verification back-end.
9568 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9570 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9571 invalid checks of the Parameter, making Remove_Switch not working
9574 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9576 * targparm.ads: Update header: no run-time exception is needed on this
9579 2011-08-04 Vincent Celier <celier@adacore.com>
9581 * a-fihema.adb: Use System.IO instead of GNAT.IO
9583 2011-08-04 Thomas Quinot <quinot@adacore.com>
9585 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9586 are forbidden in Compiler_Unit mode.
9588 2011-08-04 Robert Dewar <dewar@adacore.com>
9590 * sem_util.adb: Minor reformatting.
9592 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9594 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9595 library-level finalizers.
9596 (Gen_Finalize_Library_C): Update the import string for library-level
9598 (Gen_Finalize_Library_Defs_C): Update the definition name of a
9599 library-level finalizer.
9600 * exp_ch7.adb: Remove with and use clauses for Stringt.
9601 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9602 Spec_Decl. Add local variable Body_Id. The names of library-level
9603 finalizers are now manually fully qualified and are no longer external.
9604 A single name is now capable of servicing .NET, JVM and non-VM targets.
9605 Pragma Export is no longer required to provide visibility for the name.
9606 (Create_Finalizer_String): Removed.
9607 (New_Finalizer_Name): New routine which mimics New_..._Name.
9609 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9611 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9612 elaboration counter to Standard_Short_Integer.
9613 * sem_util.adb (Build_Elaboration_Entity): Likewise.
9614 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9615 (Gen_Elab_Externals_C): Likewise.
9617 2011-08-04 Ed Falis <falis@adacore.com>
9619 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9620 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9621 system-vxworks-mips.ads, system-vxworks-x86.ads
9622 (Always_Compatible_Rep): set to False for all VxWorks targets.
9624 2011-08-04 Robert Dewar <dewar@adacore.com>
9626 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9627 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9628 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9629 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9630 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9631 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9632 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9633 Minor reformatting and code reorganization.
9635 2011-08-04 Emmanuel Briot <briot@adacore.com>
9637 * projects.texi: Added doc for aggregate projects.
9639 2011-08-04 Emmanuel Briot <briot@adacore.com>
9641 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9642 Add support for overriding the Project_Path in aggregate projects.
9644 2011-08-04 Robert Dewar <dewar@adacore.com>
9646 * a-cofove.ads: Minor reformatting.
9648 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9650 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9651 on the generated code.
9652 (Build_Finalize_Statements): Update the comment on the generated code.
9653 (Build_Initialize_Statements): Update the comment on the generated code.
9654 (Build_Object_Declarations): Add local variable Result. The object
9655 declarations are now built in sequence.
9656 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9659 2011-08-04 Robert Dewar <dewar@adacore.com>
9661 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9663 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9665 * einfo.ads (Elaboration_Entity): Document new definition and use.
9666 (Elaboration_Entity_Required): Adjust to above change.
9667 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9668 * exp_ch12.adb: And with and use for Snames.
9669 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9670 * exp_util.adb (Set_Elaboration_Flag): Likewise.
9671 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9672 <Check_Unit_Name>: Deal with N_Expanded_Name.
9673 <Attribute_Elaborated>: Extend to all unit names.
9674 * sem_elab.adb: And with and use for Uintp.
9675 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9676 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9677 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9678 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9679 from Gen_Adainit_Ada.
9680 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9681 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
9682 case, do not call System.Standard_Library.Adafinal; instead call
9683 finalize_library if needed.
9684 (Gen_Adafinal_C): Likewise.
9685 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9686 non-main program case.
9687 (Gen_Adainit_C): Generate a couple of external declarations here.
9688 In the main program case, set SSL.Finalize_Library_Objects.
9689 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9690 (Gen_Elab_Calls_C): Likewise.
9691 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
9692 (Gen_Finalize_Library_C): Likewise. Generate a full function.
9693 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9695 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9696 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
9698 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9699 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
9700 of external declarations. Call Gen_Finalize_Library_C.
9702 2011-08-04 Emmanuel Briot <briot@adacore.com>
9704 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9705 Compute_Compilation_Phases): new subprogram.
9706 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9707 The number of mains as well as the various compilation phases that
9708 need to be run are now project tree specific, since various
9709 aggregated trees might have different requirements. In particular,
9710 they do not all require bind or link phases.
9712 2011-08-04 Emmanuel Briot <briot@adacore.com>
9714 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9715 (Project_Tree_Appdata): New type.
9716 It is now possible to associate application-specific data to a project
9717 tree. In particular, this is used in the gprbuild builder to avoid a
9718 number of global tables and htables, especially now that there can be
9719 several project trees loaded at once because of aggregate projects.
9720 (Debug_Name): new procedure.
9721 * projects.texi: Clarify syntax of "**" for Source_Dirs
9723 2011-08-03 Emmanuel Briot <briot@adacore.com>
9725 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9726 the "roots" for a main.
9727 (Fill_From_Project): add support for aggregate projects. Main units
9728 in aggregated projects are now automatically added in the list of
9729 files to build (although this fails later on in gprbuild, because
9730 these files are not using the root proejct tree, so this needs
9732 * gcc-interface/Make-lang.in: Update dependencies.
9734 2011-08-03 Yannick Moy <moy@adacore.com>
9736 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9737 conditional expression in ALFA.
9738 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9739 expressions as not in ALFA.
9741 2011-08-03 Robert Dewar <dewar@adacore.com>
9743 * a-cofove.adb: Minor reformatting.
9745 2011-08-03 Emmanuel Briot <briot@adacore.com>
9747 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9748 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9750 These packages are more logically placed in the Queue package, since
9751 they manipulate the queue. It is also likely that they can be adapted
9752 for gnatmake, thus sharing more code.
9753 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9754 that we could move the above.
9756 2011-08-03 Emmanuel Briot <briot@adacore.com>
9758 * errutil.adb (Finalize): clean up the list of error messages on exit.
9759 Calling this subprogram multiple times will no longer show duplicate
9760 error messages on stderr.
9762 2011-08-03 Emmanuel Briot <briot@adacore.com>
9764 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9765 Getopt_Switches when we have already define a command line
9768 2011-08-03 Yannick Moy <moy@adacore.com>
9770 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9771 in ALFA. Instead, they are considered as assertions to prove.
9772 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9773 nodes as not in ALFA. Instead, include conditional expressions in ALFA
9774 if they have no ELSE part, or if they occur in pre- and postconditions,
9775 where the Condition cannot have side-effects in ALFA
9776 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9777 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9778 Instead, include type conversion between scalar types in ALFA.
9779 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9780 if-and-only-if its type is in ALFA.
9782 2011-08-03 Thomas Quinot <quinot@adacore.com>
9784 * scos.adb, get_scos.adb, put_scos.adb
9785 New code letter for decisions: G (entry guard)
9787 (Traverse_Subprogram_Body): Rename to...
9788 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9789 (Traverse_Protected_Body): New subprogram
9790 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9791 protected bodies and entry bodies.
9793 2011-08-03 Yannick Moy <moy@adacore.com>
9795 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9796 entities with get/set subprograms, which is set on procedure entities
9797 generated by the compiler for a postcondition.
9798 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9799 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9800 entity for a declaration
9801 (Get_Unique_Entity_For_Decl): new function returning an entity which
9802 represents a declaration, so that matching spec and body have the same
9805 2011-08-03 Robert Dewar <dewar@adacore.com>
9807 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9808 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9810 2011-08-03 Yannick Moy <moy@adacore.com>
9812 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9813 library-level because retriction No_Implicit_Dynamic_Code in the
9814 front-end prevents its definition as a local subprogram
9815 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9816 for reuse in other contexts
9817 (Traverse_Declarations_Or_Statements,
9818 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9819 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9820 procedures take a callback parameter to be called on all declarations
9822 (Traverse_All_Compilation_Units): new generic function to traverse a
9823 compilation unit and call a callback parameter on all declarations
9825 2011-08-03 Javier Miranda <miranda@adacore.com>
9827 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
9828 in Java since they are always enclosed in a namespace that
9829 differentiates them, and overloaded entities are supported by the VM.
9831 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9833 * checks.adb (Determine_Range): If a computed bound of an operation is
9834 outside the range of the base type of the expression, and overflow
9835 checks are enabled, the result is unknown and cannot be used for any
9836 subsequent constant folding.
9837 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
9838 unknown, so is the result of the comparison.
9840 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9842 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
9843 From_Abort. When finalization was triggered by an abort, propagate
9844 Standard'Abort_Signal rather than Program_Error.
9845 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
9847 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
9848 From_Abort. When finalization was triggered by an abort, propagate
9849 Standard'Abort_Signal rather than Program_Error.
9850 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
9852 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
9853 Abort_Id. Update the calls to Build_Object_Declarations and
9854 Build_Raise_Statement to include Abort_Id.
9855 (Build_Adjust_Statements): New local variable Abort_Id. Update the
9856 calls to Build_Object_Declarations and Build_Raise_Statement to include
9858 (Build_Finalize_Statements): New local variable Abort_Id. Update the
9859 calls to Build_Object_Declarations and Build_Raise_Statement to include
9861 (Build_Components): Create an entity for Abort_Id when exceptions are
9862 allowed on the target.
9863 (Build_Finalizer): New local variable Abort_Id.
9864 (Build_Initialize_Statements): New local variable Abort_Id. Update the
9865 calls to Build_Object_Declarations and Build_Raise_Statement to include
9867 (Build_Object_Declarations): Add new formal Abort_Id. Create the
9868 declaration of flag Abort_Id to preserve the original abort status
9869 before finalization code is executed.
9870 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
9871 runtime routine Raise_From_Controlled_Operation.
9872 (Create_Finalizer): Update the call to Build_Raise_Statement to include
9873 Abort_Id. Update the call to Build_Object_Declarations to include
9874 Abort_Id. Update the layout of the finalizer body.
9875 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
9876 (Process_Transient_Objects): New local variable Abort_Id. Remove the
9877 clunky code to create all flags and objects related to
9878 exception propagation and replace it with a call to
9879 Build_Object_Declarations. Update the call to Build_Raise_Statement to
9881 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
9882 Add new formal Abort_Id and associated comment on its use.
9883 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
9885 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
9886 Remove the clunky code to create all flags and objects related to
9887 exception propagation and replace it with a call to
9888 Build_Object_Declarations. Update the call to Build_Raise_Statement.
9890 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9892 * s-tassta.adb: Fix minor typos.
9894 2011-08-03 Robert Dewar <dewar@adacore.com>
9896 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
9897 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
9899 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9901 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
9902 to packages. This ensures that the finalizer body will not end up
9903 inside the freeze node.
9904 (Process_Declarations): Add code to detect whether a freeze node has a
9905 nested finalization collection.
9907 2011-08-03 Pascal Obry <obry@adacore.com>
9909 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
9910 (Current_Session): Return a not null access to Session_Type.
9911 (Default_Session): Likewise.
9913 2011-08-03 Robert Dewar <dewar@adacore.com>
9915 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
9916 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
9918 2011-08-03 Pascal Obry <obry@adacore.com>
9920 * g-awk.ads: Minor comment fix.
9922 2011-08-03 Sergey Rybin <rybin@adacore.com>
9924 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9925 the tree structure related to discriminant constraints.
9926 Original_Discriminant cannot be used any more for computing the
9927 defining name for the reference to a discriminant.
9929 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9931 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
9932 function is not visibly tagged, this is not a dispatching call and
9933 therfore is not Tag_Indeterminate, even if the function is marked as
9934 dispatching on result.
9936 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9938 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
9939 (Expand_N_Free_Statement): Add a guard to protect against run-times
9940 which do not support controlled types.
9941 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
9942 against run-times which do not support controlled types.
9943 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
9944 against run-times which do not support controlled types.
9945 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
9946 against run-times which do not support controlled types.
9947 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
9948 protect against run-times which do not support controlled types.
9950 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9952 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
9953 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9955 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9957 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9958 modified in the source, to prevent spurious warnings when compiling
9961 2011-08-03 Thomas Quinot <quinot@adacore.com>
9963 * a-except-2005.adb: Minor reformatting.
9965 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9967 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9968 is a renaming declaration in the private part of a package, do not emit
9969 a warning that the with_clause could be moved because the renaming may
9970 be used in the body or in a child unit.
9972 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9974 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9975 Propagate the Comes_From_Source attribute from the original return
9976 object to the renaming.
9978 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9980 * exp_ch7.adb (Build_Raise_Statement): Do not call
9981 Raise_From_Controlled_Operation when this routine is not present in
9982 the run-time library.
9983 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9984 libraries (Ravenscar), tasks are non-terminating, and protected objects
9985 and tasks can only appear at library level, so we do not want
9986 finalization of protected objects nor tasks.
9987 * exp_intr.adb: Minor clarification in comment.
9988 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9989 Gen_Output_File_C): Remove references to finalization of library-level
9990 objects when using restricted run-time libraries.
9992 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9994 * sem_ch3.adb (Build_Discriminant_Constraints): Set
9995 Original_Discriminant only if the parent type is a generic formal.
9997 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9999 * exp_ch13.adb: Add with and use clause for Targparm;
10000 (Expand_N_Free_Statement): Prevent the generation of a custom
10001 Deallocate on .NET/JVM targets since this requires pools and address
10003 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
10004 .NET/JVM targets, attach the newly allocated object to the access
10005 type's finalization collection. Do not generate a call to
10006 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
10007 exist in the runtime.
10008 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
10009 create a custom Allocate for object that do not require initialization.
10010 Attach a newly allocated object to the access type's finalization
10011 collection on .NET/JVM.
10012 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
10013 assignment of controlled types on .NET/JVM. The two hidden pointers
10014 Prev and Next and stored and later restored after the assignment takes
10016 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
10017 kludge for .NET/JVM to recognize a particular piece of code coming from
10018 Heap_Management and change the call to Finalize into Deep_Finalize.
10019 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
10020 finalization collections on .NET/JVM only for types derived from
10021 Controlled. Separate the association of storage pools with a collection
10022 and only allow it on non-.NET/JVM targets.
10023 (Make_Attach_Call): New routine.
10024 (Make_Detach_Call): New routine.
10025 (Process_Object_Declarations): Suppress the generation of
10026 build-in-place return object clean up code on .NET/JVM since it uses
10028 * exp_ch7.ads (Make_Attach_Call): New routine.
10029 (Make_Detach_Call): New routine.
10030 * exp_intr.adb Add with and use clause for Targparm.
10031 (Expand_Unc_Deallocation): Detach a controlled object from a collection
10032 on .NET/JVM targets.
10033 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
10034 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
10035 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
10036 names used in finalization.
10038 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10040 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
10041 (Attach, Detach): Lock the current task when chaining an object onto a
10044 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10046 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
10047 Rewritten to create the message strings when the exception is not
10048 raised by an abort during finalization.
10049 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
10050 Raise_From_Controlled_Operation and update its associated comment.
10051 * a-fihema.ads, a-fihema.adb: New GNAT unit.
10052 Ada.Finalization.Heap_Management provides key functionality
10053 associated with controlled objects on the heap, their creation,
10054 finalization and reclamation. Type Finalization_Collection is
10055 effectively a wrapper which sits ontop of a storage pool and performs
10056 all necessary bookkeeping for all the objects it contains. Each
10057 access-to-controlled or access-to-class-wide type receives a collection
10058 as part of its expansion. The compiler generates buffer code and
10059 invokes Allocate / Deallocate to create and destroy allocated
10060 controlled objects.
10061 * a-finali.adb ("="): Removed.
10062 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
10063 fields Prev and Next.
10064 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
10065 A library unit with at least one controlled object on the library level
10066 has a special finalizer which is invoked by the binder. To signal this,
10067 ali files carry field PF.
10068 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
10069 associated comment on field usage.
10070 * a-tags.adb (Get_RC_Offset): Removed.
10071 (Needs_Finalization): New routine.
10072 * a-tags.ads: Update the structure of the GNAT dispatch tables.
10073 Dispatch tables now carry field Needs_Finalization which provides
10074 runtime indication whether a type is controlled or has controlled
10075 components or both. Remove field RC_Offset.
10076 (Get_RC_Offset): Removed along with its associated pragma Export.
10077 Since tagged types with controlled components no longer carry hidden
10078 field _controller, the special mechanism to retrieve its location is no
10080 (Needs_Finalization): New routine.
10081 * atree.ads, atree.adb (Elist24): New routine.
10082 (Set_Elist24): New routine.
10083 * atree.h: Add a define clause for Elist24.
10084 * bindgen.adb New library-level variable Lib_Final_Built.
10085 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
10086 presence of a VM target, the routine generates calls to the proper
10087 library finalization routine.
10088 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
10089 targets. Set the correct library finalization routine depending on
10090 whether the library has controlled objects or this is a VM compilation.
10091 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
10092 to library-level finalizers of compiled units in reverse order of
10093 elaboration. It also produces exception management code and reraises a
10094 potential exception after all units have been finalized.
10095 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
10096 library-level finalizers of compiled units in reverse order of
10098 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
10099 definitions of all library-level finalizers available to the compilation
10100 (Gen_Main_Ada): Directly call Adafinal which now contails all target
10102 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
10103 System.Standard_Library.Adafinal directly. If the library needs
10104 finalization actions, create the sequence of finalization calls.
10105 (Gen_Output_File_Ada): Alphabetize local variables and constants.
10106 Generate a with clause for System.Soft_Links when compiling for a VM.
10107 Remove the code which imports System.Standard_Library.Adafinal as
10108 Do_Finalize. Generate the library finalization routine.
10109 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
10110 If the library needs finalization actions, create all the definitions
10111 of library- level finalizers.
10112 (Has_Finalizer): New routine. Determines whether at least one compiled
10113 unit has a library-level finalizer.
10114 Add type Qualification_Mode.
10115 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
10116 * einfo.adb: New usage of field 15 as Return_Flag.
10117 Remove Finalization_Chain_Entity from the usages of field 19.
10118 Remove Associated_Final_Chain from the usages of field 23.
10119 New usage of field 23 as Associated_Collection.
10120 New usage of field 24 as Finalizer.
10121 New usage of flag 252 as Is_Processed_Transient.
10122 (Associated_Final_Chain): Removed.
10123 (Associated_Collection): New routine.
10124 (Finalization_Chain_Entity): Removed.
10125 (Finalizer): New routine.
10126 (Is_Finalizer): New routine.
10127 (Is_Processed_Transient): New routine.
10128 (Return_Flag): New routine.
10129 (Set_Associated_Final_Chain): Removed.
10130 (Set_Associated_Collection): New routine.
10131 (Set_Finalization_Chain_Entity): Removed.
10132 (Set_Finalizer): New routine.
10133 (Set_Is_Processed_Transient): New routine.
10134 (Set_Return_Flag): New routine.
10135 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
10137 (Write_Field8_Name): Alphabetize the output.
10138 (Write_Field11_Name): Alphabetize the output.
10139 (Write_Field12_Name): Alphabetize the output.
10140 (Write_Field13_Name): Alphabetize the output.
10141 (Write_Field14_Name): Alphabetize the output.
10142 (Write_Field15_Name): Alphabetize the output.
10143 (Write_Field16_Name): Alphabetize the output.
10144 (Write_Field17_Name): Alphabetize the output.
10145 (Write_Field18_Name): Alphabetize the output.
10146 (Write_Field19_Name): Alphabetize the output. Remove the output of
10147 Finalization_Chain_Entity.
10148 (Write_Field20_Name): Alphabetize the output.
10149 (Write_Field21_Name): Alphabetize the output.
10150 (Write_Field22_Name): Alphabetize the output.
10151 (Write_Field23_Name): Alphabetize the output. Remove the output of
10152 Associated_Final_Chain. Add output for Associated_Collection.
10153 (Write_Field24_Name): Alphabetize the output.
10154 (Write_Field25_Name): Add output for Finalizer.
10155 (Write_Field26_Name): Alphabetize the output.
10156 (Write_Field27_Name): Alphabetize the output.
10157 (Write_Field28_Name): Alphabetize the output.
10158 * einfo.ads: Add new field description for Associated_Collection and
10160 Remove Associated_Final_Chain and its uses in nodes.
10161 Remove Finalization_Chain_Entity and its uses in nodes.
10162 Add new field description for Finalizer and its uses in nodes.
10163 Add new synthesized attribute Is_Finalizer.
10164 Add new flag description for Is_Processed_Transient and its uses in
10166 Add new field description for Return_Flag and its uses in nodes.
10167 (Associated_Final_Chain): Removed along with its pragma Inline.
10168 (Associated_Collection): New routine and pragma Inline.
10169 (Finalization_Chain_Entity): Removed along with its pragma Inline.
10170 (Finalizer): New routine and pragma Inline.
10171 (Is_Finalizer): New routine and pragma Inline.
10172 (Is_Processed_Transient): New routine and pragma Inline.
10173 (Return_Flag): New routine and pragma Inline.
10174 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
10175 (Set_Associated_Collection): New routine and pragma Inline.
10176 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
10177 (Set_Finalizer): New routine and pragma Inline.
10178 (Set_Is_Processed_Transient): New routine and pragma Inline.
10179 (Set_Return_Flag): New routine and pragma Inline.
10180 * exp_aggr.adb: Alphabetize subprograms.
10181 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
10182 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
10183 associated comments. Remove local variables External_Final_List and
10185 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
10186 Ancestor. Remove the retrieval of finalization lists. Update the call to
10188 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
10189 lists. Update the call to Late_Expansion.
10190 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
10191 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
10192 (Gen_Assign): Remove the retrieval of the finalization list used to
10193 build the assignment. Update the calls to Make_Init_Call and
10195 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
10196 Remove the mechanism to determine attachment levels and finalization
10197 list retrieval. Remove the processing for coextensions.
10198 (Init_Controller): Removed. Controllers no longer exist.
10199 (Late_Expansion): Remove formals Flist and Obj along with their
10200 associated comments. Update the calls to Build_Record_Aggr_Code and
10201 Build_Array_Aggr_Code.
10202 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
10203 (Expand_N_Freeze_Entity): Add special processing for finalizers which
10204 appear in entry bodies, protected subprograms and task bodies.
10205 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
10206 * exp_ch3.adb (Add_Final_Chain): Removed.
10207 (Build_Array_Init_Proc): Alphabetize local variables.
10208 (Build_Assignment): Alphabetize local variables. Update the call to
10210 (Build_Class_Wide_Master): Rename local variables to better reflect
10212 (Build_Discriminant_Assignments): Code reformatting.
10213 (Build_Init_Call_Thru): Code reformatting.
10214 (Build_Init_Procedure): Code reformatting. Generate a special version
10215 of Deep_Finalize which is capable of finalizing all initialized
10216 components and ignore the rest.
10217 (Build_Init_Statements): Rename local variables to better reflect their
10219 Reimplement the mechanism to include the creation and update of an index
10220 variable called a "counter". It is used as a bookmark for tracing
10221 initialized and non-initialized components.
10222 (Build_Initialization_Call): Remove local variable Controller_Typ.
10223 Alphabetize all local variables. Remove the initialization of the
10224 record controller and update the call to Make_Init_Call.
10225 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10226 New local variable Counter.
10227 (Constrain_Array): Alphabetize.
10228 (Expand_Freeze_Array_Type): Create a collection instead of a
10230 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10231 Finalize_Address which is used in conjunction with allocated controlled
10233 (Expand_N_Object_Declaration): Remove the creation of a finalization
10234 list for anonymous access types. Update the calls to Make_Init_Call and
10236 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10237 retrieval of finalization lists. Remove the expansion of the record
10238 controller. Create TSS primitive Finalize_Address used in conjunction
10239 with controlled objects on the heap. Create finalization collections
10240 for access-to-controlled record components.
10241 (Expand_Record_Controller): Removed.
10242 (Freeze_Type): Remove the freezing of record controllers. Freezing of
10243 class-wide types now requires additional processing. Create
10244 finalization collections for access-to-controlled types.
10245 (Increment_Counter): New routine.
10246 (Make_Counter): New routine.
10247 (Make_Eq_If): Remove the mention of Name_uController.
10248 (Make_Predefined_Primitive_Specs): There is no longer need to skip
10249 types coming from System.Finalization_Root.
10250 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10251 (Predefined_Primitive_Bodies): There is no longer need to skip types
10252 coming from System.Finalization_Root.
10253 (Stream_Operation_OK): Do not generate stream routines for
10254 type Ada.Finalization.Heap_Management.Finalization_Collection.
10255 * exp_ch3.ads: Alphabetize subprograms.
10256 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10257 Add with and use clause for Lib.
10258 (Complete_Coextension_Finalization): Removed.
10259 (Complete_Controlled_Allocation): New routine. Create a finalization
10260 collection for anonymous access-to-controlled types. Create a custom
10261 Allocate which interfaces with the back end and the machinery in
10263 (Expand_Allocator_Expression): Add necessary calls to
10264 Complete_Controlled_Allocation. Remove the retrieval of finalization
10265 lists. Update the calls to Make_Adjust_Call. Generate a call to
10266 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10267 the associated collection.
10268 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10269 Code clean up. Remove the retrieval of finalization lists and
10271 Update the call to Make_Init_Call. Generate a call to
10272 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10273 the associated collection.
10274 (Get_Allocator_Final_List): Removed. Finalization lists are not
10276 (Suitable_Element): Remove the mention of Name_uController.
10277 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10278 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10279 the left hand side, carry out the assignment and adjust the left hand
10281 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10282 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10283 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10284 BIP_Collection and BIPcollection.
10285 (Build_Heap_Allocator): New routine used to allocate the return object
10286 of a build-in-place function onto a collection.
10287 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10288 (Expand_Call): Do not replace direct calls to Deep routines with their
10290 (Expand_N_Extended_Return_Statement): Give all variables shorter names
10291 and update their occurrences. Add a special return flag to monitor the
10292 [ab]normal execution of the function. The flag is set right before the
10294 Rewrite the mechanism used to allocate a build-in-place return object
10295 on the heap or on a storage pool.
10296 (Is_Direct_Deep_Call): New routine.
10297 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10298 build-in-place function call instead of a final list. Build a call to
10299 Set_Finalize_Address_Ptr to decorate the associated collection.
10300 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10301 order to name the build-in-place function call's result for later
10302 finalization. Add a collection to a build-in-place function call
10303 instead of a final list.
10304 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10305 build-in-place function call instead of a final list. Remove the code
10306 which moves one final list and transforms it into the actual in a
10307 nested build-in-place call.
10308 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10309 build-in-place function call instead of a final list.
10310 (Move_Final_List): Removed.
10311 (Needs_BIP_Collection): New routine.
10312 (Needs_BIP_Final_List): Removed.
10313 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10314 enumeration type BIP_Formal_Kind.
10315 Update the related comment.
10316 (Needs_BIP_Collection): New routine.
10317 (Needs_BIP_Final_List): Removed.
10318 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10319 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10320 majority of subprograms in this unit. Add Name_Finalize_Address to
10321 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10322 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10323 statements for an array type.
10324 (Build_Adjust_Statements): Create the adjust statements for a record
10326 (Build_Cleanup_Statements): New routine. A procedure which given any
10327 construct containing asynchronous calls, references to _master, or is a
10328 task body, a task allocation or a protected body produces the necessary
10329 runtime calls to clean up these constructs.
10330 (Build_Exception_Handler): New routine.
10331 (Build_Final_List): Removed.
10332 (Build_Finalization_Collection): New routine. A core procedure which
10333 creates a collection to service heap allocated controlled objects
10334 associated with an access-to-controlled type.
10335 (Build_Finalize_Statements): Create the finalization statements for a
10337 (Build_Finalizer): New routine. A core procedure which given any
10338 construct with declarations and/or statements detects all objects which
10339 need any type of clean up (controlled objects, protected objects) and
10340 generates all necessary code to clean up the said objects in the proper
10342 (Build_Finalizer_Call): New routine.
10343 (Build_Initialize_Statements): Create the initialization statements for
10344 an array type. The generated routine contains code to finalize partially
10345 initialized arrays.
10346 (Build_Object_Declarations): New routine.
10347 (Build_Raise_Statement): New routine.
10348 (Clean_Simple_Protected_Objects): Removed.
10349 (Controller_Component): Removed.
10350 (Enclosing_Function): New routine.
10351 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10352 either declarations or statements or both.
10353 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10354 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10356 (Find_Final_List): Removed.
10357 (Global_Flist_Ref): Removed.
10358 (In_Finalization_Root): Removed.
10359 (Insert_Actions_In_Scope_Around): Determine the range of the transient
10360 scope in terms of tree nodes. Process all transient variables within
10362 (Make_Adjust_Call): Rewritten. There is no longer an attach call
10363 generated after the adjust.
10364 (Make_Attach_Call): Removed.
10365 (Make_Call): New routine.
10366 (Make_Clean): Removed.
10367 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10369 (Make_Deep_Proc): Rewritten to generate the new profile signature used
10371 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10373 (Make_Final_Call): Modified to simply create a call to either
10374 Deep_Finalize or Finalize.
10375 (Make_Finalize_Address_Body): New routine.
10376 (Make_Finalize_Address_Stmts): New routine. A function which produces
10377 TSS primitive Finalize_Address used in conjunction with heap allocated
10378 controlled objects.
10379 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10380 (Make_Init_Call): Rewritten. There is no longer an attach call
10381 generated after initialization.
10382 (Make_Local_Deep_Finalize): New routine.
10383 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10384 (Make_Transient_Block): Remove the finalization list retrieval and
10386 (Needs_Finalization): Moved to Exp_Util.
10387 (Parent_Field_Type): New routine.
10388 (Preprocess_Components): New routine.
10389 (Process_Transient_Objects): New routine.
10390 (Wrap_HSS_In_Block): New routine.
10391 (Wrap_Transient_Declaration): Remove finalization list management and
10392 controller insertion.
10393 (Wrap_Transient_Expression): Code reformatting.
10394 (Wrap_Transient_Statement): Code reformatting.
10395 * exp_ch7.ads (Build_Final_List): Removed.
10396 (Build_Finalization_Collection): New routine.
10397 (Build_Raise_Statement): New routine.
10398 (Controller_Component): Removed.
10399 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10400 (Find_Final_List): Removed.
10401 (In_Finalization_Root): Removed.
10402 (Is_Simple_Protected_Type): Update related comment.
10403 (Make_Adjust_Call): New parameter profile and associated comments.
10404 (Make_Attach_Call): Removed.
10405 (Make_Final_Call): New parameter profile and associated comments.
10406 (Make_Finalize_Address_Body): New routine.
10407 (Make_Init_Call): New parameter profile and associated comments.
10408 (Make_Local_Deep_Finalize): New routine.
10409 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10410 (Needs_Finalization): Moved to Exp_Util.
10411 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10412 (Expand_N_Protected_Body): Remove the handling of finalization lists.
10413 (Find_Protection_Type): Moved to Exp_Util.
10414 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10415 (Make_DT): Update sequence of dispatch table initialization. Remove the
10416 initialization of field RC_Offset. Add initialization of field Needs_
10418 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10419 Reimplement how an object is first finalized, then deallocated.
10420 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10422 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10423 Register TSS_Finalize_Address with type TSS_Names.
10424 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10425 procedure provides the interface between an allocation / deallocation
10426 and the support machinery in Ada.Finalization.Heap_Management.
10427 (Find_Init_Call): Code reformatting.
10428 (Find_Init_Call_In_List): Code reformatting.
10429 (Find_Protection_Type): Moved from Exp_Ch9.
10430 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10431 (Has_Controlled_Coextensions): Removed.
10432 (Has_Controlled_Objects): New routine.
10433 (In_Library_Level_Package_Body): New routine.
10434 (Insert_Action_After): New routine.
10435 (Is_Finalizable_Transient): New routine. This predicate determines
10436 whether an object declaration is one of the many variants of controlled
10438 (Is_Null_Access_BIP_Func_Call): New routine.
10439 (Is_Non_BIP_Func_Call): New routine.
10440 (Is_Related_To_Func_Return): New routine.
10441 (Needs_Finalization): Moved from Exp_Ch7.
10442 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10443 (Find_Protection_Type): Moved from Exp_Ch9.
10444 (Has_Controlled_Coextensions): Removed.
10445 (Has_Controlled_Objects): New routine.
10446 (In_Library_Level_Package_Body): New routine.
10447 (Insert_Action_After): New routine.
10448 (Is_Finalizable_Transient): New routine.
10449 (Is_Null_Access_BIP_Func_Call): New routine.
10450 (Is_Non_BIP_Func_Call): New routine.
10451 (Is_Related_To_Func_Return): New routine.
10452 (Needs_Finalization): Moved from Exp_ch7.
10453 * expander.adb (Expand): Add a case for N_Free_Statement.
10454 * freeze.adb (Freeze_All): Replace the generation of a finalization
10455 list with a collection for access-to-controlled types.
10456 (Freeze_Entity): Code reformatting.
10457 (Freeze_Record_Type): Remove the freezing of a record controller
10459 (Freeze_Subprogram): Code reformatting.
10460 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10462 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10463 has a library-level finalizer.
10464 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10465 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10466 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10467 files. Add a-fihema to the list of object files.
10469 Alphabetize the associations in type Is_Parameterless_Attribute.
10470 * rtsfind.ads: Ada.Finalization_List.Controller and
10471 System.Finalization_Implementation are no longer a GNAT unit.
10472 Update the range of type Ada_Finalization_Child. Remove the following
10473 recoverable entities:
10475 RE_Attach_To_Final_List
10479 RE_Finalizable_Ptr_Ptr
10480 RE_Global_Final_List
10481 RE_Limited_Record_Controller
10484 RE_Record_Controller
10485 RE_Simple_List_Controller
10487 Add the following recoverable entities:
10489 RE_Add_Offset_To_Address
10493 RE_Exception_Identity
10494 RE_Finalization_Collection
10495 RE_Finalization_Collection_Ptr
10496 RE_Needs_Finalization
10497 RE_Save_Library_Occurrence
10498 RE_Set_Finalize_Address_Ptr
10499 RE_Set_Storage_Pool_Ptr
10501 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10503 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10504 (First_Stored_Discriminant): Remove the mention of Name_uController.
10505 * sem_aux.ads: Comment reformatting.
10506 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10507 to redecorate an already existing class-wide type.
10508 (Decorate_Tagged_Type): New parameter profile and associated comment.
10509 Create a "shadow class-wide type" for a shadow entity.
10510 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10511 of the final chain along with the associated comment.
10512 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10513 Full_Desig and set it to the full view of the designated type.
10514 Initialize the finalization collection to empty.
10515 (Build_Derived_Record_Type): Alphabetize local variables. Code
10517 (Collect_Fixed_Components): Remove the mention of Name_uController.
10518 (Create_Constrained_Components): Remove the mention of Name_uController.
10519 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10520 class-wide type of a shadow entity.
10521 (Process_Full_View): Update the machinery which marks type
10522 Limited_Controlled's entity as limited.
10523 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10524 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10525 list, instead make a collection build-in-place formal.
10526 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10527 a designated type in order to establish a match between the renaming
10528 and the renamed entity.
10529 (Find_Selected_Component): Add guard to prevent spurious exceptions
10530 from being raised on .NET/JVM.
10531 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10532 to the list of primitive that need special processing. Update arrays
10533 C_Names and D_Names.
10534 (Replace_Types): Handle class-wide types.
10535 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10536 different parameter profile, look at the first formal.
10537 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10538 use clauses for Exp_Util.
10539 * sem_res.adb: Remove with and use clauses for Elists.
10540 (Propagate_Coextensions): Removed.
10541 (Resolve_Allocator): Do not propagate the list of coextensions from one
10542 allocator to another.
10543 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10544 Deaccessed_T to Desig_Typ.
10545 (Enter_Name): Remove the mention of Name_uController.
10546 (Gather_Components): Remove the mention of Name_uController.
10547 (Incomplete_Or_Private_View): New routine.
10548 (Is_Coextension_Root): Removed.
10549 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10550 * sem_util.ads (Incomplete_Or_Private_View): New routine.
10551 (Is_Coextension_Root): Removed.
10552 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10553 Controlled types are now derived from a null tagged record. Remove
10554 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10555 * sinfo.adb (Coextensions): Removed.
10556 (Set_Coextensions): Removed.
10557 * sinfo.ads: Remove Coextensions from the explanation of node fields
10558 and its uses in nodes.
10559 Update the field usage of N_Allocator.
10560 (Coextensions): Removed along with its pragma Inline.
10561 (Set_Coextensions): Removed along with its pragma Inline.
10562 * snames.ads-tmpl: Remove names
10567 Name_uLocal_Final_List
10568 Name_Finalization_Root
10575 Name_Finalize_Address
10576 * s-pooglo.adb (Allocate): Add overriding indicator.
10577 (Deallocate): Add overriding indicator.
10578 (Storage_Size): Add overriding indicator.
10579 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10580 than Finalize_Global_List.
10581 (Null_Finalize_Global_List): Removed.
10582 (Save_Library_Occurrence): New routine.
10583 * s-soflin.ads: Remove variable Finalize_Global_List along with its
10584 initialization. Add variable Finalize_Library_Objects along with its
10585 pragma Export. Add variables Library_Exception and
10586 Library_Exception_Set along with their pragma Export.
10587 (Null_Finalize_Global_List): Removed.
10588 (Save_Library_Occurrence): New routine.
10589 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10590 rather than Finalize_Global_List.
10591 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10592 of the constructed node.
10594 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10596 * link.c: Include "auto-host.h" before system headers.
10598 2011-08-03 Vincent Celier <celier@adacore.com>
10600 * make.adb (Gnatmake): Add to table Library_Projs only library projects
10601 that are not extended. Do not check if a library project that is
10602 extended should be regenerated. Do not add to table Library_Paths the
10603 libraries that are in extended projects. Link only with libraries that
10604 are in libray projects that are not extended.
10605 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10606 for a library project that is extended.
10608 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10610 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10611 conforming subprogram renamings that appear to be completions if they
10612 are not fully conformant.
10613 Such renamings are homographs but not completions.
10614 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10615 names in a subprogram renaming that appears in an instance.
10617 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10619 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10620 not immutably limited, build actual subtype from expression to provide
10621 proper bounds to caller.
10623 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10625 * sem_ch8.adb: Minor comment correction.
10627 2011-08-03 Thomas Quinot <quinot@adacore.com>
10629 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10630 returning a limited array, use an extended return statement.
10632 2011-08-03 Vincent Celier <celier@adacore.com>
10634 * make.adb (Initialize): If --subdirs= is used, but no project file is
10635 specified, attempt to create the specify subdir if it does not already
10636 exist and use it as the object directory as if -D had been specified.
10638 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10640 * s-tpopsp-vms.adb: New file.
10641 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10642 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10644 2011-08-03 Emmanuel Briot <briot@adacore.com>
10646 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10649 2011-08-03 Yannick Moy <moy@adacore.com>
10651 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10652 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10653 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10654 detect that an array has static bounds.
10656 2011-08-03 Thomas Quinot <quinot@adacore.com>
10658 * exp_dist.adb: Minor reformatting.
10660 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10662 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10663 (ATCB_Key): Removed, not always used.
10665 2011-08-03 Emmanuel Briot <briot@adacore.com>
10667 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10668 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10669 most remaining global variables.
10671 2011-08-03 Robert Dewar <dewar@adacore.com>
10673 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10674 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10677 2011-08-03 Javier Miranda <miranda@adacore.com>
10679 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10680 that must be passed by copy in VM targets.
10682 2011-08-03 Emmanuel Briot <briot@adacore.com>
10684 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10685 duplicates a similar htable now in the project tree.
10687 2011-08-03 Claire Dross <dross@adacore.com>
10689 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10690 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10691 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10692 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10693 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10694 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10695 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10698 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10700 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10701 (ATCB_Key): Removed, not always used.
10702 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10703 s-taprop-posix.adb.
10704 * s-tpopsp-tls.adb: New file.
10705 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10706 x86/x64/ia64/powerpc/sparc Linux.
10708 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10710 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10711 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10713 2011-08-03 Thomas Quinot <quinot@adacore.com>
10715 * rtsfind.ads, exp_dist.adb, exp_dist.ads
10716 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10717 Fix type selection for mapping integer types to PolyORB types.
10719 2011-08-03 Bob Duff <duff@adacore.com>
10721 * sem_ch7.adb: Minor comment clarification.
10723 2011-08-03 Bob Duff <duff@adacore.com>
10725 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10726 an error analyzing a choice, skip further processing. Further
10727 processing could cause a crash or cascade errors.
10729 2011-08-03 Emmanuel Briot <briot@adacore.com>
10731 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10732 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10733 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10734 prj-env.ads (Shared_Project_Tree_Data): new type
10735 An aggregate project and its aggregated trees need to share the common
10736 data structures used for lists of strings, packages,... This makes the
10737 code simpler since otherwise we have to pass the root tree (also used
10738 for the configuration file data) in addition to the current project
10739 tree. This also avoids ambiguities as to which tree should be used.
10740 And finally this saves a bit of memory.
10741 (For_Every_Project_Imported): new parameter Tree.
10742 Since aggregated projects are using a different tree, we need to let
10743 the caller know which tree to use to manipulate the returned project.
10745 2011-08-03 Robert Dewar <dewar@adacore.com>
10747 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10748 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10749 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10750 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10752 2011-08-03 Javier Miranda <miranda@adacore.com>
10754 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10755 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10757 2011-08-03 Bob Duff <duff@adacore.com>
10759 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10762 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
10764 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10765 g-sehash.ads: Fix typo. Update header.
10767 2011-08-03 Thomas Quinot <quinot@adacore.com>
10769 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10772 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10774 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10775 prefixes of private types along with records, since the selector may be
10777 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10778 private types along with records, since the selector may be a
10781 2011-08-03 Emmanuel Briot <briot@adacore.com>
10783 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10785 2011-08-03 Javier Miranda <miranda@adacore.com>
10787 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10788 Tagged_Type_Expansion.
10790 2011-08-03 Yannick Moy <moy@adacore.com>
10792 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10793 violation when the argument of concatenation is the name of a
10796 2011-08-03 Emmanuel Briot <briot@adacore.com>
10798 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10799 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10800 (Process_Declarative_Items): new parameter Child_Env.
10802 2011-08-03 Yannick Moy <moy@adacore.com>
10804 * alfa.ads: Update format of ALFA section in ALI file in order to
10805 add a mapping from bodies to specs when both are present.
10806 (ALFA_Scope_Record): Add components for spec file/scope.
10807 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10809 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10810 collected, fill in the spec information when relevant.
10811 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10814 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10816 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10817 code unit to decide whether to add internally generated subprograms.
10819 2011-08-03 Javier Miranda <miranda@adacore.com>
10821 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10822 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10823 be handled by copy in VM targets.
10825 2011-08-03 Emmanuel Briot <briot@adacore.com>
10827 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
10828 code with Makeutl.Get_Switches.
10829 * prj-tree.adb: Update comment.
10831 2011-08-03 Thomas Quinot <quinot@adacore.com>
10833 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
10834 subprogram with a limited formal that does not support external
10837 2011-08-03 Yannick Moy <moy@adacore.com>
10839 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
10841 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
10842 not from current unit in two phases, because it is not possible to
10843 change the table while iterating over its content.
10844 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
10846 2011-08-03 Sergey Rybin <rybin@adacore.com>
10848 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
10849 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
10851 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10853 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
10854 and the component type is composite, this is ambiguous for predefined
10855 concatenation, but if the node is not overloaded and the entity is a use
10856 -defined function its profile can be used to resolve that aggregate.
10858 2011-08-03 Robert Dewar <dewar@adacore.com>
10860 * exp_ch4.adb: Minor code cleanup.
10862 2011-08-03 Thomas Quinot <quinot@adacore.com>
10864 * exp_dist.adb: Do not generate distribution stubs if serious errors
10865 have been diagnosed.
10867 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10869 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
10870 the first formal of a primitive operation, go to the base type to
10871 handle properly an access to a derived type with constrained
10873 * sem_type.adb (Disambiguate): an immediately visible operator hides a
10874 user-defined function that is only use-visible.
10876 2011-08-03 Robert Dewar <dewar@adacore.com>
10878 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
10879 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
10880 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
10881 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
10882 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
10883 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
10884 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
10885 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
10887 2011-08-03 Robert Dewar <dewar@adacore.com>
10889 * repinfo.adb (List_Mechanism): Add handling of
10890 Convention_Ada_Pass_By_XXX.
10891 * sem_mech.adb (Set_Mechanism): Ditto.
10892 * sem_prag.adb (Process_Convention): Add entries for
10893 Convention_Ada_Pass_By_XXX.
10894 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
10896 2011-08-03 Pascal Obry <obry@adacore.com>
10898 * makeutl.adb: Minor reformatting.
10900 2011-08-03 Vincent Celier <celier@adacore.com>
10903 (Get_File_Name) If the file cannot be found when there are no config
10904 pragmas file and May_Fail is True, return No_File instead of the file
10905 name, to be consistent.
10907 2011-08-03 Pascal Obry <obry@adacore.com>
10909 * adaint.c (__gnat_is_executable_file_attr): Avoid access
10912 2011-08-03 Javier Miranda <miranda@adacore.com>
10915 (Same_Representation): In VM targets the representation of arrays with
10916 aliased components differs from arrays with non-aliased components.
10918 2011-08-03 Emmanuel Briot <briot@adacore.com>
10920 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
10921 not systematically lower case attribute indexes that contain no "."
10922 Fix definition of several Naming attributes, which take
10923 a unit name as index and therefore should be case insensitive.
10924 Minor refactoring (reduce length of variable names).
10926 2011-08-03 Emmanuel Briot <briot@adacore.com>
10928 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
10930 2011-08-03 Emmanuel Briot <briot@adacore.com>
10932 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
10933 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
10934 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
10935 prj-tree.ads (Prj.Tree.Environment): new type.
10937 2011-08-03 Emmanuel Briot <briot@adacore.com>
10939 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
10940 prj-tree.adb, prj-tree.ads (Environment): new type.
10942 2011-08-03 Emmanuel Briot <briot@adacore.com>
10944 * prj-tree.ads: Remove unused variable.
10946 2011-08-03 Yannick Moy <moy@adacore.com>
10948 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
10949 issuing messages related to SPARK restriction violation.
10951 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10953 * sem_ch6.adb: guard against error nodes in return statements.
10955 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10957 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10958 a warning can only appear on a configuration file, so emit warning
10959 without further checks.
10961 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10963 * s-interr.ads: add overriding keyword.
10965 2011-08-03 Geert Bosch <bosch@adacore.com>
10967 * exp_attr.adb: Fix minor typo.
10969 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10971 * par-ch4.adb: improve error recovery.
10973 2011-08-03 Emmanuel Briot <briot@adacore.com>
10975 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10976 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10977 to Errout_Handling.
10979 2011-08-03 Emmanuel Briot <briot@adacore.com>
10981 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10982 "external" as an attribute name in aggregate projects.
10984 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10986 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10987 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10988 from 0, so we need to adjust.
10990 2011-08-03 Emmanuel Briot <briot@adacore.com>
10992 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10993 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10995 2011-08-03 Yannick Moy <moy@adacore.com>
10997 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10998 restriction on overloaded entity if the entity is not an operator.
11000 2011-08-03 Yannick Moy <moy@adacore.com>
11002 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
11003 restrict.ads: Rename remaining Check_Formal_Restriction* into
11004 Check_SPARK_Restriction*.
11006 2011-08-03 Emmanuel Briot <briot@adacore.com>
11008 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
11009 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
11011 (Project_Empty): removed
11012 (Empty_Project): new parameter Qualifier
11013 This is used to have fields specific to aggregate projects, cleaner
11014 New field to store the list of aggregated projects.
11015 (Check_Aggregate_Project): removed
11016 (Process_Aggregated_Projects, Free): new subprograms.
11018 2011-08-03 Olivier Hainque <hainque@adacore.com>
11020 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
11022 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11024 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
11025 explicit dereference of an unconstrained type, create a constrained
11026 subtype for it, as is done for function calls that return an
11027 unconstrained type.
11029 2011-08-03 Thomas Quinot <quinot@adacore.com>
11031 * g-pehage.adb (Finalize): Avoid possible double-free.
11033 2011-08-03 Steve Baird <baird@adacore.com>
11035 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
11036 Elab_Spec/Body attrs in CodePeer_Mode.
11038 2011-08-03 Javier Miranda <miranda@adacore.com>
11040 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
11041 low bound is not known at compile time but they have no others choice.
11042 Done because in this case the bounds can be obtained directly from the
11045 2011-08-03 Ed Falis <falis@adacore.com>
11047 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
11048 on VxWorks SMP. Remove unusable constant ANY_CPU.
11050 2011-08-03 Emmanuel Briot <briot@adacore.com>
11052 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
11053 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
11054 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
11055 Prj.Env.Initialize_Empty): new subprograms
11056 (Get_Env, Find_Project): remove parameter Target_Name.
11058 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11060 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
11061 as a condition for the delayed call to Derived_Subprograms done for the
11062 case of the rewriting of a derived type that constrains the
11063 discriminants of its parent type.
11064 Avoids redundant subprogram derivations for private subtype derivations.
11066 2011-08-03 Javier Miranda <miranda@adacore.com>
11068 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
11069 Build_Record_Aggr_Code.
11070 (Build_Record_Aggr_Code): Add missing support to initialize hidden
11071 discriminants in extension aggregates.
11073 2011-08-03 Emmanuel Briot <briot@adacore.com>
11075 * prj-pp.adb (Print): also output project qualifiers, since in
11076 particular "aggregate" is mandatory in an aggregate project.
11078 2011-08-03 Emmanuel Briot <briot@adacore.com>
11080 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
11081 (Debug_Output): new function.
11083 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11085 * gnat_ugn.texi: Document -Wstack-usage.
11086 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
11088 2011-08-03 Thomas Quinot <quinot@adacore.com>
11090 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
11091 have keyword LIMITED.
11093 2011-08-03 Yannick Moy <moy@adacore.com>
11095 * alfa.adb, alfa.ads, alfa_test.adb: New files.
11096 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
11097 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
11098 section (does not happen in compiler, only if code directly calls
11100 * get_alfa.adb, get_alfa.ads: New files.
11101 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
11103 * lib-xref-alfa.adb: New file.
11104 * lib-xref.adb, lib-xref.ads
11105 (Xref_Entry): redefine information needed in cross-references for ALFA.
11106 Push ALFA treatments in separated local package.
11107 (Enclosing_Subpragram_Or_Package): treat specially subprogram
11108 identifiers. Return entity of package body instead of spec. Return
11109 Empty for a scope with no location.
11110 (Generate_Reference): adapt to new components for ALFA information.
11111 Remove the need for D references on definitions.
11112 (Is_Local_Reference): moved to ALFA local package
11113 (Output_References): extract subfunction as Extract_Source_Name
11114 (Output_Local_References): remove procedure, replaced by filtering of
11115 cross-references in package ALFA and printing in Put_ALFA.
11116 (Write_Entity_Name): remove procedure
11117 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
11118 print exact name of entity as it appears in source file
11119 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
11120 * put_alfa.adb, put_alfa.ads: New files.
11121 * xref_lib.adb (Search_Xref): protect read of cross-references against
11122 reading other sections of the ALI file, in gnatxref
11123 (Search): protect read of cross-references against reading other
11124 sections of the ALI file, in gnatfind.
11125 * gcc-interface/Make-lang.in: Update dependencies.
11127 2011-08-03 Thomas Quinot <quinot@adacore.com>
11129 * sem_ch3.adb: Minor reformatting.
11131 2011-08-03 Jose Ruiz <ruiz@adacore.com>
11133 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
11134 raising an exception.
11136 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11138 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
11139 type, always use 1 as the lower bound or string, even if lower bound of
11140 context is not static, to handle properly null strings in a non-static
11143 2011-08-03 Bob Duff <duff@adacore.com>
11145 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
11146 always legal on the right-hand side of an assignment statement; there
11147 is always an applicable index constraint in this case. Therefore, the
11148 check for Pkind = N_Assignment_Statement is now unconditional -- it
11149 doesn't depend on whether Is_Constrained (Typ).
11151 2011-08-03 Robert Dewar <dewar@adacore.com>
11153 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
11155 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11157 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
11158 for an itype created within a generic unit.
11160 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11162 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
11163 suppresses all inlining.
11165 2011-08-03 Robert Dewar <dewar@adacore.com>
11167 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
11168 exp_aggr.adb: Minor reformatting.
11170 2011-08-03 Thomas Quinot <quinot@adacore.com>
11172 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
11173 tagged assignment when discriminant checks are suppressed. This is
11174 useless and extremely costly in terms of static stack usage.
11176 2011-08-03 Bob Duff <duff@adacore.com>
11178 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
11179 of generics, because this leads to the wrong entity in the wrong scope,
11180 causing (e.g.) pragma Export_Procedure to get an error if the entity is
11182 (Process_Interface_Name): Follow Alias for instances of generics, to
11183 correct for the above change.
11185 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11187 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
11188 is an integer literal it is always safe to replace the reference. In
11189 addition, if the reference appears in the generated code for an object
11190 declaration it is necessary to copy because otherwise the reference
11191 might be to the uninitilized value of the discriminant of the object
11194 2011-08-03 Pascal Obry <obry@adacore.com>
11196 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
11197 ACL used, in this case we want to check for ending .exe, not .exe
11198 anywhere in the path.
11200 2011-08-03 Sergey Rybin <rybin@adacore.com>
11202 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
11203 the tree structure (semantic decoration of references to record
11206 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11208 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
11209 choices of a named array aggregate, bail out when any choices are
11210 marked as Errors_Posted.
11212 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11214 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
11215 in which entity is frozen, to handle properly loop variables in
11218 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11220 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11221 subtype is not static, compute the upper bound using attributes, to
11222 handle properly index types that are not integer types.
11224 2011-08-03 Bob Duff <duff@adacore.com>
11226 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11227 Update copyright notice.
11229 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11231 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11232 Original_Discriminant if within an instance.
11233 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11235 2011-08-03 Thomas Quinot <quinot@adacore.com>
11237 * einfo.ads: Minor reformatting.
11239 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11241 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11242 composite type with an unfrozen subcomponent, in the profile of a
11243 primitive operation.
11245 2011-08-03 Robert Dewar <dewar@adacore.com>
11247 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11249 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11251 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11252 unconstrained type with discriminants is initialized with an aggregate,
11253 use the constrained subtype of the aggregate as the type of the object,
11254 because it is immutable, and this allows the back-end to generate no
11255 code for the object declaration.
11257 2011-08-03 Robert Dewar <dewar@adacore.com>
11259 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11260 comparison operand is variable, and turns out to be zero or negative.
11262 2011-08-03 Javier Miranda <miranda@adacore.com>
11265 (Expand_Dispatching_Constructor_Call): Disable expansion of
11266 code required for native targets. Done to avoid generating
11267 references to unavailable runtime entities in VM targets.
11269 (Expand_N_Object_Declaration): Add missing support to handle
11270 the explicit initialization of class-wide interface objects.
11273 2011-08-03 Matthew Heaney <heaney@adacore.com>
11275 * a-cobove.adb (Merge): Move source onto target, instead of using
11278 2011-08-03 Matthew Heaney <heaney@adacore.com>
11280 * a-cbdlli.adb (Splice): Move source items from first to last.
11282 2011-08-03 Yannick Moy <moy@adacore.com>
11284 * sem_util.ads: Add comment.
11286 2011-08-03 Javier Miranda <miranda@adacore.com>
11289 (Expand_Record_Aggregate): In VM targets disable the expansion into
11290 assignments of aggregates whose type is not known at compile time.
11292 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11294 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11295 protected entries and task entries, to build the proper renaming
11296 declaration for entry formals, used in debugging.
11297 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11298 parameters in the same way.
11300 2011-08-02 Robert Dewar <dewar@adacore.com>
11302 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11303 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11304 code reorganization.
11306 2011-08-02 Robert Dewar <dewar@adacore.com>
11308 * debug.adb: Debug flag d.P to suppress length comparison optimization
11309 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11310 comparison of Length by comparing First/Last instead.
11312 2011-08-02 Matthew Heaney <heaney@adacore.com>
11314 * a-cobove.ads: Code clean up.
11316 2011-08-02 Vincent Celier <celier@adacore.com>
11318 * adaint.c (file_names_case_sensitive_cache): New static int.
11319 (__gnat_get_file_names_case_sensitive): Cache the return value in
11320 file_names_case_sensitive_cache at the first invocation, to avoid
11321 multiple calls to getenv.
11323 2011-08-02 Bob Duff <duff@adacore.com>
11325 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11327 2011-08-02 Yannick Moy <moy@adacore.com>
11329 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11330 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11331 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11332 indicate that we are in a precondition or postcondition. This is used in
11333 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11334 decide whether to flag the spec or body of the current subprogram as
11337 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
11339 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11341 * a-extiin.ads: New file.
11343 2011-08-02 Bob Duff <duff@adacore.com>
11345 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11346 now raises Name_Error instead of Use_Error in certain cases. The other
11347 parts of this AI were already implemented properly.
11349 2011-08-02 Vincent Celier <celier@adacore.com>
11351 * link.c: Only import "auto-host.h" when building the gnattools.
11353 2011-08-02 Yannick Moy <moy@adacore.com>
11355 * sem_util.adb: Inter-unit inlining does not work for a subprogram
11356 which calls a local subprogram, so extract subprogram
11357 from Mark_Non_ALFA_Subprogram_Body.
11359 2011-08-02 Javier Miranda <miranda@adacore.com>
11362 (Extract_Dispatching_Call): If the type of the dispatching object is an
11363 access type then return an explicit dereference in the Object out-mode
11366 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11368 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11369 compatibility checks for all indexes of an array subtype, not just the
11370 first. Reset Has_Dynamic_Range_Check on the subtype before each
11371 potential check to ensure that Insert_Range_Checks will not elide any
11372 of the dynamic checks.
11374 2011-08-02 Yannick Moy <moy@adacore.com>
11376 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11377 SPARK restriction at parsing time.
11378 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11379 directive only if the SPARK restriction is set for this unit.
11381 2011-08-02 Yannick Moy <moy@adacore.com>
11383 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11384 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11385 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11386 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11387 Mark_Non_ALFA_Subprogram_Body.
11388 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11391 2011-08-02 Yannick Moy <moy@adacore.com>
11393 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11396 2011-08-02 Robert Dewar <dewar@adacore.com>
11398 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11399 exp_ch3.adb: Minor reformatting.
11401 2011-08-02 Emmanuel Briot <briot@adacore.com>
11403 * adaint.c (__gnat_locate_exec_on_path): only returns executable
11404 files, not any regular file.
11405 (__gnat_locate_file_with_predicate): new subprogram.
11407 2011-08-02 Yannick Moy <moy@adacore.com>
11409 * sinfo.adb, sinfo.ads: Restrict the use of flags
11410 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11411 nodes, plus N_Subtype_Declaration for the 2nd one.
11413 2011-08-02 Sergey Rybin <rybin@adacore.com>
11415 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11416 - fix bugs in the description of Source_Trace;
11417 - get rid of UNIT_NAME;
11419 2011-08-02 Javier Miranda <miranda@adacore.com>
11422 (Build_Dispatching_Requeue): Adding support for VM targets
11423 since we cannot directly reference the Tag entity.
11424 * exp_sel.adb (Build_K): Adding support for VM targets.
11425 (Build_S_Assignment): Adding support for VM targets.
11427 (Default_Prim_Op_Position): In VM targets do not restrict availability
11428 of predefined interface primitives to compiling in Ada 2005 mode.
11429 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11430 restricted to compiling in Ada 2005 mode.
11431 (Make_VM_TSD): Generate code that declares and initializes the OSD
11432 record. Needed to support dispatching calls through synchronized
11435 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11436 primitives associated with synchronized interfaces.
11437 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11438 primitives associated with synchronized interfaces.
11440 2011-08-02 Yannick Moy <moy@adacore.com>
11442 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11443 statements hidden in SPARK if preceded by the HIDE directive
11444 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11445 exception handlers as hidden in SPARK if preceded by the HIDE directive
11446 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11447 if starting with the HIDE directive
11448 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11449 starting with the HIDE directive; mark the declarations in a private
11450 part as hidden in SPARK if the private part starts with the HIDE
11452 * restrict.adb, restrict.ads
11453 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11454 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11455 argument node belongs to a part which is hidden in SPARK
11456 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11457 parts in SPARK; protect the possibly costly call to
11458 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11459 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11460 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11461 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11463 (Scan): recognize special comment starting with '#' and followed by
11464 SPARK keyword "hide" as a HIDE directive.
11466 2011-08-02 Yannick Moy <moy@adacore.com>
11468 * types.ads, erroutc.ads: Minor reformatting.
11470 2011-08-02 Vincent Celier <celier@adacore.com>
11472 * link.c: Add response file support for cross platforms.
11474 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11476 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11477 in an association, set parent field of copy before partial analysis.
11478 * sem_res.adb (Resolve_Slice): create reference to itype only when
11479 expansion is enabled.
11481 2011-08-02 Yannick Moy <moy@adacore.com>
11483 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11484 for new flag denoting which subprogram bodies are in ALFA
11485 * restrict.adb, sem_ch7.adb: Update comment
11486 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11487 sem_ch9.adb, sem_res.adb: Add calls to
11488 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11489 * sem_ch6.adb (Analyze_Function_Return): add calls to
11490 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11491 middle of the body, and extended return.
11492 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11493 False when missing return.
11494 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11495 to True for subprograms whose spec is in ALFA. Remove later on the flag
11496 on the entity used for a subprogram body when there exists a separate
11498 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11499 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11500 False, otherwise do nothing.
11502 2011-08-02 Robert Dewar <dewar@adacore.com>
11504 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11506 2011-08-02 Yannick Moy <moy@adacore.com>
11508 * sem_ch4.ads: minor formatting.
11510 2011-08-02 Yannick Moy <moy@adacore.com>
11512 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11513 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11514 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11515 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11516 opt.ads: cleanup of SPARK mode
11518 2011-08-02 Yannick Moy <moy@adacore.com>
11520 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11522 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11523 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11525 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11526 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11527 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11528 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11530 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11532 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11533 functions whose return type is not in ALFA.
11534 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11536 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11537 parameter's type is not in ALFA.
11538 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11541 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11543 * sem_ch6 (Analyze_Expression_Function): treat the function as
11544 Inline_Always, and introduce a subprogram declaration for it when it is
11546 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11547 expression functions, so that the back-end can determine whether they
11548 can in fact be inlined.
11549 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11550 a function body comes from an expression function.
11552 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11554 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11555 null exclusions to test Can_Never_Be_Null on the anonymous access types
11556 of the formals rather than testing the formals themselves. Exclude this
11557 check in cases where the Old_Formal is marked as a controlling formal,
11558 to avoid issuing spurious errors for bodies completing dispatching
11559 operations (due to the flag not getting set on controlling access
11560 formals in body specs).
11561 (Find_Corresponding_Spec): When checking full and subtype conformance of
11562 subprogram bodies in instances, pass Designated and E in that order, for
11563 consistency with the expected order of the formals (New_Id followed by
11566 2011-08-02 Robert Dewar <dewar@adacore.com>
11568 * sem_ch8.adb: Minor reformatting.
11570 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11572 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11573 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11574 primitive operations of class-wide actuals.
11576 2011-08-02 Javier Miranda <miranda@adacore.com>
11578 * exp_atag.ads, exp_atag.adb
11579 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11580 since its value is implicitly passed in argument Typ.
11581 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11582 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11583 Build_Common_Dispatching_Select_Statements.
11585 2011-08-02 Robert Dewar <dewar@adacore.com>
11587 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11588 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11589 Minor reformatting.
11591 2011-08-02 Robert Dewar <dewar@adacore.com>
11593 * sem_res.adb: Minor reformatting.
11594 * sem_prag.adb: Minor reformatting.
11596 2011-08-02 Javier Miranda <miranda@adacore.com>
11598 * exp_atag.adb, exp_atags.ads
11599 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11600 by the tagged type Entity. Required to use this routine in the VM
11601 targets since we do not have available the Tag entity in the VM
11604 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11605 Ada.Tags has not been previously loaded.
11607 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11608 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11610 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11611 view of enclosing scopes. Required to handle enclosing scopes that
11612 are synchronized types whose full view is a task type.
11614 (Build_VM_TSDs): Minor code improvement to avoid generating and
11615 analyzing lists with empty nodes.
11616 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11617 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11618 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11619 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11620 (Make_Select_Specific_Data_Table): Add support for VM targets.
11621 (Make_VM_TSD): Generate code to initialize the SSD structure of
11624 2011-08-02 Yannick Moy <moy@adacore.com>
11626 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11627 cross-references section in ALI.
11628 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11629 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11631 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11632 subprogram or package entity of a node
11633 (Is_Local_Reference_Type): new function returns True for references
11634 selected in local cross-references.
11635 (Lt): function extracted from Lt in Output_References
11636 (Write_Entity_Name): function extracted from Output_References
11637 (Generate_Definition): generate reference with type 'D' for definition
11638 of objects (object declaration and parameter specification), with
11639 appropriate locations and units, for use in local cross-references.
11640 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11641 references of type 'I' for initialization in object definition.
11642 (Output_References): move part of function Lt and procedure
11643 Write_Entity_Name outside of the body. Ignore references of types 'D'
11644 and 'I' introduced for local cross-references.
11645 (Output_Local_References): new procedure to output the local
11646 cross-references sections.
11647 (Lref_Entity_Status): new array defining whether an entity is a local
11648 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11649 with 'I' type when initialization expression is present.
11650 * get_scos.adb, get_scos.ads: Correct comments and typos
11652 2011-08-02 Javier Miranda <miranda@adacore.com>
11654 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11656 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11658 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11661 2011-08-02 Vincent Celier <celier@adacore.com>
11663 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11664 (No_Space_Img): New function
11665 (Find_Excluded_Sources): When reading from a file, record the file name
11666 and the line number for each excluded source.
11667 (Mark_Excluded_Sources): When reporting an error, if the excluded
11668 sources were read from a file, include file name and line number in
11671 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11673 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11675 2011-08-02 Robert Dewar <dewar@adacore.com>
11677 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11679 2011-08-02 Javier Miranda <miranda@adacore.com>
11681 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11682 generation of TSDs to the DOTNET compiler.
11683 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11684 generation of TSDs to the DOTNET compiler.
11686 2011-08-02 Javier Miranda <miranda@adacore.com>
11688 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11689 record of all the tagged types declared inside library level package
11690 declarations, library level package bodies or library level subprograms.
11691 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11692 associated with a given tagged type.
11693 (Build_VM_TSDs): New subprogram.
11694 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11695 compilation units that are subprograms.
11696 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11697 compilation units that are package bodies.
11698 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11699 units that are a package declaration or a package instantiation.
11700 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11701 reorganization to improve the error generated by the frontend when the
11702 function Ada.Tags.Secondary_Tag is not available.
11703 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11704 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11706 2011-08-02 Javier Miranda <miranda@adacore.com>
11708 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11710 2011-08-02 Robert Dewar <dewar@adacore.com>
11712 * s-imenne.ads: Minor reformatting.
11714 2011-08-02 Robert Dewar <dewar@adacore.com>
11716 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11717 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11718 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11720 2011-08-02 Robert Dewar <dewar@adacore.com>
11722 * einfo.ads (Materialize_Entity): Document this is only for renamings
11723 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11724 required debug information in the case where we transform the object
11725 declaration into a renaming declaration.
11726 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11728 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11729 Materialize_Entity.
11731 2011-08-02 Robert Dewar <dewar@adacore.com>
11733 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11734 Suppress_Init_Procs.
11735 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11736 Suppress_Initialization/Initialization_Suppressed.
11737 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11738 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11739 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11740 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11742 2011-08-02 Robert Dewar <dewar@adacore.com>
11744 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11745 Minor reformatting.
11747 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11749 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11750 only have inheritable classwide pre/postconditions.
11752 2011-08-02 Javier Miranda <miranda@adacore.com>
11754 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11755 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11756 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11757 checks if the external tag of a type is the same as the external tag
11758 of some other declaration.
11760 2011-08-02 Thomas Quinot <quinot@adacore.com>
11762 * s-taskin.ads: Minor reformatting.
11764 2011-08-02 Emmanuel Briot <briot@adacore.com>
11766 * g-comlin.adb (Display_Help): swap the order in which it prints the
11767 short help and the general usage.
11769 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11771 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11772 the aspect declarations and attach them to the generic copy for
11773 subsequent analysis.
11774 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11775 declarations of the generic tree to the new subprogram declarations.
11776 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11777 conditions that apply to a subprogram instance.
11779 2011-08-02 Robert Dewar <dewar@adacore.com>
11781 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11783 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11785 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11786 private type with a tagged full view is not derived in the immediate
11787 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11789 2011-08-02 Robert Dewar <dewar@adacore.com>
11791 * exp_ch4.adb: Minor reformatting.
11793 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11795 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11796 Ada2012 iterator, the loop will be rewritten during expansion into a
11797 while loop with a cursor and an element declaration. Do not analyze the
11798 body in this case, because if the container is for indefinite types the
11799 actual subtype of the elements will only be determined when the cursor
11800 declaration is analyzed.
11802 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11804 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11805 size/alignment related attributes in CodePeer_Mode.
11807 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11809 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11810 Prepend_Element, since this can result in the operation getting the
11811 wrong slot in the full type's dispatch table if the full type has
11812 inherited operations. The incomplete type's operation will get added
11813 to the proper position in the full type's primitives
11814 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11815 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11816 dispatching operations, since there are cases where nonprimitive
11817 subprograms can get added to the list of incomplete dependents (such
11818 as subprograms in nested packages).
11819 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11820 private part when determining whether to add a primitive with a
11821 parameter of a tagged incomplete type to the Private_Dependents list.
11822 Such primitives can also occur in the visible part, and should not have
11823 been excluded from being private dependents.
11824 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11825 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11826 list of a Taft-amendment incomplete type is a primitive before issuing
11827 an error that the full type must appear in the same unit. There are
11828 cases where nonprimitives can be in the list (such as subprograms in
11830 * sem_disp.adb (Derives_From): Use correct condition for checking that
11831 a formal's type is derived from the type of the corresponding formal in
11832 the parent subprogram (the condition was completely wrong). Add
11833 checking that was missing for controlling result types being derived
11834 from the result type of the parent operation.
11836 2011-08-02 Yannick Moy <moy@adacore.com>
11838 * errout.adb (First_Node): minor renaming
11839 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11842 2011-08-02 Yannick Moy <moy@adacore.com>
11844 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11845 before accessing operands.
11846 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11847 decide whether an initialization expression respects SPARK rules, as
11848 the plain node is the expanded one. This allows for more valid warnings
11850 * gnat_rm.texi: Minor update.
11852 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11854 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11857 2011-08-02 Robert Dewar <dewar@adacore.com>
11859 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11861 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11863 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11864 loop statements and the element renaming declaration with a block when
11865 the element type is controlled.
11867 2011-08-02 Yannick Moy <moy@adacore.com>
11869 * sinfo.ads: Minor formatting.
11871 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11873 * sem_aggr.adb (Add_Association): if the association has a box and no
11874 expression, use the Sloc of the aggregate itself for the new
11876 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11879 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11881 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11882 When a container is provided via a function call, generate a renaming
11883 of the function result. This avoids the creation of a transient scope
11884 and the premature finalization of the container.
11885 * exp_ch7.adb (Is_Container_Cursor): Removed.
11886 (Wrap_Transient_Declaration): Remove the supression of the finalization
11887 of the list controller when the declaration denotes a container cursor,
11890 2011-08-02 Yannick Moy <moy@adacore.com>
11892 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11893 node is from source, instead of the original node being from source.
11895 (Resolve_Array_Aggregate): refine the check for a static expression, to
11896 recognize also static ranges
11897 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11898 Array_Type_Declaration): postpone the test for the type being a subtype
11899 mark after the type has been resolved, so that component-selection and
11900 expanded-name are discriminated.
11901 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11902 to distinguish the case of an iteration scheme, so that an error is
11903 issed on a non-static range in SPARK except in an iteration scheme.
11904 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11905 In_Iter_Schm = True.
11906 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11907 user-defined operators so that they are allowed in renaming
11909 (Find_Selected_Component): refine the check for prefixing of operators
11910 so that they are allowed in renaming. Move the checks for restrictions
11911 on selector name after analysis discriminated between
11912 component-selection and expanded-name.
11913 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11914 concatenation argument of string type if it is static.
11915 * sem_util.adb, sem_util.ads
11916 (Check_Later_Vs_Basic_Declarations): add a new function
11917 Is_Later_Declarative_Item to decice which declarations are allowed as
11918 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11919 mode, add that renamings are considered as later items.
11920 (Enclosing_Package): new function to return the enclosing package
11921 (Enter_Name): correct the rule for homonyms in SPARK
11922 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11923 from source (result of expansion) to avoid issuing wrong warnings.
11925 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11927 * errout.adb: On anything but an expression First_Node returns its
11930 2011-08-02 Pascal Obry <obry@adacore.com>
11932 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11934 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11936 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11937 Set the associated loop as the related expression of internally
11939 * exp_ch7.adb (Is_Container_Cursor): New routine.
11940 (Wrap_Transient_Declaration): Supress the finalization of the list
11941 controller when the declaration denotes a container cursor.
11943 2011-08-02 Yannick Moy <moy@adacore.com>
11945 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11947 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11948 expression is a simple expression. This check cannot be performed in
11949 the semantics, so just drop it.
11950 (P_Index_Or_Discriminant_Constraint): move check that the index or
11951 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11952 semantics. Other cases were previously checked in the semantics.
11953 * par-ch4.adb (P_Name): move checks that a selector name is not
11954 character literal or an operator symbol to Find_Selected_Component in
11956 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11957 declarations are not placed after later declarations in a separate
11958 procedure in Sem_Util (possibly not the best choice?), to be used both
11959 during parsing, for Ada 83 mode, and during semantic analysis, for
11961 * par-endh.adb (Check_End): move check that end label is not missing
11962 to Process_End_Label in the semantics
11963 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11964 the special case for SPARK restriction
11965 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11966 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11967 parameter Force to issue the error message even on internal node (used
11968 for generated end label). Call Check_Restriction to check when an error
11969 must be issued. In SPARK mode, issue an error message even if the
11970 restriction is not set.
11971 (Check_Restriction): new procedure with an additional out parameter to
11972 inform the caller that a message has been issued
11973 * sem_aggr.adb: Minor modification of message
11974 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11975 instead of issuing an error message directly
11976 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11977 declarations are not placed after later declarations, by calling
11978 Check_Later_Vs_Basic_Declarations
11979 (Analyze_Subtype_Declaration): move here the check that an index or
11980 discriminant constraint must be a subtype mark. Change the check that
11981 a subtype of String must start at one so that it works on subtype marks.
11982 * sem_ch4.adb (Analyze_Call): move here the check that a named
11983 association cannot follow a positional one in a call
11984 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11985 instead of issuing an error message directly
11986 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11987 selector name is not a character literal or an operator symbol. Move
11988 here the check that the prefix of an expanded name cannot be a
11989 subprogram or a loop statement.
11990 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11991 procedure called from parsing and semantics to check that basic
11992 declarations are not placed after later declarations
11993 (Process_End_Label): move here the check that end label is not missing
11995 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11997 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11998 representation clause in codepeer mode, since it confuses CodePeer and
11999 does not bring useful info.
12001 2011-08-02 Ed Falis <falis@adacore.com>
12003 * init.c: initialize fp hw on MILS.
12005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12007 * errout.adb (First_Node): for bodies, return the node itself (small
12008 optimization). For other nodes, do not check source_unit if the node
12009 comes from Standard.
12011 2011-08-02 Robert Dewar <dewar@adacore.com>
12013 * exp_ch3.adb: Minor comment additions.
12014 * sem_ch13.adb: Minor reformatting.
12016 2011-08-02 Pascal Obry <obry@adacore.com>
12018 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12020 2011-08-02 Robert Dewar <dewar@adacore.com>
12022 * sem_attr.adb: Minor reformatting.
12024 2011-08-02 Robert Dewar <dewar@adacore.com>
12026 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12027 (Has_Default_Component_Value): Removed
12028 * einfo.ads Comment updates
12029 (Has_Default_Aspect): Replaces Has_Default_Value
12030 (Has_Default_Component_Value): Removed
12032 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12034 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12035 (Get_Simple_Init_Val): Handle Default_Value aspect
12036 (Needs_Simple_Initialization): Handle Default_Value aspect
12037 * exp_ch3.ads: Needs_Simple_Initialization
12038 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12039 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12041 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12042 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12043 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12045 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12047 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12048 package containing iteration primitives.
12049 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12051 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12053 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12054 "of", pre-analyze expression in case it is a function call with
12055 finalization actions that must be placed ahead of the loop.
12056 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12057 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12059 2011-08-02 Geert Bosch <bosch@adacore.com>
12061 * cstand.adb (Create_Float_Types): Only consider C's long double for
12062 Long_Long_Float, in addition to double.
12064 2011-08-02 Robert Dewar <dewar@adacore.com>
12066 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12067 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12068 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12069 Minor reformatting.
12071 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12073 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12076 2011-08-02 Javier Miranda <miranda@adacore.com>
12078 * einfo.ads, einfo.adb
12079 (Original_Access_Type): Move this attribute to Node26 since there was
12080 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12081 which causes conflicts and breaks the generation of the .NET compiler.
12082 (Interface_Name): Add missing documentation on JGNAT only uses of
12085 2011-08-02 Geert Bosch <bosch@adacore.com>
12087 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12088 (Find_Back_End_Float_Type): Likewise
12089 (Create_Back_End_Float_Types): Likewise
12090 (Create_Float_Types): Likewise
12091 (Register_Float_Type): Likewise
12092 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12093 Nlist and split out type selection in new local Find_Base_Type function.
12094 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12096 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12098 2011-08-02 Robert Dewar <dewar@adacore.com>
12100 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12102 * opt.ads: Minor comment change.
12103 * sem_ch12.adb: Minor code reorganization.
12105 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12107 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12108 subtype's list of rep items to the list on the full subtype in the case
12109 where the lists are the same.
12111 2011-08-02 Geert Bosch <bosch@adacore.com>
12113 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12114 using the one from System.Strings, which also deallocates all strings.
12116 2011-08-02 Geert Bosch <bosch@adacore.com>
12118 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12120 * gcc-interface/Make-lang.in: Update dependencies.
12122 2011-08-02 Olivier Hainque <hainque@adacore.com>
12124 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12127 2011-08-02 Javier Miranda <miranda@adacore.com>
12129 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12130 associated with anonymous access to subprograms.
12132 2011-08-02 Geert Bosch <bosch@adacore.com>
12135 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12136 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12137 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12138 (Add_Symbol_Definition): Move to switch-c.adb
12139 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12140 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12141 (Add_Symbol_Definition): Move to switch-c.adb.
12142 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12144 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12145 Move to warnsw.adb.
12146 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12147 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12148 Move to warnsw.adb.
12149 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12150 (Add_Symbol_Definition): Moved from Prepcomp.
12151 * switch-c.ads: Update copyright notice. Use String_List instead of
12152 Argument_List, removing dependency on System.OS_Lib.
12154 2011-08-02 Yannick Moy <moy@adacore.com>
12156 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12157 mode on initialization expression which does not respect SPARK
12159 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12160 if the tree referenced by its argument represents an initialization
12161 expression in SPARK, suitable for initializing an object in an object
12164 2011-08-02 Javier Miranda <miranda@adacore.com>
12166 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12167 internally generated access to subprogram with its associated protected
12169 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12171 2011-08-02 Geert Bosch <bosch@adacore.com>
12173 * cstand.adb (Register_Float_Type): Print information about type to
12174 register, if the Debug_Flag_Dot_B is set.
12175 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12176 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12177 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12178 with a requested precision of more than Max_Digits digits and no more
12179 than Max_Base_Digits digits, if a range specification is present and the
12180 Predefined_Float_Types list has a suitable type to derive from.
12181 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12182 case of type completion with pragma Import
12184 (Process_Import_Predefined_Type): Processing to complete a type
12185 with pragma Import. Currently supports floating point types only.
12186 (Set_Convention_From_Pragma): Do nothing without underlying type.
12187 (Process_Convention): Guard against absence of underlying type,
12188 which may happen when importing incomplete types.
12189 (Process_Import_Or_Interface): Handle case of importing predefined
12190 types. Tweak error message.
12192 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12194 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12195 functions to previous change. Reorganize code slightly.
12197 2011-08-02 Geert Bosch <bosch@adacore.com>
12199 * back_end.ads (Register_Type_Proc): New call back procedure type for
12200 allowing the back end to provide information about available types.
12201 (Register_Back_End_Types): New procedure to register back end types.
12202 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12204 * cstand.adb (Back_End_Float_Types): New list for floating point types
12205 supported by the back end.
12206 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12207 (Copy_Float_Type): New procedure to make new copies of predefined types.
12208 (Register_Float_Type): New call back procedure to populate the BEFT list
12209 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12210 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12211 (Create_Float_Types): New procedure to create entities for floating
12212 point types predefined in Standard, and put these and any remaining
12213 BEFTs on the Predefined_Float_Types list.
12214 * stand.ads (Predefined_Float_Types): New list for predefined floating
12215 point types that do not have declarations in package Standard.
12217 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12219 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12220 entity node for the unit containing the parameter.
12221 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12222 (Add_Inlined_Subprogram): Likewise.
12223 * gcc-interface/Make-lang.in: Update dependencies.
12225 2011-08-02 Thomas Quinot <quinot@adacore.com>
12227 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12230 2011-08-02 Geert Bosch <bosch@adacore.com>
12232 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12234 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12236 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12237 computed value of Base_Type.
12239 2011-08-02 Yannick Moy <moy@adacore.com>
12241 * restrict.adb (Check_Restriction): issue an error for any use of
12242 class-wide, even if the No_Dispatch restriction is not set.
12243 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12244 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12245 when completing a private extension, the type named in the private part
12246 is not the same as that named in the visible part.
12247 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12248 of an inherited primitive operations of a tagged type or type extension
12249 that returns the tagged type.
12250 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12251 function which returns True for an implicit operation inherited by the
12252 derived type declaration for the argument type.
12253 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12256 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12258 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12259 Process_Bounds, to perform analysis with expansion of a range or an
12260 expression that is the iteration scheme for a loop.
12261 (Analyze_Iterator_Specification): If domain of iteration is given by a
12262 function call with a controlled result, as is the case if call returns
12263 a predefined container, ensure that finalization actions are properly
12265 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12267 2011-08-02 Javier Miranda <miranda@adacore.com>
12269 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12270 * gcc-interface/Make-lang.in: Update dependencies.
12272 2011-08-02 Javier Miranda <miranda@adacore.com>
12274 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12275 determine if the analysis is performed using N or Original_Node (N).
12276 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12277 functionality of routine Is_Variable avoids code duplication.
12278 * checks.adb (Determine_Range): Handle temporaries generated by
12279 Remove_Side_Effects.
12281 2011-08-02 Javier Miranda <miranda@adacore.com>
12283 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12284 expansion of the condition. Required since the previous analysis was
12285 done with expansion disabled (see Resolve_Quantified_Expression) and
12286 hence checks were not inserted and record comparisons have not been
12289 2011-08-02 Ed Falis <falis@adacore.com>
12291 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12294 2011-08-02 Bob Duff <duff@adacore.com>
12296 * opt.ads: Minor comment fix.
12298 2011-08-02 Bob Duff <duff@adacore.com>
12300 * sem_ch12.adb (Analyze_Package_Instantiation,
12301 Analyze_Subprogram_Instantiation): Turn off style checking while
12302 analyzing an instance. Whatever style checks that apply to the generic
12303 unit should apply, so it makes no sense to apply them in an instance.
12304 This was causing trouble when compiling an instance of a runtime
12305 unit that violates the -gnatyO switch.
12306 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12307 one of the two case statements, causing spurious errors.
12309 2011-08-02 Robert Dewar <dewar@adacore.com>
12311 * uname.adb: Minor reformatting.
12312 * gnatcmd.adb: Minor reformatting.
12313 * exp_attr.adb: Minor reformatting.
12315 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12317 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12318 No_Dispatching_Calls, do not look for the Assign primitive, because
12319 predefined primitives are not created in this case.
12321 2011-08-02 Bob Duff <duff@adacore.com>
12323 * stylesw.ads: Minor comment fixes.
12325 2011-08-02 Robert Dewar <dewar@adacore.com>
12327 * freeze.adb (Add_To_Result): New procedure.
12329 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12331 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12332 time, if the specific run-time routines for handling streams of strings
12333 are not available, use the default mechanism.
12335 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12337 * s-regpat.ads: Fix typo.
12339 2011-08-02 Vincent Celier <celier@adacore.com>
12341 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12342 not null, call it to create the in memory config project file without
12343 parsing an existing default config project file.
12345 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12347 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12349 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12351 * sem_elim.adb: an abstract subprogram does not need an eliminate
12352 pragma for its descendant to be eliminable.
12354 2011-08-02 Ed Falis <falis@adacore.com>
12356 * init.c: revert to handling before previous checkin for VxWorks
12357 * s-intman-vxworks.adb: delete unnecessary declarations related to
12358 using Ada interrupt facilities for handling signals.
12359 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12360 * s-intman-vxworks.ads: Import __gnat_install_handler as
12361 Initialize_Interrupts.
12362 * s-taprop-vxworks.adb: Delete Signal_Mask.
12363 (Abort_Handler): change construction of mask to unblock exception
12366 2011-08-02 Jerome Guitton <guitton@adacore.com>
12368 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12369 Debug_Raise_Exception before propagation starts.
12371 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12373 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12374 to Restriction_Check_Required.
12375 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12376 * sem_res.adb (Resolve_Call): Likewise.
12377 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12379 2011-08-02 Bob Duff <duff@adacore.com>
12381 * stylesw.ads: Update comment.
12382 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12383 * errout.ads: Remove obsolete comment.
12385 2011-08-02 Javier Miranda <miranda@adacore.com>
12387 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12388 (Set_Is_Safe_To_Reevaluate): new procedure.
12389 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12390 assignment is allowed on safe-to-reevaluate variables.
12391 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12392 temporary created to remove side effects in expressions that use
12393 the secondary stack as safe-to-reevaluate.
12394 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12395 variables that are not true constants.
12397 2011-08-02 Robert Dewar <dewar@adacore.com>
12399 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12400 sem_res.adb, sem_ch6.adb: Minor reformatting.
12402 2011-08-02 Jerome Guitton <guitton@adacore.com>
12404 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12406 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12408 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12409 not set Overridden_Operation if subprogram is an initialization
12412 2011-08-02 Yannick Moy <moy@adacore.com>
12414 * par-ch6.adb: Correct obsolete name in comments
12415 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12416 which takes two message arguments (existing function takes one), with
12417 second message used for continuation.
12418 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12419 block statements that originate from a source block statement, not
12420 generated block statements
12421 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12422 symmetry with procedure case
12423 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12424 function to issue an error in formal mode if a package specification
12425 contains more than one tagged type or type extension.
12426 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12427 parameters matching formals of tagged types are objects (or ancestor
12428 type conversions of objects), not general expressions. Issue an error
12429 on view conversions that are not involving ancestor conversion of an
12431 (Resolve_Type_Conversion): in formal mode, issue an error on the
12432 operand of an ancestor type conversion which is not an object
12433 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12434 procedure so that it works also for actuals of function calls
12435 (Is_Actual_Tagged_Parameter): new function which determines if its
12436 argument is an actual parameter of a formal of tagged type in a
12438 (Is_SPARK_Object_Reference): new function which determines if the tree
12439 referenced by its argument represents an object in SPARK
12441 2011-08-02 Robert Dewar <dewar@adacore.com>
12443 * sem_ch3.adb: Minor reformatting
12444 Minor comment addition
12445 Minor error msg text change
12447 2011-08-02 Javier Miranda <miranda@adacore.com>
12449 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12450 function. Used to be more precise when we generate a variable plus one
12451 assignment to remove side effects in the evaluation of the Bound
12453 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12454 of the bound expression to force its re-analysis and thus expand the
12455 associated transient scope (if required). Code cleanup replacing the
12456 previous code that declared the constant entity by an invocation to
12457 routine Force_Evaluation which centralizes this work in the frontend.
12459 2011-08-02 Robert Dewar <dewar@adacore.com>
12461 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12462 (Base_Type): Now uses improved Is_Base_Type function
12463 * einfo.ads (Base_Type): Inline this function
12465 2011-08-02 Robert Dewar <dewar@adacore.com>
12467 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12468 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12470 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12472 * gcc-interface/Make-lang.in: Update dependencies.
12473 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12476 2011-08-02 Yannick Moy <moy@adacore.com>
12478 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12479 non-simple expression used in delta constraint
12480 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12481 index constraint which is not a subtype mark
12482 * par.adb: With and use Restrict
12483 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12484 mode on component type which is not a subtype mark and default
12485 expression on component
12486 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12487 of string which does not have a lower index bound equal to 1
12488 (Array_Type_Declaration): issue an error in formal mode on index or
12489 component type which is not a subtype mark, and on aliased keyword on
12491 (Derived_Type_Declaration): issue an error in formal mode on interface,
12492 limited or abstract type
12493 (Record_Type_Declaration): issue an error in formal mode on interface
12494 (Record_Type_Definition): issue an error in formal mode on tagged types
12495 and type extensions not declared in the specification of a library unit
12496 package; on null non-tagged record; on variant part
12498 2011-08-02 Vincent Celier <celier@adacore.com>
12500 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12501 not declared for qualified library project when Library_Name is not
12502 declared, but Library_Dir is.
12504 2011-08-02 Robert Dewar <dewar@adacore.com>
12506 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12507 pragmas (affects aspects [Component_]Default_Value
12508 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12509 component type for the resolution
12511 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12513 * einfo.adb (Base_Type): Tune implementation for speed.
12515 2011-08-02 Robert Dewar <dewar@adacore.com>
12517 * freeze.adb: Minor reformatting.
12519 2011-08-02 Thomas Quinot <quinot@adacore.com>
12521 * scos.ads: Update comments.
12523 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12525 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12526 base type, because the parent may be a subtype of a private type whose
12527 convention is established in a private part.
12529 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12531 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12532 statement in a block when the expansion of the return expression has
12533 created a finalization chain.
12534 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12535 with the parent node.
12536 Add N_Extended_Return_Statement to handle the case where a transient
12537 object declaration appears in the Return_Object_Declarations list of
12538 an extended return statement.
12540 2011-08-02 Matthew Gingell <gingell@adacore.com>
12542 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12543 unused parameter 'name'.
12545 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12547 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12548 inherited operation, check whether its alias, which is the source
12549 operastion that it renames, has been marked eliminated.
12551 2011-08-02 Javier Miranda <miranda@adacore.com>
12553 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12554 in-mode parameter whose type is an access type since it can be used to
12555 modify its designated object. Enforce code that handles as safe an
12556 access type that is not access-to-constant but it is the result of a
12557 previous removal of side-effects.
12558 (Remove_Side_Effects): Minor code reorganization of cases which require
12559 no action. Done to incorporate documentation on new cases uncovered
12560 working in this ticket: no action needed if this routine was invoked
12561 too early and the nodes are not yet decorated.
12562 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12563 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12564 were issued with actuals that are implicitly provided by
12567 2011-08-02 Robert Dewar <dewar@adacore.com>
12569 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12571 2011-08-02 Yannick Moy <moy@adacore.com>
12573 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12574 to issue an error in formal mode on attribute not supported in this mode
12575 (Analyze_Attribute): issue errors on standard attributes not supported
12577 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12578 comment, and issue error in formal mode on modulus which is not a power
12580 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12582 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12584 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12585 operator on modular type (except 'not').
12587 2011-08-02 Robert Dewar <dewar@adacore.com>
12589 * gnat_rm.texi: Minor reformatting.
12591 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12593 * s-osinte-linux.ads: Minor comment update and reformatting.
12594 * i-cexten.ads: Make this unit pure, as for its parent.
12595 Will allow its usage in more contexts if needed.
12597 2011-08-02 Robert Dewar <dewar@adacore.com>
12599 * s-utf_32.ads: Minor comment fix.
12601 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12603 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12604 operation of a tagged synchronized type, handle the case where the
12605 controlling argument is overloaded.
12607 2011-08-02 Yannick Moy <moy@adacore.com>
12609 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12610 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12611 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12612 SPARK mode and formal verification mode on processing SPARK restriction
12613 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12614 requiring consistency checking.
12616 2011-08-02 Robert Dewar <dewar@adacore.com>
12618 * sem_res.adb: Minor reformatting.
12620 2011-08-02 Robert Dewar <dewar@adacore.com>
12622 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12623 a-cforse.ads: Remove unneeded with of Ada.Containers
12624 Remove commented out pragma Inline's
12625 Move specifications of new subprograms to the actual specs
12627 2011-08-02 Yannick Moy <moy@adacore.com>
12629 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12630 a-cforse.ads: Update comments.
12632 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12634 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12636 2011-08-02 Robert Dewar <dewar@adacore.com>
12638 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12639 a-cforse.ads, a-cofove.ads: Minor reformatting.
12641 2011-08-02 Claire Dross <dross@adacore.com>
12643 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12644 a-cofove.ads: Add comments.
12646 2011-08-02 Yannick Moy <moy@adacore.com>
12648 * gnat_rm.texi: Document formal containers.
12650 2011-08-02 Emmanuel Briot <briot@adacore.com>
12652 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12653 are empty sections.
12655 2011-08-02 Robert Dewar <dewar@adacore.com>
12657 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12660 2011-08-02 Robert Dewar <dewar@adacore.com>
12662 * aspects.adb: New aspects Default_Value and Default_Component_Value
12663 New format of Aspect_Names table checks for omitted entries
12664 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12665 handling of boolean aspects for derived types.
12666 New aspects Default_Value and Default_Component_Value
12667 New format of Aspect_Names table checks for omitted entries
12668 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12669 (Has_Default_Value): New flag
12670 (Has_Default_Component_Value): New flag
12671 (Has_Default_Value): New flag
12672 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12674 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12675 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12676 Default_Value and Default_Component_Value
12677 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12678 New aspects Default_Value and Default_Component_Value
12679 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12680 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12682 2011-08-02 Vincent Celier <celier@adacore.com>
12684 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12685 inherit library kind.
12687 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12689 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12690 Minor reformatting.
12692 2011-08-02 Robert Dewar <dewar@adacore.com>
12694 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12696 2011-08-02 Yannick Moy <moy@adacore.com>
12698 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12700 2011-08-02 Robert Dewar <dewar@adacore.com>
12702 * impunit.adb: Add comment.
12704 2011-08-02 Yannick Moy <moy@adacore.com>
12706 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12707 qualification of aggregates in formal mode
12708 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12710 (Resolve_Aggregate): complete the test that an aggregate is adequately
12711 qualified in formal mode
12713 2011-08-02 Pascal Obry <obry@adacore.com>
12715 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12716 * mlib-prj.adb: Supress warning when compiling binder generated file.
12717 (Build_Library): Supress all warnings when compiling the binder
12720 2011-08-02 Yannick Moy <moy@adacore.com>
12722 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12724 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12725 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12726 Add with/use clauses to make Check_Formal_Restriction visible
12728 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12730 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12731 in-parameters when type of the generic formal is private in the generic
12732 spec and non-private in the body.
12734 2011-08-02 Claire Dross <dross@adacore.com>
12736 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12737 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12738 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12739 * impunit.adb, Makefile.rtl: Take new files into account.
12741 2011-08-02 Robert Dewar <dewar@adacore.com>
12743 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12744 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12746 2011-08-02 Yannick Moy <moy@adacore.com>
12748 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12750 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12751 matching static array bounds, taking into account the special case of
12753 * sem_ch3.adb: Typo in comment.
12755 2011-08-02 Yannick Moy <moy@adacore.com>
12757 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12758 which issues an error in formal mode if its argument node is originally
12760 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12761 has a discriminant specification so that it does not include the case
12763 (Derived_Type_Declaration): move here the test that a derived type has a
12764 discriminant specification
12765 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12766 first element of a component association before accessing its choices
12767 (presence of component association is not enough)
12768 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12769 declaration is a library item before accessing the next element in a
12770 list, as library items are not member of lists
12771 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12772 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12773 Check_Formal_Restriction whenever possible.
12775 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12777 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12778 reference when needed.
12780 2011-08-02 Bob Duff <duff@adacore.com>
12782 * gnat_ugn.texi: Fix typo.
12784 2011-08-02 Vincent Celier <celier@adacore.com>
12786 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12787 archive file name. Do not use the full path name of archives for Open
12790 2011-08-02 Robert Dewar <dewar@adacore.com>
12792 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12793 Analyze_Aspect_Specifications
12795 (Analyze_Aspect_Specifications): New handling for boolean aspects
12796 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12797 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12798 sequence for Analyze_Aspect_Specifications
12799 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12800 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12802 2011-08-02 Robert Dewar <dewar@adacore.com>
12804 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12805 aspects, since these no longer exist.
12807 2011-08-02 Robert Dewar <dewar@adacore.com>
12809 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12810 semicolon, do not try to see if there are aspects following it.
12811 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12814 2011-08-02 Robert Dewar <dewar@adacore.com>
12816 * sem_ch8.adb, aspects.ads: Minor reformatting.
12818 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12820 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12821 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12823 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12825 2011-08-02 Yannick Moy <moy@adacore.com>
12827 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12828 mode on subprogram declaration outside of package specification, unless
12829 it is followed by a pragma Import
12830 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12831 Access_Type_Declaration): issue error in formal mode on access type
12832 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12834 (Analyze_Object_Declaration): issue error in formal mode on object
12835 declaration which does not respect SPARK restrictions
12836 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12837 declaration which does not respect SPARK restrictions
12838 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12839 error in formal mode on digits or delta constraint
12840 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12841 decimal fixed point type
12842 (Derived_Type_Declaration): issue error in formal mode on derived type
12843 other than type extensions of tagged record types
12844 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12845 with check on access definition
12846 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12847 mode on protected definition.
12848 (Analyze_Task_Definition): issue error in formal mode on task definition
12850 2011-08-02 Robert Dewar <dewar@adacore.com>
12852 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12854 2011-08-02 Javier Miranda <miranda@adacore.com>
12856 * sem_ch6.adb (Can_Override_Operator): New function.
12857 (Verify_Overriding_Indicator): Add missing code to check overriding
12858 indicator in operators. Fixes regression.
12859 (Check_Overriding_Indicator): Minor reformating after replacing the
12860 code that evaluates if the subprogram can override an operator by
12861 invocations to the above new function.
12863 (Write_Field26_Name): Add missing code to ensure that, following
12864 the documentation in einfo.ads, this field is not shown as attribute
12865 "Static_Initialization" on non-dispatching functions.
12867 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12869 * sem_res.adb (Resolve_Call): A call to
12870 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12871 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12872 i.e., when the second parameter is of type Time_Span.
12874 2011-08-02 Vincent Celier <celier@adacore.com>
12876 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12877 with an archive instead of -L<library dir> -l<library name>.
12879 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12881 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12882 mark the base types In_Use in addition to making the operations
12885 2011-08-02 Ed Falis <falis@adacore.com>
12887 * init.c: add and setup __gnat_signal_mask for the exception signals
12888 * s-inmaop-vxworks.adb: new file.
12889 * s-intman-vxworks.adb: remove unnecessary initializations and
12891 * s-intman-vxworks.ads: remove unnecessary variable
12892 * s-taprop-vxworks.adb: simplify signal initialization
12894 2011-08-02 Robert Dewar <dewar@adacore.com>
12896 * sem_ch8.adb: Minor code reorganization, comment updates.
12898 2011-08-02 Robert Dewar <dewar@adacore.com>
12900 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12901 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12903 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12904 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12906 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12908 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12909 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12910 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12911 use_type_clauses, to handle more efficiently use_type and use_all_type
12913 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12914 Ada2012 Use_All_Type clause.
12915 (Use_Class_Wide_Operations): new procedure.
12917 2011-08-02 Robert Dewar <dewar@adacore.com>
12919 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12920 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12921 expression to expression function.
12923 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12925 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12926 if types are compatible.
12928 2011-08-02 Yannick Moy <moy@adacore.com>
12930 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12931 returns True if its argument array types have same dimension and same
12932 static bounds at each index.
12933 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12934 OUT or IN OUT paramaters which are not view conversions in SPARK.
12935 (Resolve_Arithmetic_Op): issue an error in formal mode on
12936 multiplication or division with operands of fixed point types which are
12937 not qualified or explicitly converted.
12938 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12939 Boolean or array type (except String) operands.
12940 (Resolve_Equality_Op): issue an error in formal mode on equality
12941 operators for array types other than String with non-matching static
12943 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12944 for array types with non-matching static bounds. Factorize the code in
12945 Matching_Static_Array_Bounds.
12946 (Resolve_Qualified_Expression): issue an error in formal mode on
12947 qualified expressions for array types with non-matching static bounds.
12948 (Resolve_Type_Conversion): issue an error in formal mode on type
12949 conversion for array types with non-matching static bounds
12951 2011-08-02 Robert Dewar <dewar@adacore.com>
12953 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12955 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12957 * par-ch9.adb: save location of entry for proper error message.
12959 2011-08-02 Javier Miranda <miranda@adacore.com>
12961 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12962 (Use_Full_View) which permits this routine to climb through the
12963 ancestors using the full-view of private parents.
12964 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12965 Use_Full_View to true in calls to Is_Ancestor.
12966 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12967 true in call to Is_Ancestor.
12968 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12969 Use_Full_View to true in call to Is_Ancestor.
12970 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12971 call to Is_Ancestor.
12972 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12973 Use_Full_View to true in calls to Is_Ancestor.
12974 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12975 Make_Select_Specific_Data_Table, Register_Primitive,
12976 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12977 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12978 to true in call to Is_Ancestor.
12979 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12980 Use_Full_View to true in calls to Is_Ancestor.
12982 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12983 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12985 2011-08-02 Robert Dewar <dewar@adacore.com>
12987 * gnat_rm.texi: Minor reformatting.
12988 * sem_prag.adb: Minor reformatting.
12990 2011-08-02 Tristan Gingold <gingold@adacore.com>
12992 * vms_data.ads: Add VMS qualifier for -gnateP.
12994 2011-08-02 Robert Dewar <dewar@adacore.com>
12996 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12997 * par-ch7.adb (P_Package): Proper placement of aspects for package
12998 decl/instantiation.
12999 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13000 (End_Statements): Add Is_Sloc parameterr
13001 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13002 (Check_End): Ad Is_Sloc parameter
13003 (End_Statements): Add Is_Sloc parameterr
13005 2011-08-02 Vincent Celier <celier@adacore.com>
13007 * ug_words: Add VMS qualifier equivalent to -gnateP:
13008 /SYMBOL_PREPROCESSING.
13010 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13012 * gnat-style.texi: For hexadecimal numeric literals the typical
13013 grouping of digits is 4 to represent 2 bytes.
13014 A procedure spec which is split into several lines is indented two
13017 2011-08-02 Yannick Moy <moy@adacore.com>
13019 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13020 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13021 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13023 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13024 choice in array aggregate
13025 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13027 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13028 positional and named aggregate for record, or others in record
13029 aggregate, or multiple choice in record aggregate
13030 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13031 array operands to logical operations AND, OR and XOR do not have the
13032 same static lower and higher bounds
13033 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13035 2011-08-01 Robert Dewar <dewar@adacore.com>
13037 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13038 Replaces Last_Source_Node_In_Sequence.
13039 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13040 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13041 parens and blank in string (this was inconsistently implemented).
13043 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13044 blank in string (this was inconsistently implemented).
13046 (Set_Global_Switches): Set formal mode switches appropriately
13047 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13049 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13050 call Set_Error_Msg_Lang to set "spark" as language name.
13051 * par.adb: Remove unnecessary call to set formal language for errout
13052 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13053 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13055 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13056 calls to it, moved after resolution so that types are known
13057 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13058 result of concatenation is not of type String
13059 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13060 concatenation is not properly restricted
13061 * gnat_rm.texi: Add doc on pragma Spark_95.
13062 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13063 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13064 * gcc-interface/Make-lang.in: Update dependencies.
13066 2011-08-01 Javier Miranda <miranda@adacore.com>
13068 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13069 condition that detects if the overridden operation must replace an
13072 2011-08-01 Javier Miranda <miranda@adacore.com>
13074 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13075 code declarations inserted by Insert_Actions in each alternative of the
13076 N_Case_Expression node.
13078 2011-08-01 Robert Dewar <dewar@adacore.com>
13080 * sem_ch6.adb: Minor code reorganization.
13081 * sem_util.adb: Minor reformatting.
13083 2011-08-01 Pascal Obry <obry@adacore.com>
13085 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13086 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13088 2011-08-01 Yannick Moy <moy@adacore.com>
13090 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13091 literal or operator symbol which is prefixed
13092 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13093 mode on access attributes.
13094 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13095 that concatenation operands are properly restricted in formal mode
13096 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13097 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13098 result of the concatenation has a type different from String.
13099 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13100 Analyze_Quantified_Expression, Analyze_Slice,
13101 Analyze_Null): issue an error in formal mode on unsupported constructs
13103 (Analyze_Block_Statement): only issue error on source block statement
13104 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13105 function which returns the last node in a list of nodes for which
13106 Comes_From_Source returns True, if any
13107 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13108 Last_Source_Node_In_Sequence
13109 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13110 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13111 mode on unsupported constructs
13112 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13113 rest of the actions may be needed later on since the error is marked as
13115 * sinfo.ads: Typos in comments.
13117 2011-08-01 Pascal Obry <obry@adacore.com>
13119 * projects.texi: Minor editing.
13121 2011-08-01 Yannick Moy <moy@adacore.com>
13123 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13124 insertion character ~~
13125 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13126 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13127 with insertion character ~~
13128 (Set_Msg_Text): treat insertion character ~~
13129 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13130 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13131 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13132 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13133 errors related to the formal language restriction not serious
13134 (insertion character |).
13135 * par.adb (Par): set formal language for error messages if needed
13136 * sem_ch6.adb (Check_Missing_Return): take into account possible
13137 generated statements at the end of the function
13138 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13139 enumeration value to define a new pragma SPARK_95
13140 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13141 SPARK_Version): new type and variables to store the SPARK version
13143 (SPARK_Mode): return True when SPARK_Version is set
13144 * par-prag.adb: Correct indentation
13145 (Prag): take Pragma_SPARK_95 into account
13146 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13149 2011-08-01 Robert Dewar <dewar@adacore.com>
13151 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13152 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13153 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13155 2011-08-01 Pascal Obry <obry@adacore.com>
13157 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13158 Target_Name to Get_Path call.
13159 (Parse_Single_Project): Likewise.
13160 (Post_Parse_Context_Clause): Likewise.
13161 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13162 Call Initialise_Project_Path with the proper Target_Name.
13163 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13165 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13166 with the proper Target_Name.
13167 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13168 Part.Parse routine.
13169 (Parse_Project_And_Apply_Config): Likewise.
13170 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13171 This is fine as this part of the code is supporting only native
13173 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13174 is fine as this part of the code is supporting only native compilation.
13176 2011-08-01 Yannick Moy <moy@adacore.com>
13178 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13179 of homonym, unless the homonym is one of the cases allowed in SPARK
13180 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13181 package declaration occurring after a body.
13183 2011-08-01 Robert Dewar <dewar@adacore.com>
13185 * checks.adb, exp_ch4.adb: Minor reformatting.
13187 2011-08-01 Javier Miranda <miranda@adacore.com>
13189 * einfo.ads (Access_Disp_Table): Fix documentation.
13190 (Dispatch_Table_Wrappers): Fix documentation.
13192 2011-08-01 Pascal Obry <obry@adacore.com>
13194 * prj-env.adb, prj-env.ads: Minor reformatting.
13196 2011-08-01 Yannick Moy <moy@adacore.com>
13198 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13199 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13200 procedures out of these packages.
13201 * errout.ads, errout.adb
13202 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13203 procedures in of this package
13204 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13205 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13206 on misplaced later vs initial declarations, like in Ada 83
13207 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13208 formal mode on attribute of private type whose full type declaration
13210 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13211 package declaration inside a package specification
13212 (Analyze_Full_Type_Declaration): issue error in formal mode on
13213 controlled type or discriminant type
13214 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13215 user-defined operator means that it should come from the source
13216 (New_Overloaded_Entity): issue error in formal mode on overloaded
13218 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13220 2011-08-01 Thomas Quinot <quinot@adacore.com>
13222 * atree.adb: Minor reformatting.
13223 * checks.adb: Minor reformatting.
13225 2011-08-01 Vincent Celier <celier@adacore.com>
13227 * s-parame-vms-ia64.ads: Fix typo in comment
13229 * s-parame-vms-restrict.ads: Removed, unused.
13231 2011-08-01 Javier Miranda <miranda@adacore.com>
13234 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13236 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13237 * sem_ch3.ads, sem_ch3.adb
13238 (Is_Constant_Bound): New extended version of the subprogram that was
13239 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13240 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13241 * sem_aux.ads (Constant_Value): Fix typo in comment.
13242 * checks.adb (Generate_Index_Checks): New implementation which, for
13243 array objects with constant bounds, generates the runtime check
13244 referencing the bounds of the array type. For other cases this routine
13245 provides its previous behavior obtaining such values from the array
13247 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13249 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13250 we cannot have semantic interpretations of the new node.
13252 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13254 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13257 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13259 * sem_ch8.adb: Minor code editing.
13260 * s-vxwext.adb: Remove trailing space.
13261 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13262 consistency with other files.
13264 2011-08-01 Thomas Quinot <quinot@adacore.com>
13266 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13268 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13270 * par-ch10.adb: reject parameterized expressions as compilation unit.
13271 * sem_ch4.adb: handle properly conditional expression with overloaded
13272 then_clause and no else_clause.
13274 2011-08-01 Tristan Gingold <gingold@adacore.com>
13276 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13277 like done by System.Aux_DEC.
13278 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13280 2011-08-01 Yannick Moy <moy@adacore.com>
13282 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13283 missing label at end of declaration (subprogram or package)
13284 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13285 of positional and named parameter association
13286 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13287 Error_Msg_SP which adds a prefix to the error message giving the name
13288 of the formal language analyzed
13289 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13290 access result type in subprogram, unconstrained array as result type,.
13291 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13293 * sem_ch8.adb: Code clean up.
13295 2011-08-01 Javier Miranda <miranda@adacore.com>
13297 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13298 * einfo.ads (Access_Disp_Table): Fix documentation.
13299 (Dispatch_Table_Wrappers): Fix documentation.
13300 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13301 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13302 to enforce the documentation of this attribute.
13303 (Set_Is_Interface): Cleanup the assertion.
13304 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13305 the Underlying_Type entity before reading attribute Access_Disp_Table.
13306 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13307 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13308 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13309 the Underlying_Type entity before reading attribute Access_Disp_Table.
13310 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13311 Locate the Underlying_Type entity before reading attribute
13314 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13316 * s-poosiz.ads: Additional overriding indicators.
13318 2011-08-01 Yannick Moy <moy@adacore.com>
13320 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13322 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13323 parameter specification does not include a subtype mark.
13324 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13325 formal mode on abstract subprogram.
13326 (Analyze_Subprogram_Specification): issue error in formal mode on
13327 user-defined operator.
13328 (Process_Formals): issue error in formal mode on access parameter and
13329 default expression.
13330 * sem_ch9.adb (Analyze_Abort_Statement,
13331 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13332 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13333 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13334 Analyze_Requeue, Analyze_Selective_Accept,
13335 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13336 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13337 issue error in formal mode on user-defined raise statement.
13339 2011-08-01 Thomas Quinot <quinot@adacore.com>
13341 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13342 declaration being hidden when overriding an implicit inherited
13344 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13345 (-gnats), do not complain about a source file that contains only a
13348 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13350 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13351 variable if already set.
13353 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13355 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13356 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13357 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13358 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13359 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13360 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13361 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13362 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13363 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13364 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13365 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13366 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13367 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13368 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13369 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13370 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13371 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13372 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13373 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13374 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13375 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13376 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13377 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13378 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13379 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13380 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13381 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13382 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13383 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13384 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13385 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13386 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13387 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13388 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13389 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13390 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13391 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13392 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13393 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13394 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13395 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13396 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13397 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13398 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13399 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13400 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13401 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13402 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13403 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13404 Use GNAT instead of GNARL.
13406 2011-08-01 Bob Duff <duff@adacore.com>
13408 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13409 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13410 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13413 2011-08-01 Yannick Moy <moy@adacore.com>
13415 * debug.adb (d.D) reverve flag for the SPARK mode
13416 (d.E) reverve flag for SPARK generation mode
13417 (d.F) reverve flag for Why generation mode
13418 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13419 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13420 functions which return True when the corresponding modes are set
13421 (Formal_Language): return "spark" or "alfa" when in formal verification
13423 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13424 Error_Msg to prefix the error message with a tag giving the formal
13426 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13427 message with a tag giving the formal language
13428 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13430 (Analyze_Case_Statement): issue error in formal mode on case statement
13431 with a single "others" case alternative
13432 (Analyze_Exit_Statement): issue errors in formal mode on exit
13433 statements which do not respect SPARK restrictions
13434 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13435 (Check_Unreachable_Code): always issue an error (not a warning) in
13436 formal mode on unreachable code (concerns both code after an infinite
13437 loop and after an unconditional jump, both not allowed in SPARK)
13438 * sem_ch6.adb (Analyze_Return_Statement): add call to
13439 Set_Return_Present for a procedure containing a return statement
13440 (already done for functions in Analyze_Function_Return)
13441 (Analyze_Function_Return): issue error in formal mode on extended
13442 return or if return is not last statement in function
13443 (Check_Missing_Return): issue error in formal mode if function does
13444 not end with return or if procedure contains a return
13445 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13446 function to detect if there is an inner scope of its parameter S which
13449 2011-08-01 Thomas Quinot <quinot@adacore.com>
13451 * sem_ch6.ads: Minor reformatting.
13453 2011-08-01 Javier Miranda <miranda@adacore.com>
13455 * sem_util.adb (Abstract_Interface_List): Complete condition when
13456 processing private type declarations to avoid reading unavailable
13458 (Is_Synchronized_Tagged_Type): Complete condition when processing
13459 private extension declaration nodes to avoid reading unavailable
13462 2011-08-01 Thomas Quinot <quinot@adacore.com>
13464 * sem_ch3.adb: Minor reformatting.
13466 2011-08-01 Thomas Quinot <quinot@adacore.com>
13468 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13469 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13470 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13471 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13472 for VMS, instead parametrize the common implementation with
13473 System.Parameters declarations.
13475 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13477 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13479 2011-08-01 Tristan Gingold <gingold@adacore.com>
13481 * seh_init.c: Fix SEH handler installation on win64.
13483 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13485 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13486 double analysis of an anonymous access to subprogram, because it can
13487 lead to improper sharing of profiles and a back-end crash.
13489 2011-08-01 Robert Dewar <dewar@adacore.com>
13491 * make.adb, sem_ch4.adb: Minor reformatting.
13492 * gcc-interface/Make-lang.in: Update dependencies.
13493 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13495 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13497 * gnat_rm.texi: Fix definition of Long_Integer.
13499 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13501 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13502 to prevent storage exhaustion.
13503 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13504 finalized is a function body, insert the cleanup code before the final
13505 return statement, to prevent spurious warnings.
13506 * s-pooglo.ads: add overriding indicator.
13508 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13510 * sem_ch4.adb (Operator_Check): improve error message when both a
13511 with_clause and a use_clause are needed to make operator usage legal.
13512 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13513 determine whether a compilation unit is visible within an other,
13514 either through a with_clause in the current unit, or a with_clause in
13515 its library unit or one one of its parents.
13517 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13519 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13520 over an arbitrary expression of an array or container type.
13521 * lib-xref.adb: clarify comment.
13523 2011-08-01 Bob Duff <duff@adacore.com>
13525 * einfo.ads: Minor reformatting.
13526 * debug.adb: Minor comment improvement.
13528 2011-08-01 Javier Miranda <miranda@adacore.com>
13530 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13531 consider hidden subprograms as valid candidates.
13533 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13535 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13537 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13539 * gnat_ugn.texi: Fix typo.
13541 2011-08-01 Robert Dewar <dewar@adacore.com>
13543 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13544 lib-xref.adb: Minor reformatting
13546 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13548 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13549 when to generate a call to Move_Final_List.
13550 (Has_Controlled_Parts): Remove this function.
13552 2011-08-01 Geert Bosch <bosch@adacore.com>
13554 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13555 "," in choice list.
13557 2011-08-01 Thomas Quinot <quinot@adacore.com>
13559 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13560 explicit raise of a predefined exception as Comes_From_Source if the
13561 original N_Raise_Statement comes from source.
13563 2011-08-01 Robert Dewar <dewar@adacore.com>
13565 * sinfo.ads: Add comment.
13566 * sem_ch6.adb: Minor reformatting.
13568 2011-08-01 Robert Dewar <dewar@adacore.com>
13570 * freeze.adb (Freeze_Entity): Refine check for bad component size
13571 clause to avoid rejecting confirming clause when atomic/aliased present.
13573 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13575 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13576 better determine whether an entity reference is a write.
13577 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13579 * lib-xref.adb (Output_References): Do no suppress a read reference at
13580 the same location as an immediately preceeding modify-reference, to
13581 handle properly in-out actuals.
13583 2011-08-01 Tristan Gingold <gingold@adacore.com>
13585 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13587 2011-08-01 Quentin Ochem <ochem@adacore.com>
13589 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13590 heap to compute the result.
13592 2011-08-01 Robert Dewar <dewar@adacore.com>
13594 * atree.ads: Minor reformatting.
13596 2011-08-01 Emmanuel Briot <briot@adacore.com>
13598 * g-expect.adb (Get_Command_Output): Fix memory leak.
13600 2011-08-01 Geert Bosch <bosch@adacore.com>
13602 * cstand.adb (P_Float_Type): New procedure to print the definition of
13603 predefined fpt types.
13604 (P_Mixed_Name): New procedure to print a name using mixed case
13605 (Print_Standard): Use P_Float_Type for printing floating point types
13606 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13607 precision IEEE float.
13609 2011-08-01 Thomas Quinot <quinot@adacore.com>
13611 * sem_ch3.adb: Minor reformatting.
13613 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13615 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13616 the completion of a generic function, insert the new body rather than
13617 rewriting the original.
13619 2011-08-01 Yannick Moy <moy@adacore.com>
13621 * sinfo.ads, errout.ads: Typos in comments.
13623 2011-08-01 Robert Dewar <dewar@adacore.com>
13625 * par-endh.adb: Minor reformatting.
13627 2011-08-01 Robert Dewar <dewar@adacore.com>
13629 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13630 (Pre_Post_Aspects): New subtype.
13631 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13632 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13633 * par-ch7.adb (P_Package): Remove Decl parameter
13634 (P_Package): Handle new syntax for aspects (before IS)
13635 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13637 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13638 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13639 (P_Package): Remove Decl parameter
13640 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13642 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13644 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13645 * sinfo.ads: Document new syntax for aspects in packages etc.
13646 * sprint.adb: Handle new syntax of aspects before IS in package
13648 2011-08-01 Thomas Quinot <quinot@adacore.com>
13650 * atree.ads: Minor reformatting.
13651 * sem_prag.adb: Minor reformatting.
13653 2011-08-01 Robert Dewar <dewar@adacore.com>
13655 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13656 case expr alternative.
13658 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13660 * sem_ch12.adb: Fix typo.
13662 2011-08-01 Geert Bosch <bosch@adacore.com>
13664 * sem_prag.adb (Check_No_Link_Name): New procedure.
13665 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13666 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13667 instead of Standard_Long_Long_Float_Size global. Preparation for
13668 eventual removal of per type constants.
13669 * exp_util.ads (Get_Stream_Size): New function returning the stream
13670 size value of subtype E.
13671 * exp_util.adb (Get_Stream_Size): Implement new function.
13672 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13674 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13676 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13678 2011-08-01 Geert Bosch <bosch@adacore.com>
13680 * cstand.adb: Fix comments.
13681 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13682 count of arguments.
13684 2011-08-01 Robert Dewar <dewar@adacore.com>
13686 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13688 2011-08-01 Geert Bosch <bosch@adacore.com>
13690 * atree.ads: Fix comment.
13692 2011-08-01 Robert Dewar <dewar@adacore.com>
13694 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13695 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13696 * par.adb: Add with for Namet.Sp.
13697 * par-tchk.adb: Minor reformatting.
13699 2011-08-01 Vincent Celier <celier@adacore.com>
13701 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13702 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13703 of the init procedure of a SAL.
13704 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13707 2011-08-01 Thomas Quinot <quinot@adacore.com>
13709 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13712 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13714 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13716 2011-08-01 Thomas Quinot <quinot@adacore.com>
13718 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13719 conformant with its spec (return True only for types that have
13720 an overriding Initialize primitive operation that prevents them from
13721 having preelaborable initialization).
13722 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13723 initialization for controlled types in Ada 2005 or later mode.
13725 2011-08-01 Robert Dewar <dewar@adacore.com>
13727 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13729 (Same_Aspect): New function.
13730 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13731 Type_Invariant, Precondition, Postcondition.
13732 * snames.ads-tmpl: Add Name_Type_Invariant.
13734 2011-08-01 Robert Dewar <dewar@adacore.com>
13736 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13738 (Freeze_All_Ent): Fix error in handling inherited aspects.
13739 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13740 already analyzed, but don't skip entire processing of a declaration,
13741 that's wrong in some cases of declarations being rewritten.
13742 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13743 Don't delay for integer, string literals
13744 Treat predicates in usual manner for delay, remove special case code,
13746 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13747 (Build_Predicate_Function): Update saved expression in aspect
13748 (Build_Invariant_Procedure): Update saved expression in aspect
13749 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13750 of replacement of discriminant references if the reference is simple.
13752 2011-08-01 Robert Dewar <dewar@adacore.com>
13754 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13755 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13756 Static_Predicate and Dynamic_Predicate.
13757 (Build_Predicate_Function): Add processing for Static_Predicate
13758 and Dynamic_Predicate.
13759 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13760 (From_Static_Predicate): New flag
13761 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13763 2011-08-01 Robert Dewar <dewar@adacore.com>
13765 * usage.adb: Documentation cleanup for Ada version modes in usage.
13766 * expander.adb: Minor reformatting.
13768 2011-08-01 Robert Dewar <dewar@adacore.com>
13770 * atree.ads: Minor comment fix.
13771 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13772 a-witeio.ads, sem_prag.adb: Minor reformatting.
13774 2011-08-01 Doug Rupp <rupp@adacore.com>
13776 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13777 pointers. Use descrip.h header file for convenience. Add some
13780 2011-08-01 Robert Dewar <dewar@adacore.com>
13782 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13783 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13784 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13786 (Check_Aspect_At_End_Of_Declarations): New procedure
13787 (Analye_Aspect_Specification): Minor changes for above procedures
13788 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13789 specification node as well.
13791 2011-08-01 Pascal Obry <obry@adacore.com>
13793 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13794 Windows files. Use GetFilesAttributes() in this case to check for file
13795 existence instead of returning with an error code.
13797 2011-08-01 Vincent Celier <celier@adacore.com>
13799 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13800 High is above Source length.
13802 2011-08-01 Robert Dewar <dewar@adacore.com>
13804 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13806 2011-08-01 Robert Dewar <dewar@adacore.com>
13808 * aspects.ads (Boolean_Aspects): New subtype.
13809 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13810 for derived types in cases where the parent type and derived type have
13812 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13813 with aspects when parent type also has aspects.
13814 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13815 boolean expression at this point).
13816 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13817 accordance with final decision on the Ada 2012 feature.
13818 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13820 2011-08-01 Matthew Heaney <heaney@adacore.com>
13822 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13824 2011-08-01 Pascal Obry <obry@adacore.com>
13826 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13827 Fix Replace_Slice when High is above current string size.
13828 (Replace_Slice): Fix DL computation when High is above current
13831 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13833 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13835 2011-08-01 Matthew Heaney <heaney@adacore.com>
13837 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13840 2011-08-01 Pascal Obry <obry@adacore.com>
13842 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13847 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13848 access to protected subprograms in generic bodies.
13849 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13850 protected type, indicate that the convention of the subprogram is
13851 Convention_Protected, because it may be used in subsequent declarations
13852 within the protected declaration.
13854 2011-08-01 Vincent Celier <celier@adacore.com>
13856 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13857 and "final" procedures when the name of the library is "ada", to avoid
13858 duplicate symbols "adainit" and "adafinal" in executables.
13860 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13862 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13863 quantified expression that appears within a postcondition and uses the
13864 Ada2012 'Result attribute.
13866 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13868 * init.c (__gnat_error_handler): Cast reason to int.
13869 (__gnat_install_handler): Explain sa_sigaction use.
13871 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13873 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13874 subprogram has copy-in copy-out parameters, try to promote the mode of
13875 the return type if it is passed in registers.
13877 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13879 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13880 left operand as addressable.
13882 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13884 * gcc-interface/gigi.h (build_function_stub): Remove.
13885 (build_return_expr): Likewise.
13886 (convert_vms_descriptor): Declare.
13887 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13888 (build_function_stub): Move to...
13889 * gcc-interface/utils2.c (build_return_expr): Move to...
13890 * gcc-interface/trans.c (build_function_stub): ...here.
13891 (build_return_expr): ...here.
13892 (Subprogram_Body_to_gnu): Add local variable for language_function.
13893 Disconnect the parameter attributes cache, if any, once done with it.
13894 Call end_subprog_body only after setting the end_locus.
13895 Build the stub associated with the function, if any, at the very end.
13896 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13897 variables and streamline control flow.
13899 2011-07-23 Arnaud Charlet <charlet@adacore.com>
13902 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13903 g-trasym-dwarf.adb.
13905 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13908 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13909 Assign to act.sa_sigaction.
13910 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13911 current->return_address to char * before arithmetic.
13913 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13915 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13916 Correct argument types.
13917 Extract code from reason.
13918 (__gnat_install_handler): Assign to act.sa_sigaction.
13920 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13922 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13923 (GNAT1_OBJS): ...here.
13925 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13928 * g-socthi-mingw.adb (Fill): Fix formatting.
13930 * gcc-interface/gigi.h: Move around comment.
13932 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13935 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13937 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
13940 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13942 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13944 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13945 range comparison if Pmode is SImode.
13947 2011-07-12 Laurent GUERBY <laurent@guerby.net>
13948 Eric Botcazou <ebotcazou@adacore.com>
13950 * adadecode.c: Wrap up in extern "C" block.
13951 * adadecode.h: Likewise.
13952 * adaint.c: Likewise. Remove 'const' keyword.
13953 * adaint.h: Likewise.
13954 * argv.c: Likewise.
13955 * atree.h: Likewise.
13957 * cstreams.c: Likewise.
13959 * exit.c: Likewise.
13961 * final.c: Likewise.
13962 * init.c: Likewise.
13963 * initialize.c: Likewise.
13964 * link.c: Likewise.
13965 * namet.h: Likewise.
13966 * nlists.h: Likewise.
13967 * raise.c: Likewise.
13968 * raise.h: Likewise.
13969 * repinfo.h: Likewise.
13970 * seh_init.c: Likewise.
13971 * targext.c: Likewise.
13972 * tracebak.c: Likewise.
13973 * uintp.h: Likewise.
13974 * urealp.h: Likewise.
13975 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13976 * xsinfo.adb: Likewise.
13977 * xsnamest.adb: Likewise.
13978 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13979 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13980 * gcc-interface/misc.c: Likewise.
13981 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13982 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13983 ada/targext.o here...
13984 (GNAT_ADA_OBJS): ...and not here.
13985 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13986 (GNATBIND_OBJS): Reorder.
13988 2011-07-07 Richard Henderson <rth@redhat.com>
13990 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13991 dwarf2out_frame_init.
13993 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13995 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13997 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14000 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14002 2011-07-06 Richard Guenther <rguenther@suse.de>
14004 * gcc-interface/misc.c (gnat_init): Merge calls to
14005 build_common_tree_nodes and build_common_tree_nodes_2.
14006 Re-initialize boolean_false_node.
14008 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14009 Olivier Hainque <hainque@adacore.com>
14010 Nicolas Setton <setton@adacore.com>
14012 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14013 the type according to the ARTIFICIAL_P parameter.
14014 (create_type_decl): Likewise.
14015 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14017 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14019 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14020 (gnatbind): Likewise.
14022 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14024 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14026 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14028 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14029 local variable throughout. Remove useless call to Base_Type.
14030 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14031 Take it also into account for the volatileness of the field. Set the
14032 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14034 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14036 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14037 on a dereference built for a by-ref object if it has an address clause.
14039 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14041 * einfo.ads (Address_Taken): Document use for the second argument of
14042 Asm_Input and Asm_Output attributes.
14043 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14044 argument is an entity name, then set Address_Taken on it.
14045 <Attribute_Asm_Output>: Likewise.
14046 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14047 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14048 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14049 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14051 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
14053 PR middle-end/46500
14054 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14056 2011-06-14 Joseph Myers <joseph@codesourcery.com>
14058 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14059 (ada/utils.o): Update dependencies.
14060 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14061 ../../../libcpp/libcpp.a.
14062 * gcc-interface/utils.c: Include common/common-target.h.
14063 (process_attributes): Use targetm_common.have_named_sections.
14065 2011-06-07 Richard Guenther <rguenther@suse.de>
14067 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14070 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14072 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14073 TREE_THIS_NOTRAP flag.
14075 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14077 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14080 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14082 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14083 constants whose full view has discriminants specially.
14085 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14087 * gcc-interface/utils.c: Include diagnostic.h.
14088 (gnat_write_global_declarations): Output debug information for all
14089 global type declarations before finalizing the compilation unit.
14090 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14092 2011-05-25 Jakub Jelinek <jakub@redhat.com>
14094 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14096 2011-05-25 Kai Tietz <ktietz@redhat.com>
14098 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14099 initialization instead of const/none-const pointer assignment.
14101 2011-05-24 Joseph Myers <joseph@codesourcery.com>
14103 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14104 $(EXTRA_GNAT1_OBJS).
14105 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14106 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14107 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14108 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14109 libcommon-target.a instead of prefix.o.
14111 2011-05-21 Joseph Myers <joseph@codesourcery.com>
14114 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14116 2011-05-20 Joseph Myers <joseph@codesourcery.com>
14118 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14119 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14120 instead of version.o.
14122 2011-05-18 Kai Tietz <ktietz@redhat.com>
14124 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14125 boolean_false_node instead of integer_zero_node.
14126 (convert_with_check): Likewise.
14127 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14129 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14131 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14132 type of the parameter is an unconstrained array, convert the actual to
14133 the type of the formal in the In Out and Out cases as well.
14135 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14137 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14138 call build_function_type_array or build_varargs_function_type_array
14140 (create_subprog_type): Don't call build_function_type; call
14141 build_function_type_vec instead.
14143 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14145 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14146 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14147 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14149 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14151 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14153 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14154 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14156 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14158 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14160 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14162 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14163 instead of accessing TYPE_ARG_TYPES directly.
14164 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14166 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14169 * gcc-interface/gigi.h (get_variant_part): Declare.
14170 * gcc-interface/decl.c (get_variant_part): Make global.
14171 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14172 types have the same constant size, are record types and T1 has a
14173 variant part while T2 doesn't.
14175 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14177 * gcc-interface/utils.c (begin_subprog_body): Do not call
14179 (end_subprog_body): Likewise.
14181 2011-05-04 Richard Guenther <rguenther@suse.de>
14183 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14185 (pos_to_constructor): Likewise.
14187 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
14188 Eric Botcazou <ebotcazou@adacore.com>
14190 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14191 of build_function_type. Adjust calls to...
14192 (build_raise_check): ...this. Do not take a void_tree parameter.
14193 Call build_function_type_list instead of build_function_type.
14194 Fix head comment and swap couple of conditional blocks.
14196 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14198 * gnatvsn.ads (Library_Version): Bump to 4.7.
14199 (Current_Year): Bump to 2011.
14201 2011-04-29 Michael Matz <matz@suse.de>
14203 * gcc-interface/misc.c (gnat_handle_option): Set
14204 warn_maybe_uninitialized.
14206 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14208 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14209 the Watson/McCabe paper.
14211 2011-04-23 Jim Meyering <meyering@redhat.com>
14213 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14215 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14217 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14220 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14222 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14224 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14225 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14226 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14227 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14228 <all>: Do not set flags on the reused DECL node coming from an alias.
14229 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14230 don't need debug info here...
14231 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14232 (gigi): Adjust calls to create_subprog_decl.
14233 (build_raise_check): Likewise.
14234 (establish_gnat_vms_condition_handler): Likewise.
14235 (Compilation_Unit_to_gnu): Likewise.
14236 (gnat_to_gnu): Likewise.
14238 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14240 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14241 (NO_REORDER_ADAFLAGS): New variable.
14242 (EXTRA_GNATTOOLS): Always define.
14243 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14244 Clean up and adjust list of files compiled with special options.
14245 * gcc-interface/Make-lang.in: Likewise.
14246 (ada/decl.o): Cosmetical change.
14247 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14249 2011-04-20 Jim Meyering <meyering@redhat.com>
14251 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14253 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14255 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14256 $(CFLAGS) on the link line.
14258 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14260 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14261 padded type built for the return type if it is unconstrained.
14263 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14265 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14267 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14269 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14270 before calling TREE_CHAIN.
14271 * gcc-interface/misc.c (gnat_init_ts): New function.
14272 (LANG_HOOKS_INIT_TS): Define.
14274 2011-04-12 Martin Jambor <mjambor@suse.cz>
14276 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14277 instead of cgraph_node.
14279 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14281 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14282 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14285 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14287 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14288 of aggregate types that contain a placeholder.
14290 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14292 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14294 (handle_type_generic_attribute): Likewise.
14296 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14299 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14301 2011-04-04 Kai Tietz <ktietz@redhat.com>
14304 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14307 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14309 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14310 type case, do not strip a padding type around the array type.
14312 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14314 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14317 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14319 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14320 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14321 code for -feliminate-unused-debug-types.
14322 (gnat_post_options): Likewise.
14324 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14326 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14327 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14330 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14332 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14333 DECL_ARTIFICIAL flag on enumeration types.
14335 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14338 fat pointer types artificial unconditionally.
14339 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14342 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14344 * gcc-interface/gigi.h (get_dummy_type): Declare.
14345 (build_dummy_unc_pointer_types): Likewise.
14346 (finish_fat_pointer_type): Likewise.
14347 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14348 fat pointer type has been built, complete it in place.
14349 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14350 and thin pointers. Remove useless variable.
14351 (finish_fat_pointer_type): Make global and move to...
14352 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14353 (get_dummy_type): New function.
14354 (build_dummy_unc_pointer_types): Likewise.
14355 (gnat_pushdecl): Propage the name to the anonymous variants only.
14356 (update_pointer_to): Only adjust the pointer types in the unconstrained
14359 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14361 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14362 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14363 if this is a Taft amendment type and the full declaration is available.
14364 * gcc-interface/trans.c (process_type): Likewise.
14365 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14366 (process_freeze_entity): Likewise.
14367 * gcc-interface/utils.c (dummy_global): New static variable.
14368 (gnat_write_global_declarations): If there are types declared as used
14369 at the global level, insert them in the global hash table.
14371 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14373 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14374 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14375 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14377 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14378 flag of the type accordingly.
14379 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14381 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14383 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14384 finalizing types when updating the pointers to the designated type.
14385 <all>: Finalize the deferred types even if we didn't defer processing
14386 of incomplete types in this invocation.
14388 2011-04-01 Olivier Hainque <hainque@adacore.com>
14389 Nicolas Setton <setton@adacore.com>
14390 Eric Botcazou <ebotcazou@adacore.com>
14392 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14393 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14395 2011-03-28 Kai Tietz <ktietz@redhat.com>
14397 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14399 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14400 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14402 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14404 2011-03-28 Tristan Gingold <gingold@adacore.com>
14407 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14408 Use ada output of gnatbind.
14409 (ada/b_gnatb.adb): Ditto.
14410 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14411 (ada.mostlyclean, ada.stage1)
14412 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14413 (ada.stagefeedback): Adjust.
14414 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14415 Use ada output of gnatbind.
14416 (b_gnatm.adb): Ditto.
14417 (b_gnatl.o, b_gnatm.o): New rules.
14419 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14421 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14422 for the padded type built to support a specified size or alignment.
14424 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14426 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14427 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14428 unconditionally to the end of the unit when the designated type is
14430 <all>: Rename local variable. Attempt to un-defer types only and do it
14431 for limited_with'ed types as well.
14432 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14433 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14434 consistently and remove redundant call to finalize_from_with_types.
14436 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14438 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14439 subprograms without a previous spec declared in the same unit.
14440 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14441 subprograms at the end of the unit instead of at the beginning.
14442 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14443 isn't public for the special handling of non-inline functions nested
14444 inside inline external functions.
14446 2011-03-25 Jeff Law <law@redhat.com>
14448 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14450 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14452 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14453 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14454 to compute Set_Size_Depends_On_Discriminant.
14455 (Layout_Type): Call it on array types in back-end layout mode.
14456 * sem_util.adb (Requires_Transient_Scope): Return true for array
14457 types only if the size depends on the value of discriminants.
14458 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14459 type if the RHS is a call to a function that returns an unconstrained
14460 type with default discriminant.
14462 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14464 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14465 non-conversion to the nominal result type at the end.
14467 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14469 * gcc-interface/trans.c (create_temporary): New function taken from...
14470 (create_init_temporary): ...here. Call it.
14471 (call_to_gnu): Create the temporary for the return value early, if any.
14472 Create it for a function with copy-in/copy-out parameters if there is
14473 no target; in other cases of copy-in/copy-out, use another temporary.
14474 Push the new binding level lazily. Add and rename local variables.
14476 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14478 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14480 (set_rm_size): Likewise.
14482 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14484 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14485 for the padded type built in order to support a specified alignment.
14486 Fix incorrect formatting.
14488 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14491 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14493 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14495 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14496 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14497 to the end of the list. Adjust recursive call. Rename local variable.
14498 If REORDER is true, reorder components of the record type.
14499 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14500 components_to_record and adjust the parameter list.
14502 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14504 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14505 disabled, use the variable for bounds of loop iteration scheme.
14507 2011-03-21 Kai Tietz <ktietz@redhat.com>
14510 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14512 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14514 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14515 out whether the expression is read-only. Short-circuit placeholder
14516 case and rename a couple of local variables.
14518 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14520 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14521 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14522 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14523 (convert): Deal with conversions from a smaller form type specially.
14525 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14527 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14528 its argument, except for the special -I- switch.
14530 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14532 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14535 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14537 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14539 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14541 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14543 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14544 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14545 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14546 Do not generate the check directly, instead instantiate the template
14547 check present in the descriptor.
14548 (make_descriptor_field): Move around.
14549 (build_vms_descriptor32): Build a template check in the POINTER field.
14550 (build_vms_descriptor): Remove useless suffixes.
14551 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14553 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14556 * targext.c: Include target files if IN_RTS is defined.
14558 2011-01-26 Richard Guenther <rguenther@suse.de>
14561 * targext.c: Include config.h.
14562 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14565 2011-01-04 Pascal Obry <obry@adacore.com>
14566 Eric Botcazou <ebotcazou@adacore.com>
14568 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14570 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14572 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14573 end-of-case on the end label and its associated gotos, if any.
14575 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14577 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14578 expressions of the parameter cache within the statement group of
14579 the CICO mechanism.
14581 2011-01-04 Olivier Hainque <hainque@adacore.com>
14582 Eric Botcazou <ebotcazou@adacore.com>
14584 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14585 (set_end_locus_from_node): New function.
14586 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14587 make and the function end_locus.
14588 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14589 for the elaboration subprogram.
14590 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14591 set the end_locus of the expression as well.
14593 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14596 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14597 variables that are referenced in exception handlers volatile.
14601 Copyright (C) 2011 Free Software Foundation, Inc.
14603 Copying and distribution of this file, with or without modification,
14604 are permitted in any medium without royalty provided the copyright
14605 notice and this notice are preserved.
14607 * gnat_rm.texi: Ramification of pragma Eliminate documentation
14608 - fix bugs in the description of Source_Trace;
14609 - get rid of UNIT_NAME;
14611 2011-08-02 Javier Miranda <miranda@adacore.com>
14614 (Build_Dispatching_Requeue): Adding support for VM targets
14615 since we cannot directly reference the Tag entity.
14616 * exp_sel.adb (Build_K): Adding support for VM targets.
14617 (Build_S_Assignment): Adding support for VM targets.
14619 (Default_Prim_Op_Position): In VM targets do not restrict availability
14620 of predefined interface primitives to compiling in Ada 2005 mode.
14621 (Is_Predefined_Interface_Primitive): In VM targets this service is not
14622 restricted to compiling in Ada 2005 mode.
14623 (Make_VM_TSD): Generate code that declares and initializes the OSD
14624 record. Needed to support dispatching calls through synchronized
14627 (Make_Predefined_Primitive_Specs): Enable generation of predefined
14628 primitives associated with synchronized interfaces.
14629 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14630 primitives associated with synchronized interfaces.
14632 2011-08-02 Yannick Moy <moy@adacore.com>
14634 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14635 statements hidden in SPARK if preceded by the HIDE directive
14636 (Parse_Exception_Handlers): mark each exception handler in a sequence of
14637 exception handlers as hidden in SPARK if preceded by the HIDE directive
14638 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14639 if starting with the HIDE directive
14640 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14641 starting with the HIDE directive; mark the declarations in a private
14642 part as hidden in SPARK if the private part starts with the HIDE
14644 * restrict.adb, restrict.ads
14645 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14646 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14647 argument node belongs to a part which is hidden in SPARK
14648 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14649 parts in SPARK; protect the possibly costly call to
14650 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14651 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14652 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14653 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14655 (Scan): recognize special comment starting with '#' and followed by
14656 SPARK keyword "hide" as a HIDE directive.
14658 2011-08-02 Yannick Moy <moy@adacore.com>
14660 * types.ads, erroutc.ads: Minor reformatting.
14662 2011-08-02 Vincent Celier <celier@adacore.com>
14664 * link.c: Add response file support for cross platforms.
14666 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14668 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14669 in an association, set parent field of copy before partial analysis.
14670 * sem_res.adb (Resolve_Slice): create reference to itype only when
14671 expansion is enabled.
14673 2011-08-02 Yannick Moy <moy@adacore.com>
14675 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14676 for new flag denoting which subprogram bodies are in ALFA
14677 * restrict.adb, sem_ch7.adb: Update comment
14678 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14679 sem_ch9.adb, sem_res.adb: Add calls to
14680 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14681 * sem_ch6.adb (Analyze_Function_Return): add calls to
14682 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14683 middle of the body, and extended return.
14684 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14685 False when missing return.
14686 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14687 to True for subprograms whose spec is in ALFA. Remove later on the flag
14688 on the entity used for a subprogram body when there exists a separate
14690 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14691 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14692 False, otherwise do nothing.
14694 2011-08-02 Robert Dewar <dewar@adacore.com>
14696 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14698 2011-08-02 Yannick Moy <moy@adacore.com>
14700 * sem_ch4.ads: minor formatting.
14702 2011-08-02 Yannick Moy <moy@adacore.com>
14704 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14705 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14706 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14707 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14708 opt.ads: cleanup of SPARK mode
14710 2011-08-02 Yannick Moy <moy@adacore.com>
14712 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14714 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14715 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14717 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14718 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14719 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14720 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14722 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14724 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14725 functions whose return type is not in ALFA.
14726 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14728 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14729 parameter's type is not in ALFA.
14730 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14733 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14735 * sem_ch6 (Analyze_Expression_Function): treat the function as
14736 Inline_Always, and introduce a subprogram declaration for it when it is
14738 * inline.adb (Add_Inlined_Body): recognize bodies that come from
14739 expression functions, so that the back-end can determine whether they
14740 can in fact be inlined.
14741 * sem_util.adb (Is_Expression_Function): predicate to determine whether
14742 a function body comes from an expression function.
14744 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14746 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14747 null exclusions to test Can_Never_Be_Null on the anonymous access types
14748 of the formals rather than testing the formals themselves. Exclude this
14749 check in cases where the Old_Formal is marked as a controlling formal,
14750 to avoid issuing spurious errors for bodies completing dispatching
14751 operations (due to the flag not getting set on controlling access
14752 formals in body specs).
14753 (Find_Corresponding_Spec): When checking full and subtype conformance of
14754 subprogram bodies in instances, pass Designated and E in that order, for
14755 consistency with the expected order of the formals (New_Id followed by
14758 2011-08-02 Robert Dewar <dewar@adacore.com>
14760 * sem_ch8.adb: Minor reformatting.
14762 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14764 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14765 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14766 primitive operations of class-wide actuals.
14768 2011-08-02 Javier Miranda <miranda@adacore.com>
14770 * exp_atag.ads, exp_atag.adb
14771 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14772 since its value is implicitly passed in argument Typ.
14773 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14774 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14775 Build_Common_Dispatching_Select_Statements.
14777 2011-08-02 Robert Dewar <dewar@adacore.com>
14779 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14780 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14781 Minor reformatting.
14783 2011-08-02 Robert Dewar <dewar@adacore.com>
14785 * sem_res.adb: Minor reformatting.
14786 * sem_prag.adb: Minor reformatting.
14788 2011-08-02 Javier Miranda <miranda@adacore.com>
14790 * exp_atag.adb, exp_atags.ads
14791 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14792 by the tagged type Entity. Required to use this routine in the VM
14793 targets since we do not have available the Tag entity in the VM
14796 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14797 Ada.Tags has not been previously loaded.
14799 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14800 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14802 (Enclosing_Dynamic_Scope): Add missing support to handle the full
14803 view of enclosing scopes. Required to handle enclosing scopes that
14804 are synchronized types whose full view is a task type.
14806 (Build_VM_TSDs): Minor code improvement to avoid generating and
14807 analyzing lists with empty nodes.
14808 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14809 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14810 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14811 (Make_Disp_Timed_Select_Body): Add support for VM targets.
14812 (Make_Select_Specific_Data_Table): Add support for VM targets.
14813 (Make_VM_TSD): Generate code to initialize the SSD structure of
14816 2011-08-02 Yannick Moy <moy@adacore.com>
14818 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14819 cross-references section in ALI.
14820 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14821 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14823 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
14824 subprogram or package entity of a node
14825 (Is_Local_Reference_Type): new function returns True for references
14826 selected in local cross-references.
14827 (Lt): function extracted from Lt in Output_References
14828 (Write_Entity_Name): function extracted from Output_References
14829 (Generate_Definition): generate reference with type 'D' for definition
14830 of objects (object declaration and parameter specification), with
14831 appropriate locations and units, for use in local cross-references.
14832 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
14833 references of type 'I' for initialization in object definition.
14834 (Output_References): move part of function Lt and procedure
14835 Write_Entity_Name outside of the body. Ignore references of types 'D'
14836 and 'I' introduced for local cross-references.
14837 (Output_Local_References): new procedure to output the local
14838 cross-references sections.
14839 (Lref_Entity_Status): new array defining whether an entity is a local
14840 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
14841 with 'I' type when initialization expression is present.
14842 * get_scos.adb, get_scos.ads: Correct comments and typos
14844 2011-08-02 Javier Miranda <miranda@adacore.com>
14846 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
14848 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
14850 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
14853 2011-08-02 Vincent Celier <celier@adacore.com>
14855 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
14856 (No_Space_Img): New function
14857 (Find_Excluded_Sources): When reading from a file, record the file name
14858 and the line number for each excluded source.
14859 (Mark_Excluded_Sources): When reporting an error, if the excluded
14860 sources were read from a file, include file name and line number in
14863 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14865 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
14867 2011-08-02 Robert Dewar <dewar@adacore.com>
14869 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
14871 2011-08-02 Javier Miranda <miranda@adacore.com>
14873 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
14874 generation of TSDs to the DOTNET compiler.
14875 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
14876 generation of TSDs to the DOTNET compiler.
14878 2011-08-02 Javier Miranda <miranda@adacore.com>
14880 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
14881 record of all the tagged types declared inside library level package
14882 declarations, library level package bodies or library level subprograms.
14883 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
14884 associated with a given tagged type.
14885 (Build_VM_TSDs): New subprogram.
14886 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
14887 compilation units that are subprograms.
14888 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
14889 compilation units that are package bodies.
14890 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
14891 units that are a package declaration or a package instantiation.
14892 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
14893 reorganization to improve the error generated by the frontend when the
14894 function Ada.Tags.Secondary_Tag is not available.
14895 * rtsfind.ads (RE_Register_TSD): New runtime entity.
14896 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
14898 2011-08-02 Javier Miranda <miranda@adacore.com>
14900 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
14902 2011-08-02 Robert Dewar <dewar@adacore.com>
14904 * s-imenne.ads: Minor reformatting.
14906 2011-08-02 Robert Dewar <dewar@adacore.com>
14908 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
14909 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
14910 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
14912 2011-08-02 Robert Dewar <dewar@adacore.com>
14914 * einfo.ads (Materialize_Entity): Document this is only for renamings
14915 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
14916 required debug information in the case where we transform the object
14917 declaration into a renaming declaration.
14918 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
14920 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
14921 Materialize_Entity.
14923 2011-08-02 Robert Dewar <dewar@adacore.com>
14925 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
14926 Suppress_Init_Procs.
14927 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
14928 Suppress_Initialization/Initialization_Suppressed.
14929 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
14930 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
14931 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
14932 * sem_prag.adb: New processing for pragma Suppress_Initialization.
14934 2011-08-02 Robert Dewar <dewar@adacore.com>
14936 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
14937 Minor reformatting.
14939 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14941 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
14942 only have inheritable classwide pre/postconditions.
14944 2011-08-02 Javier Miranda <miranda@adacore.com>
14946 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
14947 * rtsfind.ads (RE_Check_TSD): New runtime entity.
14948 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
14949 checks if the external tag of a type is the same as the external tag
14950 of some other declaration.
14952 2011-08-02 Thomas Quinot <quinot@adacore.com>
14954 * s-taskin.ads: Minor reformatting.
14956 2011-08-02 Emmanuel Briot <briot@adacore.com>
14958 * g-comlin.adb (Display_Help): swap the order in which it prints the
14959 short help and the general usage.
14961 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14963 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14964 the aspect declarations and attach them to the generic copy for
14965 subsequent analysis.
14966 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14967 declarations of the generic tree to the new subprogram declarations.
14968 * sem_attr.adb (Check_Precondition_Postcondition): recognize
14969 conditions that apply to a subprogram instance.
14971 2011-08-02 Robert Dewar <dewar@adacore.com>
14973 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14975 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14977 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14978 private type with a tagged full view is not derived in the immediate
14979 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14981 2011-08-02 Robert Dewar <dewar@adacore.com>
14983 * exp_ch4.adb: Minor reformatting.
14985 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14987 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
14988 Ada2012 iterator, the loop will be rewritten during expansion into a
14989 while loop with a cursor and an element declaration. Do not analyze the
14990 body in this case, because if the container is for indefinite types the
14991 actual subtype of the elements will only be determined when the cursor
14992 declaration is analyzed.
14994 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14996 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14997 size/alignment related attributes in CodePeer_Mode.
14999 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15001 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
15002 Prepend_Element, since this can result in the operation getting the
15003 wrong slot in the full type's dispatch table if the full type has
15004 inherited operations. The incomplete type's operation will get added
15005 to the proper position in the full type's primitives
15006 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
15007 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
15008 dispatching operations, since there are cases where nonprimitive
15009 subprograms can get added to the list of incomplete dependents (such
15010 as subprograms in nested packages).
15011 * sem_ch6.adb (Process_Formals): First, remove test for being in a
15012 private part when determining whether to add a primitive with a
15013 parameter of a tagged incomplete type to the Private_Dependents list.
15014 Such primitives can also occur in the visible part, and should not have
15015 been excluded from being private dependents.
15016 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
15017 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
15018 list of a Taft-amendment incomplete type is a primitive before issuing
15019 an error that the full type must appear in the same unit. There are
15020 cases where nonprimitives can be in the list (such as subprograms in
15022 * sem_disp.adb (Derives_From): Use correct condition for checking that
15023 a formal's type is derived from the type of the corresponding formal in
15024 the parent subprogram (the condition was completely wrong). Add
15025 checking that was missing for controlling result types being derived
15026 from the result type of the parent operation.
15028 2011-08-02 Yannick Moy <moy@adacore.com>
15030 * errout.adb (First_Node): minor renaming
15031 * restrict.adb (Check_Formal_Restriction): put restriction warning on
15034 2011-08-02 Yannick Moy <moy@adacore.com>
15036 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
15037 before accessing operands.
15038 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
15039 decide whether an initialization expression respects SPARK rules, as
15040 the plain node is the expanded one. This allows for more valid warnings
15042 * gnat_rm.texi: Minor update.
15044 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15046 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
15049 2011-08-02 Robert Dewar <dewar@adacore.com>
15051 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
15053 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15055 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
15056 loop statements and the element renaming declaration with a block when
15057 the element type is controlled.
15059 2011-08-02 Yannick Moy <moy@adacore.com>
15061 * sinfo.ads: Minor formatting.
15063 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15065 * sem_aggr.adb (Add_Association): if the association has a box and no
15066 expression, use the Sloc of the aggregate itself for the new
15068 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
15071 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15073 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
15074 When a container is provided via a function call, generate a renaming
15075 of the function result. This avoids the creation of a transient scope
15076 and the premature finalization of the container.
15077 * exp_ch7.adb (Is_Container_Cursor): Removed.
15078 (Wrap_Transient_Declaration): Remove the supression of the finalization
15079 of the list controller when the declaration denotes a container cursor,
15082 2011-08-02 Yannick Moy <moy@adacore.com>
15084 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
15085 node is from source, instead of the original node being from source.
15087 (Resolve_Array_Aggregate): refine the check for a static expression, to
15088 recognize also static ranges
15089 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
15090 Array_Type_Declaration): postpone the test for the type being a subtype
15091 mark after the type has been resolved, so that component-selection and
15092 expanded-name are discriminated.
15093 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
15094 to distinguish the case of an iteration scheme, so that an error is
15095 issed on a non-static range in SPARK except in an iteration scheme.
15096 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
15097 In_Iter_Schm = True.
15098 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
15099 user-defined operators so that they are allowed in renaming
15101 (Find_Selected_Component): refine the check for prefixing of operators
15102 so that they are allowed in renaming. Move the checks for restrictions
15103 on selector name after analysis discriminated between
15104 component-selection and expanded-name.
15105 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
15106 concatenation argument of string type if it is static.
15107 * sem_util.adb, sem_util.ads
15108 (Check_Later_Vs_Basic_Declarations): add a new function
15109 Is_Later_Declarative_Item to decice which declarations are allowed as
15110 later items, in the two different modes Ada 83 and SPARK. In the SPARK
15111 mode, add that renamings are considered as later items.
15112 (Enclosing_Package): new function to return the enclosing package
15113 (Enter_Name): correct the rule for homonyms in SPARK
15114 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
15115 from source (result of expansion) to avoid issuing wrong warnings.
15117 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15119 * errout.adb: On anything but an expression First_Node returns its
15122 2011-08-02 Pascal Obry <obry@adacore.com>
15124 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
15126 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15128 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
15129 Set the associated loop as the related expression of internally
15131 * exp_ch7.adb (Is_Container_Cursor): New routine.
15132 (Wrap_Transient_Declaration): Supress the finalization of the list
15133 controller when the declaration denotes a container cursor.
15135 2011-08-02 Yannick Moy <moy@adacore.com>
15137 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
15139 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
15140 expression is a simple expression. This check cannot be performed in
15141 the semantics, so just drop it.
15142 (P_Index_Or_Discriminant_Constraint): move check that the index or
15143 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
15144 semantics. Other cases were previously checked in the semantics.
15145 * par-ch4.adb (P_Name): move checks that a selector name is not
15146 character literal or an operator symbol to Find_Selected_Component in
15148 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
15149 declarations are not placed after later declarations in a separate
15150 procedure in Sem_Util (possibly not the best choice?), to be used both
15151 during parsing, for Ada 83 mode, and during semantic analysis, for
15153 * par-endh.adb (Check_End): move check that end label is not missing
15154 to Process_End_Label in the semantics
15155 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
15156 the special case for SPARK restriction
15157 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
15158 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
15159 parameter Force to issue the error message even on internal node (used
15160 for generated end label). Call Check_Restriction to check when an error
15161 must be issued. In SPARK mode, issue an error message even if the
15162 restriction is not set.
15163 (Check_Restriction): new procedure with an additional out parameter to
15164 inform the caller that a message has been issued
15165 * sem_aggr.adb: Minor modification of message
15166 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
15167 instead of issuing an error message directly
15168 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
15169 declarations are not placed after later declarations, by calling
15170 Check_Later_Vs_Basic_Declarations
15171 (Analyze_Subtype_Declaration): move here the check that an index or
15172 discriminant constraint must be a subtype mark. Change the check that
15173 a subtype of String must start at one so that it works on subtype marks.
15174 * sem_ch4.adb (Analyze_Call): move here the check that a named
15175 association cannot follow a positional one in a call
15176 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
15177 instead of issuing an error message directly
15178 * sem_ch8.adb (Find_Selected_Component): move here the check that a
15179 selector name is not a character literal or an operator symbol. Move
15180 here the check that the prefix of an expanded name cannot be a
15181 subprogram or a loop statement.
15182 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
15183 procedure called from parsing and semantics to check that basic
15184 declarations are not placed after later declarations
15185 (Process_End_Label): move here the check that end label is not missing
15187 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15189 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
15190 representation clause in codepeer mode, since it confuses CodePeer and
15191 does not bring useful info.
15193 2011-08-02 Ed Falis <falis@adacore.com>
15195 * init.c: initialize fp hw on MILS.
15197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15199 * errout.adb (First_Node): for bodies, return the node itself (small
15200 optimization). For other nodes, do not check source_unit if the node
15201 comes from Standard.
15203 2011-08-02 Robert Dewar <dewar@adacore.com>
15205 * exp_ch3.adb: Minor comment additions.
15206 * sem_ch13.adb: Minor reformatting.
15208 2011-08-02 Pascal Obry <obry@adacore.com>
15210 * make.adb, makeutl.adb: Removes some superfluous directory separator.
15212 2011-08-02 Robert Dewar <dewar@adacore.com>
15214 * sem_attr.adb: Minor reformatting.
15216 2011-08-02 Robert Dewar <dewar@adacore.com>
15218 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15219 (Has_Default_Component_Value): Removed
15220 * einfo.ads Comment updates
15221 (Has_Default_Aspect): Replaces Has_Default_Value
15222 (Has_Default_Component_Value): Removed
15224 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15226 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15227 (Get_Simple_Init_Val): Handle Default_Value aspect
15228 (Needs_Simple_Initialization): Handle Default_Value aspect
15229 * exp_ch3.ads: Needs_Simple_Initialization
15230 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15231 * par-prag.adb (Pragma_Default[_Component]Value) Removed
15233 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15234 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15235 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15237 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15239 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15240 package containing iteration primitives.
15241 exp_ch5.adb (Expand_Iterator_Loop): ditto.
15243 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15245 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15246 "of", pre-analyze expression in case it is a function call with
15247 finalization actions that must be placed ahead of the loop.
15248 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15249 on an Ada2012 iterator, insert them ahead of the rewritten loop.
15251 2011-08-02 Geert Bosch <bosch@adacore.com>
15253 * cstand.adb (Create_Float_Types): Only consider C's long double for
15254 Long_Long_Float, in addition to double.
15256 2011-08-02 Robert Dewar <dewar@adacore.com>
15258 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15259 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15260 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15261 Minor reformatting.
15263 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15265 * sem_attr.adb: handle properly 'Result when it is a prefix of an
15268 2011-08-02 Javier Miranda <miranda@adacore.com>
15270 * einfo.ads, einfo.adb
15271 (Original_Access_Type): Move this attribute to Node26 since there was
15272 an undocumented use of Node21 in E_Access_Subprogram_Type entities
15273 which causes conflicts and breaks the generation of the .NET compiler.
15274 (Interface_Name): Add missing documentation on JGNAT only uses of
15277 2011-08-02 Geert Bosch <bosch@adacore.com>
15279 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15280 (Find_Back_End_Float_Type): Likewise
15281 (Create_Back_End_Float_Types): Likewise
15282 (Create_Float_Types): Likewise
15283 (Register_Float_Type): Likewise
15284 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15285 Nlist and split out type selection in new local Find_Base_Type function.
15286 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15288 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15290 2011-08-02 Robert Dewar <dewar@adacore.com>
15292 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15294 * opt.ads: Minor comment change.
15295 * sem_ch12.adb: Minor code reorganization.
15297 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15299 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15300 subtype's list of rep items to the list on the full subtype in the case
15301 where the lists are the same.
15303 2011-08-02 Geert Bosch <bosch@adacore.com>
15305 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15306 using the one from System.Strings, which also deallocates all strings.
15308 2011-08-02 Geert Bosch <bosch@adacore.com>
15310 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15312 * gcc-interface/Make-lang.in: Update dependencies.
15314 2011-08-02 Olivier Hainque <hainque@adacore.com>
15316 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15319 2011-08-02 Javier Miranda <miranda@adacore.com>
15321 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15322 associated with anonymous access to subprograms.
15324 2011-08-02 Geert Bosch <bosch@adacore.com>
15327 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15328 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15329 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15330 (Add_Symbol_Definition): Move to switch-c.adb
15331 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15332 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15333 (Add_Symbol_Definition): Move to switch-c.adb.
15334 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15336 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15337 Move to warnsw.adb.
15338 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15339 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15340 Move to warnsw.adb.
15341 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15342 (Add_Symbol_Definition): Moved from Prepcomp.
15343 * switch-c.ads: Update copyright notice. Use String_List instead of
15344 Argument_List, removing dependency on System.OS_Lib.
15346 2011-08-02 Yannick Moy <moy@adacore.com>
15348 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15349 mode on initialization expression which does not respect SPARK
15351 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15352 if the tree referenced by its argument represents an initialization
15353 expression in SPARK, suitable for initializing an object in an object
15356 2011-08-02 Javier Miranda <miranda@adacore.com>
15358 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15359 internally generated access to subprogram with its associated protected
15361 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15363 2011-08-02 Geert Bosch <bosch@adacore.com>
15365 * cstand.adb (Register_Float_Type): Print information about type to
15366 register, if the Debug_Flag_Dot_B is set.
15367 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15368 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15369 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15370 with a requested precision of more than Max_Digits digits and no more
15371 than Max_Base_Digits digits, if a range specification is present and the
15372 Predefined_Float_Types list has a suitable type to derive from.
15373 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15374 case of type completion with pragma Import
15376 (Process_Import_Predefined_Type): Processing to complete a type
15377 with pragma Import. Currently supports floating point types only.
15378 (Set_Convention_From_Pragma): Do nothing without underlying type.
15379 (Process_Convention): Guard against absence of underlying type,
15380 which may happen when importing incomplete types.
15381 (Process_Import_Or_Interface): Handle case of importing predefined
15382 types. Tweak error message.
15384 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15386 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15387 functions to previous change. Reorganize code slightly.
15389 2011-08-02 Geert Bosch <bosch@adacore.com>
15391 * back_end.ads (Register_Type_Proc): New call back procedure type for
15392 allowing the back end to provide information about available types.
15393 (Register_Back_End_Types): New procedure to register back end types.
15394 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15396 * cstand.adb (Back_End_Float_Types): New list for floating point types
15397 supported by the back end.
15398 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15399 (Copy_Float_Type): New procedure to make new copies of predefined types.
15400 (Register_Float_Type): New call back procedure to populate the BEFT list
15401 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15402 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15403 (Create_Float_Types): New procedure to create entities for floating
15404 point types predefined in Standard, and put these and any remaining
15405 BEFTs on the Predefined_Float_Types list.
15406 * stand.ads (Predefined_Float_Types): New list for predefined floating
15407 point types that do not have declarations in package Standard.
15409 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15411 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
15412 entity node for the unit containing the parameter.
15413 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15414 (Add_Inlined_Subprogram): Likewise.
15415 * gcc-interface/Make-lang.in: Update dependencies.
15417 2011-08-02 Thomas Quinot <quinot@adacore.com>
15419 * s-stusta.adb (Print): Make sure Pos is always initialized to a
15422 2011-08-02 Geert Bosch <bosch@adacore.com>
15424 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15426 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15428 * sem_type.adb (Covers): Move trivial case to the top and reuse the
15429 computed value of Base_Type.
15431 2011-08-02 Yannick Moy <moy@adacore.com>
15433 * restrict.adb (Check_Restriction): issue an error for any use of
15434 class-wide, even if the No_Dispatch restriction is not set.
15435 * sem_aggr.adb: Correct typos in comments and messages in formal mode
15436 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15437 when completing a private extension, the type named in the private part
15438 is not the same as that named in the visible part.
15439 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15440 of an inherited primitive operations of a tagged type or type extension
15441 that returns the tagged type.
15442 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15443 function which returns True for an implicit operation inherited by the
15444 derived type declaration for the argument type.
15445 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15448 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15450 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15451 Process_Bounds, to perform analysis with expansion of a range or an
15452 expression that is the iteration scheme for a loop.
15453 (Analyze_Iterator_Specification): If domain of iteration is given by a
15454 function call with a controlled result, as is the case if call returns
15455 a predefined container, ensure that finalization actions are properly
15457 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15459 2011-08-02 Javier Miranda <miranda@adacore.com>
15461 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15462 * gcc-interface/Make-lang.in: Update dependencies.
15464 2011-08-02 Javier Miranda <miranda@adacore.com>
15466 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15467 determine if the analysis is performed using N or Original_Node (N).
15468 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15469 functionality of routine Is_Variable avoids code duplication.
15470 * checks.adb (Determine_Range): Handle temporaries generated by
15471 Remove_Side_Effects.
15473 2011-08-02 Javier Miranda <miranda@adacore.com>
15475 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15476 expansion of the condition. Required since the previous analysis was
15477 done with expansion disabled (see Resolve_Quantified_Expression) and
15478 hence checks were not inserted and record comparisons have not been
15481 2011-08-02 Ed Falis <falis@adacore.com>
15483 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15486 2011-08-02 Bob Duff <duff@adacore.com>
15488 * opt.ads: Minor comment fix.
15490 2011-08-02 Bob Duff <duff@adacore.com>
15492 * sem_ch12.adb (Analyze_Package_Instantiation,
15493 Analyze_Subprogram_Instantiation): Turn off style checking while
15494 analyzing an instance. Whatever style checks that apply to the generic
15495 unit should apply, so it makes no sense to apply them in an instance.
15496 This was causing trouble when compiling an instance of a runtime
15497 unit that violates the -gnatyO switch.
15498 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15499 one of the two case statements, causing spurious errors.
15501 2011-08-02 Robert Dewar <dewar@adacore.com>
15503 * uname.adb: Minor reformatting.
15504 * gnatcmd.adb: Minor reformatting.
15505 * exp_attr.adb: Minor reformatting.
15507 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15509 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15510 No_Dispatching_Calls, do not look for the Assign primitive, because
15511 predefined primitives are not created in this case.
15513 2011-08-02 Bob Duff <duff@adacore.com>
15515 * stylesw.ads: Minor comment fixes.
15517 2011-08-02 Robert Dewar <dewar@adacore.com>
15519 * freeze.adb (Add_To_Result): New procedure.
15521 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15523 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15524 time, if the specific run-time routines for handling streams of strings
15525 are not available, use the default mechanism.
15527 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15529 * s-regpat.ads: Fix typo.
15531 2011-08-02 Vincent Celier <celier@adacore.com>
15533 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15534 not null, call it to create the in memory config project file without
15535 parsing an existing default config project file.
15537 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15539 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15541 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15543 * sem_elim.adb: an abstract subprogram does not need an eliminate
15544 pragma for its descendant to be eliminable.
15546 2011-08-02 Ed Falis <falis@adacore.com>
15548 * init.c: revert to handling before previous checkin for VxWorks
15549 * s-intman-vxworks.adb: delete unnecessary declarations related to
15550 using Ada interrupt facilities for handling signals.
15551 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15552 * s-intman-vxworks.ads: Import __gnat_install_handler as
15553 Initialize_Interrupts.
15554 * s-taprop-vxworks.adb: Delete Signal_Mask.
15555 (Abort_Handler): change construction of mask to unblock exception
15558 2011-08-02 Jerome Guitton <guitton@adacore.com>
15560 * a-except-2005.adb (Raise_From_Signal_Handler): Call
15561 Debug_Raise_Exception before propagation starts.
15563 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15565 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15566 to Restriction_Check_Required.
15567 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15568 * sem_res.adb (Resolve_Call): Likewise.
15569 * sem_attr.adb (Check_Stream_Attribute): Likewise.
15571 2011-08-02 Bob Duff <duff@adacore.com>
15573 * stylesw.ads: Update comment.
15574 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15575 * errout.ads: Remove obsolete comment.
15577 2011-08-02 Javier Miranda <miranda@adacore.com>
15579 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15580 (Set_Is_Safe_To_Reevaluate): new procedure.
15581 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15582 assignment is allowed on safe-to-reevaluate variables.
15583 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15584 temporary created to remove side effects in expressions that use
15585 the secondary stack as safe-to-reevaluate.
15586 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15587 variables that are not true constants.
15589 2011-08-02 Robert Dewar <dewar@adacore.com>
15591 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15592 sem_res.adb, sem_ch6.adb: Minor reformatting.
15594 2011-08-02 Jerome Guitton <guitton@adacore.com>
15596 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15598 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15600 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15601 not set Overridden_Operation if subprogram is an initialization
15604 2011-08-02 Yannick Moy <moy@adacore.com>
15606 * par-ch6.adb: Correct obsolete name in comments
15607 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15608 which takes two message arguments (existing function takes one), with
15609 second message used for continuation.
15610 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15611 block statements that originate from a source block statement, not
15612 generated block statements
15613 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15614 symmetry with procedure case
15615 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15616 function to issue an error in formal mode if a package specification
15617 contains more than one tagged type or type extension.
15618 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15619 parameters matching formals of tagged types are objects (or ancestor
15620 type conversions of objects), not general expressions. Issue an error
15621 on view conversions that are not involving ancestor conversion of an
15623 (Resolve_Type_Conversion): in formal mode, issue an error on the
15624 operand of an ancestor type conversion which is not an object
15625 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15626 procedure so that it works also for actuals of function calls
15627 (Is_Actual_Tagged_Parameter): new function which determines if its
15628 argument is an actual parameter of a formal of tagged type in a
15630 (Is_SPARK_Object_Reference): new function which determines if the tree
15631 referenced by its argument represents an object in SPARK
15633 2011-08-02 Robert Dewar <dewar@adacore.com>
15635 * sem_ch3.adb: Minor reformatting
15636 Minor comment addition
15637 Minor error msg text change
15639 2011-08-02 Javier Miranda <miranda@adacore.com>
15641 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15642 function. Used to be more precise when we generate a variable plus one
15643 assignment to remove side effects in the evaluation of the Bound
15645 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15646 of the bound expression to force its re-analysis and thus expand the
15647 associated transient scope (if required). Code cleanup replacing the
15648 previous code that declared the constant entity by an invocation to
15649 routine Force_Evaluation which centralizes this work in the frontend.
15651 2011-08-02 Robert Dewar <dewar@adacore.com>
15653 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15654 (Base_Type): Now uses improved Is_Base_Type function
15655 * einfo.ads (Base_Type): Inline this function
15657 2011-08-02 Robert Dewar <dewar@adacore.com>
15659 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15660 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15662 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15664 * gcc-interface/Make-lang.in: Update dependencies.
15665 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15668 2011-08-02 Yannick Moy <moy@adacore.com>
15670 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15671 non-simple expression used in delta constraint
15672 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15673 index constraint which is not a subtype mark
15674 * par.adb: With and use Restrict
15675 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15676 mode on component type which is not a subtype mark and default
15677 expression on component
15678 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15679 of string which does not have a lower index bound equal to 1
15680 (Array_Type_Declaration): issue an error in formal mode on index or
15681 component type which is not a subtype mark, and on aliased keyword on
15683 (Derived_Type_Declaration): issue an error in formal mode on interface,
15684 limited or abstract type
15685 (Record_Type_Declaration): issue an error in formal mode on interface
15686 (Record_Type_Definition): issue an error in formal mode on tagged types
15687 and type extensions not declared in the specification of a library unit
15688 package; on null non-tagged record; on variant part
15690 2011-08-02 Vincent Celier <celier@adacore.com>
15692 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15693 not declared for qualified library project when Library_Name is not
15694 declared, but Library_Dir is.
15696 2011-08-02 Robert Dewar <dewar@adacore.com>
15698 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15699 pragmas (affects aspects [Component_]Default_Value
15700 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15701 component type for the resolution
15703 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15705 * einfo.adb (Base_Type): Tune implementation for speed.
15707 2011-08-02 Robert Dewar <dewar@adacore.com>
15709 * freeze.adb: Minor reformatting.
15711 2011-08-02 Thomas Quinot <quinot@adacore.com>
15713 * scos.ads: Update comments.
15715 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15717 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15718 base type, because the parent may be a subtype of a private type whose
15719 convention is established in a private part.
15721 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15723 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15724 statement in a block when the expansion of the return expression has
15725 created a finalization chain.
15726 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15727 with the parent node.
15728 Add N_Extended_Return_Statement to handle the case where a transient
15729 object declaration appears in the Return_Object_Declarations list of
15730 an extended return statement.
15732 2011-08-02 Matthew Gingell <gingell@adacore.com>
15734 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15735 unused parameter 'name'.
15737 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15739 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15740 inherited operation, check whether its alias, which is the source
15741 operastion that it renames, has been marked eliminated.
15743 2011-08-02 Javier Miranda <miranda@adacore.com>
15745 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15746 in-mode parameter whose type is an access type since it can be used to
15747 modify its designated object. Enforce code that handles as safe an
15748 access type that is not access-to-constant but it is the result of a
15749 previous removal of side-effects.
15750 (Remove_Side_Effects): Minor code reorganization of cases which require
15751 no action. Done to incorporate documentation on new cases uncovered
15752 working in this ticket: no action needed if this routine was invoked
15753 too early and the nodes are not yet decorated.
15754 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15755 to routine Remove_Side_Effects by calls to Force_Evaluation since they
15756 were issued with actuals that are implicitly provided by
15759 2011-08-02 Robert Dewar <dewar@adacore.com>
15761 * sem_ch3.adb, sem_res.adb: Minor reformatting.
15763 2011-08-02 Yannick Moy <moy@adacore.com>
15765 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15766 to issue an error in formal mode on attribute not supported in this mode
15767 (Analyze_Attribute): issue errors on standard attributes not supported
15769 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15770 comment, and issue error in formal mode on modulus which is not a power
15772 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15774 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15776 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15777 operator on modular type (except 'not').
15779 2011-08-02 Robert Dewar <dewar@adacore.com>
15781 * gnat_rm.texi: Minor reformatting.
15783 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15785 * s-osinte-linux.ads: Minor comment update and reformatting.
15786 * i-cexten.ads: Make this unit pure, as for its parent.
15787 Will allow its usage in more contexts if needed.
15789 2011-08-02 Robert Dewar <dewar@adacore.com>
15791 * s-utf_32.ads: Minor comment fix.
15793 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15795 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15796 operation of a tagged synchronized type, handle the case where the
15797 controlling argument is overloaded.
15799 2011-08-02 Yannick Moy <moy@adacore.com>
15801 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15802 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15803 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15804 SPARK mode and formal verification mode on processing SPARK restriction
15805 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15806 requiring consistency checking.
15808 2011-08-02 Robert Dewar <dewar@adacore.com>
15810 * sem_res.adb: Minor reformatting.
15812 2011-08-02 Robert Dewar <dewar@adacore.com>
15814 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15815 a-cforse.ads: Remove unneeded with of Ada.Containers
15816 Remove commented out pragma Inline's
15817 Move specifications of new subprograms to the actual specs
15819 2011-08-02 Yannick Moy <moy@adacore.com>
15821 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15822 a-cforse.ads: Update comments.
15824 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15826 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
15828 2011-08-02 Robert Dewar <dewar@adacore.com>
15830 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15831 a-cforse.ads, a-cofove.ads: Minor reformatting.
15833 2011-08-02 Claire Dross <dross@adacore.com>
15835 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
15836 a-cofove.ads: Add comments.
15838 2011-08-02 Yannick Moy <moy@adacore.com>
15840 * gnat_rm.texi: Document formal containers.
15842 2011-08-02 Emmanuel Briot <briot@adacore.com>
15844 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
15845 are empty sections.
15847 2011-08-02 Robert Dewar <dewar@adacore.com>
15849 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
15852 2011-08-02 Robert Dewar <dewar@adacore.com>
15854 * aspects.adb: New aspects Default_Value and Default_Component_Value
15855 New format of Aspect_Names table checks for omitted entries
15856 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
15857 handling of boolean aspects for derived types.
15858 New aspects Default_Value and Default_Component_Value
15859 New format of Aspect_Names table checks for omitted entries
15860 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
15861 (Has_Default_Value): New flag
15862 (Has_Default_Component_Value): New flag
15863 (Has_Default_Value): New flag
15864 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
15866 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
15867 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
15868 Default_Value and Default_Component_Value
15869 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
15870 New aspects Default_Value and Default_Component_Value
15871 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
15872 * sprint.adb: Print N_Aspect_Specification node when called from gdb
15874 2011-08-02 Vincent Celier <celier@adacore.com>
15876 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
15877 inherit library kind.
15879 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15881 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
15882 Minor reformatting.
15884 2011-08-02 Robert Dewar <dewar@adacore.com>
15886 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
15888 2011-08-02 Yannick Moy <moy@adacore.com>
15890 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
15892 2011-08-02 Robert Dewar <dewar@adacore.com>
15894 * impunit.adb: Add comment.
15896 2011-08-02 Yannick Moy <moy@adacore.com>
15898 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
15899 qualification of aggregates in formal mode
15900 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
15902 (Resolve_Aggregate): complete the test that an aggregate is adequately
15903 qualified in formal mode
15905 2011-08-02 Pascal Obry <obry@adacore.com>
15907 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
15908 * mlib-prj.adb: Supress warning when compiling binder generated file.
15909 (Build_Library): Supress all warnings when compiling the binder
15912 2011-08-02 Yannick Moy <moy@adacore.com>
15914 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
15916 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
15917 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
15918 Add with/use clauses to make Check_Formal_Restriction visible
15920 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15922 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
15923 in-parameters when type of the generic formal is private in the generic
15924 spec and non-private in the body.
15926 2011-08-02 Claire Dross <dross@adacore.com>
15928 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
15929 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
15930 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
15931 * impunit.adb, Makefile.rtl: Take new files into account.
15933 2011-08-02 Robert Dewar <dewar@adacore.com>
15935 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
15936 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15938 2011-08-02 Yannick Moy <moy@adacore.com>
15940 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
15942 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
15943 matching static array bounds, taking into account the special case of
15945 * sem_ch3.adb: Typo in comment.
15947 2011-08-02 Yannick Moy <moy@adacore.com>
15949 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
15950 which issues an error in formal mode if its argument node is originally
15952 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
15953 has a discriminant specification so that it does not include the case
15955 (Derived_Type_Declaration): move here the test that a derived type has a
15956 discriminant specification
15957 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15958 first element of a component association before accessing its choices
15959 (presence of component association is not enough)
15960 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15961 declaration is a library item before accessing the next element in a
15962 list, as library items are not member of lists
15963 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15964 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15965 Check_Formal_Restriction whenever possible.
15967 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15969 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15970 reference when needed.
15972 2011-08-02 Bob Duff <duff@adacore.com>
15974 * gnat_ugn.texi: Fix typo.
15976 2011-08-02 Vincent Celier <celier@adacore.com>
15978 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15979 archive file name. Do not use the full path name of archives for Open
15982 2011-08-02 Robert Dewar <dewar@adacore.com>
15984 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15985 Analyze_Aspect_Specifications
15987 (Analyze_Aspect_Specifications): New handling for boolean aspects
15988 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15989 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15990 sequence for Analyze_Aspect_Specifications
15991 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15992 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15994 2011-08-02 Robert Dewar <dewar@adacore.com>
15996 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15997 aspects, since these no longer exist.
15999 2011-08-02 Robert Dewar <dewar@adacore.com>
16001 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
16002 semicolon, do not try to see if there are aspects following it.
16003 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
16006 2011-08-02 Robert Dewar <dewar@adacore.com>
16008 * sem_ch8.adb, aspects.ads: Minor reformatting.
16010 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16012 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
16013 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
16015 (Analyze_Aspect_Specifications): ...here. Call above procedure.
16017 2011-08-02 Yannick Moy <moy@adacore.com>
16019 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
16020 mode on subprogram declaration outside of package specification, unless
16021 it is followed by a pragma Import
16022 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
16023 Access_Type_Declaration): issue error in formal mode on access type
16024 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
16026 (Analyze_Object_Declaration): issue error in formal mode on object
16027 declaration which does not respect SPARK restrictions
16028 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
16029 declaration which does not respect SPARK restrictions
16030 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
16031 error in formal mode on digits or delta constraint
16032 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
16033 decimal fixed point type
16034 (Derived_Type_Declaration): issue error in formal mode on derived type
16035 other than type extensions of tagged record types
16036 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
16037 with check on access definition
16038 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
16039 mode on protected definition.
16040 (Analyze_Task_Definition): issue error in formal mode on task definition
16042 2011-08-02 Robert Dewar <dewar@adacore.com>
16044 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
16046 2011-08-02 Javier Miranda <miranda@adacore.com>
16048 * sem_ch6.adb (Can_Override_Operator): New function.
16049 (Verify_Overriding_Indicator): Add missing code to check overriding
16050 indicator in operators. Fixes regression.
16051 (Check_Overriding_Indicator): Minor reformating after replacing the
16052 code that evaluates if the subprogram can override an operator by
16053 invocations to the above new function.
16055 (Write_Field26_Name): Add missing code to ensure that, following
16056 the documentation in einfo.ads, this field is not shown as attribute
16057 "Static_Initialization" on non-dispatching functions.
16059 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16061 * sem_res.adb (Resolve_Call): A call to
16062 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
16063 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
16064 i.e., when the second parameter is of type Time_Span.
16066 2011-08-02 Vincent Celier <celier@adacore.com>
16068 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
16069 with an archive instead of -L<library dir> -l<library name>.
16071 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16073 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
16074 mark the base types In_Use in addition to making the operations
16077 2011-08-02 Ed Falis <falis@adacore.com>
16079 * init.c: add and setup __gnat_signal_mask for the exception signals
16080 * s-inmaop-vxworks.adb: new file.
16081 * s-intman-vxworks.adb: remove unnecessary initializations and
16083 * s-intman-vxworks.ads: remove unnecessary variable
16084 * s-taprop-vxworks.adb: simplify signal initialization
16086 2011-08-02 Robert Dewar <dewar@adacore.com>
16088 * sem_ch8.adb: Minor code reorganization, comment updates.
16090 2011-08-02 Robert Dewar <dewar@adacore.com>
16092 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
16093 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
16095 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
16096 (Matching_Static_Array_Bounds): Moved here from Sem_Res
16098 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16100 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
16101 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
16102 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
16103 use_type_clauses, to handle more efficiently use_type and use_all_type
16105 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
16106 Ada2012 Use_All_Type clause.
16107 (Use_Class_Wide_Operations): new procedure.
16109 2011-08-02 Robert Dewar <dewar@adacore.com>
16111 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
16112 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
16113 expression to expression function.
16115 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16117 * sem_ch4.adb: transform simple Ada2012 membership into equality only
16118 if types are compatible.
16120 2011-08-02 Yannick Moy <moy@adacore.com>
16122 * sem_res.adb (Matching_Static_Array_Bounds): new function which
16123 returns True if its argument array types have same dimension and same
16124 static bounds at each index.
16125 (Resolve_Actuals): issue an error in formal mode on actuals passed as
16126 OUT or IN OUT paramaters which are not view conversions in SPARK.
16127 (Resolve_Arithmetic_Op): issue an error in formal mode on
16128 multiplication or division with operands of fixed point types which are
16129 not qualified or explicitly converted.
16130 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
16131 Boolean or array type (except String) operands.
16132 (Resolve_Equality_Op): issue an error in formal mode on equality
16133 operators for array types other than String with non-matching static
16135 (Resolve_Logical_Op): issue an error in formal mode on logical operators
16136 for array types with non-matching static bounds. Factorize the code in
16137 Matching_Static_Array_Bounds.
16138 (Resolve_Qualified_Expression): issue an error in formal mode on
16139 qualified expressions for array types with non-matching static bounds.
16140 (Resolve_Type_Conversion): issue an error in formal mode on type
16141 conversion for array types with non-matching static bounds
16143 2011-08-02 Robert Dewar <dewar@adacore.com>
16145 * par-ch10.adb: Minor code reorganization (use Nkind_In).
16147 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16149 * par-ch9.adb: save location of entry for proper error message.
16151 2011-08-02 Javier Miranda <miranda@adacore.com>
16153 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
16154 (Use_Full_View) which permits this routine to climb through the
16155 ancestors using the full-view of private parents.
16156 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
16157 Use_Full_View to true in calls to Is_Ancestor.
16158 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
16159 true in call to Is_Ancestor.
16160 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
16161 Use_Full_View to true in call to Is_Ancestor.
16162 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
16163 call to Is_Ancestor.
16164 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
16165 Use_Full_View to true in calls to Is_Ancestor.
16166 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
16167 Make_Select_Specific_Data_Table, Register_Primitive,
16168 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
16169 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
16170 to true in call to Is_Ancestor.
16171 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
16172 Use_Full_View to true in calls to Is_Ancestor.
16174 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
16175 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
16177 2011-08-02 Robert Dewar <dewar@adacore.com>
16179 * gnat_rm.texi: Minor reformatting.
16180 * sem_prag.adb: Minor reformatting.
16182 2011-08-02 Tristan Gingold <gingold@adacore.com>
16184 * vms_data.ads: Add VMS qualifier for -gnateP.
16186 2011-08-02 Robert Dewar <dewar@adacore.com>
16188 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
16189 * par-ch7.adb (P_Package): Proper placement of aspects for package
16190 decl/instantiation.
16191 * par-endh.adb (Check_End): Ad Is_Sloc parameter
16192 (End_Statements): Add Is_Sloc parameterr
16193 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
16194 (Check_End): Ad Is_Sloc parameter
16195 (End_Statements): Add Is_Sloc parameterr
16197 2011-08-02 Vincent Celier <celier@adacore.com>
16199 * ug_words: Add VMS qualifier equivalent to -gnateP:
16200 /SYMBOL_PREPROCESSING.
16202 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16204 * gnat-style.texi: For hexadecimal numeric literals the typical
16205 grouping of digits is 4 to represent 2 bytes.
16206 A procedure spec which is split into several lines is indented two
16209 2011-08-02 Yannick Moy <moy@adacore.com>
16211 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
16212 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
16213 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
16215 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
16216 choice in array aggregate
16217 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16219 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16220 positional and named aggregate for record, or others in record
16221 aggregate, or multiple choice in record aggregate
16222 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16223 array operands to logical operations AND, OR and XOR do not have the
16224 same static lower and higher bounds
16225 * sem_ch5.adb, sinfo.ads: Correct typos in comments
16227 2011-08-01 Robert Dewar <dewar@adacore.com>
16229 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16230 Replaces Last_Source_Node_In_Sequence.
16231 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16232 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16233 parens and blank in string (this was inconsistently implemented).
16235 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16236 blank in string (this was inconsistently implemented).
16238 (Set_Global_Switches): Set formal mode switches appropriately
16239 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16241 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16242 call Set_Error_Msg_Lang to set "spark" as language name.
16243 * par.adb: Remove unnecessary call to set formal language for errout
16244 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16245 appropriately and call Set_Error_Msg_Lang to set "spark" as language
16247 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16248 calls to it, moved after resolution so that types are known
16249 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16250 result of concatenation is not of type String
16251 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16252 concatenation is not properly restricted
16253 * gnat_rm.texi: Add doc on pragma Spark_95.
16254 * gcc-interface/Makefile.in: Remove obsolete target pairs for
16255 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16256 * gcc-interface/Make-lang.in: Update dependencies.
16258 2011-08-01 Javier Miranda <miranda@adacore.com>
16260 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16261 condition that detects if the overridden operation must replace an
16264 2011-08-01 Javier Miranda <miranda@adacore.com>
16266 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16267 code declarations inserted by Insert_Actions in each alternative of the
16268 N_Case_Expression node.
16270 2011-08-01 Robert Dewar <dewar@adacore.com>
16272 * sem_ch6.adb: Minor code reorganization.
16273 * sem_util.adb: Minor reformatting.
16275 2011-08-01 Pascal Obry <obry@adacore.com>
16277 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16278 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16280 2011-08-01 Yannick Moy <moy@adacore.com>
16282 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16283 literal or operator symbol which is prefixed
16284 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16285 mode on access attributes.
16286 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16287 that concatenation operands are properly restricted in formal mode
16288 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16289 Analyze_Concatenation_Operand. Issue an error in formal mode if the
16290 result of the concatenation has a type different from String.
16291 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16292 Analyze_Quantified_Expression, Analyze_Slice,
16293 Analyze_Null): issue an error in formal mode on unsupported constructs
16295 (Analyze_Block_Statement): only issue error on source block statement
16296 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16297 function which returns the last node in a list of nodes for which
16298 Comes_From_Source returns True, if any
16299 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16300 Last_Source_Node_In_Sequence
16301 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16302 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16303 mode on unsupported constructs
16304 * sem_ch9.adb Do not return after issuing error in formal mode, as the
16305 rest of the actions may be needed later on since the error is marked as
16307 * sinfo.ads: Typos in comments.
16309 2011-08-01 Pascal Obry <obry@adacore.com>
16311 * projects.texi: Minor editing.
16313 2011-08-01 Yannick Moy <moy@adacore.com>
16315 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16316 insertion character ~~
16317 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16318 (Set_Error_Msg_Lang): new procedure which fixes the language for use
16319 with insertion character ~~
16320 (Set_Msg_Text): treat insertion character ~~
16321 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16322 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16323 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16324 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16325 errors related to the formal language restriction not serious
16326 (insertion character |).
16327 * par.adb (Par): set formal language for error messages if needed
16328 * sem_ch6.adb (Check_Missing_Return): take into account possible
16329 generated statements at the end of the function
16330 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16331 enumeration value to define a new pragma SPARK_95
16332 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16333 SPARK_Version): new type and variables to store the SPARK version
16335 (SPARK_Mode): return True when SPARK_Version is set
16336 * par-prag.adb: Correct indentation
16337 (Prag): take Pragma_SPARK_95 into account
16338 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16341 2011-08-01 Robert Dewar <dewar@adacore.com>
16343 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16344 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16345 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16347 2011-08-01 Pascal Obry <obry@adacore.com>
16349 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16350 Target_Name to Get_Path call.
16351 (Parse_Single_Project): Likewise.
16352 (Post_Parse_Context_Clause): Likewise.
16353 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16354 Call Initialise_Project_Path with the proper Target_Name.
16355 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16357 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16358 with the proper Target_Name.
16359 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16360 Part.Parse routine.
16361 (Parse_Project_And_Apply_Config): Likewise.
16362 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16363 This is fine as this part of the code is supporting only native
16365 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16366 is fine as this part of the code is supporting only native compilation.
16368 2011-08-01 Yannick Moy <moy@adacore.com>
16370 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16371 of homonym, unless the homonym is one of the cases allowed in SPARK
16372 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16373 package declaration occurring after a body.
16375 2011-08-01 Robert Dewar <dewar@adacore.com>
16377 * checks.adb, exp_ch4.adb: Minor reformatting.
16379 2011-08-01 Javier Miranda <miranda@adacore.com>
16381 * einfo.ads (Access_Disp_Table): Fix documentation.
16382 (Dispatch_Table_Wrappers): Fix documentation.
16384 2011-08-01 Pascal Obry <obry@adacore.com>
16386 * prj-env.adb, prj-env.ads: Minor reformatting.
16388 2011-08-01 Yannick Moy <moy@adacore.com>
16390 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16391 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16392 procedures out of these packages.
16393 * errout.ads, errout.adb
16394 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16395 procedures in of this package
16396 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16397 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16398 on misplaced later vs initial declarations, like in Ada 83
16399 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16400 formal mode on attribute of private type whose full type declaration
16402 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16403 package declaration inside a package specification
16404 (Analyze_Full_Type_Declaration): issue error in formal mode on
16405 controlled type or discriminant type
16406 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16407 user-defined operator means that it should come from the source
16408 (New_Overloaded_Entity): issue error in formal mode on overloaded
16410 * sem_ch6.ads, sem_ch13.ads: typos in comments.
16412 2011-08-01 Thomas Quinot <quinot@adacore.com>
16414 * atree.adb: Minor reformatting.
16415 * checks.adb: Minor reformatting.
16417 2011-08-01 Vincent Celier <celier@adacore.com>
16419 * s-parame-vms-ia64.ads: Fix typo in comment
16421 * s-parame-vms-restrict.ads: Removed, unused.
16423 2011-08-01 Javier Miranda <miranda@adacore.com>
16426 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16428 (Constrain_Index): Remove side effects in the evaluation of the bounds.
16429 * sem_ch3.ads, sem_ch3.adb
16430 (Is_Constant_Bound): New extended version of the subprogram that was
16431 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16432 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16433 * sem_aux.ads (Constant_Value): Fix typo in comment.
16434 * checks.adb (Generate_Index_Checks): New implementation which, for
16435 array objects with constant bounds, generates the runtime check
16436 referencing the bounds of the array type. For other cases this routine
16437 provides its previous behavior obtaining such values from the array
16439 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16441 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16442 we cannot have semantic interpretations of the new node.
16444 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16446 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16449 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16451 * sem_ch8.adb: Minor code editing.
16452 * s-vxwext.adb: Remove trailing space.
16453 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16454 consistency with other files.
16456 2011-08-01 Thomas Quinot <quinot@adacore.com>
16458 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16460 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16462 * par-ch10.adb: reject parameterized expressions as compilation unit.
16463 * sem_ch4.adb: handle properly conditional expression with overloaded
16464 then_clause and no else_clause.
16466 2011-08-01 Tristan Gingold <gingold@adacore.com>
16468 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16469 like done by System.Aux_DEC.
16470 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16472 2011-08-01 Yannick Moy <moy@adacore.com>
16474 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16475 missing label at end of declaration (subprogram or package)
16476 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16477 of positional and named parameter association
16478 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16479 Error_Msg_SP which adds a prefix to the error message giving the name
16480 of the formal language analyzed
16481 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16482 access result type in subprogram, unconstrained array as result type,.
16483 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16485 * sem_ch8.adb: Code clean up.
16487 2011-08-01 Javier Miranda <miranda@adacore.com>
16489 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16490 * einfo.ads (Access_Disp_Table): Fix documentation.
16491 (Dispatch_Table_Wrappers): Fix documentation.
16492 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16493 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16494 to enforce the documentation of this attribute.
16495 (Set_Is_Interface): Cleanup the assertion.
16496 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16497 the Underlying_Type entity before reading attribute Access_Disp_Table.
16498 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16499 Locate the Underlying_Type before reading attribute Access_Disp_Table.
16500 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16501 the Underlying_Type entity before reading attribute Access_Disp_Table.
16502 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16503 Locate the Underlying_Type entity before reading attribute
16506 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16508 * s-poosiz.ads: Additional overriding indicators.
16510 2011-08-01 Yannick Moy <moy@adacore.com>
16512 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16514 (Analyze_Iteration_Scheme): issue error in formal mode when loop
16515 parameter specification does not include a subtype mark.
16516 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16517 formal mode on abstract subprogram.
16518 (Analyze_Subprogram_Specification): issue error in formal mode on
16519 user-defined operator.
16520 (Process_Formals): issue error in formal mode on access parameter and
16521 default expression.
16522 * sem_ch9.adb (Analyze_Abort_Statement,
16523 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16524 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16525 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16526 Analyze_Requeue, Analyze_Selective_Accept,
16527 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16528 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16529 issue error in formal mode on user-defined raise statement.
16531 2011-08-01 Thomas Quinot <quinot@adacore.com>
16533 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16534 declaration being hidden when overriding an implicit inherited
16536 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16537 (-gnats), do not complain about a source file that contains only a
16540 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16542 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16543 variable if already set.
16545 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16547 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16548 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16549 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16550 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16551 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16552 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16553 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16554 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16555 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16556 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16557 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16558 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16559 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16560 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16561 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16562 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16563 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16564 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16565 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16566 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16567 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16568 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16569 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16570 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16571 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16572 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16573 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16574 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16575 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16576 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16577 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16578 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16579 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16580 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16581 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16582 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16583 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16584 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16585 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16586 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16587 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16588 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16589 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16590 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16591 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16592 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16593 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16594 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16595 s-osinte-mingw.ads: Update to GPLv3 run-time license.
16596 Use GNAT instead of GNARL.
16598 2011-08-01 Bob Duff <duff@adacore.com>
16600 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16601 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16602 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16605 2011-08-01 Yannick Moy <moy@adacore.com>
16607 * debug.adb (d.D) reverve flag for the SPARK mode
16608 (d.E) reverve flag for SPARK generation mode
16609 (d.F) reverve flag for Why generation mode
16610 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16611 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
16612 functions which return True when the corresponding modes are set
16613 (Formal_Language): return "spark" or "alfa" when in formal verification
16615 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16616 Error_Msg to prefix the error message with a tag giving the formal
16618 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16619 message with a tag giving the formal language
16620 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16622 (Analyze_Case_Statement): issue error in formal mode on case statement
16623 with a single "others" case alternative
16624 (Analyze_Exit_Statement): issue errors in formal mode on exit
16625 statements which do not respect SPARK restrictions
16626 (Analyze_Goto_Statement): issue error in formal mode on goto statement
16627 (Check_Unreachable_Code): always issue an error (not a warning) in
16628 formal mode on unreachable code (concerns both code after an infinite
16629 loop and after an unconditional jump, both not allowed in SPARK)
16630 * sem_ch6.adb (Analyze_Return_Statement): add call to
16631 Set_Return_Present for a procedure containing a return statement
16632 (already done for functions in Analyze_Function_Return)
16633 (Analyze_Function_Return): issue error in formal mode on extended
16634 return or if return is not last statement in function
16635 (Check_Missing_Return): issue error in formal mode if function does
16636 not end with return or if procedure contains a return
16637 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16638 function to detect if there is an inner scope of its parameter S which
16641 2011-08-01 Thomas Quinot <quinot@adacore.com>
16643 * sem_ch6.ads: Minor reformatting.
16645 2011-08-01 Javier Miranda <miranda@adacore.com>
16647 * sem_util.adb (Abstract_Interface_List): Complete condition when
16648 processing private type declarations to avoid reading unavailable
16650 (Is_Synchronized_Tagged_Type): Complete condition when processing
16651 private extension declaration nodes to avoid reading unavailable
16654 2011-08-01 Thomas Quinot <quinot@adacore.com>
16656 * sem_ch3.adb: Minor reformatting.
16658 2011-08-01 Thomas Quinot <quinot@adacore.com>
16660 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16661 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16662 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16663 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16664 for VMS, instead parametrize the common implementation with
16665 System.Parameters declarations.
16667 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
16669 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16671 2011-08-01 Tristan Gingold <gingold@adacore.com>
16673 * seh_init.c: Fix SEH handler installation on win64.
16675 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16677 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16678 double analysis of an anonymous access to subprogram, because it can
16679 lead to improper sharing of profiles and a back-end crash.
16681 2011-08-01 Robert Dewar <dewar@adacore.com>
16683 * make.adb, sem_ch4.adb: Minor reformatting.
16684 * gcc-interface/Make-lang.in: Update dependencies.
16685 * sem_util.adb, exp_ch5.adb: Minor reformatting.
16687 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16689 * gnat_rm.texi: Fix definition of Long_Integer.
16691 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16693 * exp_aggr.adb: check limit size of static aggregate unconditionally,
16694 to prevent storage exhaustion.
16695 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16696 finalized is a function body, insert the cleanup code before the final
16697 return statement, to prevent spurious warnings.
16698 * s-pooglo.ads: add overriding indicator.
16700 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16702 * sem_ch4.adb (Operator_Check): improve error message when both a
16703 with_clause and a use_clause are needed to make operator usage legal.
16704 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16705 determine whether a compilation unit is visible within an other,
16706 either through a with_clause in the current unit, or a with_clause in
16707 its library unit or one one of its parents.
16709 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16711 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16712 over an arbitrary expression of an array or container type.
16713 * lib-xref.adb: clarify comment.
16715 2011-08-01 Bob Duff <duff@adacore.com>
16717 * einfo.ads: Minor reformatting.
16718 * debug.adb: Minor comment improvement.
16720 2011-08-01 Javier Miranda <miranda@adacore.com>
16722 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16723 consider hidden subprograms as valid candidates.
16725 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16727 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16729 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
16731 * gnat_ugn.texi: Fix typo.
16733 2011-08-01 Robert Dewar <dewar@adacore.com>
16735 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16736 lib-xref.adb: Minor reformatting
16738 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16740 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16741 when to generate a call to Move_Final_List.
16742 (Has_Controlled_Parts): Remove this function.
16744 2011-08-01 Geert Bosch <bosch@adacore.com>
16746 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16747 "," in choice list.
16749 2011-08-01 Thomas Quinot <quinot@adacore.com>
16751 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16752 explicit raise of a predefined exception as Comes_From_Source if the
16753 original N_Raise_Statement comes from source.
16755 2011-08-01 Robert Dewar <dewar@adacore.com>
16757 * sinfo.ads: Add comment.
16758 * sem_ch6.adb: Minor reformatting.
16760 2011-08-01 Robert Dewar <dewar@adacore.com>
16762 * freeze.adb (Freeze_Entity): Refine check for bad component size
16763 clause to avoid rejecting confirming clause when atomic/aliased present.
16765 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16767 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16768 better determine whether an entity reference is a write.
16769 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16771 * lib-xref.adb (Output_References): Do no suppress a read reference at
16772 the same location as an immediately preceeding modify-reference, to
16773 handle properly in-out actuals.
16775 2011-08-01 Tristan Gingold <gingold@adacore.com>
16777 * env.c (__gnat_setenv) [VMS]: Refine previous change.
16779 2011-08-01 Quentin Ochem <ochem@adacore.com>
16781 * i-cstrin.adb (New_String): Changed implementation, now uses only the
16782 heap to compute the result.
16784 2011-08-01 Robert Dewar <dewar@adacore.com>
16786 * atree.ads: Minor reformatting.
16788 2011-08-01 Emmanuel Briot <briot@adacore.com>
16790 * g-expect.adb (Get_Command_Output): Fix memory leak.
16792 2011-08-01 Geert Bosch <bosch@adacore.com>
16794 * cstand.adb (P_Float_Type): New procedure to print the definition of
16795 predefined fpt types.
16796 (P_Mixed_Name): New procedure to print a name using mixed case
16797 (Print_Standard): Use P_Float_Type for printing floating point types
16798 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16799 precision IEEE float.
16801 2011-08-01 Thomas Quinot <quinot@adacore.com>
16803 * sem_ch3.adb: Minor reformatting.
16805 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16807 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16808 the completion of a generic function, insert the new body rather than
16809 rewriting the original.
16811 2011-08-01 Yannick Moy <moy@adacore.com>
16813 * sinfo.ads, errout.ads: Typos in comments.
16815 2011-08-01 Robert Dewar <dewar@adacore.com>
16817 * par-endh.adb: Minor reformatting.
16819 2011-08-01 Robert Dewar <dewar@adacore.com>
16821 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16822 (Pre_Post_Aspects): New subtype.
16823 * par-ch12.adb (P_Generic): New syntax for aspects in packages
16824 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
16825 * par-ch7.adb (P_Package): Remove Decl parameter
16826 (P_Package): Handle new syntax for aspects (before IS)
16827 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
16829 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
16830 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
16831 (P_Package): Remove Decl parameter
16832 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
16834 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
16836 * sem_util.ads, sem_util.adb (Static_Boolean): New function
16837 * sinfo.ads: Document new syntax for aspects in packages etc.
16838 * sprint.adb: Handle new syntax of aspects before IS in package
16840 2011-08-01 Thomas Quinot <quinot@adacore.com>
16842 * atree.ads: Minor reformatting.
16843 * sem_prag.adb: Minor reformatting.
16845 2011-08-01 Robert Dewar <dewar@adacore.com>
16847 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
16848 case expr alternative.
16850 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16852 * sem_ch12.adb: Fix typo.
16854 2011-08-01 Geert Bosch <bosch@adacore.com>
16856 * sem_prag.adb (Check_No_Link_Name): New procedure.
16857 (Process_Import_Or_Interface): Use Check_No_Link_Name.
16858 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
16859 instead of Standard_Long_Long_Float_Size global. Preparation for
16860 eventual removal of per type constants.
16861 * exp_util.ads (Get_Stream_Size): New function returning the stream
16862 size value of subtype E.
16863 * exp_util.adb (Get_Stream_Size): Implement new function.
16864 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
16866 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
16868 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
16870 2011-08-01 Geert Bosch <bosch@adacore.com>
16872 * cstand.adb: Fix comments.
16873 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
16874 count of arguments.
16876 2011-08-01 Robert Dewar <dewar@adacore.com>
16878 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
16880 2011-08-01 Geert Bosch <bosch@adacore.com>
16882 * atree.ads: Fix comment.
16884 2011-08-01 Robert Dewar <dewar@adacore.com>
16886 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
16887 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
16888 * par.adb: Add with for Namet.Sp.
16889 * par-tchk.adb: Minor reformatting.
16891 2011-08-01 Vincent Celier <celier@adacore.com>
16893 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
16894 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
16895 of the init procedure of a SAL.
16896 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
16899 2011-08-01 Thomas Quinot <quinot@adacore.com>
16901 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
16904 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16906 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
16908 2011-08-01 Thomas Quinot <quinot@adacore.com>
16910 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
16911 conformant with its spec (return True only for types that have
16912 an overriding Initialize primitive operation that prevents them from
16913 having preelaborable initialization).
16914 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
16915 initialization for controlled types in Ada 2005 or later mode.
16917 2011-08-01 Robert Dewar <dewar@adacore.com>
16919 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
16921 (Same_Aspect): New function.
16922 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
16923 Type_Invariant, Precondition, Postcondition.
16924 * snames.ads-tmpl: Add Name_Type_Invariant.
16926 2011-08-01 Robert Dewar <dewar@adacore.com>
16928 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
16930 (Freeze_All_Ent): Fix error in handling inherited aspects.
16931 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
16932 already analyzed, but don't skip entire processing of a declaration,
16933 that's wrong in some cases of declarations being rewritten.
16934 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
16935 Don't delay for integer, string literals
16936 Treat predicates in usual manner for delay, remove special case code,
16938 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
16939 (Build_Predicate_Function): Update saved expression in aspect
16940 (Build_Invariant_Procedure): Update saved expression in aspect
16941 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
16942 of replacement of discriminant references if the reference is simple.
16944 2011-08-01 Robert Dewar <dewar@adacore.com>
16946 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
16947 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
16948 Static_Predicate and Dynamic_Predicate.
16949 (Build_Predicate_Function): Add processing for Static_Predicate
16950 and Dynamic_Predicate.
16951 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
16952 (From_Static_Predicate): New flag
16953 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16955 2011-08-01 Robert Dewar <dewar@adacore.com>
16957 * usage.adb: Documentation cleanup for Ada version modes in usage.
16958 * expander.adb: Minor reformatting.
16960 2011-08-01 Robert Dewar <dewar@adacore.com>
16962 * atree.ads: Minor comment fix.
16963 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16964 a-witeio.ads, sem_prag.adb: Minor reformatting.
16966 2011-08-01 Doug Rupp <rupp@adacore.com>
16968 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16969 pointers. Use descrip.h header file for convenience. Add some
16972 2011-08-01 Robert Dewar <dewar@adacore.com>
16974 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16975 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16976 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16978 (Check_Aspect_At_End_Of_Declarations): New procedure
16979 (Analye_Aspect_Specification): Minor changes for above procedures
16980 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16981 specification node as well.
16983 2011-08-01 Pascal Obry <obry@adacore.com>
16985 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16986 Windows files. Use GetFilesAttributes() in this case to check for file
16987 existence instead of returning with an error code.
16989 2011-08-01 Vincent Celier <celier@adacore.com>
16991 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16992 High is above Source length.
16994 2011-08-01 Robert Dewar <dewar@adacore.com>
16996 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16998 2011-08-01 Robert Dewar <dewar@adacore.com>
17000 * aspects.ads (Boolean_Aspects): New subtype.
17001 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
17002 for derived types in cases where the parent type and derived type have
17004 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
17005 with aspects when parent type also has aspects.
17006 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
17007 boolean expression at this point).
17008 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
17009 accordance with final decision on the Ada 2012 feature.
17010 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
17012 2011-08-01 Matthew Heaney <heaney@adacore.com>
17014 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
17016 2011-08-01 Pascal Obry <obry@adacore.com>
17018 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
17019 Fix Replace_Slice when High is above current string size.
17020 (Replace_Slice): Fix DL computation when High is above current
17023 2011-08-01 Gary Dismukes <dismukes@adacore.com>
17025 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
17027 2011-08-01 Matthew Heaney <heaney@adacore.com>
17029 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
17032 2011-08-01 Pascal Obry <obry@adacore.com>
17034 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
17037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17039 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
17040 access to protected subprograms in generic bodies.
17041 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
17042 protected type, indicate that the convention of the subprogram is
17043 Convention_Protected, because it may be used in subsequent declarations
17044 within the protected declaration.
17046 2011-08-01 Vincent Celier <celier@adacore.com>
17048 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
17049 and "final" procedures when the name of the library is "ada", to avoid
17050 duplicate symbols "adainit" and "adafinal" in executables.
17052 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17054 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
17055 quantified expression that appears within a postcondition and uses the
17056 Ada2012 'Result attribute.
17058 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17060 * init.c (__gnat_error_handler): Cast reason to int.
17061 (__gnat_install_handler): Explain sa_sigaction use.
17063 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17065 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
17066 subprogram has copy-in copy-out parameters, try to promote the mode of
17067 the return type if it is passed in registers.
17069 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17071 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
17072 left operand as addressable.
17074 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17076 * gcc-interface/gigi.h (build_function_stub): Remove.
17077 (build_return_expr): Likewise.
17078 (convert_vms_descriptor): Declare.
17079 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
17080 (build_function_stub): Move to...
17081 * gcc-interface/utils2.c (build_return_expr): Move to...
17082 * gcc-interface/trans.c (build_function_stub): ...here.
17083 (build_return_expr): ...here.
17084 (Subprogram_Body_to_gnu): Add local variable for language_function.
17085 Disconnect the parameter attributes cache, if any, once done with it.
17086 Call end_subprog_body only after setting the end_locus.
17087 Build the stub associated with the function, if any, at the very end.
17088 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
17089 variables and streamline control flow.
17091 2011-07-23 Arnaud Charlet <charlet@adacore.com>
17094 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
17095 g-trasym-dwarf.adb.
17097 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17100 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
17101 Assign to act.sa_sigaction.
17102 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
17103 current->return_address to char * before arithmetic.
17105 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17107 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
17108 Correct argument types.
17109 Extract code from reason.
17110 (__gnat_install_handler): Assign to act.sa_sigaction.
17112 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
17114 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
17115 (GNAT1_OBJS): ...here.
17117 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
17120 * g-socthi-mingw.adb (Fill): Fix formatting.
17122 * gcc-interface/gigi.h: Move around comment.
17124 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
17127 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
17129 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
17132 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
17134 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
17136 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
17137 range comparison if Pmode is SImode.
17139 2011-07-12 Laurent GUERBY <laurent@guerby.net>
17140 Eric Botcazou <ebotcazou@adacore.com>
17142 * adadecode.c: Wrap up in extern "C" block.
17143 * adadecode.h: Likewise.
17144 * adaint.c: Likewise. Remove 'const' keyword.
17145 * adaint.h: Likewise.
17146 * argv.c: Likewise.
17147 * atree.h: Likewise.
17149 * cstreams.c: Likewise.
17151 * exit.c: Likewise.
17153 * final.c: Likewise.
17154 * init.c: Likewise.
17155 * initialize.c: Likewise.
17156 * link.c: Likewise.
17157 * namet.h: Likewise.
17158 * nlists.h: Likewise.
17159 * raise.c: Likewise.
17160 * raise.h: Likewise.
17161 * repinfo.h: Likewise.
17162 * seh_init.c: Likewise.
17163 * targext.c: Likewise.
17164 * tracebak.c: Likewise.
17165 * uintp.h: Likewise.
17166 * urealp.h: Likewise.
17167 * xeinfo.adb: Wrap up generated C code in extern "C" block.
17168 * xsinfo.adb: Likewise.
17169 * xsnamest.adb: Likewise.
17170 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
17171 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
17172 * gcc-interface/misc.c: Likewise.
17173 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
17174 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
17175 ada/targext.o here...
17176 (GNAT_ADA_OBJS): ...and not here.
17177 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
17178 (GNATBIND_OBJS): Reorder.
17180 2011-07-07 Richard Henderson <rth@redhat.com>
17182 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
17183 dwarf2out_frame_init.
17185 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
17187 * gcc-interface/misc.c (gnat_init): Tweak previous change.
17189 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17192 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
17194 2011-07-06 Richard Guenther <rguenther@suse.de>
17196 * gcc-interface/misc.c (gnat_init): Merge calls to
17197 build_common_tree_nodes and build_common_tree_nodes_2.
17198 Re-initialize boolean_false_node.
17200 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
17201 Olivier Hainque <hainque@adacore.com>
17202 Nicolas Setton <setton@adacore.com>
17204 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
17205 the type according to the ARTIFICIAL_P parameter.
17206 (create_type_decl): Likewise.
17207 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
17209 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
17211 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
17212 (gnatbind): Likewise.
17214 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17216 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
17218 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17220 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17221 local variable throughout. Remove useless call to Base_Type.
17222 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17223 Take it also into account for the volatileness of the field. Set the
17224 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
17226 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17228 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17229 on a dereference built for a by-ref object if it has an address clause.
17231 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17233 * einfo.ads (Address_Taken): Document use for the second argument of
17234 Asm_Input and Asm_Output attributes.
17235 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17236 argument is an entity name, then set Address_Taken on it.
17237 <Attribute_Asm_Output>: Likewise.
17238 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17239 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17240 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17241 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17243 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
17245 PR middle-end/46500
17246 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17248 2011-06-14 Joseph Myers <joseph@codesourcery.com>
17250 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17251 (ada/utils.o): Update dependencies.
17252 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17253 ../../../libcpp/libcpp.a.
17254 * gcc-interface/utils.c: Include common/common-target.h.
17255 (process_attributes): Use targetm_common.have_named_sections.
17257 2011-06-07 Richard Guenther <rguenther@suse.de>
17259 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17262 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17264 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17265 TREE_THIS_NOTRAP flag.
17267 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17269 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17272 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17274 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17275 constants whose full view has discriminants specially.
17277 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17279 * gcc-interface/utils.c: Include diagnostic.h.
17280 (gnat_write_global_declarations): Output debug information for all
17281 global type declarations before finalizing the compilation unit.
17282 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17284 2011-05-25 Jakub Jelinek <jakub@redhat.com>
17286 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17288 2011-05-25 Kai Tietz <ktietz@redhat.com>
17290 * adaint.c (__gnat_to_canonical_file_list_next): Use array
17291 initialization instead of const/none-const pointer assignment.
17293 2011-05-24 Joseph Myers <joseph@codesourcery.com>
17295 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17296 $(EXTRA_GNAT1_OBJS).
17297 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17298 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17299 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17300 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17301 libcommon-target.a instead of prefix.o.
17303 2011-05-21 Joseph Myers <joseph@codesourcery.com>
17306 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17308 2011-05-20 Joseph Myers <joseph@codesourcery.com>
17310 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17311 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17312 instead of version.o.
17314 2011-05-18 Kai Tietz <ktietz@redhat.com>
17316 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17317 boolean_false_node instead of integer_zero_node.
17318 (convert_with_check): Likewise.
17319 * gcc-interface/decl.c (choices_to_gnu): Likewise.
17321 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
17323 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17324 type of the parameter is an unconstrained array, convert the actual to
17325 the type of the formal in the In Out and Out cases as well.
17327 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17329 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17330 call build_function_type_array or build_varargs_function_type_array
17332 (create_subprog_type): Don't call build_function_type; call
17333 build_function_type_vec instead.
17335 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17337 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17338 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17339 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17341 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
17343 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17345 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17346 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17348 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17350 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17352 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17354 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17355 instead of accessing TYPE_ARG_TYPES directly.
17356 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17358 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17361 * gcc-interface/gigi.h (get_variant_part): Declare.
17362 * gcc-interface/decl.c (get_variant_part): Make global.
17363 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17364 types have the same constant size, are record types and T1 has a
17365 variant part while T2 doesn't.
17367 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17369 * gcc-interface/utils.c (begin_subprog_body): Do not call
17371 (end_subprog_body): Likewise.
17373 2011-05-04 Richard Guenther <rguenther@suse.de>
17375 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17377 (pos_to_constructor): Likewise.
17379 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
17380 Eric Botcazou <ebotcazou@adacore.com>
17382 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17383 of build_function_type. Adjust calls to...
17384 (build_raise_check): ...this. Do not take a void_tree parameter.
17385 Call build_function_type_list instead of build_function_type.
17386 Fix head comment and swap couple of conditional blocks.
17388 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
17390 * gnatvsn.ads (Library_Version): Bump to 4.7.
17391 (Current_Year): Bump to 2011.
17393 2011-04-29 Michael Matz <matz@suse.de>
17395 * gcc-interface/misc.c (gnat_handle_option): Set
17396 warn_maybe_uninitialized.
17398 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
17400 * gnat_ugn.texi (Complexity Metrics Control): Update link to
17401 the Watson/McCabe paper.
17403 2011-04-23 Jim Meyering <meyering@redhat.com>
17405 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17407 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17409 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17412 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17414 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17416 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
17417 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17418 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17419 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17420 <all>: Do not set flags on the reused DECL node coming from an alias.
17421 Set DECL_IGNORED_P on the DECL node built for subprograms if they
17422 don't need debug info here...
17423 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17424 (gigi): Adjust calls to create_subprog_decl.
17425 (build_raise_check): Likewise.
17426 (establish_gnat_vms_condition_handler): Likewise.
17427 (Compilation_Unit_to_gnu): Likewise.
17428 (gnat_to_gnu): Likewise.
17430 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
17432 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17433 (NO_REORDER_ADAFLAGS): New variable.
17434 (EXTRA_GNATTOOLS): Always define.
17435 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17436 Clean up and adjust list of files compiled with special options.
17437 * gcc-interface/Make-lang.in: Likewise.
17438 (ada/decl.o): Cosmetical change.
17439 (ada/misc.o): Remove dependency on $(PLUGIN_H).
17441 2011-04-20 Jim Meyering <meyering@redhat.com>
17443 * initialize.c (__gnat_initialize): Remove useless if-before-free.
17445 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17447 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17448 $(CFLAGS) on the link line.
17450 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17452 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17453 padded type built for the return type if it is unconstrained.
17455 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
17457 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17459 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
17461 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17462 before calling TREE_CHAIN.
17463 * gcc-interface/misc.c (gnat_init_ts): New function.
17464 (LANG_HOOKS_INIT_TS): Define.
17466 2011-04-12 Martin Jambor <mjambor@suse.cz>
17468 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17469 instead of cgraph_node.
17471 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17473 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17474 alignment on fields of the RETURN type built for the Copy-In Copy-Out
17477 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17479 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17480 of aggregate types that contain a placeholder.
17482 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
17484 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17486 (handle_type_generic_attribute): Likewise.
17488 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
17491 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17493 2011-04-04 Kai Tietz <ktietz@redhat.com>
17496 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17499 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17501 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17502 type case, do not strip a padding type around the array type.
17504 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17506 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17509 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17511 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17512 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17513 code for -feliminate-unused-debug-types.
17514 (gnat_post_options): Likewise.
17516 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17518 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17519 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17522 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17524 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17525 DECL_ARTIFICIAL flag on enumeration types.
17527 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17529 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17530 fat pointer types artificial unconditionally.
17531 <E_Array_Subtype>: Attach the base array type as a parallel type if it
17534 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17536 * gcc-interface/gigi.h (get_dummy_type): Declare.
17537 (build_dummy_unc_pointer_types): Likewise.
17538 (finish_fat_pointer_type): Likewise.
17539 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17540 fat pointer type has been built, complete it in place.
17541 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17542 and thin pointers. Remove useless variable.
17543 (finish_fat_pointer_type): Make global and move to...
17544 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17545 (get_dummy_type): New function.
17546 (build_dummy_unc_pointer_types): Likewise.
17547 (gnat_pushdecl): Propage the name to the anonymous variants only.
17548 (update_pointer_to): Only adjust the pointer types in the unconstrained
17551 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17553 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17554 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17555 if this is a Taft amendment type and the full declaration is available.
17556 * gcc-interface/trans.c (process_type): Likewise.
17557 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17558 (process_freeze_entity): Likewise.
17559 * gcc-interface/utils.c (dummy_global): New static variable.
17560 (gnat_write_global_declarations): If there are types declared as used
17561 at the global level, insert them in the global hash table.
17563 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17565 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17566 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17567 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17569 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
17570 flag of the type accordingly.
17571 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17573 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17575 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17576 finalizing types when updating the pointers to the designated type.
17577 <all>: Finalize the deferred types even if we didn't defer processing
17578 of incomplete types in this invocation.
17580 2011-04-01 Olivier Hainque <hainque@adacore.com>
17581 Nicolas Setton <setton@adacore.com>
17582 Eric Botcazou <ebotcazou@adacore.com>
17584 * gcc-interface/misc.c (gnat_descriptive_type): New function.
17585 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17587 2011-03-28 Kai Tietz <ktietz@redhat.com>
17589 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17591 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17592 * system-mingw.ads (System): Change ZCX_By_Default default to True.
17594 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17596 2011-03-28 Tristan Gingold <gingold@adacore.com>
17599 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17600 Use ada output of gnatbind.
17601 (ada/b_gnatb.adb): Ditto.
17602 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17603 (ada.mostlyclean, ada.stage1)
17604 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17605 (ada.stagefeedback): Adjust.
17606 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17607 Use ada output of gnatbind.
17608 (b_gnatm.adb): Ditto.
17609 (b_gnatl.o, b_gnatm.o): New rules.
17611 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17613 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17614 for the padded type built to support a specified size or alignment.
17616 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17618 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17620 unconditionally to the end of the unit when the designated type is
17622 <all>: Rename local variable. Attempt to un-defer types only and do it
17623 for limited_with'ed types as well.
17624 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
17625 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17626 consistently and remove redundant call to finalize_from_with_types.
17628 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17630 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17631 subprograms without a previous spec declared in the same unit.
17632 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17633 subprograms at the end of the unit instead of at the beginning.
17634 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17635 isn't public for the special handling of non-inline functions nested
17636 inside inline external functions.
17638 2011-03-25 Jeff Law <law@redhat.com>
17640 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17642 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17644 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17645 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17646 to compute Set_Size_Depends_On_Discriminant.
17647 (Layout_Type): Call it on array types in back-end layout mode.
17648 * sem_util.adb (Requires_Transient_Scope): Return true for array
17649 types only if the size depends on the value of discriminants.
17650 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17651 type if the RHS is a call to a function that returns an unconstrained
17652 type with default discriminant.
17654 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17656 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17657 non-conversion to the nominal result type at the end.
17659 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17661 * gcc-interface/trans.c (create_temporary): New function taken from...
17662 (create_init_temporary): ...here. Call it.
17663 (call_to_gnu): Create the temporary for the return value early, if any.
17664 Create it for a function with copy-in/copy-out parameters if there is
17665 no target; in other cases of copy-in/copy-out, use another temporary.
17666 Push the new binding level lazily. Add and rename local variables.
17668 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17670 * gcc-interface/decl.c (validate_size): Improve comments and tweak
17672 (set_rm_size): Likewise.
17674 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17676 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17677 for the padded type built in order to support a specified alignment.
17678 Fix incorrect formatting.
17680 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17683 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17685 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17687 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17688 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17689 to the end of the list. Adjust recursive call. Rename local variable.
17690 If REORDER is true, reorder components of the record type.
17691 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17692 components_to_record and adjust the parameter list.
17694 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17696 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17697 disabled, use the variable for bounds of loop iteration scheme.
17699 2011-03-21 Kai Tietz <ktietz@redhat.com>
17702 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17704 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17706 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17707 out whether the expression is read-only. Short-circuit placeholder
17708 case and rename a couple of local variables.
17710 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17712 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17713 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17714 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17715 (convert): Deal with conversions from a smaller form type specially.
17717 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
17719 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17720 its argument, except for the special -I- switch.
17722 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
17724 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17727 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
17729 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17731 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
17733 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17735 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17736 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
17737 instead of GNAT_FORMAL. Protect the expression against multiple uses.
17738 Do not generate the check directly, instead instantiate the template
17739 check present in the descriptor.
17740 (make_descriptor_field): Move around.
17741 (build_vms_descriptor32): Build a template check in the POINTER field.
17742 (build_vms_descriptor): Remove useless suffixes.
17743 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17745 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
17748 * targext.c: Include target files if IN_RTS is defined.
17750 2011-01-26 Richard Guenther <rguenther@suse.de>
17753 * targext.c: Include config.h.
17754 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17757 2011-01-04 Pascal Obry <obry@adacore.com>
17758 Eric Botcazou <ebotcazou@adacore.com>
17760 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17762 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17764 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17765 end-of-case on the end label and its associated gotos, if any.
17767 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17769 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17770 expressions of the parameter cache within the statement group of
17771 the CICO mechanism.
17773 2011-01-04 Olivier Hainque <hainque@adacore.com>
17774 Eric Botcazou <ebotcazou@adacore.com>
17776 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17777 (set_end_locus_from_node): New function.
17778 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17779 make and the function end_locus.
17780 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17781 for the elaboration subprogram.
17782 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17783 set the end_locus of the expression as well.
17785 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17788 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17789 variables that are referenced in exception handlers volatile.
17793 Copyright (C) 2011 Free Software Foundation, Inc.
17795 Copying and distribution of this file, with or without modification,
17796 are permitted in any medium without royalty provided the copyright
17797 notice and this notice are preserved.